UNPKG

@mike-lischke/antlr-tgen

Version:

A generator for antlr-ng runtime test cases

47 lines (34 loc) 432 B
[type] Parser [grammar] grammar T; s @init { <BuildParseTrees()> } @after { <ToStringTree("$ctx"):writeln()> } : '${' v '}' ; v : A #altA | B #altB ; A : 'a' ; B : 'b' ; WHITESPACE : [ \n\t\r]+ -> channel(HIDDEN) ; ERROR : . ; [start] s [input] ${ ? a ?} [output] """(s ${ (v ? a) ? }) """ [errors] line 1:3 extraneous input '?' expecting {'a', 'b'} line 1:7 extraneous input '?' expecting '}' [skip] Cpp Go PHP