define-lex-simple-regex-analyzer

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

(define-lex-simple-regex-analyzer NAME DOC REGEXP TOKSYM &optional INDEX &rest FORMS)

Create a lexical analyzer with NAME and DOC that match REGEXP.
TOKSYM is the symbol to use when creating a semantic lexical token.
INDEX is the index into the match that defines the bounds of the token.
Index should be a plain integer, and not specified in the macro as an
expression.
FORMS are evaluated upon a successful match BEFORE the new token is
created. It is valid to ignore FORMS.
See `define-lex-analyzer' for more about analyzers.