(vl-parse-level-symbol &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-level-symbol-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (let ((__function__ 'vl-parse-level-symbol)) (declare (ignorable __function__)) (seq tokstream (unless (and (consp (vl-tokstream->tokens)) (vl-udp-level-symbol-token-p (car (vl-tokstream->tokens)))) (return-raw (vl-parse-error "Expected a UDP level symbol."))) (level := (vl-match)) (return (vl-udp-level-symbol-token->interp level)))))
Theorem:
(defthm vl-parse-level-symbol-fails-gracefully (implies (mv-nth 0 (vl-parse-level-symbol)) (not (mv-nth 1 (vl-parse-level-symbol)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-level-symbol (iff (vl-warning-p (mv-nth 0 (vl-parse-level-symbol))) (mv-nth 0 (vl-parse-level-symbol))))
Theorem:
(defthm vl-parse-level-symbol-result (implies (and t) (equal (vl-udpsymbol-p (mv-nth 1 (vl-parse-level-symbol))) (not (mv-nth 0 (vl-parse-level-symbol))))))
Theorem:
(defthm vl-parse-level-symbol-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-level-symbol))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-level-symbol))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-level-symbol))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))