[gambit-list] Transforming top-level program code
Jason Felice
jason.m.felice at gmail.com
Wed Feb 20 10:58:11 EST 2013
I've had a couple ideas for modifications to the Scheme reader that I
imagine would be front-ends to the compiler. Examples:
1. A front end which reads Scheme source but specially handles square
braces, transforming them into Objective-C method calls via my library, so
that I can put the following in a program:
(let ((s [[NSString alloc] initWithCapacity:42]))
...)
And have it dispatch non-dynamically (my current project is completely
dynamic).
2. A testing library where "check" forms appear under each function in the
same file as documentation. The check forms normally expand to nothing,
but a command can be run from the command line scans the current directory
and sub-directories for .scm files which (check ...) forms in them and runs
them.
3. A complete environment with support for a lot of SRFI's and utility
functions built in - a new REPL/compiler which is specialized for some
domain.
Black hole appears to do something like this.
My question is, how do I hook into Gambit to compile or interpret after
I've transformed the code, preserving line numbers?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20130220/2ca0449f/attachment.htm>
More information about the Gambit-list
mailing list