Verilog-2005 Only. Match
(vl-parse-port-declaration-noatts-2005 atts force-completep &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-port-declaration-noatts-2005-fn (atts force-completep 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 force-completep)))) (let ((__function__ 'vl-parse-port-declaration-noatts-2005)) (declare (ignorable __function__)) (seq tokstream (when (vl-is-token? :vl-kwd-input) (:= (vl-match)) (ans := (vl-parse-basic-port-declaration-tail :vl-input atts force-completep)) (return ans)) (when (vl-is-token? :vl-kwd-inout) (:= (vl-match)) (ans := (vl-parse-basic-port-declaration-tail :vl-inout atts force-completep)) (return ans)) (:= (vl-match-token :vl-kwd-output)) (when (vl-is-token? :vl-kwd-reg) (:= (vl-match)) (ans := (vl-parse-output-reg-port-tail atts)) (return ans)) (when (vl-is-some-token? '(:vl-kwd-integer :vl-kwd-time)) (type := (vl-match)) (ids := (vl-parse-1+-identifiers-separated-by-commas)) (return (vl-make-ports-and-maybe-nets (vl-parsed-port-identifier-list-from-idtokenlist ids) :dir :vl-output :atts atts :complete-p t :type (if (eq (vl-token->type type) :vl-kwd-integer) *vl-plain-old-integer-type* *vl-plain-old-time-type*)))) (ans := (vl-parse-basic-port-declaration-tail :vl-output atts force-completep)) (return ans))))
Theorem:
(defthm vl-parse-port-declaration-noatts-2005-fails-gracefully (implies (mv-nth 0 (vl-parse-port-declaration-noatts-2005 atts force-completep)) (not (mv-nth 1 (vl-parse-port-declaration-noatts-2005 atts force-completep)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-port-declaration-noatts-2005 (iff (vl-warning-p (mv-nth 0 (vl-parse-port-declaration-noatts-2005 atts force-completep))) (mv-nth 0 (vl-parse-port-declaration-noatts-2005 atts force-completep))))
Theorem:
(defthm vl-parse-port-declaration-noatts-2005-result (implies (and (and (force (vl-atts-p atts)) (force (booleanp force-completep)))) (equal (consp (mv-nth 1 (vl-parse-port-declaration-noatts-2005 atts force-completep))) (not (mv-nth 0 (vl-parse-port-declaration-noatts-2005 atts force-completep))))))
Theorem:
(defthm vl-parse-port-declaration-noatts-2005-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-port-declaration-noatts-2005 atts force-completep))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-port-declaration-noatts-2005 atts force-completep))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-port-declaration-noatts-2005 atts force-completep))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm true-listp-of-vl-parse-port-declaration-noatts-2005-1 (true-listp (car (mv-nth 1 (vl-parse-port-declaration-noatts-2005 atts force-completep)))) :rule-classes :type-prescription)
Theorem:
(defthm true-listp-of-vl-parse-port-declaration-noatts-2005-2 (true-listp (cdr (mv-nth 1 (vl-parse-port-declaration-noatts-2005 atts force-completep)))) :rule-classes :type-prescription)
Theorem:
(defthm vl-parse-port-declaration-noatts-2005-basics (and (vl-portdecllist-p (car (mv-nth 1 (vl-parse-port-declaration-noatts-2005 atts force-completep)))) (vl-vardecllist-p (cdr (mv-nth 1 (vl-parse-port-declaration-noatts-2005 atts force-completep))))))