Answer:
The given grammar is :
S = T V ;
V = C X
X = , V | ε
T = float | double
C = z | w
1.
Nullable variables are the variables which generate ε ( epsilon ) after one or more steps.
From the given grammar,
Nullable variable is X as it generates ε ( epsilon ) in the production rule : X -> ε.
No other variables generate variable X or ε.
So, only variable X is nullable.
2.
First of nullable variable X is First (X ) = , and ε (epsilon).
L.H.S.
The first of other varibles are :
First (S) = {float, double }
First (T) = {float, double }
First (V) = {z, w}
First (C) = {z, w}
R.H.S.
First (T V ; ) = {float, double }
First ( C X ) = {z, w}
First (, V) = ,
First ( ε ) = ε
First (float) = float
First (double) = double
First (z) = z
First (w) = w
3.
Follow of nullable variable X is Follow (V).
Follow (S) = $
Follow (T) = {z, w}
Follow (V) = ;
Follow (X) = Follow (V) = ;
Follow (C) = , and ;
Explanation: