Рет қаралды 162,062
#ambiguousgrammar #Ambiguityincontextfreegrammar, #compilerdesign
ambiguous grammar | ambiguous grammar in compiler design | ambiguous grammar in compiler design in hindi | ambiguous grammar in toc | ambiguous grammar example | ambiguous grammar in flat | ambiguous grammar in automata | ambiguous grammar and ambiguous grammar in compiler design | ambiguous grammar and ambiguous grammar | What are ambiguous grammars give an example of an ambiguous grammar? | What is an ambiguous CFG? | How do you show an ambiguous grammar?
This Lecture shows what are Ambiguous Grammars and shows an example of an Ambiguous Grammar
Ambiguous grammar:
A CFG is said to ambiguous if there exists more than one derivation tree for the given input string i.e., more than one LeftMost Derivation Tree (LMDT) or RightMost Derivation Tree (RMDT).
Ambiguity of a grammar is undecidable, i.e. there is no particular algorithm for removing the ambiguity of a grammar, but we can remove ambiguity by:
Disambiguate the grammar i.e., rewriting the grammar such that there is only one derivation or parse tree possible for a string of the language which the grammar represents.
If the grammar has ambiguity, then it is not good for compiler construction. No method can automatically detect and remove the ambiguity, but we can remove ambiguity by re-writing the whole grammar without ambiguity.
Contact Details (You can follow me at)
Instagram: / thegatehub
LinkedIn: / thegatehub
Twitter: / thegatehub
...................................................................................................................
Email: thegatehub2020@gmail.com
...................................................................................................................
📚 Subject Wise Playlist 📚
▶️Data Structures: tinyurl.com/bwp...
▶️Theory of Computation: tinyurl.com/5bh...
▶️Compiler Design: tinyurl.com/2p9...
▶️Design and Analysis of Algorithms: tinyurl.com/ywk...
▶️Graph Theory: tinyurl.com/3e8...
▶️Discrete Mathematics: tinyurl.com/y82...