[pypy-commit] pypy improved_ebnfparse_error: better error for ebnf empty production error
nbtaylor
noreply at buildbot.pypy.org
Thu Dec 27 23:43:53 CET 2012
Author: Nathan Taylor <nbtaylor at gmail.com>
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(
More information about the pypy-commit
mailing list