Page 119 - Microsoft Word - B.Tech. Course Structure (R20) WITH 163 CREDITS
P. 119
JNTUA College of Engineering (Autonomous), Ananthapuramu
Department of Computer Science & Engineering
Compiler Design
Course Code: Semester VI(20) L T P C : 3 0 0 3
Course Objectives:
• This course in Computer Science, as it combines skills in software design, programming,
data structures and algorithms, theory of computing, documentation, and machine
architecture to produce a functional compiler. Realize that computing science theory can be
used as the basis for real.
Course Outcomes:
• Able to understand the various phases of compiler and analyze the lexical tool.
• Students should be in a position to understand the different types of parsing Techniques
and apply
• Lex tool & YAAC tools.
• Design syntax directed translations for semantic analysis of various language features and
produce intermediate code.
• Students should be able to understand and design different code generation technique and
algorithms.
• Apply various optimization techniques to the intermediate code/machine code.
UNIT – I: Introduction & Lexical Analysis
Language processors, Phases of a compiler, Pass and phase, Bootstrapping, Compiler construction tools,
Applications of compiler technology.
Lexical Analysis: Role and Responsibility, Input buffering, Specification of tokens, Recognition of tokens,
LEX tool.
UNIT – II: Syntax Analysis, Top Down Parsing, Bottom up parsing
Syntax Analysis: Role of the parser, Context Free Grammars: Definition, Derivations, Parse trees,
Ambiguity, Eliminating ambiguity, Left recursion, Left factoring.
TOP Down Parsing: Recursive descent parsing, Non-recursive predictive parsing, LL(1) grammars, Error
recovery in predictive parsing.
Bottom up Parsing: Handle pruning, Shift-Reduce parsing, Conflicts during shifts- reduce parsing, SLR
Parsing, Canonical LR (1) parsers, LALR parsers, Using ambiguous grammars, YACC tool.
UNIT – III: Syntax Directed Translations, Intermediate Code Generation
Syntax Directed Translation: Syntax Directed Definitions, Evaluation orders for SDD‘s, Application of
SDT, SDT schemes
Intermediate Code Generation: Need for intermediate code, Types of intermediate code, Three address
code, Quadruples, Triples, Type expressions, Type equivalence, Type checking, Translation of expressions,
control flow statements, switch statement, procedures, back patching.
UNIT – IV: Run Time Storage Organization, Code Generation
Run Time Storage Organization: Storage Organization, Stack Allocation of Space, Access to Nonlocal
Data on the Stack, Heap Management, Symbol table organization.
Code Generation: Issues in the Design of a Code Generator, The Target Language, Addresses in the
Mdv
Mdv