diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-03-27 22:53:08 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-03-27 22:53:08 -0600 |
commit | b01fe1e8e5541d6c11f905d7fbb949d747f29230 (patch) | |
tree | d348b6b471fa2ebb2cece61daaf672c8b27b4299 /Typecheck.java | |
parent | 8131ddc22af5d39114a55349d71bcdc467599187 (diff) |
SymbolTable to separate library, Class/Method Instances
Diffstat (limited to 'Typecheck.java')
-rw-r--r-- | Typecheck.java | 10 |
1 files changed, 5 insertions, 5 deletions
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,A>. R=Void, A=String. PPrinter<Void,String> pp = new PPrinter<Void,String>(); root.accept(pp, ""); - Utilities.print_filter("===================================================", true); + PrintFilter.print("===================================================", true); // // Build the symbol table. Top-down visitor, inherits from // // GJDepthFirst<R,A>. R=Void, A=Integer. SymTableVis<Void,Integer> pv = new SymTableVis<Void,Integer>(); root.accept(pv, 0); - HashMap<String, TypeInstance> symt = pv.symt; - Utilities.print_filter("===================================================", true); + HashMap<String, AbstractInstance> symt = pv.symt; + PrintFilter.print("===================================================", true); // Do type checking. Bottom-up visitor, also inherits from // GJDepthFirst. Visit functions return MyTpe (=R), and |