The Gateway to Computer Science Excellence
0 votes
103 views

First(P) = {+, *, t, epsilon, id} AND Follow(P) = {dollar,id} according to me. In that case M[P, DOLLAR] should have P -> QR

in Compiler Design by (219 points)
edited by | 103 views

1 Answer

+2 votes
Best answer

First (P) = First(QR)

             = First(Q)

              = + , * , t , id

( epsilon will give chance to R, therefore we will also consider First(R) )

First (R) = id

by Active (1.7k points)
selected by
0
and epsilon will be in FIRST(P) only if epsilon is both in FIRST (Q) and FIRST(R). Am I right?
0
Yes, right
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
50,645 questions
56,616 answers
195,897 comments
102,347 users