Context Free Grammar - Do we consider epsilon when looking for generating symbols?

354 Views Asked by At

I'm learning about Context Free Grammars and I've come across the algoritm of removing non-generating symbols. I've checked a few sources but sadly was unable to find an answer. At first we consider all non-terminals to be non-generating, and review all productions with generating symbols on the right. Suppose we have a production as follows:

B -> ε

Should B be removed from the set of non-generating symbols? Do we consider it to be generating?

1

There are 1 best solutions below

0
On

After further research I'd like to answer my question. It seems that B is indeed considered a generating symbol as it generates an empty sequence of terminals.