Scroll Effect


Course Objective:

This course will help the learner to explain various phases in translating source language to target language and design scanners, construct parse tables, attribute grammars and ad hoc syntax directed translation. This course will also help the learner to classify and identify the opportunities of optimization


UNIT - I 15 Periods

Overview: Introduction - Compiler structure -Overview of translation Scanners: Introduction - Recognizing words - Regular expressions - Regular expressions to scanners - Implementing scanners. Parsers: Introduction - Expressing syntax - Review of top down parsing - Bottom up parsing.


UNIT - II 15 Periods

Lex and YACC: Using Lex, Using YACC. Context Sensitive Analysis: Introduction to type systems - Attribute grammar framework - Adhoc syntax directed translation. Intermediate Representations: Introduction - Graphical IRs - Linear IRs - Mapping values to names - Symbol tables.


UNIT - III 15 Periods

Introduction to optimization: Introduction - Background - Scope of optimization - Local optimization-Regional optimization - Global optimization - Inter procedural optimization. Data flow analysis: Introduction - Iterative data flow analysis - SSA form - Inter procedural analysis.


UNIT - IV 15 Periods

Instruction Selection: Introduction - Code generation - Extending the Simple Treewalk scheme Instruction selection via Tree Pattern matching- Instruction selection via Peephole Optimization. Instruction Scheduling: Instruction Scheduling problems - Local List scheduling

- Regional Scheduling: Register Allocation: Background issues - Local Register Allocation and Assignment - Global register Allocation and Assignment.




  1. Keith D.Cooper and Linda Torczon, “Engineering a Compiler”, Morgan Kauffman Publishers, 2nd Edition, 2012.
  2. Levine, John R., Tony Mason, and Doug Brown. Lex & yacc", O'Reilly Media, Inc., 2nd

Edition, 2013.(UNIT - II - Lex & YACC)





  1. Dick Grune, Kees Van Reewijk, Henry E.Bal, C. J.H. Jacobs, Koen G. Langendoen, “Modern Compiler Design”, Springer, 2nd Edition, 2012.
  2. Alfred V.Aho, Ravi Sethi, Jeffrey D. Ullman, Monica S. Lam, “Compilers: Principles, Techniques and Tools”, Pearson Education, 2nd Edition, 2006.
  3. Das, Vinu V. “Compiler Design using FLEX and YACC”, Prentice Hall of India Learning Pvt. Ltd., 2007.








Upon successful completion of each unit, the learner will be able to


Unit I

  • Describe the phases of compiler
  • Design scanners and parsers

Unit II

  • Develop scanner and parser using Lex & YACC,
  • Describe the significance of context sensitive analysis
  • List, comprehend and construct intermediate representations

Unit III

  • Identify the techniques for code optimization by performing data flow and inter procedural analysis

Unit IV

  • Demonstrate the techniques used in the backend phase of compiler design




Upon successful completion of this course, the learner will be able to

  • Develop scanner and parser using Lex & YACC
  • Use context sensitive analysis for type inference
  • Construct intermediate representation for a given source code
  • Select appropriate technique for code optimization by performing data flow and inter procedural analysis
  • Use techniques for instruction selection, instruction scheduling and register allocation in backend phase of compiler


Thanjavur - 613401
Tamilnadu, India

+91 4362 264101 - 108
        304000 - 010
+91 4362 264120