[type]
Parser

[grammar]
grammar T;
s
@init {
<BuildParseTrees()>
}
@after {
<ToStringTree("$r.ctx"):writeln()>
}
  : r=a ;
a : ('x' | 'y')* 'z'
  ;

[start]
s

[input]
xyyxyxz

[output]
"""(a x y y x y x z)
"""

