<div dir="ltr"><br><div style>I've had a couple ideas for modifications to the Scheme reader that I imagine would be front-ends to the compiler.  Examples:</div><div style><br></div><div style>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:</div>
<div style><br></div><div style>   (let ((s [[NSString alloc] initWithCapacity:42]))</div><div style>      ...)</div><div style><br></div><div style>And have it dispatch non-dynamically (my current project is completely dynamic).</div>
<div style><br></div><div style>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.</div>
<div style><br></div><div style>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.</div><div style><br></div><div style>
Black hole appears to do something like this.</div><div style><br></div><div style>My question is, how do I hook into Gambit to compile or interpret after I've transformed the code, preserving line numbers?</div><div style>
<br></div><div style><br></div></div>