- ;; If not, we've read the whole number.
- (let ((num (make-float-aux number divisor
- *read-default-float-format*
- stream)))
- (return-from make-float (if negative-fraction (- num) num))))
- ((exponent-letterp char)
- (setq float-char char)
- ;; Build exponent.
- (setq char (inch-read-buffer))
- ;; Check leading sign.
- (if (cond ((char= char #\+) t)
- ((char= char #\-) (setq negative-exponent t)))
- ;; Flush sign.
- (setq char (inch-read-buffer)))
- ;; Read digits for exponent.
- (do* ((ch char (inch-read-buffer))
- (dig (and (not (eofp ch)) (digit-char-p ch))
- (and (not (eofp ch)) (digit-char-p ch))))
- ((not dig)
- (setq exponent (if negative-exponent (- exponent) exponent)))
- (setq exponent (+ (* exponent 10) dig)))
- ;; Generate and return the float, depending on FLOAT-CHAR:
- (let* ((float-format (case (char-upcase float-char)
- (#\E *read-default-float-format*)
- (#\S 'short-float)
- (#\F 'single-float)
- (#\D 'double-float)
- (#\L 'long-float)))
- (result (make-float-aux (* (expt 10 exponent) number)
- divisor float-format stream)))
- (return-from make-float
- (if negative-fraction (- result) result))))
- (t (bug "bad fallthrough in floating point reader")))))
+ ;; If not, we've read the whole number.
+ (let ((num (make-float-aux number divisor
+ *read-default-float-format*
+ stream)))
+ (return-from make-float (if negative-fraction (- num) num))))
+ ((exponent-letterp char)
+ (setq float-char char)
+ ;; Build exponent.
+ (setq char (inch-read-buffer))
+ ;; Check leading sign.
+ (if (cond ((char= char #\+) t)
+ ((char= char #\-) (setq negative-exponent t)))
+ ;; Flush sign.
+ (setq char (inch-read-buffer)))
+ ;; Read digits for exponent.
+ (do* ((ch char (inch-read-buffer))
+ (dig (and (not (eofp ch)) (digit-char-p ch))
+ (and (not (eofp ch)) (digit-char-p ch))))
+ ((not dig)
+ (setq exponent (if negative-exponent (- exponent) exponent)))
+ (setq exponent (+ (* exponent 10) dig)))
+ ;; Generate and return the float, depending on FLOAT-CHAR:
+ (let* ((float-format (case (char-upcase float-char)
+ (#\E *read-default-float-format*)
+ (#\S 'short-float)
+ (#\F 'single-float)
+ (#\D 'double-float)
+ (#\L 'long-float)))
+ (result (make-float-aux (* (expt 10 exponent) number)
+ divisor float-format stream)))
+ (return-from make-float
+ (if negative-fraction (- result) result))))
+ (t (bug "bad fallthrough in floating point reader")))))