in Compiler Design
796 views
0 votes
0 votes
Please provide example to disapprove the following points:-

1.every DCFG need not be a  LR(K).

2.every DCFG need not be a LL(K).

3.every DCFL is not LL(k).
in Compiler Design
796 views

1 comment

"for every LL(1) we can have DCFL"

So, 3rd one also true
0
0

2 Answers

1 vote
1 vote
  • If a GRAMMAR  is ambiguous  then it never be LL(1),LR(K) ,

Example:   S-->SS/a

2 Comments

edited by
1 ,2,3 all are true

right?
0
0
yeah true,but please provide some concrete example .
0
0
1 vote
1 vote

first thing we should note that LL(k) and LR(k)   both accept unabiguous grammar

now come to question 

a)  we know that DCFG can be ambiguous so DCFG can be LR(k)  or can  not be LR(k) so this option is true

b)  we know that DCFG can be ambiguous so this option is true 

c)  grammar which generate DCFL may be ambiguous  or unambiguous so this option is false  because they are saying every DCFL is not LL(k)

2 Comments

c) is true because LL(k) generates a subset of DCFL.
0
0
1
1

Related questions