01: //
02: // Generated by JTB 1.2.1
03: //
04:
05: package oscript.syntaxtree;
06:
07: /**
08: * Grammar production:
09: * <PRE>
10:
11: * f0 -> "for"
12: * f1 -> "("
13: * f2 -> ( PreLoopStatement() )?
14: * f3 -> ";"
15: * f4 -> ( Expression() )?
16: * f5 -> ";"
17: * f6 -> ( Expression() )?
18: * f7 -> ")"
19: * f8 -> EvaluationUnit()
20: * </PRE>
21: */
22: public class ForLoopStatement implements Node {
23: public NodeToken f0;
24: public NodeToken f1;
25: public NodeOptional f2;
26: public NodeToken f3;
27: public NodeOptional f4;
28: public NodeToken f5;
29: public NodeOptional f6;
30: public NodeToken f7;
31: public EvaluationUnit f8;
32: public boolean hasVarInScope = true; // assume the worst
33: public boolean hasFxnInScope = true; // assume the worst
34: public Node translated = null;
35:
36: public ForLoopStatement(NodeToken n0, NodeToken n1,
37: NodeOptional n2, NodeToken n3, NodeOptional n4,
38: NodeToken n5, NodeOptional n6, NodeToken n7,
39: EvaluationUnit n8, boolean hasVarInScope,
40: boolean hasFxnInScope) {
41: f0 = n0;
42: f1 = n1;
43: f2 = n2;
44: f3 = n3;
45: f4 = n4;
46: f5 = n5;
47: f6 = n6;
48: f7 = n7;
49: f8 = n8;
50: this .hasVarInScope = hasVarInScope;
51: this .hasFxnInScope = hasFxnInScope;
52: }
53:
54: public ForLoopStatement(NodeOptional n0, NodeOptional n1,
55: NodeOptional n2, EvaluationUnit n3) {
56: f0 = new NodeToken("for");
57: f1 = new NodeToken("(");
58: f2 = n0;
59: f3 = new NodeToken(";");
60: f4 = n1;
61: f5 = new NodeToken(";");
62: f6 = n2;
63: f7 = new NodeToken(")");
64: f8 = n3;
65: }
66:
67: public void accept(oscript.visitor.Visitor v) {
68: v.visit(this );
69: }
70:
71: public Object accept(oscript.visitor.ObjectVisitor v, Object argu) {
72: return v.visit(this, argu);
73: }
74: }
|