On Wed 20 Oct 2004 15:14, Marc Feeley feeley@IRO.UMontreal.CA writes:
I now include the portable "syntax-case" implementation that has been ported to version 4.0 of the Gambit-C interpreter (it is in misc/syntax-case.scm). To use it start gsi like this:
gsi misc/syntax-case.scm -
You can also rename the file to gambcext.scm and move it to the Gambit installation directory (and even compile it with "gsc -dynamic gambcext.scm" if you wish to speedup macro expansion).
Is there also a syntax-case implementation for the Gambit-C compiler somewhere?
You can add this line to misc/syntax-case.scm:
(define c#wrap-program (lambda (src) (c#expression->source (expand-syntax (##desourcify src)) src)))
If you want to be able to use this with gsc's batch mode, then you should rename syntax-case.scm to gambcext.scm and put that file in the Gambit installation directory. But be aware that source code location tracking will not work. This is why syntax-case.scm is not built into the system by default (if someone can make a clean port of syntax-case to Gambit I'll gladly make it a built-in feature!).
Marc