Basic constructor macro for regex-repeat structures.
(make-regex-repeat [:pat <pat>] [:min <min>] [:max <max>])
This is the usual way to construct regex-repeat structures. It simply conses together a structure with the specified fields.
This macro generates a new regex-repeat structure from scratch. See also change-regex-repeat, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-regex-repeat (&rest args) (std::make-aggregate 'regex-repeat args '((:pat) (:min) (:max)) 'make-regex-repeat nil))
Function:
(defun regex-repeat (pat min max) (declare (xargs :guard (and (regex-p pat) (natp min) (maybe-natp max)))) (declare (xargs :guard t)) (let ((__function__ 'regex-repeat)) (declare (ignorable __function__)) (b* ((pat (mbe :logic (regex-fix pat) :exec pat)) (min (mbe :logic (nfix min) :exec min)) (max (mbe :logic (maybe-natp-fix max) :exec max))) (cons :repeat (list pat min max)))))