Compiler Design Unit 1 – Compiler Foundations, Lexical Analysis and Syntactic Specification: important questions for AKTU
Unit 1 (Compiler Foundations, Lexical Analysis and Syntactic Specification) questions that AKTU repeats most often. This unit carries about 22 marks per paper. Start with the repeated questions, then the most asked topics.
Most repeated Unit 1 questions
- Check whether given grammar is ambiguous or not. If ambiguous then convert it into unambiguous grammar: E → E + E | E*E | id (7 marks, 2026, Ambiguity) – also asked in 2024
- Explain in detail the process of compilation. Illustrate the output of each phase of compilation of the input “a = (b + c)*(b + c)* 2”. (7 marks, 2025, Compiler Phases and Passes) – also asked in 2017
- Explain context-free grammars and their applications in syntax analysis. Discuss derivation and parse trees. (7 marks, 2026, Formal Grammars and Their Application to Syntax Analysis)
Most important Unit 1 topic
- Finite State Machines and Regular Expressions for Lexical Analysis (Unit 1: Compiler Foundations, Lexical Analysis and Syntactic Specification) – asked 19 times in 2017, 2018, 2021, 2023, 2024, 2025, 2026
Most asked Unit 1 topics
- Finite State Machines and Regular Expressions for Lexical Analysis – asked 19 times
- Compiler Phases and Passes – asked 14 times
- Ambiguity – asked 6 times
More Unit 1 previous year questions
- What is a lexical analyzer generator? Name any one tool. (2 marks, 2026, Lexical-Analyzer Generator)
- Construct DFA for the regular expression: (a+b)∗ab (2 marks, 2026, Finite State Machines and Regular Expressions for Lexical Analysis)
- Design a lexical analyzer to recognize identifiers, keywords, integers, and operators of a programming language. (7 marks, 2026, Implementation of Lexical Analyzers)
- Differentiate between phases and passes of a compiler. (2 marks, 2025, Compiler Phases and Passes)
- What is the Finite State Machines (FSM)? Design a FSM that accepts all strings of a and b containing even number of a’s and odd number of b’s. (2 marks, 2025, Finite State Machines and Regular Expressions for Lexical Analysis)
Unit 1 syllabus topics
- Compiler Phases and Passes
- Bootstrapping
- Finite State Machines and Regular Expressions for Lexical Analysis
- Optimization of DFA-Based Pattern Matchers
- Implementation of Lexical Analyzers
- Lexical-Analyzer Generator
- LEX Compiler
- Formal Grammars and Their Application to Syntax Analysis
- BNF Notation
- Ambiguity
- YACC
- Context-Free Grammars