retagged by
561 views

1 Answer

Best answer
2 votes
2 votes

Yes, Correct! but a string can not ambiguous. Though given grammar is ambiguous!

A grammar will be called ambiguous if can generate more than one parse tree/Left most derivations/Right most derivations for same string.

One more point to be noticed here is that, in first parse tree, left id*id will be evaluated first while in second parse tree id+id will be evaluated first,

selected by
Answer:

Related questions

1 votes
1 votes
2 answers
1
Prateek Arora asked Oct 27, 2016
624 views
Is the given grammar ambiguous?S->ABA->aB->b
0 votes
0 votes
1 answer
3
Nikhil Patil asked Feb 7, 2018
356 views
$G: S\rightarrow SbS\mid a$Grammars are ambiguous True/False.
0 votes
0 votes
1 answer
4
Sanket_ asked Nov 10, 2016
354 views
which is false?a) An unambiguous grammar has same RMD for every sentence.b)An ambiguous grammar may have an infinite no. of derivation trees for some sentences in the la...