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