First(s) does contain ε

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

The Gateway to Computer Science Excellence

+1 vote

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

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)

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

By LR(1) option mean to be CLR(1)

0

@adarsh_1997 are you sure about your statement

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

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

Correct me if I am wrong!

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

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

Correct me if I am wrong!

52,345 questions

60,501 answers

201,879 comments

95,327 users