Question: Is the following context-free grammar G : E E + E | E * E | ( E ) | a an ambiguous grammar? 1.Yes,

Is the following context-free grammar G: E E + E | E * E | (E) | a an ambiguous grammar?

1.Yes, the above grammar is ambiguous because there exist two different left derivations for a given generated string, such as a * a + a;

2.Yes, the above grammar is ambiguous because E E + E E + a E * E + a E * a + a a * a + a and E E * E E * E + E E * E + a a * E + a a * a + a.

3.Yes, because the generated language by the above grammar is inherent ambiguous;

4.None of the above.

5.No, the above grammar is not ambiguous;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!