public class ParseTreeWalker extends Object
| Modifier and Type | Field and Description |
|---|---|
static ParseTreeWalker |
DEFAULT |
| Constructor and Description |
|---|
ParseTreeWalker() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
enterRule(ParseTreeListener listener,
RuleNode r)
Enters a grammar rule by first triggering the generic event
ParseTreeListener.enterEveryRule(org.antlr.v4.runtime.ParserRuleContext)
then by triggering the event specific to the given parse tree node |
protected void |
exitRule(ParseTreeListener listener,
RuleNode r)
Exits a grammar rule by first triggering the event specific to the given parse tree node
then by triggering the generic event
ParseTreeListener.exitEveryRule(org.antlr.v4.runtime.ParserRuleContext) |
void |
walk(ParseTreeListener listener,
ParseTree t)
Performs a walk on the given parse tree starting at the root and going down recursively
with depth-first search.
|
public static final ParseTreeWalker DEFAULT
public void walk(ParseTreeListener listener, ParseTree t)
enterRule(org.antlr.v4.runtime.tree.ParseTreeListener, org.antlr.v4.runtime.tree.RuleNode) is called before
recursively walking down into child nodes, then
exitRule(org.antlr.v4.runtime.tree.ParseTreeListener, org.antlr.v4.runtime.tree.RuleNode) is called after the recursive call to wind up.listener - The listener used by the walker to process grammar rulest - The parse tree to be walked onprotected void enterRule(ParseTreeListener listener, RuleNode r)
ParseTreeListener.enterEveryRule(org.antlr.v4.runtime.ParserRuleContext)
then by triggering the event specific to the given parse tree nodelistener - The listener responding to the trigger eventsr - The grammar rule containing the rule contextprotected void exitRule(ParseTreeListener listener, RuleNode r)
ParseTreeListener.exitEveryRule(org.antlr.v4.runtime.ParserRuleContext)listener - The listener responding to the trigger eventsr - The grammar rule containing the rule contextCopyright © 1992–2021 ANTLR. All rights reserved.