Compiler Design


Authors  : Venkatesh R, Uma Maheswari N, Jeyanthi S

ISBN: 9789380381428

Copy Right Year: 2015

Pages:  348

Binding: Soft Cover

Publisher:  Yes Dee Publishing

SKU: 9789380381428 Category:


Compiler is one of the system programs and this textbook introduces students to compiler design. It discusses the underlying concepts of designing of compilers, the principles involved, and the techniques and tools used. Various examples provided will help the reader have a clear understanding of the concepts.

Additional information

Weight .4 kg
Dimensions 22 × 15 × 2 cm

Table of Content

1.1 Introduction
1.2 What are Compilers
1.2.1 Analysis-Synthesis Model
1.2.2 Examples of Soft ware Tools used for Analysis
1.2.3 Conventional Compiler
1.2.4 Classification of Compilers
1.3 Analysis of source program
1.4 Phases of a Compiler
1.4.1 Lexical Analysis (Scanning/Scanner)
1.4.2 Syntax Analysis (Parsing/Parser)
1.4.3 Semantic Analysis
1.4.4 Intermediate Code Generation
1.4.5 Code Optimisation
1.4.6 Code Generation
1.4.7 Symbol Table Management
1.4.8 Error Detection and Reporting
1.5 Cousins of Compiler
1.5.1 Preprocessors
1.5.2 Assemblers
1.5.3 Loaders
1.5.4 Linkers
1.6 Grouping of Phases
1.6.1 Front End and Back End
1.6.2 Passes
1.6.3 Reducing the Number of Passes
1.7 Compiler Construction Tools
1.7.1 Scanner Generator
1.7.2 Parser Generator
1.7.3 Syntax-Directed Translation Engines
1.7.4 Automatic Code Generator
1.7.5 Data-Flow Engines
2.1 Introduction
2.2 Definition of Lexical Analysis
2.3 Role of Lexical Analyser
2.3.1 Issues in Lexical Analysis
2.3.2 Tokens, Patterns, Lexemes
2.3.3 Attributes for Tokens
2.3.4 Lexical Errors
2.3.5 Panic Mode Error Recovery Strategy
2.4 Input Buffering
2.4.1 Buffer Methods
2.4.2 Buffer Pairs
2.4.3 Sentinels
2.5 Specification of Tokens
2.6 Recognition of Tokens
2.6.1 Finite Automata
2.6.2 NFA
2.6.3 DFA
2.7 Regular Expression to NFA
2.8 Conversion of NFA to DFA
2.9 Minimisation of DFA
2.10 Optimisation of DFA from Regular Expression
2.11 LEX Tool
2.11.1 Declarations
2.11.2 Transition Rules
2.11.3 Auxiliary Procedures
2.11.4 Lex Library
3.1 Introduction
3.2 Role of the Parser
3.2.1 Error Handling
3.2.2 Error Recovery Strategies
3.3 Writing Grammars
3.4 Grammars
3.4.1 Definition
3.4.2 Types of Grammar
3.5 Context-free grammar
3.5.1 A-Production (Productions for A)
3.5.2 Derivations using a Grammar
3.5.3 Notations for CFG
3.5.4 Sentential Forms
3.5.5 Parse Tree (Derivation tree)
3.5.6 Yield of Parse Tree
Chapter 4. PARSING
4.1 Introduction
4.2 Types of Parsing
4.2.1 Top-down Parsing (LL(k))
4.2.2 Bottom-up Parsing (LR(k))
4.3 Shift -Reduce Parsing
4.4 Operator-Precedence Parsing
4.4.1 Detailed Steps for Solving Operator-Precedence Parsing Problems
4.4.2 Error Recovery in Operator-Precedence Parsing
4.4.3 Handling Errors during Reductions
4.5 LR Parsers
4.5.1 SLR Parser
4.5.2 Canonical LR Parser
4.5.6 LALR Parser
5.1 Introduction
5.2 Generation of Intermediate Code
5.2.1 Representation of Intermediate Languages
5.2.2 Types of Three-Address Statements
5.2.3 Implementations of Three-Address Code
5.2.4 Styles of Syntax-Directed Translations
5.3 Declarations
5.3.1 Declaration in a Procedure
5.3.2 Translation Scheme for Declaration in a Procedure
5.3.3 Declarations in Nested Procedures
5.4 Assignment Statements
5.4.1 Syntax-Directed Translation Scheme
5.4.2 Re-using Temporary Names
5.4.3 Addressing Array Elements
5.5 Boolean Expressions
5.5.1 Numerical Representation
5.5.2 Flow of Control Statements
5.6 Case Statements
5.7 Back patching
5.8 Procedural Calls
5.8.1 Calling the Procedure
5.9 Type Conversion
6.1 Introduction
6.2 Issues in the Design of Code Generator
6.2.1 Input to the Code Generator
6.2.2 Target Programs
6.2.3 Memory Management
6.2.4 Instruction Selection
6.2.5 Register Allocation
6.2.6 Evaluation Order
6.3 The Target Machine
6.4 Runtime Storage Management
6.4.1 Static Allocation
6.4.2 Stack Allocation
6.5 Basic Blocks and Flow Graphs
6.5.1 Basic Block
6.5.2 Transformation on Basic Block
6.5.3 Flow Graph
6.5.4 Loops
6.6 Next-Use Information
6.7 A Simple Code Generator
6.7.1 Code Generation
6.7.2 Code-Generation Algorithm
6.7.3 Register and Address Descriptors
6.7.4 Function Getreg( )
6.7.5 Conditional Statements
6.8 DAG Representation of Basic Blocks
6.8.1 DAG for Basic block
6.8.2 DAG Construction
6.8.3 Application of DAGs
6.9 Peephole Optimisation
6.9.1 Definition
6.9.2 Goals
6.9.3 Method

