[pypy-svn] r11936 - pypy/dist/pypy/module/recparser
ludal at codespeak.net
ludal at codespeak.net
Wed May 4 15:05:19 CEST 2005
Author: ludal
Date: Wed May 4 15:05:19 2005
New Revision: 11936
Modified:
pypy/dist/pypy/module/recparser/pythonparse.py
Log:
* fix the test failures with encoding declaration on codespeak (modified python grammar)
Modified: pypy/dist/pypy/module/recparser/pythonparse.py
==============================================================================
--- pypy/dist/pypy/module/recparser/pythonparse.py (original)
+++ pypy/dist/pypy/module/recparser/pythonparse.py Wed May 4 15:05:19 2005
@@ -4,6 +4,7 @@
from ebnfparse import parse_grammar
import sys
import pythonutil
+import symbol
def parse_python_source( textsrc, gram, goal ):
"""Parse a python source according to goal"""
@@ -43,7 +44,8 @@
root_node = builder.stack[-1]
nested_tuples = root_node.totuple()
if hasattr(builder, '_source_encoding'):
- return (323, nested_tuples, builder._source_encoding)
+ # XXX: maybe the parser could fix that instead ?
+ return ( symbol.encoding_decl, nested_tuples, builder._source_encoding)
else:
return nested_tuples
return None # XXX raise an exception instead
More information about the Pypy-commit
mailing list