[antlr-interest] Case sensitivity

Micheal J open.zone at virgin.net
Fri Apr 29 01:02:59 PDT 2005


>  Hello everbody,
> 
>   Does anybody know if we can apply the case sensitivity to 
> Parser grammar. Actually, I write "caseSensitive=false" in my 
> lexer grammar, then it works. But when i do it in my parser, 
> it does not work. Is there any one who knows how to make it 
> in another way in Parser grammar?

Parsers deal with TokenStreams (not CharacterStreams). Tokens have no "case"
as such since there are essentially just codes (int codes). 

The lexemes attached to a token (e.g. the text of an IDENT token)would have
been dealt with - case-wise - in the lexer.

Cheers,

Micheal



More information about the antlr-interest mailing list