SlideShare une entreprise Scribd logo
1  sur  22
Télécharger pour lire hors ligne
Compiler-Construction Tools
Akhil Kaushik
Asstt. Prof., CE Deptt.,
TIT Bhiwani
Phases of Compiler
Compiler Construction Tools
• Compiler construction tools were introduced after
widespread of computers.
• Also known as compiler-compilers, compiler-
generators or translator writing systems.
• These tools may use sophisticated algo or
specified languages for specifying & implementing
the component.
Compiler Construction Tools
• Scanner Generators: These generate lexical
analyzers.
• The basic lexical analyzer is produced by Finite
Automata, which takes input in form of regular
expressions.
• Ex: LEX for Unix O.S.
Compiler Construction Tools
• The meta-language to a scanner generator
consists of regular expressions.
• These regular expressions describe tokens that
the generated scanner will then be able to find
when a source program is input.
• Ex: gr[ae]y does not match graay, greey or any
such thing.
Compiler Construction Tools
• Here, identifiers consist of letters
and digits and begin with a letter;
• Literals are sequences of digits;
• Arithmetic operators are addition,
subtraction, multiplication, division
and assignment operators;
• Punctuation symbols are ";" and left
and right parentheses.
Compiler Construction Tools
• Two Important Aspects of Scanner are:
– what are the tokens of the language?
– recognition of tokens
• Finite-state acceptors are devices that are well
suited to this recognition task primarily because
they can be specified pictorially by using
transition diagrams.
Compiler Construction Tools
• Parser interacts with Scanner in any of 2 ways:
– The scanner may process the source program in a
separate pass before parsing begins. Thus the tokens are
stored in a file or large table.
– The scanner is called by the parser whenever the next
token in the source program is required.
• The 2nd approach is preferred as internal form of the
complete source program does not need to be constructed
and stored in memory before parsing can begin.
Compiler Construction Tools
• Parser Generators: These
software produce syntax analyzers
which takes input based on
context-free grammar.
• Earlier, used to be most difficult to
develop but now, easier to develop
& implement.
• Ex: YACC, AXE, Bison, etc.
Compiler Construction Tools
• A parser generator is an application which
generates a parser.
• The usual input is a formal specification of the
grammar the parser has to recognize.
• Plus code implementing the actions the parser has
to take when recognizing the various parts of its
input.
• The result is an implementation of the parser in
some language, often C.
Compiler Construction Tools
Compiler Construction Tools
• Syntax-directed Translation Engines: These s/w
products produce intermediate code with the help
of parse tree.
• Main idea is associating 1 or more translations
with each node of parse tree.
• Each node is defined in terms of translations at its
neighboring nodes in the tree.
Compiler Construction Tools
• Every non-terminal can get one or more than one
attribute or sometimes 0 attribute depending on the
type of the attribute.
• The value of these attributes is evaluated by the
semantic rules associated with the production rule.
• In the semantic rule, attribute is VAL and an
attribute may hold anything like a string, a number,
a memory location and a complex record
Compiler Construction Tools
Whenever a construct
encounters in the
programming language,
then it is translated
according to the semantic
rules define in that
particular programming
language.
Compiler Construction Tools
• Ex: L = 3*5+4
Compiler Construction Tools
Ex: S = 2+3*4
Compiler Construction Tools
• Data Flow Engines: It is a tool used for code
optimization.
• Info is supplied by user & intermediate code is
compared to analyze the relation.
• It also does data-flow analysis i.e. finding out how
values are transmitted from one part to another
part of the program.
Compiler Construction Tools
Compiler Construction Tools
• Automatic Code Generator: This software
basically take intermediate code as input &
produce machine language as output.
• It is capable of fetching data from various storage
locations like registers, static memory, stack, etc.
• Basic technique here is ‘template matching’.
Compiler Construction Tools
• Automatic code generation has certain
advantages over traditional coding.
– High Quality
– Consistent
– Productive
– Coding Abstractly
Compiler Construction Tools
It is of two types:
• Passive- Passive code generators creates code,
then has nothing more to do with the project.
• Active- Active code generators create code then
keep track of that code during its lifecycle.
CONTACT ME AT:
Akhil Kaushik
akhilkaushik05@gmail.com
9416910303
CONTACT ME AT:
Akhil Kaushik
akhilkaushik05@gmail.com
9416910303
Thank You !!!

