Parser IV, Resolving Conflicts and
Including Good Error Messages
Posted Wednesday, March 5
Due at the beginning of your lab period the following week
(not counting spring break, of course)
Objectives
The objectives of this assignment are
- to have you polish your parser after resolving conflicts in the LL(1)
table
- to include good error messages in your parser
- to make your parser ready for testing
To Do
Continue working on your parser to the point that it parses any valid mPascal
program and correctly reports errors in incorrect programs.
Some considerations are these:
- You will need to modify your parser according to the correct LL(1) table
(to be posted after the Thursday lab).
- You will need to modify your error messages to include more
information. 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
- Have your executable program ready to run for testing purposes at the
beginning of your next lab period.
- You will be required to submit your source and executable electronically
as usual.