Basic constructor macro for hex-integer-literal structures.
(make-hex-integer-literal [:digits/uscores <digits/uscores>] [:prefix-upcase-p <prefix-upcase-p>] [:suffix? <suffix?>])
This is the usual way to construct hex-integer-literal structures. It simply conses together a structure with the specified fields.
This macro generates a new hex-integer-literal structure from scratch. See also change-hex-integer-literal, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-hex-integer-literal (&rest args) (std::make-aggregate 'hex-integer-literal args '((:digits/uscores) (:prefix-upcase-p) (:suffix?)) 'make-hex-integer-literal nil))
Function:
(defun hex-integer-literal (digits/uscores prefix-upcase-p suffix?) (declare (xargs :guard (and (hexdig/uscore-listp digits/uscores) (booleanp prefix-upcase-p) (optional-integer-type-suffix-p suffix?)))) (declare (xargs :guard (hexdig/uscore-list-wfp digits/uscores))) (let ((__function__ 'hex-integer-literal)) (declare (ignorable __function__)) (b* ((digits/uscores (mbe :logic (hexdig/uscore-list-fix digits/uscores) :exec digits/uscores)) (prefix-upcase-p (mbe :logic (acl2::bool-fix prefix-upcase-p) :exec prefix-upcase-p)) (suffix? (mbe :logic (optional-integer-type-suffix-fix suffix?) :exec suffix?))) (let ((digits/uscores (mbe :logic (if (hexdig/uscore-list-wfp digits/uscores) digits/uscores (list (hexdig/uscore-digit (char-code #\0)))) :exec digits/uscores))) (cons :hex-integer-lit (list digits/uscores prefix-upcase-p suffix?))))))