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.