wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Consider the grammar shown below.
SC C
Cc C|d

The grammar is

A
LL (1)
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
B
SLR (1) but not LL(1)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
LALR (1) but not SLR (1)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
LR (1) but not LALR (1)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is A LL (1)
Consider the grammar

SC C
Cc C|d
The above grammar is LL(1)
[it is unambiguous, not left recursive and left factored].
It is also LR(0) grammar, hence it is SLR(1), LALR(1) and CLR(1).

Therefore option (a) matches correctly.

flag
Suggest Corrections
thumbs-up
1
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Definition of Function
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon