Search code examples
javayacc

Yacc equivalent for Java


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.


Solution

  • 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.