/** Add another ReplaceRule to the linked list. */
 public void addRule(ReplaceRule r) {
   if (next == null) next = r;
   else next.addRule(r);
 }
 static ReplaceRule add(ReplaceRule head, ReplaceRule adding) {
   if (head == null) return head = adding;
   head.addRule(adding);
   return head;
 }