3 ms·
Has anybody here used Elkhound [1]? How does it compare to e.g. ANTLR? Also, why do parser generators always have to be so language specific? [1] http://scott
by amelius 12y ago
Has anybody here used Elkhound [1]? How does it compare to e.g. ANTLR?
Also, why do parser generators always have to be so language specific?
[1] http://scottmcpeak.com/elkhound/ http://scottmcpeak.com/elkhound/
> Elkhound is a parser generator, similar to Bison. The parsers it generates use the Generalized LR (GLR) parsing algorithm. GLR works with any context-free grammar, whereas LR parsers (such as Bison) require grammars to be LALR(1).
- dalke 12y agoAccording to this swtch.com essay, "GNU Bison can optionally generate a GLR parser instead of an LALR(1) parsers" and checking history shows that GLR was available in Bison 1.75 in 2002 (See http://lists.gnu.org/archive/html/info-gnu/2002-10/msg00008.html http://lists.gnu.org/archive/html/info-gnu/2002-10/msg00008.... .) Regarding "so language specific"; proper language support for a given language is hard, and that's where most of the development time goes. Adding support for two languages is more than twice as hard as support for one language. Take a look at the comments for Java support in Bison, at http://www.gnu.org/software/bison/manual/bison.html#Java-Parsers http://www.gnu.org/software/bison/manual/bison.html#Java-Par... to see some of the difficulties and incomplete aspects of that port. Now consider a port to Python, which doesn't have a switch statement so likely needs very different code generation style.
- sklogic 12y agoI used Elsa a lot for static C++ code analysis, it was long before Clang was available. Cannot compare to antlr, since I've never seen a usable antlr C++ grammar implementation.