I'm trying to write a grammar to parse an input of format
--
sfasfa af adfa
sfsdfsadfa
--
and this is what I came up with, but it says mismatchedTokenException.
grammar abc;
key : MARK password MARK;
password: char+ ;
char: CHAR;
WS: (' '|'\r'|'\t'|'\u000C'|'\n') {channel=99;};
CHAR: ('a'..'z'|'A'..'Z'|'0'..'9'|'/'|'+'|'='|'_'|'-'|':')*;
MARK : '--';
I want to fetch the password.