The document lists compiler design questions organized by unit and year, covering topics such as lexical analysis, syntax analysis, semantic analysis, and code generation. Each unit includes specific questions related to concepts, definitions, and practical applications in compiler design. The questions are intended for students preparing for examinations in compiler design courses.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views2 pages
Compiler_Design_Questions_Unitwise
The document lists compiler design questions organized by unit and year, covering topics such as lexical analysis, syntax analysis, semantic analysis, and code generation. Each unit includes specific questions related to concepts, definitions, and practical applications in compiler design. The questions are intended for students preparing for examinations in compiler design courses.
- Define bootstrapping in the context of compilers. (2023-24) - Define the terms Language Translator and Compiler. (2021-22) - Explain the lexical analysis phase with an example. (2022-23) - Construct NFA and DFA for (0+1)*(00+11)(0+1)* (2022-23) - Construct NFA for a(b|c)* (2023-24) - Design a DFA for (x+y)*xyy (2020-21) - Describe the relationship between FSMs and regular expressions (2023-24) - What are the various parts in LEX program? (2021-22) - What is hashing? Explain. (2021-22) - Differentiate Parse Tree and Syntax Tree with an example. (2022-23, 2023-24) - What is the difference between parse tree and abstract syntax tree? (2021-22)
- What are the problems associated with top-down parsing? (2021-22, 2022-23) - Construct CLR(1) parsing table for: S -> AA, A -> aA | b (2020-21) - Construct LALR parsing table for: S -> BB, B -> aB | b (2021-22) - Construct SLR parsing table: E -> E+E | E*E | id (2021-22, 2023-24) - Is grammar LR(0)? S->PQy, P->Sy|x, Q->yS (2020-21, 2023-24) - Construct LR(1) & LALR table for: S->aAd... (2023-24) - Predictive parse table for: E -> E+T/T etc. (2021-22) - Test LL(1) and construct table: S->1AB/ etc. (2021-22) - Differentiate LR and LL parsers (2022-23)
UNIT 3: Syntax Directed Translation & Intermediate Code
- Types of attributes associated with grammar symbols? (2021-22, 2023-24) - Syntax Directed Definition for: S -> id=E... (2021-22, 2023-24) - Translate expression to Quadruples/Triples: x=y*z+y*-z etc. (2020-21) - Generate 3AC for switch statement (2020-21) - 3AC using backpatching: a < b or c > d and e < f (2023-24) - 3AC for: while (a > b) { if (c < d) ... } (2021-22) - Syntax-directed translation for array references (2023-24) - Translation scheme for infix to postfix (2022-23) - Define attributed grammars (2022-23)
UNIT 4: Semantic Analysis, Symbol Table & Runtime Environment
- What is an activation record? Explain. (2021-22, 2022-23, 2023-24)
- Symbol table and its data structures (2020-21, 2022-23, 2023-24) - Representing scope information (scope by number/location) (2022-23) - Differentiate static and dynamic scope (2021-22) - Role of semantic analysis (2022-23) - Error handling phase of compiler (2020-21) - Phrase-level error recovery (2022-23) - Compilation phase errors: lexical, syntax, semantic (2020-21, 2021-22, 2022-23)
UNIT 5: Code Generation & Optimization
- Responsibilities of code generator (2023-24)
- Two design issues in code generation (2023-24) - Explain global data-flow analysis (2023-24) - Construct flow graph for factorial (2020-21) - DAG for p + p*(q - r) + (q - r)*s (2020-21) - DAG for a = b * -c + b * -c (2022-23) - Optimize basic block using common sub-expr elimination (2023-24) - Discuss optimizations: copy prop, dead-code, etc. (2022-23) - Explain loop optimization (2020-21) - Define loop jamming (2022-23) - Detect and eliminate induction variables (2021-22)