[antlr-interest] lexical nondeterminism

Peizhao peizhao at itee.uq.edu.au
Mon Aug 21 22:26:13 PDT 2006


follow up the previous email, I changed the rules abit as shown:
=========================================================================
protected ANYSTRING	:  (~('\n'|'\r'))* ('\n'|'\r');
protected WS : (  ' ' | '\t' );

PROPERTYNAME	: '%' ('a'..'z'|'A'..'Z') ('a'..'z'|'A'..'Z'|'0'..'9'|
SPECIALCHAR)* ;
COMMENT : "//" ANYSTRING;
ABSTRACT	:	("ABSTRACT" (WS)+) => ("ABSTRACT" (WS)+) ANYSTRING
	|	('a'..'z'|'A'..'Z') ('a'..'z'|'A'..'Z'|'0'..'9'|SPECIALCHAR)*
{ $setType(VARIABLE_NAME); } ;
=========================================================================

then I got the following warning message:

1	lexical nondeterminism upon k==1:'\t',' ' k==2:'\u0003'..'\u00ff'
k==3:<end-of-token>,'\u0003'..'\u00ff' between alt 1 and exit branch of
block	


anyone can help?


-- 
Regards;

Peizhao



More information about the antlr-interest mailing list