Compiler Construction ToolsParser Generator Scanner Generator Syntax Directed Translation Engines Automatic Code Generators Data-Flow Analysis Engines Compiler Construction Toolkits

GunjalSanjay 61 views 9 slides Mar 06, 2025
Slide 1
Slide 1 of 9
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9

About This Presentation

Compiler Construction Tools
Parser Generator
Scanner Generator
Syntax Directed Translation Engines
Automatic Code Generators
Data-Flow Analysis Engines
Compiler Construction Toolkits


Slide Content

Sanjivani Rural Education Society’s
Sanjivani College of Engineering, Kopargaon-423 603
(An Autonomous Institute, Affiliated to Savitribai Phule Pune University, Pune)
NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified
Department of Computer Engineering
(NBA Accredited)
Dr. S. N. Gunjal
Assistant Professor
E-mail : [email protected]
Contact No: 91301 91301 Ext :145, 9503916876
Course-System Software
(CO313)
Compiler Construction Tools
Dr. S.N Gunjal

Compiler Construction Toolsare specialized tools that help in the implementation of various phases
of a compiler. These tools help in the creation of an entire compiler or its parts.
Some of the commonly used compiler constructions tools are:-
Parser Generator
Scanner Generator
Syntax Directed Translation Engines
Automatic Code Generators
Data-Flow Analysis Engines
Compiler Construction Toolkits
Let’s learn about these tools one by one.
Compiler Construction Tools

ScannerGeneratorgenerateslexicalanalyzersfromtheinputthatconsistsofregular
expressiondescriptionsbasedontokensofalanguage.Itgeneratesafiniteautomatonto
identifytheregularexpression.
Example:LEXisascannergeneratorprovidedbyUNIXsystems.
1. Scanner Generator

2. Parser Generator
Parser Generatorproduces syntax analyzers (parsers) based on context-free grammar that takes input
in the form of the syntax of a programming language. It's helpful because the syntax analysis phase is
quite complex and takes more compilation and manual time.
Example: EQM, PIC

Syntax Directed Translation Engines take a parse tree as input and generate intermediate code
with three address formats. These engines contain routines to traverse the parse tree and generate
intermediate code. Each parse tree node has one or more translations associated with it.
3. Syntax Directed Translation Engines

4. Data-flow analysis engines
It is used in code optimization. Data flow analysis is a key part of the code optimization that
gathers the information, that is the values that flow from one part of a program to another.

5. Automatic Code Generators
Automatic Code Generators take intermediate code as input and convert it into machine
language. Each intermediate language operation is translated using a set of rules and then
sent into the code generator as input. A template matching process is used, and by using the
templates, an intermediate language statement is replaced by its machine language
equivalent.

6. Compiler construction toolkits
It provides an integrated set of routines that aids in building compiler components or in the
construction of various phases of compiler.

References
1.Alfred V.Aho,MonicaS.Lam,RaviSethi, Jeffrey D. Ullman, “Compilers-
Principles,Techniquesand Tools”, Pearson,ISBN:978-81-317-2101-8
.