Compiler Design | Tokens, lexical Analyzer & Grammar | Part 9 | Ambiguous to unambiguous grammar
Channel: DigiiMento: GATE, NTA NET & Other CSE Exam Prep
Date: 2022-10-13

ambiguous grammar to unambiguous grammar
Ambiguous vs Unambiguous Grammar :
The grammars which have more than one derivation tree or parse tree are ambiguous grammars. This grammar is not parsed by any parsers.
A grammar can be unambiguous if the grammar does not contain ambiguity that means if it does not contain more than one leftmost derivation or more than one rightmost derivation or more than one parse tree for the given input string.