Browse Source

Better error message

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.8.0
Erez Sh 5 years ago
parent
commit
99a27663f6
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lark/parsers/earley_forest.py

+ 1
- 1
lark/parsers/earley_forest.py View File

@@ -195,7 +195,7 @@ class ForestVisitor(object):
continue

if id(next_node) in visiting:
raise ParseError("Infinite recursion in grammar!")
raise ParseError("Infinite recursion in grammar, in rule '%s'!" % next_node.s.name)

input_stack.append(next_node)
continue


Loading…
Cancel
Save