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-symbolA symbol to break on if it is being set somewhere.
semantic-lex-spp-dynamic-macro-symbol-obarrayTable of macro keywords used during lexical analysis.
semantic-lex-spp-dynamic-macro-symbol-obarray-stackA stack of obarrays for temporarily scoped macro values.
semantic-lex-spp-expanded-macro-stackThe stack of lexical SPP macros we have expanded.
semantic-lex-spp-hack-depthCurrent depth of recursive calls to ‘semantic-lex-spp-lex-text-string’.
semantic-lex-spp-macro-max-length-to-saveMaximum length of an SPP macro before we opt to not save it.
semantic-lex-spp-macro-symbol-obarrayTable of macro keywords used by the Semantic Preprocessor.
semantic-lex-spp-paren-or-listDetect open parenthesis.
semantic-lex-spp-project-macro-symbol-obarrayTable of macro keywords for this project.
semantic-lex-spp-replace-or-symbol-or-keywordLike ‘semantic-lex-symbol-or-keyword’ plus preprocessor macro replacement.
semantic-lex-spp-replacements-enabledNon-nil means do replacements when finding keywords.
semantic-lex-spp-use-headers-flagNon-nil means to pre-parse headers as we go.

Defined functions (44)

define-lex-spp-include-analyzer(NAME DOC REGEXP TOKIDX &rest VALFORM)
define-lex-spp-macro-declaration-analyzer(NAME DOC REGEXP TOKIDX &rest VALFORM)
define-lex-spp-macro-undeclaration-analyzer(NAME DOC REGEXP TOKIDX)
semantic-lex-make-spp-table(SPECS)
semantic-lex-spp-analyzer-do-replace(SYM VAL BEG END)
semantic-lex-spp-analyzer-push-tokens-for-symbol(STR BEG END)
semantic-lex-spp-anlyzer-do-replace(SYM VAL BEG END)
semantic-lex-spp-describe(&optional BUFFER)
semantic-lex-spp-dynamic-map()
semantic-lex-spp-dynamic-map-stack()
semantic-lex-spp-enable-debug-symbol(SYM)
semantic-lex-spp-extract-regex-and-compare(ANALYZER VALUE)
semantic-lex-spp-find-closing-macro()
semantic-lex-spp-first-token-arg-list(TOKEN)
semantic-lex-spp-get-overlay(&optional POINT)
semantic-lex-spp-lex-text-string(TEXT)
semantic-lex-spp-macro-to-macro-stream(VAL BEG END ARGVALUES)
semantic-lex-spp-macro-with-args(VAL)
semantic-lex-spp-macros()
semantic-lex-spp-merge-header(NAME)
semantic-lex-spp-merge-streams(RAW-STREAM)
semantic-lex-spp-one-token-and-move-for-macro(MAX)
semantic-lex-spp-one-token-to-txt(TOK &optional BLOCKTOK)
semantic-lex-spp-paren-or-list()
semantic-lex-spp-replace-or-symbol-or-keyword()
semantic-lex-spp-reset-hook(START END)
semantic-lex-spp-save-table()
semantic-lex-spp-set-dynamic-table(NEW-ENTRIES)
semantic-lex-spp-simple-macro-to-macro-stream(VAL BEG END ARGVALUES)
semantic-lex-spp-stream-for-arglist(TOKEN)
semantic-lex-spp-stream-for-macro(EOS)
semantic-lex-spp-symbol(NAME)
semantic-lex-spp-symbol-merge(TXT)
semantic-lex-spp-symbol-p(NAME)
semantic-lex-spp-symbol-pop(NAME)
semantic-lex-spp-symbol-push(NAME VALUE)
semantic-lex-spp-symbol-remove(NAME &optional MAP)
semantic-lex-spp-symbol-set(NAME VALUE &optional OBARRAY-IN)
semantic-lex-spp-symbol-stream(NAME)
semantic-lex-spp-table-write-slot-value(VALUE)
semantic-lex-spp-token-macro-to-macro-stream(VAL BEG END ARGVALUES)
semantic-lex-spp-validate-value(NAME VALUE)
semantic-lex-spp-value-valid-p(VALUE)
semantic-lex-with-macro-used(NAME &rest BODY)

Defined faces (0)