[Bug-openmcl] Bug in handling sharpsign-plus in OpenMCL 0.14.3 (and
earlier)
Brian Downing
bdowning at lavos.net
Tue Apr 12 14:04:23 MDT 2005
OpenMCL's handling of the sharpsign-plus reader macro doesn't seem to
conform to the specification. Specifically section 2.4.8.17:
#+ operates by first reading the feature expression and then
skipping over the form if the feature expression fails. While
reading the test, the current package is the KEYWORD package.
Skipping over the form is accomplished by binding *read-suppress* to
true and then calling read.
>From this follows that "#+(or) #+(or) nil nil t" should read as T:
* After the first #+(or) is read, the next form will be skipped
as the feature expression failed.
* READ is called on "#+(or) nil nil t", consuming "#+(or) nil nil"
and returning NIL.
* This NIL is thrown out (treated as whitespace), and T is the next
thing to read.
Here is a simple test case for this:
(defun test-clhs-2.4.8.17 ()
(if (read-from-string "#+(or) #+(or) nil nil t")
:pass
:fail))
Results:
SBCL :PASS
CMUCL :PASS
OpenMCL :FAIL
LispWorks :PASS
ACL 6.2 :FAIL
Code relying on this behavior was committed to SBCL recently. As this
breaks building with the current OpenMCL release it will be reverted,
but it still seems non-compliant.
-bcd
--
*** Brian Downing <bdowning at lavos dot net>
More information about the Bug-openmcl
mailing list