Warning: session_start(): open(/var/lib/php/sessions/sess_7bfvcn3kd6kekl12mpdu0oaapf, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
sbool matchDoubleRest(S pat, S s) {
ret matchDoubleRest(pat, s, null);
}
// matches are as you expect, plus an extra item for half of the rest string
sbool matchDoubleRest(S pat, S s, Matches matches) {
if (s == null) false;
ret matchDoubleRest(pat, parse3_cachedInput(s), matches);
}
sbool matchDoubleRest(S pat, LS toks, Matches matches) {
if (toks == null) false;
LS tokpat = parse3_cachedPattern(pat);
int n = toks.size(), nPat = tokpat.size();
if (n <= nPat || odd((n-nPat)/2)) ret false;
int nRest = (n-nPat)/4;
S[] m = match2(tokpat, subList(toks, 0, nPat));
if (m == null) false;
for (int i = nPat; i < n; i += 2)
if (neqic(toks.get(i), toks.get(i+nRest*2)))
false;
if (matches != null) {
matches.m = new S[m.length+1];
arraycopy(m, matches.m);
matches.m[m.length] = joinSubList(toks, nPat, nPat+nRest*2-1); // for Matches.rest()
}
true;
}