
A language processor is a special type of software program that has the potential to translate the program codes into machine codes.
Mostly, high-level languages are used to write the programs, called source code, as it is very uninteresting work to write a computer program directly in machine code.
These source codes need to translate into machine language to be executed because they cannot be executed directly by the computer.
Hence, a special translator system, a language processor, is used to convert source code into machine language.
MACHINE LANGUAGE


⚡️ Assembler is basically the 1ˢᵗ interface that is able to communicate humans with the machine. We need an Assembler to fill the gap between human and machine so that they can communicate with each other.
⚡️ An assembler converts programs written in assembly language into machine code. It is also referred to assembler as assembler language by some users. The source program has assembly language instructions, which is an input of the assembler. The assemble translates this source code into a code that is understandable by the computer, called object code or machine code.
⚡️ code written in assembly language is some sort of mnemonics [instructions] like ADD, MUL, MUX, SUB, DIV, MOV and so on and the assembler is basically able to convert these mnemonics in Binary code. Here, these mnemonics also depend upon the architecture of the machine. For example, the architecture of intel 8085 & intel 8086 are different.
⚡️ The language processor allows the computer to run and understand the program by reading the complete source program in one time, which is written in a high-level language.
⚡️ In a compiler, the source code is translated to object code successfully if it is free of errors.
⚡️ The compiler specifies the errors at the end of the compilation with line numbers when there are any errors in the source code.
⚡️ The errors must be removed before the compiler can successfully recompile the source code again
⚡️ Examples: C C++ C# Java
⚡️ While working on the Harvard Mark I computer, Grace Hopper created the 1ˢᵗ compiler.
⚡️ In modern times, to compile the program, most of the high-level languages have toolkits or a compiler.
⚡️ Gcc command for C and C++ and Eclipse for Java are two popular compilers. It takes a few seconds or minutes while compiling the program based on how big the program is.
⚡️ An interpreter is a computer program that allows a computer to interpret or understand what tasks to perform.
⚡️ The programs written with the help of using one of the many high-level programming languages are directly executed by an interpreter without previously converting them to an object code or machine code, which is done line by line or statement by statement.
⚡️ When the interpreter is translating the source code, it displays an error message if there is an error in the statement and terminates this statement from translating process. When the interpreter removed errors on the 1ˢᵗ line, then it moves on to the next line.
⚡️ An Interpreter directly executes instructions written in a programming or scripting language without previously converting them to an object code or machine code.
⚡️ Examples: Perl Python Matlab JavaScript Ruby

PASCAL LANGUAGE
COMPILER vs INTERPRETER | |
---|---|
COMPILER | INTERPRETER |
A compiler is a program that takes the complete program as a single unit and converts the entire source code into executable machine code for a CPU. | The interpreter is different from the Compiler; it takes a source program and translates it one by one, and executes. |
The compiler is comparatively faster in order to the overall execution of the source code; however, it takes a large amount of time to analyze to compile the complete programming code. | As compared to the compiler, an interpreter is slower in order to the overall execution of the programming code, but it takes less time to evaluate the source code. |
When the compiler completes scanning the whole program, then it generates the error message. As the error can be found in any statement in the program; therefore, debugging is comparatively hard with a compiler. | With an interpreter, until the error is met, it continues converting the program; therefore, its debugging is easier. |
When you want to run the program, a translator program is needed each time to convert the source code. | When you want to run the program, a translator program is not needed each time to convert the source code. |
It stores object code and is more beneficial for commercial purposes. | It does not hold object code, and it is more beneficial for learning purposes. |