From: Ron Garret <ron@fl...> - 2006-06-06 06:07:24
As those of you who have been following along on c.l.l. know I am
trying to arrange for forms that look like ((...) ...) to not be
treated as errors (and be treated e.g. as (funcall (...) ...). I have
been able to produce implementation-specific hacks that accomplish this
for MCL and SBCL. But CLisp has me stymied. (From the first time I
ever looked at the CLisp sources over ten years ago they always struck
me as some of the most, er, challenging sources I've ever seen.)
Anyway, I got as far as hacking system::%expand-form thusly:
(defun %expand-form1 (form &aux (%whole-form form))
(if (consp f)
(if (eq (car f) 'lambda)
(multiple-value-call #'%expand-cons form
(%expand-list (rest form)))
(%expand-form (munge-form form)))
(TEXT "~S: invalid form ~S")
(defun munge-form (form) (cons 'funcall form)) ; For illustrative
but that doesn't seem to work. It does change the behavior of the
system in that it allows me to do this which it wouldn't before:
(defun foo () ((car (list #'cdr)) '(1 2 3)))
but if I try to actually call FOO it complains.
Anyone have any suggestions on how to proceed?
Get latest updates about Open Source Projects, Conferences and News.