Reffering from the diagram in... https://gateoverflow.in/1470/gate1999-1-17#16773

Iam confused how B is false. @Arjun sir please help. which one of them is true.

Dark Mode

Arjun
asked
in Compiler Design
Jan 26, 2019

2,295 views
5 votes

Which of the following statements is FALSE?

- Any DCFL has an equivalent grammar that can be parsed by a SLR(1) parser with end string delimiter
- Languages of grammars parsed by LR(2) parsers is a strict super set of the languages of grammars parsed by LR(1) parsers
- Languages of grammars parsed by LL(2) parsers is a strict super set of the languages of grammars parsed by LL(1) parsers
- There is no DCFL which is not having a grammar that can be parsed by a LR(1) parser

Reffering from the diagram in... https://gateoverflow.in/1470/gate1999-1-17#16773

Iam confused how B is false. @Arjun sir please help. which one of them is true.

0

edited
Dec 3, 2020
by rupesh17

@suraj20041995 diagram is referring to parsers…..In question languages of grammar is mentioned….

refer this -https://gatecse.in/lr-parsing-part-2-language-of-ll-and-lr-grammars/

important points

0

0 votes

Answer is B

LR(0) ⊂ LR(1) = LR(2) ........LR(k) = LR(k+1) ; for k >= 1 : LR(k)=LR(k+1)

so, Languages of grammars parsed by LR(2) parsers is not a strict super set of the languages of grammars parsed by LR(1) parsers

although they both are same ;

if you compare their grammars :

LR(0) ⊂ LR(1) ⊂ LR(2) ........LR(k) ⊂ LR(k+1)

LR(0) ⊂ LR(1) = LR(2) ........LR(k) = LR(k+1) ; for k >= 1 : LR(k)=LR(k+1)

so, Languages of grammars parsed by LR(2) parsers is not a strict super set of the languages of grammars parsed by LR(1) parsers

although they both are same ;

if you compare their grammars :

LR(0) ⊂ LR(1) ⊂ LR(2) ........LR(k) ⊂ LR(k+1)