SlideShare une entreprise Scribd logo
1  sur  13
Introduction to Compiler Construction Robert van Engelen http://www.cs.fsu.edu/~engelen/courses/COP5621 COP5621 Compiler Construction Copyright Robert van Engelen, Florida State University, 2007-2009
Syllabus ,[object Object],[object Object],[object Object],[object Object],COP5621 Fall 2009
Syllabus, Assignments, and Schedule http://www.cs.fsu.edu/~engelen/courses/ COP5621   COP5621 Fall 2009
Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],COP5621 Fall 2009
Compilers and Interpreters ,[object Object],[object Object],Compiler Error messages Source Program Target Program Input Output COP5621 Fall 2009
Compilers and Interpreters (cont’d) ,[object Object],[object Object],Interpreter Source Program Input Output Error messages COP5621 Fall 2009
The Analysis-Synthesis Model of Compilation ,[object Object],[object Object],[object Object],COP5621 Fall 2009
Other Tools that Use the Analysis-Synthesis Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],COP5621 Fall 2009
Preprocessors, Compilers, Assemblers, and Linkers Preprocessor Compiler Assembler Linker Skeletal Source Program Source Program Target Assembly Program Relocatable Object Code Absolute Machine Code Libraries and Relocatable Object Files Try for example: gcc -v myprog.c COP5621 Fall 2009
The Phases of a Compiler COP5621 Fall 2009 Phase Output Sample Programmer (source code producer) Source string A=B+C; Scanner  (performs  lexical analysis ) Token string ‘ A’ ,  ‘=’ ,  ‘B’ ,  ‘+’ ,  ‘C’ ,  ‘;’ And  symbol table  with names Parser  (performs  syntax analysis  based on the grammar of the programming language) Parse tree or abstract syntax tree ;   |   =  / A  +   /   B  C Semantic analyzer  (type checking,  etc) Annotated parse tree or abstract syntax tree Intermediate code generator Three-address code, quads, or RTL int2fp B  t1 +  t1  C  t2 :=  t2  A Optimizer Three-address code, quads, or RTL int2fp B  t1 +  t1  #2.3  A Code generator Assembly code MOVF  #2.3,r1 ADDF2 r1,r2 MOVF  r2,A Peephole optimizer Assembly code ADDF2 #2.3,r2 MOVF  r2,A
The Grouping of Phases ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],COP5621 Fall 2009
Compiler-Construction Tools ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],COP5621 Fall 2009
Outline ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],COP5621 Fall 2009

Contenu connexe

Tendances

Compiler Construction
Compiler ConstructionCompiler Construction
Compiler ConstructionAhmed Raza
 
Chapter 1 1
Chapter 1 1Chapter 1 1
Chapter 1 1bolovv
 
Techniques & applications of Compiler
Techniques & applications of CompilerTechniques & applications of Compiler
Techniques & applications of CompilerPreethi AKNR
 
Lecture 1 introduction to language processors
Lecture 1  introduction to language processorsLecture 1  introduction to language processors
Lecture 1 introduction to language processorsRebaz Najeeb
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction Sarmad Ali
 
Passes of compilers
Passes of compilersPasses of compilers
Passes of compilersVairavel C
 
basics of compiler design
basics of compiler designbasics of compiler design
basics of compiler designPreeti Katiyar
 
Compiler Design Lecture Notes
Compiler Design Lecture NotesCompiler Design Lecture Notes
Compiler Design Lecture NotesFellowBuddy.com
 
Cs6660 compiler design
Cs6660 compiler designCs6660 compiler design
Cs6660 compiler designhari2010
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compilerIffat Anjum
 
Compiler Design(Nanthu)
Compiler Design(Nanthu)Compiler Design(Nanthu)
Compiler Design(Nanthu)guest91cc85
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler ConstructionSarmad Ali
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design BasicsAkhil Kaushik
 
Compiler designs presentation final
Compiler designs presentation  finalCompiler designs presentation  final
Compiler designs presentation finalilias ahmed
 

Tendances (20)

Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Chapter 1 1
Chapter 1 1Chapter 1 1
Chapter 1 1
 
Techniques & applications of Compiler
Techniques & applications of CompilerTechniques & applications of Compiler
Techniques & applications of Compiler
 
Compiler design
Compiler designCompiler design
Compiler design
 
