Compilers and Interpreters: Assignment 7
November 14, 2008
In assignment 4, we modified the Triangle compiler to allow for statements
where the syntax is as follows:
for-Statement ::= for (
We only implemented the syntactic analysis so far.
In this assignment, implement the contextual and the code generation
for this new kind of statement. The semantic associated with the for statement
is similar to Java: the first command is the initialization, the expression is
the loop ending test, the second command is a statement to execute at the end
of each loop (usually an increment), and the last command is the command that
is repeatedly executed.
Due Wednesday, November 26, at the start of class.
E-mail (with CS 4352 Assignment 7 on the subject line)
to the instructor (firstname.lastname@example.org)
and to the teaching assistant (email@example.com):
- the files from the compiler that were modified.
- a test Triangle program.