Definición de compilador

A compiler is a kind of translator that translates a program into another program, known as target language. Usually, the term ‘compiler’ is used for language translator of high-level language into machine language. The compiler replaces single high-level statement with a series of machine language instruction. A compiler usually resides on a disk or other storage media. When a program is to be compiled, its compiler is loaded into the main memory. The compiler stores the entire high-level program, scans it and translates the whole program into an equivalent machine language program. During the translation process, the compiler reads the source program and checks the syntax (grammatical) errors. If there is any error, the compiler generates an error message, which is usually displayed on the screen. In case of errors, the compiler will not create the object code until all the errors are rectified.

An interpreter is also a language translator and translates high-level language into machine language. However, unlike compilers, it translates a statement in a program and executes the statement immediately, that is, before translating the next source language statement. When an error is encountered in the program, the execution of the program is halted and an error message is displayed. Similar to the compilers, every interpreted language such as BASIC and LISP has its own interpreters.

Last updated