[antlr-interest] How to tell assignment from equal?

me 262 me262c at gmail.com
Tue May 1 21:56:40 PDT 2007


Hi,

  I am having problem with equal "==" and assign "=" in my grammar file.

.......
	ASSIGN		: '='	;
.......
			
	COMPARE :
			( '<'
			| "<="
			| '>'
			| ">="
			| "=="
			| "!="
			);

I get message:

my.g: warning:lexical nondeterminism between rules ASSIGN and COMPARE upon
script.g:     k==1:'='
script.g:     k==2:<end-of-token>

It must be a very common problem.
Thanks in advance!


More information about the antlr-interest mailing list