From 57dfa970a0ab45fa69e71e8583fbb9fa267315e1 Mon Sep 17 00:00:00 2001 From: bd-912 Date: Mon, 15 Apr 2024 19:02:37 -0600 Subject: Use class varaible to keep track of collected program in BoilSimp --- J2V.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'J2V.java') diff --git a/J2V.java b/J2V.java index 70c715f..2380f4e 100644 --- a/J2V.java +++ b/J2V.java @@ -15,8 +15,8 @@ public class J2V { // Pretty-print the tree. PPrinter inherits from // GJDepthFirst. R=Void, A=String. - PPrinter pp = new PPrinter(); - root.accept(pp, ""); + // PPrinter pp = new PPrinter(); + // root.accept(pp, ""); // Build the symbol table. Top-down visitor, inherits from // GJDepthFirst. R=Void, A=Integer. @@ -25,10 +25,10 @@ public class J2V { root.accept(new SymTableTopDown(), 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()); } -- cgit v1.2.3