Section Image
SGI Home
Blog
Language Technology
Email Research
Enron Email Corpus
Java
About SGI


















JavaCC - Java Compiler Compiler


The Java Compiler Compiler (JavaCC) is an open source (as of June 2003) parser generator for Java applications. Using a defined grammar, JavaCC can produce java code that recognises matches to the grammar.

JavaCC also includes a tool called JJTree which allows a generated parser to produce syntax trees.

Theodore Norvell at the Memorial University of Newfoundland in Canada, maintains a FAQ for issues related to using JavaCC.



JavaCC Tutorials

In addition to Theo's JavaCC FAQ, there are a number of tutorials and articles about JavaCC available.

Local Cached Copies of Articles/Tutorials:

Other JavaCC Resources

Make sure you check the JavaCC Grammar Repository before you spend hours writing a grammar for your required language. Chances are someone might have already spent those hours for you!



Andrew Lampert's experience with JavaCC

As part of the Tiddler project at the CSIRO, Andrew Lampert was responsible for extending a JavaCC grammar (originally developed by Stephen Wan and Francois Paradis) for parsing Text Plan operators for use in natural language generation.

I also use the following tools, which make use of JavaCC:

  • BeanShell uses JavaCC to generate its parser of extended Java syntax.
  • Java Expression Parser (JEP) uses JavaCC for parsing mathematical expressions, with support for user defined variables, and user/system defined constants and functions.