Neural Sync Active
BSCS4032 — Compiler Design
Registry Synced
BSCS4032 — Compiler Design
212 words
1 min read
Reading compass
Now · 📖 Course Overview
BSCS4032 — Compiler Design
IIT Madras BS Degree | Degree Elective | 4 Credits | 12 weeks
📖 Course Overview
Compiler Design covers the translation of high-level languages to machine code: lexical analysis (regex→NFA→DFA), syntax analysis (CFG, LL/LR parsing), semantic analysis, intermediate code generation, optimization, and code generation. The course uses Flex and Bison for scanner/parser generation.
📚 Week-by-Week Topics
| Week | Topics | Files |
|---|---|---|
| 1 | Introduction, Compiler Structure, Phases Overview | Compiler Overview |
| 2 | Lexical Analysis: Tokens, Regex, NFA→DFA, Flex | Lexical Analysis |
| 3 | Syntax Analysis: CFG, Derivations, Recursive Descent, LL(1) | Syntax Analysis I |
| 4 | LR Parsing: LR(0), SLR(1), LR(1), LALR(1), Bison | LR Parsing |
| 5 | Semantic Analysis, Attribute Grammars, Type Checking | Semantic Analysis |
| 6 | Symbol Table, Memory Organization | Symbol Table |
| 7 | Intermediate Code Generation: IR, TAC, Expressions | Intermediate Code |
| 8 | Control Flow Translation, Backpatching | Control Flow |
| 9 | Basic Optimization: CSE, Copy Propagation, Dead Code | Optimization |
| 10 | Global Optimization: Data Flow Analysis, Liveness | Data Flow Analysis |
| 11 | Code Generation: Register Allocation, Instruction Selection | Code Generation |
| 12 | Advanced: Garbage Collection, JIT, LLVM | Advanced Topics |
🎯 Key Exam Topics
| Topic | Weight | Priority |
|---|---|---|
| Lexical Analysis (regex→NFA→DFA) | High | ⭐⭐⭐ |
| LL(1) Parsing (FIRST/FOLLOW) | High | ⭐⭐⭐ |
| LR Parsing (items, tables) | High | ⭐⭐⭐ |
| Semantic Analysis (S-attributed, L-attributed) | Medium | ⭐⭐ |
| Intermediate Code (TAC) | Medium | ⭐⭐ |
| Data Flow Analysis | Medium | ⭐⭐ |
| Code Generation (register allocation) | Medium | ⭐⭐ |
🔗 Cross-References
- BSCS3021 (ToC): Regular languages, CFG, automata theory
- BSCS3005 (C Programming): Target code generation
- BSCS4022 (OS): Memory organization, runtime Join Discord PreviousCode Optimization