| This assignment consists of three subparts:
For the classes of the abstract syntax tree a framework is provided
on the WWW in the file Tree.java.
If you have no position managment in your scanner/parser, you can use
- Write the remaining classes for the abstract syntax tree
- Extend the parser to generate the abstract syntax tree
- Write a pretty printer for the abstract syntax tree
nextCh() routine from
Scanner.java and also
For extending the parser you will sometimes need arrays of subtrees.
You can use TreeArrayBuffer.java
for doing this.
There is also a framework for the pretty printer on the WWW:
Printer.java. This pretty printer
uses the concept of a visitor. You will need the pretty printer
to check, whether you built a correct tree. It is not neccessary
to print correct J0 and it does not matter if you have
This assignment is valid only 5 points!