[antlr-interest] RE RE: I wish a dummy tree...
=?gb2312?q?=CB=EF=BC=CD=B8=D5=20Jigang=20(Robert)=20Sun?=
sunjigang1965 at yahoo.com.cn
Wed Feb 22 13:42:12 PST 2006
Thanks a lot, Michael & Bryan!
Youe are very helpful. I constructed a another tree,
formalList, by following your method:
formalList
:
(formal ( COMMA! formal)* { ## =
#(#[FORMAL_LIST,"fORMAL_LIST"],##); })?
;
formal!
: dt:dataType id:ID<AST=MiniJava.Identifier>
{
## = #( #[MINI_JAVA_FORMAL, "MINI_JAVA_FORMAL"],
#dt, #id );
}
;
tokens
{
MINI_JAVA_FORMAL <AST=MiniJava.Formal>;
FORMAL_LIST <AST=MiniJava.FormalList>;
}
___________________________________________________________
ÇéÈ˽ڣ¬ÓÃÑÅ»¢ÓÊÏäËÍõ¹å£¡
More information about the antlr-interest
mailing list