Parse a
(vl-parse-system-tf-call &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Original grammar rules:
system_tf_call ::= system_tf_identifier [ '(' list_of_arguments ')' ] | system_tf_identifier [ '(' data_type [ ',' expression ] ')' system_tf_identifier ::= $[a-zA-Z0-9_$]{[a-zA-Z0-9_$]}
Function:
(defun vl-parse-system-tf-call-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (declare (xargs :guard (vl-is-token? :vl-sysidtoken))) (let ((__function__ 'vl-parse-system-tf-call)) (declare (ignorable __function__)) (seq tokstream (fn := (vl-match-token :vl-sysidtoken)) (when (vl-is-token? :vl-lparen) (:= (vl-match)) (unless (vl-is-token? :vl-rparen) (arg1 := (vl-parse-expression-without-failure)) (when (not arg1) (typearg := (vl-parse-simple-type))) (when (vl-is-token? :vl-comma) (:= (vl-match)) (args := (vl-parse-sysfuncall-args)))) (:= (vl-match-token :vl-rparen))) (return (let* ((fname (vl-sysidtoken->name fn)) (id (make-vl-scopeexpr-end :hid (make-vl-hidexpr-end :name fname)))) (make-vl-callstmt :id id :systemp t :typearg typearg :args (if arg1 (cons arg1 args) args) :voidp nil :atts nil :loc (vl-token->loc fn)))))))
Theorem:
(defthm vl-parse-system-tf-call-fails-gracefully (implies (mv-nth 0 (vl-parse-system-tf-call)) (not (mv-nth 1 (vl-parse-system-tf-call)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-system-tf-call (iff (vl-warning-p (mv-nth 0 (vl-parse-system-tf-call))) (mv-nth 0 (vl-parse-system-tf-call))))
Theorem:
(defthm vl-parse-system-tf-call-result (implies (and (force (vl-is-token? :vl-sysidtoken))) (equal (vl-stmt-p (mv-nth 1 (vl-parse-system-tf-call))) (not (mv-nth 0 (vl-parse-system-tf-call))))))
Theorem:
(defthm vl-parse-system-tf-call-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-system-tf-call))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-system-tf-call))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-system-tf-call))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm vl-stmt-kind-of-vl-parse-system-tf-call (b* (((mv err stmt ?tokstream) (vl-parse-system-tf-call))) (implies (not err) (equal (vl-stmt-kind stmt) :vl-callstmt))))