I have a following CFG rule :
- S -> BSA | epsilon
- A -> abC | a | c
- B -> baC | b | epsilon
- C -> aCc | AB | epsilon
I am on the epsilon elimination stage of the algorithm, I have eliminated following eplsions C -> epsiolon, B -> epsilon and here is what i got so far :
- S_0 -> S
- S -> BSA | SA | epsilon
- A -> abC | a | c| ab
- B -> baC | b | ba
- C -> aCc | AB | ac| A Should I also eliminate S-> epsilon(shown in bold) since S is the original start variable?
Should I also copy the epsilon to S_0 at the unit rule stage of the algorithm?