Contenu connexe

Tendances

Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design BasicsAkhil Kaushik
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)swapnac12
 
Software Cost Estimation Techniques
Software Cost Estimation TechniquesSoftware Cost Estimation Techniques
Software Cost Estimation TechniquesSanthi thi
 
Language for specifying lexical Analyzer
Language for specifying lexical AnalyzerLanguage for specifying lexical Analyzer
Language for specifying lexical AnalyzerArchana Gopinath
 
Passes of Compiler.pptx
Passes of Compiler.pptxPasses of Compiler.pptx
Passes of Compiler.pptxSanjay Singh
 
Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design MAHASREEM
 
The role of the parser and Error recovery strategies ppt in compiler design
The role of the parser and Error recovery strategies ppt in compiler designThe role of the parser and Error recovery strategies ppt in compiler design
The role of the parser and Error recovery strategies ppt in compiler designSadia Akter
 
software cost factor
software cost factorsoftware cost factor
software cost factorAbinaya B
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9koolkampus
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design conceptssrijavel
 
Lexical analyzer generator lex
Lexical analyzer generator lexLexical analyzer generator lex
Lexical analyzer generator lexAnusuya123
 
Error detection recovery
Error detection recoveryError detection recovery
Error detection recoveryTech_MX
 
Designing Techniques in Software Engineering
Designing Techniques in Software EngineeringDesigning Techniques in Software Engineering
Designing Techniques in Software Engineeringkirupasuchi1996
 
Software Engineering Layered Technology Software Process Framework
Software Engineering  Layered Technology Software Process FrameworkSoftware Engineering  Layered Technology Software Process Framework
Software Engineering Layered Technology Software Process FrameworkJAINAM KAPADIYA
 

Tendances (20)

Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design Basics
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
 
Phases of compiler
Phases of compilerPhases of compiler
Phases of compiler
 
Software Cost Estimation Techniques
Software Cost Estimation TechniquesSoftware Cost Estimation Techniques
Software Cost Estimation Techniques
 
Language for specifying lexical Analyzer
Language for specifying lexical AnalyzerLanguage for specifying lexical Analyzer
Language for specifying lexical Analyzer
 
Compiler design
Compiler designCompiler design
Compiler design
 
Role-of-lexical-analysis
Role-of-lexical-analysisRole-of-lexical-analysis
Role-of-lexical-analysis
 
Passes of Compiler.pptx
Passes of Compiler.pptxPasses of Compiler.pptx
Passes of Compiler.pptx
 
1.Role lexical Analyzer
1.Role lexical Analyzer1.Role lexical Analyzer
1.Role lexical Analyzer
 
Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design Syntax Analysis in Compiler Design
Syntax Analysis in Compiler Design
 
The role of the parser and Error recovery strategies ppt in compiler design
The role of the parser and Error recovery strategies ppt in compiler designThe role of the parser and Error recovery strategies ppt in compiler design
The role of the parser and Error recovery strategies ppt in compiler design
 
software cost factor
software cost factorsoftware cost factor
software cost factor
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design concepts
 
Lexical analyzer generator lex
Lexical analyzer generator lexLexical analyzer generator lex
Lexical analyzer generator lex
 
Code Optimization
Code OptimizationCode Optimization
Code Optimization
 
Error detection recovery
Error detection recoveryError detection recovery
Error detection recovery
 
Designing Techniques in Software Engineering
Designing Techniques in Software EngineeringDesigning Techniques in Software Engineering
Designing Techniques in Software Engineering
 
Phases of compiler
Phases of compilerPhases of compiler
Phases of compiler
 
Software Engineering Layered Technology Software Process Framework
Software Engineering  Layered Technology Software Process FrameworkSoftware Engineering  Layered Technology Software Process Framework
Software Engineering Layered Technology Software Process Framework
 

Similaire à Compiler construction tools

Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design BasicsAkhil Kaushik
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction Thapar Institute
 
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
 
