public String byteCodeListToString() { return compiledByteCodeListToString(); }
private String compiledByteCodeListToString() { StringBuilder sb = new StringBuilder("code length: " + codeLength + "\n"); int ncode = -1; int bp = 0; int end = codeLength; while (bp < end) { ncode++; sb.append(ncode % 5 == 0 ? "\n" : " "); bp = compiledByteCodeToString(sb, bp); } sb.append("\n"); return sb.toString(); } }
private void debugMatchLoop() { Config.log.printf("%4d", (s - str)).print("> \""); int q, i; for (i = 0, q = s; i < 7 && q < end && s >= 0; i++) { int len = enc.length(bytes, q, end); while (len-- > 0) { if (q < end) { Config.log.print(new String(bytes, q++, 1)); } } } String str = q < end ? "...\"" : "\""; q += str.length(); Config.log.print(str); for (i = 0; i < 20 - (q - s); i++) Config.log.print(" "); StringBuilder sb = new StringBuilder(); new ByteCodePrinter(regex).compiledByteCodeToString(sb, ip); Config.log.println(sb.toString()); } }
case OPCode.ANYCHAR_STAR_PEEK_NEXT: case OPCode.ANYCHAR_ML_STAR_PEEK_NEXT: pString(sb, 1, bp++); break; pString(sb, 2, bp); bp += 2; break; pString(sb, 3, bp); bp += 3; break; pString(sb, 4, bp); bp += 4; break; pString(sb, 5, bp); bp += 5; break; idx = code[bp]; bp += OPSize.INDEX; pLenStringFromTemplate(sb, len, 1, templates[tm], idx); } else { pLenString(sb, len, 1, bp); pString(sb, 2, bp); bp += 2;
private void debugMatchLoop() { Config.log.printf("%4d", (s - str)).print("> \""); int q, i; for (i = 0, q = s; i < 7 && q < end && s >= 0; i++) { int len = enc.length(bytes, q, end); while (len-- > 0) { if (q < end) { Config.log.print(new String(bytes, q++, 1)); } } } String str = q < end ? "...\"" : "\""; q += str.length(); Config.log.print(str); for (i = 0; i < 20 - (q - s); i++) Config.log.print(" "); StringBuilder sb = new StringBuilder(); new ByteCodePrinter(regex).compiledByteCodeToString(sb, ip); Config.log.println(sb.toString()); } }
case OPCode.ANYCHAR_STAR_PEEK_NEXT: case OPCode.ANYCHAR_ML_STAR_PEEK_NEXT: pString(sb, 1, bp++); break; pString(sb, 2, bp); bp += 2; break; pString(sb, 3, bp); bp += 3; break; pString(sb, 4, bp); bp += 4; break; pString(sb, 5, bp); bp += 5; break; idx = code[bp]; bp += OPSize.INDEX; pLenStringFromTemplate(sb, len, 1, templates[tm], idx); } else { pLenString(sb, len, 1, bp); pString(sb, 2, bp); bp += 2;
public String byteCodeListToString() { return compiledByteCodeListToString(); }
private String compiledByteCodeListToString() { StringBuilder sb = new StringBuilder("code length: " + codeLength + "\n"); int ncode = -1; int bp = 0; int end = codeLength; while (bp < end) { ncode++; sb.append(ncode % 5 == 0 ? "\n" : " "); bp = compiledByteCodeToString(sb, bp); } sb.append("\n"); return sb.toString(); } }