What is recursive-p argument for?
When I call read-* recursively, is it supposed to be aware of the
eof-error-p eof-value args to the top-level call?
Is there a way to get those values?
(defun read-brace (stream char)
(declare (ignore char))
(loop :for cc = (read-char stream t nil t)
;; should be (read-char stream nil 'error t), right?
:until (char= cc #\]) :collect cc))
(defun make-rt (&optional (rt (copy-readtable)))
(set-macro-character #\[ #'read-brace nil rt)
(set-macro-character #\] (get-macro-character #\)) nil rt)
rt)
(let ((*readtable* (make-rt)))
(read-from-string "[abcd" nil 'error))
is this supposed to return 'ERROR or signal an EOF error?
the common practice appears to signal an error.
is this supported by the standard?
why doesn't READ-FROM-STRING catch the error in READ-CHAR call in READ-BRACE?
Thanks.
--
Sam Steingold (http://www.podval.org/~sds)
A poet who reads his verse in public may have other nasty habits.