[Openmcl-devel] Error on macro character after sharpsign colon

Terje Norderhaug terje at in-progress.com
Mon Jan 25 12:21:39 PST 2010


CLZ fails to read an uninterned symbol if the sharpsign colon is  
followed by a macro character. Is this a bug or correct behavior? I  
got no wiser by reading the hyperspec, but presume it's in there  
somewhere:

    http://www.lispworks.com/documentation/lw50/CLHS/Body/02_b.htm

Replicate by evaluating the following:

(defun symbol-reader (stream char)
    (declare (ignore char))
    (read stream t nil t))

(set-macro-character #\! #'symbol-reader T)

'!abc
=> ABC

'#:!abc
=> Reader error: Illegal symbol syntax.

Backtrace leads to #'read-symbol-token in the l1-reader.

LispWorks (5.0 Personal) reads '#:!abc without reporting an error.  
Which implementation is right?

-- Terje Norderhaug
   terje at in-progress.com







More information about the Openmcl-devel mailing list