@mike-lischke/antlr-tgen
Version:
A generator for antlr-ng runtime test cases
26 lines (19 loc) • 334 B
Plain Text
[notes]
This is a regression test for "Support direct calls to left-recursive
rules". https://github.com/antlr/antlr4/issues/161
[type]
Parser
[grammar]
grammar T;
a @after {<ToStringTree("$ctx"):writeln()>} : a ID
| ID
;
ID : 'a'..'z'+ ;
WS : (' '|'\n') -> skip ;
[start]
a
[input]
x y z
[output]
"""(a (a (a x) y) z)
"""