2 ms·
I'll check out Azure Data Studio, thank you. For a bunch of reasons, probably all bad, I decided to roll my own, using ANTLR. Being just a simple bear, LALR (
by specialist 3y ago
I'll check out Azure Data Studio, thank you.
For a bunch of reasons, probably all bad, I decided to roll my own, using ANTLR.
Being just a simple bear, LALR (yacc, bison) is beyond me.
With ANTLR4 the parse tree can be pretty close to the desired abstract syntax tree. Which is very nice.
Also, ANTLR4 has automagic left-recursion, so grammars can be very similar to the (reference) EBNF.
Lastly, ANTLR4 allows grammar inheritance. My hope is to have a subgrammar for each dialect which extends the one amazing core supergrammar. Looking at all the example SQL grammars, they're all pretty different, so it's not immediately clear how to generalize. Which is a bummer.