[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: reading, escapism, and astrology



In general, yes, you can change the reader in DrScheme, but sadly, 
the mechanism for doing that will change radically in the next 
release. Also, as Shriram points out, the reader that you are 
modifying won't even part of the next release.

For 103, yes the reader's are settable, but only from "inside" 
DrScheme, or from a tool. So, see the tools manual for an explanation 
of how to create a tool and then how to set the reader with that 
tool. You don't need to make a new unit -- you can just set the 
zodiac reader's parameter to call your new reader (implemented 
however). (Of course, since this won't port to 200 anyway, you can 
just hack directly on the reader's code).

Hope that helps.

Robby

At 11:24 PM -0400 5/10/01, Deinst@world.std.com wrote:
>	My questions about escape sequences in strings was motivated by
>attempting to get the test cases in Oleg Kiselyov's SSAX parser to work.
>After spending far too long mindlessly typing in format statements, making
>the excuse that I should look at the code and the tests anyway, I decided
>that I should really do this task automatically. Thinking that there had to be
>a complete functioning scheme reader somewhere in all of the DrScheme code
>(there is) I decided that I would mangle it to emit a modified version of the
>code.  Suddenly a light came on, and I thought that since DrScheme switches
>languages, it should be possible to switch readers.
>	I think it is possible to switch readers, maybe even easy to
>do so.  I do have a few questions. 
>
>One: There appear to be two readers, one a raw reader, and the other a
>zodiac reader.  It appears that the raw reader is only called when one
>is in either MzScheme or MrEd non debug modes, but I am less than
>certain of that.  Is that true?  Experiment has shown that mangling
>the zodiac scanner makes a reader which seems to work nicely in MrEd
>debug mode.  (Cringe if you must, I do promise not to inflict my
>experiments on anyone but myself until I have at least a vague idea of
>what I am doing. 
>
>Two: It appears that the readers are parameters, but are they settable
>from the outside of DrScheme?  If not (as I suspect), what would be
>the archiecturaly soundest way to add a new language that has and
>improved scaqnner?
>
>Three: I am not completely understanding how zodiac gets linked and inserted
>into DrScheme.  All I really need is to make a new unit with the signature
>of zodiac-scanner-code^ and relink everything, but I'm not even going to try
>anything like that until I have something like a rented clue.
>
>	Thanks,
>		Deinst