Lecture 1 introduction to language processors
Lecture 1  introduction to language processorsLecture 1  introduction to language processors
Lecture 1 introduction to language processors
 
Compiler unit 1
Compiler unit 1Compiler unit 1
Compiler unit 1
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction
 
Passes of compilers
Passes of compilersPasses of compilers
Passes of compilers
 
basics of compiler design
basics of compiler designbasics of compiler design
basics of compiler design
 
Compiler Design Material
Compiler Design MaterialCompiler Design Material
Compiler Design Material
 
Compiler Design Lecture Notes
Compiler Design Lecture NotesCompiler Design Lecture Notes
Compiler Design Lecture Notes
 
Cs6660 compiler design
Cs6660 compiler designCs6660 compiler design
Cs6660 compiler design
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
 
Presentation compiler design
Presentation compiler designPresentation compiler design
Presentation compiler design
 
Compiler Design(Nanthu)
Compiler Design(Nanthu)Compiler Design(Nanthu)
Compiler Design(Nanthu)
 
Compiler
CompilerCompiler
Compiler
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design Basics
 
Compiler designs presentation final
Compiler designs presentation  finalCompiler designs presentation  final
Compiler designs presentation final
 
Compiler design
Compiler designCompiler design
Compiler design
 

En vedette

Chapter Seven(1)
Chapter Seven(1)Chapter Seven(1)
Chapter Seven(1)bolovv
 
Open course(programming languages) 20150225
Open course(programming languages) 20150225Open course(programming languages) 20150225
Open course(programming languages) 20150225JangChulho
 
4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languagesRohit Shrivastava
 
A Brief History of Programming
A Brief History of ProgrammingA Brief History of Programming
A Brief History of Programmingjxyz
 
Classification of Programming Languages
Classification of Programming LanguagesClassification of Programming Languages
Classification of Programming LanguagesProject Student
 
Evolution of Programming Languages
Evolution of Programming LanguagesEvolution of Programming Languages
Evolution of Programming LanguagesSayanee Basu
 
Presentation on computer language
Presentation on computer languagePresentation on computer language
Presentation on computer languageSwarnima Tiwari
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01Adil Kakakhel
 
Fortran introduction
Fortran introductionFortran introduction
Fortran introductionsanthosh833
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programmingSachin Sharma
 
Introduction to Programming Languages
Introduction to Programming LanguagesIntroduction to Programming Languages
Introduction to Programming Languageseducationfront
 

En vedette (20)

Ch2
Ch2Ch2
Ch2
 
01. introduction
01. introduction01. introduction
01. introduction
 
Chapter Seven(1)
Chapter Seven(1)Chapter Seven(1)
Chapter Seven(1)
 
The History of Programming Languages
The History of Programming LanguagesThe History of Programming Languages
The History of Programming Languages
 
Open course(programming languages) 20150225
Open course(programming languages) 20150225Open course(programming languages) 20150225
Open course(programming languages) 20150225
 
Programming Language
Programming LanguageProgramming Language
Programming Language
 
4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languages
 
A Brief History of Programming
A Brief History of ProgrammingA Brief History of Programming
A Brief History of Programming
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Syntax
SyntaxSyntax
Syntax
 
Evolution of Computer Languages
Evolution of Computer LanguagesEvolution of Computer Languages
Evolution of Computer Languages
 
History of programming
History of programmingHistory of programming
History of programming
 
Classification of Programming Languages
Classification of Programming LanguagesClassification of Programming Languages
Classification of Programming Languages
 
Evolution of Programming Languages
Evolution of Programming LanguagesEvolution of Programming Languages
Evolution of Programming Languages
 
Presentation on computer language
Presentation on computer languagePresentation on computer language
Presentation on computer language
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01
 
Compilers
CompilersCompilers
Compilers
 
Fortran introduction
Fortran introductionFortran introduction
Fortran introduction
 
Basic concepts of object oriented programming
Basic concepts of object oriented programmingBasic concepts of object oriented programming
Basic concepts of object oriented programming
 
Introduction to Programming Languages
Introduction to Programming LanguagesIntroduction to Programming Languages
Introduction to Programming Languages
 

Similaire à Ch1 (20)

Ch1_4.ppt
Ch1_4.pptCh1_4.ppt
Ch1_4.ppt
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Ch1 (1).ppt
Ch1 (1).pptCh1 (1).ppt
Ch1 (1).ppt
 
