bug in reader?
Diedrich Wolter <[email protected]> Wed, 28 May 2003 17:27:25 +0200
| Newsgroups | gmane.lisp.openmcl.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi!
Using openmcl 0.13.5 I encounter difficulties using self-defined reader
macros. Within a conditional read that is ignored self-defined reader
macros do not seem to work. Attached is an example defining a reader
macro #@ for mac screen points as available in MCL. The error caused by
the last statement is unclear to me. Is this a bug or am I missing
something? Any ideas?
Regards,
Diedrich
? (set-dispatch-macro-character #\# #\@ #'(lambda (stream char1 char2)
(declare (ignore char1 char2))
(let ((p (read stream)))
(format t "~%Read ~a" p)
(logior (first p) (ash (second p) 16)))) *readtable*)
T
? #@(8 8)
Read (8 8)524296
? #-SOMETHING #@(8 8) #@(9 9)
Read (8 8)
524296
?
Read (9 9)589833
? #+SOMETHING #@(9 9) #@(8 8)
Read (NIL NIL)
> Error: value NIL is not of the expected type INTEGER.
> While executing: ASH
> Type :POP to abort.
Type :? for other options.
1 >
--
Diedrich Wolter, [email protected], +49 421 218 9558
Cognitive Systems Group, University of Bremen
http://www.cosy.informatik.uni-bremen.de/