Home | | Compiler Design | Grouping of the Phases

Chapter: Principles of Compiler Design : Lexical Analysis

Grouping of the Phases

Front end: analysis (machine independent), Back end: synthesis (machine dependent)

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.

 

Compiler passes

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.

Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
Principles of Compiler Design : Lexical Analysis : Grouping of the Phases |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2023 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.