Re: Hand written parsers
От | Mark Butler |
---|---|
Тема | Re: Hand written parsers |
Дата | |
Msg-id | 3AD53124.D0923FAC@middle.net обсуждение исходный текст |
Ответ на | Re: Yacc / Bison difficulties (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: Re: Hand written parsers
|
Список | pgsql-hackers |
Bruce Momjian wrote: > Interesting. What advantages would there be? As any one who has ever attempted to build a C++ parser using Yacc or Bison can attest, it is very difficult to get an LALR based parser to correctly parse a sophisticated grammar. The advantages of using a hand written recursive descent parser lie in four areas: 1) ease of implementing grammar changes 2) ease of debugging 3) ability to handle unusual cases 4) ability to support context sensitive grammars Context sensitivity is useful for handling things like embedded programming languages without having to escape whole procedures as string literals, for example. We could support procedural language plugins without the current limitations on syntax. Another nice capability is the ability to enable and disable grammar rules at run time - you could add run time options to disable all non SQL-92 grammar rules for application portability testing or emulate Oracle's outer join syntax, as a couple of examples. - Mark Butler
В списке pgsql-hackers по дате отправления: