SlideShare a Scribd company logo
PROCESSOR
Lesson 4
MANOLO L. GIRON
RMTU
Structure of Programming Language
TYPES OF LANGUAGE PROCESSOR
• 1.) ASSEMBLER
Is a translator program that translates assembly language to machine language.
• 2.) INTERPRETER
A type of language processor that operates one instruction at a time, translating a high-level language statement
and executing immediately.
Generally run more slowly than compiled programs.
• 3.) COMPILER
Is a translator program, which transforms a source program, composed of high-level language statement into an
object program consisting of machine-language executable code.
Structure of Programming Language
Compilation Occurs in 2 Broad Phases
1. Decomposes the source program into small identifiable units and analyzes
it for syntactical accuracy.
2. Takes the machine-code modules associated with the basic units identified
in the 1st phase and uses them to compose the object program.
Structure of Programming Language
THE COMPILE PROCESS
• SOURCE PROGRAM ANALYSIS
• LEXICAL ANALYSIS
• TOKENS
• SYMBOL TABLES
• SYSNTACTIC ANALYSIS
• PARSE TREE/ SYNTAX TREE
• ERROR HANDLER
• OPTIMIZATION
Structure of Programming Language
SOURCE PROGRAM ANALYSIS
• The first phase of the compile process encompasses the lexical analysis and
the syntactic analysis, producing the symbol table and intermediate
(assembly-level) code.
Structure of Programming Language
LEXICAL ANALYSIS
• Is concerned with the actual text of the program, which is considered to be a
meaningful sequence of characters.
Structure of Programming Language
TOKENS
• Separate pieces of programs.
• Are the basic symbols used by the program: identifiers, operators,
punctuation, language keywords, constants.
Structure of Programming Language
SYMBOL TABLES
• Also called the dictionary.
• Map program symbols such as variables with their properties such types, size,
and relative location.
Structure of Programming Language
SYNTACTIC ANALYSIS
• Is concerned with identifying the logical structure of the program in
accordance with the rules of grammar governing the high level language.
Structure of Programming Language
PARSE TREE/ SYNTAX TREE
• Contains the hierarchy of operations in the high-level language statements.
• Every leaf node contains one of the symbols (tokens) in the statement.
Structure of Programming Language
ERROR HANDLER
• During the lexical and syntactical analyses, information regarding an error
encountered is sent to the error handler module of the compiler, which will
arrange to print out a message to the user.
Structure of Programming Language
INTERMEDIATE CODE
GENERATION
• The result of the lexical and syntactic analyses and the information in the
symbol table are brought together to produce program code in some
intermediate from similar to assembly- language code.
• Output from the syntactic analysis step, the intermediate code serves as
input to the code generation step.
• Output from the syntactic analysis step the intermediate code serves as
input to the code generation step.
Structure of Programming Language
OPTIMIZATION
• To produce efficient code
• To make more efficient use of main storage and processor time
• To correct “ bad programming practice”
• For detecting code that can be moved out of a loop ( to improve the efficiency of
the program, and its logical structure).
• Detection and elimination of dead code
• A DEAD CODE is a program code that is accessible in the normal processing of
the program and will consequently never be executed.
Structure of Programming Language
REFERENCES
• CONCEPTS OF
PROGRAMMING LANGUAGES
TENTH EDITION
ROBERT W. SEBESTA
Structure of Programming Language

More Related Content

What's hot

Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to Compilers
Akhil Kaushik
 
Compiler design
Compiler designCompiler design
Compiler design
suganyasanjai
 
Interpreters & Debuggers
Interpreters  &  DebuggersInterpreters  &  Debuggers
Interpreters & Debuggers
Malek Sumaiya
 
introduction to Programming Lecture 1
introduction to Programming Lecture 1introduction to Programming Lecture 1
introduction to Programming Lecture 1
yarafghani
 
basics of compiler design
basics of compiler designbasics of compiler design
basics of compiler design
Preeti Katiyar
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design Basics
Akhil Kaushik
 
Compiler design
Compiler designCompiler design
Compiler design
Thakur Ganeshsingh Thakur
 
