class Kleene::MultiMatchDFA
def create_composite_nfa(nfas)
def create_composite_nfa(nfas) nfa = union!(nfas) # add epsilon transitions from all the states except the start state back to the start state nfa.states.each do |state| if state != nfa.start_state nfa.add_transition(NFATransition::Epsilon, state, nfa.start_state) end end nfa.update_final_states nfa end