[antlr-interest] help with lexical nondeterminism

Terence Parr parrt at jguru.com
Wed Feb 12 23:36:30 PST 2003


Hi.  Please read the section in the manual about lookahead computations  
that go past the end of a token :)

Ter

On Wednesday, February 12, 2003, at 05:27 PM, Alan Oursland wrote:

> Can anyone explain to me why I am getting the following lexical
> nondeterminism nondeterminism warning?
>
> ANTLR Parser Generator   Version 2.7.2   1989-2003 jGuru.com
> sample.g: warning:lexical nondeterminism between rules EXAMPLE1 and  
> EXAMPLE2
> upon
> sample.g:     k==1:'.'
> sample.g:     k==2:';'
> sample.g:     k==3:<end-of-token>
>
> ======================================================================= 
> =
> class SampleLexer extends Lexer;
> options {
> 	k=3;
> }
>
> EXAMPLE1
> 	:	"+;"
> 	|	"..;"
> 	;
> EXAMPLE2
> 	:	".;"
> 	;
> ======================================================================= 
> =
>
> Thank you.
>
> Alan
>
>
>
>
>
> Your use of Yahoo! Groups is subject to  
> http://docs.yahoo.com/info/terms/
>
>
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco


 

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



More information about the antlr-interest mailing list