Compiler Design | Tokens, lexical Analyzer & Grammar | Part 7 | Ambiguity in context free grammar
Channel: DigiiMento: GATE, NTA NET & Other CSE Exam Prep
Date: 2022-10-13

Ambiguous Context-Free Grammar: Context-free grammar is called ambiguous if there exists more than one LMD or more than one RMD for a string which is generated by the grammar. There will also be more than one derivation tree for a string in ambiguous grammar. 
Ambiguity in a context-free grammar
It is called ambiguous grammar if a context-free grammar G has more than one derivation tree for some string w ∈ L(G). Multiple right-most or left-most derivations exist for some string generated from that grammar.
#call_9821876104