in Compiler Design edited by
1,106 views
3 votes
3 votes
Which is true?

a) Recursive Decent Parsers may suffer from infinite loop.

b) Every LR grammer is unambiguous.

c) Both a & b

d) None

 

Doubt: RDP and LL(1) can go in loop if it is not left-factorized and contains left recursion. But as for constructing these parsers themselves require unambiguous, left-factorized and left-rec. free grammer. So, how can it go to infinite loop. Answer given was (c).
in Compiler Design edited by
1.1k views

1 Answer

0 votes
0 votes
Seems they are testing verbal ability by putting the word 'may'. Yes it may go in infinite loop if the grammer is having a left recursion.

Related questions