Language processor
Language processorLanguage processor
Language processorAbha Damani
 
Compiler Construction Course - Introduction
Compiler Construction Course - IntroductionCompiler Construction Course - Introduction
Compiler Construction Course - Introduction
Muhammad Sanaullah
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction
Sarmad Ali
 
Compilers and interpreters
Compilers and interpretersCompilers and interpreters
Compilers and interpretersRAJU KATHI
 
Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer program
Abhay Kumar
 
Programming Languages / Translators
Programming Languages / TranslatorsProgramming Languages / Translators
Programming Languages / Translators
Project Student
 
Lecture 1 introduction to language processors
Lecture 1  introduction to language processorsLecture 1  introduction to language processors
Lecture 1 introduction to language processors
Rebaz Najeeb
 
Introduction to Programming Languages
Introduction to Programming LanguagesIntroduction to Programming Languages
Introduction to Programming Languages
educationfront
 
Languages in computer
Languages in computerLanguages in computer
Languages in computer
The University of Lahore
 
Language processing activity
Language processing activityLanguage processing activity
Language processing activity
Dhruv Sabalpara
 
Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)
guest251d9a
 

What's hot (20)

Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to Compilers
 
Compiler design
Compiler designCompiler design
Compiler design
 
Interpreters & Debuggers
Interpreters  &  DebuggersInterpreters  &  Debuggers
Interpreters & Debuggers
 
introduction to Programming Lecture 1
introduction to Programming Lecture 1introduction to Programming Lecture 1
introduction to Programming Lecture 1
 
basics of compiler design
basics of compiler designbasics of compiler design
basics of compiler design
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design Basics
 
Compiler design
Compiler designCompiler design
Compiler design
 
Language processor
Language processorLanguage processor
Language processor
 
Compiler Construction Course - Introduction
Compiler Construction Course - IntroductionCompiler Construction Course - Introduction
Compiler Construction Course - Introduction
 
Unit 2
Unit 2Unit 2
Unit 2
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction
 
Compilers and interpreters
Compilers and interpretersCompilers and interpreters
Compilers and interpreters
 
Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer program
 
Programming Languages / Translators
Programming Languages / TranslatorsProgramming Languages / Translators
Programming Languages / Translators
 
Lecture 1 introduction to language processors
Lecture 1  introduction to language processorsLecture 1  introduction to language processors
Lecture 1 introduction to language processors
 
Introduction to Programming Languages
Introduction to Programming LanguagesIntroduction to Programming Languages
Introduction to Programming Languages
 
Languages in computer
Languages in computerLanguages in computer
Languages in computer
 
Language processing activity
Language processing activityLanguage processing activity
Language processing activity
 
Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 

Similar to 4. processor

Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction
Thapar Institute
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design Basics
Akhil Kaushik
 
Compiler an overview
Compiler  an overviewCompiler  an overview
Compiler an overview
amudha arul
 
Principles of Compiler Design - Introduction
Principles of Compiler Design - IntroductionPrinciples of Compiler Design - Introduction
Principles of Compiler Design - Introduction
sheelarajasekar205
 
Chapter 1.pptx
Chapter 1.pptxChapter 1.pptx
Chapter 1.pptx
NesredinTeshome1
 
Compiler design
Compiler designCompiler design
Compiler design
sanchi29
 
PCSG_Computer_Science_Unit_1_Lecture_2.pptx
PCSG_Computer_Science_Unit_1_Lecture_2.pptxPCSG_Computer_Science_Unit_1_Lecture_2.pptx
PCSG_Computer_Science_Unit_1_Lecture_2.pptx
AliyahAli19
 
Week 08_Basics of Compiler Construction.pdf
Week 08_Basics of Compiler Construction.pdfWeek 08_Basics of Compiler Construction.pdf
Week 08_Basics of Compiler Construction.pdf
AnonymousQ3EMYoWNS
 
4_5802928814682016556.pptx
4_5802928814682016556.pptx4_5802928814682016556.pptx
4_5802928814682016556.pptx
AshenafiGirma5
 
