0.8.12.3:
authorChristophe Rhodes <csr21@cam.ac.uk>
Sat, 26 Jun 2004 14:43:50 +0000 (14:43 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Sat, 26 Jun 2004 14:43:50 +0000 (14:43 +0000)
Fix (get-macro-character #\Space)
... now returns NIL, not undefined-macro-char
... tests for the standard characters

NEWS
src/code/reader.lisp
tests/reader.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 60ac550..1284e6a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2562,6 +2562,9 @@ changes in sbcl-0.8.13 relative to sbcl-0.8.12:
   * fixed bug #333: CHECK-TYPE now ensures that the type error
     signalled, if any, has the right object to be accessed by
     TYPE-ERROR-DATUM.  (reported by Tony Martinez)
+  * fixed a bug: #\Space (and other whitespace characters) are no
+    longer considered to be macro characters in standard syntax by
+    GET-MACRO-CHARACTER.
 
 planned incompatible changes in 0.8.x:
   * (not done yet, but planned:) When the profiling interface settles
index b5c5e73..0f2df53 100644 (file)
   (let ((*readtable* *standard-readtable*))
 
     (flet ((whitespaceify (char)
+            (set-cmt-entry char nil)
             (set-cat-entry char +char-attr-whitespace+)))
       (whitespaceify (code-char tab-char-code))
       (whitespaceify #\linefeed)
       (whitespaceify (code-char return-char-code)))
 
     (set-cat-entry #\\ +char-attr-escape+)
-    (set-cmt-entry #\\ #'read-token)
+    (set-cmt-entry #\\ nil)
 
     ;; Easy macro-character definitions are in this source file.
     (set-macro-character #\" #'read-string)
        ((= ichar #O200))
       (setq char (code-char ichar))
       (when (constituentp char *standard-readtable*)
-           (set-cat-entry char (get-secondary-attribute char))
-           (set-cmt-entry char nil)))))
+       (set-cat-entry char (get-secondary-attribute char))
+       (set-cmt-entry char nil)))))
 \f
 ;;;; implementation of the read buffer
 
index 3a54591..be7f77c 100644 (file)
     (loop for i from 2 to 36
          do (setq *read-base* i)
          do (assert (typep (read-from-string symbol-string) 'symbol)))))
+
+(let ((standard-chars " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~
+")
+      (standard-terminating-macro-chars "\"'(),;`")
+      (standard-nonterminating-macro-chars "#"))
+  (flet ((frob (char)
+          (multiple-value-bind (fun non-terminating-p)
+              (get-macro-character char)
+            (cond
+              ((find char standard-terminating-macro-chars)
+               (unless (and fun (not non-terminating-p))
+                 (list char)))
+              ((find char standard-nonterminating-macro-chars)
+               (unless (and fun non-terminating-p)
+                 (list char)))
+              (t (unless (and (not fun) (not non-terminating-p))
+                   (list char)))))))
+    (let ((*readtable* (copy-readtable nil)))
+      (assert (null (loop for c across standard-chars append (frob c)))))))
+
+(let ((standard-chars " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~
+")
+      (undefined-chars "!\"$%&,;>?@[]^_`~{}/dDeEfFgGhHiIjJkKlLmMnNqQtTuUvVwWyYzZ"))
+  (flet ((frob (char)
+          (let ((fun (get-dispatch-macro-character #\# char)))
+            (cond
+              ((find char undefined-chars)
+               (when fun (list char)))
+              ((digit-char-p char 10)
+               (when fun (list char)))
+              (t
+               (unless fun (list char)))))))
+    (let ((*readtable* (copy-readtable nil)))
+      (assert (null (loop for c across standard-chars append (frob c)))))))
index 87145a1..a554b97 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.12.2"
+"0.8.12.3"