Parse
(vl-parse-property-spec &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
property_spec ::= [clocking_event] [ 'disable' 'iff' '(' expression_or_dist ')' ] property_expr
Function:
(defun vl-parse-property-spec-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (let ((__function__ 'vl-parse-property-spec)) (declare (ignorable __function__)) (seq tokstream (loc := (vl-current-loc)) (when (vl-is-token? :vl-atsign) (evatoms := (vl-parse-clocking-event))) (when (vl-is-token? :vl-kwd-disable) (:= (vl-match)) (:= (vl-match-token :vl-kwd-iff)) (:= (vl-match-token :vl-lparen)) (exprdist := (vl-parse-expression-or-dist)) (:= (vl-match-token :vl-rparen))) (prop := (vl-parse-property-expr)) (return (make-vl-propspec :evatoms evatoms :disable exprdist :prop prop :loc loc)))))
Theorem:
(defthm vl-parse-property-spec-fails-gracefully (implies (mv-nth 0 (vl-parse-property-spec)) (not (mv-nth 1 (vl-parse-property-spec)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-property-spec (iff (vl-warning-p (mv-nth 0 (vl-parse-property-spec))) (mv-nth 0 (vl-parse-property-spec))))
Theorem:
(defthm vl-parse-property-spec-result (implies (and t) (equal (vl-propspec-p (mv-nth 1 (vl-parse-property-spec))) (not (mv-nth 0 (vl-parse-property-spec))))))
Theorem:
(defthm vl-parse-property-spec-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-property-spec))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-property-spec))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-property-spec))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))