Compilers labs for SJTU course SE302.
All labs come from the book 'Modern Compiler Implementation in C', and the final goal of these labs is to implement a complete compiler for the Tiger language.
Warm up and exercise.
Implement a lexical analyzer for the Tiger language with Lex.
Implement a parser for the Tiger language with Yacc.
Provide type checking for Tiger programs.
Implement the frame data structure and generate intermediate representation (IR) trees for tiger programs.
Implement the instruction selection phase to generate x86 machine codes with infinite registers for tiger programs.
Implement liveness anlaysis and register allocation, and run compiled tiger programs on real machine.
Implement escape analysis and coalescing.