define-lex-regex-analyzer

define-lex-regex-analyzer is a Lisp macro in `lex.el'.

(define-lex-regex-analyzer NAME DOC REGEXP &rest FORMS)

Create a lexical analyzer with NAME and DOC that will match REGEXP.
FORMS are evaluated upon a successful match.
See `define-lex-analyzer' for more about analyzers.