Matches
(vl-parse-ansi-port-declaration atts &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-ansi-port-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-ansi-port-declaration)) (declare (ignorable __function__)) (seq tokstream (dir := (vl-parse-optional-port-direction)) (nettype := (vl-parse-optional-nettype)) (var := (vl-parse-optional-var-kwd)) (return-raw (b* (((when (or dir nettype var)) (vl-parse-ansi-regular-portdecl atts dir nettype var)) ((when (vl-is-token? :vl-kwd-interface)) (vl-parse-error "BOZO implement explicit 'interface' ports.")) (backup (vl-tokstream-save)) ((mv err3 port tokstream) (vl-parse-ansi-interface-portdecl atts)) ((unless err3) (mv nil port tokstream)) (pos3 (vl-tokstream->position)) (tokstream (vl-tokstream-restore backup)) ((mv err port tokstream) (vl-parse-ansi-regular-portdecl atts dir nettype var)) ((unless err) (mv nil port tokstream)) (pos (vl-tokstream->position)) (tokstream (vl-tokstream-restore backup)) ((mv pos err) (vl-choose-parse-error pos err pos3 err3)) (tokstream (vl-tokstream-update-position pos))) (mv err nil tokstream))))))
Theorem:
(defthm vl-parse-ansi-port-declaration-fails-gracefully (implies (mv-nth 0 (vl-parse-ansi-port-declaration atts)) (not (mv-nth 1 (vl-parse-ansi-port-declaration atts)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-ansi-port-declaration (iff (vl-warning-p (mv-nth 0 (vl-parse-ansi-port-declaration atts))) (mv-nth 0 (vl-parse-ansi-port-declaration atts))))
Theorem:
(defthm vl-parse-ansi-port-declaration-result (implies (and (force (vl-atts-p atts))) (equal (vl-ansi-portdecl-p (mv-nth 1 (vl-parse-ansi-port-declaration atts))) (not (mv-nth 0 (vl-parse-ansi-port-declaration atts))))))
Theorem:
(defthm vl-parse-ansi-port-declaration-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-ansi-port-declaration atts))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-ansi-port-declaration atts))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-ansi-port-declaration atts))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))