

Shift-reduce and reduce-reduce conflicts are not an issue for top-down parsers. For example, the parser is LL(k) only at such points, but remains LL(1) everywhere else for better performance. JavaCC offers the capabilities of syntactic and semantic lookahead to resolve shift-shift ambiguities locally at these points. However, there may be portions of grammar that are not LL(1). Top-down parsers have a number of other advantages (besides more general grammars) such as being easier to debug, having the ability to parse to any non-terminal in the grammar, and also having the ability to pass values (attributes) both up and down the parse tree during parsing.īy default, JavaCC generates an LL(1) parser. This allows the use of more general grammars, although left-recursion is disallowed. JavaCC generates top-down ( recursive descent) parsers as opposed to bottom-up parsers generated by YACC-like tools. In addition to the parser generator itself, JavaCC provides other standard capabilities related to parser generation such as tree building (via a tool called JJTree included with JavaCC), actions and debugging.Īll you need to run a JavaCC parser, once generated, is a Java Runtime Environment (JRE). Java Compiler Compiler (JavaCC) is the most popular parser generator for use with Java applications.Ī parser generator is a tool that reads a grammar specification and converts it to a Java program that can recognize matches to the grammar. View on GitHub Download 7.0.10.zip Download 7.0.10.tar.gz JavaCC JavaCC The most popular parser generator for use with Java applications. JavaCC | The most popular parser generator for use with Java applications.
