Compiler Design (2170701)

BE | Semester-7   Winter-2018 | 15/11/2018

Q1) (a)

List the cousins of compiler and explain the role of any one of them.

The Cousins of Compiler are listed as below.

  • Pre-Processor
  • Assembler
  • Linker
  • Loader
Below described are the roles of cousins of the compiler
  1. Pre-processor :
    • Preprocessor produces input to compiler. They may perform the following functions :
      • Macro processing : A preprocessor may allow user to de for longer constructs.
      • File inclusion: A preprocessor may include the header file into the program text.
      • Rational preprocessor: Such a preprocessor provides the user with built in macro for construct like while statement or if statement.
      • Language extensions: this processors attempt to add capabilities to the language by what amount to built in macros.
  2. Assembler :
    • Assembler is a translator which takes the assembly program as machine code as a output.
    • An Assembler is a mnemonic version of the machine code.
  3. Linker
    • Linker allows us to make a single program from a several files of relocatable machine code. These file may have been the result of several different compilation, and one or more may be library files of routine provided by a system
  4. Loader
    • The process of loading consists of taking relocatable machine code, altering the relocatable address and placing the altered instructions and data in memory at proper location