Parse a
(vl-parse-disable-statement atts &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Verilog-2005 Syntax:
disable_statement ::= 'disable' hierarchical_identifier ';'
SystemVerilog-2012 extends this to:
disable_statement ::= 'disable' hierarchical_task_identifier ';' disable_statement ::= 'disable' hierarchical_block_identifier ';' disable_statement ::= 'disable' 'fork' ';'
But both of these are just
Function:
(defun vl-parse-disable-statement-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-disable-statement)) (declare (ignorable __function__)) (seq tokstream (:= (vl-match-token :vl-kwd-disable)) (when (and (not (eq (vl-loadconfig->edition config) :verilog-2005)) (vl-is-token? :vl-kwd-fork)) (return-raw (vl-parse-error "BOZO not yet implemented: disable fork ;"))) (id := (vl-parse-hierarchical-identifier nil)) (:= (vl-match-token :vl-semi)) (return (vl-disablestmt (make-vl-scopeexpr-end :hid id) atts)))))
Theorem:
(defthm vl-parse-disable-statement-fails-gracefully (implies (mv-nth 0 (vl-parse-disable-statement atts)) (not (mv-nth 1 (vl-parse-disable-statement atts)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-disable-statement (iff (vl-warning-p (mv-nth 0 (vl-parse-disable-statement atts))) (mv-nth 0 (vl-parse-disable-statement atts))))
Theorem:
(defthm vl-parse-disable-statement-result (implies (and (force (vl-atts-p atts))) (equal (vl-stmt-p (mv-nth 1 (vl-parse-disable-statement atts))) (not (mv-nth 0 (vl-parse-disable-statement atts))))))
Theorem:
(defthm vl-parse-disable-statement-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-disable-statement atts))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-disable-statement atts))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-disable-statement atts))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))