static Exp nlLogic_applyMatches(Exp e, SS m) { if (e == null) null; if (e cast And) ret And(nlLogic_applyMatches(e.a, m), nlLogic_applyMatches(e.b, m)); if (e cast ExpNot) ret ExpNot(nlLogic_applyMatches(e.a, m)); if (e cast Func) ret Func(e.name, nlLogic_applyMatches(e.arg, m)); if (e cast Sentence) ret Sentence(javaTok(ai_standardReplaceVars(e.text(), m))); if (e cast Sentence2) ret Sentence2(ai_standardReplaceVars(e.text(), m)); ret e; }