[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: loop translations (was: Re: language translator help)
From: |
Eric E Moore |
Subject: |
Re: loop translations (was: Re: language translator help) |
Date: |
Tue, 30 Apr 2002 16:07:38 +0100 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.2 |
Eric E Moore <address@hidden> writes:
> Basically there needs to be a plain identifier before them, that needs
> to appear before the corresponding ... in the replacement. Rather
> than thinking of the pattern think of the pattern <something> ...
This isn't *quite* right, you can have other things besides a plain
identifier, but there still needs to be something before the ... that
contains pattern variables from the pattern. So you can do:
(define-syntax append-one
(syntax-rules ()
((append-one (form ...) ...)
(begin
(form ... 1) ...))))
Which will append 1 to all the forms in the append-one clause, such that:
(append-one (set! x) (+ x 3))
will expand to:
(begin
(set! x 1)
(+ x 3 1))
and have the value of 6.....
Still, my correction to your code is probably what you want :)
> The r5rs description is... less than transparant, I'll grant :)
This still applies ;)
--
Eric E. Moore
pgpialVUFEndf.pgp
Description: PGP signature
- loop translations (was: Re: language translator help), (continued)
- Re: loop translations (was: Re: language translator help), Marius Vollmer, 2002/04/28
- Re: loop translations (was: Re: language translator help), John W. Eaton, 2002/04/28
- Re: loop translations (was: Re: language translator help), Marius Vollmer, 2002/04/28
- Re: loop translations (was: Re: language translator help), Marius Vollmer, 2002/04/28
- Re: loop translations (was: Re: language translator help), Clinton Ebadi, 2002/04/29
- Re: loop translations (was: Re: language translator help), Eric E Moore, 2002/04/29
- Re: loop translations (was: Re: language translator help),
Eric E Moore <=
- Re: loop translations (was: Re: language translator help), Neil Jerram, 2002/04/28
translators and scoping rules (was: Re: language translator help), John W. Eaton, 2002/04/27
Re: translators and scoping rules (was: Re: language translator help), Per Bothner, 2002/04/28
Re: translators and scoping rules (was: Re: language translator help), John W. Eaton, 2002/04/28
Re: translators and scoping rules (was: Re: language translator help), Per Bothner, 2002/04/29
Re: translators and scoping rules (was: Re: language translator help), John W. Eaton, 2002/04/29