chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Runtime syntax-case macros


From: mark
Subject: Re: [Chicken-users] Runtime syntax-case macros
Date: Sat, 8 Sep 2007 20:15:26 +0200 (CEST)
User-agent: SquirrelMail/1.4.10a

> You first have to create a statically linkable version of the
> syntax-case extension,
> by compiling the file syntax-case.scm (in a directory containing the
> extracted egg files and after running chicken-setup -n to generate a
> required include file) like this:
>
> csc -c -O2 -d0 -unit syntax-case syntax-case.scm
>
> This will generate an .o file that you can link with your application.
> Add "(declare (uses syntax-case))" to your application and compile it
> (don't forget to add syntax-case.o when linking - just pass it to csc).
>
> Then have syntax-case-chicken-macros.scm in the same directory when
> executing your program. Your own macros can be either loaded from a file
> ("load"), evaluated explicitly ("(eval '(define-syntax ...))") or loaded
> from a compiled-in string:
>
> (load (open-input-string #<<EOF
> (define-syntax ...
>
> EOF
> ) )

Awesome! Thanks a lot.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]