(vl-parse-genelement-or-class &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-genelement-or-class-fn (tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (let ((__function__ 'vl-parse-genelement-or-class)) (declare (ignorable __function__)) (seq tokstream (gen :w= (vl-parse-generate)) (when gen (return (list gen))) (atts := (vl-parse-0+-attribute-instances)) (when (or (vl-is-token? :vl-kwd-class) (vl-is-token? :vl-kwd-virtual)) (:= (vl-parse-class-declaration atts)) (return nil)) (items := (vl-parse-modelement-aux atts)) (return (vl-modelementlist->genelements items)))))
Theorem:
(defthm vl-parse-genelement-or-class-fails-gracefully (implies (mv-nth 0 (vl-parse-genelement-or-class)) (not (mv-nth 1 (vl-parse-genelement-or-class)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-genelement-or-class (iff (vl-warning-p (mv-nth 0 (vl-parse-genelement-or-class))) (mv-nth 0 (vl-parse-genelement-or-class))))
Theorem:
(defthm vl-parse-genelement-or-class-result (implies (and t) (vl-genelementlist-p (mv-nth 1 (vl-parse-genelement-or-class)))))
Theorem:
(defthm vl-parse-genelement-or-class-true-listp (true-listp (mv-nth 1 (vl-parse-genelement-or-class))) :rule-classes :type-prescription)
Theorem:
(defthm vl-parse-genelement-or-class-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-genelement-or-class))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-genelement-or-class))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-genelement-or-class))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))