Le 31/01/2016 17:14, Stephan Eggermont a écrit :
On 31-01-16 15:21, stepharo wrote:
The main problem is that there is no PS/SQL BNF available.
No BNF, but there are the bison rules:
https://github.com/postgres/postgres/blob/master/src/backend/parser/gram.y
Then this is the best case for a language parser. Proven LALR/GLR to start with. A working true grammar available. Maybe hacks inside the lexer.
So there is no work to be done. Almost none. Take that bison grammar, understand a bit some of the bison quirks, reproduce and you're done.
Thierry
I found a SQL92 but nothing else. I found a lexer in antlr but nothing else.
Indeed, a common problem. The main RDBMS vendors agreed on the SQL 92 standard and then didn't implement it, to keep their customers locked in. At least for PostgreSQL we can take a look at the source...
And you certainly found the key resource.
Thierry
Stephan
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev