From c3d4ff012c568a50e3403caf040de704bc201101 Mon Sep 17 00:00:00 2001 From: bd-912 Date: Sun, 7 Apr 2024 13:25:40 -0600 Subject: Update vaporize visitor for new ST, observe hard work pay off --- J2V.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'J2V.java') diff --git a/J2V.java b/J2V.java index 5ba159e..6038ffa 100644 --- a/J2V.java +++ b/J2V.java @@ -20,9 +20,16 @@ public class J2V { // 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; + SymbolTable symt = new SymbolTable(); + root.accept(new SymTableBottomUp(), symt); + root.accept(new SymTableTopDown(), symt); + + VaporizeSimp vp = new VaporizeSimp(); + String program = root.accept(vp, symt); + + PrintFilter.print("===================================================", true); + System.out.println(program); + } catch (ParseException e) { -- cgit v1.2.3