diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-15 19:02:37 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-15 19:02:37 -0600 |
commit | 57dfa970a0ab45fa69e71e8583fbb9fa267315e1 (patch) | |
tree | 3d67668cb42ae400d38281121f2046572b712d0e /J2V.java | |
parent | 04e9109f112f4cb7317416c2e31806f42663cb45 (diff) |
Use class varaible to keep track of collected program in BoilSimp
Diffstat (limited to 'J2V.java')
-rw-r--r-- | J2V.java | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -15,8 +15,8 @@ public class J2V { // Pretty-print the tree. PPrinter inherits from // GJDepthFirst<R,A>. R=Void, A=String. - PPrinter<Void,String> pp = new PPrinter<Void,String>(); - root.accept(pp, ""); + // PPrinter<Void,String> pp = new PPrinter<Void,String>(); + // root.accept(pp, ""); // Build the symbol table. Top-down visitor, inherits from // GJDepthFirst<R,A>. R=Void, A=Integer. @@ -25,10 +25,10 @@ public class J2V { root.accept(new SymTableTopDown<Void>(), symt); BoilSimp vp = new BoilSimp(); - String program = root.accept(vp, symt); + root.accept(vp, symt); PrintFilter.print("===================================================", true); - System.out.println(program); + System.out.println(vp.getVapor()); } |