next up previous contents
Next: Notes Up: Algorithms Previous: Complexity   Contents

Example

#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 = ccopy(D1, dfirstc(S));
  D1.initial(i);

  i = ccopy(D2, clonec(std::cin));  // read from stdin
  D2.initial(i);

  i = ccopy(D3, dfirstc(notc(S)));  // negation
  D3.initial(i);

  DFA_stream out(std::cout);
  ccopy(out, dfirstc(S));  // write to stdout
}


Vincent Le Maout 2003-07-08