org.ow2.mind.adl.jtb.syntaxtree.NodeSequence Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adl-parser Show documentation
Show all versions of adl-parser Show documentation
Contains the parser of the ADL language of the Mind programming model.
//
// Generated by JTB 1.3.2
//
package org.ow2.mind.adl.jtb.syntaxtree;
import java.util.*;
/**
* Represents a sequence of nodes nested within a choice, list,
* optional list, or optional, e.g. ( A B )+ or [ C D E ]
*/
public class NodeSequence implements NodeListInterface {
public NodeSequence(int n) {
nodes = new Vector(n);
}
public NodeSequence(Node firstNode) {
nodes = new Vector();
addNode(firstNode);
}
public void addNode(Node n) {
nodes.addElement(n);
}
public Node elementAt(int i) { return nodes.elementAt(i); }
public Enumeration elements() { return nodes.elements(); }
public int size() { return nodes.size(); }
public void accept(org.ow2.mind.adl.jtb.visitor.Visitor v) {
v.visit(this);
}
public R accept(org.ow2.mind.adl.jtb.visitor.GJVisitor v, A argu) {
return v.visit(this,argu);
}
public R accept(org.ow2.mind.adl.jtb.visitor.GJNoArguVisitor v) {
return v.visit(this);
}
public void accept(org.ow2.mind.adl.jtb.visitor.GJVoidVisitor v, A argu) {
v.visit(this,argu);
}
public Vector nodes;
}