0% found this document useful (0 votes)
18 views

Module 1

Uploaded by

ankurvatsa3
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Module 1

Uploaded by

ankurvatsa3
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 34

CSI2005

Principles of Compiler
Design
MODULE – 1
Dr. WI. Sureshkumar
Associate Professor
School of Computer Science and Engineering (SCOPE)
VIT Vellore
[email protected]
SJT413A34
Objective
• To provide required theoretical foundation for a computational model
and compiler design
• To focus the compiler algorithms more on low level system aspects
• To use tools such as Lex, YACC to automate parts of implementation
process
• To understand the principles of code optimization techniques.
Text books
• Principles of Compiler Design, Alferd V. Aho and Jeffery D. Ullman,
Addison Wesley, 2006
• Engineering a compiler, K. D. Cooper and L. Torczon, Morgan
Kaufmann, 2nd edition, 2011.
• Advanced Compiler design implementation, Steven S.Muchnick,
Elsevier Science India, 2003.
• Modern Compiler Implementation in Java, Andrew A.Appel,
Cambridge University Press, 2nd edition, 2002.
• Compiler Design in C, Allen Holub, Prentice Hall, 1990.
• Basics of Compiler Design, Torbengidius Mogensen, Springer, 2011.
Mode of Evaluation

DA 10 Marks
QUIZ-1 10 Marks (Moddle)
QUIZ-2 10 Marks (Moddle)
CAT - 1 15 Marks (Closed Book)
CAT - 2 15 Marks (Open Book)
FAT 40 Marks
Total 100 Marks
Module -1
• Introduction to Compilation and Lexical Analysis
• Introduction to programming language translators
• Structure and phases of a compiler
• Design issues, Patterns, lexemes, Tokens, Attributes
• Specification of Tokens
• Extended Regular expression
• Regular expression to Deterministic Finite Automata (Direct
method).
HLL LLL
Source Program Compiler Target Program

A program that reads a program written in one language (source language)


Error messages
and
translates it into an equivalent program in another language (target language).

• INTERPRETER (BASIC , SNOBOL)


• COMPILER ( Pascal, C, FORTRAN)
Phases of Compiler
1. Lexical analyzer
2. Syntax analyzer
3. Semantic analyzer
4. Intermediate code generator
5. Code optimizer
6. Code generator

• Symbol table
• Error handler
• Compiler:
• a program that translates an executable program in one language into an
executable program in another language
• we expect the program produced by the compiler to be better, in some way,
than the original

• Interpreter:
• a program that reads an executable program and produces the results of
running that program
• usually, this involves executing the source program in some fashion

• Our course is mainly about compilers but many of the same issues
arise in interpreters
Phases of Compiler

You might also like