| org.antlr.runtime.tree.Tree
All known Subclasses: org.antlr.runtime.tree.BaseTree,
Tree | public interface Tree (Code) | | What does a tree look like? ANTLR has a number of support classes
such as CommonTreeNodeStream that work on these kinds of trees. You
don't have to make your trees implement this interface, but if you do,
you'll be able to use more support code.
NOTE: When constructing trees, ANTLR can build any kind of tree; it can
even use Token objects as trees if you add a child list to your tokens.
This is a tree node without any payload; just navigation and factory stuff.
|
INVALID_NODE | final public static Tree INVALID_NODE(Code) | | |
addChild | void addChild(Tree t)(Code) | | Add t as a child to this node. If t is null, do nothing. If t
is nil, add all children of t to this' children.
Parameters: t - |
getCharPositionInLine | int getCharPositionInLine()(Code) | | |
getChildCount | int getChildCount()(Code) | | |
getLine | int getLine()(Code) | | In case we don't have a token payload, what is the line for errors?
|
getTokenStartIndex | int getTokenStartIndex()(Code) | | What is the smallest token index (indexing from 0) for this node
and its children?
|
getTokenStopIndex | int getTokenStopIndex()(Code) | | What is the largest token index (indexing from 0) for this node
and its children?
|
getType | int getType()(Code) | | Return a token type; needed for tree parsing
|
isNil | boolean isNil()(Code) | | Indicates the node is a nil node but may still have children, meaning
the tree is a flat list.
|
setTokenStartIndex | void setTokenStartIndex(int index)(Code) | | |
setTokenStopIndex | void setTokenStopIndex(int index)(Code) | | |
|
|