Top Description Fields Constructors Methods
org.antlr.runtime.tree

public Class ParseTree

extends BaseTree
Class Inheritance
Imports
org.antlr.runtime.Token, java.util.List

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

Modifier and TypeField and Description
public List<Token>
public Object
Inherited from org.antlr.runtime.tree.BaseTree:
children

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public Tree
public String
public int
getTokenStartIndex()

Implements org.antlr.runtime.tree.Tree.getTokenStartIndex.

What is the smallest token index (indexing from 0) for this node and its children?
public int
getTokenStopIndex()

Implements org.antlr.runtime.tree.Tree.getTokenStopIndex.

What is the largest token index (indexing from 0) for this node and its children?
public int
getType()

Implements org.antlr.runtime.tree.Tree.getType.

Return a token type; needed for tree parsing
public void
public void
public String
toInputString()

Print out the leaves of this tree, which means printing original input back out.

public String
toString()

Implements abstract org.antlr.runtime.tree.BaseTree.toString.

Implements org.antlr.runtime.tree.Tree.toString.

Override to say how a node (not a tree) should look as text
public String
toStringWithHiddenTokens()

Emit a token and all hidden nodes before.

Inherited from org.antlr.runtime.tree.BaseTree:
addChildaddChildrencreateChildrenListdeleteChildfreshenParentAndChildIndexesfreshenParentAndChildIndexesfreshenParentAndChildIndexesDeeplyfreshenParentAndChildIndexesDeeplygetAncestorgetAncestorsgetCharPositionInLinegetChildgetChildCountgetChildIndexgetChildrengetFirstChildWithTypegetLinegetParenthasAncestorinsertChildisNilreplaceChildrensanityCheckParentAndChildIndexessanityCheckParentAndChildIndexessetChildsetChildIndexsetParenttoStringTree

Field Detail

hiddenTokensback to summary
public List<Token> hiddenTokens
payloadback to summary
public Object payload

Constructor Detail

ParseTreeback to summary
public ParseTree(Object label)

Method Detail

_toStringLeavesback to summary
public void _toStringLeaves(StringBuffer buf)
dupNodeback to summary
public Tree dupNode()

Implements org.antlr.runtime.tree.Tree.dupNode.

Annotations
@Override
getTextback to summary
public String getText()

Implements org.antlr.runtime.tree.Tree.getText.

Annotations
@Override
getTokenStartIndexback to summary
public int getTokenStartIndex()

Implements org.antlr.runtime.tree.Tree.getTokenStartIndex.

Doc from org.antlr.runtime.tree.Tree.getTokenStartIndex.

What is the smallest token index (indexing from 0) for this node and its children?

Annotations
@Override
getTokenStopIndexback to summary
public int getTokenStopIndex()

Implements org.antlr.runtime.tree.Tree.getTokenStopIndex.

Doc from org.antlr.runtime.tree.Tree.getTokenStopIndex.

What is the largest token index (indexing from 0) for this node and its children?

Annotations
@Override
getTypeback to summary
public int getType()

Implements org.antlr.runtime.tree.Tree.getType.

Doc from org.antlr.runtime.tree.Tree.getType.

Return a token type; needed for tree parsing

Annotations
@Override
setTokenStartIndexback to summary
public void setTokenStartIndex(int index)

Implements org.antlr.runtime.tree.Tree.setTokenStartIndex.

Annotations
@Override
setTokenStopIndexback to summary
public void setTokenStopIndex(int index)

Implements org.antlr.runtime.tree.Tree.setTokenStopIndex.

Annotations
@Override
toInputStringback to summary
public String toInputString()

Print out the leaves of this tree, which means printing original input back out.

toStringback to summary
public String toString()

Implements abstract org.antlr.runtime.tree.BaseTree.toString.

Implements org.antlr.runtime.tree.Tree.toString.

Doc from org.antlr.runtime.tree.BaseTree.toString.

Override to say how a node (not a tree) should look as text

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object

Annotations
@Override
toStringWithHiddenTokensback to summary
public String toStringWithHiddenTokens()

Emit a token and all hidden nodes before. EOF node holds all hidden tokens after last real token.