public interface ParseTree extends SyntaxTree
RuleContext objects created
during a parse that makes the data structure look like a simple parse tree.
This node represents both internal nodes, rule invocations,
and leaf nodes, token matches.
The payload is either a Token or a RuleContext object.
| Modifier and Type | Method and Description |
|---|---|
<T> T |
accept(ParseTreeVisitor<? extends T> visitor)
The
ParseTreeVisitor needs a double dispatch method. |
ParseTree |
getChild(int i)
If there are children, get the
ith value indexed from 0. |
ParseTree |
getParent()
The parent of this node.
|
java.lang.String |
getText()
Return the combined text of all leaf nodes.
|
java.lang.String |
toStringTree(Parser parser)
Specialize toStringTree so that it can print out more information
based upon the parser.
|
getSourceIntervalgetChildCount, getPayload, toStringTreeParseTree getParent()
TreeParseTree getChild(int i)
Treeith value indexed from 0.<T> T accept(ParseTreeVisitor<? extends T> visitor)
ParseTreeVisitor needs a double dispatch method.java.lang.String getText()
java.lang.String toStringTree(Parser parser)