[type]
Parser

[grammar]
grammar T;

stat:   ( '(' expr? ')' )? EOF ;
expr:   ID '=' STR ;

ERR :   '~FORCE_ERROR~' ;
ID  :   [a-zA-Z]+ ;
STR :   '"' ~["]* '"' ;
WS  :   [ \t\r\n]+ -> skip ;

[start]
stat

[input]
"""( ~FORCE_ERROR~ """

[errors]
"""line 1:2 mismatched input '~FORCE_ERROR~' expecting {')', ID}
"""

