The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+2 votes
150 views

Which of the following statements is FALSE?

  1. Any DCFL has an equivalent grammar that can be parsed by a SLR(1) parser with end string delimiter
  2. Languages of grammars parsed by LR(2) parsers is a strict super set of the languages of grammars parsed by LR(1) parsers
  3. Languages of grammars parsed by LL(2) parsers is a strict super set of the languages of grammars parsed by LL(1) parsers
  4. There is no DCFL which is not having a grammar that can be parsed by a LR(1) parser
asked in Compiler Design by Veteran (408k points) | 150 views
0
d false
0
Which is that DCFL?
0

@Arjun Sir, is the answer C?

my reasoning is as follows,

consider a grammar

S -> aA/aB

A -> cA/c

B -> bB/b

The above grammar is LL(2).

now the above grammar can be converted into LL(1) as follows

S -> aS'

S' -> cA/ϵ

S' -> bB/ϵ

similarly every other LL(2) grammar should be convertable to LL(1) grammar.

                    

+1
No, that is wrong. For every $k$ Language of LL(k) is a strict subset of Language of LL(k+1)
0

@Arjun Sir, Option A holds for both SLR(1) and LR(0) then?

+1
Yes. It does.
+2
$B?$

as, $Lang(LR(2))=Lang(LR(1))$
0
Yes.

Please log in or register to answer this question.

Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,588 questions
54,197 answers
187,535 comments
71,152 users