Syntax directed translators intermediate

nandhini342004 55 views 16 slides Sep 21, 2024
Slide 1
Slide 1 of 16
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16

About This Presentation

A Syntax – directed translation scheme is a convenient description of what we would like done.
The output defined is independent of the kind of parser used to construct the parse tree or the kind of mechanism used to compute the translations.
A Syntax – directed translation scheme provides ...


Slide Content

Implementation of syntax-directed translators & Intermediate Code

Defining Implementation of syntax-directed translators

Syntax Directed Definitions

Example of syntax-directed translation scheme

System – directed translation scheme for desk calculator

Implementation of desk calculator

Synthesized attributes

Evaluating an SDD at the nodes of a parse tree

Example of Parse tree with translations

Intermediate Code

Defining intermediate code

Example of intermediate code diagram

Intermediate code possible

Intermediate text introduces symbols

Four kinds of intermediate code

THANK YOU