Step-by-Step construction of a Compiler. This was part of our Compilers Lab course (CS316).
For an high level overview read this.
- Created a C-like compiler from scratch using lex and yacc
- Implemented the scanning, parsing, Abstract Syntax Tree (AST), Three Address Code (TAC) and Register Transfer Language (RTL) stages for input programs with visibility of output of each intermediate stage
- Input programs had assignments, functions, complex expressions and control flow structures
- Ensured illegal tokens, syntax errors, semantic errors are reported