Tiger Compiler is a complete compiler project developed in C++ as part of the LSE (Laboratoire Systèmes EPITA) curriculum.
It is based on the Tiger language, a small statically typed language used for educational purposes and popularized by Andrew Appel in Modern Compiler Implementation in C.
The objective of the project is to implement all major phases of a real-world compiler β from parsing to code generation β without relying on external compiler toolchains.
π Compiler Pipeline
-
Lexical Analysis:
Implemented using Flex, this phase tokenizes.tig
source files into lexical units. -
Syntax Analysis:
A Bison-generated parser constructs an Abstract Syntax Tree (AST) based on the Tiger grammar. -
Semantic Analysis:
Includes type checking, scope resolution, and symbol table handling.
The compiler supports records, arrays, control flow constructs, and recursive functions. -
Intermediate Code Generation:
Produces a tree-based intermediate representation (IR), which can then be transformed into either LLVM IR, three-address code, or a simplified VM-compatible code. -
Optional Optimizations (bonus):
Includes constant folding, dead code elimination, or basic liveness analysis and register allocation.
π Educational Context
This project is a core part of the Compilers and Language Semantics module at EPITA.
It is designed to give students a deep understanding of language processing, formal grammars, and low-level code generation.
You can learn more about the Tiger Project and its specifications here:
π Tiger Compiler Project β EPITA LRDE Wiki
Note: Due to EPITA's academic policies, source code for this project is not publicly available.