Raj Kumar
Computer Science And Engineering

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

System Software and Compiler Design

Explanation

965    0

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:   
   Raj Kumar
Computer Science And Engineering

More Questions from System Software and Compiler Design Module 3