How to study Compiler Design — Semester VI, Pokhara University BECE

What it covers

How compilers are built: phases of a compiler, lexical analysis, parsing, syntax-directed translation, type checking, symbol tables, intermediate code, code optimization and code generation.

Topics worth extra time

  1. Phases of a compiler
  2. Lexical analysis: regular expressions and finite automata
  3. Parsing: top-down (LL(1)) and bottom-up (SLR, LR, LALR)
  4. Syntax-directed translation and intermediate code generation
  5. Code optimisation and code generation

How to study it

Parsing is the heart of the course: compute FIRST and FOLLOW sets and build parsing tables for many grammars until the steps are automatic. Writing a small lexer and parser, as in the lab, connects the theory to real code.

In the exam

Show FIRST/FOLLOW sets, item sets and parsing tables completely. For parsing a given string, present the stack, input and action at each step in a table.

Compiler Design notes · All study guides