The Gateway to Computer Science Excellence
+1 vote
217 views
consider the grammer

 

E->E+E / E*E / (E) /a

THE NUMBER OF RIGHT MOST DERIVATION FOR THE SENTENCE (a) is ___________________________
in Compiler Design by Active (4k points)
edited by | 217 views
0
i think (a) cant be derived from given grammer??
0
I think there is a mistake in ques, this rule should be E -> (E) instead of E -> E (E) 

3 Answers

0 votes
Best answer
For this given grammar the answer will be only one

Bcz E->(E)->(a)

For the given grammar u can't find more than one possibility to derive (a)
by (349 points)
selected by
+1 vote
I think Only One Right Most Derivation possible for the sentence (a).

E -> (E)

E-> a
 

Correct me if I am wrong.
by Active (4.8k points)
edited by
0 votes
Only 1

E->(E)

  ->(a)
by Active (2.3k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,302 answers
198,306 comments
105,007 users