0.The auto machine for one regular expression is built with NFA, which e transfer. We decied not to transfer it into DFA. May try directly transfer into DFA later.

1.Add linked table(struct GlobalRegularStateMachineNodeHeap) to trace all the node alloced in one function. The alloc function for struct RegularStateMachineNode is embraced in function alloc_new_regularStateMachineNode which will add the node point into the struct GlobalRegularStateMachineNodeHeap. It is much more simple and clear to clean up all struct RegularStateMachineNode by using the heap. Also, the GlobalRegularStateMachineNodeHeap used during the building process is linked together. The free up work can be recusively called following the link.

2.Assign No. for each RegularStateMachineNode with GlobalRegularStateMachineNodeHeap.level * 256 + index in the heap. It makes easy to find one node is traced before. One bug here... the node with bigger value may be traced many times..need to find one better algorithm to fix it.

3.One SimpleQueue. It should be split from the .c file and improve the code.