[pypy-svn] r49457 - pypy/dist/pypy/rlib/parsing/test

cfbolz at codespeak.net cfbolz at codespeak.net
Thu Dec 6 20:40:13 CET 2007


Author: cfbolz
Date: Thu Dec  6 20:40:13 2007
New Revision: 49457

Modified:
   pypy/dist/pypy/rlib/parsing/test/test_ebnfparse.py
Log:
add some more stuff to test


Modified: pypy/dist/pypy/rlib/parsing/test/test_ebnfparse.py
==============================================================================
--- pypy/dist/pypy/rlib/parsing/test/test_ebnfparse.py	(original)
+++ pypy/dist/pypy/rlib/parsing/test/test_ebnfparse.py	Thu Dec  6 20:40:13 2007
@@ -456,10 +456,11 @@
     regexs, rules, ToAST = parse_ebnf("""
 IGNORE: " ";
 DECIMAL: "0|[1-9][0-9]*";
+file: <stuff> EOF;
 stuff: "a" >stuff< "a" | "y" | >empty<;
 empty: ;
     """)
-    parse = make_parse_function(regexs, rules)
+    parse = make_parse_function(regexs, rules, eof=True)
     t = parse(" ")
     t = ToAST().transform(t)
     assert isinstance(t, Nonterminal)
@@ -467,3 +468,4 @@
     t = parse(" a  a  a  a a    a ")
     t = ToAST().transform(t)
     assert len(t.children) == 6
+    excinfo = py.test.raises(ParseError, parse, "a")



More information about the Pypy-commit mailing list