Skip to content
CY-603 (C) · Autometa & Compiler design/Important Questions

Autometa & Compiler design (CY-603 (C)) - Important Questions

  1. Unit 114 Marks High Priority

    Explain lexical analysis and its role in a compiler. Describe the specification and recognition of tokens, and discuss input buffering techniques used in lexical analyzers.

    Core topic: lexical analysis, token specification and input buffering. Matches the high-frequency topic in Unit 1.

  2. Unit 17 Marks Medium Priority

    Define regular expressions. Convert the following regular expression to an equivalent nondeterministic finite automaton using Thompson's construction: $\left(a\mid b\right)^*abb$.

    Standard conversion problem: RE to NFA using Thompson's construction; typical short-answer exercise.

  3. Unit 110 Marks Medium Priority

    Describe the subset construction algorithm to convert an $NFA$ to an equivalent $DFA$. Illustrate the algorithm with a short example.

    Core algorithm for automata conversion used in lexical analysis. Asked frequently in conceptual and short-problem form.

  4. Unit 17 Marks Low Priority

    Explain DFA minimization and outline Hopcroft's algorithm. Discuss its time complexity and the main steps involved in minimizing a given $DFA$.

    Automata optimization topic; algorithmic outline and understanding of Hopcroft's approach often tested.

  5. Unit 114 Marks High Priority

    Design regular expressions and corresponding finite automata for the following tokens:

    • (a) identifier: a token that starts with a letter followed by letters or digits.
    • (b) integer constant (decimal).
    • (c) real constant with optional fractional part and optional exponent (e.g., 12.34, 10e5, 3.0E-2).

    Practical token specification problems: students are expected to write regular expressions and reason about corresponding automata.

  6. Unit 17 Marks Medium Priority

    Explain the maximal munch (longest match) rule and rule priority in lexical analysis. Give examples where rule ordering affects tokenization.

    Important concept in token recognition; affects scanner output and is commonly asked as short explanation with examples.

  7. Unit 17 Marks High Priority

    Describe input buffering schemes for lexical analyzers and explain how the two-buffer (sentinel) scheme works to achieve efficient scanning.

    Directly addresses the unit topic 'input buffering'; two-buffer scheme is a standard exam topic.

  8. Unit 110 Marks Medium Priority

    Discuss the role of Lex (or Flex) in lexical analyzer generation. Describe the structure of a Lex specification and the workflow used to generate a scanner from rules and actions.

    Tool-based question: Lex/Flex specification and workflow are commonly examined to test practical knowledge.

  9. Unit 17 Marks High Priority

    Define tokens, lexemes, and patterns. Explain how a lexer handles whitespace and comments and how lexical errors are detected and reported.

    Foundational definitions and error-handling topic; often asked as short-answer or part of a larger question.

  10. Unit 114 Marks Medium Priority

    Given a set of overlapping token specifications, construct the combined $DFA$ that recognizes all tokens and show how conflicts are resolved using rule precedence and the longest-match policy. Explain the steps from regular expressions to $NFA$, to $DFA$, to token selection.

    Comprehensive synthesis problem combining regexes, automata, and conflict-resolution strategies used in real scanners.

Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in