static LS tok_splitAtAnyOperator(S s) { ret tok_splitAtAnyOperator(javaTok(s)); } static LS tok_splitAtAnyOperator(LS tok) { new LS l; int i = 1; while ping (i < l(tok)) { S t; int lastI = i, j = i; while (l(t = get(tok, j)) == 1 && !startsWithLetterOrDigit(t)) j += 2; addIfNempty(l, trimJoinSubList(tok, i, j)); i = j; while (j < l(tok) && !(l(t = get(tok, j)) == 1 && !startsWithLetterOrDigit(t))) j += 2; addIfNempty(l, trimJoinSubList(tok, i, j)); i = j; assertTrue("safety", i > lastI); } ret l; }