package test1.tool; /**/ import test1.node.*; import java.io.*; /** * Prints the tree of the given AST on standard output. * This is a toy class which demonstrates the use of PrintWalker adapter * for traversing the Abstract Syntax Tree and printing each node. *@author Mariusz Nowostawski */ public class PrintTree { public static void main(String[] arguments) { try { Node ast = TreeBuilder.getNode( new PushbackReader( new InputStreamReader(System.in), 1024)); ast.apply(new PrintWalker()); } catch(Exception e) { e.printStackTrace(); } } }