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