COMPILER CONSTRUCTION KU 1.pptx
COMPILER CONSTRUCTION KU 1.pptxCOMPILER CONSTRUCTION KU 1.pptx
COMPILER CONSTRUCTION KU 1.pptxRossy719186
 
Compiler an overview
Compiler  an overviewCompiler  an overview
Compiler an overviewamudha arul
 
Bba i-introduction to computer-u-2- application and system software
Bba  i-introduction to computer-u-2- application and system softwareBba  i-introduction to computer-u-2- application and system software
Bba i-introduction to computer-u-2- application and system softwareRai University
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction Sarmad Ali
 
Bca i-fundamental of computer-u-2- application and system software
Bca  i-fundamental of  computer-u-2- application and system softwareBca  i-fundamental of  computer-u-2- application and system software
Bca i-fundamental of computer-u-2- application and system softwareRai University
 
Mca i-fundamental of computer-u-2- application and system software
Mca  i-fundamental of  computer-u-2- application and system softwareMca  i-fundamental of  computer-u-2- application and system software
Mca i-fundamental of computer-u-2- application and system softwareRai University
 
Bsc cs 1 fit u-2 application and system software
Bsc cs 1 fit u-2 application and system softwareBsc cs 1 fit u-2 application and system software
Bsc cs 1 fit u-2 application and system softwareRai University
 
4_5802928814682016556.pptx
4_5802928814682016556.pptx4_5802928814682016556.pptx
4_5802928814682016556.pptxAshenafiGirma5
 
Cd ch1 - introduction
Cd   ch1 - introductionCd   ch1 - introduction
Cd ch1 - introductionmengistu23
 
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.pptxZiyadMohammed17
 
Phases of Compiler.pptx
Phases of Compiler.pptxPhases of Compiler.pptx
Phases of Compiler.pptxssuser3b4934
 
COMPILER DESIGN.pdf
COMPILER DESIGN.pdfCOMPILER DESIGN.pdf
COMPILER DESIGN.pdfAdiseshaK
 
Compier Design_Unit I.ppt
Compier Design_Unit I.pptCompier Design_Unit I.ppt
Compier Design_Unit I.pptsivaganesh293
 
Compier Design_Unit I.ppt
Compier Design_Unit I.pptCompier Design_Unit I.ppt
Compier Design_Unit I.pptsivaganesh293
 

Similaire à Compiler construction tools (20)

Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design Basics
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction
 
COMPILER DESIGN PPTS.pptx
COMPILER DESIGN PPTS.pptxCOMPILER DESIGN PPTS.pptx
COMPILER DESIGN PPTS.pptx
 
Chapter 1.pptx
Chapter 1.pptxChapter 1.pptx
Chapter 1.pptx
 
compiler construction tool in computer science .
compiler construction tool in computer science .compiler construction tool in computer science .
compiler construction tool in computer science .
 
COMPILER CONSTRUCTION KU 1.pptx
COMPILER CONSTRUCTION KU 1.pptxCOMPILER CONSTRUCTION KU 1.pptx
COMPILER CONSTRUCTION KU 1.pptx
 
1._Introduction_.pptx
1._Introduction_.pptx1._Introduction_.pptx
1._Introduction_.pptx
 
Compiler an overview
Compiler  an overviewCompiler  an overview
Compiler an overview
 
Bba i-introduction to computer-u-2- application and system software
Bba  i-introduction to computer-u-2- application and system softwareBba  i-introduction to computer-u-2- application and system software
Bba i-introduction to computer-u-2- application and system software
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction
 
Bca i-fundamental of computer-u-2- application and system software
Bca  i-fundamental of  computer-u-2- application and system softwareBca  i-fundamental of  computer-u-2- application and system software
Bca i-fundamental of computer-u-2- application and system software
 
Mca i-fundamental of computer-u-2- application and system software
Mca  i-fundamental of  computer-u-2- application and system softwareMca  i-fundamental of  computer-u-2- application and system software
Mca i-fundamental of computer-u-2- application and system software
 
Bsc cs 1 fit u-2 application and system software
Bsc cs 1 fit u-2 application and system softwareBsc cs 1 fit u-2 application and system software
Bsc cs 1 fit u-2 application and system software
 
