(vl-parse-type-assignment atts localp &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-type-assignment-fn (atts localp tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (declare (xargs :guard (and (vl-atts-p atts) (booleanp localp)))) (let ((__function__ 'vl-parse-type-assignment)) (declare (ignorable __function__)) (seq tokstream (id := (vl-match-token :vl-idtoken)) (when (vl-parsestate-is-user-defined-type-p (vl-idtoken->name id) (vl-tokstream->pstate)) (return-raw (vl-parse-error (cat "Parameter names that shadow types are not supported: " (vl-idtoken->name id))))) (:= (vl-match-token :vl-equalsign)) (type := (vl-parse-datatype)) (return (make-vl-paramdecl :loc (vl-token->loc id) :name (vl-idtoken->name id) :atts atts :localp localp :type (make-vl-typeparam :default type))))))
Theorem:
(defthm vl-parse-type-assignment-fails-gracefully (implies (mv-nth 0 (vl-parse-type-assignment atts localp)) (not (mv-nth 1 (vl-parse-type-assignment atts localp)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-type-assignment (iff (vl-warning-p (mv-nth 0 (vl-parse-type-assignment atts localp))) (mv-nth 0 (vl-parse-type-assignment atts localp))))
Theorem:
(defthm vl-parse-type-assignment-result (implies (and (and (force (vl-atts-p atts)) (force (booleanp localp)))) (equal (vl-paramdecl-p (mv-nth 1 (vl-parse-type-assignment atts localp))) (not (mv-nth 0 (vl-parse-type-assignment atts localp))))))
Theorem:
(defthm vl-parse-type-assignment-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-type-assignment atts localp))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-type-assignment atts localp))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-type-assignment atts localp))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))