2 votes

GATE 2010 Question

The grammar S→aSa∣bS∣c is

- LL(1) but not LR(1)
- LR(1) but not LL(1)
- Both LL(1) and LR(1)
- Neither LL(1) nor LR(1)

I have 2 small doubt

**First Doubt**:-If a grammer is LL(1) then it is always LR(0) ? Is there any grammer which is LL(1) and cannot be parsed by LR(0) ?

**Second doubt** :- Can any one tell me the above question is write or wrong because they have given LR(1) parser and **i haven't heard about LR(1)**.I have heard about **Brute force ,recursive descent,operator presedence,LL(1) LR(0) SLR(1) LALR(1) CLR(1)**.So what is the difference between LR(0) AND LR(1) and which one is more powerfull ?

8 votes

Best answer