Precompiler

from Wikipedia, the free encyclopedia

A precompiler (also Precompiler , precompiler , precompiler or precompiler called) is a computer program in the software development, a source code in a single run before the actual compiler processed. Precompilers are used when new constructs with their own syntax are to be processed with an existing programming language (target language) . The precompiler converts these constructs into those of the existing language. Depending on the definition, a precompiler can 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 into a C program , for example , into C code.

In contrast to the preprocessor of the C programming language , the precompiler not only performs simple text replacements (character string against character string), but also analyzes the new syntax elements, checks them for syntactic correctness and then converts them into equivalent, often much more complex constructs of the target language.

In addition, a precompiler also offers the option of early or extended debugging. Often, precompilers are also used in procedural programming languages ​​to enable object-oriented programming or other advanced programming techniques. By adding a precompiler, existing compilers can be expanded to include new or improved features.

See also

Individual evidence

  1. ^ Andreas Leitner, Patrick Th. Eugster, Manuel Oriol, Ilinca Ciupa: Reflecting on an Existing Programming Language . In: Journal of Object Technology . 2007, p. 319-339 ( jot.fm ).
  2. C. Neusius: Portable software in modular Pascal . In: SIGPLAN Not. , 23, 12, December 1988, pp. 79-85, doi: 10.1145 / 57669.57676
  3. Peter Forbrig, Christian Horn, Immo O. Kerner: Text and Exercise Book Computer Science 1 . Basics and overview. 3. Edition. Hanser Fachbuchverlag, Leipzig 2003, ISBN 3-446-22543-9 , p. 391 ( limited preview in Google Book search).
  4. ^ Don Chamberlin: A Complete Guide to DB2 Universal Database . 2nd Edition. Morgan Kaufman Publ, 1998, ISBN 1-55860-482-0 , pp. 150 .
  5. Jörg Fritze, Jürgen Marsch: Successful database application with SQL 3 . 6th edition. Vieweg + Teubner, 2002, ISBN 3-528-55210-7 , pp. 188 ( limited preview in Google Book search).
  6. ^ Edwin Schicker: Databases and SQL . 3. Edition. Teubner, 2002, ISBN 3-519-22991-9 , pp. 225 ( limited preview in Google Book Search).