Jump to content

Translator (computing): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
No edit summary
Line 1: Line 1:
{{mergeto|source-to-source compiler|date=May 2012}}
{{mergeto|source-to-source compiler|date=May 2012}}
{{About|translation of programming languages|translation of natural languages|machine translation}}
{{About|translation of programming languages|translation of natural languages|machine translation}}
A '''translator''' is a computer program that translates one programming language instruction(s) into another
A '''translator''' is a computer program that translates a program written in a given [[programming language]] into a functionally equivalent program into a different language. Depending on the translator, this may involve changing or simplifying the program flow, without losing the essence of the program, thereby producing a [[functionally equivalent]] program.
programming language instruction(s) without the loss of original meaning. OR, the translator will translate X
language and produce X’ language. Some translators may also change or simplify the program flow, without losing the essence of the program, thereby producing a [[functionally equivalent]] program.


==Types==
==Types==

Revision as of 19:44, 2 September 2012

A translator is a computer program that translates a program written in a given programming language into a functionally equivalent program into a different language. Depending on the translator, this may involve changing or simplifying the program flow, without losing the essence of the program, thereby producing a functionally equivalent program.

Types

If the translator translates a high level language into another high level language, is called a translator. Examples include FORTRAN-to-Ada, CHILL-to-C++, PASCAL-to-C, COBOL(DialectA)-to-COBOL(DialectB).

If the translator translates a high level language into an assembly or machine language it is called a compiler. Notice that every language can be either translated into a (Turing-complete) high level or assembly language.

If the translator translates a high level language into an intermediate code which will be immediately executed it is called interpreter.

If the translator translates target/machine code to source language it is called a Decompiler. Example: DCC, Boomerang Decompilers and Reverse Engineering Compiler (REC).

If the translator translates assembly language to machine code such kind of translator is called assembler. Examples include MASM, TASM, NASM and FASM.

If the translator translates machine code into assembly language such kind of translator is called Disassembler. Examples include gdb, IDA Pro and OllyDbg.