Compiler Design (CD)
Zero-fluff compiler engineering notes, formal grammars, predictive LL(1) and canonical LR parsing tables, syntax-directed translation schemes, intermediate three-address code, and control-flow optimization frameworks for university semester exams, systems programming, and high-concurrency runtime environments.
Basics of Compiler & Language Processing System
The 4-stage language processing pipeline (Preprocessor, Compiler, Assembler, Linker/Loader), front-end vs back-end compiler phases, single vs multi-pass compilers, symbol table data structures, and compiler error handling strategies.
Lexical Analysis (Scanner Architecture)
Tokens, patterns, and lexemes, greedy longest-match tokenization, dual input buffering schemes with sentinels, regular definitions, Lex/Flex generator specifications, and lexical conflict resolution.
Context-Free Grammars & Parsing Foundations
Formal phrase-structure grammar 4-tuple, Leftmost vs Rightmost derivations, parse trees vs abstract syntax trees, grammar ambiguity proofs, immediate and indirect left recursion elimination, and left factoring algorithms.
Top-Down Parsing (Predictive LL Parsing)
Mathematical computation of FIRST and FOLLOW sets, LL(1) predictive parsing table construction, First/First and First/Follow conflict detection, and recursive descent parsers with panic-mode error recovery.
Bottom-Up Parsing (LR Parsing & Operator Precedence)
Shift-reduce parsing mechanics, handles and viable prefixes, LR(0) canonical items and DFA state construction, SLR(1) follow-lookaheads, CLR(1) LR(1) items, LALR(1) state merging, and the universal parser hierarchy.
Semantic Analysis & Syntax-Directed Translation (SDT)
Syntax-Directed Definitions (SDD), synthesized vs inherited attributes, S-Attributed vs L-Attributed evaluation orders, dependency graphs, topological sorting, and type systems with static semantic checking.
Intermediate Code Generation (ICG)
Three-Address Code (TAC), Quadruples, Triples, and Indirect Triples representations, Directed Acyclic Graphs (DAG) for expression optimization, value numbering, and boolean backpatching algorithms.
Code Optimization, Runtime Environments & Target Code Generation
Basic block partitioning and Control Flow Graphs (CFG), local and global optimizations (constant folding, dead code, common subexpressions), loop invariant code motion, activation records, and register allocation via graph coloring.