[Prev][Next][Index][Thread]
Re: Macro loops infinitely --- GD bug?
On Thu, 04 Jan 2001 01:11:48 +0100, "Gabor Greif" <gabor@mac.com> wrote:
> define macro one-definer
> { define one ?:name ?once end }
> => { define constant ?name = list(?once) }
>
> once:
> { ?inner; ... } => { ?inner, ... }
> { ?inner } => { ?inner }
>
> inner:
> { } => { }
> { ?:expression, ... } => { ?expression, ... }
> end macro;
>
>
> define one uff
> 1; 2, 3
> end;
FunDev says:
Serious warning at hello:22-24:
Infinite auxiliary rule recursion in one-definer macro call - treating as
invalid syntax.
hello:21: ---------------
hello:22: define one uff
hello:23: 1; 2, 3
hello:24: end;
hello:25: ---
> define macro one-definer
> { define one ?:name ?once end }
> => { define constant ?name = list(?once) }
>
> once:
> { ?inner } => { ?inner }
> { ?inner; ... } => { ?inner, ... }
>
> inner:
> { } => { }
> { ?:expression, ... } => { ?expression, ... }
> end macro;
>
>
> define one uff
> 1; 2, 3
> end;
For this second code fragment FunDev reports:
Serious warning at hello:23:
Invalid syntax for inner in one-definer macro call.
hello:22: -------
hello:23: 1; 2, 3
hello:24: -------
__Jason
Follow-Ups:
References: