[antlr-interest] lexical nondeterminism

Rice Yeh riceyeh at gmail.com
Sat Feb 19 08:19:56 PST 2005


Hi,
  I have the following lexical rules where the longest string 
literial is 3 characters. and i have lookahead set to 5 (actually 3 is
enough for this case), But why there is nondeterminism with message as
 follows:

lexical nondeterminism between alts 1 and 2 of block upon
k==1:'F','M','S' k==2:'A','E','O','U' k==3:'N','T'
k==4:<end-of-token>,'-'


MONTH_OF_YEAR: 
	("JAN" | "FEB" | "MAR" | "APR" | "MAY" | "JUN" | "JUL" | "AUG" |
"SEP" | "OCT" | "NOV" | "DEC")
	;

DAY_OF_WEEK:
	("SUN" | "MON" | "TUE" | "WEN" | "THU" | "FRI" | "SAT")
	;

VALUE	
	:	DAY_OF_WEEK | MONTH_OF_YEAR
	;

Regards,
Rice


More information about the antlr-interest mailing list