(vl-parse-scopename &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-scopename-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (let ((__function__ 'vl-parse-scopename)) (declare (ignorable __function__)) (seq tokstream (when (vl-is-token? :vl-kwd-local) (:= (vl-match)) (return :vl-local)) (when (vl-is-token? :vl-$unit) (:= (vl-match)) (return :vl-$unit)) (id := (vl-match-token :vl-idtoken)) (return (vl-idtoken->name id)))))
Theorem:
(defthm vl-parse-scopename-fails-gracefully (implies (mv-nth 0 (vl-parse-scopename)) (not (mv-nth 1 (vl-parse-scopename)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-scopename (iff (vl-warning-p (mv-nth 0 (vl-parse-scopename))) (mv-nth 0 (vl-parse-scopename))))
Theorem:
(defthm vl-parse-scopename-result (implies (and t) (equal (vl-scopename-p (mv-nth 1 (vl-parse-scopename))) (not (mv-nth 0 (vl-parse-scopename))))))
Theorem:
(defthm vl-parse-scopename-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-scopename))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-scopename))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-scopename))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))