Download presentation
Presentation is loading. Please wait.
Published byDylan Perkins Modified over 9 years ago
1
1.3 Analysis And Synthesis OF LP Language Processor = Analysis of Source Program + Synthesis of Target Program. 1
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. 2
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. 3
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. 4
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. 5
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. 6
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. 7
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.