[antlr-interest] inserting tokens (v2)

ajk . anders43 at gmail.com
Wed Jun 10 01:44:12 PDT 2009


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)

TIA
Anders.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090610/ad4cfbf7/attachment.html 


More information about the antlr-interest mailing list