COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
a grammar E
A
ambiguous
B
unambiguous
C
partially ambiguous
D
none
Explanation: 

Detailed explanation-1: -In computer science, an ambiguous grammar is a context-free grammar for which there exists a string that can have more than one leftmost derivation or parse tree. Every non-empty context-free language admits an ambiguous grammar by introducing e.g. a duplicate rule.

Detailed explanation-2: -The correct answer is option 2. Concept: A grammar that produces more than one parse tree for some sentence is said to be ambiguous.

There is 1 question to complete.