01: //
02: // Generated by JTB 1.2.2
03: //
04:
05: package xtc.lang.javacc.syntaxtree;
06:
07: import java.util.*;
08:
09: /**
10: * Represents a grammar list, e.g. ( A )+.
11: */
12: @SuppressWarnings("unchecked")
13: public class NodeList implements NodeListInterface {
14: public NodeList() {
15: nodes = new Vector();
16: }
17:
18: public NodeList(Node firstNode) {
19: nodes = new Vector();
20: addNode(firstNode);
21: }
22:
23: public void addNode(Node n) {
24: nodes.addElement(n);
25: }
26:
27: public Enumeration elements() {
28: return nodes.elements();
29: }
30:
31: public Node elementAt(int i) {
32: return (Node) nodes.elementAt(i);
33: }
34:
35: public int size() {
36: return nodes.size();
37: }
38:
39: public void accept(xtc.lang.javacc.visitor.Visitor v) {
40: v.visit(this );
41: }
42:
43: public Object accept(xtc.lang.javacc.visitor.ObjectVisitor v,
44: Object argu) {
45: return v.visit(this , argu);
46: }
47:
48: public Vector nodes;
49: }
|