Variable: semantic-lex-c-preprocessor-symbol-map

semantic-lex-c-preprocessor-symbol-map is a customizable variable defined in c.el.gz.

Value

nil

Documentation

Table of C Preprocessor keywords used by the Semantic C lexer.

Each entry is a cons cell like this:
  ( "KEYWORD" . "REPLACEMENT" )
Where KEYWORD is the macro that gets replaced in the lexical phase, and REPLACEMENT is a string that is inserted in its place. Empty string implies that the lexical analyzer will discard KEYWORD when it is encountered.

Alternately, it can be of the form:
  ( "KEYWORD" ( LEXSYM1 "str" 1 1 ) ... ( LEXSYMN "str" 1 1 ) )
where LEXSYM is a symbol that would normally be produced by the lexical analyzer, such as symbol or string. The string in the second position is the text that makes up the replacement. This is the way to have multiple lexical symbols in a replacement. Using the first way to specify text like "foo::bar" would not work, because : is a separate lexical symbol.

A quick way to see what you would need to insert is to place a definition such as:

#define MYSYM foo::bar

into a C file, and do this:
  M-x semantic-lex-spp-describe (semantic-lex-spp-describe)

The output table will describe the symbols needed.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/bovine/c.el.gz
(defcustom semantic-lex-c-preprocessor-symbol-map nil
  "Table of C Preprocessor keywords used by the Semantic C lexer.
Each entry is a cons cell like this:
  ( \"KEYWORD\" . \"REPLACEMENT\" )
Where KEYWORD is the macro that gets replaced in the lexical phase,
and REPLACEMENT is a string that is inserted in its place.  Empty string
implies that the lexical analyzer will discard KEYWORD when it is encountered.

Alternately, it can be of the form:
  ( \"KEYWORD\" ( LEXSYM1 \"str\" 1 1 ) ... ( LEXSYMN \"str\" 1 1 ) )
where LEXSYM is a symbol that would normally be produced by the
lexical analyzer, such as `symbol' or `string'.  The string in the
second position is the text that makes up the replacement.  This is
the way to have multiple lexical symbols in a replacement.  Using the
first way to specify text like \"foo::bar\" would not work, because :
is a separate lexical symbol.

A quick way to see what you would need to insert is to place a
definition such as:

#define MYSYM foo::bar

into a C file, and do this:
  \\[semantic-lex-spp-describe]

The output table will describe the symbols needed."
  :group 'c
  :type '(repeat (cons (string :tag "Keyword")
		       (sexp :tag "Replacement")))
  :set (lambda (sym value)
	 (set-default sym value)
	 (condition-case nil
	     (semantic-c-reset-preprocessor-symbol-map)
	   (error nil))
	 )
  )