(vl-parse-module-instance-2005 modname paramargs atts &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-module-instance-2005-fn (modname paramargs atts tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (declare (xargs :guard (and (stringp modname) (vl-paramargs-p paramargs) (vl-atts-p atts)))) (let ((__function__ 'vl-parse-module-instance-2005)) (declare (ignorable __function__)) (seq tokstream (instname := (vl-match-token :vl-idtoken)) (when (vl-is-token? :vl-lbrack) (range := (vl-parse-range))) (:= (vl-match-token :vl-lparen)) (unless (vl-is-token? :vl-rparen) (portargs := (vl-parse-list-of-port-connections))) (:= (vl-match-token :vl-rparen)) (return (make-vl-modinst :loc (vl-token->loc instname) :instname (vl-idtoken->name instname) :modname modname :range range :paramargs paramargs :portargs (or portargs (make-vl-arguments-plain :args nil)) :atts atts)))))
Theorem:
(defthm vl-parse-module-instance-2005-fails-gracefully (implies (mv-nth 0 (vl-parse-module-instance-2005 modname paramargs atts)) (not (mv-nth 1 (vl-parse-module-instance-2005 modname paramargs atts)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-module-instance-2005 (iff (vl-warning-p (mv-nth 0 (vl-parse-module-instance-2005 modname paramargs atts))) (mv-nth 0 (vl-parse-module-instance-2005 modname paramargs atts))))
Theorem:
(defthm vl-parse-module-instance-2005-result (implies (and (and (force (stringp modname)) (force (vl-paramargs-p paramargs)) (force (vl-atts-p atts)))) (equal (vl-modinst-p (mv-nth 1 (vl-parse-module-instance-2005 modname paramargs atts))) (not (mv-nth 0 (vl-parse-module-instance-2005 modname paramargs atts))))))
Theorem:
(defthm vl-parse-module-instance-2005-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-module-instance-2005 modname paramargs atts))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-module-instance-2005 modname paramargs atts))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-module-instance-2005 modname paramargs atts))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))