edited by
266 views

1 Answer

Best answer
3 votes
3 votes

The production is left-recursive if the leftmost symbol on the right side is the same as the non-terminal on the left side. For example, 

  • $expr\rightarrow expr + term$.

If one were to code this production in a recursive-descent parser, the parser would go in an infinite loop.

References:

So,the correct answer is $(B)$. 

selected by
Answer:

Related questions

2 votes
2 votes
2 answers
1
Bikram asked Nov 25, 2016
667 views
Consider the following grammar:$S \rightarrow L = P \mid P$$L \rightarrow ^*P \mid id$$P \rightarrow L$The above grammar is:AmbiguousSLR(1)LALR(1)None of the above
3 votes
3 votes
2 answers
2
Bikram asked Nov 25, 2016
500 views
Consider the following grammar:$S \rightarrow aMd \mid bNd \mid aNe \mid bMe$$M \rightarrow c$$N \rightarrow c$The grammar above is:LR(1) but not LALR(1)LALR(1) but no...
3 votes
3 votes
1 answer
3
Bikram asked Nov 25, 2016
448 views
Consider the following grammar:$E \rightarrow E + T \mid T$$T \rightarrow T ^* F \mid F$$F \rightarrow (E) \mid id$What are the productions for E, T and F after convertin...