CD - CH1 - Introduction to compiler design.pptx
CD - CH1 - Introduction to compiler design.pptxCD - CH1 - Introduction to compiler design.pptx
CD - CH1 - Introduction to compiler design.pptx
ZiyadMohammed17
 
Cd ch1 - introduction
Cd   ch1 - introductionCd   ch1 - introduction
Cd ch1 - introduction
mengistu23
 
COMPILER DESIGN PPTS.pptx
COMPILER DESIGN PPTS.pptxCOMPILER DESIGN PPTS.pptx
COMPILER DESIGN PPTS.pptx
MUSHAMHARIKIRAN6737
 
Compier Design_Unit I.ppt
Compier Design_Unit I.pptCompier Design_Unit I.ppt
Compier Design_Unit I.ppt
sivaganesh293
 
Compier Design_Unit I.ppt
Compier Design_Unit I.pptCompier Design_Unit I.ppt
Compier Design_Unit I.ppt
sivaganesh293
 
Phases of Compiler.pptx
Phases of Compiler.pptxPhases of Compiler.pptx
Phases of Compiler.pptx
ssuser3b4934
 
SSD Mod 2 -18CS61_Notes.pdf
SSD Mod 2 -18CS61_Notes.pdfSSD Mod 2 -18CS61_Notes.pdf
SSD Mod 2 -18CS61_Notes.pdf
JacobDragonette
 
design intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdfdesign intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdf
advRajatSharma
 
compiler construction tool in computer science .
compiler construction tool in computer science .compiler construction tool in computer science .
compiler construction tool in computer science .
RanitHalder
 
Phases of Compiler.pdf
Phases of Compiler.pdfPhases of Compiler.pdf
Phases of Compiler.pdf
SuchandaBanerjee6
 
Pros and cons of c as a compiler language
  Pros and cons of c as a compiler language  Pros and cons of c as a compiler language
Pros and cons of c as a compiler language
Ashok Raj
 

Similar to 4. processor (20)

Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design Basics
 
Compiler an overview
Compiler  an overviewCompiler  an overview
Compiler an overview
 
Principles of Compiler Design - Introduction
Principles of Compiler Design - IntroductionPrinciples of Compiler Design - Introduction
Principles of Compiler Design - Introduction
 
Chapter 1.pptx
Chapter 1.pptxChapter 1.pptx
Chapter 1.pptx
 
Compiler design
Compiler designCompiler design
Compiler design
 
PCSG_Computer_Science_Unit_1_Lecture_2.pptx
PCSG_Computer_Science_Unit_1_Lecture_2.pptxPCSG_Computer_Science_Unit_1_Lecture_2.pptx
PCSG_Computer_Science_Unit_1_Lecture_2.pptx
 
Week 08_Basics of Compiler Construction.pdf
Week 08_Basics of Compiler Construction.pdfWeek 08_Basics of Compiler Construction.pdf
Week 08_Basics of Compiler Construction.pdf
 
4_5802928814682016556.pptx
4_5802928814682016556.pptx4_5802928814682016556.pptx
4_5802928814682016556.pptx
 
CD - CH1 - Introduction to compiler design.pptx
CD - CH1 - Introduction to compiler design.pptxCD - CH1 - Introduction to compiler design.pptx
CD - CH1 - Introduction to compiler design.pptx
 
Cd ch1 - introduction
Cd   ch1 - introductionCd   ch1 - introduction
Cd ch1 - introduction
 
COMPILER DESIGN PPTS.pptx
COMPILER DESIGN PPTS.pptxCOMPILER DESIGN PPTS.pptx
COMPILER DESIGN PPTS.pptx
 
Compier Design_Unit I.ppt
Compier Design_Unit I.pptCompier Design_Unit I.ppt
Compier Design_Unit I.ppt
 
Compier Design_Unit I.ppt
Compier Design_Unit I.pptCompier Design_Unit I.ppt
Compier Design_Unit I.ppt
 
Phases of Compiler.pptx
Phases of Compiler.pptxPhases of Compiler.pptx
Phases of Compiler.pptx
 
SSD Mod 2 -18CS61_Notes.pdf
SSD Mod 2 -18CS61_Notes.pdfSSD Mod 2 -18CS61_Notes.pdf
SSD Mod 2 -18CS61_Notes.pdf
 
design intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdfdesign intoduction of_COMPILER_DESIGN.pdf
design intoduction of_COMPILER_DESIGN.pdf
 
compiler construction tool in computer science .
compiler construction tool in computer science .compiler construction tool in computer science .
compiler construction tool in computer science .
 
Phases of Compiler.pdf
Phases of Compiler.pdfPhases of Compiler.pdf
Phases of Compiler.pdf
 
Pros and cons of c as a compiler language
  Pros and cons of c as a compiler language  Pros and cons of c as a compiler language
Pros and cons of c as a compiler language
 

More from Zambales National High School

8. digital integrated circuit
8. digital integrated circuit8. digital integrated circuit
8. digital integrated circuit
Zambales National High School
 
7. transformer and diode
7. transformer and diode7. transformer and diode
7. transformer and diode
Zambales National High School
 
5. resistor and capacitor application
5. resistor and capacitor application5. resistor and capacitor application
5. resistor and capacitor application
Zambales National High School
 
6. transistor
6. transistor6. transistor
4. resistor and capacitor
4. resistor and capacitor4. resistor and capacitor
4. resistor and capacitor
Zambales National High School
 
2. Basic Electronics Circuit
2. Basic Electronics Circuit2. Basic Electronics Circuit
2. Basic Electronics Circuit
Zambales National High School
 
3. basic electrical and electronic symbol
3. basic electrical and electronic symbol3. basic electrical and electronic symbol
3. basic electrical and electronic symbol
Zambales National High School
 
11. abstraction and capsulation
11. abstraction and capsulation11. abstraction and capsulation
11. abstraction and capsulation
Zambales National High School
 
10. sub program
10. sub program10. sub program
9. control statement
9. control statement9. control statement
9. control statement
Zambales National High School
 
8. data types
8. data types8. data types
7. name binding and scopes
7. name binding and scopes7. name binding and scopes
7. name binding and scopes
Zambales National High School
 
6. describing syntax and semantics
6. describing syntax and semantics6. describing syntax and semantics
6. describing syntax and semantics
Zambales National High School
 
5. evolution
5. evolution5. evolution
3. criteria
3. criteria3. criteria
2. pl domain
2. pl domain2. pl domain
1. reason why study spl
1. reason why study spl1. reason why study spl
1. reason why study spl
Zambales National High School
 
18. the components of the system unit
18. the components of the system unit18. the components of the system unit
18. the components of the system unit
Zambales National High School
 
17. software for home, personal, and educational
17. software for home, personal, and educational17. software for home, personal, and educational
17. software for home, personal, and educational
Zambales National High School
 
16. graphics and multimedia software
16. graphics and multimedia software16. graphics and multimedia software
16. graphics and multimedia software
Zambales National High School
 

More from Zambales National High School (20)

8. digital integrated circuit
8. digital integrated circuit8. digital integrated circuit
8. digital integrated circuit
 
7. transformer and diode
7. transformer and diode7. transformer and diode
7. transformer and diode
 
5. resistor and capacitor application
5. resistor and capacitor application5. resistor and capacitor application
5. resistor and capacitor application
 
6. transistor
6. transistor6. transistor
6. transistor
 
4. resistor and capacitor
4. resistor and capacitor4. resistor and capacitor
4. resistor and capacitor
 
2. Basic Electronics Circuit
2. Basic Electronics Circuit2. Basic Electronics Circuit
2. Basic Electronics Circuit
 
3. basic electrical and electronic symbol
3. basic electrical and electronic symbol3. basic electrical and electronic symbol
3. basic electrical and electronic symbol
 
11. abstraction and capsulation
11. abstraction and capsulation11. abstraction and capsulation
11. abstraction and capsulation
 
10. sub program
10. sub program10. sub program
10. sub program
 
9. control statement
9. control statement9. control statement
9. control statement
 
8. data types
8. data types8. data types
8. data types
 
7. name binding and scopes
7. name binding and scopes7. name binding and scopes
7. name binding and scopes
 
