SlideShare a Scribd company logo
WELCOME
Name: Dhrumil I. Panchal
Enrollment No.: 170410107053
Subject: System Programming
Branch: Computer Engineering
Sem: 5th Sem
Year: 2019-20
Topic
Toy Interpreter
Contain
 Interpreter
 Toy Interpreter
 Interpreter Data Structure
Interpreter
 An interpreter is system software that translates a
given High-Level Language (HLL) program into a
low-level one, but it differs from compilers.
 Interpretation is a real-time activity where an
interpreter takes the program, one statement at a
time, and translates each line before executing it.
Toy Interpreter
 It is language processor that bridges execution
gap of a program without generating a target
program.
 The interpreter is itself a program in a
programming language , which is compiled by a
compiler of that language.
 The interpreter uses the symbol table and the
data stores are as follows: The symbol table has
entries for all the variables used in the program .
Each entry holds the name , type and address of
the variable.
Toy Interpreter
 The data store that holds values of all program
variables and partial results during interpretation.
 It consists of two large arrays named rvar and ivar
which are used to store values of types real and
integer respectively.
 Last few locations in the array rvar and ivar are
used to stacks for expression evaluation with the
help of pointers r_tos and i_ios respectively. The
stack grows upward in the array.
Toy Interpreter
 Each entry in the symbol table is a variable of
type symmetry. The type field of the entry is a
variable of enumerated type which takes either
real_type or int_type as its values.
Toy Interpreter
 The interpreter program contains a set of routines
for use in expression evaluations one routine for
each kind of legal sub expression.
real a, b
integer c
let c=7
let b=1.2
a = b + c
Toy Interpreter
 It implements the meaning by invoking
appropriate routines.
 ivar[5] :=7
 Similarly rvar[13] :=1.2
 For interpretation of a=b+c procedure add is
called with the symbol table entries of b and c.
 add analyzes the type of b and c and decides that
procedure addrealint will have to be called to
realize the addition.
Toy Interpreter
 Addrealint executes rvar[r_tos] :=rvar[13] +
ivar[5];
 So while compiling the expression rvar[addr1] +
ivar[addr2]
 Thus , the interpreter simply arranges to execute
this statement under the right conditions.
Interpreter Data Structure
Symbol Type Address
a real 8
b real 13
c int 5
rvar
a
b
ivar
c
Symbol Table
8
13
r_tos
5
i_tos
References
 Inspiration from Prof. Shrina Patel and Prof. Rimi
Gupta
 Notes of SP
 System Programming By D M Dhamdhere
 Images from Google Images
 Some My Own Knowledge
Thank You

More Related Content

PPTX
1.10 Project Scheduling in Software Engineering.pptx
PDF
Android向けUnity製ゲーム最適化のためのCI/CDと連携した自動プロファイリングシステム
PDF
5.Elements of Assembly Language in System Software.pdf
PDF
Deep Learning: Recurrent Neural Network (Chapter 10)
PPT
OpenGL Basics
PPTX
Counting, mathematical induction and discrete probability
PDF
Transforming deep into transformers – a computer vision approach
ODP
The Art Of Debugging
1.10 Project Scheduling in Software Engineering.pptx
Android向けUnity製ゲーム最適化のためのCI/CDと連携した自動プロファイリングシステム
5.Elements of Assembly Language in System Software.pdf
Deep Learning: Recurrent Neural Network (Chapter 10)
OpenGL Basics
Counting, mathematical induction and discrete probability
Transforming deep into transformers – a computer vision approach
The Art Of Debugging

What's hot (20)

ODP
Unity ネイティブプラグインの作成について
PPT
Chapter 01
PDF
ゲームアプリの数学@GREE GameDevelopers' Meetup
PPTX
Software Measurement and Metrics.pptx
PPTX
Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...
PDF
Attention mechanism 소개 자료
PPTX
Inference in First-Order Logic
DOCX
IBM Study material
PDF
CNN Attention Networks
PPTX
What is OpenGL ?
PPTX
Chapter 2 software process models
PPTX
First Order Logic
PDF
ARでVRアバターを表示するシステムを構築しよう
PPT
opengl.ppt
PPTX
Quality and Productivity Factors in Software Engineering
PPTX
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMER
PDF
Software Engineering - Ch12
PPTX
Making High Quality Interactive VR with Unreal Engine Luis Cataldi
PPTX
Software maintenance
PPT
Plug-ins & Third-Party SDKs in UE4
Unity ネイティブプラグインの作成について
Chapter 01
ゲームアプリの数学@GREE GameDevelopers' Meetup
Software Measurement and Metrics.pptx
Computer Graphics - Bresenham's line drawing algorithm & Mid Point Circle alg...
Attention mechanism 소개 자료
Inference in First-Order Logic
IBM Study material
CNN Attention Networks
What is OpenGL ?
Chapter 2 software process models
First Order Logic
ARでVRアバターを表示するシステムを構築しよう
opengl.ppt
Quality and Productivity Factors in Software Engineering
K-MAP(KARNAUGH MAP)BY THE SILENT PROGRAMMER
Software Engineering - Ch12
Making High Quality Interactive VR with Unreal Engine Luis Cataldi
Software maintenance
Plug-ins & Third-Party SDKs in UE4
Ad

Similar to Toy Interpreter (20)

