Construct a repetition of zero or more instances of an element.
(*_ x) → repetition
If a rule name is supplied, it is promoted to an element.
The name of this function is inspired by the ABNF notation
Function:
(defun *_ (x) (declare (xargs :guard (element/rulename-p x))) (b* ((element (if (elementp x) x (element-rulename x))) (range (make-repeat-range :min 0 :max (nati-infinity)))) (make-repetition :range range :element element)))
Theorem:
(defthm repetitionp-of-*_ (b* ((repetition (*_ x))) (repetitionp repetition)) :rule-classes :rewrite)