static L nlLogic_matchAllFacts(S pat, LS facts) { new NLLogicChecker_v2 c; c.facts = facts; ret nlLogic_matchAllFacts(c, pat, new NLLogicChecker_v2.Matching()); } static L nlLogic_matchAllFacts(NLLogicChecker_v2 c, S pat, NLLogicChecker_v2.Matching m) { LS patterns = tok_splitAtVerticalBar(pat); VarMatches m2 = null; new L choices; for (S fact : c.facts) { if (m2 == null) m2 = new VarMatches(m.matches); bool result = nlLogic_matchMultiplePatterns(c, patterns, fact, m2); if (m.verbose) print("matched " + quote(pat) + " with " + quote(fact) + " & " + sfu(m.matches) + " => " + result); if (result) { choices.add(m2); m2 = null; } } ret choices; }