1 / 7

1.3 Analysis And Synthesis OF LP

1.3 Analysis And Synthesis OF LP. Language Processor = Analysis of Source Program + Synthesis of Target Program. Analysis And Synthesis OF LP. We refer to the collection of language processor components engaged in analyzing a source program as analysis phase of the LP.

jkimes
Download Presentation

1.3 Analysis And Synthesis OF LP

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. 1.3 Analysis And Synthesis OF LP • Language Processor = Analysis of Source Program + Synthesis of Target Program.

  2. Analysis And Synthesis OF LP • We refer to the collection of language processor components engaged in analyzing a source program as analysis phase of the LP. • Components engaged in synthesizing a target program constitute the synthesis phase.

  3. 1. Analysis of Source Program • A specification of the source language forms the basis of source program analysis. The specification consist of three components.

  4. 1.1 Lexical Analyzer • Lexical rule which governs the formation of valid lexical units in the source language. • For example, it generates the token from syntax.

  5. 1.2 Syntax Analyzer • Syntax rule which govern the formation of valid statements in the source language. • For example, it find any syntax error like ; missing.

  6. 1.3 Semantic Analyzer • Semantic rules which associate meaning with valid statements of the language. • For example, the syntax “I saw child with telescope” has more then one meaning, but which one is valid.

  7. 2. Synthesis of Target Program • The synthesis phase is concerned with the construction of target language statements which have the same meaning as a source statement. • Typically this consist of two main activities: • Creation of data structure in the target program. • Generation of target code. • We refer to these activities as memory allocation and code generation activity.

More Related