(vl-parse-param-or-localparam-declaration-2005 atts types &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-param-or-localparam-declaration-2005-fn (atts types tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (declare (xargs :guard (and (vl-atts-p atts) (true-listp types) (subsetp types '(:vl-kwd-parameter :vl-kwd-localparam))))) (let ((__function__ 'vl-parse-param-or-localparam-declaration-2005)) (declare (ignorable __function__)) (seq tokstream (start := (vl-match-some-token types)) (when (vl-is-some-token? '(:vl-kwd-integer :vl-kwd-real :vl-kwd-realtime :vl-kwd-time)) (type := (vl-match)) (decls := (vl-parse-list-of-param-assignments atts (eq (vl-token->type start) :vl-kwd-localparam) (make-vl-explicitvalueparam :type (case (vl-token->type type) (:vl-kwd-integer *vl-plain-old-integer-type*) (:vl-kwd-real *vl-plain-old-real-type*) (:vl-kwd-realtime *vl-plain-old-realtime-type*) (:vl-kwd-time *vl-plain-old-time-type*))))) (return decls)) (when (vl-is-token? :vl-kwd-signed) (signed := (vl-match))) (when (vl-is-token? :vl-lbrack) (range := (vl-parse-range))) (decls := (vl-parse-list-of-param-assignments atts (eq (vl-token->type start) :vl-kwd-localparam) (mbe :logic (cond ((and (not signed) (not range)) (make-vl-implicitvalueparam :range nil :sign nil)) ((not signed) (make-vl-implicitvalueparam :range range :sign nil)) ((not range) (make-vl-implicitvalueparam :range nil :sign :vl-signed)) (t (make-vl-implicitvalueparam :range range :sign :vl-signed))) :exec (make-vl-implicitvalueparam :range range :sign (and signed :vl-signed))))) (return decls))))
Theorem:
(defthm vl-parse-param-or-localparam-declaration-2005-fails-gracefully (implies (mv-nth 0 (vl-parse-param-or-localparam-declaration-2005 atts types)) (not (mv-nth 1 (vl-parse-param-or-localparam-declaration-2005 atts types)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-param-or-localparam-declaration-2005 (iff (vl-warning-p (mv-nth 0 (vl-parse-param-or-localparam-declaration-2005 atts types))) (mv-nth 0 (vl-parse-param-or-localparam-declaration-2005 atts types))))
Theorem:
(defthm vl-parse-param-or-localparam-declaration-2005-result (implies (and (and (force (vl-atts-p atts)) (force (true-listp types)) (force (subsetp types '(:vl-kwd-parameter :vl-kwd-localparam))))) (vl-paramdecllist-p (mv-nth 1 (vl-parse-param-or-localparam-declaration-2005 atts types)))))
Theorem:
(defthm vl-parse-param-or-localparam-declaration-2005-true-listp (true-listp (mv-nth 1 (vl-parse-param-or-localparam-declaration-2005 atts types))) :rule-classes :type-prescription)
Theorem:
(defthm vl-parse-param-or-localparam-declaration-2005-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-param-or-localparam-declaration-2005 atts types))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-param-or-localparam-declaration-2005 atts types))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-param-or-localparam-declaration-2005 atts types))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))