search
Log In
3 votes
1.1k views
Do we directly say it is not LL(1) because it is left recursive or do we eliminate the left recursion, create the parsing table and then make a decision.
in Compiler Design 1.1k views

1 Answer

7 votes
 
Best answer
Yes, you can directly say that left recursive grammar is not LL(1) .But after eliminating the Left recursion also, there is no 100% surity that it will become LL(1).
0
if a grammar has left recursion definitely not LL(1),but whart about slr(1)?
1
SLR(1) can handle left recursion and left factoring,hence it is more powerful.Please correct me if I am wrong.

Related questions

1 vote
0 answers
1
933 views
AS GIVEN GRAMMAR IS LEFT RECURSIVE SO OPTION D MUST TRUE. ANS GIVEN:C
asked Oct 28, 2017 in Compiler Design set2018 933 views
1 vote
1 answer
3
3 votes
1 answer
4
617 views
lets consider a grammar as: $A\rightarrow Ab | Ac | a$ while checking whether it belongs to LL(1) grammar, we would point out that it has a left recursion as well as left factoring. I was wondering that what would be the case if we had lookahead, k, ... we are looking beyond the common symbol, A to decide the production rule to be applied. any further insights about the same will be very helpful.
asked Oct 2, 2017 in Compiler Design AskHerOut 617 views
...