[plt-scheme] dots
On Jun 10, 2007, at 1:27 PM, Jos Koot wrote:
> Yes, I thought of using a readertable too, but did not succeed, not
> even with another character for the dot. How do you put "(dot " in
> font of the a of a.b when the readertable-procedure for the period
> is invoked? (and after the a has already been parsed) If you have a
> solution that does not force me to parse all identifiers myself, I
> am very curious to hear about it.
No, I don't have a solution that would work with a readertable. I
should have mentioned that my reader peeked ahead to see if the next
datum was a dot.
>
> ----- Original Message ----- From: "Robert Nikander"
> <nikander at nc.rr.com>
>
>> I've experimented with writing Scheme interpreters, and I once
>> added dot support at the reader level, similar to quote:
>>
>> 'a --> (quote a)
>> a.b --> (dot a 'b)
>>
>> Different types could implement the dot lookup however they
>> wanted. Maybe it's just a slippery slope to syntax hell, or
>> maybe it's worth it. I had to pick another character for
>> improper lists, but that was fine with me.