GATE CS roadmap
Compiler design
From source text to optimised code. Builds directly on TOC. 6 topics, about 26 hours.
Lexical analysis
About 2 h.
- Count tokens in a program and explain longest match
Visualisers: Lexical analysis
Grammar clean-up, FIRST and FOLLOW
About 4 h.
- Remove left recursion and left-factor
- Compute FIRST and FOLLOW sets
Visualisers: Left recursion & factoring, FIRST & FOLLOW
Top-down parsing
About 4 h.
- Build an LL(1) table and find conflicts
Visualisers: LL(1) parsing
Bottom-up parsing
About 8 h.
- Build LR(0), SLR, LALR and CLR tables and count states
- Find shift-reduce and reduce-reduce conflicts
- Parse with operator precedence
Visualisers: LR parsing, Operator-precedence parsing
Syntax-directed translation
About 3 h.
- Evaluate S- and L-attributed definitions on a parse tree
Visualisers: Syntax-directed translation
Intermediate code and optimisation
About 5 h.
- Write three-address code, quadruples and triples, and build a DAG
- Apply local optimisations and liveness-based register allocation
Visualisers: Three-address code & DAG, Code optimisation, Register allocation