Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有可能做我在这里尝试的事情吗?或者,也许我接近它错了?
arrayDef : { int c = 0; } ('['']' {c++;})+ -> ARRAY /* somehow inject c here */ ;
为什么不使用ChildCount你的ARRAY树节点?
ChildCount
ARRAY
arrayDef : ('[' ']')+ -> ^(ARRAY '['+) ;