Hoping for some newbie help on the following lexer.
fragment DIGIT: '0'..'9';
fragment LETTER: ('a'..'z'|'A'..'Z');
ID: (LETTER | '.')+ ('.' DIGIT+)?
| DIGIT+
;
The idea is that ID is things like: "foo", "32", "bar.baz", or
"foo.bar.32". However with input "foo.bar.32", I get two tokens,
"foo.bar." and "32". How could I rewrite this so I get a single ID
token, "foo.bar.32"?
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].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=.