4_5802928814682016556.pptx
4_5802928814682016556.pptx4_5802928814682016556.pptx
4_5802928814682016556.pptx
 
Cd ch1 - introduction
Cd   ch1 - introductionCd   ch1 - introduction
Cd ch1 - introduction
 
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
 
Phases of Compiler.pptx
Phases of Compiler.pptxPhases of Compiler.pptx
Phases of Compiler.pptx
 
COMPILER DESIGN.pdf
COMPILER DESIGN.pdfCOMPILER DESIGN.pdf
COMPILER DESIGN.pdf
 
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
 

Plus de Akhil Kaushik

Symbol Table, Error Handler & Code Generation
Symbol Table, Error Handler & Code GenerationSymbol Table, Error Handler & Code Generation
Symbol Table, Error Handler & Code GenerationAkhil Kaushik
 
Parsing in Compiler Design
Parsing in Compiler DesignParsing in Compiler Design
Parsing in Compiler DesignAkhil Kaushik
 
Context Free Grammar
Context Free GrammarContext Free Grammar
Context Free GrammarAkhil Kaushik
 
Error Detection & Recovery
Error Detection & RecoveryError Detection & Recovery
Error Detection & RecoveryAkhil Kaushik
 
Lexical Analyzer Implementation
Lexical Analyzer ImplementationLexical Analyzer Implementation
Lexical Analyzer ImplementationAkhil Kaushik
 
Lexical Analysis - Compiler Design
Lexical Analysis - Compiler DesignLexical Analysis - Compiler Design
Lexical Analysis - Compiler DesignAkhil Kaushik
 
File Handling Python
File Handling PythonFile Handling Python
File Handling PythonAkhil Kaushik
 
Algorithms & Complexity Calculation
Algorithms & Complexity CalculationAlgorithms & Complexity Calculation
Algorithms & Complexity CalculationAkhil Kaushik
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsAkhil Kaushik
 
Decision Making & Loops
Decision Making & LoopsDecision Making & Loops
Decision Making & LoopsAkhil Kaushik
 
Basic programs in Python
Basic programs in PythonBasic programs in Python
Basic programs in PythonAkhil Kaushik
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python ProgrammingAkhil Kaushik
 
Bootstrapping in Compiler
Bootstrapping in CompilerBootstrapping in Compiler
Bootstrapping in CompilerAkhil Kaushik
 
Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to CompilersAkhil Kaushik
 

Plus de Akhil Kaushik (18)

Symbol Table, Error Handler & Code Generation
Symbol Table, Error Handler & Code GenerationSymbol Table, Error Handler & Code Generation
Symbol Table, Error Handler & Code Generation
 
Parsing in Compiler Design
Parsing in Compiler DesignParsing in Compiler Design
Parsing in Compiler Design
 
Context Free Grammar
Context Free GrammarContext Free Grammar
Context Free Grammar
 
Error Detection & Recovery
Error Detection & RecoveryError Detection & Recovery
Error Detection & Recovery
 
Symbol Table
Symbol TableSymbol Table
Symbol Table
 
Lexical Analyzer Implementation
Lexical Analyzer ImplementationLexical Analyzer Implementation
Lexical Analyzer Implementation
 
NFA & DFA
NFA & DFANFA & DFA
NFA & DFA
 
Lexical Analysis - Compiler Design
Lexical Analysis - Compiler DesignLexical Analysis - Compiler Design
Lexical Analysis - Compiler Design
 
File Handling Python
File Handling PythonFile Handling Python
File Handling Python
 
Regular Expressions
Regular ExpressionsRegular Expressions
Regular Expressions
 
Algorithms & Complexity Calculation
Algorithms & Complexity CalculationAlgorithms & Complexity Calculation
Algorithms & Complexity Calculation
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & Algorithms
 
Decision Making & Loops
Decision Making & LoopsDecision Making & Loops
Decision Making & Loops
 
Basic programs in Python
Basic programs in PythonBasic programs in Python
Basic programs in Python
 
Python Data-Types
Python Data-TypesPython Data-Types
Python Data-Types
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
Bootstrapping in Compiler
Bootstrapping in CompilerBootstrapping in Compiler
Bootstrapping in Compiler
 
Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to Compilers
 

Dernier

