Closed VascoRato closed 4 years ago
I gave it the simple grammar:
S -> A A | B A -> a | ϵ B -> b
The resulting grammar was the following:
S -> A A | b A -> a B -> b
On the original grammar, the word a was valid. On the result CNF, it is not. The CNF does not define the same language as the original CFG.
a
Thanks. The result now becomes:
S -> A A | ϵ | b | a A -> a
I gave it the simple grammar:
The resulting grammar was the following:
On the original grammar, the word
a
was valid. On the result CNF, it is not. The CNF does not define the same language as the original CFG.