[antlr-interest] Change type of current AST

Terence Parr parrt at cs.usfca.edu
Fri Jun 6 12:18:01 PDT 2008


Use $ not #
On Jun 6, 2008, at 6:27 AM, Dimitrios Kolovos wrote:

> Hi,
>
> In ANTLR2 I was able to change the type of the current AST like this:
>
> additiveExpression
>   :    multiplicativeExpression ((PLUS^|MINUS^)  
> multiplicativeExpression {#additiveExpression.setType(OPERATOR);})*
>   ;
>
> but I haven't been able to find how to do the same in v3. Any hints?
>
> Cheers,
> Dimitrios



More information about the antlr-interest mailing list