+1 vote
237 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 factored), NOT LR(0) (Since the Item 0 has a R-R conflict), NOT SLR(1) (The item 0 has a RR conflict since Follow(X) = Follow(Y) = {a,b}

correct me If i'm wrong

edited | 237 views
0

First(s) does contain ε

No, it can not contain it... and it should be LL(1)

0
it will be LL(1) and i dont  think it is left factored
0
It is both LL(1) and LR(1)

I think you are misunderstanding LR(1) with SLR(1)

By LR(1) option mean to be CLR(1)
0
since it is LL(1) it will be LALR(1) and hence it will be CLR(1)
0

Because every LL(1) is not LALR(1)

But every LL(1) is LR(1).

Correct me if I am wrong!
0
and epsilon free (LL(1)) grammar will be slr(1) hence lalr(1) hence clr(1)

key is (epsilon free)
0
@adarsh_1997 can you please explain what do you mean by epsilon free!
0

@Shaik Masthan

Thank you. I looked at it. Since S is never generating EPSILON First(S) can NOT have EPSILON.

And the grammar is LL1. Since it is LL1 it is also LR1.

It is NOT necessary for a LL1 grammar to be LALR1.

0

It is NOT necessary for a LL(1) grammar to be LALR(1).

Yes

+1
Yes bro u r right if a grammer is LL(1) it doesnt mean it will be LALR(1) it will CLR(1)
+1

@Shivam Kasat yes bro u r right