Contd. For instance, given the CFG below ( $ is an end-of-file marker, ε means empty string ) : Terminals = { e, f, g , h, i } Non-Terminals = {S',S, A, B, C, D } Rules = (0) S' S$ (1) S AB|Cf (3) A ef | ε (5) B hg (6) C DD|fi (8) D g Start Symbol = S' 7 In this grammar, the set of all strings derivable from the non-terminal S’ are { efhg , fi, gg , hg} Thus, the First(S’) = { e,f,g,h }, where e,f,g and h are the first terminal of each string in the above terminal set, respectively Similarly, we can derive the First sets of S, A, B, C and D as follows: First(S) = { e,f,g,h } First(A) = {e, ε } First(B) = {h} First(C) = { f,g } First(D) = {g} First(DD) = {g} First(AB) = {e, h } First( efB ) = {e} First(AC ) = {e, f, g } First(AA) = {e, ε }