not.cpp

来自「一个类似STL的自动机的源代码库」· C++ 代码 · 共 39 行

CPP
39
字号
#include <tools.h>#include <dfa.h>#include <ccopy.h>#include <stream.h>#include <cursor.h>#include <set_operation.h>template <typename DFA>int run(DFA &A, config &c){  A.initial(clone(A, clone_cursor<plain>(cin)));  DFA_stream out(cout);  if (c.state_mark)    clone(out, dfirst_markc(notc(forwardc(A))));  else    clone(out, dfirstc(notc(forwardc(A))));  return 0;}int main(int argc, char **argv){  config c(argc, argv, 1, "map matrix bin");    if (c.representation == "map") {    DFA_map<plain> A;    return run(A, c);  }  if (c.representation == "matrix") {    DFA_matrix<plain> A;    return run(A, c);  }    if (c.representation == "bin") {    DFA_bin<plain> A;    return run(A, c);  }}; 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?