!include once #1022792 // often-used functions static L gazelle_reason_repeat(S input, O... _) { new L out; int steps = 0, max = 10; while (steps++ < max) { addAll(out, (L) callF(optPar sendToModules(_), input)); L l = gazelle_reasonWithPreAndPost(input, paramsMinus(_, 'sendToModules)); // commit to one entry if (empty(l)) break; gazelle_sortBeforeCommit(l, _); GazelleTree t = first(l); if (boolPar debug(_) || boolPar debugCommit(_)) print("Committing to: " + t.line + " (out of " + l(l) + ")"); LS lines = tok_splitAtPlusAtBeginningOfLine(t.line); if (l(lines) == 2 && t.rule() != null && contains(t.rule().comments, "out 2 = process")) { print("splitting!"); t.line = first(lines); out.add(t); input = second(lines); continue; } out.add(t); break; } ret out; }