Syllabus - COMPILER DESIGN (CB-502)


Computer Science and Business System (CSBS)

COMPILER DESIGN (CB-502)

V

UNIT – I

Introduction

Phases of compilation and overview. Lexical Analysis (scanner): Regular languages, finite automata, regular expressions, relating regular expressions and finite automata, scanner generator, lex, flex.

UNIT – II

Syntax Analysis (Parser)

Context-free languages and grammars, push-down automata, LL(1) grammars and top-down parsing, operator grammars, LR(0), SLR(1), LR(1), LALR(1) grammars and bottom-up parsing, ambiguity and LR parsing, LALR(1) parser generator, yacc, bison

UNIT – III

Semantic Analysis

Attribute grammars, syntax directed definition, evaluation and flow of attribute in a syntax tree. Symbol Table: Basic structure, symbol attributes and management. Run-time environment: Procedure activation, parameter passing, value return, memory allocation, scope.

UNIT – IV

Intermediate Code Generation

Translation of different language features, different types of intermediate forms.

UNIT – V

Architecture dependent code improvement

instruction scheduling (for pipeline), loop optimization (for cache memory) etc. Register allocation and target code generation. Advanced topics: Type systems, data abstraction, compilation of Object Oriented features and non-imperative programming languages.

Practicals

Reference Books

  • The Design and Evolution of C++, Bjarne Stroustrup.

  • Compiler Design, Raghavan, TMH Pub.

  • Compiler Construction: Principles and Practice, Louden, Cengage Learning

  • Compiler Design in C, A. C. Holub. Prentice-Hall Inc., 1993.

  • Writing compiler & Interpreters, Mak, Willey Pub.