How can I force ANTLR to match the tokens in the "tokens {...}" section case-insensitive?

SANGARRAMU S.K

When you're extending the Lexer, set the options as


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;
}
by
SANGARRAMU.
KAASHYAP RADIANT SYSTEMS LTD,
SANKARA TOWERS
119,RATHAKRISHNAN SALAI
CHENNAI-600004.
TAMILNADU.
INDIA.
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact