This is a MiniJava-to-LLVM-IR compiler project, written in Java (with the help of JFlex, JavaCUP and JTB), originally introduced as an assignment for the compilers course (NKUA). Details about the project can be found here (sections homework 2 & 3). I thank Stefanos Baziotis for his MiniJava testsuite contribution!
Part 1: MiniJava Static Checking (Semantic Analysis)
Part 2: Generating intermediate code (MiniJava -> LLVM)
In order to see that the output of the produced LLVM IR files is the same as compiling the input java file with javac and executing it with java, you will need Clang with version >=4.0.0.
sudo apt update && sudo apt install clang-4.0
make
To perform semantic analysis on all files given as arguments:
java [MainClassName] [file1] [file2] ... [fileN]
To execute .ll files:
clang-4.0 -o out1 ex.ll
./out1