(vl-parse-endblock-name name blktype &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-endblock-name-fn (name blktype tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (declare (xargs :guard (and (stringp name) (stringp blktype)))) (let ((__function__ 'vl-parse-endblock-name)) (declare (ignorable __function__)) (seq tokstream (unless (and (not (eq (vl-loadconfig->edition config) :verilog-2005)) (vl-is-token? :vl-colon)) (return nil)) (:= (vl-match)) (endname := (vl-match-token :vl-idtoken)) (when (equal name (vl-idtoken->name endname)) (return name)) (return-raw (mv (make-vl-warning :type :vl-parse-error :msg "At ~a0: mismatched ~s1 names: ~s2 vs. ~s3." :args (list (vl-token->loc endname) blktype name (vl-idtoken->name endname))) nil tokstream)))))
Theorem:
(defthm vl-parse-endblock-name-fails-gracefully (implies (mv-nth 0 (vl-parse-endblock-name name blktype)) (not (mv-nth 1 (vl-parse-endblock-name name blktype)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-endblock-name (iff (vl-warning-p (mv-nth 0 (vl-parse-endblock-name name blktype))) (mv-nth 0 (vl-parse-endblock-name name blktype))))
Theorem:
(defthm vl-parse-endblock-name-count-weak (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-endblock-name name blktype))) (vl-tokstream-measure)) :rule-classes ((:rewrite) (:linear)))