A device or routine that performs preliminary operations on input before passing it on for further processing. See also front-end processor (definition 1). Compare postprocessor.
Some languages (C and C++ in particular) start compilation by running a preprocessor on the source code. The preprocessor is a simple program that replaces patterns in the source code with other patterns the programmer has defined (using preprocessor directives). Preprocessor directives are used to save typing and to increase the readability of the code.