[antlr-interest] Need help with nondeterminism warning
Prashant Deva
prashant.deva at gmail.com
Thu Apr 14 15:12:03 PDT 2005
Here is the warning-
nondeterminism between alts 1 and 2 of block upon k==1:ACTION
k==2:EOF,"lexclass","class","public","protected","private",DOC_COMMENT,ACTION,TOKEN_REF,RULE_REF
I got this warning after i modified the antlr grammar just a little.
I am pretty bad with parser generation stuff, so could someone pls
tell me what exactly does this warning mean, and is it a possible
sequence at all or not? so do i need to worry about it?
Here is part of the original grammar and a description of the change i made -
classDef : (ACTION)? (DOC_COMMENT)? grammarSpec rules;
grammarSpec :
("lexclass" id |
"class" id "extends" ("Lexer"|"Parser"|"TreeParser")
(superClass)?) SEMI
(optionsSpec)?
(tokensSpec)?
( ACTION )?
;
rules : (rule)+;
I just changed the 'rules' to accept 0 or more rules, thus-
rules : (rule)*;
So i do need to worry about this non determinism warning ?
PRASHANT
More information about the antlr-interest
mailing list