【发布时间】:2010-01-30 20:02:58
【问题描述】:
有可能做我在这里尝试的事情吗?或者,也许我处理错了?
arrayDef
: { int c = 0; }
('['']' {c++;})+
-> ARRAY /* somehow inject c here */
;
【问题讨论】:
标签: antlr3 abstract-syntax-tree
有可能做我在这里尝试的事情吗?或者,也许我处理错了?
arrayDef
: { int c = 0; }
('['']' {c++;})+
-> ARRAY /* somehow inject c here */
;
【问题讨论】:
标签: antlr3 abstract-syntax-tree
为什么不使用ARRAY 树节点的ChildCount?
arrayDef
: ('[' ']')+
-> ^(ARRAY '['+)
;
【讨论】: