[antlr-interest] Long puzzuled problem "nondeterminism upon"
=?gb2312?q?=CB=EF=BC=CD=B8=D5=20Jigang=20(Robert)=20Sun?=
sunjigang1965 at yahoo.com.cn
Fri May 26 08:13:04 PDT 2006
Hi,
Warning messaged
par.g:92: warning:nondeterminism upon
par.g:92: k==1:DERIVES
par.g:92: between alt 1 and exit branch of block
generated for grammar:
typeExp
:
subTypeExp( DERIVES typeExp)* //line 92, DERIVES stands for "->"
;
subTypeExp
:
(LPAREN typeList)=>LPAREN typeList RPAREN DERIVES typeExp //line 97
|LPAREN typeExp RPAREN
|typeDenotor
;
typeList
:
(typeExp (COMMA typeExp)* )?
;
typeDenotor
:
("int" LSQUARE)=> "int" LSQUARE RSQUARE //int []
| "int"
| id:ID {#typeDenotor=#([ID_TYPE,id.getText()], id); typeDenotor_AST.setPos(id_AST.getPos());}
| "boolean"
;
There is no left recursive problem with the grammar. I am suspicious about line 97, but still have
no idea about it.
Thanks.
___________________________________________________________
ÑÅ»¢Ãâ·ÑÓÊÏä-3.5GÈÝÁ¿£¬20M¸½¼þ
http://cn.mail.yahoo.com/
More information about the antlr-interest
mailing list