static L tok_groupRoundBrackets(S s) { ret tok_groupRoundBrackets(javaTok(s)); } static L tok_groupRoundBrackets(L tok) { while true { int i = tok.lastIndexOf("("); if (i < 0) ret tok; int j = indexOf(tok, ")", i); if (j < 0) ret tok; tok.set(i, join(subList(tok, i, j+1))); tok.subList(i+1, j+1).clear(); assertTrue(odd(l(tok))); } }