Parse a
(lex-block-comment abnf::input) → (mv abnf::tree abnf::rest-input)
Function:
(defun lex-block-comment (abnf::input) (declare (xargs :guard (nat-listp abnf::input))) (let ((__function__ 'lex-block-comment)) (declare (ignorable __function__)) (b* (((mv abnf::treess abnf::input) (b* (((mv abnf::treess1 abnf::input1) (b* (((mv abnf::tree abnf::input) (abnf::parse-ichars "/*" abnf::input)) ((when (reserrp abnf::tree)) (mv (fty::reserrf-push abnf::tree) abnf::input)) (abnf::trees1 (list abnf::tree)) ((mv abnf::tree abnf::input) (lex-rest-of-block-comment abnf::input)) ((when (reserrp abnf::tree)) (mv (fty::reserrf-push abnf::tree) abnf::input)) (abnf::trees2 (list abnf::tree)) (abnf::treess (list abnf::trees1 abnf::trees2))) (mv abnf::treess abnf::input))) ((when (not (reserrp abnf::treess1))) (mv abnf::treess1 abnf::input1))) (mv (reserrf (list :found (list abnf::treess1) :required '(((:repetition (:repeat 1 (:finite 1)) (:char-val (:insensitive nil "/*"))) (:repetition (:repeat 1 (:finite 1)) (:rulename (:rulename "rest-of-block-comment"))))))) 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 "block-comment") :branches abnf::treess) abnf::input))))
Theorem:
(defthm tree-resultp-of-lex-block-comment.tree (b* (((mv abnf::?tree abnf::?rest-input) (lex-block-comment abnf::input))) (abnf::tree-resultp abnf::tree)) :rule-classes :rewrite)
Theorem:
(defthm nat-listp-of-lex-block-comment.rest-input (b* (((mv abnf::?tree abnf::?rest-input) (lex-block-comment abnf::input))) (nat-listp abnf::rest-input)) :rule-classes :rewrite)
Theorem:
(defthm len-of-lex-block-comment-<= (b* (((mv abnf::?tree abnf::?rest-input) (lex-block-comment abnf::input))) (<= (len abnf::rest-input) (len abnf::input))) :rule-classes :linear)
Theorem:
(defthm len-of-lex-block-comment-< (b* (((mv abnf::?tree abnf::?rest-input) (lex-block-comment abnf::input))) (implies (not (reserrp abnf::tree)) (< (len abnf::rest-input) (len abnf::input)))) :rule-classes :linear)
Theorem:
(defthm lex-block-comment-of-nat-list-fix-input (equal (lex-block-comment (acl2::nat-list-fix abnf::input)) (lex-block-comment abnf::input)))
Theorem:
(defthm lex-block-comment-nat-list-equiv-congruence-on-input (implies (acl2::nat-list-equiv abnf::input input-equiv) (equal (lex-block-comment abnf::input) (lex-block-comment input-equiv))) :rule-classes :congruence)