Preprocessor

A precompiler (also Precompiler, Präkompiler, precompiler or preprocessor called ) is a computer program in software development, processes a source code in a single run before the actual compiler. Precompiler are used when new constructs to be processed with its own syntax with an existing programming language (target language). The precompiler converts these constructs into those of the existing language. Depending on the definition, a precompiler also have the task of generating intermediate code for an interpreter.

A common example of this is embedded SQL. Here a precompiler translates SQL statements that are inserted for example into a C program in C code.

Unlike, for example preprocessor of the C language the precompiler will not only simple text substitutions ( string to string), but rather analyzes the new syntax elements, it checks for syntactic correctness, and then converts them into equivalent, often much more complex constructs of the target language.

In addition, a precompiler also the possibility of early or advanced debugging. Precompiler often be used in procedural programming languages ​​, in order to enable object-oriented programming, or other advanced programming techniques. By Upstream of a precompiler existing compilers can therefore be extended to include new or improved features.

Credentials

  • Programming tool
659016
de