UNPKG

@mike-lischke/antlr-tgen

Version:

A generator for antlr-ng runtime test cases

24 lines (18 loc) 298 B
[type] Parser [grammar] grammar T; start : statement+ ; statement : 'x' | ifStatement; ifStatement : 'if' 'y' statement (|'else' statement) { <writeln("$text")> }; ID : 'a'..'z'+ ; WS : (' '|'\n') -> channel(HIDDEN); [start] start [input] if y if y x else x [output] if y x if y if y x else x