Preprocessor
A preprocessor is a program that takes text and does lexical conversions to it. The type of lexical conversions may include substitution of macros, conditional inclusion, and inclusion of other files.The C programming language has a preprocessor that performs the following transformations:
- Replaces trigraphs with equivalents.
- Concatenates source lines.
- Replaces comments with white space.
- Reacts to lines starting with an octothorp (#), performing macro substitution, file inclusion, conditional inclusion, and other transformations.
Other famous 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 a cumbersome in incremental parsing or incremental lexial analysis because changes on definition of rules of preprocessing can affect the entire text to be preprocessed.