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