To run the lexical analysis, first insert a specification of a lexer into the file MiniJavaLexer.jj, and then do: javacc MiniJavaLexer.jj javac Main.java java Main < Program.java