public class LeftRecursionDetector extends Object
| Modifier and Type | Field and Description |
|---|---|
org.antlr.v4.runtime.atn.ATN |
atn |
List<Set<Rule>> |
listOfRecursiveCycles
Holds a list of cycles (sets of rule names).
|
| Constructor and Description |
|---|
LeftRecursionDetector(Grammar g,
org.antlr.v4.runtime.atn.ATN atn) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRulesToCycle(Rule enclosingRule,
Rule targetRule)
enclosingRule calls targetRule.
|
void |
check() |
boolean |
check(Rule enclosingRule,
org.antlr.v4.runtime.atn.ATNState s,
Set<org.antlr.v4.runtime.atn.ATNState> visitedStates)
From state s, look for any transition to a rule that is currently
being traced.
|
public LeftRecursionDetector(Grammar g, org.antlr.v4.runtime.atn.ATN atn)
public void check()
public boolean check(Rule enclosingRule, org.antlr.v4.runtime.atn.ATNState s, Set<org.antlr.v4.runtime.atn.ATNState> visitedStates)
Copyright © 1992–2022 Daniel Sun. All rights reserved.