We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d0f4b6 commit 87bb8efCopy full SHA for 87bb8ef
lark/parsers/lalr_analysis.py
@@ -285,7 +285,9 @@ def compute_lalr1_states(self) -> None:
285
rule ,= rules
286
if la in actions:
287
if self.strict:
288
- raise GrammarError(f"Shift/Reduce conflict for terminal {la.name}. [strict-mode]\n ")
+ msg = f'Shift/Reduce conflict for terminal {la.name}. [strict-mode]\n' \
289
+ f' * {rule}\n'
290
+ raise GrammarError(msg)
291
elif self.debug:
292
logger.warning('Shift/Reduce conflict for terminal %s: (resolving as shift)', la.name)
293
logger.warning(' * %s', rule)
0 commit comments