The Gateway to Computer Science Excellence

+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 ?

+6 votes

Best answer

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,741 questions

57,252 answers

198,061 comments

104,698 users