Yacc equivalent for Java

vuzun picture vuzun · Oct 28, 2009 · Viewed 23.9k times · Source

I'm working on a compiler design project in Java. Lexical analysis is done (using jflex) and I'm wondering which yacc-like tool would be best(most efficient, easiest to use, etc.) for doing syntactical analysis and why.

Answer

kdgregory picture kdgregory · Oct 28, 2009

If you specifically want YACC-like behavior (table-driven), the only one I know is CUP.

In the Java world, it seems that more people lean toward recursive descent parsers like ANTLR or JavaCC.

And efficiency is seldom a reason to pick a parser generator.