| Modifier and Type | Field and Description |
|---|---|
| public int | childIndex
What index is this node in the child list? |
| public CommonTree | parent
Who is the parent node of this node; if null, implies node is root |
| protected int | startIndex
What token indexes bracket all tokens associated with this node and below? |
| protected int | stopIndex
What token indexes bracket all tokens associated with this node and below? |
| public Token | token
A single token is the payload |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Tree | |
| public int | |
| public int | getChildIndex()
Overrides org. Implements org. |
| public int | getLine()
Overrides org. Implements org. |
| public Tree | getParent()
Overrides org. Implements org. |
| public String | |
| public Token | |
| public int | getTokenStartIndex()
Implements org. |
| public int | getTokenStopIndex()
Implements org. |
| public int | getType()
Implements org. |
| public boolean | isNil()
Overrides org. Implements org. |
| public void | setChildIndex(int index)
Overrides org. Implements org. |
| public void | setParent(Tree t)
Overrides org. Implements org. |
| public void | |
| public void | |
| public void | setUnknownTokenBoundaries()
For every node in this subtree, make sure it's start/stop token's are set. |
| public String | toString()
Implements abstract org. Implements org. |
| childIndex | back to summary |
|---|---|
| public int childIndex What index is this node in the child list? Range: 0..n-1 | |
| parent | back to summary |
|---|---|
| public CommonTree parent Who is the parent node of this node; if null, implies node is root | |
| startIndex | back to summary |
|---|---|
| protected int startIndex What token indexes bracket all tokens associated with this node and below? | |
| stopIndex | back to summary |
|---|---|
| protected int stopIndex What token indexes bracket all tokens associated with this node and below? | |
| token | back to summary |
|---|---|
| public Token token A single token is the payload | |
| CommonTree | back to summary |
|---|---|
| public CommonTree() | |
| CommonTree | back to summary |
|---|---|
| public CommonTree(CommonTree node) | |
| CommonTree | back to summary |
|---|---|
| public CommonTree(Token t) | |
| dupNode | back to summary |
|---|---|
| public Tree dupNode() Implements org.
| |
| getCharPositionInLine | back to summary |
|---|---|
| public int getCharPositionInLine() Overrides org. Implements org.
| |
| getChildIndex | back to summary |
|---|---|
| public int getChildIndex() Overrides org. Implements org. Doc from org. BaseTree doesn't track child indexes.
| |
| getLine | back to summary |
|---|---|
| public int getLine() Overrides org. Implements org. Doc from org. In case we don't have a token payload, what is the line for errors?
| |
| getParent | back to summary |
|---|---|
| public Tree getParent() Overrides org. Implements org. Doc from org. BaseTree doesn't track parent pointers.
| |
| getText | back to summary |
|---|---|
| public String getText() Implements org.
| |
| getToken | back to summary |
|---|---|
| public Token getToken() | |
| getTokenStartIndex | back to summary |
|---|---|
| public int getTokenStartIndex() Implements org. Doc from org. What is the smallest token index (indexing from 0) for this node and its children?
| |
| getTokenStopIndex | back to summary |
|---|---|
| public int getTokenStopIndex() Implements org. Doc from org. What is the largest token index (indexing from 0) for this node and its children?
| |
| getType | back to summary |
|---|---|
| public int getType() Implements org. Doc from org. Return a token type; needed for tree parsing
| |
| isNil | back to summary |
|---|---|
| public boolean isNil() Overrides org. Implements org. Doc from org. Indicates the node is a nil node but may still have children, meaning the tree is a flat list.
| |
| setChildIndex | back to summary |
|---|---|
| public void setChildIndex(int index) Overrides org. Implements org.
| |
| setParent | back to summary |
|---|---|
| public void setParent(Tree t) Overrides org. Implements org.
| |
| setTokenStartIndex | back to summary |
|---|---|
| public void setTokenStartIndex(int index) Implements org.
| |
| setTokenStopIndex | back to summary |
|---|---|
| public void setTokenStopIndex(int index) Implements org.
| |
| setUnknownTokenBoundaries | back to summary |
|---|---|
| public void setUnknownTokenBoundaries() For every node in this subtree, make sure it's start/stop token's are set. Walk depth first, visit bottom up. Only updates nodes with at least one token index < 0. | |
| toString | back to summary |
|---|---|
| public String toString() Implements abstract org. Implements org. Doc from org. Override to say how a node (not a tree) should look as text
| |