1 vote

To compute FOLLOW(A) for any grammar symbol A

a) We must compute FIRST of some grammar symbols.

b) No need of computing FIRST of some symbols.

c) Maybe compute FIRST of some symbols.

d) None of the above.

The answer is given as option (A) but if we take start symbol(say S), we know that $ will definitely in FOLLOW(S) and we didn't computed FIRST of any symbol for it. So option (C) should be the answer.

1 vote

lets take a grammer S->a so to compute follow of S no need to compute the first of any symbol because follow of S is $ and S is not present anywhere in the right side

now take another geammer S->SA/a , A->b so now to compute follow of S we have to compute the first of A

so C answer is right

now take another geammer S->SA/a , A->b so now to compute follow of S we have to compute the first of A

so C answer is right