[antlr-interest] Nondeterminism error for high rules

mzukowski at yci.com mzukowski at yci.com
Thu Mar 13 08:15:26 PST 2003


Using syntactic predicates:

command_or_definition
		:	(command)=>command
		|	(definition)=>definition
 		|	syntax_definition
		;

Also be sure to study the generated code to see the lookahead tests which
antlr calculated to decide which alternative to choose.  From there you can
sometimes figure out a simpler syntactic predicate to use.

Monty

-----Original Message-----
From: kyungsunh [mailto:kyungsunh at yahoo.com]
Sent: Wednesday, March 12, 2003 8:45 PM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Nondeterminism error for high rules


Hi,
Antlr continuously shows me the nondeterminism error for high rules. 

For example, 
command_or_definition
		:	command
		|	definition
 		|	syntax_definition
		;
The three alternative rules starts with the same token and further 
some of the subrules also have the same tokens and so on. 
How can I solve this kind of errors?



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list