sS curlyLevel(S token) {
  if (eq(token, "{")) ret 1;
  if (eq(t, "}")) ret -1;
  ret 0;
}