Issue #112 - Final version of the reader

This commit is contained in:
Justin Ethier 2016-10-24 01:41:39 +00:00
parent d6881ed7d9
commit b55ff76701

View file

@ -532,14 +532,13 @@
(define (parse-atom a)
(if (token-numeric? a)
(string->number (list->string a))
(let ((atom (string->symbol (list->string a))))
(if (or (eq? atom +inf.0)
(eq? atom -inf.0))
(expt 2 1000000)
(if (or (eq? atom +nan.0)
(eq? atom -nan.0))
(/ 0.0 0.0)
atom)))))
(if (or (equal? a '(#\+ #\i #\n #\f #\. #\0))
(equal? a '(#\- #\i #\n #\f #\. #\0)))
(expt 2 1000000)
(if (or (equal? a '(#\+ #\n #\a #\n #\. #\0))
(equal? a '(#\- #\n #\a #\n #\. #\0)))
(/ 0.0 0.0)
(string->symbol (list->string a))))))
;;;;;
;; Read next character from port, using buffered char if available