views:

38

answers:

0

Considering the following grammar

S -> iEtES'|a
S'-> eS
S'->
E-> b

What will the value of FOLLOW(S'). I know that if there is a production fo the form `A->aB' then everything in FOLLOW(A) is in FOLLOW(B) but corresponsind to the above grammar FOLLOW(S') is same as FOLLOW(S) then what is FOLLOW(S)?

Whether this rule will be applied for computing FOLLOW(S)?

If there is a production A → aBb, (where a can be a whole string) then everything in FIRST(b) except for ε is placed in FOLLOW(B).

If YES! then whether FOLLOW(S) will be equal to FIRST(S') or FIRST(tES')?

An answer to the last question will clear my doubts.