Compiler Design Unit 2 – Basic Parsing Techniques and Automatic Construction of Efficient Parsers: AKTU previous year questions
12 AKTU questions from Unit 2 (Basic Parsing Techniques and Automatic Construction of Efficient Parsers) asked in 2024–2026, tagged by marks, year and topic. In short: about 32 marks of every paper come from this unit; the most asked topic is Shift-Reduce Parsing (9 times); 1 questions came back in a later year. The latest ones are listed below; on the page you can filter them by 2-mark or long questions, topic and repeats.
Unit 2 previous year questions
- Differentiate between top-down and bottom-up parsing. (2 marks, 2026, Parsers)
- Describe bottom-up parsing techniques in detail. Explain shift-reduce parsing with example. (7 marks, 2026, Shift-Reduce Parsing)
- Discuss LR parsing in detail. Explain LR(0), SLR, CLR, and LALR parsers with comparison. (7 marks, 2026, LR Parsers)
- Construct CLR parsing table for the following grammar: S→ CC C→ cC |d (7 marks, 2026, Construction of Canonical LR Parsing Tables)
- State any two differences between top-down and bottom-up parsing. (2 marks, 2025, Parsers)
- Given the grammar: S → Aa | bAc | Bc | bBa A → d B → d Construct the SLR parsing table and determine whether any conflicts occur. (7 marks, 2025, Construction of SLR Parsing Tables)
- Construct LL(1) parsing table for the following grammar S → aB | aC | Sd | Se B → bBc | f C → g (7 marks, 2025, Predictive Parsers)
- Parse the input string (a,(a, a)) using shift reduce parser S → (L) | a L → L, S | S (7 marks, 2025, Shift-Reduce Parsing)
- Explain the concept of shift-reduce parsing. (2 marks, 2024, Shift-Reduce Parsing)
- Consider the following grammar. S -> aSB | d B -> b Compute the number of reduction steps taken by a bottom-up parser while accepting the string “aaaadbbbb”. (2 marks, 2024, Shift-Reduce Parsing)
- Construct the following grammar after removing left recursion: S -> Aa | b | ε A -> Ac | SAd | ε (2 marks, 2024, Top-Down Parsing)
- For the grammar S→aAd |bBd |aBe |bAe, A→f, B→f Construct LR(1) Parsing table. Also draw the LALR table. (10 marks, 2024, Construction of LALR Parsing Tables)
Most asked Unit 2 topics
- Shift-Reduce Parsing – asked 9 times
- Top-Down Parsing – asked 9 times
- Predictive Parsers – asked 7 times
Unit 2 question pattern
- 2-mark questions: 5 asked in 2024–2026
- 7-mark questions: 6 asked in 2024–2026
- 10-mark questions: 1 asked in 2024–2026
- About 32 marks from Unit 2 in every paper
- 1 questions were asked again in a later year
Unit 2 questions year by year
- 2026: 4 Unit 2 questions asked (23 marks across that year's papers)
- 2025: 4 Unit 2 questions asked (23 marks across that year's papers)
- 2024: 4 Unit 2 questions asked (16 marks across that year's papers)