|
//
// Generated by JTB 1.3.2
//
package st4tic.syntaxtree;
import java.util.*;
/**
* Represents an optional grammar list, e.g. ( A )*
*/
public class NodeListOptional implements NodeListInterface {
public NodeListOptional() {
nodes = new Vector<Node>();
}
public NodeListOptional(Node firstNode) {
nodes = new Vector<Node>();
addNode(firstNode);
}
public void addNode(Node n) {
nodes.addElement(n);
}
public Enumeration<Node> elements() { return nodes.elements(); }
public Node elementAt(int i) { return nodes.elementAt(i); }
public int size() { return nodes.size(); }
public boolean present() { return nodes.size() != 0; }
public void accept(st4tic.visitor.Visitor v) {
v.visit(this);
}
public <R,A> R accept(st4tic.visitor.GJVisitor<R,A> v, A argu) {
return v.visit(this,argu);
}
public <R> R accept(st4tic.visitor.GJNoArguVisitor<R> v) {
return v.visit(this);
}
public <A> void accept(st4tic.visitor.GJVoidVisitor<A> v, A argu) {
v.visit(this,argu);
}
public Vector<Node> nodes;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.