Completing the toNFA method on regular expressions.