static L gazelle_reason_repeat_v2(S input1, O... _) { int max = 10; new L out; Set seen = litCISet(input1); LinkedList queue = ll_linkedList(input1); while (nempty(queue) && l(seen) < max) { S input = popFirst(queue); addAll(out, (L) callF(optPar sendToModules(_), input)); L l = gazelle_reasonWithPreAndPost(input, paramsMinus(_, 'sendToModules)); // commit to one entry if (empty(l)) continue; gazelle_sortBeforeCommit(l, _); GazelleTree t = first(l); if (boolPar debug(_) || boolPar debugCommit(_)) print("Committing to: " + t.line + " (out of " + l(l) + ")"); RuleEngine2.Rule r = t.rule(); if (r == null || !contains(r.outTypes, "process")) continue with out.add(t); // normal line // separate lines & add to queue LS lines = tok_splitAtPlusAtBeginningOfLine(t.line); for i over lines: { S line = lines.get(i); if (eqGet(r.outTypes, i, "process")) addWithTesterSet(queue, seen, line); else { t.line = line; out.add(t); t = null; } } } ret out; }