The Gateway to Computer Science Excellence
0 votes

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 | 107 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.8k points)
selected by
and epsilon will be in FIRST(P) only if epsilon is both in FIRST (Q) and FIRST(R). Am I right?
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,737 questions
57,385 answers
105,362 users