Re: Status report: getting plpgsql to use the core lexer

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Status report: getting plpgsql to use the core lexer
Дата
Msg-id 17357.1247785852@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Status report: getting plpgsql to use the core lexer  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> ...
> We were able to get to much cleaner code by rewriting the parser to
> have a "dumb" phase to get the overall structure into an AST, and then
> use a tree-walker phase to do all the lookups and type resolution
> after we had the rough structure, writing another AST to walk for code
> generation.  Besides making the code cleaner and easier to maintain,
> it helped us give better error messages pointing more accurately to
> the source of the problem.  I don't know if a similar approach is
> feasible in flex/bison, but if it is, refactoring for an extra pass
> might be worth the trouble.

That's actually what we have in the core parser.  plpgsql is trying to
take shortcuts, and this whole project is exactly about weaning it away
from that.  The bottom line is I tried to tackle the sub-projects in the
wrong order...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Status report: getting plpgsql to use the core lexer
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Docbook toolchain interfering with patch review?