I can put it in java code, but as you said previously, and I agree, if we
can put all the parser logic in the parser itself it's better (faster,
better maintenance).
Lionel
"Santiago
Pericas-Geertsen" To:
<[EMAIL PROTECTED]>, Scott Boag/Cambridge/IBM@Lotus
<Santiago.PericasGeerts cc:
[EMAIL PROTECTED]> Subject: Re: user actions
02/06/2003 09:36 AM
Please respond to
xalan-dev
----- 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
- user actions Lionel Villard
- Re: user actions scott_boag
- Re: user actions Lionel Villard
- Re: user actions Santiago Pericas-Geertsen
- Re: user actions Joseph Kesselman
- Re: user actions Santiago Pericas-Geertsen
- Re: user actions Joseph Kesselman
- Re: user actions Lionel Villard
- Re: user actions Santiago Pericas-Geertsen
