[antlr-interest] Re: Nondeterministically blind

epovazan epovazan at telus.net
Sat Dec 8 17:33:25 PST 2001

> You didn't include the error message that I could see, but I'm 
> you have a problem in that your string chars can include the quote 
> double-quote chars, which will conflict with the start/end of the 
> string :)
> Good luck,
> Terence

Wow, thank for the speedy reply!
The error is:
ANTLR Parser Generator   Version 2.7.1   1989-2000 jGuru.com
PyLex.g:43: warning: lexical nondeterminism upon
PyLex.g:43:     k==1:'"','\''
PyLex.g:43:     k==2:'"','\''
PyLex.g:43:     k==3:'"','\''
PyLex.g:43:     k==4:'\u0000'..'\u00ff'
PyLex.g:43:     between alts 1 and 2 of block

I modified the STRING_LIT rule as follows and it compiles ok:
    (("'''") | ("\"\"\"")) => LONG_STRING

However the generated code with the warnings looks like it will 
execute correctly too.

It's crazy ... I can do anything except not get nondeterminsm 
warnings. Thanks for a great tool, eventually I will "get it" and the 
rest works for me well (tree parsing is great) An in a few weeks, I 
will have a Python grammar for your collection :)



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

More information about the antlr-interest mailing list