Class ParseTree
- java.lang.Object
-
- org.eclipse.persistence.internal.libraries.antlr.runtime.tree.BaseTree
-
- org.eclipse.persistence.internal.libraries.antlr.runtime.tree.ParseTree
-
- All Implemented Interfaces:
Tree
public class ParseTree extends BaseTree
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
Fields Modifier and Type Field Description java.util.List<Token>hiddenTokensjava.lang.Objectpayload-
Fields inherited from class org.eclipse.persistence.internal.libraries.antlr.runtime.tree.BaseTree
children
-
Fields inherited from interface org.eclipse.persistence.internal.libraries.antlr.runtime.tree.Tree
INVALID_NODE
-
-
Constructor Summary
Constructors Constructor Description ParseTree(java.lang.Object label)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void_toStringLeaves(java.lang.StringBuffer buf)TreedupNode()java.lang.StringgetText()intgetTokenStartIndex()What is the smallest token index (indexing from 0) for this node and its children?intgetTokenStopIndex()What is the largest token index (indexing from 0) for this node and its children?intgetType()Return a token type; needed for tree parsingvoidsetTokenStartIndex(int index)voidsetTokenStopIndex(int index)java.lang.StringtoInputString()Print out the leaves of this tree, which means printing original input back out.java.lang.StringtoString()Override to say how a node (not a tree) should look as textjava.lang.StringtoStringWithHiddenTokens()Emit a token and all hidden nodes before.-
Methods inherited from class org.eclipse.persistence.internal.libraries.antlr.runtime.tree.BaseTree
addChild, addChildren, createChildrenList, deleteChild, freshenParentAndChildIndexes, freshenParentAndChildIndexes, freshenParentAndChildIndexesDeeply, freshenParentAndChildIndexesDeeply, getAncestor, getAncestors, getCharPositionInLine, getChild, getChildCount, getChildIndex, getChildren, getFirstChildWithType, getLine, getParent, hasAncestor, insertChild, isNil, replaceChildren, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexes, setChild, setChildIndex, setParent, toStringTree
-
-
-
-
Field Detail
-
payload
public java.lang.Object payload
-
hiddenTokens
public java.util.List<Token> hiddenTokens
-
-
Method Detail
-
dupNode
public Tree dupNode()
-
getType
public int getType()
Description copied from interface:TreeReturn a token type; needed for tree parsing
-
getText
public java.lang.String getText()
-
getTokenStartIndex
public int getTokenStartIndex()
Description copied from interface:TreeWhat is the smallest token index (indexing from 0) for this node and its children?
-
setTokenStartIndex
public void setTokenStartIndex(int index)
-
getTokenStopIndex
public int getTokenStopIndex()
Description copied from interface:TreeWhat is the largest token index (indexing from 0) for this node and its children?
-
setTokenStopIndex
public void setTokenStopIndex(int index)
-
toString
public java.lang.String toString()
Description copied from class:BaseTreeOverride to say how a node (not a tree) should look as text
-
toStringWithHiddenTokens
public java.lang.String toStringWithHiddenTokens()
Emit a token and all hidden nodes before. EOF node holds all hidden tokens after last real token.
-
toInputString
public java.lang.String toInputString()
Print out the leaves of this tree, which means printing original input back out.
-
_toStringLeaves
public void _toStringLeaves(java.lang.StringBuffer buf)
-
-