This phase concerns the compilation of C pointers, arrays, structs and unions. Your work will be done in the context of the CS712 compiler pcc3. The phase5 release of the pcc3 source files will be available in ~cs712/public/phase5 on Monday April 21. You can begin your work on phase 5 by using your code from phase 4.
At the 80% level, you should implement pointers and arrays.
At the 100% level, you should also implement structs and unions.
The assignment involves updating the code from phase 3 and phase 4 to support pointer, array, struct and union types. You will also need to add support for the following operators: address of, array index, member reference and ->.
When doing pointers, be sure to consider function pointers and string literals.
Be sure to consider semantic errors.
Your code will be graded primarily by testing it for correct functionality. However, you may lose points if your program is not properly structured or adequately documented.
Your code will be graded using turing.unh.edu so be sure to test in that environment.
Your code should be submitted for grading from turing.unh.edu.
To turn in this assignment at all levels, type:
~cs712/bin/submit phase5 analyzeExpr.c encodeExpr.c analyzeStmt.c encodeStmt.c
Submissions can be checked by typing (also on turing.unh.edu):
~cs712/bin/scheck phase5
To receive full credit for the assignment, you must turn in your files prior to 8am on Monday April 28. Late submissions will be accepted at the penalty of 5 points per day up to one week late.
Remember: you are expected to do your own work on this assignment!
Comments and questions should be directed to hatcher@unh.edu