Compiler Design Unit 2 – Basic Parsing Techniques and Automatic Construction of Efficient Parsers: important questions for AKTU
Unit 2 (Basic Parsing Techniques and Automatic Construction of Efficient Parsers) questions that AKTU repeats most often. This unit carries about 32 marks per paper. Start with the repeated questions, then the most asked topics.
Most repeated Unit 2 questions
- 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) – also asked in 2018
- Check whether the given grammar is LR(0) or not: S→PQy, P→Sy|x, Q→yS. (10 marks, 2024, Canonical Collection of LR(0) Items) – also asked in 2021
- Check whether the given grammar is LR(0) or not: S→PQy, P→Sy|x, Q→yS (10 marks, 2021, Canonical Collection of LR(0) Items) – also asked in 2024
Most important Unit 2 topic
- Shift-Reduce Parsing (Unit 2: Basic Parsing Techniques and Automatic Construction of Efficient Parsers) – asked 9 times in 2019, 2021, 2022, 2023, 2024, 2025, 2026
Most asked Unit 2 topics
- Shift-Reduce Parsing – asked 9 times
- Top-Down Parsing – asked 9 times
- Predictive Parsers – asked 7 times
More 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)
Unit 2 syllabus topics
- Parsers
- Shift-Reduce Parsing
- Operator-Precedence Parsing
- Top-Down Parsing
- Predictive Parsers
- LR Parsers
- Canonical Collection of LR(0) Items
- Construction of SLR Parsing Tables
- Construction of Canonical LR Parsing Tables
- Construction of LALR Parsing Tables
- Using Ambiguous Grammars
- Automatic Parser Generator