static L gazelle_getChildren_withContinuations(GazelleTree tree, O... _) { L l = gazelle_getChildren(tree, _); bool debug = boolPar debug(_) || boolPar debugContinuations(_); new Matches m; bool changes = false; for i over l: { GazelleTree t = l.get(i); continue unless eq(t.lineType, 'instruction) && match("continue with line * of rule * without variables", t.line, m); if (debug) print("Processing continuation: " + sfu(m)); S ruleID = $2; RuleEngine2.Rule rule = t.ctx.engine.getRule(ruleID); if (rule == null) { print("Follow-up rule not found: " + ruleID); continue with l.remove(i--); } set changes; t.mr.rule = rule; t.mr.iCond = parseInt($1)-1; t.mr.map = ciMap(); // TODO: remainingConditions? if (!t.mr.moreConditions()) { t.line = rule.out; t.lineType = rule.outType(); } gazelle_addPredictionToTreeNode(t); } if (changes) gazelle_sortChildren(l); ret l; }