3 ms·
If you are wanting proper SQL command support, you could copy the SQLite parser approach. Properly parsing all valid command texts is not a problem that I would
by bob1029 2y ago
If you are wanting proper SQL command support, you could copy the SQLite parser approach. Properly parsing all valid command texts is not a problem that I would find compelling unless I was being compensated for it.
https://www.sqlite.org/lemon.html https://www.sqlite.org/lemon.html
You could probably use something like participle, but you'd have to translate the grammar.
https://github.com/alecthomas/participle https://github.com/alecthomas/participle
- Sahil121 2y agoyes man have to work on adding the sql cmd support thanks for the links
- qaq 2y agoYou can use https://github.com/cockroachdb/cockroachdb-parser https://github.com/cockroachdb/cockroachdb-parser which is basically PGSQL compatible parser implemented in golang
- mingodad 2y agoI do have a big collection of LALR(1) grammars to test/study/develop/document here https://mingodad.github.io/parsertl-playground/playground/ https://mingodad.github.io/parsertl-playground/playground/ including sqlite, tidb, vites, postgresql, mysql, ...