TC-1/2 Parser & Building the Abstract Syntax Tree

2028-ing-TC-1/2 submission is Tuesday, March 17th 2026 at 23:42.

At the end of this sub-stage, the compiler can scan (see TC-1/2 Scanner) and parse Tiger programs as well as detect lexical and syntactical errors.

Furthermore, the compiler can build abstract syntax trees of Tiger programs and pretty-print them.

Relevant lecture notes include 11-syntactic-analysis.pdf, 12-bison.pdf, 13-coupling-flex-bison.pdf, 14-error-recovery.pdf, 15-ast.pdf, 16-pretty-printer.pdf, 17-efficient-traversals.pdf, 18-visitors.pdf and 19-further-with-visitors.pdf.