----- Original Message -----
From: "Lionel Villard" <[EMAIL PROTECTED]>
> Here an example:
>
> void UnaryExpr() #UnaryExpr(cond) :
> {boolean cond=false;}
> {
>   (<Minus>
>               {cond=true; jjtThis.processToken(token);}
>              #Minus(true) | <Plus>
>               {cond=true; jjtThis.processToken(token);}
>              #Plus(true))* UnionExpr()
> }
>
> The "boolean cond=false" statement I know how to generate it by modifying
> the action-exprProduction template.

1) Why can't you override processToken() in UnaryExpr and set "cond" there?
That's how I thought this could be done, but never tried it.

2) More basic question: Why is this production of the form

 ("-" | "+")* UnionExpr

 instead of

 ("-" | "+")? UnionExpr

  I wonder what the meaning of "+-++-10" would be? :-)

-- Santiago


Reply via email to