Add semantic actions to your parser to produce abstract syntax for the MiniJava language. Syntax trees classes are available in chap4 together with a PrettyPrintVisitor. In case you use JavaCC, you can use JTB to generate the needed code automatically. Similarly, with SableCC the needed code can be generated automatically.