a DFA regex implementation made of C