From: William H. N. <wn...@us...> - 2002-05-14 04:27:38
|
Update of /cvsroot/sbcl/sbcl/tests In directory usw-pr-cvs1:/tmp/cvs-serv21671/tests Modified Files: reader.pure.lisp Log Message: 0.7.3.16: (These changes might leave SET-SYNTAX-FROM-CHAR messed up. I'll try to fix that soon, or else add some tests to verify that it isn't too messed up.) ANSIfying FROB-MACRO-CHARACTER functions... ...made GET-MACRO-CHARACTER return NIL for non-macro characters ...made SET-MACRO-CHARACTER handle NIL values ...used %COERCE-CALLABLE-TO-FUN instead of COERCE ... 'FUNCTION Some of the "Unconstituentize some of them" operations in !COLD-INIT-STANDARD-READTABLE seem to've become no-ops, so delete them. It seems strange that ASCII RUBOUT should be treated as whitespace, so that e.g. "(+ 12)" EVALs to 3. So I deleted the customization of its entry in *STANDARD-READTABLE*, and now it's treated as just another character, which seems less surprising. Index: reader.pure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/reader.pure.lisp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** reader.pure.lisp 12 Apr 2002 12:15:56 -0000 1.2 --- reader.pure.lisp 14 May 2002 04:27:35 -0000 1.3 *************** *** 17,28 **** ;;; Prior to sbcl-0.7.2.10, SBCL disobeyed the ANSI requirements on ! ;;; returning NIL for unset dispatch-macro-character functions (bug ;;; 151, fixed by Alexey Dejenka sbcl-devel "bug 151" 2002-04-12) (assert (not (get-dispatch-macro-character #\# #\{))) (assert (not (get-dispatch-macro-character #\# #\0))) ! ;;; and we might as well test that we don't have any cross-compilation ;;; shebang residues left... (assert (not (get-dispatch-macro-character #\# #\!))) ! ;;; also test that all the illegal sharp macro characters are ;;; recognized as being illegal. (loop for char in '(#\Backspace #\Tab #\Newline #\Linefeed --- 17,28 ---- ;;; Prior to sbcl-0.7.2.10, SBCL disobeyed the ANSI requirements on ! ;;; returning NIL for unset dispatch-macro-character functions. (bug ;;; 151, fixed by Alexey Dejenka sbcl-devel "bug 151" 2002-04-12) (assert (not (get-dispatch-macro-character #\# #\{))) (assert (not (get-dispatch-macro-character #\# #\0))) ! ;;; And we might as well test that we don't have any cross-compilation ;;; shebang residues left... (assert (not (get-dispatch-macro-character #\# #\!))) ! ;;; Also test that all the illegal sharp macro characters are ;;; recognized as being illegal. (loop for char in '(#\Backspace #\Tab #\Newline #\Linefeed *************** *** 32,33 **** --- 32,53 ---- (assert (not (ignore-errors (get-dispatch-macro-character #\! #\0) t))) + + ;;; In sbcl-0.7.3, GET-MACRO-CHARACTER and SET-MACRO-CHARACTER didn't + ;;; use NIL to represent the no-macro-attached-to-this-character case + ;;; as ANSI says they should. (This problem is parallel to the + ;;; GET-DISPATCH-MACRO misbehavior fixed in sbcl-0.7.2.10, but + ;;; was fixed a little later.) + (dolist (customizable-char + ;; According to ANSI "2.1.4 Character Syntax Types", these + ;; characters are reserved for the programmer. + '(#\? #\! #\[ #\] #\{ #\})) + ;; So they should have no macro-characterness. + (multiple-value-bind (macro-fun non-terminating-p) + (get-macro-character customizable-char) + (assert (null macro-fun)) + ;; Also, in a bit of ANSI weirdness, NON-TERMINATING-P can be + ;; true only when MACRO-FUN is true. (When the character + ;; is not a macro character, it can be embedded in a token, + ;; so it'd be more logical for NON-TERMINATING-P to be T in + ;; this case; but ANSI says it's NIL in this case. + (assert (null non-terminating-p)))) |