On Feb 26, 2009, at 12:55 PM, Indhu Bharathi wrote:

> Hi,
>
> Suppose I want to do something like this
>
> methodDecl       :               scope t=returnType ident LRAPEN  
> RPAREN
>                                 {
>                                                 insertBefore(t,  
> “something”);
>                                                 or
>                                                 replace(t,  
> “something”);
>                                                 or
>                                                 insertAfter(t,  
> “something”);
>                                 }
>
>
> How can I do this in ANTLR? Note that ‘returnType’ is non-terminal.  
> Also, I don’t want to use tree grammar or string templates. Is this  
> possible with TokenRewriteStream. Is there some documented example  
> in the wiki?
>

Yes, use that class.  easy.  Should be some examples somewhere.

Ter


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to