sbool flexMatchIC_iterate_debug; sbool flexMatchIC_iterate_useTokenization = true; svoid flexMatchIC_iterate(S pat, S input, VF1 onMatch, O... _) { if (flexMatchIC_iterate_debug) print("flexMatchIC_iterate " + pat + " / " + input); optPar IF1 tokenizer = lambda1 javaTokNPunctuation_plusAsterisk; flexMatchIC_iterate(pat, callTokenizer(tokenizer, pat), callTokenizer(tokenizer, input), onMatch, _); } svoid flexMatchIC_iterate(S pat, LS tokPat, LS tokInput, VF1 onMatch, O... _) { L varIndices = flexMatchIC_getVarIndices(tokPat, tokInput); if (varIndices == null) ret; if (flexMatchIC_iterate_debug) printStructs(+varIndices, +tokPat, +tokInput); ItIt> spreadInputs = ai_spreadCertainIndices_2_iterator(tokPat, tokInput, varIndices); for (LS tok : spreadInputs) { if (flexMatchIC_iterate_debug) print("Testing spread " + sfu(codeTokens(tokPat)) + " with input: " + sfu(codeTokens(tok))); new Matches m; if (flexMatchIC_iterate_useTokenization ? match3(tokPat, tok, m) : match(pat, tok, m)) { if (flexMatchIC_iterate_debug) print("Got match: " + m); callF(onMatch, m); } } }