Browse Source

Merge pull request #371 from pvinci/master

Fix DeprecationWarning in lalr_analysis.py
tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.7.2
Erez Shinan 5 years ago
committed by GitHub
parent
commit
c85e7f4f48
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      lark/parsers/lalr_analysis.py

+ 2
- 2
lark/parsers/lalr_analysis.py View File

@@ -112,9 +112,9 @@ class LALR_Analyzer(GrammarAnalyzer):
for k, v in lookahead.items():
if len(v) > 1:
if self.debug:
logging.warn("Shift/reduce conflict for terminal %s: (resolving as shift)", k.name)
logging.warning("Shift/reduce conflict for terminal %s: (resolving as shift)", k.name)
for act, arg in v:
logging.warn(' * %s: %s', act, arg)
logging.warning(' * %s: %s', act, arg)
for x in v:
# XXX resolving shift/reduce into shift, like PLY
# Give a proper warning


Loading…
Cancel
Save