private void opAnyChar() { final int n; if (s >= range || s + (n = enc.length(bytes, s, end)) > range || enc.isNewLine(bytes, s, end)) {opFail(); return;} s += n; sprev = sbegin; // break; }
private void opAnyChar() { final int n; if (s >= range || s + (n = enc.length(bytes, s, end)) > range || enc.isNewLine(bytes, s, end)) {opFail(); return;} s += n; sprev = sbegin; // break; }
private static int chomp_newline(byte[] bytes, int p, int e, Encoding enc) { int prev = enc.prevCharHead(bytes, p, e, e); if (enc.isNewLine(bytes, prev, e)) { e = prev; prev = enc.prevCharHead(bytes, p, e, e); if (prev != -1 && EncodingUtils.encAscget(bytes, prev, e, null, enc) == '\r') e = prev; } return e; }
private void opEndLine() { if (s == end) { if (Config.USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE) { if (str == end || !enc.isNewLine(bytes, sprev, end)) { if (isNotEol(msaOptions)) opFail(); } return; } else { if (isNotEol(msaOptions)) opFail(); return; } } else if (enc.isNewLine(bytes, s, end) || (Config.USE_CRNL_AS_LINE_TERMINATOR && enc.isMbcCrnl(bytes, s, end))) { return; } opFail(); }
private void opEndLine() { if (s == end) { if (Config.USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE) { if (str == end || !enc.isNewLine(bytes, sprev, end)) { if (isNotEol(msaOptions)) opFail(); } return; } else { if (isNotEol(msaOptions)) opFail(); return; } } else if (enc.isNewLine(bytes, s, end) || (Config.USE_CRNL_AS_LINE_TERMINATOR && enc.isMbcCrnl(bytes, s, end))) { return; } opFail(); }
private void opBeginLine() { if (s == str) { if (isNotBol(msaOptions)) opFail(); return; } else if (enc.isNewLine(bytes, sprev, end) && s != end) { return; } opFail(); }
private static int chomp_newline(byte[] bytes, int p, int e, Encoding enc) { int prev = enc.prevCharHead(bytes, p, e, e); if (enc.isNewLine(bytes, prev, e)) { e = prev; prev = enc.prevCharHead(bytes, p, e, e); if (prev != -1 && EncodingUtils.encAscget(bytes, prev, e, null, enc) == '\r') e = prev; } return e; }
private void opBeginLine() { if (s == str) { if (isNotBol(msaOptions)) opFail(); return; } else if (enc.isNewLine(bytes, sprev, end) && s != end) { return; } opFail(); }
private void opAnyCharStarPeekNext() { final byte c = (byte)code[ip]; final byte[]bytes = this.bytes; while (s < range) { if (c == bytes[s]) pushAlt(ip + 1, s, sprev, pkeep); int n = enc.length(bytes, s, end); if (s + n > range || enc.isNewLine(bytes, s, end)) {opFail(); return;} sprev = s; s += n; } ip++; sprev = sbegin; // break; }
private void opAnyCharStarPeekNext() { final byte c = (byte)code[ip]; final byte[]bytes = this.bytes; while (s < range) { if (c == bytes[s]) pushAlt(ip + 1, s, sprev, pkeep); int n = enc.length(bytes, s, end); if (s + n > range || enc.isNewLine(bytes, s, end)) {opFail(); return;} sprev = s; s += n; } ip++; sprev = sbegin; // break; }
private void opAnyCharStar() { final byte[]bytes = this.bytes; while (s < range) { pushAlt(ip, s, sprev, pkeep); int n = enc.length(bytes, s, end); if (s + n > range) {opFail(); return;} if (enc.isNewLine(bytes, s, end)) {opFail(); return;} sprev = s; s += n; } }
private void opAnyCharStar() { final byte[]bytes = this.bytes; while (s < range) { pushAlt(ip, s, sprev, pkeep); int n = enc.length(bytes, s, end); if (s + n > range) {opFail(); return;} if (enc.isNewLine(bytes, s, end)) {opFail(); return;} sprev = s; s += n; } }
private void opSemiEndBuf() { if (s == end) { if (Config.USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE) { if (str == end || !enc.isNewLine(bytes, sprev, end)) { if (isNotEol(msaOptions)) opFail(); } return; } else { if (isNotEol(msaOptions)) opFail(); return; } } else if (enc.isNewLine(bytes, s, end) && (s + enc.length(bytes, s, end)) == end) { return; } else if (Config.USE_CRNL_AS_LINE_TERMINATOR && enc.isMbcCrnl(bytes, s, end)) { int ss = s + enc.length(bytes, s, end); ss += enc.length(bytes, ss, end); if (ss == end) return; } opFail(); }
private void opStateCheckAnyCharStar() { int mem = code[ip++]; final byte[]bytes = this.bytes; while (s < range) { if (stateCheckVal(s, mem)) {opFail(); return;} pushAltWithStateCheck(ip, s, sprev, mem, pkeep); int n = enc.length(bytes, s, end); if (s + n > range || enc.isNewLine(bytes, s, end)) {opFail(); return;} sprev = s; s += n; } sprev = sbegin; // break; }
private void opStateCheckAnyCharStar() { int mem = code[ip++]; final byte[]bytes = this.bytes; while (s < range) { if (stateCheckVal(s, mem)) {opFail(); return;} pushAltWithStateCheck(ip, s, sprev, mem, pkeep); int n = enc.length(bytes, s, end); if (s + n > range || enc.isNewLine(bytes, s, end)) {opFail(); return;} sprev = s; s += n; } sprev = sbegin; // break; }
private void opSemiEndBuf() { if (s == end) { if (Config.USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE) { if (str == end || !enc.isNewLine(bytes, sprev, end)) { if (isNotEol(msaOptions)) opFail(); } return; } else { if (isNotEol(msaOptions)) opFail(); return; } } else if (enc.isNewLine(bytes, s, end) && (s + enc.length(bytes, s, end)) == end) { return; } else if (Config.USE_CRNL_AS_LINE_TERMINATOR && enc.isMbcCrnl(bytes, s, end)) { int ss = s + enc.length(bytes, s, end); ss += enc.length(bytes, ss, end); if (ss == end) return; } opFail(); }
if (EncodingUtils.encAscget(strBytes, subend, pend, n, enc) != '\r') n[0] = 0; rslen = n[0] + length(enc, strBytes, subend + n[0], pend); if (enc.isNewLine(strBytes, subend + n[0], pend)) { if (eol == subend) break; subend += rslen;
if (enc.minLength() > 1) { int pp = enc.leftAdjustCharHead(bytes, p, end - enc.minLength(), end); if (enc.isNewLine(bytes, pp, end)) end = pp; pp = end - enc.minLength(); if (pp >= p) {
if (enc.minLength() > 1) { int pp = enc.leftAdjustCharHead(bytes, p, end - enc.minLength(), end); if (enc.isNewLine(bytes, pp, end)) end = pp; pp = end - enc.minLength(); if (pp >= p) {
if (enc.minLength() > 1) { int pp = enc.leftAdjustCharHead(bytes, p, end - enc.minLength(), end); if (enc.isNewLine(bytes, pp, end)) end = pp; pp = end - enc.minLength(); if (pp >= p) {