From: Pascal J. Bourguignon on
D Herring <dherring(a)at.tentpost.dot.com> writes:

> On 05/18/2010 09:05 PM, Peter Keller wrote:
>
>> However, knowing this, what extensive readtable hackery has been done? Is any
>> of it documented somewhere? What is the computational complexity of readtable
>> coding, can one do only lexical analysis with it? Actual parsing? If parsing,
>> can only LL(1) be done? LL(k)? LALR(k)?
>
> You can extend the CL reader with arbitrary code. Once a reader macro
> has been triggered, that macro is given the input stream and it can
> consume characters however it wants. It can even query google if it
> wants to know how to interpret a character.
>
> Hence there is no principled way to layer such extensions.
>
> Hence the best we have is to store entire readtables, and use tools
> like named-readtables to cleanly swap them in and out.
>
> Hence reader macro collisions are a real problem, and people generally
> discourage their use when plain macros would do just as well.
>
> - Daniel
>
> P.S. Take a look at PLT Scheme if you'd like to see another approach
> on the topic of local syntax.

And of course, read Kent Pitman take at it:
"Ambitious Evaluation"
http://www.nhplace.com/kent/PS/Ambitious.html


--
__Pascal Bourguignon__ http://www.informatimago.com/
From: Peter Keller on
Pascal J. Bourguignon <pjb(a)informatimago.com> wrote:
> And of course, read Kent Pitman take at it:
> "Ambitious Evaluation"
> http://www.nhplace.com/kent/PS/Ambitious.html

Hrm. Interesting. Thanks!

-pete