Divisibility of numbers (Number Systems)
Divisibility of numbers (Number Systems)Divisibility of numbers (Number Systems)
Divisibility of numbers (Number Systems)Pranav Sharma
 
Personal Brand Exploration- Valeria Alvarez
Personal Brand Exploration- Valeria AlvarezPersonal Brand Exploration- Valeria Alvarez
Personal Brand Exploration- Valeria AlvarezValeriaAlvarez967687
 
How to Send Emails From Odoo 17 Using Code
How to Send Emails From Odoo 17 Using CodeHow to Send Emails From Odoo 17 Using Code
How to Send Emails From Odoo 17 Using CodeCeline George
 
language diversity of the world and india ppt.pptx
language diversity of the world and india ppt.pptxlanguage diversity of the world and india ppt.pptx
language diversity of the world and india ppt.pptxvasupavanibhonagiri
 
KARNAADA.pptx made by - saransh dwivedi ( SD ) - SHALAKYA TANTRA - ENT - 4...
KARNAADA.pptx  made by -  saransh dwivedi ( SD ) -  SHALAKYA TANTRA - ENT - 4...KARNAADA.pptx  made by -  saransh dwivedi ( SD ) -  SHALAKYA TANTRA - ENT - 4...
KARNAADA.pptx made by - saransh dwivedi ( SD ) - SHALAKYA TANTRA - ENT - 4...M56BOOKSTORE PRODUCT/SERVICE
 
From Leadership to Communityship: The Heart, the Heat, and the Harmony of Goo...
From Leadership to Communityship: The Heart, the Heat, and the Harmony of Goo...From Leadership to Communityship: The Heart, the Heat, and the Harmony of Goo...
From Leadership to Communityship: The Heart, the Heat, and the Harmony of Goo...Sadegh Hashemi
 
Chacon-Immigration presentation MArch 2024
Chacon-Immigration presentation MArch 2024Chacon-Immigration presentation MArch 2024
Chacon-Immigration presentation MArch 2024Tom Tresser
 
MS4 -seq3- citizenship& community lexis & conditional 1& imperative & text ...
MS4 -seq3-  citizenship& community lexis & conditional 1&  imperative & text ...MS4 -seq3-  citizenship& community lexis & conditional 1&  imperative & text ...
MS4 -seq3- citizenship& community lexis & conditional 1& imperative & text ...Mr Bounab Samir
 
How to Set Up a One-to-Many Relationship Between Two Models in Odoo 17
How to Set Up a One-to-Many Relationship Between Two Models in Odoo 17How to Set Up a One-to-Many Relationship Between Two Models in Odoo 17
How to Set Up a One-to-Many Relationship Between Two Models in Odoo 17Celine George
 
How to Configure Rental Product and Rental Period in Odoo 17
How to Configure Rental Product and Rental Period in Odoo 17How to Configure Rental Product and Rental Period in Odoo 17
How to Configure Rental Product and Rental Period in Odoo 17Celine George
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfYu Kanazawa / Osaka University
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICESayali Powar
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...Nguyen Thanh Tu Collection
 
A gentle introduction to Artificial Intelligence
A gentle introduction to Artificial IntelligenceA gentle introduction to Artificial Intelligence
A gentle introduction to Artificial IntelligenceApostolos Syropoulos
 
Work Experience for psp3 portfolio sasha
Work Experience for psp3 portfolio sashaWork Experience for psp3 portfolio sasha
Work Experience for psp3 portfolio sashasashalaycock03
 
Natural Numbers, Whole Numbers, Integers.pdf
Natural Numbers, Whole Numbers, Integers.pdfNatural Numbers, Whole Numbers, Integers.pdf
Natural Numbers, Whole Numbers, Integers.pdfPranav Sharma
 
Social Media Algorithms - Part of the "Computers in out Life" Erasmus+ Project
Social Media Algorithms - Part of the "Computers in out Life" Erasmus+ ProjectSocial Media Algorithms - Part of the "Computers in out Life" Erasmus+ Project
Social Media Algorithms - Part of the "Computers in out Life" Erasmus+ ProjectApostolos Syropoulos
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRATanmoy Mishra
 

Dernier (20)

