3 ms·
I switched over to ANTLR 4. It is strictly superior to ANTLR 3. The listener approach rather than embedding code in the grammar is very natural. Separating lead
by CalChris 10y ago
I switched over to ANTLR 4. It is strictly superior to ANTLR 3. The listener approach rather than embedding code in the grammar is very natural. Separating leads to clean grammars and clean action code. Odd thing is that I was stuck on 3 because 4 didn't support C yet and then I just switched to the Java target in an anti-C pique. Shoulda done that awhile ago.
TParr's The Definitive ANTLR 4 Reference is quite good. And so's this mega tutorial.
https://pragprog.com/book/tpantlr2/the-definitive-antlr-4-reference https://pragprog.com/book/tpantlr2/the-definitive-antlr-4-re...
ANTLR is my goto tool for DSLs.
- n00b101 10y agoANTLR4 has a C++ target now (finally)
- ftomassetti 10y agoagreed! ANTLR 4 is so much better: writing rules with left recursion is much easier