Matches
(vl-parse-optional-timeunits-declaration &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-optional-timeunits-declaration-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (let ((__function__ 'vl-parse-optional-timeunits-declaration)) (declare (ignorable __function__)) (seq tokstream (when (vl-is-token? :vl-kwd-timeunit) (unit1 := (vl-parse-timeunitdecl))) (when (vl-is-token? :vl-kwd-timeprecision) (prec := (vl-parse-timeprecisiondecl))) (when (and (not unit1) (vl-is-token? :vl-kwd-timeunit)) (unit2 := (vl-parse-timeunitdecl))) (return (cons (or unit1 unit2) prec)))))
Theorem:
(defthm vl-parse-optional-timeunits-declaration-fails-gracefully (implies (mv-nth 0 (vl-parse-optional-timeunits-declaration)) (not (mv-nth 1 (vl-parse-optional-timeunits-declaration)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-optional-timeunits-declaration (iff (vl-warning-p (mv-nth 0 (vl-parse-optional-timeunits-declaration))) (mv-nth 0 (vl-parse-optional-timeunits-declaration))))
Theorem:
(defthm vl-parse-optional-timeunits-declaration-result (implies (and (not (mv-nth 0 (vl-parse-optional-timeunits-declaration))) (and t)) (and (consp (mv-nth 1 (vl-parse-optional-timeunits-declaration))) (vl-maybe-timeunitdecl-p (car (mv-nth 1 (vl-parse-optional-timeunits-declaration)))) (vl-maybe-timeprecisiondecl-p (cdr (mv-nth 1 (vl-parse-optional-timeunits-declaration)))))))
Theorem:
(defthm vl-parse-optional-timeunits-declaration-count-weak (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-optional-timeunits-declaration))) (vl-tokstream-measure)) :rule-classes ((:rewrite) (:linear)))