PPT
Concept of compiler in details
PPT
C program
PDF
Language processors
PPT
1. overview of c
PPTX
Basic of compiler
PDF
C language for Semester Exams for Engineers
PPT
A basic introduction to compiler design.ppt
PPT
A basic introduction to compiler design.ppt
PPTX
C programming
PPTX
Compiler
PPTX
Compiler Design
PPT
C Lang notes.ppt
PPTX
SPOS UNIT1 PPTS (1).pptx
PDF
PDF
Lecture 2.1 - Phase of a Commmmpiler.pdf
PPTX
data type.pptxddddswwyertr hai na ki extend kr de la
PDF
Introduction-to-Iteration.pdf
PDF
Algorithm and c language
PDF
PPTX
System Programming Overview
Concept of compiler in details
C program
Language processors
1. overview of c
Basic of compiler
C language for Semester Exams for Engineers
A basic introduction to compiler design.ppt
A basic introduction to compiler design.ppt
C programming
Compiler
Compiler Design
C Lang notes.ppt
SPOS UNIT1 PPTS (1).pptx
Lecture 2.1 - Phase of a Commmmpiler.pdf
data type.pptxddddswwyertr hai na ki extend kr de la
Introduction-to-Iteration.pdf
Algorithm and c language
System Programming Overview
Ad

More from Dhrumil Panchal (20)

PPTX
YouTube Cryptocurrency Scam
PPTX
This and Static Keyword
PPTX
Servlet and Servlet Life Cycle
PPTX
Properties and Indexers
PPTX
Chomsky Normal Form
PPTX
IEEE 802.11 Architecture and Services
PPTX
Key roles for successful analytic project in Data Mining
PPTX
Dynamic Programming Code-Optimization Algorithm (Compiler Design)
PPTX
Different Software Testing Types and CMM Standard
PPTX
Web Design Issues
PPTX
Traditional Problems Associated with Computer Crime
PPTX
Breadth First Search (BFS)
PPTX
Timing Diagram of MVI Instruction of 8085 Microprocessor
PPTX
File Management – File Concept, access methods, File types and File Operation
PPTX
Constructor and Types of Constructors
PPTX
Types of Instruction Format
PPTX
Types of Cables(Guided Media for Transmisson)
PPTX
Global Service for Mobile Communication
PPTX
Denial of Service Attack
PPTX
Fourier Series
YouTube Cryptocurrency Scam
This and Static Keyword
Servlet and Servlet Life Cycle
Properties and Indexers
Chomsky Normal Form
IEEE 802.11 Architecture and Services
Key roles for successful analytic project in Data Mining
Dynamic Programming Code-Optimization Algorithm (Compiler Design)
Different Software Testing Types and CMM Standard
Web Design Issues
Traditional Problems Associated with Computer Crime
Breadth First Search (BFS)
Timing Diagram of MVI Instruction of 8085 Microprocessor
File Management – File Concept, access methods, File types and File Operation
Constructor and Types of Constructors
Types of Instruction Format
Types of Cables(Guided Media for Transmisson)
Global Service for Mobile Communication
Denial of Service Attack
Fourier Series

Recently uploaded (20)

PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
Sustainable Sites - Green Building Construction
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
CH1 Production IntroductoryConcepts.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
R24 SURVEYING LAB MANUAL for civil enggi
Foundation to blockchain - A guide to Blockchain Tech
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Automation-in-Manufacturing-Chapter-Introduction.pdf
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
bas. eng. economics group 4 presentation 1.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Sustainable Sites - Green Building Construction
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
CH1 Production IntroductoryConcepts.pptx

Toy Interpreter

  • 1. WELCOME Name: Dhrumil I. Panchal Enrollment No.: 170410107053 Subject: System Programming Branch: Computer Engineering Sem: 5th Sem Year: 2019-20
  • 3. Contain  Interpreter  Toy Interpreter  Interpreter Data Structure
  • 4. Interpreter  An interpreter is system software that translates a given High-Level Language (HLL) program into a low-level one, but it differs from compilers.  Interpretation is a real-time activity where an interpreter takes the program, one statement at a time, and translates each line before executing it.
  • 5. Toy Interpreter  It is language processor that bridges execution gap of a program without generating a target program.  The interpreter is itself a program in a programming language , which is compiled by a compiler of that language.  The interpreter uses the symbol table and the data stores are as follows: The symbol table has entries for all the variables used in the program . Each entry holds the name , type and address of the variable.
  • 6. Toy Interpreter  The data store that holds values of all program variables and partial results during interpretation.  It consists of two large arrays named rvar and ivar which are used to store values of types real and integer respectively.  Last few locations in the array rvar and ivar are used to stacks for expression evaluation with the help of pointers r_tos and i_ios respectively. The stack grows upward in the array.
  • 7. Toy Interpreter  Each entry in the symbol table is a variable of type symmetry. The type field of the entry is a variable of enumerated type which takes either real_type or int_type as its values.
  • 8. Toy Interpreter  The interpreter program contains a set of routines for use in expression evaluations one routine for each kind of legal sub expression. real a, b integer c let c=7 let b=1.2 a = b + c
  • 9. Toy Interpreter  It implements the meaning by invoking appropriate routines.  ivar[5] :=7  Similarly rvar[13] :=1.2  For interpretation of a=b+c procedure add is called with the symbol table entries of b and c.  add analyzes the type of b and c and decides that procedure addrealint will have to be called to realize the addition.
  • 10. Toy Interpreter  Addrealint executes rvar[r_tos] :=rvar[13] + ivar[5];  So while compiling the expression rvar[addr1] + ivar[addr2]  Thus , the interpreter simply arranges to execute this statement under the right conditions.
  • 11. Interpreter Data Structure Symbol Type Address a real 8 b real 13 c int 5 rvar a b ivar c Symbol Table 8 13 r_tos 5 i_tos
  • 12. References  Inspiration from Prof. Shrina Patel and Prof. Rimi Gupta  Notes of SP  System Programming By D M Dhamdhere  Images from Google Images  Some My Own Knowledge