How can I force ANTLR to match the tokens in the "tokens {...}" section case-insensitive?
Created Jan 8, 2001
SANGARRAMU S.K When you're extending the Lexer, set the options as
SANGARRAMU.
KAASHYAP RADIANT SYSTEMS LTD,
SANKARA TOWERS
119,RATHAKRISHNAN SALAI
CHENNAI-600004.
TAMILNADU.
INDIA.
caseSensitive=false; caseSensitiveLiterals=false;Here you must Put All Tokens in LowerCase. EX:
tokens
{
ROSE="rose";
}
class lexerclass extends Lexer;
options {
caseSensitive=false;
caseSensitiveLiterals=false;
}
bySANGARRAMU.
KAASHYAP RADIANT SYSTEMS LTD,
SANKARA TOWERS
119,RATHAKRISHNAN SALAI
CHENNAI-600004.
TAMILNADU.
INDIA.