[antlr-interest] Nondeterminism problem
Weida Ma
weida_ma at yahoo.com
Fri Dec 12 04:40:40 PST 2003
I am getting a nondeterminism warning with a parser:
definition
: class_decl_or_def | interface_decl_or_def
;
class_id
: "class" IDENTIFIER
;
class_decl_or_def
: (local_qualifier)? class_id
;
interface_id
: "interface" IDENTIFIER
;
interface_decl_or_def
: (local_qualifier)? interface_id
;
local_qualifier
: "local"
;
SliceB.g:38: warning:nondeterminism between alts 1 and 2 of block upon
SliceB.g:38: k==1:"local"
SliceB.g:38: k==2:IDENTIFIER
I think "class" and "interface" should be able to distinguish
class_decl_or_def and interface_decl_or_def when k == 2. But it seems
I am wrong? I'd appreciate any help.
Regards,
Weida
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list