Compiler Design
29 articles in this topic

First and Follow Sets Explained: Rules, Worked Example and LL(1) Checks
Learn a repeatable way to compute FIRST and FOLLOW sets, handle nullable suffixes, and use the results to test a grammar and fill its LL(1) parsing table.

Symbol Table in Compiler Design: Errors, Passes and Worked Examples
Follow one scoped program from symbol-table insertion to type checking and error recovery, then see why a compiler phase is not the same thing as a pass.

Semantic Analysis and Syntax-Directed Translation: Worked Examples for GATE CS
Follow the compiler pipeline from symbol-table checks to attribute evaluation. Three worked examples trace an arithmetic expression, a declaration list, and postfix output.

Lexical Analysis and Tokens in Compiler Design: Worked Examples for GATE CS
See how a lexer turns source characters into tokens. The worked scan follows one complete line, builds symbol-table references, and exposes common traps.

CLR(1) Parser and Canonical LR(1) Items: Worked Closure, GOTO and Parse Table
Build a CLR(1) parser from one small grammar. Follow every closure, GOTO, table entry, and stack action until ccdd is accepted.

Compiler Design for GATE: A 6-Week Topic-by-Topic Study Plan
Follow a fixed eight-hour weekly clock through compiler phases, parsing, translation, runtime storage, optimisation and mixed revision.

Derivation and Recursion in CFG: Leftmost, Rightmost and Worked Examples
Follow three exact derivations to separate sentential forms from sentences, see how recursion behaves, and remove immediate left recursion without changing the language.

Basic Blocks, Loops and Optimization Methods in Compiler Design: A Worked Example
Follow one three-address-code fragment from leader identification to a natural loop, then verify how invariant motion and strength reduction preserve its result.

Left Factoring in Compiler Design: Prefix Rules, Worked Grammars and Exam Traps
Learn how to find a useful common prefix, factor a grammar to a fixed point, preserve empty suffixes, and test what the result does and does not prove.

SSA and Control Flow in Compiler Design: Dominators, Phi Nodes and a Worked CFG
Build SSA as one connected process. This worked compiler-design example goes from a six-block CFG to dominators, phi placement, renaming and return value 3.

Formal Grammar and Chomsky Hierarchy for GATE: Worked Derivations and Classification
Learn formal grammar from G=(V,T,P,S), derive aaabbb, classify Types 3 to 0, and prove why id+id*id is ambiguous before practising quick checks.

Top-Down Parsing in Compiler Design: Recursive Descent, LL(1), FIRST and FOLLOW with Worked Examples
Learn top-down parsing from grammar preparation to predictive parsing, with one expression grammar carried through every calculation and trace.