[notes]
This is a regression test for antlr/antlr4#509 "Incorrect rule chosen in
unambiguous grammar".  https://github.com/antlr/antlr4/issues/509

[type]
Parser

[grammar]
grammar T;
prog
@after {<ToStringTree("$ctx"):writeln()>}
: statement* EOF {};
statement: letterA | statement letterA 'b' ;
letterA: 'a';

[start]
prog

[input]
aa

[output]
"""(prog (statement (letterA a)) (statement (letterA a)) <EOF>)
"""

