From b01fe1e8e5541d6c11f905d7fbb949d747f29230 Mon Sep 17 00:00:00 2001 From: bd-912 Date: Wed, 27 Mar 2024 22:53:08 -0600 Subject: SymbolTable to separate library, Class/Method Instances --- Typecheck.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Typecheck.java') diff --git a/Typecheck.java b/Typecheck.java index 6d45598..d2639f5 100644 --- a/Typecheck.java +++ b/Typecheck.java @@ -1,10 +1,10 @@ -// Helper for HW2/CS453. import java.io.*; import visitor.*; import syntaxtree.*; import java.util.*; -// Files are stored in the typecheck directory/package. +import st.*; import typecheck.library.*; +import misc.*; public class Typecheck { public static void main(String[] args) { @@ -16,15 +16,15 @@ public class Typecheck { // GJDepthFirst. R=Void, A=String. PPrinter pp = new PPrinter(); root.accept(pp, ""); - Utilities.print_filter("===================================================", true); + PrintFilter.print("===================================================", true); // // Build the symbol table. Top-down visitor, inherits from // // GJDepthFirst. R=Void, A=Integer. SymTableVis pv = new SymTableVis(); root.accept(pv, 0); - HashMap symt = pv.symt; - Utilities.print_filter("===================================================", true); + HashMap symt = pv.symt; + PrintFilter.print("===================================================", true); // Do type checking. Bottom-up visitor, also inherits from // GJDepthFirst. Visit functions return MyTpe (=R), and -- cgit v1.2.3