Re: Parser Cruft in gram.y

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Parser Cruft in gram.y
Дата
Msg-id 27090.1355800780@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Parser Cruft in gram.y  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> I'm frankly kind of shocked at the revelation that the parser is
> already 14% of the backend.  I knew it was big; I didn't realize it
> was THAT big.

Yeah, likewise.  It makes me wonder whether we aren't past the size
of grammar that bison is a good choice for: considering that gram.y
is only circa 1% of the source text, it's surprising to find that
it compiles to >10% of the object code.

I'm not sure what other tool might be better though.  I looked through
http://en.wikipedia.org/wiki/Comparison_of_parser_generators#Deterministic_context-free_languages
but it seems our options are a bit limited if we want something
that produces C.  It's not clear to me that any of the likely options
are as mature as bison, let alone likely to substantially outperform it.
(For instance, Hyacc sounded pretty promising until I got to the part
about it doesn't yet support %union or %type.)  Still, I didn't spend
much time on this --- maybe somebody else would like to do a bit more
research.
        regards, tom lane



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: configure.in and setproctitle/optreset problem
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Assert for frontend programs?