| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public <T> T | accept(ParseTreeVisitor<? extends T> visitor)
Implements org. ParseTreeVisitor needs a double dispatch method.
|
| public ParseTree | getChild(int i)
Implements org. ith value indexed from 0.
|
| public int | getChildCount()
Implements org. |
| public RuleNode | |
| public Token | getPayload()
Implements org. |
| public Interval | getSourceInterval()
Implements org. Interval indicating the index in the
TokenStream of the first and last token associated with this
subtree.
|
| public Token | |
| public String | getText()
Implements org. |
| public void | |
| public String | |
| public String | toStringTree(Parser parser)
Implements org. |
| public String | toStringTree()
Implements org. (root child1 ..
|
| TerminalNodeImpl | back to summary |
|---|---|
| public TerminalNodeImpl(Token symbol) | |
| accept | back to summary |
|---|---|
| public <T> T accept(ParseTreeVisitor<? extends T> visitor) Implements org. Doc from org. The
| |
| getChild | back to summary |
|---|---|
| public ParseTree getChild(int i) Implements org. Doc from org. If there are children, get the
| |
| getChildCount | back to summary |
|---|---|
| public int getChildCount() Implements org. Doc from org. How many children are there? If there is none, then this node represents a leaf node.
| |
| getParent | back to summary |
|---|---|
| public RuleNode getParent() Implements org. Doc from org. The parent of this node. If the return value is null, then this node is the root of the tree.
| |
| getPayload | back to summary |
|---|---|
| public Token getPayload() Implements org. Doc from org. This method returns whatever object represents the data at this node. For
example, for parse trees, the payload can be a
| |
| getSourceInterval | back to summary |
|---|---|
| public Interval getSourceInterval() Implements org. Doc from org. Return an An interval of i..i-1 indicates an empty interval at position i in the input stream, where 0 <= i <= the size of the input token stream. Currently, the code base can only have i=0..n-1 but in concept one could have an empty interval after EOF. If source interval is unknown, this returns As a weird special case, the source interval for rules matched after EOF is unspecified.
| |
| getSymbol | back to summary |
|---|---|
| public Token getSymbol() Implements org.
| |
| getText | back to summary |
|---|---|
| public String getText() Implements org. Doc from org. Return the combined text of all leaf nodes. Does not get any off-channel tokens (if any) so won't return whitespace and comments if they are sent to parser on hidden channel.
| |
| setParent | back to summary |
|---|---|
| public void setParent(RuleContext parent) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| toStringTree | back to summary |
|---|---|
| public String toStringTree(Parser parser) Implements org. Doc from org. Specialize toStringTree so that it can print out more information based upon the parser.
| |
| toStringTree | back to summary |
|---|---|
| public String toStringTree() Implements org. Doc from org. Print out a whole tree, not just a node, in LISP format
| |