Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Preprocessor
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Lexical preprocessors== Lexical preprocessors are the lowest-level of preprocessors as they only require [[lexical analysis]], that is, they operate on the source text, prior to any [[parser|parsing]], by performing simple substitution of [[Lexical analysis|tokenized]] character sequences for other tokenized character sequences, according to user-defined rules. They typically perform [[macro substitution]], [[header file|textual inclusion]] of other files, and conditional compilation or inclusion. ===C preprocessor=== {{main|C preprocessor}} The most common example of this is the [[C preprocessor]], which takes lines beginning with '#' as [[Directive (programming)|directives]]. The C preprocessor does not expect its input to use the syntax of the C language. Some languages take a different approach and use built-in language features to achieve similar things. For example: * Instead of macros, some languages use aggressive inlining and templates. * Instead of includes, some languages use compile-time imports that rely on type information in the object code. * Some languages use <code>if-then-else</code> and [[dead code elimination]] to achieve [[conditional compilation]]. ===Other lexical preprocessors=== Other lexical preprocessors include the general-purpose [[m4 (language)|m4]], most commonly used in cross-platform build systems such as [[autoconf]], and [[general purpose macro processor|GEMA]], an open source macro processor which operates on patterns of context.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)