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