[antlr-interest] warning:lexical nondeterminism between rules VARTYPE and IDENT upon....

clocKwize clockwize at blueyonder.co.uk
Sun Jan 16 14:39:01 PST 2005


hey, in my lexer i have this:

VARTYPE
    options { paraphrase = "a variable type"; }
        :    ("int" | "float" | "string" | "bool")
        ;
       
IDENT
    options { paraphrase = "an identifier"; testLiterals = true; }
        :    ('a'..'z' |'A'..'Z') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*
        ;

MyLexer.g: warning:lexical nondeterminism between rules VARTYPE and 
IDENT upon
MyLexer.g:     k==1:'b','f','i','s'
MyLexer.g:     k==2:'l','n','o','t'

it works ok as far as i know though, i'm not sure how to print a list of 
the tokens from the lexer into the console (cpp)

anyway, how do i turn the warning off?


More information about the antlr-interest mailing list