[gambit-list] Alexpander

Per Eckerdal per.eckerdal at gmail.com
Thu Mar 11 04:36:08 EST 2010


Oh, the expand-source hooks must return an internal Gambit structure called source. It is used to mark s-expressions with source location information. See _eval.scm for details about it. I don't remember exactly how it works, but here's something that might help you get going:

> (##sourcify '(hej (du)) ##source1-marker)
#(#(source2) (hej (du)) source2 #\u0c09)
> (##sourcify-deep '(hej (du)) ##source1-marker)
#(#(source2) (#(#(source2) hej source2 #\u0c09) #(#(source2) (#(#(source2) du source2 #\u0c09)) source2 #\u0c09)) source2 #\u0c09)
> 

(I'm not sure if it is correct to pass ##source1-marker as the second argument, I don't really remember what it means. I just checked it out real quick.

/Per

11 mar 2010 kl. 10.04 skrev Marco Benelli:

> Thanks James and Per.
> 
> I have already (quickly) tried ##expand-source, resulting in a segmentation fault.
> I will try harder.
> 
> --marco
> 




More information about the Gambit-list mailing list