closed by
1,815 views

2 Answers

Best answer
2 votes
2 votes
Option B is ambiguous Grammar.

Generate string ab.
1st way : S---> aSb ---> ab
2nd way : S---> ab

Ambiguous so not LL(1).

EVEN option B having common prefixes so not LL(1).
selected by
0 votes
0 votes
option B is also not valid because it has left factoring there will be two entries under [S,a]...so option B is also not ll1

Related questions

0 votes
0 votes
1 answer
1
rexritz asked Oct 22, 2023
622 views
A) $S\rightarrow aA\mid bBa$ $A\rightarrow bA\mid a$ $ B\rightarrow aB\mid \varepsilon$B) $S\rightarrow Aa\mid Bb$ $ A\rightarrow \varepsilon $ $ B\rightarrow...
2 votes
2 votes
2 answers
2
Subhrangsu asked Apr 16, 2022
9,531 views
Is the following grammar LL(1) ?S→ aABbCD | ϵA→ ASd | ϵB→ Sac| hC | ϵC→ Sf |CgD→ aBD | ϵDraw the LL(1) parsing table for the given grammar.
2 votes
2 votes
1 answer
3
sripo asked Nov 10, 2018
3,265 views
Can you give an example which is not LL(1) but is CLR(1)
0 votes
0 votes
1 answer
4
Rahul Ranjan 1 asked Mar 19, 2018
4,971 views
Given a grammar :$E \rightarrow E + T / T$$T \rightarrow i$Can I directly say that grammar is not $LL(1)$ because $LL(1)$ can't parse Left Recursive Grammar, without dra...