[antlr-interest] ambiguous lexer rules

Christoph Beckmeyer chrisb at ewetel.net
Thu Jul 19 03:12:14 PDT 2007


I have a problem with the overlapping rules  ID and  INT. I tried to  
solve it in multiple ways but none of them resulted in success.
Can somebody give me a hint how to handle this.

grammar Test;
ID		: 	'10';
INT		: DIGIT+;
fragment DIGIT	:	'0'..'9';
SEP_L1		:	';';
SEP_L2		:	',';		
field	: ID SEP_L2 INT SEP_L1;


Regards, Christoph Beckmeyer


More information about the antlr-interest mailing list