Compiler Design
50 articles in this topic

Language Processing System in Compiler Design: Preprocessor to Loader with a Worked Trace
Follow one macro-containing C program through every language processor. The trace shows object-file relocation, a linker patch of +4, and the final value 7.

Three-Address Code (3AC): Quadruples, Triples and Indirect Triples with a Worked Example
Carry one expression through 3AC, quadruples, triples and indirect triples. See how every record is formed, valued and safely reordered.

LR(0) Parser Explained: Bottom-Up Parsing, Item Sets and a Worked Example
Build an LR(0) parser from one augmented grammar, then follow every state, table entry and stack operation until cdd$ is accepted.

Attributes and SDT Types in Compiler Design: S-Attributed, L-Attributed and a Worked Trace
See how attributes add meaning to a parse tree, how S-attributed and L-attributed definitions differ, and how one expression becomes both a value and postfix output.

Liveness Analysis in Compiler Design: Data-Flow Equations and a Worked Example
A step-by-step guide to computing USE, DEF, IN and OUT on a looping control-flow graph, then tracing the result to one safe dead-store candidate.

SLR(1) Parser and Conflicts: LR(0) Items, FOLLOW Sets and a Full Parse
Build one SLR(1) parser from augmentation to acceptance. The same grammar exposes an LR(0) conflict, shows how FOLLOW removes it, and traces every move for aab$.

Top-Down Parsing in Compiler Design: Parser Basics and a Worked LL(1) Example
Follow one expression grammar from left-recursion removal to a complete LL(1) table. Then trace a valid token stream to acceptance and stop an invalid stream at its first error cell.

LL(1) Parser Table Explained: FIRST, FOLLOW and a Complete Worked Example
Build an LL(1) parsing table from one grammar, verify every cell, and follow the stack from S$ to acceptance. The same example connects FIRST, FOLLOW, conflicts and epsilon moves.

LALR(1) Parser Merging Explained: LR(1) States, Tables and Conflicts
Build ten canonical LR(1) states, merge them into seven LALR(1) states, construct the parsing table, and trace an accepted string without skipping steps.

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.