Divisibility of numbers (Number Systems)
Divisibility of numbers (Number Systems)Divisibility of numbers (Number Systems)
Divisibility of numbers (Number Systems)
 
Personal Brand Exploration- Valeria Alvarez
Personal Brand Exploration- Valeria AlvarezPersonal Brand Exploration- Valeria Alvarez
Personal Brand Exploration- Valeria Alvarez
 
How to Send Emails From Odoo 17 Using Code
How to Send Emails From Odoo 17 Using CodeHow to Send Emails From Odoo 17 Using Code
How to Send Emails From Odoo 17 Using Code
 
language diversity of the world and india ppt.pptx
language diversity of the world and india ppt.pptxlanguage diversity of the world and india ppt.pptx
language diversity of the world and india ppt.pptx
 
KARNAADA.pptx made by - saransh dwivedi ( SD ) - SHALAKYA TANTRA - ENT - 4...
KARNAADA.pptx  made by -  saransh dwivedi ( SD ) -  SHALAKYA TANTRA - ENT - 4...KARNAADA.pptx  made by -  saransh dwivedi ( SD ) -  SHALAKYA TANTRA - ENT - 4...
KARNAADA.pptx made by - saransh dwivedi ( SD ) - SHALAKYA TANTRA - ENT - 4...
 
From Leadership to Communityship: The Heart, the Heat, and the Harmony of Goo...
From Leadership to Communityship: The Heart, the Heat, and the Harmony of Goo...From Leadership to Communityship: The Heart, the Heat, and the Harmony of Goo...
From Leadership to Communityship: The Heart, the Heat, and the Harmony of Goo...
 
March 2024 Directors Meeting, Division of Student Affairs and Academic Support
March 2024 Directors Meeting, Division of Student Affairs and Academic SupportMarch 2024 Directors Meeting, Division of Student Affairs and Academic Support
March 2024 Directors Meeting, Division of Student Affairs and Academic Support
 
Chacon-Immigration presentation MArch 2024
Chacon-Immigration presentation MArch 2024Chacon-Immigration presentation MArch 2024
Chacon-Immigration presentation MArch 2024
 
MS4 -seq3- citizenship& community lexis & conditional 1& imperative & text ...
MS4 -seq3-  citizenship& community lexis & conditional 1&  imperative & text ...MS4 -seq3-  citizenship& community lexis & conditional 1&  imperative & text ...
MS4 -seq3- citizenship& community lexis & conditional 1& imperative & text ...
 
How to Set Up a One-to-Many Relationship Between Two Models in Odoo 17
How to Set Up a One-to-Many Relationship Between Two Models in Odoo 17How to Set Up a One-to-Many Relationship Between Two Models in Odoo 17
How to Set Up a One-to-Many Relationship Between Two Models in Odoo 17
 
How to Configure Rental Product and Rental Period in Odoo 17
How to Configure Rental Product and Rental Period in Odoo 17How to Configure Rental Product and Rental Period in Odoo 17
How to Configure Rental Product and Rental Period in Odoo 17
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICE
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
 
A gentle introduction to Artificial Intelligence
A gentle introduction to Artificial IntelligenceA gentle introduction to Artificial Intelligence
A gentle introduction to Artificial Intelligence
 
Work Experience for psp3 portfolio sasha
Work Experience for psp3 portfolio sashaWork Experience for psp3 portfolio sasha
Work Experience for psp3 portfolio sasha
 
Natural Numbers, Whole Numbers, Integers.pdf
Natural Numbers, Whole Numbers, Integers.pdfNatural Numbers, Whole Numbers, Integers.pdf
Natural Numbers, Whole Numbers, Integers.pdf
 
Chasing the Academic Funders Opportunities and Challenges.pdf
Chasing the Academic Funders  Opportunities and Challenges.pdfChasing the Academic Funders  Opportunities and Challenges.pdf
Chasing the Academic Funders Opportunities and Challenges.pdf
 
Social Media Algorithms - Part of the "Computers in out Life" Erasmus+ Project
Social Media Algorithms - Part of the "Computers in out Life" Erasmus+ ProjectSocial Media Algorithms - Part of the "Computers in out Life" Erasmus+ Project
Social Media Algorithms - Part of the "Computers in out Life" Erasmus+ Project
 
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRADUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
DUST OF SNOW_BY ROBERT FROST_EDITED BY_ TANMOY MISHRA
 

