[antlr-interest] parsing the string "text"

Mach Ray mach_ray at yahoo.com
Wed Sep 20 08:11:55 PDT 2006


Hello,

I have a rather simple looking problem related to the 
following lexer rule.

NAME_STR: (CAP_LT|SML_LT)
(CAP_LT|SML_LT|DIGIT|'_'|'-'|':'|'/')+
        ;
protected
DIGIT: '0'..'9';

protected
CAP_LT: 'A'..'Z'; 

protected
SML_LT: 'a'..'z';

Whenever the string "text" appears in the input file,
the parser throws the error

: expecting NAME_STR, found ´text´

Can somebody please point out the problem here?

Thanks
Awais

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the antlr-interest mailing list