[type]
Parser

[grammar]
grammar T;
@parser::members {<InitIntMember("i","0")>}
s : a+ ;
a : {<SetMember("i","1")>} ID {<MemberEquals("i","1")>}? {<writeln("\"alt 1\"")>}
  | {<SetMember("i","2")>} ID {<MemberEquals("i","2")>}? {<writeln("\"alt 2\"")>}
  ;
ID : 'a'..'z'+ ;
INT : '0'..'9'+;
WS : (' '|'\n') -> skip ;

[start]
s

[input]
x x y

[output]
alt 1
alt 1
alt 1

