Generate the fifth of the specialized matching predicates.
(deftreeops-gen-cst-list-list-alt-match grammar prefix) → events
Function:
(defun deftreeops-gen-cst-list-list-alt-match (grammar prefix) (declare (xargs :guard (and (common-lisp::symbolp grammar) (common-lisp::symbolp prefix)))) (let ((__function__ 'deftreeops-gen-cst-list-list-alt-match)) (declare (ignorable __function__)) (b* ((cst-list-list-alt-matchp (deftreeops-alt-match-pred prefix)) (cst-list-list-alt-matchp$ (add-suffix-to-fn cst-list-list-alt-matchp "$"))) (cons (cons 'define (cons cst-list-list-alt-matchp$ (cons '((treess tree-list-listp) (alt alternationp)) (cons ':returns (cons '(yes/no booleanp) (cons (cons 'and (cons '(tree-list-list-terminatedp treess) (cons (cons 'tree-list-list-match-alternation-p (cons 'treess (cons 'alt (cons grammar 'nil)))) 'nil))) '(:hooks (:fix)))))))) (cons (cons 'defmacro (cons cst-list-list-alt-matchp (cons '(treess alt) (cons '(declare (xargs :guard (common-lisp::stringp alt))) (cons (cons 'b* (cons (cons '((mv err alt rest) (parse-alternation (string=>nats alt))) (cons (cons '(when err) (cons (cons 'er (cons 'hard (cons (cons 'quote (cons cst-list-list-alt-matchp 'nil)) '("~@0" err)))) 'nil)) (cons (cons '(when (consp rest)) (cons (cons 'er (cons 'hard (cons (cons 'quote (cons cst-list-list-alt-matchp 'nil)) '("Extra: ~s0" (nats=>string rest))))) 'nil)) '((alt (abstract-alternation alt)))))) (cons (cons 'cons (cons (cons 'quote (cons cst-list-list-alt-matchp$ 'nil)) '((cons treess (cons (cons 'quote (cons alt 'nil)) 'nil))))) 'nil))) 'nil))))) (cons (cons 'table (cons 'acl2::macro-aliases-table (cons (cons 'quote (cons cst-list-list-alt-matchp 'nil)) (cons (cons 'quote (cons cst-list-list-alt-matchp$ 'nil)) 'nil)))) 'nil))))))
Theorem:
(defthm pseudo-event-form-listp-of-deftreeops-gen-cst-list-list-alt-match (b* ((events (deftreeops-gen-cst-list-list-alt-match grammar prefix))) (pseudo-event-form-listp events)) :rule-classes :rewrite)