Function: define-lex-sexp-type-analyzer

define-lex-sexp-type-analyzer is a macro defined in lex.el.gz.

Signature

(define-lex-sexp-type-analyzer NAME DOC SYNTAX TOKEN)

Documentation

Define a sexp type analyzer NAME with DOC string.

SYNTAX is the regexp that matches the beginning of the s-expression. TOKEN is the lexical token returned when SYNTAX matches.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/lex.el.gz
(defmacro define-lex-sexp-type-analyzer (name doc syntax token)
  "Define a sexp type analyzer NAME with DOC string.
SYNTAX is the regexp that matches the beginning of the s-expression.
TOKEN is the lexical token returned when SYNTAX matches."
  (declare (indent 1))
  `(define-lex-regex-analyzer ,name
     ,doc
     ,syntax
     (semantic-lex-push-token
      (semantic-lex-token
       ,token (point)
       (save-excursion
         (semantic-lex-unterminated-syntax-protection ,token
           (forward-sexp 1)
           (point))))))
  )