Back to index

courier  0.68.2
reeval.h
Go to the documentation of this file.
00001 #ifndef       reeval_h
00002 #define       reeval_h
00003 
00004 
00005 #include      "regexpnode.h"
00006 
00008 //
00009 //  For matching a regular expression, we keep track of the set of all the
00010 //  current nodes we're currently on.  For speed, there are two ReEval
00011 //  objects - current one, and the next one, and we switch between the two
00012 //  on each step.
00013 //
00015 
00016 
00017 class ReEval {
00018 public:
00019        RegExpNode **nodes;
00020        unsigned      numnodes;
00021        unsigned      *nodenums;    // For speed - lookup array of nodes
00022                             // that are already in this set.
00023        ReEval() : nodes(0), numnodes(0), nodenums(0), arysize(0) {}
00024        ~ReEval()     { if (nodes)  delete[] nodes;
00025                      if (nodenums) delete[] nodenums;
00026                      }
00027        void   init(unsigned maxsize);
00028 private:
00029        unsigned      arysize;
00030 } ;
00031 
00032 #endif