ajk . wrote:
> Hi
>
> I am not sure if this is the right way to solve this particular issue 
> but what I have
> is a grammar where I would like to insert tokens inside the token stream
> e.g. finding ']' and '(' I would like to insert '.Invoke' in between 
> i.e. ].Invoke(
>
> Is this somehow possible by manipulating the lexer rules or is this a 
> bad practice
> and should be done on the parser rule level instead?
>
> Example:
>
> D[1]() ==> D[1].Invoke()    (where the string ".Invoke" is always the 
> same and is actually two tokens)
Look at the TokenRewriteStream (there are examples I think), which is 
meant for this.

Jim

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