Translators
Translators
A translator takes a program written in source language as input and converts it into a program in target
language as output.
• Translating the high-level language program input into an equivalent machine language program.
• Providing diagnostic messages wherever the programmer violates specification of the high-level
language program.
Compiler
Compiler is a translator which is used to convert programs in high-level language to low-level language.
It translates the entire program and also reports the errors in source program encountered during the
translation.
Compiler
Interpreter
It directly executes the operations specified in the source program when the input is given by the user.
Interpreter
SI. No
Compiler
Interpreter
1
Performs the translation of a program as a whole.
Execution is faster.
Execution is slower.
Requires more memory as linking is needed for the generated intermediate object code.
Debugging is hard as the error messages are generated after scanning the entire program only.
It stops translation when the first error is met. Hence, debugging is easy.
5
Programming languages like C, C++ uses compilers.
Assembler is a translator which is used to translate the assembly language code into machine language
code.
Assembler
Type of Parsing
Next →← Prev