set flag Reparse. //set flag AllowMetaCode. //meta-transform { tok_andVarMixIn } //meta-transform { tok_stages } sclass SharedPhrases_characterMode extends Stages & Var { //*(S...|Cl strings) { addAll(this.strings, strings); } *(S... strings) { addAll(this.strings, strings); } *(Cl strings) { addAll(this.strings, strings); } new LS strings; int minLength = 2; LLS lineSplits; CISet ci; // stage 1. split all the lines stage { lineSplits = stringsToLineCompSplits(strings); } // stage 2. find similarities stage { ci = intersectCISets(lineSplits); } // stage 3. forget the one letter stuff and sort by length (LONG first of course) stage { set(longStrings(ci, minLength)); } get :: before { run(); } // bring together Stages & Var } static LS sharedPhrases_characterMode(S... strings) { ret new SharedPhrases_characterMode(strings)!; }