|
Language Processing v2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractCollection<E>
AbstractList<Parser.Node>
Parser.Node
Parser.Rule
public class Parser.Rule
represents an optionally typed grammar rule.
All instances can be found in Parser.rules.
| Field Summary | |
|---|---|
String |
name
unique name, cannot be error. |
Parser.Node[] |
nodes
alternatives: each a Sequence or single Node. |
Parser.Type |
type
type (if not null). |
| Fields inherited from class Parser.Node |
|---|
position |
| Fields inherited from class AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
protected |
Parser.Rule(int position,
Parser.Type type,
String name,
Parser.Node... nodes)
assumed unique, new, adds itself to Parser.rules, manages Parser.defined. |
| Method Summary | |
|---|---|
Parser.Node |
get(int index)
needs to be overridden when there are descendants. |
int |
size()
needs to be overridden when there are descendants. |
void |
visit(Visitor visitor)
implements divide and conquer for Visitor. |
| Methods inherited from class AbstractList |
|---|
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
| Methods inherited from class AbstractCollection |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface List |
|---|
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
| Field Detail |
|---|
public final Parser.Type type
public final String name
error.
public final Parser.Node[] nodes
Sequence or single Node.
The first one can be null for an empty alternative.
| Constructor Detail |
|---|
protected Parser.Rule(int position,
Parser.Type type,
String name,
Parser.Node... nodes)
Parser.rules, manages Parser.defined.
| Method Detail |
|---|
public Parser.Node get(int index)
Parser.Node
get in interface List<Parser.Node>get in class Parser.NodeIndexOutOfBoundsException - if index is not less then size().public int size()
Parser.Node
size in interface Collection<Parser.Node>size in interface List<Parser.Node>size in class Parser.Nodenodes.length.public void visit(Visitor visitor)
Parser.NodeVisitor.
Body must be visitor.visit(this);.
visit in class Parser.Node
|
(c) 2008 Axel T. Schreiner |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||