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

2027-ing-TC-1/2 submission is Tuesday, March 18th 2025 at 23:42.

At the end of this stage, the compiler can scan and parse Tiger programs, as well as detect lexical and syntactical errors. The scanner and parser must be completed from the given files.

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

This stage should also be dedicated to setting up your workflow & recommend tools, such as an external repository, Git extensions, continuous integrations, etc.

Relevant lecture notes include 08-dev-tools.pdf, 09-lexical-analysis.pdf, 10-flex.pdf, 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.

Warning

TC-1/2 Scanner, TC-1/2 Parser & Building the Abstract Syntax Tree are both mandatory. The 2 sections are here to separate Lexer and Parser information, but both sections must be done to be able to test your code.