[antlr-interest] Choosing token

Stefan Chrobot jan_ek at op.pl
Fri May 11 09:15:10 PDT 2007


Hello!

Is there a way other than reordering the rules to tell ANTLRv3 to prefer 
token BOOLEAN instead of IDENTIFIER?

grammar Test;

start	:	BOOLEAN
	|	IDENTIFIER;

IDENTIFIER
	:	('a'..'z'|'A'..'Z'|'0'..'9')+;
	
BOOLEAN	:	'true' | 'false';



Stefan


More information about the antlr-interest mailing list