|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.antlr.runtime.tree.BaseTree
org.antlr.runtime.tree.ParseTree
public class ParseTree
A record of the rules used to match a token sequence. The tokens end up as the leaves of this tree and rule nodes are the interior nodes. This really adds no functionality, it is just an alias for CommonTree that is more meaningful (specific) and holds a String to display for a node.
Field Summary | |
---|---|
java.util.List |
hiddenTokens
|
java.lang.Object |
payload
|
Fields inherited from class org.antlr.runtime.tree.BaseTree |
---|
children |
Fields inherited from interface org.antlr.runtime.tree.Tree |
---|
INVALID_NODE |
Constructor Summary | |
---|---|
ParseTree(java.lang.Object label)
|
Method Summary | |
---|---|
void |
_toStringLeaves(java.lang.StringBuffer buf)
|
Tree |
dupNode()
|
java.lang.String |
getText()
|
int |
getTokenStartIndex()
What is the smallest token index (indexing from 0) for this node and its children? |
int |
getTokenStopIndex()
What is the largest token index (indexing from 0) for this node and its children? |
int |
getType()
Return a token type; needed for tree parsing |
void |
setTokenStartIndex(int index)
|
void |
setTokenStopIndex(int index)
|
java.lang.String |
toInputString()
Print out the leaves of this tree, which means printing original input back out. |
java.lang.String |
toString()
Override to say how a node (not a tree) should look as text |
java.lang.String |
toStringWithHiddenTokens()
Emit a token and all hidden nodes before. |
Methods inherited from class org.antlr.runtime.tree.BaseTree |
---|
addChild, addChildren, createChildrenList, deleteChild, freshenParentAndChildIndexes, freshenParentAndChildIndexes, getAncestor, getAncestors, getCharPositionInLine, getChild, getChildCount, getChildIndex, getChildren, getFirstChildWithType, getLine, getParent, hasAncestor, isNil, replaceChildren, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexes, setChild, setChildIndex, setParent, toStringTree |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public java.lang.Object payload
public java.util.List hiddenTokens
Constructor Detail |
---|
public ParseTree(java.lang.Object label)
Method Detail |
---|
public Tree dupNode()
public int getType()
Tree
public java.lang.String getText()
public int getTokenStartIndex()
Tree
public void setTokenStartIndex(int index)
public int getTokenStopIndex()
Tree
public void setTokenStopIndex(int index)
public java.lang.String toString()
BaseTree
toString
in interface Tree
toString
in class BaseTree
public java.lang.String toStringWithHiddenTokens()
public java.lang.String toInputString()
public void _toStringLeaves(java.lang.StringBuffer buf)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |