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