[gambit-list] Compiling "post-reader" forms?

Nathan Sorenson takeoutweight at hotmail.com
Fri May 31 12:28:55 EDT 2013


When translating Clojure code to Scheme, I'm finding it quite easy to preserve source code information for the Gambit interpreter, so that when I get exceptions I am notified of the offending Clojure source lines. Is there an obvious way I could do this for compiled code as well? 

Currently, I can emit location-tagged code in the '#(##source2-marker code file locat) form which can be evalled by gsi directly. I expect I may need to write a modified version of gsc which is able to read these forms without adding its own line numbering annotations. Another option is to write a version of gsc with the whole Clojure->Scheme translation process built in.

Basically, I'm expecting to write a variant of gsc with a modified "compile-program" function that does not call the "read-source" function but my own "read-annotated-source" function. I just want to confirm I am not missing a compiler flag or some other method of hooking into gsc's reader.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20130531/1e680345/attachment.htm>


More information about the Gambit-list mailing list