Compiler construction tools

  • 1. Compiler-Construction Tools Akhil Kaushik Asstt. Prof., CE Deptt., TIT Bhiwani
  • 3. Compiler Construction Tools • Compiler construction tools were introduced after widespread of computers. • Also known as compiler-compilers, compiler- generators or translator writing systems. • These tools may use sophisticated algo or specified languages for specifying & implementing the component.
  • 4. Compiler Construction Tools • Scanner Generators: These generate lexical analyzers. • The basic lexical analyzer is produced by Finite Automata, which takes input in form of regular expressions. • Ex: LEX for Unix O.S.
  • 5. Compiler Construction Tools • The meta-language to a scanner generator consists of regular expressions. • These regular expressions describe tokens that the generated scanner will then be able to find when a source program is input. • Ex: gr[ae]y does not match graay, greey or any such thing.
  • 6. Compiler Construction Tools • Here, identifiers consist of letters and digits and begin with a letter; • Literals are sequences of digits; • Arithmetic operators are addition, subtraction, multiplication, division and assignment operators; • Punctuation symbols are ";" and left and right parentheses.
  • 7. Compiler Construction Tools • Two Important Aspects of Scanner are: – what are the tokens of the language? – recognition of tokens • Finite-state acceptors are devices that are well suited to this recognition task primarily because they can be specified pictorially by using transition diagrams.
  • 8. Compiler Construction Tools • Parser interacts with Scanner in any of 2 ways: – The scanner may process the source program in a separate pass before parsing begins. Thus the tokens are stored in a file or large table. – The scanner is called by the parser whenever the next token in the source program is required. • The 2nd approach is preferred as internal form of the complete source program does not need to be constructed and stored in memory before parsing can begin.
  • 9. Compiler Construction Tools • Parser Generators: These software produce syntax analyzers which takes input based on context-free grammar. • Earlier, used to be most difficult to develop but now, easier to develop & implement. • Ex: YACC, AXE, Bison, etc.
  • 10. Compiler Construction Tools • A parser generator is an application which generates a parser. • The usual input is a formal specification of the grammar the parser has to recognize. • Plus code implementing the actions the parser has to take when recognizing the various parts of its input. • The result is an implementation of the parser in some language, often C.
  • 12. Compiler Construction Tools • Syntax-directed Translation Engines: These s/w products produce intermediate code with the help of parse tree. • Main idea is associating 1 or more translations with each node of parse tree. • Each node is defined in terms of translations at its neighboring nodes in the tree.
  • 13. Compiler Construction Tools • Every non-terminal can get one or more than one attribute or sometimes 0 attribute depending on the type of the attribute. • The value of these attributes is evaluated by the semantic rules associated with the production rule. • In the semantic rule, attribute is VAL and an attribute may hold anything like a string, a number, a memory location and a complex record
  • 14. Compiler Construction Tools Whenever a construct encounters in the programming language, then it is translated according to the semantic rules define in that particular programming language.
  • 17. Compiler Construction Tools • Data Flow Engines: It is a tool used for code optimization. • Info is supplied by user & intermediate code is compared to analyze the relation. • It also does data-flow analysis i.e. finding out how values are transmitted from one part to another part of the program.
  • 19. Compiler Construction Tools • Automatic Code Generator: This software basically take intermediate code as input & produce machine language as output. • It is capable of fetching data from various storage locations like registers, static memory, stack, etc. • Basic technique here is ‘template matching’.
  • 20. Compiler Construction Tools • Automatic code generation has certain advantages over traditional coding. – High Quality – Consistent – Productive – Coding Abstractly
  • 21. Compiler Construction Tools It is of two types: • Passive- Passive code generators creates code, then has nothing more to do with the project. • Active- Active code generators create code then keep track of that code during its lifecycle.
  • 22. CONTACT ME AT: Akhil Kaushik akhilkaushik05@gmail.com 9416910303 CONTACT ME AT: Akhil Kaushik akhilkaushik05@gmail.com 9416910303 Thank You !!!