Presentation is loading. Please wait.

Presentation is loading. Please wait.

INTRODUCTION TO COMPILERS (Pavan)

Similar presentations


Presentation on theme: "INTRODUCTION TO COMPILERS (Pavan)"— Presentation transcript:

1 INTRODUCTION TO COMPILERS (Pavan)

2 Language A   Language B
Compiler can be very broadly defined as a program that converts anything written in one language to another language. If we have the following: Language A   Language B COMPILER

3 For this conversion from Language A to Language B to be completely possible, B must be at least as powerful as A, i.e. B can more or equally powerful as A. By “powerful” we mean that language B must express everything that can be expressed by language A, if not more.

4 But the reverse is not true
But the reverse is not true. If Language A cannot be translated to Language B, that does not mean A is more powerful than B.

5 The more widely accepted definition of the compiler is that it converts any high level computer language program to a lower level computer language program. The level of a language must not be confused with the power of the language. The higher level computer language usually means a language that is more user-friendly, which can be less powerful than a lower level language.

6 Compilers for natural language are not generally made because natural languages have very less structure in them. Generally all computer languages that are compiled using compilers have grammars in them which are known as Context Free Grammars (CFG), and hence these languages are known as Context Free Languages (CFL).

7 There are different steps that are carried out by the compiler to convert one language to another. They are as follows : Language B Language A Intermediate Code generation Lexical analyser Syntax analyser Semantic analyser Code optimisation


Download ppt "INTRODUCTION TO COMPILERS (Pavan)"

Similar presentations


Ads by Google