Analysis Phase of C Compiler

The main objective of the project is to develop a usable compiler’s front end part that can be used for testing syntax and semantic of program that adheres to c-subset grammar.
In the analysis-synthesis model of a compiler, the front end analyzes a source program and creates an intermediate representation, from which the back end generates target code. Ideally, details of the source language are confined to the front end, and details of the target machine to the back end. With a suitably defined intermediate representation, a compiler for language i and machine j can then be built by combining the front end for language i with the back end for machine j. This approach to creating suite of compilers can save a considerable amount of effort: m*n compilers can be built by writing just m front ends and n back ends.

GNU Compiler Collection and Microsoft used same approach for the FORTRAN, Pascal and C++. All three have the different front end but same back end for x86 based machines. Hence it saves time as well as lot of effort also.

Tags :
Your rating: None Average: 2.7 (3 votes)