[clpython-devel] RE: CLPython on LispWorks
Jochen Schmidt
jsc at crispylogics.com
Tue Apr 22 18:23:06 UTC 2008
Hello Willem,
I've tried to compile CLPython as you suggested in your message.
There were two problems I had to solve:
1) Incomplete Definition in core/csetup.lisp
The only Definition in this file was:
(defun py-raise (exc-type string &rest format-args)
"Raise a Python exception with given format string"
(if +exceptions-are-python-objects+
(error exc-type :args (cons string format-args)))
(error exc-type
I just closed the two open parens to get it compiling. If I understood
the code right - the incomplete part of this function would not get
taken by LispWorks anyways (because on LispWorks you did set
+exceptions-are-python-objects+ to T).
2) Reader Problem in exceptions.lisp
There are two definitions for {Exception}, depending on the value of
+exceptions-are-python-objects+. The decision which of the definitions
applies is done by a reader-conditional which is setup within the same
EVAL-WHEN like the definitions themselves; this means that the
definitions are already through the reader before you push :exceptions-
are-python-objects on *features*. The solution is to split the EVAL-
WHEN form into two: One to push :exceptions-are-python-objects on
*features* and the second one with the definitions of {Exception}.
Actually I think the {Exception}-Definition wouldn't have to be within
an EVAL-WHEN at all.
After this two points CLPython compiles through and it seems to run -
impressive!
I've run your test-suite and the only failure was this one:
Test failed: known failure: (CLPYTHON.PARSER:PARSE "def f(a=3,): pass")
Reason: detected an unexpected error of type `#<CLPYTHON::PY-TYPE
CLPYTHON.USER.BUILTIN.TYPE.EXCEPTION:|SyntaxError| 21A26D3B>':
SyntaxError: Parse error at line 1, at token `)'.
Expected one of: `(' `identifier' `*' `**'.
[Internal error #<YACC:YACC-PARSE-ERROR
200FC37F> caught due to CLPYTHON.PARSER::*CATCH-YACC-CONDITIONS*]
Which - as I understood the message - is a already known problem.
Again: CLPython is a really impressive bit of work! Thanks for sharing
it with us.
ciao,
Jochen Schmidt
--
Jochen Schmidt
CRISPYLOGICS
Julienstr. 1, 90419 Nuremberg
Fon +49 (0)911 517 999 82
Fax +49 (0)911 517 999 83
mailto:info at crispylogics.com
http://www.crispylogics.com
More information about the Clpython-devel
mailing list