SlideShare a Scribd company logo
Passes
2/4/2017 1
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN
Single Pass
2/4/2017 2
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN
Contd.
2/4/2017 3
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN
Two Pass
2/4/2017 4
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN
Comparison
2/4/2017 5
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN
Multi pass
• Passes
1. Several phases of compilers are grouped into passes.
2 . Other passes generates an explicit output file.
3. In each pass the whole input file/source is processed.
Syntax Analyser
Lexical analyser Intermediate code generator
--Semantic analyser
2/4/2017 6
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN
Contd…..
2/4/2017 7
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN
Load and Go
2/4/2017 8
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN
Contd….
2/4/2017 9
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN
Debugging
2/4/2017 10
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN
Bootstraping
• Bootstrapping is the process of writing a compiler
(or assembler) in the source programming language
that it intends to compile.
• Many compilers for many programming languages
are bootstrapped, including compilers for-
• BASIC, Algol, C, D, Pascal, PL/I, Factor, Haskell,
Modula-2, Oberon, OCaml, Common Lisp, Scheme,
Go, Java, Rust, Python, Scala, Nim, Eiffel, and more.
2/4/2017 11
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN
List Of Compilers
• Compiler is program that translate (either from source code,
byte code to another source code, byte code, or binary), for
example:
• gcc
• clang
• javac
• go (compiler)
2/4/2017 12
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN
• Interpreter is program that executes source
code or byte code, for example:
• ruby (interpreter)
• python (interpreter)
• php (interpreter)
2/4/2017 13
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN
CONTD…
• 1 Ada compilers
• 2 ALGOL compilers
• 3 Assemblers (Intel *86)
• 4 Assemblers (Motorola 68*)
• 5 Assemblers (Zilog Z80)
• 6 Assemblers (other)
• 7 BASIC Compilers
2/4/2017 14
ANKUR SRIVASTAVA JETGI ASSISTANT
PROFESSOR COMPILER DESIGN

More Related Content

Viewers also liked

Compiler unit 1
Compiler unit 1Compiler unit 1
Compiler unit 1
BBDITM LUCKNOW
 
Compiler Chapter 1
Compiler Chapter 1Compiler Chapter 1
Compiler Chapter 1
Huawei Technologies
 
Introduction to Functional Languages
Introduction to Functional LanguagesIntroduction to Functional Languages
Introduction to Functional Languages
suthi
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction
Sarmad Ali
 
Minimization of dfa
Minimization of dfaMinimization of dfa
Minimization of dfa
BBDITM LUCKNOW
 
compiler and their types
compiler and their typescompiler and their types
compiler and their types
patchamounika7
 
Lex
LexLex
Validation based protocol
Validation based protocolValidation based protocol
Validation based protocol
BBDITM LUCKNOW
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
Iffat Anjum
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design Basics
Akhil Kaushik
 
Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)
guest251d9a
 
Phases of Compiler
Phases of CompilerPhases of Compiler
Phases of Compiler
Tanzeela_Hussain
 
Compiler Design
Compiler DesignCompiler Design
Compiler DesignMir Majid
 
What is Compiler?
What is Compiler?What is Compiler?
What is Compiler?
Huawei Technologies
 

Viewers also liked (16)

Compiler unit 1
Compiler unit 1Compiler unit 1
Compiler unit 1
 
Compiler Chapter 1
Compiler Chapter 1Compiler Chapter 1
Compiler Chapter 1
 
Introduction to Functional Languages
Introduction to Functional LanguagesIntroduction to Functional Languages
Introduction to Functional Languages
 
Cd2 [autosaved]
Cd2 [autosaved]Cd2 [autosaved]
Cd2 [autosaved]
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction
 
Ch2
Ch2Ch2
Ch2
 
Minimization of dfa
Minimization of dfaMinimization of dfa
Minimization of dfa
 
compiler and their types
compiler and their typescompiler and their types
compiler and their types
 
Lex
LexLex
Lex
 
Validation based protocol
Validation based protocolValidation based protocol
Validation based protocol
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design Basics
 
Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)
 
Phases of Compiler
Phases of CompilerPhases of Compiler
Phases of Compiler
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
 
What is Compiler?
What is Compiler?What is Compiler?
What is Compiler?
 

More from BBDITM LUCKNOW

Unit 5 cspc
Unit 5 cspcUnit 5 cspc
Unit 5 cspc
BBDITM LUCKNOW
 
Unit 4 cspc
Unit 4 cspcUnit 4 cspc
Unit 4 cspc
BBDITM LUCKNOW
 
Unit3 cspc
Unit3 cspcUnit3 cspc
Unit3 cspc
BBDITM LUCKNOW
 
Cse ppt 2018
Cse ppt 2018Cse ppt 2018
Cse ppt 2018
BBDITM LUCKNOW
 
