What does Grammar ambiguity refer to?
Difficulty: Hard
About this MCQ
This Hard Compiler Design MCQ checks one syllabus fact.
The question is: “What does Grammar ambiguity refer to?”
The accepted answer is C. A property of a formal grammar where a single string can be produced by more than one distinct parse tree.. Grammar ambiguity refers to a property of a formal grammar where a single string can be produced by more than one distinct parse tree.
- A. A compiler capable of creating executable code for a platform other than the one on which the compiler itself runs.
Why not A: “A compiler capable of creating executable code for a platform other than the one on which the compiler itself runs.” is not correct. The accepted answer is C. A property of a formal grammar where a single string can be produced by more than one distinct parse tree.. Grammar ambiguity refers to a property of a formal grammar where a single string can be produced by more than one distinct parse tree.
- B. A technique that compiles code into machine instructions at runtime rather than before execution.
Why not B: “A technique that compiles code into machine instructions at runtime rather than before execution.” is not correct. The accepted answer is C. A property of a formal grammar where a single string can be produced by more than one distinct parse tree.. Grammar ambiguity refers to a property of a formal grammar where a single string can be produced by more than one distinct parse tree.
- C. A property of a formal grammar where a single string can be produced by more than one distinct parse tree. ✓
- D. A parsing strategy that builds a parse tree starting from the start symbol and working down toward the input tokens.
Why not D: “A parsing strategy that builds a parse tree starting from the start symbol and working down toward the input tokens.” is not correct. The accepted answer is C. A property of a formal grammar where a single string can be produced by more than one distinct parse tree.. Grammar ambiguity refers to a property of a formal grammar where a single string can be produced by more than one distinct parse tree.
Correct answer
C. A property of a formal grammar where a single string can be produced by more than one distinct parse tree.
Explanation
Grammar ambiguity refers to a property of a formal grammar where a single string can be produced by more than one distinct parse tree.
Source: Compiler Design Official Reference Guide
Tags: computer science, compiler design, compilers, programming languages
Submitted by: MCQsHub Editorial
Related MCQs
- Which of the following best describes Lexical pattern matching?
- Identify the correct concept described as: a technique that compiles code into machine instructions at runtime...
- Just-in-time (JIT) compilation is best defined as which of the following?
- A code optimization technique that examines a small set of adjacent instructions to replace them with a more e...
- Choose the correct description of Peephole optimization.
- Which of the following best names the concept in which a compiler capable of creating executable code for a pl...