// returns CNC ranges static L fullPhraseCache_tokenRanges(FullPhraseCache cache, LS tok) { new L out; if (cache == null) ret out; for (int i = 1; i < l(tok); i += 2) { int j = fullPhraseCache_longestPhraseLength(cache, tok, i); if (j > i) { out.add(IntRange(i-1, j)); i = j; } } ret out; }