GROUPING OF THE PHASES
Compiler can be grouped into front and back ends:
Front end: analysis (machine independent)
These normally include lexical and syntactic analysis, the creation of the symbol table, semantic analysis and the generation of intermediate code. It also includes error handling that goes along with each of these phases.
Back end: synthesis (machine dependent)
It includes code optimization phase and code generation along with the necessary error handling and symbol table operations.
A collection of phases is done only once (single pass) or multiple times (multi pass)
· Single pass: usually requires everything to be defined before being used in source program.
· Multi pass: compiler may have to keep entire program representation in memory.
Several phases can be grouped into one single
pass and the activities of these phases are interleaved during the pass. For
example, lexical analysis, syntax analysis, semantic analysis and intermediate
code generation might be grouped into one pass.
Copyright © 2018-2021 BrainKart.com; All Rights Reserved. (BS) Developed by Therithal info, Chennai.