[pypy-svn] r44951 - pypy/dist/pypy/lang/scheme
jlg at codespeak.net
jlg at codespeak.net
Thu Jul 12 14:10:59 CEST 2007
Author: jlg
Date: Thu Jul 12 14:10:57 2007
New Revision: 44951
Modified:
pypy/dist/pypy/lang/scheme/TODO.txt
pypy/dist/pypy/lang/scheme/interactive.py
pypy/dist/pypy/lang/scheme/object.py
pypy/dist/pypy/lang/scheme/ssparser.py
Log:
(antocuni, jlg) - __str__ for W_Root is no more
Modified: pypy/dist/pypy/lang/scheme/TODO.txt
==============================================================================
--- pypy/dist/pypy/lang/scheme/TODO.txt (original)
+++ pypy/dist/pypy/lang/scheme/TODO.txt Thu Jul 12 14:10:57 2007
@@ -7,7 +7,7 @@
Do next
-------
-- definitions: let*, letrec
+- definitions: let*
- symbols vs identifier, which name is better
- global dict for symbols _obarray_
Modified: pypy/dist/pypy/lang/scheme/interactive.py
==============================================================================
--- pypy/dist/pypy/lang/scheme/interactive.py (original)
+++ pypy/dist/pypy/lang/scheme/interactive.py Thu Jul 12 14:10:57 2007
@@ -31,7 +31,7 @@
if to_exec == "":
print
raise SchemeQuit
- print parse(to_exec).eval(ctx)
+ print parse(to_exec).eval(ctx).to_string()
except SchemeQuit, e:
break
except BacktrackException, e:
Modified: pypy/dist/pypy/lang/scheme/object.py
==============================================================================
--- pypy/dist/pypy/lang/scheme/object.py (original)
+++ pypy/dist/pypy/lang/scheme/object.py Thu Jul 12 14:10:57 2007
@@ -8,6 +8,7 @@
return "Unbound variable %s" % self.args[0]
class SchemeQuit(SchemeException):
+ """raised on (quit) evaluation"""
pass
class W_Root(object):
@@ -17,9 +18,6 @@
def to_boolean(self):
return True
- def __str__(self):
- return self.to_string()
-
def __repr__(self):
return "<W_Root " + self.to_string() + ">"
Modified: pypy/dist/pypy/lang/scheme/ssparser.py
==============================================================================
--- pypy/dist/pypy/lang/scheme/ssparser.py (original)
+++ pypy/dist/pypy/lang/scheme/ssparser.py Thu Jul 12 14:10:57 2007
@@ -8,7 +8,7 @@
return s.replace('\\"', '"')
class SchemeParser(PackratParser):
- r'''
+ r"""
STRING:
c = `\"([^\\\"]|\\\"|\\\\)*\"`
IGNORE*
@@ -78,7 +78,7 @@
cdr = pair
return {W_Pair(car, cdr)}
| return {W_Nil()};
- '''
+ """
def parse(code):
p = SchemeParser(code)
More information about the Pypy-commit
mailing list