Binary system ppt
Binary system pptBinary system ppt
Binary system ppt
BBDITM LUCKNOW
 
Unit 4 ca-input-output
Unit 4 ca-input-outputUnit 4 ca-input-output
Unit 4 ca-input-output
BBDITM LUCKNOW
 
Unit 3 ca-memory
Unit 3 ca-memoryUnit 3 ca-memory
Unit 3 ca-memory
BBDITM LUCKNOW
 
Unit 2 ca- control unit
Unit 2 ca- control unitUnit 2 ca- control unit
Unit 2 ca- control unit
BBDITM LUCKNOW
 
Unit 1 ca-introduction
Unit 1 ca-introductionUnit 1 ca-introduction
Unit 1 ca-introduction
BBDITM LUCKNOW
 
Compiler unit 4
Compiler unit 4Compiler unit 4
Compiler unit 4
BBDITM LUCKNOW
 
Compiler unit 2&3
Compiler unit 2&3Compiler unit 2&3
Compiler unit 2&3
BBDITM LUCKNOW
 
Compiler unit 5
Compiler  unit 5Compiler  unit 5
Compiler unit 5
BBDITM LUCKNOW
 
Cspc final
Cspc finalCspc final
Cspc final
BBDITM LUCKNOW
 

More from BBDITM LUCKNOW (13)

Unit 5 cspc
Unit 5 cspcUnit 5 cspc
Unit 5 cspc
 
Unit 4 cspc
Unit 4 cspcUnit 4 cspc
Unit 4 cspc
 
Unit3 cspc
Unit3 cspcUnit3 cspc
Unit3 cspc
 
Cse ppt 2018
Cse ppt 2018Cse ppt 2018
Cse ppt 2018
 
Binary system ppt
Binary system pptBinary system ppt
Binary system ppt
 
Unit 4 ca-input-output
Unit 4 ca-input-outputUnit 4 ca-input-output
Unit 4 ca-input-output
 
Unit 3 ca-memory
Unit 3 ca-memoryUnit 3 ca-memory
Unit 3 ca-memory
 
Unit 2 ca- control unit
Unit 2 ca- control unitUnit 2 ca- control unit
Unit 2 ca- control unit
 
Unit 1 ca-introduction
Unit 1 ca-introductionUnit 1 ca-introduction
Unit 1 ca-introduction
 
Compiler unit 4
Compiler unit 4Compiler unit 4
Compiler unit 4
 
Compiler unit 2&3
Compiler unit 2&3Compiler unit 2&3
Compiler unit 2&3
 
Compiler unit 5
Compiler  unit 5Compiler  unit 5
Compiler unit 5
 
Cspc final
Cspc finalCspc final
Cspc final
 

Recently uploaded

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
ShivajiThube2
 
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
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
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
 
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
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
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
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
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
 

Recently uploaded (20)

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
 
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...
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
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
 
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
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
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
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
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...
 

Passescd

  • 1. Passes 2/4/2017 1 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN
  • 2. Single Pass 2/4/2017 2 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN
  • 3. Contd. 2/4/2017 3 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN
  • 4. Two Pass 2/4/2017 4 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN
  • 5. Comparison 2/4/2017 5 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN
  • 6. Multi pass • Passes 1. Several phases of compilers are grouped into passes. 2 . Other passes generates an explicit output file. 3. In each pass the whole input file/source is processed. Syntax Analyser Lexical analyser Intermediate code generator --Semantic analyser 2/4/2017 6 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN
  • 7. Contd….. 2/4/2017 7 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN
  • 8. Load and Go 2/4/2017 8 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN
  • 9. Contd…. 2/4/2017 9 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN
  • 10. Debugging 2/4/2017 10 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN
  • 11. Bootstraping • Bootstrapping is the process of writing a compiler (or assembler) in the source programming language that it intends to compile. • Many compilers for many programming languages are bootstrapped, including compilers for- • BASIC, Algol, C, D, Pascal, PL/I, Factor, Haskell, Modula-2, Oberon, OCaml, Common Lisp, Scheme, Go, Java, Rust, Python, Scala, Nim, Eiffel, and more. 2/4/2017 11 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN
  • 12. List Of Compilers • Compiler is program that translate (either from source code, byte code to another source code, byte code, or binary), for example: • gcc • clang • javac • go (compiler) 2/4/2017 12 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN
  • 13. • Interpreter is program that executes source code or byte code, for example: • ruby (interpreter) • python (interpreter) • php (interpreter) 2/4/2017 13 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN
  • 14. CONTD… • 1 Ada compilers • 2 ALGOL compilers • 3 Assemblers (Intel *86) • 4 Assemblers (Motorola 68*) • 5 Assemblers (Zilog Z80) • 6 Assemblers (other) • 7 BASIC Compilers 2/4/2017 14 ANKUR SRIVASTAVA JETGI ASSISTANT PROFESSOR COMPILER DESIGN