Matches
(vl-parse-udp-output-declaration atts &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
udp_output_declaration ::= { attribute_instance } 'output' port_identifier | { attribute_instance } 'output' 'reg' port_identifier [ '=' constant_expression ] ')
But BOZO I don't know what the constant_expression is for, so I don't implement the optional assignment part here.
Function:
(defun vl-parse-udp-output-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-udp-output-declaration)) (declare (ignorable __function__)) (seq tokstream (:= (vl-match-token :vl-kwd-output)) (when (vl-is-token? :vl-kwd-reg) (reg := (vl-match))) (id := (vl-match-token :vl-idtoken)) (when (vl-is-token? :vl-equalsign) (return-raw (vl-parse-error "Assignments to UDP output reg declarations are not currently supported."))) (return (make-vl-portdecl :loc (vl-token->loc id) :name (vl-idtoken->name id) :dir :vl-output :type (if reg *vl-plain-old-reg-type* *vl-plain-old-wire-type*) :atts atts)))))
Theorem:
(defthm vl-parse-udp-output-declaration-fails-gracefully (implies (mv-nth 0 (vl-parse-udp-output-declaration atts)) (not (mv-nth 1 (vl-parse-udp-output-declaration atts)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-udp-output-declaration (iff (vl-warning-p (mv-nth 0 (vl-parse-udp-output-declaration atts))) (mv-nth 0 (vl-parse-udp-output-declaration atts))))
Theorem:
(defthm vl-parse-udp-output-declaration-result (implies (and (force (vl-atts-p atts))) (equal (vl-portdecl-p (mv-nth 1 (vl-parse-udp-output-declaration atts))) (not (mv-nth 0 (vl-parse-udp-output-declaration atts))))))
Theorem:
(defthm vl-parse-udp-output-declaration-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-udp-output-declaration atts))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-udp-output-declaration atts))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-udp-output-declaration atts))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm type-of-vl-parse-udp-output-declaration (b* (((mv err val ?tokstream) (vl-parse-udp-output-declaration atts))) (implies (not err) (let ((type (vl-portdecl->type val))) (or (equal type *vl-plain-old-wire-type*) (equal type *vl-plain-old-reg-type*))))) :rule-classes ((:forward-chaining :trigger-terms ((mv-nth 1 (vl-parse-udp-output-declaration atts))))))