Try to match a simple identifier (or any keyword!).
(vl-read-simple-identifier echars) → (mv prefix remainder)
Function:
(defun vl-read-simple-identifier (echars) (declare (xargs :guard (vl-echarlist-p echars))) (let ((__function__ 'vl-read-simple-identifier)) (declare (ignorable __function__)) (if (or (not (consp echars)) (not (vl-simple-id-head-echar-p (car echars)))) (mv nil echars) (vl-read-while-simple-id-tail echars))))
Theorem:
(defthm vl-read-simple-identifier-when-vl-simple-id-head-p (b* (((mv prefix ?remainder) (vl-read-simple-identifier echars))) (implies (vl-simple-id-head-p (vl-echar->char (first echars))) prefix)))