@mike-lischke/antlr-tgen
Version:
A generator for antlr-ng runtime test cases
33 lines (26 loc) • 283 B
Plain Text
[type]
Parser
[grammar]
grammar T;
s
<BuildParseTrees()>
}
<ToStringTree("$r.ctx"):writeln()>
}
: r=a ;
a : 'x' 'y'* '!'
;
Z : 'z'
;
[start]
s
[input]
xzyy!
[output]
"""(a x z y y !)
"""
[errors]
"""line 1:1 extraneous input 'z' expecting {'y', '!'}
"""