Phase 6: Control Expressions and Structures

In this phase, you are to extend your compiler to generate code for the conditional operators and the basic control statements of C.

The control operators are: logical and (&&), logical or (||), logical not (!), and the conditional operator (?:).

The basic control constructs are: the if-else statement, the while loop, and the for loop. You do not need to implement goto's, do-while loops, or switch statements.


Barney Maccabe
Last modified: Tue Oct 28 15:28:40 MST 1997