UNPKG

@mike-lischke/antlr-tgen

Version:

A generator for antlr-ng runtime test cases

40 lines (29 loc) 329 B
[type] Parser [grammar] grammar T; options { contextSuperClass=MyRuleNode; } <TreeNodeWithAltNumField(X="T")> s @init { <BuildParseTrees()> } @after { <ToStringTree("$r.ctx"):writeln()> } : r=a ; a : 'f' | 'g' | 'x' b 'z' ; b : 'e' {} | 'y' ; [start] s [input] xyz [output] """(a:3 x (b:2 y) z) """ [skip] Go