[antlr-interest] Specific tree node translation

Micheal J open.zone at virgin.net
Fri May 13 10:29:29 PDT 2005


>  Hello,
> 
>  In my tree parser for the translation of "function" to 
> "method", i write the whole tree structure again in the 
> action part like:
> 
>  { #func_def = #(#[METHOD,"method"],id, id2, id3); }
> 
>   but i only want to change the "method" part. How can i do 
> it specifically?

Something like this maybe?

#func_def.setText("method");
#func_def.setType(METHOD);

You will need to play around to get the correct syntax etc.

Micheal



More information about the antlr-interest mailing list