(vl-parse-event-control &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-event-control-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (let ((__function__ 'vl-parse-event-control)) (declare (ignorable __function__)) (seq tokstream (:= (vl-match-token :vl-atsign)) (when (vl-is-token? :vl-times) (:= (vl-match)) (return (vl-eventcontrol t nil))) (when (vl-is-token? :vl-beginattr) (:= (vl-match)) (:= (vl-match-token :vl-rparen)) (return (vl-eventcontrol t nil))) (unless (vl-is-token? :vl-lparen) (hid := (vl-parse-hierarchical-identifier nil)) (return (vl-eventcontrol nil (list (vl-evatom :vl-noedge (make-vl-index :scope (make-vl-scopeexpr-end :hid hid) :part (make-vl-partselect-none))))))) (:= (vl-match-token :vl-lparen)) (when (vl-is-token? :vl-endattr) (:= (vl-match)) (return (vl-eventcontrol t nil))) (when (vl-is-token? :vl-times) (:= (vl-match)) (:= (vl-match-token :vl-rparen)) (return (vl-eventcontrol t nil))) (atoms := (vl-parse-event-expression)) (:= (vl-match-token :vl-rparen)) (return (vl-eventcontrol nil atoms)))))
Theorem:
(defthm vl-parse-event-control-fails-gracefully (implies (mv-nth 0 (vl-parse-event-control)) (not (mv-nth 1 (vl-parse-event-control)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-event-control (iff (vl-warning-p (mv-nth 0 (vl-parse-event-control))) (mv-nth 0 (vl-parse-event-control))))
Theorem:
(defthm vl-parse-event-control-result (implies (and t) (equal (vl-eventcontrol-p (mv-nth 1 (vl-parse-event-control))) (not (mv-nth 0 (vl-parse-event-control))))))
Theorem:
(defthm vl-parse-event-control-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-event-control))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-event-control))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-event-control))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))