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