Language Translator in Programming

preview_player
Показать описание
Language Translator
A translator is a program that:
• Checks syntax of a program to ensure the programming language is
used correctly, by giving you the syntax-error messages, which is
known as diagnostics.
• Translates a program into language that the computer can
understand.
• Produces descriptive error messages known as syntax-error to
programmer if there are errors in the programs.

Type of translator
1. Assembler -
• A program, which is used to convert assembly language to machine language.
• Translates the whole program at one time.
• Also called assembler program.
2. Compiler
• Program that translates a high level language to machine language
• Translate the whole program at one time.
• Translates the source code, for example COBOL language to machine language.
• Used to translate C, COBOL and other language.
3. Interpreter
• Program that translates a high level language to machine language.
• It translates one line at a time and executes each line after it is translated.
• Displays feedback as the error occurred.
• when an interpreter encounters an error it reports it to the user immediately and halts
further execution of the program. Such instant feedback, pinpointing the exact location of the
error, helps the programmer to find and remove errors.
Рекомендации по теме