This is a compiler for the language Minijava that I implementeed as a part of Doug Lea's CSC 444 course in Fall 2018.
$ cat HelloOne.minijava
class HelloOne {
public static io void main(String[] a){
System.out.println(1);
}
}
$ sbt "run HelloOne.minijava"
;k' ,,
ok '0:
,0 ,0.
ol O,
;0 k:
kl 'K.
0: :0
.X. Oc
:O .K,
N 'N
.X .M.
.K, xd
ck. ;d'
.. .x .:olll;
,k ,dd;;dx. .K.xo. 'K'
lo oxclk, .cx: lxl',dd..WO. K,
ll :oloc. .,' ok ok
ll K; ,ldx;
;k .N ,dd,.
.X /\ /\ dxlk,
dd / V \ .WK,
0: / \ ini kk
.K' xx
.K' lk
xd. .dx
.oxc :xo.
.;lllllclllol'
$ java HelloOne
1
The compiler uses Antlr for parsing, ASM for generating JVM bytecode, and Soot for performing optimization.