[pypy-svn] r11460 - in pypy/dist/pypy/module/recparser: . test

adim at codespeak.net adim at codespeak.net
Tue Apr 26 12:55:04 CEST 2005


Author: adim
Date: Tue Apr 26 12:55:04 2005
New Revision: 11460

Modified:
   pypy/dist/pypy/module/recparser/pythonutil.py
   pypy/dist/pypy/module/recparser/test/test_pytokenizer.py
   pypy/dist/pypy/module/recparser/test/test_samples.py
   pypy/dist/pypy/module/recparser/test/test_samples2.py
Log:
fixed import paths in recparser and recparser/test

Modified: pypy/dist/pypy/module/recparser/pythonutil.py
==============================================================================
--- pypy/dist/pypy/module/recparser/pythonutil.py	(original)
+++ pypy/dist/pypy/module/recparser/pythonutil.py	Tue Apr 26 12:55:04 2005
@@ -6,11 +6,11 @@
 import sys
 
 _ver = ".".join([str(i) for i in sys.version_info[:2]])
-PYTHON_GRAMMAR = os.path.join( os.path.dirname(__file__), "Grammar" + _ver )
+PYTHON_GRAMMAR = os.path.join( os.path.dirname(__file__), "data", "Grammar" + _ver )
 
 def python_grammar():
     """returns a """
-    from ebnf import parse_grammar
+    from ebnfparse import parse_grammar
     level = get_debug()
     set_debug( 0 )
     gram = parse_grammar( file(PYTHON_GRAMMAR) )

Modified: pypy/dist/pypy/module/recparser/test/test_pytokenizer.py
==============================================================================
--- pypy/dist/pypy/module/recparser/test/test_pytokenizer.py	(original)
+++ pypy/dist/pypy/module/recparser/test/test_pytokenizer.py	Tue Apr 26 12:55:04 2005
@@ -1,5 +1,5 @@
-from python.lexer import PythonSource, py_number, g_symdef, g_string, py_name, \
-     py_punct
+from pypy.module.recparser.pythonlexer import PythonSource, py_number, \
+     g_symdef, g_string, py_name, py_punct
 
 def parse_source(source):
     """returns list of parsed tokens"""
@@ -77,4 +77,3 @@
             tokens = parse_source(pstr)
             assert tokens[0][0] == pstr
 
-

Modified: pypy/dist/pypy/module/recparser/test/test_samples.py
==============================================================================
--- pypy/dist/pypy/module/recparser/test/test_samples.py	(original)
+++ pypy/dist/pypy/module/recparser/test/test_samples.py	Tue Apr 26 12:55:04 2005
@@ -2,10 +2,9 @@
 
 import os, os.path as osp
 import sys
-from ebnf import parse_grammar
-from python import python_parse, pypy_parse, set_debug
+from pypy.module.recparser.pythonutil import python_parse, pypy_parse, set_debug
 from pprint import pprint
-import grammar
+from pypy.module.recparser import grammar
 grammar.DEBUG = False
 from symbol import sym_name
 

Modified: pypy/dist/pypy/module/recparser/test/test_samples2.py
==============================================================================
--- pypy/dist/pypy/module/recparser/test/test_samples2.py	(original)
+++ pypy/dist/pypy/module/recparser/test/test_samples2.py	Tue Apr 26 12:55:04 2005
@@ -1,8 +1,8 @@
 """test module for CPython / PyPy nested tuples comparison"""
 import os, os.path as osp
-from python import python_parse, pypy_parse
+from pypy.module.recparser.pythonutil import python_parse, pypy_parse
 from pprint import pprint
-import grammar
+from pypy.module.recparser import grammar
 grammar.DEBUG = False
 from symbol import sym_name
 



More information about the Pypy-commit mailing list