6. describing syntax and semantics
6. describing syntax and semantics6. describing syntax and semantics
6. describing syntax and semantics
 
5. evolution
5. evolution5. evolution
5. evolution
 
3. criteria
3. criteria3. criteria
3. criteria
 
2. pl domain
2. pl domain2. pl domain
2. pl domain
 
1. reason why study spl
1. reason why study spl1. reason why study spl
1. reason why study spl
 
18. the components of the system unit
18. the components of the system unit18. the components of the system unit
18. the components of the system unit
 
17. software for home, personal, and educational
17. software for home, personal, and educational17. software for home, personal, and educational
17. software for home, personal, and educational
 
16. graphics and multimedia software
16. graphics and multimedia software16. graphics and multimedia software
16. graphics and multimedia software
 

Recently uploaded

June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 

Recently uploaded (20)

June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 

4. processor

  • 1. PROCESSOR Lesson 4 MANOLO L. GIRON RMTU Structure of Programming Language
  • 2. TYPES OF LANGUAGE PROCESSOR • 1.) ASSEMBLER Is a translator program that translates assembly language to machine language. • 2.) INTERPRETER A type of language processor that operates one instruction at a time, translating a high-level language statement and executing immediately. Generally run more slowly than compiled programs. • 3.) COMPILER Is a translator program, which transforms a source program, composed of high-level language statement into an object program consisting of machine-language executable code. Structure of Programming Language
  • 3. Compilation Occurs in 2 Broad Phases 1. Decomposes the source program into small identifiable units and analyzes it for syntactical accuracy. 2. Takes the machine-code modules associated with the basic units identified in the 1st phase and uses them to compose the object program. Structure of Programming Language
  • 4. THE COMPILE PROCESS • SOURCE PROGRAM ANALYSIS • LEXICAL ANALYSIS • TOKENS • SYMBOL TABLES • SYSNTACTIC ANALYSIS • PARSE TREE/ SYNTAX TREE • ERROR HANDLER • OPTIMIZATION Structure of Programming Language
  • 5. SOURCE PROGRAM ANALYSIS • The first phase of the compile process encompasses the lexical analysis and the syntactic analysis, producing the symbol table and intermediate (assembly-level) code. Structure of Programming Language
  • 6. LEXICAL ANALYSIS • Is concerned with the actual text of the program, which is considered to be a meaningful sequence of characters. Structure of Programming Language
  • 7. TOKENS • Separate pieces of programs. • Are the basic symbols used by the program: identifiers, operators, punctuation, language keywords, constants. Structure of Programming Language
  • 8. SYMBOL TABLES • Also called the dictionary. • Map program symbols such as variables with their properties such types, size, and relative location. Structure of Programming Language
  • 9. SYNTACTIC ANALYSIS • Is concerned with identifying the logical structure of the program in accordance with the rules of grammar governing the high level language. Structure of Programming Language
  • 10. PARSE TREE/ SYNTAX TREE • Contains the hierarchy of operations in the high-level language statements. • Every leaf node contains one of the symbols (tokens) in the statement. Structure of Programming Language
  • 11. ERROR HANDLER • During the lexical and syntactical analyses, information regarding an error encountered is sent to the error handler module of the compiler, which will arrange to print out a message to the user. Structure of Programming Language
  • 12. INTERMEDIATE CODE GENERATION • The result of the lexical and syntactic analyses and the information in the symbol table are brought together to produce program code in some intermediate from similar to assembly- language code. • Output from the syntactic analysis step, the intermediate code serves as input to the code generation step. • Output from the syntactic analysis step the intermediate code serves as input to the code generation step. Structure of Programming Language
  • 13. OPTIMIZATION • To produce efficient code • To make more efficient use of main storage and processor time • To correct “ bad programming practice” • For detecting code that can be moved out of a loop ( to improve the efficiency of the program, and its logical structure). • Detection and elimination of dead code • A DEAD CODE is a program code that is accessible in the normal processing of the program and will consequently never be executed. Structure of Programming Language
  • 14. REFERENCES • CONCEPTS OF PROGRAMMING LANGUAGES TENTH EDITION ROBERT W. SEBESTA Structure of Programming Language