Author: Nathan Taylor <[email protected]>
Branch: improved_ebnfparse_error
Changeset: r59594:735dc97186bd
Date: 2012-12-25 08:57 -0700
http://bitbucket.org/pypy/pypy/changeset/735dc97186bd/

Log:    better error for ebnf empty production error

diff --git a/pypy/rlib/parsing/ebnfparse.py b/pypy/rlib/parsing/ebnfparse.py
--- a/pypy/rlib/parsing/ebnfparse.py
+++ b/pypy/rlib/parsing/ebnfparse.py
@@ -247,8 +247,8 @@
                     real_changes.append(change)
                     continue
                 assert n != len(expansion), (
-                    "currently an expansion needs at least one"
-                    "symbol that always has to occur")
+                    "Rule %r's expansion needs at least one "
+                    "symbol with >0 repetitions" % rule.nonterminal)
                 slices = []
                 start = 0
                 for i, (maybe, symbol) in enumerate(
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to