Warning: session_start(): open(/var/lib/php/sessions/sess_k1157182oltio44tmmhlj495mn, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
sbool flexMatchIC_iterate_debug;
svoid flexMatchIC_iterate(S pat, S input, VF1 onMatch) {
if (flexMatchIC_iterate_debug)
print("flexMatchIC_iterate " + pat + " / " + input);
L tokPat = javaTokNPunctuation_plusAsterisk(pat), tokInput = javaTokNPunctuation_plusAsterisk(input);
// fail if crucial words not found (could be optimized more)
new L varIndices;
for (int i = 1; i < l(tokPat); i += 2) {
S t = tokPat.get(i);
if (eq(t, "*"))
varIndices.add(i);
else if (isIdentifier(t) && !cicAtOddPosition(tokInput, t)) {
if (flexMatchIC_iterate_debug)
print("Crucial word fail (" + t + "): " + pat + " / " + input);
ret;
}
}
if (flexMatchIC_iterate_debug)
printStructs(+varIndices, +tokPat, +tokInput);
LL spreadInputs = ai_spreadCertainIndices(tokPat, tokInput, varIndices);
for (L tok : spreadInputs) {
if (flexMatchIC_iterate_debug)
print("Testing spread input: " + sfu(tok));
new Matches m;
if (match(pat, tok, m))
callF(onMatch, m);
}
}