KEMBAR78
Compiler Design for CS Students | PDF | Parsing | Compiler
0% found this document useful (0 votes)
959 views2 pages

Compiler Design for CS Students

This document outlines the course structure for Principles of Compiler Design. It is divided into 5 units that cover various phases of compiler design like lexical analysis, syntax analysis, syntax-directed translation, run-time environment and error handling. The total credits for the course are 60. Some key topics include lexical analysis using finite automata, context-free grammars, top-down and bottom-up parsing, syntax-directed definitions, code generation and optimization. The course also includes a lab component to provide hands-on experience with tools like LEX and YACC.

Uploaded by

menahasenthil
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
959 views2 pages

Compiler Design for CS Students

This document outlines the course structure for Principles of Compiler Design. It is divided into 5 units that cover various phases of compiler design like lexical analysis, syntax analysis, syntax-directed translation, run-time environment and error handling. The total credits for the course are 60. Some key topics include lexical analysis using finite automata, context-free grammars, top-down and bottom-up parsing, syntax-directed definitions, code generation and optimization. The course also includes a lab component to provide hands-on experience with tools like LEX and YACC.

Uploaded by

menahasenthil
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

PRINCIPLES OF COMPILER DESIGN LTPMC 3 1 0 100 4

UNIT I INTRODUCTION TO COMPILERS

9+3
Compilers, Analysis of the Source Program, The Phases of a Compiler, Cousins
of the Compiler, The Grouping of Phases, Compiler-Construction Tools,
Translators- Compilation and Interpretation, A simple one-p ass compiler

UNIT II LEXICAL ANALYSIS 9+3


Need and role of lexical analyzer-Lexical errors, Input Buffering - Specification of
Tokens, Recognition of Tokens, A Language for Specifying Lexical Analyzers,
FiniteAutomata, From a Regular Expression to an NFA, Design of a Lexical
AnalyzerGenerator

UNIT III SYNTAX ANALYSIS 9+3


Need and role of the parser- Context Free Grammars-Top Down parsing –
Recursive Descent Parser - Predictive Parser - LL(1) Parser -Shift Reduce
Parser - LR Parser - LR(0) item - Construction of SLR Parsing table -Introduction
to LALR Parser, YACCDesignof a syntax analyzer for a sample language

UNIT IV SYNTAX DIRECTED TRANSLATION AND TYPE CHECKING 9+3


Syntax-Directed Definitions, Construction of Syntax Trees, Bottom-Up Evaluation
of SAttributedDefinitions, L-Attributed Definitions, Top Down Translation, Bottom-
UpEvaluation of Inherited Attributes, Forms of intermediate code -Translation of
Assignment, Boolean Expression and Control statements - Back patching type
systems- Specification of a simple type checker - equivalence of type
expressions – typeconversions

UNIT V RUN-TIME ENVIRONMENT AND ERROR HANDLING 9+3


Source language issues-Storage organization-Storage allocation-parameter
passing-Symbol tables-Dynamic storage allocation-Storage allocation in
FORTRAN, Errorhandling and recovery in different phases. Principal sources of
Optimization – DAG -Optimization of basic blocks-Global data flow analysis -
Efficient data flow algorithms -Issues in design of a code generator-a simple code
generator algorithm
TOTAL : 60
TEXT BOOKS
1. Alfred V.Aho, Ravi Sethi and Jeffrey D.Ullman, "Compilers – Principles,
Techniquesand Tools", second edition, Pearson Education, New Delhi, 2006.

2. Raghavan V, “Principles of Compiler Design”, Tata Mc-Graw Hill


Education Pvt.Ltd., New Delhi, 2009
REFERENCE BOOKS
1. Dhamdhere D M, "Compiler Construction Principles and Practice", second
edition,
Macmillan India Ltd., New Delhi, 2001.
2. Jean Paul Tremblay, Paul G Serenson, "The Theory and Practice of Compiler
Writing", McGraw Hill, New Delhi, 2001.
3. Dick Grone, Henri E Bal, Ceriel J H Jacobs and Koen G Langendoen, “Modern
Compiler Design”, John Wiley, New Delhi, 2000.

COMPILER DESIGN LAB


LTPC
0032
1. Study of LEX and YACC
2. Lexical Analysis using LEX.
3. Syntax Analysis using YACC
4. Construction of NFA from a given regular expression.
5. Construction of minimized DFA from a given regular expression.
6. Implementation of Symbol Table.
7. Implementation of Shift Reduce Parsing Algorithm.
8. Construction of LR Parsing Table.
9. Generation of Code for a given Intermediate Code.
10. Implementation of Code Optimization techniques.

You might also like