[Openmcl-devel] openmcl read problem
bryan d. o'connor
bryan-lisp at lunch.org
Wed Nov 9 16:07:19 EST 2005
> openmcl 1.0 cant load a file with this expression in it. the file its
> taken from is called "walk.lisp" an old code walker from the pcl
> distribution. other versions of openmcl load lt:
the problem is dispatch macro characters that aren't defined and
wrapped in a reader conditional, like this:
the spec for *read-suppress* doesn't explicitly say what happens in
what it does say is that it will "continue to parse the representation
of an object in the normal way, in order to skip over the object" and
"dispatching macro characters continue to parse an infix numerical
argument, and invoke the dispatch function." there's also a note that
programmers and implementors are strongly encouraged to make their
macros behave just as the standardized ones.
i read that as non-standardized reader macros get invoked in case
they do something non-obvious when *read-suppress* is true. the
question is whether the reader should ignore an error if it's not
lispworks and allegro don't have a problem with the equivalent form
because they both still define #, (which was in CLTL2 but not ANSI).
if you instead use an undefined reader macro, they will throw an
error. sbcl treats it as if it were defined and skips it.
the easiest solution in this case might be to update the original
code to not use #,.
More information about the Openmcl-devel