Recognizer for defdefparse-function-spec structures.
(defdefparse-function-spec-p x) → *
Function:
(defun defdefparse-function-spec-p (x) (declare (xargs :guard t)) (let ((__function__ 'defdefparse-function-spec-p)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :rulename)) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((get (std::da-nth 0 (cdr x))) (order (std::da-nth 1 (cdr x)))) (and (common-lisp::stringp get) (pos-listp order))))) ((eq (car x) :group) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((get (std::da-nth 0 (cdr x))) (order (std::da-nth 1 (cdr x)))) (and (alternationp get) (pos-listp order))))) ((eq (car x) :option) (and (true-listp (cdr x)) (eql (len (cdr x)) 2) (b* ((get (std::da-nth 0 (cdr x))) (order (std::da-nth 1 (cdr x)))) (and (alternationp get) (pos-listp order))))) (t (and (eq (car x) :repetition) (and (true-listp (cdr x)) (eql (len (cdr x)) 1)) (b* ((get (std::da-nth 0 (cdr x)))) (repetitionp get))))))))
Theorem:
(defthm consp-when-defdefparse-function-spec-p (implies (defdefparse-function-spec-p x) (consp x)) :rule-classes :compound-recognizer)