!752

p {
  S rule = "= = idword";
  L<S> lr = splitAtJavaToken(rule, "=");
  print(structure(lr));
  S l, r;
  if (l(lr) == 1) {
    l = "";
    r = lr.get(0);
  } else if (l(lr) >= 2) {
    l = join(" = ", lr.subList(0, l(lr)-1));
    r = last(lr);
  } else {
    print("Weird rule: " + rule);
    ret;
  }
  print(quote(l) + " = " + quote(r));
}