Assignment 4

CS 152
due November 27, 2000
100 points

No late submissions will be accepted for this assignment. I recommend that you complete it before the Thanksgiving break, since otherwise there will be little time for Assignment 5.

Redo the problem of Assignments 1-3, using Java. Use the class A4 available from the class web site to do the testing. A class ASCIIInputStream is also available from the web site for simple file input.

If you cannot get the ParseTree constructor to read text from a file, you may pass the text itself, as a string, to this function. Expect a deduction if you do this. You should not have to qualify the given file names with path information.

As in the previous assignments, a parse tree is passed to the traversal functions even if the parse fails, so your parser should construct a dummy tree when the parse fails.

You will need to use exceptions in this program.