[type]
Parser

[grammar]
grammar T;

<ImportListener("T")>
<RuleGetterListener("T")>

s
@after {
<ContextMember("$ctx", "r"):ToStringTree():writeln()>
<ContextMember("$ctx", "r"):WalkListener()>
}
  : r=a ;
a : b b        // forces list
  | b      // a list still
  ;
b : ID | INT;
MULT: '*' ;
ADD : '+' ;
INT : [0-9]+ ;
ID  : [a-z]+ ;
WS : [ \t\n]+ -> skip ;

[start]
s

[input]
1 2

[output]
(a (b 1) (b 2))
1 2 1

