From e3d314b11ad5a32726bd31f4a386c041344f9475 Mon Sep 17 00:00:00 2001 From: Tobias C Rittweiler Date: Sat, 27 Dec 2008 15:22:56 +0100 Subject: [PATCH] Align the GOTOs in PARSE-TOKEN-FROM-STREAM vertically to make the automaton the function implements more explicit and readable. --- src/code/reader.lisp | 340 +++++++++++++++++++++++++-------------------------- 1 file changed, 170 insertions(+), 170 deletions(-) diff --git a/src/code/reader.lisp b/src/code/reader.lisp index 4e6b8eff2..a8b6d203a 100644 --- a/src/code/reader.lisp +++ b/src/code/reader.lisp @@ -956,21 +956,20 @@ standard Lisp readtable when NIL." (reset-read-buffer) (prog ((char firstchar)) (case (char-class3 char attribute-array attribute-hash-table) - (#.+char-attr-constituent-sign+ (go SIGN)) - (#.+char-attr-constituent-digit+ (go LEFTDIGIT)) - (#.+char-attr-constituent-digit-or-expt+ - (setq seen-digit-or-expt t) - (go LEFTDIGIT)) + (#.+char-attr-constituent-sign+ (go SIGN)) + (#.+char-attr-constituent-digit+ (go LEFTDIGIT)) + (#.+char-attr-constituent-digit-or-expt+ (setq seen-digit-or-expt t) + (go LEFTDIGIT)) (#.+char-attr-constituent-decimal-digit+ (go LEFTDECIMALDIGIT)) - (#.+char-attr-constituent-dot+ (go FRONTDOT)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-invalid+ (simple-reader-error stream - "invalid constituent")) - (#.+char-attr-delimiter+ (go RETURN-NOT-A-TOKEN)) + (#.+char-attr-constituent-dot+ (go FRONTDOT)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-delimiter+ (go RETURN-NOT-A-TOKEN)) + (#.+char-attr-invalid+ + (simple-reader-error stream "invalid constituent")) ;; can't have eof as first char! - (t (go SYMBOL))) + (t (go SYMBOL))) SIGN ; saw "sign" (ouch-read-buffer char) (setq char (read-char stream nil nil)) @@ -978,209 +977,208 @@ standard Lisp readtable when NIL." (setq possibly-rational t possibly-float t) (case (char-class3 char attribute-array attribute-hash-table) - (#.+char-attr-constituent-digit+ (go LEFTDIGIT)) - (#.+char-attr-constituent-digit-or-expt+ - (setq seen-digit-or-expt t) - (go LEFTDIGIT)) + (#.+char-attr-constituent-digit+ (go LEFTDIGIT)) + (#.+char-attr-constituent-digit-or-expt+ (setq seen-digit-or-expt t) + (go LEFTDIGIT)) (#.+char-attr-constituent-decimal-digit+ (go LEFTDECIMALDIGIT)) - (#.+char-attr-constituent-dot+ (go SIGNDOT)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-delimiter+ (unread-char char stream) (go RETURN-SYMBOL)) - (t (go SYMBOL))) + (#.+char-attr-constituent-dot+ (go SIGNDOT)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-SYMBOL)) + (t (go SYMBOL))) LEFTDIGIT ; saw "[sign] {digit}+" (ouch-read-buffer char) (setq char (read-char stream nil nil)) (unless char (go RETURN-INTEGER)) (setq was-possibly-float possibly-float) (case (char-class3 char attribute-array attribute-hash-table) - (#.+char-attr-constituent-digit+ (go LEFTDIGIT)) + (#.+char-attr-constituent-digit+ (go LEFTDIGIT)) (#.+char-attr-constituent-decimal-digit+ (if possibly-float (go LEFTDECIMALDIGIT) (go SYMBOL))) - (#.+char-attr-constituent-dot+ (if possibly-float - (go MIDDLEDOT) - (go SYMBOL))) + (#.+char-attr-constituent-dot+ (if possibly-float + (go MIDDLEDOT) + (go SYMBOL))) (#.+char-attr-constituent-digit-or-expt+ (if (or seen-digit-or-expt (not was-possibly-float)) - (progn (setq seen-digit-or-expt t) (go LEFTDIGIT)) - (progn (setq seen-digit-or-expt t) (go LEFTDIGIT-OR-EXPT)))) - (#.+char-attr-constituent-expt+ - (if was-possibly-float - (go EXPONENT) - (go SYMBOL))) - (#.+char-attr-constituent-slash+ (if possibly-rational - (go RATIO) - (go SYMBOL))) - (#.+char-attr-delimiter+ (unread-char char stream) - (go RETURN-INTEGER)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (progn (setq seen-digit-or-expt t) (go LEFTDIGIT)) + (progn (setq seen-digit-or-expt t) (go LEFTDIGIT-OR-EXPT)))) + (#.+char-attr-constituent-expt+ (if was-possibly-float + (go EXPONENT) + (go SYMBOL))) + (#.+char-attr-constituent-slash+ (if possibly-rational + (go RATIO) + (go SYMBOL))) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-INTEGER)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) LEFTDIGIT-OR-EXPT (ouch-read-buffer char) (setq char (read-char stream nil nil)) (unless char (go RETURN-INTEGER)) (case (char-class3 char attribute-array attribute-hash-table) - (#.+char-attr-constituent-digit+ (go LEFTDIGIT)) + (#.+char-attr-constituent-digit+ (go LEFTDIGIT)) (#.+char-attr-constituent-decimal-digit+ (bug "impossible!")) - (#.+char-attr-constituent-dot+ (go SYMBOL)) + (#.+char-attr-constituent-dot+ (go SYMBOL)) (#.+char-attr-constituent-digit-or-expt+ (go LEFTDIGIT)) - (#.+char-attr-constituent-expt+ (go SYMBOL)) - (#.+char-attr-constituent-sign+ (go EXPTSIGN)) - (#.+char-attr-constituent-slash+ (if possibly-rational - (go RATIO) - (go SYMBOL))) - (#.+char-attr-delimiter+ (unread-char char stream) - (go RETURN-INTEGER)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (#.+char-attr-constituent-expt+ (go SYMBOL)) + (#.+char-attr-constituent-sign+ (go EXPTSIGN)) + (#.+char-attr-constituent-slash+ (if possibly-rational + (go RATIO) + (go SYMBOL))) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-INTEGER)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) LEFTDECIMALDIGIT ; saw "[sign] {decimal-digit}+" (aver possibly-float) (ouch-read-buffer char) (setq char (read-char stream nil nil)) (unless char (go RETURN-SYMBOL)) (case (char-class char attribute-array attribute-hash-table) - (#.+char-attr-constituent-digit+ (go LEFTDECIMALDIGIT)) - (#.+char-attr-constituent-dot+ (go MIDDLEDOT)) - (#.+char-attr-constituent-expt+ (go EXPONENT)) - (#.+char-attr-constituent-slash+ (aver (not possibly-rational)) - (go SYMBOL)) - (#.+char-attr-delimiter+ (unread-char char stream) - (go RETURN-SYMBOL)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (#.+char-attr-constituent-digit+ (go LEFTDECIMALDIGIT)) + (#.+char-attr-constituent-dot+ (go MIDDLEDOT)) + (#.+char-attr-constituent-expt+ (go EXPONENT)) + (#.+char-attr-constituent-slash+ (aver (not possibly-rational)) + (go SYMBOL)) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-SYMBOL)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) MIDDLEDOT ; saw "[sign] {digit}+ dot" (ouch-read-buffer char) (setq char (read-char stream nil nil)) (unless char (go RETURN-BASE10-INTEGER)) (case (char-class char attribute-array attribute-hash-table) - (#.+char-attr-constituent-digit+ (go RIGHTDIGIT)) - (#.+char-attr-constituent-expt+ (go EXPONENT)) - (#.+char-attr-delimiter+ - (unread-char char stream) - (go RETURN-BASE10-INTEGER)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (#.+char-attr-constituent-digit+ (go RIGHTDIGIT)) + (#.+char-attr-constituent-expt+ (go EXPONENT)) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-BASE10-INTEGER)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) RIGHTDIGIT ; saw "[sign] {decimal-digit}* dot {digit}+" (ouch-read-buffer char) (setq char (read-char stream nil nil)) (unless char (go RETURN-FLOAT)) (case (char-class char attribute-array attribute-hash-table) - (#.+char-attr-constituent-digit+ (go RIGHTDIGIT)) - (#.+char-attr-constituent-expt+ (go EXPONENT)) - (#.+char-attr-delimiter+ - (unread-char char stream) - (go RETURN-FLOAT)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (#.+char-attr-constituent-digit+ (go RIGHTDIGIT)) + (#.+char-attr-constituent-expt+ (go EXPONENT)) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-FLOAT)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) SIGNDOT ; saw "[sign] dot" (ouch-read-buffer char) (setq char (read-char stream nil nil)) (unless char (go RETURN-SYMBOL)) (case (char-class char attribute-array attribute-hash-table) - (#.+char-attr-constituent-digit+ (go RIGHTDIGIT)) - (#.+char-attr-delimiter+ (unread-char char stream) (go RETURN-SYMBOL)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (t (go SYMBOL))) + (#.+char-attr-constituent-digit+ (go RIGHTDIGIT)) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-SYMBOL)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (t (go SYMBOL))) FRONTDOT ; saw "dot" (ouch-read-buffer char) (setq char (read-char stream nil nil)) (unless char (simple-reader-error stream "dot context error")) (case (char-class char attribute-array attribute-hash-table) - (#.+char-attr-constituent-digit+ (go RIGHTDIGIT)) - (#.+char-attr-constituent-dot+ (go DOTS)) - (#.+char-attr-delimiter+ (simple-reader-error stream - "dot context error")) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (#.+char-attr-constituent-digit+ (go RIGHTDIGIT)) + (#.+char-attr-constituent-dot+ (go DOTS)) + (#.+char-attr-delimiter+ + (simple-reader-error stream "dot context error")) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) EXPONENT (ouch-read-buffer char) (setq char (read-char stream nil nil)) (unless char (go RETURN-SYMBOL)) (setq possibly-float t) (case (char-class char attribute-array attribute-hash-table) - (#.+char-attr-constituent-sign+ (go EXPTSIGN)) - (#.+char-attr-constituent-digit+ (go EXPTDIGIT)) - (#.+char-attr-delimiter+ (unread-char char stream) (go RETURN-SYMBOL)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (#.+char-attr-constituent-sign+ (go EXPTSIGN)) + (#.+char-attr-constituent-digit+ (go EXPTDIGIT)) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-SYMBOL)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) EXPTSIGN ; got to EXPONENT, and saw a sign character (ouch-read-buffer char) (setq char (read-char stream nil nil)) (unless char (go RETURN-SYMBOL)) (case (char-class char attribute-array attribute-hash-table) - (#.+char-attr-constituent-digit+ (go EXPTDIGIT)) - (#.+char-attr-delimiter+ (unread-char char stream) (go RETURN-SYMBOL)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (#.+char-attr-constituent-digit+ (go EXPTDIGIT)) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-SYMBOL)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) EXPTDIGIT ; got to EXPONENT, saw "[sign] {digit}+" (ouch-read-buffer char) (setq char (read-char stream nil nil)) (unless char (go RETURN-FLOAT)) (case (char-class char attribute-array attribute-hash-table) - (#.+char-attr-constituent-digit+ (go EXPTDIGIT)) - (#.+char-attr-delimiter+ - (unread-char char stream) - (go RETURN-FLOAT)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (#.+char-attr-constituent-digit+ (go EXPTDIGIT)) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-FLOAT)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) RATIO ; saw "[sign] {digit}+ slash" (ouch-read-buffer char) (setq char (read-char stream nil nil)) (unless char (go RETURN-SYMBOL)) (case (char-class2 char attribute-array attribute-hash-table) - (#.+char-attr-constituent-digit+ (go RATIODIGIT)) - (#.+char-attr-delimiter+ (unread-char char stream) (go RETURN-SYMBOL)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (#.+char-attr-constituent-digit+ (go RATIODIGIT)) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-SYMBOL)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) RATIODIGIT ; saw "[sign] {digit}+ slash {digit}+" (ouch-read-buffer char) (setq char (read-char stream nil nil)) (unless char (go RETURN-RATIO)) (case (char-class2 char attribute-array attribute-hash-table) - (#.+char-attr-constituent-digit+ (go RATIODIGIT)) - (#.+char-attr-delimiter+ - (unread-char char stream) - (go RETURN-RATIO)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (#.+char-attr-constituent-digit+ (go RATIODIGIT)) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-RATIO)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) DOTS ; saw "dot {dot}+" (ouch-read-buffer char) (setq char (read-char stream nil nil)) (unless char (simple-reader-error stream "too many dots")) (case (char-class char attribute-array attribute-hash-table) - (#.+char-attr-constituent-dot+ (go DOTS)) + (#.+char-attr-constituent-dot+ (go DOTS)) (#.+char-attr-delimiter+ (unread-char char stream) (simple-reader-error stream "too many dots")) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) SYMBOL ; not a dot, dots, or number (let ((stream (in-synonym-of stream))) (if (ansi-stream-p stream) @@ -1191,16 +1189,16 @@ standard Lisp readtable when NIL." (setq char (fast-read-char nil nil)) (unless char (go RETURN-SYMBOL)) (case (char-class char attribute-array attribute-hash-table) - (#.+char-attr-single-escape+ (done-with-fast-read-char) - (go SINGLE-ESCAPE)) - (#.+char-attr-delimiter+ (done-with-fast-read-char) - (unread-char char stream) - (go RETURN-SYMBOL)) - (#.+char-attr-multiple-escape+ (done-with-fast-read-char) - (go MULT-ESCAPE)) + (#.+char-attr-single-escape+ (done-with-fast-read-char) + (go SINGLE-ESCAPE)) + (#.+char-attr-delimiter+ (done-with-fast-read-char) + (unread-char char stream) + (go RETURN-SYMBOL)) + (#.+char-attr-multiple-escape+ (done-with-fast-read-char) + (go MULT-ESCAPE)) (#.+char-attr-package-delimiter+ (done-with-fast-read-char) (go COLON)) - (t (go SYMBOL-LOOP))))) + (t (go SYMBOL-LOOP))))) ;; CLOS stream (prog () SYMBOL-LOOP @@ -1208,12 +1206,12 @@ standard Lisp readtable when NIL." (setq char (read-char stream nil :eof)) (when (eq char :eof) (go RETURN-SYMBOL)) (case (char-class char attribute-array attribute-hash-table) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-delimiter+ (unread-char char stream) - (go RETURN-SYMBOL)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL-LOOP)))))) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-SYMBOL)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL-LOOP)))))) SINGLE-ESCAPE ; saw a single-escape ;; Don't put the escape character in the read buffer. ;; READ-NEXT CHAR, put in buffer (no case conversion). @@ -1225,11 +1223,12 @@ standard Lisp readtable when NIL." (setq char (read-char stream nil nil)) (unless char (go RETURN-SYMBOL)) (case (char-class char attribute-array attribute-hash-table) - (#.+char-attr-delimiter+ (unread-char char stream) (go RETURN-SYMBOL)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-SYMBOL)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) MULT-ESCAPE (setq seen-multiple-escapes t) (do ((char (read-char stream t) (read-char stream t))) @@ -1240,11 +1239,12 @@ standard Lisp readtable when NIL." (setq char (read-char stream nil nil)) (unless char (go RETURN-SYMBOL)) (case (char-class char attribute-array attribute-hash-table) - (#.+char-attr-delimiter+ (unread-char char stream) (go RETURN-SYMBOL)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go COLON)) - (t (go SYMBOL))) + (#.+char-attr-delimiter+ (unread-char char stream) + (go RETURN-SYMBOL)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go COLON)) + (t (go SYMBOL))) COLON (unless (zerop colons) (unread-char char stream) @@ -1265,10 +1265,10 @@ standard Lisp readtable when NIL." (simple-reader-error stream "illegal terminating character after a colon: ~S" char)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) - (#.+char-attr-package-delimiter+ (go INTERN)) - (t (go SYMBOL))) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-package-delimiter+ (go INTERN)) + (t (go SYMBOL))) INTERN ; saw two colons (setq colons 2) (setq char (read-char stream nil nil)) @@ -1280,15 +1280,15 @@ standard Lisp readtable when NIL." (simple-reader-error stream "illegal terminating character after a colon: ~S" char)) - (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) - (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) + (#.+char-attr-single-escape+ (go SINGLE-ESCAPE)) + (#.+char-attr-multiple-escape+ (go MULT-ESCAPE)) (#.+char-attr-package-delimiter+ (unread-char char stream) (casify-read-buffer escapes) - (simple-reader-error stream - "too many colons after ~S" + (simple-reader-error stream "too many colons after ~S" (read-buffer-to-string))) - (t (go SYMBOL))) + (t (go SYMBOL))) + (bug "Left the evaluat") RETURN-BASE10-INTEGER (return (values :integer 10)) RETURN-FLOAT (return :float) RETURN-INTEGER (return :integer) -- 2.11.4.GIT