7.1 Introduction
7.1.1 Criteria for Code-Improving Transformations
7.1.2 Getting Better Performance
7.1.3 An Organisation for an Optimising Compiler
7.2 Principal Sources of Optimisation
7.2.1 Function-Preserving Transformations
7.2.2 Loop Optimisation
7.3 Optimisation of Basic Blocks
7.3.1 Basic Blocks
7.3.2 Basic Block Optimisations
7.3.3 Building Expression DAGs
7.4 Introduction to Global Data-Flow Analysis
7.4.1 Point and Paths
7.4.2 Reaching Definitions
7.4.3 Global Data-flow analysis
7.4.4 Data-Flow Analysis of Structured Programs
7.4.5 Data-Flow Equations for Reaching Definitions
7.4.6 Computation of “gen” and “kill”
7.4.7 Computation of “in” and “out”
7.4.8 Dealing with Loops
7.4.9 Representation of Sets
8.1 Introduction
8.2 Source Language Issues
8.2.1 Procedure
8.2.2 Activation Trees
8.2.3 Control Stacks
8.2.4 The Scope of a Declaration
8.2.5 Binding of Names
8.3 Storage Organisation
8.3.1 Sub-division of Runtime Memory
8.3.2 Activation Records
8.3.3 Compile-Time Layout of Local Data
8.4 Storage Allocation Strategies
8.4.1 Static Allocation
8.4.2 Stack Allocation
8.4.3 Heap Allocation
8.5 Access to Non-local Names
8.5.1 Blocks
8.5.2 Lexical Scope without Nested Procedures
8.5.3 Lexical Scope with Nested Procedures
8.5.4 Dynamic Scope
8.6 Parameter Passing
8.6.1 Call-by-Value
8.6.2 Call-by-Reference
8.6.3 Copy-restore (Copy-in/Copy-out)
8.6.4 Call-by-Name
Review Questions
Anna University Question Papers

About The Authors

Dr. R. Venkatesh received his M.E. in Computer Science and Engineering from Anna University, Chennai, in 2007 and Ph.D. in Computer Science & Engineering in 2010. Currently, he is working as a Professor in the Department of Information Technology in PSNA College of Engineering & Technology, Dindigul. He has 15 years experience in teaching and has published more than 50 papers in international and national journals and conferences. His areas of interest include Compilers, Artificial intelligence, Neural Network, Soft computing, Network Security and Networks. He is a reviewer for various refereed international journals and is currently acting as a technical member for various international conferences.

Dr. N. Uma Maheswari received her M.E. in Computer Science & Engineering from the Madras University, Chennai, in 2002 and Ph.D. in Information & Communication Engineering in 2011 from Anna University, Chennai. Currently, she is working as a Professor in the Department of Computer Science & Engineering at P.S.N.A. College of Engineering & Technology, Dindigul. She has published 40 papers in international journals and conferences. She is a recognized Ph.D. supervisor under Anna University of Technology in the area of Image Processing, Cloud Computing, Network Security and Networks. She is a reviewer for various refereed international journals.

Ms. S. Jeyanthi received her M.E. in Computer Science and Engineering from Anna University Chennai, in 2009. Currently she is pursuing her Ph.D. at Anna University, Chennai, in the field of Biometrics. She is working as an Assistant Professor in the Department of Computer Science & Engineering, PSNA College of Engineering & Technology, Dindigul. Her areas of interest include Compilers, Image Processing, Biometrics and Pattern Recognition. She has 9 years of teaching experience in the field of computer science and engineering. She has published 7 papers in international journals and conferences.


Buy our E Book at



There are no reviews yet.

Be the first to review “Compiler Design”

Your email address will not be published. Required fields are marked *

New Product Tab

Here's your new product tab.