Alex Mizrahi <email@example.com> 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
READ-TOKEN, READ-LIST, READ-AFTER-DOT, and then INTERN & FIND-SYMBOL.
Try a quick hack at it. You may find it easier than trying to secure
the built-in READ.
Rob Warnock <firstname.lastname@example.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607