X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Freader.lisp;h=41145889555ba7e41b9518b99aca2817cdc79282;hb=86210c4e406c1b2ff10cc3bac0e71435867db48b;hp=953ab9272724124a48ca008bb6c7d34a1d8aea16;hpb=45e102d04c2fd1be31ccb9f63d123ea86afb1858;p=sbcl.git diff --git a/src/code/reader.lisp b/src/code/reader.lisp index 953ab92..4114588 100644 --- a/src/code/reader.lisp +++ b/src/code/reader.lisp @@ -162,8 +162,8 @@ (replace (character-macro-table really-to-readtable) (character-macro-table really-from-readtable)) (setf (dispatch-tables really-to-readtable) - (mapcar #'(lambda (pair) (cons (car pair) - (copy-seq (cdr pair)))) + (mapcar (lambda (pair) (cons (car pair) + (copy-seq (cdr pair)))) (dispatch-tables really-from-readtable))) (setf (readtable-case really-to-readtable) (readtable-case really-from-readtable)) @@ -1222,8 +1222,8 @@ (return-from make-float (if negative-fraction (- num) num)))))) - ;; should never happen: - (t (error "internal error in floating point reader"))))) + ;; should never happen + (t (bug "bad fallthrough in floating point reader"))))) (defun make-float-aux (number divisor float-format) (coerce (/ number divisor) float-format)) @@ -1307,15 +1307,20 @@ #!+sb-doc "Return the macro character function for SUB-CHAR under DISP-CHAR or NIL if there is no associated function." - (unless (digit-char-p sub-char) - (let* ((sub-char (char-upcase sub-char)) - (rt (or rt *standard-readtable*)) - (dpair (find disp-char (dispatch-tables rt) - :test #'char= :key #'car))) - (if dpair - (elt (the simple-vector (cdr dpair)) - (char-code sub-char)) - (error "~S is not a dispatch char." disp-char))))) + (let* ((sub-char (char-upcase sub-char)) + (rt (or rt *standard-readtable*)) + (dpair (find disp-char (dispatch-tables rt) + :test #'char= :key #'car))) + (if dpair + (let ((dispatch-fun (elt (the simple-vector (cdr dpair)) + (char-code sub-char)))) + ;; Digits are also initialized in a dispatch table to + ;; #'dispatch-char-error; READ-DISPATCH-CHAR handles them + ;; separately. - CSR, 2002-04-12 + (if (eq dispatch-fun #'dispatch-char-error) + nil + dispatch-fun)) + (error "~S is not a dispatch char." disp-char)))) (defun read-dispatch-char (stream char) ;; Read some digits.