Nullable nonterminals

620 views Asked by At

I have to find out if a given grammar contains the null string ( epsilon) using a programming language not pen and paper.
The thing is everywhere I look I find this:
if A→ϵ is a production, A is nullable.
if A→X1X2…Xn is a production, and X1,X2,…,XnX1,X2,…,Xn are all nullable, then A is nullable.

The problem is that I dont have something like Xn->ϵ. I have something like
A->BCA|BC
B->C|A
C->BB|AA

0

There are 0 answers