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
- Phases of a compiler
- Lexical analysis: regular expressions and finite automata
- Parsing: top-down (LL(1)) and bottom-up (SLR, LR, LALR)
- Syntax-directed translation and intermediate code generation
- 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.
