Do you mean instead of an AST? I find the syntax tree better for non-compiler applications like translators.
667 karma · joined October 25, 2014
Do you mean instead of an AST? I find the syntax tree better for non-compiler applications like translators.
The thing to remember is that the vast majority of parsers out there are not for these production language compilers. Compare the number of people you know that have built parsers for a DSL, data, documents, or whatever to the number of people you know that built compilers. ANTLR's niche is for your everyday parsing needs. It generates fast ALL(*) parsers in a multitude of languages and accepts all grammars without complaint, with the minor constraint that it cannot handle indirect left recursion. (Direct left recursion as an expressions is totally okay.) For a speed shootout with other tools, see OOPSLA paper http://www.antlr.org/papers/allstar-techreport.pdf
Excellent discussion!