Ch1 (1).ppt
Ch1 (1).pptCh1 (1).ppt
Ch1 (1).ppt
 
Ch1.ppt
Ch1.pptCh1.ppt
Ch1.ppt
 
Ch1.ppt
Ch1.pptCh1.ppt
Ch1.ppt
 
Cd econtent link1
Cd econtent link1Cd econtent link1
Cd econtent link1
 
Cpcs302 1
Cpcs302  1Cpcs302  1
Cpcs302 1
 
Chapter#01 cc
Chapter#01 ccChapter#01 cc
Chapter#01 cc
 
Chapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdfChapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdf
 
Yacc (yet another compiler compiler)
Yacc (yet another compiler compiler)Yacc (yet another compiler compiler)
Yacc (yet another compiler compiler)
 
Chapter 1.pptx
Chapter 1.pptxChapter 1.pptx
Chapter 1.pptx
 
CD U1-5.pptx
CD U1-5.pptxCD U1-5.pptx
CD U1-5.pptx
 
LANGUAGE TRANSLATOR
LANGUAGE TRANSLATORLANGUAGE TRANSLATOR
LANGUAGE TRANSLATOR
 
Cd unit i
Cd unit iCd unit i
Cd unit i
 
SS UI Lecture 1
SS UI Lecture 1SS UI Lecture 1
SS UI Lecture 1
 
Ss ui lecture 1
Ss ui lecture 1Ss ui lecture 1
Ss ui lecture 1
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3
 
Compiler presentaion
Compiler presentaionCompiler presentaion
Compiler presentaion
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
 

Plus de kinnarshah8888 (16)

Yuva Msp All
Yuva Msp AllYuva Msp All
Yuva Msp All
 
Yuva Msp Intro
Yuva Msp IntroYuva Msp Intro
Yuva Msp Intro
 
Ch6
Ch6Ch6
Ch6
 
Ch9c
Ch9cCh9c
Ch9c
 
Ch8a
Ch8aCh8a
Ch8a
 
Ch5a
Ch5aCh5a
Ch5a
 
Ch9b
Ch9bCh9b
Ch9b
 
Ch9a
Ch9aCh9a
Ch9a
 
Ch10
Ch10Ch10
Ch10
 
Ch7
Ch7Ch7
Ch7
 
Ch3
Ch3Ch3
Ch3
 
Ch4b
Ch4bCh4b
Ch4b
 
Ch4a
Ch4aCh4a
Ch4a
 
Ch8b
Ch8bCh8b
Ch8b
 
Ch5b
Ch5bCh5b
Ch5b
 
Ch4c
Ch4cCh4c
Ch4c
 

Dernier

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Dernier (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

Ch1

  • 1. Introduction to Compiler Construction Robert van Engelen http://www.cs.fsu.edu/~engelen/courses/COP5621 COP5621 Compiler Construction Copyright Robert van Engelen, Florida State University, 2007-2009
  • 2.
  • 3. Syllabus, Assignments, and Schedule http://www.cs.fsu.edu/~engelen/courses/ COP5621 COP5621 Fall 2009
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. Preprocessors, Compilers, Assemblers, and Linkers Preprocessor Compiler Assembler Linker Skeletal Source Program Source Program Target Assembly Program Relocatable Object Code Absolute Machine Code Libraries and Relocatable Object Files Try for example: gcc -v myprog.c COP5621 Fall 2009
  • 10. The Phases of a Compiler COP5621 Fall 2009 Phase Output Sample Programmer (source code producer) Source string A=B+C; Scanner (performs lexical analysis ) Token string ‘ A’ , ‘=’ , ‘B’ , ‘+’ , ‘C’ , ‘;’ And symbol table with names Parser (performs syntax analysis based on the grammar of the programming language) Parse tree or abstract syntax tree ; | = / A + / B C Semantic analyzer (type checking, etc) Annotated parse tree or abstract syntax tree Intermediate code generator Three-address code, quads, or RTL int2fp B t1 + t1 C t2 := t2 A Optimizer Three-address code, quads, or RTL int2fp B t1 + t1 #2.3 A Code generator Assembly code MOVF #2.3,r1 ADDF2 r1,r2 MOVF r2,A Peephole optimizer Assembly code ADDF2 #2.3,r2 MOVF r2,A
  • 11.
  • 12.
  • 13.