Write a short note on Compilers and Interpreters. Also explain the various units of language processing system.


A compiler scans the entire program and translates it as a whole into relocatable machine code. It takes large amount of time to analyze the source code but the overall execution time is comparatively faster. It generates intermediate object code which further requires linking, hence requires more memory. It generates the error message only after scanning the whole program. An interpreter translates program one statement at a time. It takes less amount of time to analyze the source code but the overall execution time is slower. No intermediate object code is generated, hence are memory efficient. It continues translating the program until the first error is met, in which case it stops.

A language processing system consists of 4 main units; the preprocessor, the compiler, the assembler, and the linker/loader. The preprocessor collects the source program split into modules and files, expands macros into language statement. The compiler takes modified source program and generates machine language code. The assembler takes the machine language code and converts it into relocatable object code. The linker links pieces of large programs that need to be compiled in pieces. It also resolves external memory references. The loader loads all the executables into memory.

 



Share to whatsapp

More Questions from System Software and Compiler Design Module 3

Explain the various phases of the compiler with a simple example
View
Explain with a neat diagram phases of a compiler by taking an example A=B+C*60.
View
Write a short note on Compilers and Interpreters. Also explain the various units of language processing system.
View
Explain Input Buffering. What is the drawback of using one buffer scheme and explain how it is overcome?
View
Write a short note on the structure of Generated Analyzer
View
Explain machine dependent features of loader
View
Discuss the various applications of compiler technology
View