Re: Wow, Lisp Reader !!

"Tim Bradshaw (as tfb at cley dot com)" <[email protected]> Sun, 24 May 2026 15:40:16 +0100
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
On 24 May 2026, at 15:32, David McClain (as dbm at refined-audiometrics dot com) <[email protected]> wrote:
> 
> I see that the Lisp community has chosen to allow not only whitespace, but also parentheses, as parse stopping point. Totally reasonable, given the basis of the language in Sexprs. But why also Quote, Backquote? Also Semicolon - seems reasonable. Comma and Vertical Bar?
> 
> I can easily envision wanting symbol names ending in a quote, as in X’ (for x-prime).
> 

This is simple to arrange:

(defvar *rt* (copy-readtable nil))

(set-macro-character
 #\'
 (get-macro-character #\' *readtable*)
 t *rt*)

Now

? (setf *readtable* *rt*)
#<readtable 8170521CF3>

? 'foo'bar'bang
foo\'bar\'bang

Same for the others.  You just need to make the read-macros be nonterminating.

--tim

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html