static L pAttractor_allMatches3(Collection attractors, LS tok) { int i = 0; new L out; while (licensed() && i < l(tok)) { new Lowest best; for (PartialAttractor a : attractors) { a.tok = subList(tok, i); if (a.find()) { if (a.matchedRange.end < 2) continue with print("Bad attractor (empty match): " + a); best.put(shallowClone(a), a.matchedRange.start); } } if (!best.has()) break; // no more matches out.add(best!); i += best->matchedRange.end & ~1; // go to next N token } ret out; }