MiniJava Compilier
This is a project for my Compilers Principles class. This "small" compiler can change MiniJava to Piglet, Splglet, Kanga and finally MIPS step by step. You can run MIPS code in SPIM simulator. During this project, I built my own semantic analyzer and designed the data structure to store functions and attributes of a class. I also did some optimization for it such as constant folding and so on. It has been tested by many famous algorithm such as bubble sort, quick sort.... It take me 3 months and more than 30 thousand lines code to make it.
The structure of my compilier

Here is a small example

Mips code-Bubble sort
© 2012 WangMengyan