[type]
Parser

[grammar]
grammar T;
s @after {<ToStringTree("$ctx"):writeln()>} : a ;
a : a ID {<False()>}?\<fail='custom message'>
  | ID
  ;
ID : 'a'..'z'+ ;
WS : (' '|'\n') -> skip ;

[start]
s

[input]
x y z

[output]
"""(s (a (a x) y z))
"""

[errors]
"""line 1:4 rule a custom message
"""

