The student wrote TokenGrammar.java in Assignment 1, and MJGrammar.java in Assignment 2 contains a comment (line 626) instructing the student to paste their TokenGrammar content there to create a single-pass parser. However, wrangLR cannot generate a combined lexer+parser state machine from the merged grammar — the combined grammar causes wrangLR to crash with an internal ArrayIndexOutOfBoundsException.
For this reason, the compiler uses a two-pass architecture: the scanner (MJScanner) processes raw source into an encoded token stream, and the parser (MJGrammar with filtered grammar) reads the encoded tokens. MJScanner.class and MJScannerParseTable*.class are precompiled from the instructor's enhanced scanner. The student's original TokenGrammar.java is preserved in src/parse/original/.
VtableGenerator.class is a precompiled instructor-provided class used during code generation (CG1 phase). No .java source was provided. It generates virtual method tables for class inheritance.
This file is auto-generated by wrangLR from MJGrammar.java (the student's grammar specification). It is included pre-generated in the repository so the project compiles without needing to re-run the wrangLR generator. To regenerate:
cd src/parse
java -cp ../wrangLR.jar wrangLR.generator.main.Main MJGrammar.java -o MJGrammarParseTable.javaMoved from src/ to runtime/ — this is a MiniJava library class that gets compiled by the MiniJava compiler for MIPS execution, not a Java source file compiled as part of the compiler itself.