A program to be converted into a lexical analyzer, the task of the lexical analyzer is to convert the character stream into lexical notation flow, the core of the transformation is a poor automaton representation, there is a poor self-motive and state conversion diagram a bit similar, but it is not a graph, but a recognizer, it is the character of each input to identify and judge, In order to determine the final state or state set and path that it can reach, there are two kinds of poor automata, namely, the uncertain have the poor automaton NFA and the deterministic finite automaton DFA;
The NFA, if an input symbol, can get two or more than two possible states, that is, the possible state of the obtained is uncertain; if an input symbol is used, the DFA can only get a single possible state.
The main differences that NFA can convert into Dfa,nfa and DFA are:
1) The DFA does not enter the conversion action above the empty string;
2) for DFA, a specific symbol input, has and can only get a state, and the NFA is likely to get a state set;