Preprocessor
In computer science, a preprocessor is a program that takes text and performs lexical conversions on it. The conversions may include macro substitution, conditional inclusion, and inclusion of other files.
Related Topics:
Computer science - Macro substitution
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
The use of preprocessors has been getting less common as recent languages provide more abstract features rather than lexical-oriented ones. Indeed, the overuse of the preprocessor might yield quite chaotic code. In designing a new language based on C, Stroustrup introduced features such as inline and templates into C++ in an attempt to make the C preprocessor less relevant. Nevertheless, there is an abundance of installed C code which relies on the preprocessor.
Related Topics:
Stroustrup - Inline - Templates
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
New languages proposed recently have little or no preprocessor ability. Java has no preprocessor. D, designed as a replacement of C and C++, supports features such as imports, nested functions, versioning, debug statements, etc. that help make it practical to eliminate the preprocessor entirely.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Other preprocessors include m4 and Oracle Pro*C. The m4 preprocessor is general-purpose; Oracle Pro*C converts embedded PL/SQL into C.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Preprocessing can be quite cumbersome in incremental parsing or incremental lexical analysis because changes to preprocessing rules can affect the entire text to be preprocessed.
Related Topics:
Incremental parsing - Incremental lexical analysis
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Most C compilers have a flag which allows generation of post-processed code so that static analysis can be performed on the output if desired.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ Table of Content ~
| ► | Introduction |
| ► | See also |
~ What's Hot ~
~ Community ~
| ► | History Forum Come and discuss about History, Civilizations, Historical Events and Figures |
| ► | History Web-Ring A community of sites, blogs and forums dedicated to History. Do not hesitate to submit your site. |
and are licensed under the GNU Free Documentation License.
Lexicon - Privacy Policy - Spiritus-Temporis.com ©2005.