Rename all the occurrences of a rule name in an alternation to a new rule name.
(alternation-rename-rule alternation oldname newname) → new-alternation
Function:
(defun alternation-rename-rule (alternation oldname newname) (declare (xargs :guard (and (alternationp alternation) (rulenamep oldname) (rulenamep newname)))) (cond ((endp alternation) nil) (t (cons (concatenation-rename-rule (car alternation) oldname newname) (alternation-rename-rule (cdr alternation) oldname newname)))))