Merge pull request #1251 from renatahodovan/execATN-conflictingAlts

Fix the initialization of conflictingAlts in execATN in Python targets.
This commit is contained in:
Terence Parr 2016-11-19 14:58:39 -08:00 committed by GitHub
commit 30e4ec29c8
2 changed files with 2 additions and 2 deletions

View File

@ -443,7 +443,7 @@ class ParserATNSimulator(ATNSimulator):
if D.requiresFullContext and self.predictionMode != PredictionMode.SLL:
# IF PREDS, MIGHT RESOLVE TO SINGLE ALT => SLL (or syntax error)
conflictingAlts = None
conflictingAlts = D.configs.conflictingAlts
if D.predicates is not None:
if ParserATNSimulator.debug:
print("DFA state has preds in DFA sim LL failover")

View File

@ -448,7 +448,7 @@ class ParserATNSimulator(ATNSimulator):
if D.requiresFullContext and self.predictionMode != PredictionMode.SLL:
# IF PREDS, MIGHT RESOLVE TO SINGLE ALT => SLL (or syntax error)
conflictingAlts = None
conflictingAlts = D.configs.conflictingAlts
if D.predicates is not None:
if ParserATNSimulator.debug:
print("DFA state has preds in DFA sim LL failover")