diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-06 22:36:22 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-06 22:38:00 -0600 |
commit | 8f1eeb71061e4009abec9356c9430075c0a7f7ee (patch) | |
tree | 5d4f35717bd90711b19acbb4feab37f469be19ac /Typecheck.java | |
parent | 1eac68a0e5fd00ee563ac43cb6f4dac3a4fb2c33 (diff) |
Add SymTableTopDown, changes to SymbolTable to make it possible
Delete SymTableVis
Diffstat (limited to 'Typecheck.java')
-rw-r--r-- | Typecheck.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Typecheck.java b/Typecheck.java index 070b71e..cf86389 100644 --- a/Typecheck.java +++ b/Typecheck.java @@ -21,9 +21,9 @@ public class Typecheck { // Build the symbol table. Top-down visitor, inherits from // GJDepthFirst<R,A>. R=Void, A=Integer. - SymbolTable st = new SymbolTable(); - root.accept(new SymTableFirst<Void>(), st); - // root.accept(new SymTableSecond(), st); + SymbolTable symt = new SymbolTable(); + root.accept(new SymTableBottomUp<Void>(), symt); + root.accept(new SymTableTopDown<Void>(), symt); PrintFilter.print("===================================================", true); // TypeCheckSimp ts = new TypeCheckSimp(); |