regular expression to nfa to dfa