[antlr-interest] lexing expression ('a'..'z')+ not matching single character input
Rajesh Menon
prm225 at gmail.com
Wed Dec 13 06:46:50 PST 2006
Hi,
I just tried the following in antlr3:
grammar foo;
substituent
: IDENTIFIER(HYPHEN IDENTIFIER)*
;
HYPHEN
: '-'
;
IDENTIFIER
: ('a'..'z')+
;
As expected, it matches everything defined under ('a'..'z')+ . Nothing
wrong with that part of the grammar. Maybe some other non-terminal
leading upto substituent?
I'd suggest using Antlrworks (http://www.antlr.org/works/index.html)
to help you identify the problem areas in the grammar. Wonderful tool!
Good luck.
On 12/13/06, VAUCHER Laurent <VAUCHER at fermat.eu> wrote:
>
> Didn't you include a charVocabulary in lexer options that would throw
> away characters above 96?
>
> Or an option caseSensitive=false or caseSensitiveLiterals=false?
>
> By the way, what version of ANTLR are you using? 2.7 or 3?
>
>
> Laurent.
>
>
>
More information about the antlr-interest
mailing list