Process the
(defdefparse-process-grammar grammar ctx state) → (mv erp grammar state)
Return the grammar (i.e. the constant name) if successful.
Function:
(defun defdefparse-process-grammar (grammar ctx state) (declare (xargs :stobjs (state))) (declare (xargs :guard (ctxp ctx))) (let ((__function__ 'defdefparse-process-grammar)) (declare (ignorable __function__)) (b* (((er &) (ensure-value-is-constant-name$ grammar "The :GRAMMAR input" t nil)) (rules (constant-value grammar (w state))) ((unless (and (rulelistp rules) (consp rules))) (er-soft+ ctx t nil "The :GRAMMAR input is the name of a constant, ~ but its value ~x0 is not a non-empty ABNF grammar." rules))) (value grammar))))
Theorem:
(defthm symbolp-of-defdefparse-process-grammar.grammar (b* (((mv acl2::?erp ?grammar acl2::?state) (defdefparse-process-grammar grammar ctx state))) (common-lisp::symbolp grammar)) :rule-classes :rewrite)