Lect 03
Lect 03
1
Front End vs Back End of a
Compilers(Cont’d)
2
Front End vs Back End of a
Compilers(Cont’d)
3
Front End vs Back End of a
Compilers(Cont’d)
4
Front End vs Back End of a
Compilers(Cont’d)
5
Passes
6
Passes(cont’d)
7
Passes(cont’d)
8
Passes(cont’d)
9
Multi Pass Compiler
10
Multi Pass Compiler(cont’d)
11
Multi Pass Compiler(cont’d)
12
Reducing The No of Passes
13
Reducing The No of Passes(cont’d)
14
Reducing The No of Passes(cont’d)
15
Reducing The No of Passes(cont’d)
16
Reducing The No of Passes(cont’d)
17
Reducing The No of Passes(cont’d)
18
Reducing The No of Passes(cont’d)
19
Reducing The No of Passes(cont’d)
20
Reducing The No of Passes(cont’d)
21
Reducing The No of Passes(cont’d)
22
Reducing The No of Passes(cont’d)
23
Reducing The No of Passes(cont’d)
24
Reducing The No of Passes(cont’d)
25
Reducing The No of Passes(cont’d)
26
Reducing The No of Passes(cont’d)
27
Compiler Construction Tools
28
Compiler Construction Tools(cont’d)
29
Compiler Construction Tools(cont’d)
30
Compiler Construction Tools(cont’d)
31
Compiler Construction Tools(cont’d)
32
Compiler Construction Tools(cont’d)
33
Compiler Construction Tools(cont’d)
34
Compiler Construction Tools(cont’d)
35
1) Parser Generators
36
Parser Generators(cont’d)
37
2) Scanner Generators
38
3) Syntax Directed Translation Engine
39
4) Automatic Code Generators
40
Automatic Code Generators(cont’d)
41
5) Data Flow Engines.
42
The Phases Of Compiler
43
Source Program
Lexical Analyzer
Syntax Analyzer
Code Optimizer
Code Generator
Target Program
44
A Compiler operates in phases ,each of which
transforms the source programme from one
representation to another.
In practice,some of the phases may be
grouped together.
The first three phases ,forming the bulk of the
analysis portion of a compiler
45
Two other activities , symbol table
management and error handling,are shown
interacting with the six phases of lexical
analysis, syntax analysis,semantic
analysis,intermediate code generation,code
optimization,and code generation.
Informally,we shall also call the symbol table
manager and error handler Phases.
46
THANKS
47