How different is an interpreter from a compiler and a translator? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How different is an interpreter from a compiler and a translator?

16th Feb 2016, 7:46 AM
ebentil
1 Answer
+ 1
Compiler converts the program from one computer language to another computer language. A compiler has to cope with any valid syntax in the source language, and generate semantically equivalent code in the target language. It basically scans the entire program and translates it as a whole into machine code. An interpreter is similar to a compiler, but it translates one statement at a time. Translator which translate one language to many other language or else we can say a translator is usually translating from a high level language to another high level language, or from a low level language to a high level language. A translator usually has a fixed body of code that is required to translate the program.
23rd May 2016, 10:06 AM
James Flanders