-1

Grammar

S->(A)
A->CB
B->;A|ε
C->x|S

I have find the First of the grammar:

First(S)={(}
First(B)={;,ε}
First(C)={x,(}
First(A)=First(C)={x,(}

I have trouble finding the Follow of the grammar.

Nauman Ahmad
  • 320
  • 4
  • 17

1 Answers1

0

The Follow sets are

Follow(S)={$,),;} Follow(B)={)}

Follow(C)={:,)}

Follow(A)={)}

Nauman Ahmad
  • 320
  • 4
  • 17