public State CreateInitialState(Automaton nfa, Automaton dfa) { /** get closure of initial state from nfa. */ var initialStates = nfa.StartStates; var initialClosure = ClosureTaker.GetClosure(initialStates, nfa); var state = AddHashSetState(dfa, initialClosure); dfa.AddStartState(state); return(state); }
public ThompsonsConstruction() { _nfa = new Automaton(); _start_state = new State(_nfa); _nfa.AddStartState(_start_state); }