2 votes 2 votes closed with the note: already answered First one not LL1 as it is ambigous,option c is left recursive,cant decide about option b.... plss help.. Compiler Design compiler-design + – resuscitate asked Nov 28, 2015 • closed Dec 10, 2015 by resuscitate resuscitate 1.8k views comment Share Follow See all 0 reply Please log in or register to add a comment.
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). Digvijay Pandey answered Nov 28, 2015 • selected Nov 28, 2015 by resuscitate Digvijay Pandey comment Share Follow See all 3 Comments See all 3 3 Comments reply resuscitate commented Nov 28, 2015 reply Follow Share common prefix mean?? can u elaborate pls.. 0 votes 0 votes resuscitate commented Nov 28, 2015 reply Follow Share bdw thanks.. 0 votes 0 votes radha gogia commented Dec 4, 2015 reply Follow Share Common prefix means that say for instance u have A-->ab/aSb ,Now first of A-->ab and A-->aSb is both {a} which is a common prefix to both of them so u will have to do left-factoring in order to remove this common prefix since the parser after seeing a doesn't know whether he should go to Sb or b ? 1 votes 1 votes Please log in or register to add a comment.
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 sultan answered Dec 10, 2015 sultan comment Share Follow See all 0 reply Please log in or register to add a comment.