UNPKG

@mike-lischke/antlr-tgen

Version:

A generator for antlr-ng runtime test cases

26 lines (19 loc) 416 B
[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>) """