This repo contains my code for 2017 SE302 compiler course. Being divided int 6 separate assignments, it implements a compiler for the tiger language described in Modern Compiler Implementation in C. The main difference is that this one is implemented in C++ and supports X86-64 architecture.
- lab1: A simple straightline code analyzer & interpreter. Not part of the compiler.
- lab2: Lexical analysis using
flexc++
. Seesrc/lex
. - lab3: Language parser using
bisonc++
. Seesrc/parse
. - lab4: Semantic analysis. See
src/semant
. - lab5: IR translation and code generation. See
src/frame
,src/translate
,src/codegen
. - lab6: Register allocation. See
src/regalloc
.