A compiler is a program that can read a
program in one language (source language) and translate it into an
equivalent program in another language (target language). If the target
program is an executable machine-language program, it can then be called by the
user to process inputs and produce outputs.
An interpreter is another common kind of language
processor. Instead of producing a target program as a translation,
an interpreter appears to directly execute the operations specified in
the source program on inputs supplied by the user.
The machine-language target program
produced by a compiler is usually much faster than an interpreter
at mapping inputs to outputs. An interpreter, however, can usually give better
error diagnostics than a compiler, because it executes the source
program statement by statement.
A language-processing system typically
involves – preprocessor, compiler, assembler and linker/loader –
in translating source program to target machine code.
0 comments