10 topics · 88 Qs · 5.2 marks/paper · since 2011
GATE heavily tests the Parsing stage of compiler design across both Top-Down (LL(1), recursive descent) and Bottom-Up (LR(0), SLR(1), LALR(1), CLR(1)) paradigms. In GATE CS, Interm… Guide
Open a topic to browse, or practice it timed.
Jump to the first question from that paper.
Subject guide
GATE heavily tests the Parsing stage of compiler design across both Top-Down (LL(1), recursive descent) and Bottom-Up (LR(0), SLR(1), LALR(1), CLR(1)) paradigms. In GATE CS, Intermediate Code Generation (ICG) is tested through both theoretical/architectural concepts and precise algorithmic computations. In GATE CS, this foundational topic tests grammar analysis, parsing techniques, and compiler phase interactions through both theoretical properties and computational mechanics.
Maximum Bottom-Up Reductions
Used when parsing a string of tokens with a bottom-up parser on a grammar containing no -productions and no unit-productions.
Immediate Left Recursion Elimination
Used to transform directly left-recursive productions into equivalent right-recursive productions suitable for top-down LL(1) parsing.
General Context-Free Parsing Worst-Case Time
Used to denote the worst-case time complexity of universal CFG parsers (e.g., CYK or Earley's algorithm) for a string of length .
LALR State Merge Condition
Used to determine if two LR(1) item sets can be merged to form a single LALR(1) state.
FOLLOW Set Propagation Rule
Used when determining the terminal symbols that can appear immediately to the right of a non-terminal across all sentential forms.
LL(1) Parsing Table Construction Rule
Used to place production into table cells for terminals and the end-marker \.
LR(0) Closure Function
Used recursively whenever the dot directly precedes a non-terminal symbol in any LR(0) item of the set.
LR(0) Goto Function
Used to compute the transition state on terminal or non-terminal from an item set .
Canonical LR Item and GOTO Set State Construction
common · NAT · 2 marks · 2024, 2021
Given an augmented grammar, compute the CLOSURE of an initial set and evaluate multi-step GOTO transitions to count the exact number of items in a resulting state.
Grammar Classification in the LR/LL Hierarchy
common · MCQ · 2 marks · 2025, 2022, 2015
Determine whether a given context-free grammar is LL(1), SLR(1), LALR(1), or CLR(1) by identifying specific conflicts (FIRST/FIRST, FIRST/FOLLOW, Shift-Reduce, or Reduce-Reduce) across states.
FIRST/FOLLOW Computation and LL(1) Table Population
common · MCQ · 2 marks · 2024
Compute FIRST and FOLLOW sets to fill in blank cells of an LL(1) parsing table or reconstruct missing grammar productions from given FIRST/FOLLOW constraints.
Conflict Detection in LR Item Sets
common · MCQ · 2 marks · 2026, 2014, 2013
Analyze either a single canonical item set or all states of an LR(0)/SLR(1)/LALR(1) automaton to count or identify Shift-Reduce (S-R) or Reduce-Reduce (R-R) conflicts under specific lookaheads.
Grammar Transformations: Left Recursion and Associativity
common · MCQ · 1 marks · 2017, 2016, 2014
Identify direct/indirect left recursion, convert left-recursive grammars to right-recursive forms, or derive operator precedence/associativity directly from grammar structure.
Theoretical Properties and Hierarchy of Parsers
occasional · MSQ · 1 marks · 2026, 2024, 2022, 2021
Evaluate conceptual assertions concerning deterministic CFGs, parser power comparisons (LL vs SLR vs LALR vs CLR), parsing time complexity (e.g., CYK ), and state merging rules.