Match either a keyword or an ordinary, simple identifier.
(vl-lex-simple-identifier-or-keyword echars breakp table) → (mv token/nil remainder)
Function:
(defun vl-lex-simple-identifier-or-keyword (echars breakp table) (declare (xargs :guard (and (vl-echarlist-p echars) (booleanp breakp) (vl-keyword-table-p table)))) (let ((__function__ 'vl-lex-simple-identifier-or-keyword)) (declare (ignorable __function__)) (b* (((unless (and (consp echars) (vl-simple-id-head-echar-p (car echars)))) (mv nil echars)) ((mv prefix remainder) (vl-read-simple-identifier echars)) (str (hons-copy (vl-echarlist->string prefix))) (lookup (vl-keyword-lookup str table)) (breakp (and breakp t)) (token (if lookup (make-vl-plaintoken :etext prefix :type lookup :breakp breakp) (make-vl-idtoken :etext prefix :name str :breakp breakp)))) (mv token remainder))))