Parse a
(lex-whitespace-char abnf::input) → (mv abnf::tree abnf::rest-input)
Function:
(defun lex-whitespace-char (abnf::input) (declare (xargs :guard (nat-listp abnf::input))) (let ((__function__ 'lex-whitespace-char)) (declare (ignorable __function__)) (b* (((mv abnf::treess abnf::input) (b* (((mv abnf::treess1 abnf::input1) (b* (((mv abnf::tree abnf::input) (abnf::parse-direct (list 32) abnf::input)) ((when (reserrp abnf::tree)) (mv (fty::reserrf-push abnf::tree) abnf::input)) (abnf::trees1 (list abnf::tree)) (abnf::treess (list abnf::trees1))) (mv abnf::treess abnf::input))) ((when (not (reserrp abnf::treess1))) (mv abnf::treess1 abnf::input1)) ((mv abnf::treess2 abnf::input1) (b* (((mv abnf::tree abnf::input) (abnf::parse-direct (list 9) abnf::input)) ((when (reserrp abnf::tree)) (mv (fty::reserrf-push abnf::tree) abnf::input)) (abnf::trees1 (list abnf::tree)) (abnf::treess (list abnf::trees1))) (mv abnf::treess abnf::input))) ((when (not (reserrp abnf::treess2))) (mv abnf::treess2 abnf::input1)) ((mv abnf::treess3 abnf::input1) (b* (((mv abnf::tree abnf::input) (abnf::parse-direct (list 13) abnf::input)) ((when (reserrp abnf::tree)) (mv (fty::reserrf-push abnf::tree) abnf::input)) (abnf::trees1 (list abnf::tree)) (abnf::treess (list abnf::trees1))) (mv abnf::treess abnf::input))) ((when (not (reserrp abnf::treess3))) (mv abnf::treess3 abnf::input1)) ((mv abnf::treess4 abnf::input1) (b* (((mv abnf::tree abnf::input) (abnf::parse-direct (list 10) abnf::input)) ((when (reserrp abnf::tree)) (mv (fty::reserrf-push abnf::tree) abnf::input)) (abnf::trees1 (list abnf::tree)) (abnf::treess (list abnf::trees1))) (mv abnf::treess abnf::input))) ((when (not (reserrp abnf::treess4))) (mv abnf::treess4 abnf::input1)) ((mv abnf::treess5 abnf::input1) (b* (((mv abnf::tree abnf::input) (abnf::parse-direct (list 12) abnf::input)) ((when (reserrp abnf::tree)) (mv (fty::reserrf-push abnf::tree) abnf::input)) (abnf::trees1 (list abnf::tree)) (abnf::treess (list abnf::trees1))) (mv abnf::treess abnf::input))) ((when (not (reserrp abnf::treess5))) (mv abnf::treess5 abnf::input1))) (mv (reserrf (list :found (list abnf::treess1 abnf::treess2 abnf::treess3 abnf::treess4 abnf::treess5) :required '(((:repetition (:repeat 1 (:finite 1)) (:num-val (:direct (:hex) (32))))) ((:repetition (:repeat 1 (:finite 1)) (:num-val (:direct (:hex) (9))))) ((:repetition (:repeat 1 (:finite 1)) (:num-val (:direct (:hex) (13))))) ((:repetition (:repeat 1 (:finite 1)) (:num-val (:direct (:hex) (10))))) ((:repetition (:repeat 1 (:finite 1)) (:num-val (:direct (:hex) (12)))))))) abnf::input))) ((when (reserrp abnf::treess)) (mv (fty::reserrf-push abnf::treess) (acl2::nat-list-fix abnf::input)))) (mv (abnf::make-tree-nonleaf :rulename? (abnf::rulename "whitespace-char") :branches abnf::treess) abnf::input))))
Theorem:
(defthm tree-resultp-of-lex-whitespace-char.tree (b* (((mv abnf::?tree abnf::?rest-input) (lex-whitespace-char abnf::input))) (abnf::tree-resultp abnf::tree)) :rule-classes :rewrite)
Theorem:
(defthm nat-listp-of-lex-whitespace-char.rest-input (b* (((mv abnf::?tree abnf::?rest-input) (lex-whitespace-char abnf::input))) (nat-listp abnf::rest-input)) :rule-classes :rewrite)
Theorem:
(defthm len-of-lex-whitespace-char-<= (b* (((mv abnf::?tree abnf::?rest-input) (lex-whitespace-char abnf::input))) (<= (len abnf::rest-input) (len abnf::input))) :rule-classes :linear)
Theorem:
(defthm len-of-lex-whitespace-char-< (b* (((mv abnf::?tree abnf::?rest-input) (lex-whitespace-char abnf::input))) (implies (not (reserrp abnf::tree)) (< (len abnf::rest-input) (len abnf::input)))) :rule-classes :linear)
Theorem:
(defthm lex-whitespace-char-of-nat-list-fix-input (equal (lex-whitespace-char (acl2::nat-list-fix abnf::input)) (lex-whitespace-char abnf::input)))
Theorem:
(defthm lex-whitespace-char-nat-list-equiv-congruence-on-input (implies (acl2::nat-list-equiv abnf::input input-equiv) (equal (lex-whitespace-char abnf::input) (lex-whitespace-char input-equiv))) :rule-classes :congruence)