Matches
(vl-parse-expression-or-dist &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-expression-or-dist-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (let ((__function__ 'vl-parse-expression-or-dist)) (declare (ignorable __function__)) (seq tokstream (expr := (vl-parse-expression)) (when (vl-is-token? :vl-kwd-dist) (:= (vl-match)) (:= (vl-match-token :vl-lcurly)) (dist := (vl-parse-dist-list)) (:= (vl-match-token :vl-rcurly))) (return (make-vl-exprdist :expr expr :dist dist)))))
Theorem:
(defthm vl-parse-expression-or-dist-fails-gracefully (implies (mv-nth 0 (vl-parse-expression-or-dist)) (not (mv-nth 1 (vl-parse-expression-or-dist)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-expression-or-dist (iff (vl-warning-p (mv-nth 0 (vl-parse-expression-or-dist))) (mv-nth 0 (vl-parse-expression-or-dist))))
Theorem:
(defthm vl-parse-expression-or-dist-result (implies (and t) (equal (vl-exprdist-p (mv-nth 1 (vl-parse-expression-or-dist))) (not (mv-nth 0 (vl-parse-expression-or-dist))))))
Theorem:
(defthm vl-parse-expression-or-dist-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-expression-or-dist))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-expression-or-dist))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-expression-or-dist))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))