Computer Science Fundamentals Algorithms Subjective
Feb 25, 2013

What is an ambiguous grammar? Give an example.

Detailed Explanation
  • A grammar that produces more than one parse tree for some sentence is said to be ambiguous
  • An ambiguous grammar is one that produces more than one leftmost or rightmost derivation for the same sentence.

          Eg.           E --------->E+E / E*E / id

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback