I have seen this link.But i am little bit confused how to eliminate the ∈ production here.
I have the following grammer
S-->Sz|Sxw|xw|yw|∈
I can see after removing the epsilon productions the grammer becomes
S-->Sz|Sxw|xw|yw|z
Now if i solve this i got like below
S-->xwS`|zS`|ywS`
S`-->zS`|xwS`|∈
Now i can see that S-->xwS`|zS` and S`-->zS` |xwS` .This has become same.Is it right or i am doing any mistake??