Parse a
(parse-struct-component-declarations token input) → (mv tree next-token rest-input)
Function:
(defun parse-struct-component-declarations (token input) (declare (xargs :guard (and (abnf::tree-optionp token) (abnf::tree-listp input)))) (let ((__function__ 'parse-struct-component-declarations)) (declare (ignorable __function__)) (b* (((pok< tree) (parse-struct-component-declaration token input)) ((pok trees) (parse-*-comma-struct-component-declaration token input))) (if (token-stringp "," token) (b* (((pok ctree) (parse-symbol "," token input))) (mv (abnf::make-tree-nonleaf :rulename? (abnf::rulename "struct-component-declarations") :branches (list (list tree) trees (list (abnf::make-tree-nonleaf :rulename? nil :branches (list (list ctree)))))) token input)) (mv (abnf::make-tree-nonleaf :rulename? (abnf::rulename "struct-component-declarations") :branches (list (list tree) trees (list (abnf::make-tree-nonleaf :rulename? nil :branches nil)))) token input)))))
Theorem:
(defthm tree-resultp-of-parse-struct-component-declarations.tree (b* (((mv ?tree ?next-token ?rest-input) (parse-struct-component-declarations token input))) (abnf::tree-resultp tree)) :rule-classes :rewrite)
Theorem:
(defthm tree-optionp-of-parse-struct-component-declarations.next-token (b* (((mv ?tree ?next-token ?rest-input) (parse-struct-component-declarations token input))) (abnf::tree-optionp next-token)) :rule-classes :rewrite)
Theorem:
(defthm tree-listp-of-parse-struct-component-declarations.rest-input (b* (((mv ?tree ?next-token ?rest-input) (parse-struct-component-declarations token input))) (abnf::tree-listp rest-input)) :rule-classes :rewrite)
Theorem:
(defthm parsize-of-parse-struct-component-declarations-<= (b* (((mv ?tree ?next-token ?rest-input) (parse-struct-component-declarations token input))) (<= (parsize next-token rest-input) (parsize token input))) :rule-classes :linear)
Theorem:
(defthm parsize-of-parse-struct-component-declarations-< (b* (((mv ?tree ?next-token ?rest-input) (parse-struct-component-declarations token input))) (implies (not (reserrp tree)) (< (parsize next-token rest-input) (parsize token input)))) :rule-classes :linear)
Theorem:
(defthm parse-struct-component-declarations-of-tree-option-fix-token (equal (parse-struct-component-declarations (abnf::tree-option-fix token) input) (parse-struct-component-declarations token input)))
Theorem:
(defthm parse-struct-component-declarations-tree-option-equiv-congruence-on-token (implies (abnf::tree-option-equiv token token-equiv) (equal (parse-struct-component-declarations token input) (parse-struct-component-declarations token-equiv input))) :rule-classes :congruence)
Theorem:
(defthm parse-struct-component-declarations-of-tree-list-fix-input (equal (parse-struct-component-declarations token (abnf::tree-list-fix input)) (parse-struct-component-declarations token input)))
Theorem:
(defthm parse-struct-component-declarations-tree-list-equiv-congruence-on-input (implies (abnf::tree-list-equiv input input-equiv) (equal (parse-struct-component-declarations token input) (parse-struct-component-declarations token input-equiv))) :rule-classes :congruence)