File: lex-spp.el.html
The Semantic Preprocessor works with semantic-lex to provide a phase during lexical analysis to do the work of a pre-processor.
A pre-processor identifies lexical syntax mixed in with another language and replaces some keyword tokens with streams of alternate tokens.
If you use SPP in your language, be sure to specify this in your semantic language setup function:
(add-hook 'semantic-lex-reset-functions 'semantic-lex-spp-reset-hook nil t)
Special Lexical Tokens:
There are several special lexical tokens that are used by the Semantic PreProcessor lexer. They are:
Declarations:
spp-macro-def - A definition of a lexical macro.
spp-macro-undef - A removal of a definition of a lexical macro.
spp-system-include - A system level include file
spp-include - An include file
spp-concat - A lexical token representing textual concatenation
of symbol parts.
Operational tokens:
spp-arg-list - Represents an argument list to a macro.
spp-symbol-merge - A request for multiple symbols to be textually merged.
Defined variables (12)
semantic-lex-spp-debug-symbol | A symbol to break on if it is being set somewhere. |
semantic-lex-spp-dynamic-macro-symbol-obarray | Table of macro keywords used during lexical analysis. |
semantic-lex-spp-dynamic-macro-symbol-obarray-stack | A stack of obarrays for temporarily scoped macro values. |
semantic-lex-spp-expanded-macro-stack | The stack of lexical SPP macros we have expanded. |
semantic-lex-spp-hack-depth | Current depth of recursive calls to ‘semantic-lex-spp-lex-text-string’. |
semantic-lex-spp-macro-max-length-to-save | Maximum length of an SPP macro before we opt to not save it. |
semantic-lex-spp-macro-symbol-obarray | Table of macro keywords used by the Semantic Preprocessor. |
semantic-lex-spp-paren-or-list | Detect open parenthesis. |
semantic-lex-spp-project-macro-symbol-obarray | Table of macro keywords for this project. |
semantic-lex-spp-replace-or-symbol-or-keyword | Like ‘semantic-lex-symbol-or-keyword’ plus preprocessor macro replacement. |
semantic-lex-spp-replacements-enabled | Non-nil means do replacements when finding keywords. |
semantic-lex-spp-use-headers-flag | Non-nil means to pre-parse headers as we go. |