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

Re: definer macros



On 4 Jul 2001 21:44:33 -0700, Carl Gay <carlgay@mediaone.net> wrote:
>
> Can anyone tell me why I get "Invalid syntax in responder-definer
> macro call" when I try to use the following macro?  
>
>
> define macro responder-definer
>   { define responder ?:name = ?uri:expression
>         (?request:name, ?stream:name)
>      ?:body
>     end }
>  =>
>   { define method ?name (?request, ?stream) ?body end;
>     register-response-function(?uri, ?name) }
> end;

Try changing 

   { define responder ?:name = ?uri:expression

to 

   { define responder ?:name ?equal:token ?uri:expression

While what you wrote looks like it should be legal according to the
BNF, but I've noticed that GD sometimes has obscure troubles whenever
the '=' token is used in a macro definition. Try changing the
definition to accept any token there and see if it works -- if it does
you can just write your macro calls with '='.


Neel




Follow-Ups: References: