Closed F-Loyer closed 8 months ago
I propose to close the proposal... A PgSQL parser is roughly 5000 lines (https://github.com/antlr/grammars-v4/blob/master/sql/postgresql/PostgreSQLParser.g4) and can be error prone to convert to menhir.
A best way is to adapt pg_query
to Windows. It has already be done for Ruby (stripping all socket handling not needed to parse a SQL statement). I have just to adapt this port to OCaml.
I had some trouble compiling pg_query on Windows (some include files unavailable and more).
I think that it could be interesting to replace the Pg_query.parse by a pure Ocaml parser (menhir/ocamllex). I could grab a Postgress grammar easily (from the antlr repository), then it could be quite straightforward.
What do you think of this project?