Hello,
I am writing a lexer grammar with Antlr 3.1.3, and I've turned the filter
option turned on and I'm targeting Python. I tried to set the text of a
particular token calling self.setText in an action. The token I wanted to
change is changed, but every token in the stream after that point is also
changed. For example a rule like:
grammar test;
options
{
filter = true;
language = Python;
}
[snip]
ID : '[' i=INT ']' { self.setText($i.text) };
[snip]
Will cause every following lexer rule to have the text of the int. I tried
the Java target, and it worked fine, so I think this is a bug. I can post a
full example if that would help.
Thanks,
Dave
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
-~----------~----~----~----~------~----~------~--~---