retagged by
8,497 views
0 votes
0 votes
The productions

E -> E+E | E-E | E*E | id

a:) generates inherently ambiguous languages

b:) generates and ambiguous language

c:) is an ambiguous grammer

d) none of these
retagged by

2 Answers

0 votes
0 votes
It is ambiguous grammar because for  the string id+id+id ....we have 2 parse trees

the grammar that has more than one parse tree for a output string is always ambiguous..

Related questions

0 votes
0 votes
1 answer
2
vaishali jhalani asked Nov 21, 2016
1,897 views
If the grammar be left recursive then is it always be ambiguous?
2 votes
2 votes
2 answers
3
Shivam Bhardwaj asked Aug 10, 2017
888 views
Ques. S Aa/bAc/dc A dWhich of them is correct. Please provide detailed information.a) LALR(1) but not SLR(1)b) Both SLR(1) and LALR(1)c) Grammar is Ambiguo...
1 votes
1 votes
2 answers
4
umang_16 asked Dec 16, 2016
644 views
Consider the grammar given below. It isE - T+E | TT - aa. SLR(1) but not LL(1)b. Not an operator grammarc. Ambiguousd. None of these