[antlr-interest] Please enlighten a new user..
Mike Feldmeier
mfeldmeier at metadata.com
Fri Dec 23 10:43:55 PST 2005
Greetings,
I have been using ANTLR for about three days now. I have read the reference guide and two tutorials, but I still don’t understand this problem. Note I said “read” and not necessary “understand”.
Given the following rules:
class TestLexer extends Lexer;
options
{
k = 5;
}
A: "data";
B: "database" | "by";
I get the following warning (it seems to work, I just despise warnings):
test.g: warning:lexical nondeterminism between rules A and B upon
test.g: k==1:'d'
test.g: k==2:'a'
test.g: k==3:'t'
test.g: k==4:'a'
test.g: k==5:<end-of-token>
Interestingly, if I take out the ‘| “by”’ from rule B, the warning disappears.
Am I just being blatantly new? I see no reason why this should happen from what I’ve read. Could someone explain this, or point to a specific place in documentation that explains this?
Thanks,
Mike
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.5/212 - Release Date: 12/23/2005
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20051223/0f99abe5/attachment.html
More information about the antlr-interest
mailing list