University of Texas at El Paso
Banner
Compuer Science
   
Assignment 7 Minimize    

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 ( single-Command , Expression , single-Command ) single-Command

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 (longpre@utep.edu) and to the teaching assistant (nskanagala@gmail.com):

  1. the files from the compiler that were modified.
  2. a test Triangle program.
am.