Matches
(vl-parse-timeunitdecl &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-timeunitdecl-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (let ((__function__ 'vl-parse-timeunitdecl)) (declare (ignorable __function__)) (seq tokstream (kwd := (vl-match-token :vl-kwd-timeunit)) (numerator := (vl-parse-timeliteral)) (when (vl-is-token? :vl-div) (:= (vl-match)) (denominator := (vl-parse-timeliteral))) (:= (vl-match-token :vl-semi)) (return (make-vl-timeunitdecl :loc (vl-token->loc kwd) :numerator numerator :denominator denominator)))))
Theorem:
(defthm vl-parse-timeunitdecl-fails-gracefully (implies (mv-nth 0 (vl-parse-timeunitdecl)) (not (mv-nth 1 (vl-parse-timeunitdecl)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-timeunitdecl (iff (vl-warning-p (mv-nth 0 (vl-parse-timeunitdecl))) (mv-nth 0 (vl-parse-timeunitdecl))))
Theorem:
(defthm vl-parse-timeunitdecl-result (implies (and t) (equal (vl-timeunitdecl-p (mv-nth 1 (vl-parse-timeunitdecl))) (not (mv-nth 0 (vl-parse-timeunitdecl))))))
Theorem:
(defthm vl-parse-timeunitdecl-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-timeunitdecl))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-timeunitdecl))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-timeunitdecl))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))