scope gazelle_addVarSplittersToRules. sclass #VarSplitter { S var; bool debug; *() {} *(S *var, bool *debug) {} SS get(SS map, LS tokC, LS tokI, RuleEngine2_MatchedRule matched) { if (map == null) null; S value = map.get(var); LS tok1 = matched.tokenize(var); LS tok2 = matched.tokenize(value); if (debug) print("VarSplitter: " + tok1 + " / " + tok2); if (l(tok1) != l(tok2)) null; for (int i = 1; i < l(tok1); i += 2) if (!strictPutIC(map, tok1.get(i), tok2.get(i))) null; ret map; } } svoid gazelle_addVarSplittersToRules(RuleEngine2 engine, O... _) { new Matches m; for (final RuleEngine2.Rule r : engine.rules) { continue unless jmatchAny("split ", r.comments, m); S var = $1; r.massageMap = new VarSplitter(var, boolPar debug(_)); } } end scope