Removing epsilon production from context-free grammar

2.1k Views Asked by At

I am just having trouble with one part of the grammar that reads:

C -> CBA | epsilon

After I remove epsilon productions, I get:

C -> CBA | CB | BA | B | A

I'm confused as to whether this is correct or not. In the grammar, B is also a nullable variable. Do I also have to include CA and/or A in the latter grammar?

Any help appreciated.

0

There are 0 best solutions below