01: //
02: // Generated by JTB 1.2.2
03: //
04:
05: package xtc.lang.javacc.syntaxtree;
06:
07: /**
08: * Grammar production.
09: * <pre>
10: * f0 -> "if"
11: * f1 -> "("
12: * f2 -> Expression()
13: * f3 -> ")"
14: * f4 -> Statement()
15: * f5 -> [ "else" Statement() ]
16: * </pre>
17: */
18: public class IfStatement implements Node {
19: public NodeToken f0;
20: public NodeToken f1;
21: public Expression f2;
22: public NodeToken f3;
23: public Statement f4;
24: public NodeOptional f5;
25:
26: public IfStatement(NodeToken n0, NodeToken n1, Expression n2,
27: NodeToken n3, Statement n4, NodeOptional n5) {
28: f0 = n0;
29: f1 = n1;
30: f2 = n2;
31: f3 = n3;
32: f4 = n4;
33: f5 = n5;
34: }
35:
36: public IfStatement(Expression n0, Statement n1, NodeOptional n2) {
37: f0 = new NodeToken("if");
38: f1 = new NodeToken("(");
39: f2 = n0;
40: f3 = new NodeToken(")");
41: f4 = n1;
42: f5 = n2;
43: }
44:
45: public void accept(xtc.lang.javacc.visitor.Visitor v) {
46: v.visit(this );
47: }
48:
49: public Object accept(xtc.lang.javacc.visitor.ObjectVisitor v,
50: Object argu) {
51: return v.visit(this, argu);
52: }
53: }
|