Predict(A ® x) for Gexpr3: Example 2/2
Empty(E) :=  Æ
Empty(E’) := {e}
Empty(T) :=  Æ
Empty(T’) := {e}
Empty(F) :=  Æ
First(E) := {i, (}
First(E’) := {+}
First(T) := {i, (}
First(T’) := {*}
First(F) := {i, (}
Follow(E) := {$, )}
Follow(E’) := {$, )}
Follow(T) := {+, $, )}
Follow(T’) := {+, $, )}
Follow(F) := {*, +, $, )}
5: T’ ® *FT’
Empty(*FT’) =  Æ because Empty(F) =  Æ
Predict(5) := First(*FT’) = First(*) = {*}
6: T’ ® e
Empty(e) =  {e}
Predict(6) := First(e) È Follow(T’) = Æ È {+, $, )} = {+, $, )}
7: F  ® (E)
Empty((E)) =  Æ because Empty(E) =  Æ
Predict(7) := First((E)) = First(() = {(}
8: F ® i
Empty(i) =  Æ
Predict(8) := First(i) = {i}
37/57