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

Consider the following context-free grammar where the set of terminals is {a, b, c, d, f}

SdaT|Rf
TaS|baT|ϵ
RcaTR|ϵ

The following is a partially-filled LL(1) parsing table.

Which one of the following choices represents the correct combination for the numbered cells in parsing table ("blank" denotes that the corresponding cell is empty)?

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

The correct option is A
SdaT|Rf
TaS|baT|ϵ
RcaTR|ϵ

First (S) = {d, c, f}
Follow (S) = {c, f, $}
First (T) = {a, b, ϵ}
Follow (T) = {c, f, $}
First (R) = {c, ϵ}
Follow (R) = {f}
Hence option (d) is answer.

flag
Suggest Corrections
thumbs-up
1
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Real Valued Functions
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon