import java.io.*; import visitor.*; import parse.*; import syntaxtree.*; import java.util.*; import st.*; import misc.*; import vaporize.library.*; public class J2V { public static void main(String[] args) { Node root = null; try { root = new MiniJavaParser(System.in).Goal(); // Pretty-print the tree. PPrinter inherits from // GJDepthFirst. R=Void, A=String. PPrinter pp = new PPrinter(); root.accept(pp, ""); // Build the symbol table. Top-down visitor, inherits from // GJDepthFirst. R=Void, A=Integer. SymTableVis pv = new SymTableVis(); root.accept(pv, new ArrayList()); HashMap symt = pv.symt; } catch (ParseException e) { System.out.println(e.toString()); System.exit(1); } } }