Milestone 6 - The Parser
Parser Polishing and Error Messages
This is a "breather" milestone.
Objectives
The objectives of this milestone are
- to have you polish your parser
- to begin to include good error messages in your parser
- to perform error recovery (optional at this point)
- Insert code in your parser to create a text file called "parse-tree" Each time a rule is expanded, print the rule number used to the file.
- Make sure the file can be opened and read easily by the Unix cat command, or by Notepad in Windows. In other words, be sure to put in linefeeds at appropriate intervals.
To Do
Continue working on your parser to meet the above objectives.
Some considerations are these:
- For error messages, the line and column number should be printed as before, but a message similar to "expecting the start of a statement, but found '(' " should also be included to help the programmer determine what the error was.
- You will need to develop a set of test programs for exercising your parser. You should create some and then trade with other groups to get a larger set of examples to use.
A Note
Don't be concerned as you build your parser about various conflicts that you may be dealing with. We purposely leave some of these issues vague for a while to let you think of ways to resolve them before we actually provide some direction. That gives you a better understanding of the issues.
To Turn In
There is nothing to turn in. Instead, be ready to demo your parser in lab. We will be asking to see it in action next week.