thanks for your fast response and yes, it works now! My LexerATNSimulator::cosume() is now:
void LexerATNSimulator::consume(CharStream *input) {
ssize_t curChar = input->LA(1);
if ((curChar == '\n')
|| (curChar == 0x2028 /*'\u2028'*/)
|| (curChar == 0x2029 /*'\u2029'*/)
|| (curChar == 0x0085 /*'\u0085'*/)
|| (curChar == 0x000C /*'\u000C'*/)) {
_line++;
_charPositionInLine = 0;
} else {
_charPositionInLine++;
}
input->consume();
}
I don't know whether this are all relevant unicode line breaks, string stuff is not really my domain. But anyway, thank You very much for the hint!