CompilationUnit { traversal Constructed(ConRevVisitor crV) { through CBD_FieldDeclaration through Type to {boolType,byteType,charType,shortType,intType,floatType,longType,doubleType,Identifier}; } (@ void PrintClassGraph() { ConRevVisitor crV = new ConRevVisitor(); this.Constructed(crV); } @) } ConRevVisitor { before UnmodifiedClassDeclaration (@ System.out.print(host.get_ident() + " = "); @) before boolType (@ System.out.print("boolean "); @) before byteType (@ System.out.print("byte "); @) before charType (@ System.out.print("char "); @) before shortType (@ System.out.print("short "); @) before intType (@ System.out.print("int "); @) before floatType (@ System.out.print("float "); @) before longType (@ System.out.print("long "); @) before doubleType (@ System.out.print("double "); @) before Identifier (@ System.out.print(host.get_ident() + " "); @) after UnmodifiedClassDeclaration (@ System.out.println("."); @) } Main { (@ public static void main(String args[]) throws Exception { CompilationUnit program = CompilationUnit.parse(System.in); program.PrintClassGraph(); } @) }