Match
(vl-parse-pva-tail &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Since we start by matching a
We don't actually support parameter value assignments within expressions yet; they'll just cause a parse error.
Function:
(defun vl-parse-pva-tail-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (let ((__function__ 'vl-parse-pva-tail)) (declare (ignorable __function__)) (seq tokstream (:= (vl-match-token :vl-scope)) (head := (vl-match-token :vl-idtoken)) (when (vl-is-token? :vl-pound) (:= (vl-parse-parameter-value-assignment-hack)) (return-raw (vl-parse-error "Implement PVAs."))) (unless (vl-is-token? :vl-scope) (return (make-vl-atom :guts (make-vl-hidpiece :name (vl-idtoken->name head))))) (tail := (vl-parse-pva-tail)) (return (make-vl-nonatom :op :vl-scope :args (list (make-vl-atom :guts (make-vl-hidpiece :name (vl-idtoken->name head))) tail))))))
Theorem:
(defthm vl-parse-pva-tail-fails-gracefully (implies (mv-nth 0 (vl-parse-pva-tail)) (not (mv-nth 1 (vl-parse-pva-tail)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-pva-tail (iff (vl-warning-p (mv-nth 0 (vl-parse-pva-tail))) (mv-nth 0 (vl-parse-pva-tail))))
Theorem:
(defthm vl-parse-pva-tail-result (implies (and t) (equal (vl-expr-p (mv-nth 1 (vl-parse-pva-tail))) (not (mv-nth 0 (vl-parse-pva-tail))))))
Theorem:
(defthm vl-parse-pva-tail-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-pva-tail))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-pva-tail))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-pva-tail))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))