Compiler Design (CD) AKTU predicted paper 2026-27
AI-predicted paper for Compiler Design based on 12 past papers (2017, 2018, 2019, 2021, 2022, 2023, 2024, 2025, 2026). NOT an official AKTU paper. Use as a revision tool only.
Paper pattern
- Section A: Attempt all questions. (14 marks)
- Section B: Attempt any THREE questions out of five. (21 marks)
- Section C: Attempt ONE question from each pair (a or b). (35 marks)
Why these questions
- Unit 2 (Basic Parsing Techniques and Automatic Construction of Efficient Parsers) dominates — 24% avg weightage
- Asked every year: Quadruples and Triples
- Due for comeback: Optimization of DFA-Based Pattern Matchers, Context-Free Grammars
- Low priority (never asked): BNF Notation, Derivations and Parse Trees
- Most repeated topic: Finite State Machines and Regular Expressions for Lexical Analysis
Section A – 2-mark questions
- Construct DFA for the regular expression: (a+b)∗ab
- Explain the concept of shift-reduce parsing.
- Why are quadruples preferred over triples in an optimizing compiler?
- List various error recovery strategies for a lexical analysis.
- Compute the number of nodes in Directed Acyclic Graph (DAG) for the following C code segment executed in the sequence: a = b + c; e = a + 1; d = b + c; f = d + 1; g = e + f;
- Construct the following grammar after removing left recursion: S -> Aa | b | ε A -> Ac | SAd | ε
- Give the properties of intermediate representation.
Section B – sample questions
- Describe the relationship between finite state machines and regular expressions. Discuss how regular expressions are used in lexical analysis and pattern matching.
- Discuss various error recovery techniques used in compiler design.
- Define Symbol table? Explain about the data structures used for symbol table.