add pattern2nfa