Matches
(vl-parse-0+-udp-port-declarations &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Uses backtracking to know when to stop, because these can start with arbitrary levels of attributes.
Function:
(defun vl-parse-0+-udp-port-declarations-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (let ((__function__ 'vl-parse-0+-udp-port-declarations)) (declare (ignorable __function__)) (b* ((backup (vl-tokstream-save)) ((mv err first tokstream) (vl-parse-udp-port-declaration)) ((when err) (b* ((tokstream (vl-tokstream-restore backup))) (mv nil nil tokstream))) ((mv & rest tokstream) (vl-parse-0+-udp-port-declarations))) (mv nil (append first rest) tokstream))))
Theorem:
(defthm vl-parse-0+-udp-port-declarations-never-fails (not (mv-nth 0 (vl-parse-0+-udp-port-declarations))))
Theorem:
(defthm vl-parse-0+-udp-port-declarations-result (implies (and (not (mv-nth 0 (vl-parse-0+-udp-port-declarations))) (and t)) (vl-port/vardecllist-p (mv-nth 1 (vl-parse-0+-udp-port-declarations)))))
Theorem:
(defthm vl-parse-0+-udp-port-declarations-true-listp (true-listp (mv-nth 1 (vl-parse-0+-udp-port-declarations))) :rule-classes :type-prescription)
Theorem:
(defthm vl-parse-0+-udp-port-declarations-count-strong-on-value (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-0+-udp-port-declarations))) (vl-tokstream-measure)) (implies (mv-nth 1 (vl-parse-0+-udp-port-declarations)) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-0+-udp-port-declarations))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))