I have the following grammar:
SPACE : (' '|'\t'|'\n'|'\r')+ {$channel = HIDDEN;};
NAME_TAG : 'name';
IS_TAG : 'is';
START : 'START';
END : ('END START') => 'END START' ;
WORD : 'A'..'Z'+;
rule : START NAME_TAG IS_TAG WORD END;
and want to parse languages like: "START name is END END START". The problem here is the END-token, because the 'END ' (Word + SPACE) is misinterpreted. I thought the correct approach here would be with the syntactic predicate (END-token) but maybe I am wrong.