diff options
Diffstat (limited to 'src/minijava/syntaxtree/PrintStatement.java')
-rw-r--r-- | src/minijava/syntaxtree/PrintStatement.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/minijava/syntaxtree/PrintStatement.java b/src/minijava/syntaxtree/PrintStatement.java new file mode 100644 index 0000000..15bbbba --- /dev/null +++ b/src/minijava/syntaxtree/PrintStatement.java @@ -0,0 +1,51 @@ +// +// Generated by JTB 1.3.2 +//
+
+package minijava.syntaxtree;
+
+/**
+ * Grammar production:
+ * f0 -> "System.out.println"
+ * f1 -> "("
+ * f2 -> Expression()
+ * f3 -> ")"
+ * f4 -> ";"
+ */
+public class PrintStatement implements Node {
+ public NodeToken f0;
+ public NodeToken f1;
+ public Expression f2;
+ public NodeToken f3;
+ public NodeToken f4;
+
+ public PrintStatement(NodeToken n0, NodeToken n1, Expression n2, NodeToken n3, NodeToken n4) {
+ f0 = n0;
+ f1 = n1;
+ f2 = n2;
+ f3 = n3;
+ f4 = n4;
+ }
+
+ public PrintStatement(Expression n0) {
+ f0 = new NodeToken("System.out.println");
+ f1 = new NodeToken("(");
+ f2 = n0;
+ f3 = new NodeToken(")");
+ f4 = new NodeToken(";");
+ }
+
+ public void accept(minijava.visitor.Visitor v) {
+ v.visit(this);
+ }
+ public <R,A> R accept(minijava.visitor.GJVisitor<R,A> v, A argu) {
+ return v.visit(this,argu);
+ }
+ public <R> R accept(minijava.visitor.GJNoArguVisitor<R> v) {
+ return v.visit(this);
+ }
+ public <A> void accept(minijava.visitor.GJVoidVisitor<A> v, A argu) {
+ v.visit(this,argu);
+ }
+}
+
|