@mike-lischke/antlr-tgen
Version:
A generator for antlr-ng runtime test cases
35 lines (27 loc) • 547 B
Plain Text
[type]
Parser
[grammar]
grammar T;
s @after {<DumpDFA()>}
: ('$' a | '@' b)+ ;
a : e ID ;
b : e INT ID ;
e : INT | ;
ID : 'a'..'z'+ ;
INT : '0'..'9'+ ;
WS : (' '|'\t'|'\n')+ -> skip ;
[start]
s
[input]
$ 34 abc @ 34 abc
[output]
Decision 2:
s0-INT->s1
s1-ID->:s2^=>1
[errors]
line 1:5 reportAttemptingFullContext d=2 (e), input='34abc'
line 1:2 reportContextSensitivity d=2 (e), input='34'
line 1:14 reportAttemptingFullContext d=2 (e), input='34abc'
line 1:14 reportContextSensitivity d=2 (e), input='34abc'
[flags]
showDiagnosticErrors