Parse a
(vl-parse-subroutine-call-statement atts &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Grammar rules. Note that QUOTE means literally a quote character here.
subroutine_call_statement ::= subroutine_call ';' | 'void' QUOTE '(' function_subroutine_call ')' ';' function_subroutine_call ::= subroutine_call
Function:
(defun vl-parse-subroutine-call-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-subroutine-call-statement)) (declare (ignorable __function__)) (if (vl-is-token? :vl-kwd-void) (seq tokstream (:= (vl-match)) (:= (vl-match-token :vl-quote)) (:= (vl-match-token :vl-lparen)) (inner := (vl-parse-subroutine-call)) (:= (vl-match-token :vl-rparen)) (:= (vl-match-token :vl-semi)) (return (b* (((vl-callstmt inner)) (atts (append atts inner.atts))) (change-vl-callstmt inner :voidp t :atts atts)))) (seq tokstream (inner := (vl-parse-subroutine-call)) (:= (vl-match-token :vl-semi)) (return (b* (((vl-callstmt inner)) (atts (append atts inner.atts))) (change-vl-callstmt inner :atts atts)))))))
Theorem:
(defthm vl-parse-subroutine-call-statement-fails-gracefully (implies (mv-nth 0 (vl-parse-subroutine-call-statement atts)) (not (mv-nth 1 (vl-parse-subroutine-call-statement atts)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-subroutine-call-statement (iff (vl-warning-p (mv-nth 0 (vl-parse-subroutine-call-statement atts))) (mv-nth 0 (vl-parse-subroutine-call-statement atts))))
Theorem:
(defthm vl-parse-subroutine-call-statement-result (implies (and (force (vl-atts-p atts))) (equal (vl-stmt-p (mv-nth 1 (vl-parse-subroutine-call-statement atts))) (not (mv-nth 0 (vl-parse-subroutine-call-statement atts))))))
Theorem:
(defthm vl-parse-subroutine-call-statement-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-subroutine-call-statement atts))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-subroutine-call-statement atts))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-subroutine-call-statement atts))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))