diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-07 13:25:40 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-07 13:25:40 -0600 |
commit | c3d4ff012c568a50e3403caf040de704bc201101 (patch) | |
tree | def9f8871f740e10ff3eb91315fc7184595d1b55 /J2V.java | |
parent | 1ec847c7222b8adb9a70264c98a44dc9911d65d3 (diff) |
Update vaporize visitor for new ST, observe hard work pay off
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) { |