Pages

Tuesday, April 24, 2018

Components of Compiler

Components of Compiler




Hello friends, in our previous posts we have discussed about basics of compiler. Components of compiler are the next important step to understand compiler. These are very important and interesting to understand compiler. Compiler has been divided into no. of components to make its working simpler. These works together to produce the desire output



Compilation procedure is divided into 6 phases and these are grouped into 2 parts:

      1.       Analysis: In this part source program is broken into constituent pieces and creates an intermediate representation of the source program. It includes following important phases.

          a.       Lexical analysis
          b.      Syntax analysis
          c.       Semantic analysis


      2.       Synthesis: in this part construction of the desired target program from intermediate representation is done. It includes following important phases.
          a.       Intermediate code generation
          b.      Code optimization
          c.       Storage allocation
          d.      Code generation

These phases will be discussed in more detail in next posts.

Different phases of Compiler

Modern approaches to compilerdesign

1.       Earlier compilers were divided into many passes to save SPACE. When each pass is finished, the compiler can free the space.

2.       Modern compiler user �TWO STAGE� design:
        a.       First stage:
                           i.      front end: source language Intermediate representation
        b.      Second stage:
                           i.      Back end : intermediate representationoutput language













               



visit link download

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.