Parse an
(parse-program-declaration token input) → (mv tree next-token rest-input)
Function:
(defun parse-program-declaration (token input) (declare (xargs :guard (and (abnf::tree-optionp token) (abnf::tree-listp input)))) (let ((__function__ 'parse-program-declaration)) (declare (ignorable __function__)) (b* (((pok tree1) (parse-keyword "program" token input)) ((pok tree2) (parse-program-id token input)) ((pok tree3) (parse-symbol "{" token input)) ((pok trees4) (parse-*-program-item token input)) ((pok tree5) (parse-symbol "}" token input))) (mv (abnf::make-tree-nonleaf :rulename? (abnf::rulename "program-declaration") :branches (list (list tree1) (list tree2) (list tree3) trees4 (list tree5))) token input))))
Theorem:
(defthm tree-resultp-of-parse-program-declaration.tree (b* (((mv ?tree ?next-token ?rest-input) (parse-program-declaration token input))) (abnf::tree-resultp tree)) :rule-classes :rewrite)
Theorem:
(defthm tree-optionp-of-parse-program-declaration.next-token (b* (((mv ?tree ?next-token ?rest-input) (parse-program-declaration token input))) (abnf::tree-optionp next-token)) :rule-classes :rewrite)
Theorem:
(defthm tree-listp-of-parse-program-declaration.rest-input (b* (((mv ?tree ?next-token ?rest-input) (parse-program-declaration token input))) (abnf::tree-listp rest-input)) :rule-classes :rewrite)
Theorem:
(defthm parsize-of-parse-program-declaration-<= (b* (((mv ?tree ?next-token ?rest-input) (parse-program-declaration token input))) (<= (parsize next-token rest-input) (parsize token input))) :rule-classes :linear)
Theorem:
(defthm parsize-of-parse-program-declaration-< (b* (((mv ?tree ?next-token ?rest-input) (parse-program-declaration token input))) (implies (not (reserrp tree)) (< (parsize next-token rest-input) (parsize token input)))) :rule-classes :linear)
Theorem:
(defthm parse-program-declaration-of-tree-option-fix-token (equal (parse-program-declaration (abnf::tree-option-fix token) input) (parse-program-declaration token input)))
Theorem:
(defthm parse-program-declaration-tree-option-equiv-congruence-on-token (implies (abnf::tree-option-equiv token token-equiv) (equal (parse-program-declaration token input) (parse-program-declaration token-equiv input))) :rule-classes :congruence)
Theorem:
(defthm parse-program-declaration-of-tree-list-fix-input (equal (parse-program-declaration token (abnf::tree-list-fix input)) (parse-program-declaration token input)))
Theorem:
(defthm parse-program-declaration-tree-list-equiv-congruence-on-input (implies (abnf::tree-list-equiv input input-equiv) (equal (parse-program-declaration token input) (parse-program-declaration token input-equiv))) :rule-classes :congruence)