[type] Parser [grammar] grammar T; options { contextSuperClass=MyRuleNode; } s @init { } @after { } : r=a ; a : 'f' | 'g' | 'x' b 'z' ; b : 'e' {} | 'y' ; [start] s [input] xyz [output] """(a:3 x (b:2 y) z) """ [skip] Go