Subject: Re: reader safe
From: (Rob Warnock)
Date: Sun, 24 Dec 2006 22:28:06 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
Alex Mizrahi <> wrote:
| at least i'd like to read it -- i don't want to write my own reader.

Actually, writing your own Lisp reader for the subset of forms
to which you're probably going to want to restrict the user input
*anyway* is not a big deal. I hand-compiled a large subset of the
CMUCL reader [mainly so I didn't forget any edge cases] into less
than 500 lines of C [including copious comments!] plus a few tables
that were autogenerated by extracting the initial readtable from
CMUCL. You could do the same thing in CL itself with much less effort.
And if you used a similar readtable/attribute-table approach, the
performance should be quite good. For me, the biggest hunks were

Try a quick hack at it. You may find it easier than trying to secure
the built-in READ.


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607