A Tiger compiler for the x86 architecture, implemented in C++, as described in the book "Modern Compiler Implementation" by Andrew Appel.
- Tokenize the source code and build the corresponding AST (Syntax, AST)
- Set escaping variables in the AST (Escapes)
- Semantic check (Semantic)
- Translate the AST into the IRT (IRT, Frame, Translation)
- Canonize the IRT (Canon)
- Tile out the canonized IRT into generic assembly instructions (Munch, Frame)
- Construct a control flow graph from the sequence of instructions and do liveness analysis (Liveness)
- Select a register to hold each of the variables and temporaries (RegAlloc)
- Use
make test
to compile a unit testing executable. - Use
make
to compile the Compiler, currently reads the source code fromtest.file
.