Top level parsing function.
(vl-parse tokens pstate config) → (mv successp items pstate)
Function:
(defun vl-parse (tokens pstate config) (declare (xargs :guard (and (vl-tokenlist-p tokens) (vl-parsestate-p pstate) (vl-loadconfig-p config)))) (let ((__function__ 'vl-parse)) (declare (ignorable __function__)) (b* (((local-stobjs tokstream) (mv okp val pstate tokstream)) (tokstream (vl-tokstream-update-tokens tokens)) (tokstream (vl-tokstream-update-pstate pstate)) ((mv err items tokstream) (vl-parse-source-text)) ((when err) (b* ((tokstream (vl-tokstream-add-warning err)) (pstate (vl-tokstream->pstate))) (mv nil nil pstate tokstream))) (pstate (vl-tokstream->pstate))) (mv t items pstate tokstream))))
Theorem:
(defthm booleanp-of-vl-parse.successp (b* (((mv ?successp ?items ?pstate) (vl-parse tokens pstate config))) (booleanp successp)) :rule-classes :type-prescription)
Theorem:
(defthm vl-descriptionlist-p-of-vl-parse.items (implies (and (force (vl-tokenlist-p tokens)) (force (vl-parsestate-p pstate)) (force (vl-loadconfig-p config))) (b* (((mv ?successp ?items ?pstate) (vl-parse tokens pstate config))) (vl-descriptionlist-p items))) :rule-classes :rewrite)
Theorem:
(defthm vl-parsestate-p-of-vl-parse.pstate (b* (((mv ?successp ?items ?pstate) (vl-parse tokens pstate config))) (vl-parsestate-p pstate)) :rule-classes :rewrite)