Next: Notes
Up: Algorithms
Previous: Complexity
Contents
#include <astl.h>
#include <dfa.h>
#include <cursor.h>
#include <ccopy.h>
#include <set_operation.h>
#include <stream.h>
#include <iostream>
int main()
{
DFA_map<> S;
DFA_bin<> D1, D2;
DFA_bin<>::state_type i = clone(D1, dfirstc(S));
D1.initial(i);
i = clone(D2, clonec(std::cin)); // read from stdin
D2.initial(i);
i = clone(D3, dfirst_markc(notc(S))); // negation is cyclic
D3.initial(i);
DFA_stream out(std::cout);
clone(out, dfirstc(S)); // write to stdout
}
Vincent Le Maout
2003-07-08