[antlr-interest] nondeterminism problem
Terence Parr
parrt at jguru.com
Fri Oct 11 21:10:45 PDT 2002
Hi. Just reference "TRUE" and "FALSE" in the parser and the lexer will
automatically test for them :)
Terence
On Friday, October 11, 2002, at 05:51 PM, Jack Hong wrote:
> Hi all,
>
> I get following warning messages when I run ANTLR:
>
> warning: lexical nondeterminism between rules IDENT and
> BOOLEAN_LITERAL upon
> petal.g:0: k==1:'F','T'
> petal.g:0: k==2:'A','R'
> petal.g:0: k==3:'L','U'
>
> related token definitions in my grammar file:
>
> BOOLEAN_LITERAL
> : "TRUE"
> | "FALSE"
> ;
>
> IDENT
> : ( 'a'..'z' | 'A'..'Z' | '_') ( 'a'..'z' | 'A'..'Z' | '_' |
> '0'..'9')*
> ;
>
>
> Any idea of how to fix these two nondeterministic tokens will be
> greatly appreciated.
>
>
> Thanks
> Jack
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--
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