private static boolean multiStopCount(final TrieParserReader reader, final byte[] source, final int sourceMask, short[] localWorkingMultiStops, long maxCapture, final int localSourcePos, short stopValue, int stopCount) { assert(localWorkingMultiStops.length>0); int x = localSourcePos; int lim = maxCapture<=sourceMask ? (int)maxCapture : sourceMask+1; if (stopCount==2 && stopValue!=0) { //special case since this happens very often final short s1 = localWorkingMultiStops[0]; final short s2 = localWorkingMultiStops[1]; //B DEBUG CAPTURE:keep-alive B DEBUG CAPTURE:127.0.0.1 do { short value = source[sourceMask & x++]; if (value==s2) { reader.pos = reader.workingMultiContinue[1]; return assignParseBytesResults(reader, sourceMask, localSourcePos, x); } else if (value==s1) { reader.pos = reader.workingMultiContinue[0]; return assignParseBytesResults(reader, sourceMask, localSourcePos, x); } } while (--lim > 0); reader.localSourcePos =-1; return false; } else { int stopIdx = -1; do { } while ( (-1== (stopIdx=indexOfMatchInArray(source[sourceMask & x++], localWorkingMultiStops, stopCount ))) && (--lim > 0)); return assignParseBytesResults(reader, sourceMask, localSourcePos, x, stopIdx); } }
private static boolean multiStopCount(final TrieParserReader reader, final byte[] source, final int sourceMask, short[] localWorkingMultiStops, long maxCapture, final int localSourcePos, short stopValue, int stopCount) { assert(localWorkingMultiStops.length>0); int x = localSourcePos; int lim = maxCapture<=sourceMask ? (int)maxCapture : sourceMask+1; if (stopCount==2 && stopValue!=0) { //special case since this happens very often final short s1 = localWorkingMultiStops[0]; final short s2 = localWorkingMultiStops[1]; //B DEBUG CAPTURE:keep-alive B DEBUG CAPTURE:127.0.0.1 do { short value = source[sourceMask & x++]; if (value==s2) { reader.pos = reader.workingMultiContinue[1]; return assignParseBytesResults(reader, sourceMask, localSourcePos, x); } else if (value==s1) { reader.pos = reader.workingMultiContinue[0]; return assignParseBytesResults(reader, sourceMask, localSourcePos, x); } } while (--lim > 0); reader.localSourcePos =-1; return false; } else { int stopIdx = -1; do { } while ( (-1== (stopIdx=indexOfMatchInArray(source[sourceMask & x++], localWorkingMultiStops, stopCount ))) && (--lim > 0)); return assignParseBytesResults(reader, sourceMask, localSourcePos, x, stopIdx); } }
return assignParseBytesResults(reader, sourceMask, localSourcePos, x); } else if (value==s1) { reader.pos = reader.workingMultiContinue[0]; return assignParseBytesResults(reader, sourceMask, localSourcePos, x); return assignParseBytesResults(reader, sourceMask, localSourcePos, x, stopIdx);