edited by
1,167 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).
edited by

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

1.5k
views
0 answers
1 votes
Hopealways asked Nov 23, 2018
1,476 views
Why ε is not shown in First(S). First(s) does contain ε . And please help me figure out which grammar is this?According to me it is NOT LL(1) (since it is left ... a RR conflict since Follow(X) = Follow(Y) = {a,b}correct me If i'm wrong
589
views
0 answers
1 votes
muthu kumar asked Nov 15, 2018
589 views
The answer is only S2. Why not both s2 and s3..Someone explain this plz..
2.7k
views
0 answers
4 votes
Mizuki asked Aug 19, 2018
2,667 views
Consider the following grammar which is not LL(1) because LL(1) table contain multiple entry for same production.The number of entries have multiple productions in LL(1) table are ________.
455
views
0 answers
0 votes
syncronizing asked Jun 12, 2018
455 views
Let G be a grammar with the following productions:If LR(1) parser is used to construct the DFA using the above productions, then how many look-a-heads are present for an item T → .T * F in the initial state ________.