A MiniJava compiler written in C++
Configure and build the project with CMake:
cmake -S . -B build
cmake --build build --target compiler vmTo compile a MiniJava program, run ./build/bin/compiler program.java.
The compiled MiniJava program will be placed in output/prog.bc.
Run the compiled program by running ./build/bin/vm output/prog.bc.
Graphviz diagrams of the syntax tree, symbol table, and control flow graph can be generated by running
cmake --build build --target tree, cmake --build build --target st, and
cmake --build build --target cfg, respectively.