Compilers and Interpreters: Assignment 4
October 6, 2008
Modify the Triangle compiler to allow for statements.
The syntax of the statement is as follows:
for-Statement ::= for (
We have not seen code generation yet, so in this assignment, the
for statements will be checked for syntax, but will not generate any code.
To do this assignment, you will need to write code to parse the
for statements, generate ASTs for the statements, insert a stub
methods that do nothing, but that are called when the code generation
phase of the compiler encounters the new statement node in the AST.
Due Wednesday, October 15, at the start of class.
E-mail to the instructor (email@example.com)
and to the teaching assistant (firstname.lastname@example.org):
- the files from the compiler that were modified.
- two test triangle programs, one with a syntax error in the for
loop, and one with no syntax error.