Milestone 9 - Level C Compiling
Objective
The objective of this assignment is the construction of your compiler for level C compliance. (You can also read ahead about milestones for levels B and A.) The main point to consider is this. If you have an A level compiler as your target, you should have the C level done for this milestone. See the course calendar for a clearer view of your targets and a timeline for when they should be done.
To Do
The first thing to do is to mark up with action symbols the set of grammar rules of the mPascal grammar that you determine are needed for level C compliance. The action symbols you insert should also show which semantic records are required to accomplish the action. Bring your compiler up to level C compliance. This means that you are to generatemMachine code that can be run through the mMachine emulator for any mPascal program consisting of just a main program with Read, Write, and assignment statements. Your compiler is to follow the standard approach of using semantic records and semantic actions (methods in the Symbol Table and Analyzer objects) for symbol table management and mMachine code generation as described in class. In other words, your parsers should only have new semantic records defined and new calls to analyzer methods for generating code and for symbol table actions. No translation code or symbol table code should appear anywhere in the parser.
In summary, after this week, your compiler should now be capable of:
- Full symbol table functionality for any mPascal program
- Compiling programs that consist of just a main program that includes any combination of
- Read statements
- Write statements
- Assignment statements
Your compiled programs should run on the mMachine emulator.
To Turn In
At this point of the semester we will not be following the milestones exactly. That is, we will not be testing for level C compliance this week, even though the schedule shows level C being due then. The reason for this is that you should now be making the final drive to get your compiler to the compliance level you have targeted. We will not actually be testing the compilers for all levels of compliance until the end.