(vl-parse-net-declaration atts &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-net-declaration-fn (atts tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (declare (xargs :guard (vl-atts-p atts))) (let ((__function__ 'vl-parse-net-declaration)) (declare (ignorable __function__)) (seq tokstream ((nettype . loc) := (vl-parse-netdecltype)) (when (vl-is-token? :vl-lparen) (strength := (vl-parse-drive-strength-or-charge-strength))) (when (vl-is-some-token? '(:vl-kwd-vectored :vl-kwd-scalared)) (rtype := (vl-match))) (return-raw (b* ((backup (vl-tokstream-save)) ((mv erp type tokstream) (vl-parse-datatype-or-implicit)) ((when erp) (b* ((tokstream (vl-tokstream-restore backup))) (vl-parse-net-declaration-finish nettype loc strength rtype (make-vl-coretype :name :vl-logic) atts))) ((mv erp decl tokstream) (vl-parse-net-declaration-finish nettype loc strength rtype type atts)) ((when erp) (b* ((tokstream (vl-tokstream-restore backup))) (vl-parse-net-declaration-finish nettype loc strength rtype (make-vl-coretype :name :vl-logic) atts)))) (mv erp decl tokstream))))))
Theorem:
(defthm vl-parse-net-declaration-fails-gracefully (implies (mv-nth 0 (vl-parse-net-declaration atts)) (not (mv-nth 1 (vl-parse-net-declaration atts)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-net-declaration (iff (vl-warning-p (mv-nth 0 (vl-parse-net-declaration atts))) (mv-nth 0 (vl-parse-net-declaration atts))))
Theorem:
(defthm vl-parse-net-declaration-result (implies (and (not (mv-nth 0 (vl-parse-net-declaration atts))) (and (force (vl-atts-p atts)))) (and (consp (mv-nth 1 (vl-parse-net-declaration atts))) (vl-assignlist-p (car (mv-nth 1 (vl-parse-net-declaration atts)))) (vl-vardecllist-p (cdr (mv-nth 1 (vl-parse-net-declaration atts)))))))
Theorem:
(defthm vl-parse-net-declaration-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-net-declaration atts))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-net-declaration atts))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-net-declaration atts))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))