[pypy-svn] r14276 - in pypy/dist/pypy: interpreter/pyparser module/recparser

arigo at codespeak.net arigo at codespeak.net
Tue Jul 5 13:38:32 CEST 2005


Author: arigo
Date: Tue Jul  5 13:38:29 2005
New Revision: 14276

Modified:
   pypy/dist/pypy/interpreter/pyparser/pythonutil.py
   pypy/dist/pypy/module/recparser/pyparser.py
Log:
Fixes in the imports.


Modified: pypy/dist/pypy/interpreter/pyparser/pythonutil.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyparser/pythonutil.py	(original)
+++ pypy/dist/pypy/interpreter/pyparser/pythonutil.py	Tue Jul  5 13:38:29 2005
@@ -1,5 +1,4 @@
-__all__ = ["python_parse", "pypy_parse", "ast_single_input", "ast_file_input",
-           "ast_eval_input"]
+__all__ = ["python_parse", "pypy_parse"]
 
 import parser
 import symbol

Modified: pypy/dist/pypy/module/recparser/pyparser.py
==============================================================================
--- pypy/dist/pypy/module/recparser/pyparser.py	(original)
+++ pypy/dist/pypy/module/recparser/pyparser.py	Tue Jul  5 13:38:29 2005
@@ -8,7 +8,6 @@
 from pypy.interpreter.typedef import interp_attrproperty, GetSetProperty
 from pypy.interpreter.pycode import PyCode 
 from pypy.interpreter.pyparser.syntaxtree import SyntaxNode
-from pypy.interpreter.pyparser.pythonparse import parse_python_source
 from pypy.interpreter.pyparser.pythonutil import PYTHON_PARSER
 
 __all__ = [ "ASTType", "STType", "suite", "expr" ]
@@ -101,16 +100,14 @@
 
 def suite( space, source ):
     # make the annotator life easier (don't use str.splitlines())
-    strings = [line + '\n' for line in source.split('\n')]
-    builder = parse_python_source( strings, PYTHON_PARSER, "file_input" )
+    builder = PYTHON_PARSER.parse_source( source, "file_input" )
     return space.wrap( STType(space, builder.stack[-1]) )    
 
 suite.unwrap_spec = [ObjSpace, str]
 
 def expr( space, source ):
     # make the annotator life easier (don't use str.splitlines())
-    strings = [line + '\n' for line in source.split('\n')]
-    builder = parse_python_source( strings, PYTHON_PARSER, "eval_input" )
+    builder = PYTHON_PARSER.parse_source( source, "eval_input" )
     return space.wrap( STType(space, builder.stack[-1]) )    
 
 expr.unwrap_spec = [ObjSpace, str]



More information about the Pypy-commit mailing list