Prasoon Saurav
Prasoon Saurav

Reputation: 92864

Grammar that is LR(1) but not LL(1)

This might look like a basic question to some of you but I expect intelligent replies here.

Why can't a LR(1) grammar with left recursion or the LR(1) grammar that is not left factored be LL(1)?

Upvotes: 6

Views: 897

Answers (1)

zs2020
zs2020

Reputation: 54514

Because you can never expect the termination of the string in LR(1) with left recursion.

Upvotes: 2

Related Questions