sclass MMO2_LinesToPattern implements IF1, S> { bool forceStartOfLine = true; bool forceEndOfLine = true; bool allowTypos = true; public S get(Cl lines) { ret mmo2_combineWithOr(lmap postProcess( uniquifySortedIC(lmap simplifyUsingParse3(lines)))); } S postProcess(S s) { if (!allowTypos) s = joinWithSpace(appendToAll("!", parse3C(s))); if (forceStartOfLine) s = "^" + s; if (forceEndOfLine) s += "$"; ret s; } }