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