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