0

I was wondering, if I got a production that contains a nonterminal nullable, then is that production nullable?

A → aB | ε

B → bA | e

in this example, is B nullable because A is nullable?

1 Answers1

0

B is nullable if and only if it has a nullable production. The production B→bA is not nullable because even if A derives the empty string, there is still a b in the derivation. The production B→e is clearly not nullable (unless e was a typo.) So B is not nullable.

rici
  • 234,347
  • 28
  • 237
  • 341