What is language?
What is language translator?
As we know that computer understands only the instruction written in the machine language. Therefore a program written in any other language should be translates to machine language. For this purpose special program are available they are called translators or language processor. This special program accepts the user programs and checks each statement and produces a corresponding set of machine language instructions. There are two types of translators
Compiler:
A compiler checks the entire program written by user and if it is free from error and mistakes then produces a complete program in machine language known as object program. But if it founds some error in program then it does not execute the single statement of the program. So compiler translator whole program in machine language before it starts execution.
Interpreter:
Interpreters perform the similar job like compiles but in different way. It translates (interpreter) one statement at a time and is error – free then executes that statement. this continues till the last statement in the program has been translates and executed. Thus interpreter translates and executes the statement before it goes to next statement. When it founds some error in translate.
No comments:
Post a Comment