×
DON'T FORGET THE LIFESTYLE YOU HAVE PROMISED TO YOURSELF.
--Your friends at LectureNotes
Close

Note for Compiler Design - CD by Sheryl Bhatnagar

  • Compiler Design - CD
  • Note
  • Computer Science Engineering
  • B.Tech
  • 5 Topics
  • 2679 Views
  • 87 Offline Downloads
  • Uploaded 1 year ago
Sheryl Bhatnagar
Sheryl Bhatnagar
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-2

Principles of Compiler Design  Unit – I ➢ Analysis of the Source Program, Phases of a Compiler, ➢ Compiler Construction Tools, Lexical Analysis  Unit – II ➢ Parser, Grammar, Context-Free Grammar, Top-Down Parsing, Bottom-Up Parsing  Unit – III ➢ Intermediate Languages  Unit – IV ➢ Code Generation  Unit – V ➢ Code Optimization and Run-Time Environments  Reference Book: ➢ Alfred Aho, Ravi Sethi, Jeffrey D Ullman, “Compilers Principles, Techniques and Tools”, Pearson Education, India, 2/e.

Text from page-3

Unit – I ➢Compilers ▪ Analysis of the Source Program ▪ Phases of a Compiler ▪ Cousins of the Compiler ▪ Grouping of Phases ▪ Compiler Construction Tools ➢Lexical Analysis ▪ Role of Lexical Analyzer ▪ Input Buffering ▪ Specification of Tokens

Text from page-4

Introduction ▪ Why we need to learn it? ➢ May never write a full compiler ➢ But the techniques we learn is useful in many tasks ✓ Write interpreters for a scripting language ✓ Validating forms and so on… ▪ Compiler ➢ A program that translates source code into object code ➢ The total programming code is compiled at once and all the errors are displayed. ▪ Interpreter ➢ It goes on compiling only one line every time. ➢ If any error is encountered in any line, the control stops and displays the error. ➢ Once the error is rectified and compiled again, it moves to the next line and so on.

Text from page-5

Introduction ▪ Disciplines involved ➢ ➢ ➢ ➢ Algorithms (Design and Analysis of Algorithms) Languages and Machines (Automata Theory). Operating Systems Computer Architecture and Organization ▪ Abstract View of Compiler Source code Compiler Machine code errors ➢ ➢ ➢ ➢ Recognizes legal (and illegal) programs statements Generate correct code Manage storage of all variables and code Agreement on format for object (or assembly) code

Lecture Notes