Process the inputs and generate the events.
(defgrammar-fn args call ctx state) → (mv erp event state)
Function:
(defun defgrammar-fn (args call ctx state) (declare (xargs :stobjs (state))) (declare (xargs :guard (and (true-listp args) (pseudo-event-formp call) (ctxp ctx)))) (let ((__function__ 'defgrammar-fn)) (declare (ignorable __function__)) (b* (((when (defgrammar-table-lookup call (w state))) (value '(value-triple :redundant))) ((er (list name file untranslate well-formed closed parents short long other-events) :iferr '(_)) (defgrammar-process-inputs args ctx state))) (defgrammar-gen-everything name file untranslate well-formed closed parents short long other-events call state))))
Theorem:
(defthm pseudo-event-formp-of-defgrammar-fn.event (implies (true-listp args) (b* (((mv acl2::?erp acl2::?event acl2::?state) (defgrammar-fn args call ctx state))) (pseudo-event-formp event))) :rule-classes :rewrite)