[antlr-interest] Tough non determinism problem

Prashant Deva prashant.deva at gmail.com
Fri Apr 21 10:57:50 PDT 2006


I have a non determinism problem in the following rule.

Increasing k does not seem to work.

Can anyone tell me how to solve this.





STR

: '\'' (~'\'')* '\''

| "\'O\'\'Hagan\'"



;





As you can see I am trying to lex a list of strings.

Its just that one string contains single quotes inside it which are not
escaped.

Since its just 1 string, I have hardcoded it into my program.



But I don't seem to figure out how to bypass the non determinism.



Could anyone help me with this?


--
Prashant Deva
Creator, ANTLR Studio
Founder, Placid Systems, www.placidsystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060421/365a7f4d/attachment.html


More information about the antlr-interest mailing list