Construct DFA.