1 / 7

INTRODUCTION TO COMPILERS (Pavan)

INTRODUCTION TO COMPILERS (Pavan). 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.

hayden
Télécharger la présentation

INTRODUCTION TO COMPILERS (Pavan)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. INTRODUCTION TO COMPILERS (Pavan)

  2. 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. 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

More Related