diff options
author | Iru Cai <mytbk920423@gmail.com> | 2014-12-13 09:26:10 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2014-12-13 09:26:10 +0800 |
commit | 8d3a30913b6e67bb0e88166feb50fad535341e30 (patch) | |
tree | 530815c5c40841271820c870062813c5831a2aef /src/kanga/kanga2mips/Main.java | |
parent | c53fdd66cadbe32ee9234cd6d9961b4d3e2b468f (diff) | |
download | minijava-8d3a30913b6e67bb0e88166feb50fad535341e30.tar.xz |
Kanga to MIPS
Diffstat (limited to 'src/kanga/kanga2mips/Main.java')
-rw-r--r-- | src/kanga/kanga2mips/Main.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/kanga/kanga2mips/Main.java b/src/kanga/kanga2mips/Main.java index 7b5a49c..d57fa77 100644 --- a/src/kanga/kanga2mips/Main.java +++ b/src/kanga/kanga2mips/Main.java @@ -5,6 +5,7 @@ import kanga.ParseException; import kanga.TokenMgrError;
import kanga.syntaxtree.Node;
import kanga.visitor.GJDepthFirst;
+import kanga.visitor.GenMIPSVisitor;
public class Main {
@@ -14,10 +15,10 @@ public class Main { /*
* TODO: Implement your own Visitors and other classes.
*/
- GJDepthFirst v = new GJDepthFirst<Object, Object>() {
- };
+ GenMIPSVisitor v = new GenMIPSVisitor();
// Traverse the Abstract Grammar Tree
root.accept(v, null);
+ v.prn.printAll();
} catch (TokenMgrError e) {
// Handle Lexical Errors
e.printStackTrace();
|