NT
- is an Enum type with one value for every nonterminal in the grammar. See Parser
for more information.public interface ParseTree<NT extends java.lang.Enum<NT>>
If the grammar used @skip to skip over some nonterminals automatically, then the skipped subtrees do not appear among this node's children(), but can be found by using allChildren() or childrenByName().
Modifier and Type | Method | Description |
---|---|---|
java.util.List<ParseTree<NT>> |
allChildren() |
Get all of this node's children, including @skip rules.
|
java.util.List<ParseTree<NT>> |
children() |
Get this node's children.
|
java.util.List<ParseTree<NT>> |
childrenByName(NT name) |
Get the children that correspond to a particular production rule
|
int |
end() |
Get the offset where this subtree ends in the entire parsed string.
|
boolean |
isSkipped() |
Test if this node is in a subtree that was @skipped.
|
NT |
name() |
Get this node's name.
|
int |
start() |
Get the offset where this subtree starts in the entire parsed string.
|
java.lang.String |
text() |
Get this subtree's text.
|
NT name()
java.util.List<ParseTree<NT>> children()
java.lang.String text()
int start()
int end()
java.util.List<ParseTree<NT>> childrenByName(NT name)
name
- Name of the nonterminal corresponding to the desired production rule.java.util.List<ParseTree<NT>> allChildren()
boolean isSkipped()