[antlr-interest] How to walk a tree with an imaginary root

=?gb2312?q?=CB=EF=BC=CD=B8=D5=20Jigang=20(Robert)=20Sun?= sunjigang1965 at yahoo.com.cn
Thu Jun 15 04:41:12 PDT 2006


Hi all,

In parser, to build a tree,

ruleAlt!
    :
    l:graph {##=#([RULE_ALT,"ruleAlt"],l);}
    ;

In tree walker,

ruleAlt
    :     
    RULE_ALT graph 
    ;

got a tree has only "ruleAlt" node without any child, 
runtime error: <AST>: unexpected end of subtree.

Could you help?

Jigang


__________________________________________________
¸Ï¿ì×¢²áÑÅ»¢³¬´óÈÝÁ¿Ãâ·ÑÓÊÏä?
http://cn.mail.yahoo.com


More information about the antlr-interest mailing list