summaryrefslogtreecommitdiff
path: root/src/spiglet/visitor/GJNoArguVisitor.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/spiglet/visitor/GJNoArguVisitor.java')
-rw-r--r--src/spiglet/visitor/GJNoArguVisitor.java212
1 files changed, 212 insertions, 0 deletions
diff --git a/src/spiglet/visitor/GJNoArguVisitor.java b/src/spiglet/visitor/GJNoArguVisitor.java
new file mode 100644
index 0000000..57dcc78
--- /dev/null
+++ b/src/spiglet/visitor/GJNoArguVisitor.java
@@ -0,0 +1,212 @@
+//
+// Generated by JTB 1.3.2
+//
+
+package spiglet.visitor;
+import spiglet.syntaxtree.BinOp;
+import spiglet.syntaxtree.CJumpStmt;
+import spiglet.syntaxtree.Call;
+import spiglet.syntaxtree.ErrorStmt;
+import spiglet.syntaxtree.Exp;
+import spiglet.syntaxtree.Goal;
+import spiglet.syntaxtree.HAllocate;
+import spiglet.syntaxtree.HLoadStmt;
+import spiglet.syntaxtree.HStoreStmt;
+import spiglet.syntaxtree.IntegerLiteral;
+import spiglet.syntaxtree.JumpStmt;
+import spiglet.syntaxtree.Label;
+import spiglet.syntaxtree.MoveStmt;
+import spiglet.syntaxtree.NoOpStmt;
+import spiglet.syntaxtree.NodeList;
+import spiglet.syntaxtree.NodeListOptional;
+import spiglet.syntaxtree.NodeOptional;
+import spiglet.syntaxtree.NodeSequence;
+import spiglet.syntaxtree.NodeToken;
+import spiglet.syntaxtree.Operator;
+import spiglet.syntaxtree.PrintStmt;
+import spiglet.syntaxtree.Procedure;
+import spiglet.syntaxtree.SimpleExp;
+import spiglet.syntaxtree.Stmt;
+import spiglet.syntaxtree.StmtExp;
+import spiglet.syntaxtree.StmtList;
+import spiglet.syntaxtree.Temp;
+
+/**
+ * All GJ visitors with no argument must implement this interface.
+ */
+
+public interface GJNoArguVisitor<R> {
+
+ //
+ // GJ Auto class visitors with no argument
+ //
+
+ public R visit(NodeList n);
+ public R visit(NodeListOptional n);
+ public R visit(NodeOptional n);
+ public R visit(NodeSequence n);
+ public R visit(NodeToken n);
+
+ //
+ // User-generated visitor methods below
+ //
+
+ /**
+ * f0 -> "MAIN"
+ * f1 -> StmtList()
+ * f2 -> "END"
+ * f3 -> ( Procedure() )*
+ * f4 -> <EOF>
+ */
+ public R visit(Goal n);
+
+ /**
+ * f0 -> ( ( Label() )? Stmt() )*
+ */
+ public R visit(StmtList n);
+
+ /**
+ * f0 -> Label()
+ * f1 -> "["
+ * f2 -> IntegerLiteral()
+ * f3 -> "]"
+ * f4 -> StmtExp()
+ */
+ public R visit(Procedure n);
+
+ /**
+ * f0 -> NoOpStmt()
+ * | ErrorStmt()
+ * | CJumpStmt()
+ * | JumpStmt()
+ * | HStoreStmt()
+ * | HLoadStmt()
+ * | MoveStmt()
+ * | PrintStmt()
+ */
+ public R visit(Stmt n);
+
+ /**
+ * f0 -> "NOOP"
+ */
+ public R visit(NoOpStmt n);
+
+ /**
+ * f0 -> "ERROR"
+ */
+ public R visit(ErrorStmt n);
+
+ /**
+ * f0 -> "CJUMP"
+ * f1 -> Temp()
+ * f2 -> Label()
+ */
+ public R visit(CJumpStmt n);
+
+ /**
+ * f0 -> "JUMP"
+ * f1 -> Label()
+ */
+ public R visit(JumpStmt n);
+
+ /**
+ * f0 -> "HSTORE"
+ * f1 -> Temp()
+ * f2 -> IntegerLiteral()
+ * f3 -> Temp()
+ */
+ public R visit(HStoreStmt n);
+
+ /**
+ * f0 -> "HLOAD"
+ * f1 -> Temp()
+ * f2 -> Temp()
+ * f3 -> IntegerLiteral()
+ */
+ public R visit(HLoadStmt n);
+
+ /**
+ * f0 -> "MOVE"
+ * f1 -> Temp()
+ * f2 -> Exp()
+ */
+ public R visit(MoveStmt n);
+
+ /**
+ * f0 -> "PRINT"
+ * f1 -> SimpleExp()
+ */
+ public R visit(PrintStmt n);
+
+ /**
+ * f0 -> Call()
+ * | HAllocate()
+ * | BinOp()
+ * | SimpleExp()
+ */
+ public R visit(Exp n);
+
+ /**
+ * f0 -> "BEGIN"
+ * f1 -> StmtList()
+ * f2 -> "RETURN"
+ * f3 -> SimpleExp()
+ * f4 -> "END"
+ */
+ public R visit(StmtExp n);
+
+ /**
+ * f0 -> "CALL"
+ * f1 -> SimpleExp()
+ * f2 -> "("
+ * f3 -> ( Temp() )*
+ * f4 -> ")"
+ */
+ public R visit(Call n);
+
+ /**
+ * f0 -> "HALLOCATE"
+ * f1 -> SimpleExp()
+ */
+ public R visit(HAllocate n);
+
+ /**
+ * f0 -> Operator()
+ * f1 -> Temp()
+ * f2 -> SimpleExp()
+ */
+ public R visit(BinOp n);
+
+ /**
+ * f0 -> "LT"
+ * | "PLUS"
+ * | "MINUS"
+ * | "TIMES"
+ */
+ public R visit(Operator n);
+
+ /**
+ * f0 -> Temp()
+ * | IntegerLiteral()
+ * | Label()
+ */
+ public R visit(SimpleExp n);
+
+ /**
+ * f0 -> "TEMP"
+ * f1 -> IntegerLiteral()
+ */
+ public R visit(Temp n);
+
+ /**
+ * f0 -> <INTEGER_LITERAL>
+ */
+ public R visit(IntegerLiteral n);
+
+ /**
+ * f0 -> <IDENTIFIER>
+ */
+ public R visit(Label n);
+
+}
+