Compiler - A program that translates source code into object code. The compiler derives its name from the way it works, looking at the entire piece of source code and collecting and reorganizing the instructions. Thus, a compiler differs from an interpreter, which analyzes and executes each line of source code in succession, without looking at the entire program. The advantage of interpreters is that they can execute a program immediately. Compilers require some time before an executable program emerges. However, programs produced by compilers run much faster than the same programs executed by an interpreter.

 

Source Program -  Program instructions in their original form. The word source differentiates code from various other forms that it can have (for example, object code and executable code).

Object Program - The code produced by a compiler. Programmers write programs in a form called source code. The source code consists of instructions in a particular language, like C or FORTRAN. Computers, however, can only execute instructions written in a low-level language called machine language.

To get from source code to machine language, the programs must be transformed by a compiler. The compiler produces an intermediary form called object code. Object code is often the same as or similar to a computer's machine language. The final step in producing an executable program is to transform the object code into machine language, if it is not already in this form. This can be done by a number of different types of programs, called assemblers, binders, linkers, and loaders.

Lexical analysis – the process of recognizing which strings of symbols form the source code program represent a single entity.  For example, the three symbols 153 should not be interpreted as a 1 followed by a 5 followed by a 3 but should be recognized as represented a single numeric value.  It also classifies each symbol as a numeric value, word, arithmetic operator, and so on.

 

Token – each unit found by the lexical analyzer.

 

Parser - A program that dissects source code so that it can be translated into object code.  It views the program in terms of tokens.  Its job is to group these tokens into statements.  It is the process of identifying the grammatical structure of a program and recognizing the role of each component.

 

Code Generator  - the process of constructing the machine-language instructions to simulate the statements recognized by the parser.  Code optimization is an important task of the code generator.

 

Symbol Table – place where the parser records the declarative statements of a program.  It contains such information as where which variables have been declared and what data types and data structures are associated with those variables.

Linker - Also called link editor and binder, a linker is a program that combines object modules to form an executable program. Many programming languages allow you to write different pieces of code, called modules, separately. This simplifies the programming task because you can break a large program into small, more manageable pieces. Eventually, though, you need to put all the modules together. This is the job of the linker.

In addition to combining modules, a linker also replaces symbolic addresses with real addresses. Therefore, you may need to link a program even if it contains only one module.

Loader - An operating system utility that copies programs from a storage device to main memory, where they can be executed. In addition to copying a program into main memory, the loader can also replace virtual addresses with physical addresses.

Most loaders are invisible: that is, you cannot directly execute them, but the operating system uses them when necessary.