JavaCC (Java Compiler Compiler) is an open source parser generator and lexical analyzer generator for the Java programming language. JavaCC is similar to yacc in that it generates a parser from a formal grammar written in EBNF notation, except the output is Java source code. Unlike yacc, however, JavaCC generates top-down parsers, which limits it to the LL(k) class of grammars (in particular, left recursion cannot be used). JavaCC also generates lexical analyzers in a fashion similar to lex. The tree builder that accompanies it, JJTree, constructs its trees from the bottom up.

JavaCC is licensed under a BSD license.


Compute Systems Invocation Version(s)
Red Hat Linux (64-bit) % /util/bin/javacc
% /util/bin/jjtree
% /util/bin/jjdoc
5.0 (default)


  1. Unlike other executables which are symlinked out of /util/bin, javacc requires the presence of a /lib directory in the same directory as the javacc executables. For this reason, what is located in /util/bin are shell scripts that point to javacc, jjtree and jjdoc. If you hit problems with the shell scripts that get picked up in your path, try using the fully qualified path to the executable:
    % /util/javacc/bin/javacc