what are the type of language processor?Explain them
Answers
ASSEMBLER :--
THIS PROCESSOR CONVERTS THE PROGRAM WRITTEN IN ASSEMBLY LANGUAGE TO MACHINE LANGUAGE.
_____________________________
INTERPRETER :--
THIS PROCESSOR CONVERTS HIGH LEVEL LANGUAGE PROGRAM TO MACHINE LANGUAGE LINE BY LINE.
___________________________
COMPILER :--
IT ALSO CONVERTS THE HLL TO MACHINE LANGUAGE BUT IN A DIFFERENT WAY.
IT CONVERTS THE ENTIRE PROGRAM IN ONE GO.
Language Processor
The computer understands only machine language. A computer cannot directly execute a program written in high level or assembly language. Before execution, the program must be converted into machine language. Language processor or translators is a software that converts these programs into machine languages. Every computer language has its own translators also.
Types of Language Processor
Different types of language processors are as follows:
Compiler
Interpreter
Assembler
Compiler
A compiler is a program that converts the instructions of high-level language into machine language as a whole. A high-level language program is called a source program. Compiler converts source program into machine code. This machine code is known as an object program.
language processor
Furthermore, The compiler verifies every statement in the source program and produces machine instructions. Syntax errors in the program are also checked by the compiler. A source program containing an error cannot be compiled.
A compiler translates the programs of only that language for which it is written. For example, the C compiler can translate only those programs that are written in C language.
Interpreter
An interpreter is a program that converts one statement of a program at one time. Before translating the next statement of the source program, It executes this statement first. if there is an error in the statements, the interpreter stops working and displays the error message.
language processor
Furthermore, the advantages of interpreters over compilers are that an error is found immediately. so the programmer can correct errors during program development.
The drawback of an interpreter is that it is not very competent. The interpreter does not generate an object program. It must convert the program each time it is executed. Visual Basic also uses an interpreter.
Assembler
language processor
An assembler is translating program that converts assembly language programs into machine language.