(vl-parse-variable-type &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-variable-type-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (let ((__function__ 'vl-parse-variable-type)) (declare (ignorable __function__)) (seq tokstream (id := (vl-match-token :vl-idtoken)) (when (vl-is-token? :vl-equalsign) (:= (vl-match)) (expr := (vl-parse-expression)) (return (make-vl-vardeclassign :id (vl-idtoken->name id) :dims nil :expr expr))) (arrdims := (vl-parse-0+-ranges)) (return (make-vl-vardeclassign :id (vl-idtoken->name id) :dims arrdims :expr nil)))))
Theorem:
(defthm vl-parse-variable-type-fails-gracefully (implies (mv-nth 0 (vl-parse-variable-type)) (not (mv-nth 1 (vl-parse-variable-type)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-variable-type (iff (vl-warning-p (mv-nth 0 (vl-parse-variable-type))) (mv-nth 0 (vl-parse-variable-type))))
Theorem:
(defthm vl-parse-variable-type-result (implies (and t) (equal (vl-vardeclassign-p (mv-nth 1 (vl-parse-variable-type))) (not (mv-nth 0 (vl-parse-variable-type))))))
Theorem:
(defthm vl-parse-variable-type-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-variable-type))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-variable-type))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-variable-type))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))