UNPKG

@mike-lischke/antlr-tgen

Version:

A generator for antlr-ng runtime test cases

33 lines (26 loc) 475 B
[notes] Checks that this compiles; see https://github.com/antlr/antlr4/issues/2016 [type] Parser [grammar] grammar Test; expression @after { <AssertIsList("$args")> } : op=NOT args+=expression | args+=expression (op=AND args+=expression)+ | args+=expression (op=OR args+=expression)+ | IDENTIFIER ; AND : 'and' ; OR : 'or' ; NOT : 'not' ; IDENTIFIER : [a-zA-Z_][a-zA-Z0-9_]* ; WS : [ \t\r\n]+ -> skip ; [start] expression [input] a and b [skip] PHP