A simple compiler for the --C language, written in C
A Makefile is provided in order to build the code. This should work on almost all Unix machines.
make clean
make
./mycc < source.c
By default the compiler will interpret input files and print the AST of the file.
To suppress printing of the AST, use the -i flag to interpret source files.
To print out the TAC representation of the interpreted code, use the -t flag. This will not print the AST of the source code.
In order to compile source code to MIPS, use the -c flag. The compiled output will be available in the a.s file.