INTRODUCTION TO COMPILER DESIGN
KEY COMPONENTS OF A COMPILER
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
The grammar {E
|
Ambiguous
|
|
Unambiguous
|
|
Partially ambiguous
|
|
None of the other options
|
Explanation:
Detailed explanation-1: -The correct answer is option 4. A is ambiguous because can be generated using leftmost derivation having two different parse trees with an empty string. B is ambiguous grammar with string abab. C is an ambiguous grammar with string abbbb.
Detailed explanation-2: -A language that only admits ambiguous grammars is called an inherently ambiguous language. Deterministic context-free grammars are always unambiguous, and are an important subclass of unambiguous grammars; there are non-deterministic unambiguous grammars, however.
There is 1 question to complete.