svoid nlLogic_flexMatch_iterate(S pat, S input, NLLogicChecker_v2.Matching m, onMatch, LinkedHashMap oldMatches) { L tokPat = parse3_cachedPattern(pat), tokInput = parse3_cachedInput(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 (!isDollarVar(t)) varIndices.add(i); else if (isIdentifier(t) && !cicAtOddPosition(tokInput, t)) ret; } LL spreadInputs = ai_spreadCertainIndices(tokPat, tokInput, varIndices); for (L tok : spreadInputs) { SS newMatches = matchDollarVarsIC(pat, tok); if (newMatches != null && addMapToMapWithoutOverwritingIC(m.matches, newMatches)) try { callF(onMatch); } finally { m.matches = oldMatches; } } }