Locate $\mathbf{T}^{\prime}: T^{\prime}$ appears at the end of the productions $T \rightarrow F \mathbf{T}^{\prime}$ and $T^{\prime} \rightarrow * F \mathbf{T}^{\prime}$.
- Because $T^{\prime}$ is the last symbol in $T \rightarrow F T^{\prime}$, everything that follows $T$ must also follow $T^{\prime}$.
- Therefore, $\operatorname{FOLLOW}\left(T^{\prime}\right)=\operatorname{FOLLOW}(T)$.
Find $\operatorname{FOLLOW}\mathrm{(T)}$: We look for $T$ in the grammar ( $E \rightarrow \mathbf{T} E^{\prime}$ ).
- $T$ is followed by $E^{\prime}$.
- So, $\operatorname{FOLLOW}(T)$ includes $\operatorname{FIRST}\left(E^{\prime}\right)$ (excluding $\epsilon$ ).
- $\operatorname{FIRST}\left(E^{\prime}\right)=\{+, \epsilon\}$. So, we add $+$ .
Handle Epsilon again: Since $E^{\prime}$ can be $\epsilon, \operatorname{FOLLOW}(T)$ also includes $\operatorname{FOLLOW}(E)$.
$E$ is the start symbol (conventionally), so it includes the end-of-input marker $\textbf{\$}$.
$E$ also appears inside parentheses in $F \rightarrow(E)$. So it is followed by ).
$\operatorname{FOLLOW}(E)=\{ ), \$\}$.
$\left.\operatorname{FOLLOW}\left(T^{\prime}\right)=\{+,), \$\right\}$