[antlr-interest] odd nondeterminism

Nigel Sheridan-Smith nbsherid at secsme.org.au
Tue Jan 4 00:36:41 PST 2005



> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Paul J. Lucas
> Sent: Tuesday, 4 January 2005 4:12 PM
> To: ANTLR Interest
> Subject: [antlr-interest] odd nondeterminism
> 
> 	Given:
> 
> 		expr : exprSingle (sortByClause)? ;
> 
> 		sortByClause : SORT BY '(' sortSpec ')' ;
> 
> 	I get:
> 
> 		warning:nondeterminism between alts 1 and 2 of block
> 		upon k==1:SORT
> 
> 	but I don't understand why.  SORT appears nowhere else in the
> 	grammar.
> 


Do you use any recursion? Maybe you can send us more of the grammar, and the
specific line number that is reported... It's difficult to help you without
more information, since you need to see the other possible alternatives.

Nigel 

--
Nigel Sheridan-Smith
PhD research student

Faculty of Engineering
University of Technology, Sydney
Phone: 02 9514 7946
Fax: 02 9514 2435




More information about the antlr-interest mailing list