Skip to content

Compiler Design and Construction syllabus

CSC3655 units · 46 topicsAcademic year 2083/84
Browse the units

1Introduction to Compilers (3 hrs)

  1. 1.1
    Compiler Structure: Analysis and Synthesis Model of Compilation, sub-phases within analysis and synthesis phases
  2. 1.2
    Basic concepts related to compiler such as interpreter
  3. 1.3
    Simple One-Pass Compiler
  4. 1.4
    Preprocessor, macros
  5. 1.5
    Symbol table and error handler

2Analysis Phases (22 hrs)

  1. 2.1
    Lexical Analysis
    1. 2.1.1
      Its role
    2. 2.1.2
      Specification and Recognition of tokens
    3. 2.1.3
      Input Buffer
    4. 2.1.4
      Finite Automata relevant to compiler construction, syntactic specification of languages
    5. 2.1.5
      Optimization of DFA based pattern matchers
  2. 2.2
    Syntax Analysis
    1. 2.2.1
      Its role
    2. 2.2.2
      Basic parsing techniques: Problem of Left Recursion, Left Factoring, Ambiguous Grammar
    3. 2.2.3
      Top-down parsing
    4. 2.2.4
      Bottom-up parsing
    5. 2.2.5
      LR parsing
  3. 2.3
    Semantic Analysis
    1. 2.3.1
      Static and Dynamic Checks
    2. 2.3.2
      Typical Semantic errors
    3. 2.3.3
      Scoping
    4. 2.3.4
      Type Checking
    5. 2.3.5
      Syntax directed definitions (SDD) and Translation (SDT)
    6. 2.3.6
      Attribute Types: Synthesized and Inherited
    7. 2.3.7
      Annotated Parse Tree
    8. 2.3.8
      S-attributed and L-attributed grammar
    9. 2.3.9
      Applications of syntax directed translation
    10. 2.3.10
      Type Systems
    11. 2.3.11
      Type Checking and Conversion

3Symbol Table and Run-time Storage (4 hrs)

  1. 3.1
    Symbol Table Design
    1. 3.1.1
      Function of Symbol Table
    2. 3.1.2
      Information provided by Symbol Table
    3. 3.1.3
      Attributes and Data Structures for symbol table
  2. 3.2
    Run-time storage management

4Code Generation and Optimization (16 hrs)

  1. 4.1
    Intermediate Code Generator
    1. 4.1.1
      High-level and Low-level Intermediate representation
    2. 4.1.2
      Syntax tree and DAG representations
    3. 4.1.3
      Three-address code, Quadruples, Triples
    4. 4.1.4
      SDT for intermediate code
    5. 4.1.5
      Intermediate code generation for Declarations, Assignments, Control Flow, Boolean Expressions and Procedure Calls
    6. 4.1.6
      Back patching
  2. 4.2
    Code Generator
    1. 4.2.1
      Factors affecting a code generator
    2. 4.2.2
      Target Language
    3. 4.2.3
      Basic blocks and flow graphs
    4. 4.2.4
      Dynamic programming code-generation algorithm
  3. 4.3
    Code Optimization
    1. 4.3.1
      Need and criteria of Code Optimization
    2. 4.3.2
      Basic optimization techniques
  4. 4.4
    Case Studies of some compilers like C compiler, C++ compiler

5Laboratory Works

  1. 5.1
    Create a project using lexical analyzer generator or any high level language
  2. 5.2
    Create a parser using parser generator or any high level language
  3. 5.3
    Write programs for intermediate code generation