diff options
Diffstat (limited to 'J2V.java')
-rw-r--r-- | J2V.java | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -20,9 +20,16 @@ public class J2V { // Build the symbol table. Top-down visitor, inherits from // GJDepthFirst<R,A>. R=Void, A=Integer. - SymTableVis<Void> pv = new SymTableVis<Void>(); - root.accept(pv, new ArrayList<String>()); - HashMap<String, AbstractInstance> symt = pv.symt; + SymbolTable symt = new SymbolTable(); + root.accept(new SymTableBottomUp<Void>(), symt); + root.accept(new SymTableTopDown<Void>(), symt); + + VaporizeSimp vp = new VaporizeSimp(); + String program = root.accept(vp, symt); + + PrintFilter.print("===================================================", true); + System.out.println(program); + } catch (ParseException e) { |