Split up the rest of a define line into macro arguments and macro text.
(vl-split-define-text text ppst) → (mv successp formals body ppst)
Function:
(defun vl-split-define-text (text ppst) (declare (xargs :stobjs (ppst))) (declare (xargs :guard (vl-echarlist-p text))) (let ((__function__ 'vl-split-define-text)) (declare (ignorable __function__)) (b* ((text (vl-echarlist-fix text)) ((unless (and (consp text) (eql (vl-echar->char (car text)) #\())) (mv t nil (vl-echarlist-fix text) ppst))) (vl-parse-define-formal-arguments (cdr text) (vl-echar->loc (car text)) ppst))))
Theorem:
(defthm booleanp-of-vl-split-define-text.successp (b* (((mv ?successp ?formals ?body ?ppst) (vl-split-define-text text ppst))) (booleanp successp)) :rule-classes :type-prescription)
Theorem:
(defthm vl-define-formallist-p-of-vl-split-define-text.formals (b* (((mv ?successp ?formals ?body ?ppst) (vl-split-define-text text ppst))) (vl-define-formallist-p formals)) :rule-classes :rewrite)
Theorem:
(defthm vl-echarlist-p-of-vl-split-define-text.body (b* (((mv ?successp ?formals ?body ?ppst) (vl-split-define-text text ppst))) (vl-echarlist-p body)) :rule-classes :rewrite)