deliverable: comments and desugaringNote that this is one of two deliverables due by the end of week 5!
The following modifications should be made to the flex/bison C version of the compiler. You must document the lines that need to be changed; source code comments are preferred.
C-style commentsThe A- implementation only allows one-line comments such as:
It would be nice to additionally allow multi-line comments, such as:
This improvement can be implemented by only making changes to
Increments and for-loopsIt would be very nice to include standard increments and for-loops such as:
These constructs may be introduced as mere syntactic sugar,
can readily be expressed in the JOOS language itself. This
improvement can be implemented by only making changes to the files
You should not reject a for-loop in places where javac would accept it.
Also, note that you do not have to add the postincrement
in its full generality: you don't have to allow expressions of the form
Use Subversion to copy the A- JOOS source to your group directory:
and commit that before beginning work. Then, make your
include some tiny test programs that compile and run correctly with
your improved compiler---but also test your benchmark program for this
week if it uses these constructs---and add a README file
There is no need to email us on completion. Unless you took a late day we will automatically take the version into account that was checked in last before the point of the deadline.
|Maintained by Eric Bodden. [HOME]|