SyntaxTree, TreeErrorNode, RuleNode, TerminalNodeErrorNodeImpl, GrammarInterpreterRuleContext, InterpreterRuleContext, ParserRuleContext, RuleContext, RuleContextWithAltNum, TerminalNodeImplpublic 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 | 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.
|
String |
getText() |
Return the combined text of all leaf nodes.
|
void |
setParent(RuleContext parent) |
Set the parent for this node.
|
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.void setParent(RuleContext parent)
<T> T accept(ParseTreeVisitor<? extends T> visitor)
ParseTreeVisitor needs a double dispatch method.String getText()
Copyright © 1992–2019 ANTLR. All rights reserved.