Le 31/01/2016 21:06, stepharo a écrit :
Le 31/1/16 17:44, Thierry Goubier a écrit :
Le 31/01/2016 15:21, stepharo a écrit :
The main problem is that there is no PS/SQL BNF
available.
I found a SQL92 but nothing else.
I found a lexer in antlr but nothing else.
Just searching five minutes I found many resources and a lot of
questions about LALR parsing of SQL (3 EBNF for recent SQLs, etc...).
Where? because I spent a couple of hours I only found SQL92
http://savage.net.au/SQL/
SQL-92, -99, -2003
But the point
wasn't that; what a LALR/LR parser gives you is a
grammar ambiguity and conflicts... PetitParser will happily take your
grammar ans you will only discover when parsing something that it
doesn't do what you would like.
(The reference citation of Aho and Ullman is ... it may be difficult
to determine what the language is).
So since you have a grammar, use LALR to check it.
But as I said we do not have it.
You do have a PEG grammar in your PetitParser efforts, since you have
been working on it. From far, those grammars are very much like other
grammars... just that the parser generator behave differently when you
have conflicts and ambiguity.
Thierry