Top level lexing function.
(vl-lex echars &key warnings config) → (mv successp tokens warnings)
Function:
(defun vl-lex-fn (echars warnings config) (declare (xargs :guard (and (vl-echarlist-p echars) (vl-warninglist-p warnings) (vl-loadconfig-p config)))) (let ((__function__ 'vl-lex)) (declare (ignorable __function__)) (b* ((st (vl-lexstate-init config)) ((mv okp tokens warnings) (vl-lex-main echars t st warnings))) (mv okp tokens warnings))))
Theorem:
(defthm booleanp-of-vl-lex.successp (b* (((mv ?successp ?tokens ?warnings) (vl-lex-fn echars warnings config))) (booleanp successp)) :rule-classes :type-prescription)
Theorem:
(defthm vl-tokenlist-p-of-vl-lex.tokens (implies (force (vl-echarlist-p echars)) (b* (((mv ?successp ?tokens ?warnings) (vl-lex-fn echars warnings config))) (vl-tokenlist-p tokens))) :rule-classes :rewrite)
Theorem:
(defthm vl-warninglist-p-of-vl-lex.warnings (b* (((mv ?successp ?tokens ?warnings) (vl-lex-fn echars warnings config))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-tokenlist->etext-of-vl-lex (b* (((mv okp tokens ?warnings) (vl-lex echars :warnings warnings :config config))) (implies (and okp (force (vl-echarlist-p echars)) (force (true-listp echars))) (equal (vl-tokenlist->etext tokens) echars))))