Match
(vl-parse-reg-declaration atts &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Grammar:
reg_declaration ::= 'reg' [ 'signed' ] [ range ] list_of_variable_identifiers ';'
Function:
(defun vl-parse-reg-declaration-fn (atts tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (declare (xargs :guard (vl-atts-p atts))) (let ((__function__ 'vl-parse-reg-declaration)) (declare (ignorable __function__)) (seq tokstream (kwd := (vl-match-token :vl-kwd-reg)) (when (vl-is-token? :vl-kwd-signed) (:= (vl-match)) (signedp := (mv nil t tokstream))) (when (vl-is-token? :vl-lbrack) (range := (vl-parse-range))) (temps := (vl-parse-list-of-variable-identifiers)) (:= (vl-match-token :vl-semi)) (return (vl-build-vardecls :temps temps :constp nil :varp nil :lifetime nil :type (hons-copy (make-vl-coretype :name :vl-reg :signedp signedp :pdims (if range (list (vl-range->dimension range)) nil))) :atts atts :loc (vl-token->loc kwd))))))
Theorem:
(defthm vl-parse-reg-declaration-fails-gracefully (implies (mv-nth 0 (vl-parse-reg-declaration atts)) (not (mv-nth 1 (vl-parse-reg-declaration atts)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-reg-declaration (iff (vl-warning-p (mv-nth 0 (vl-parse-reg-declaration atts))) (mv-nth 0 (vl-parse-reg-declaration atts))))
Theorem:
(defthm vl-parse-reg-declaration-result (implies (and (force (vl-atts-p atts))) (vl-vardecllist-p (mv-nth 1 (vl-parse-reg-declaration atts)))))
Theorem:
(defthm vl-parse-reg-declaration-true-listp (true-listp (mv-nth 1 (vl-parse-reg-declaration atts))) :rule-classes :type-prescription)
Theorem:
(defthm vl-parse-reg-declaration-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-reg-declaration atts))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-reg-declaration atts))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-reg-declaration atts))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))