Commits

Nathan Taylor committed 8b0a39a

added test case

Comments (0)

Files changed (1)

pypy/rlib/parsing/test/test_ebnfparse.py

 """)
     excinfo = py.test.raises(ValueError, make_parse_function, regexs, rules)
     assert "primari" in str(excinfo.value)
- 
+
 def test_starred_star():
     regexs, rules, ToAST = parse_ebnf("""
 IGNORE: " ";
     t = ToAST().transform(t)
     assert len(t.children) == 6
     excinfo = py.test.raises(ParseError, parse, "a")
+
+def test_zero_repetition_production():
+    grammar = """
+IGNORE: " ";
+foo: "A"?;
+"""
+    py.test.raises(AssertionError, parse_ebnf, grammar)