I'm using the compiler by running the gsc executable.

Where do I inject the code, and for what port?

I tried using (current-input-port), and executing the readtable-set! from an expanding macro using (current-input-port), that's all I can think of; but it doesn't apply #. .

Does somebody have this working?  What is the port for the compiler's input stream when running gsc?  And how/where/when should I execute this code to modify the readtable before the .scm file(s) are run?

Thanks,
Matt




On 8/27/2011 7:42 AM, Mikael wrote:
Hi Matt,

For sure you can do this, just track down the port that is (read) from on load and compile-file and perform the setting on it. Maybe you could even make a parameterized global variable config-sourcecode-port procedure so you can configure this as you go - and btw maybe that's already in there.

Did you say you want #. switched on for all or parts of your scm file? The earlier ought be more straightforward to implement.

Let the ML know what you got to.

Brgds,
Mikael

2011/8/27 Matt Lamari <matt.lamari@gmail.com>

I want to know if #.  or something equivalent is available when
compiling .scm files.  That is, the ability to tell the reader to
directly eval a form at read time.

I've been shown this:

http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php?title=Documentation:Procedure_readtable-eval-allowed?-set

But am not sure how this should be applied to reading compiled code, if
it's applicable, if it's possible.

If this code or something like it should be used to influence the
reader, where should it go?

What's the best way to get the ability to have #. in the middle of
compiled .scm?


Thanks,
Matt


_______________________________________________
Gambit-list mailing list
Gambit-list@iro.umontreal.ca
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list



_______________________________________________
Gambit-list mailing list
Gambit-list@iro.umontreal.ca
https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list