[antlr-interest] Lexer error?

Monty Zukowski monty at codetransform.com
Mon Aug 2 09:36:30 PDT 2004


In the lexer common prefixes must be factored into the same rule.

Monty

On Aug 2, 2004, at 8:31 AM, Joan Pujol wrote:

> It's very strange.
> I don't know if I forget something but this doesn't work for me:
>
> class LexerAnalyzer extends Lexer;
>
> options {
> k=2;
> }
>
>
>
> OPMINOROREQUAL:"<=";
> ASSIGN:	":="|"<-";
>
> Antlr give me this error message:
>
> ANTLR Parser Generator   Version 2.7.4   1989-2004 jGuru.com
>  gramàtiques\lèxic.g: warning:lexical nondeterminism between rules
> OPMINOROREQUAL and ASSIGN upon
> gramàtiques\lèxic.g:     k==1:'<'
> gramàtiques\lèxic.g:     k==2:'='
>
>
> I have lookahead of two symbols, isn't it. I don't know because the
> Lexer has a nondeterminism.
>
> Cheers,
>
>
> -- 
> Joan Jesús Pujol Espinar
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list