// @(#)root/base:$Id$
// Author: Fons Rademakers   04/08/95

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TRegexp
#define ROOT_TRegexp


//////////////////////////////////////////////////////////////////////////
//                                                                      //
//  TRegexp                                                             //
//                                                                      //
//  Declarations for regular expression class.                          //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif

#ifndef ROOT_Match
#include "Match.h"
#endif

class TString;


class TRegexp {

public:
   enum EStatVal { kOK = 0, kIllegal, kNomem, kToolong };

private:
   Pattern_t            *fPattern;       // Compiled pattern
   EStatVal              fStat;          // Status
   static const unsigned fgMaxpat;       // Max length of compiled pattern

   void                  CopyPattern(const TRegexp& re);
   void                  GenPattern(const char *re);
   const char           *MakeWildcard(const char *re);

public:
   TRegexp(const char *re, Bool_t wildcard = kFALSE);
   TRegexp(const TString& re);
   TRegexp(const TRegexp& re);
   virtual ~TRegexp();

   TRegexp&              operator=(const TRegexp& re);
   TRegexp&              operator=(const TString& re);   // Recompiles pattern
   TRegexp&              operator=(const char *re);      // Recompiles pattern
   Ssiz_t                Index(const TString& str, Ssiz_t *len, Ssiz_t start=0) const;
   EStatVal              Status();                       // Return & clear status

   ClassDef(TRegexp,0)  // Regular expression class
};

#endif
 TRegexp.h:1
 TRegexp.h:2
 TRegexp.h:3
 TRegexp.h:4
 TRegexp.h:5
 TRegexp.h:6
 TRegexp.h:7
 TRegexp.h:8
 TRegexp.h:9
 TRegexp.h:10
 TRegexp.h:11
 TRegexp.h:12
 TRegexp.h:13
 TRegexp.h:14
 TRegexp.h:15
 TRegexp.h:16
 TRegexp.h:17
 TRegexp.h:18
 TRegexp.h:19
 TRegexp.h:20
 TRegexp.h:21
 TRegexp.h:22
 TRegexp.h:23
 TRegexp.h:24
 TRegexp.h:25
 TRegexp.h:26
 TRegexp.h:27
 TRegexp.h:28
 TRegexp.h:29
 TRegexp.h:30
 TRegexp.h:31
 TRegexp.h:32
 TRegexp.h:33
 TRegexp.h:34
 TRegexp.h:35
 TRegexp.h:36
 TRegexp.h:37
 TRegexp.h:38
 TRegexp.h:39
 TRegexp.h:40
 TRegexp.h:41
 TRegexp.h:42
 TRegexp.h:43
 TRegexp.h:44
 TRegexp.h:45
 TRegexp.h:46
 TRegexp.h:47
 TRegexp.h:48
 TRegexp.h:49
 TRegexp.h:50
 TRegexp.h:51
 TRegexp.h:52
 TRegexp.h:53
 TRegexp.h:54
 TRegexp.h:55
 TRegexp.h:56
 TRegexp.h:57
 TRegexp.h:58
 TRegexp.h:59
 TRegexp.h:60
 TRegexp.h:61
 TRegexp.h:62
 TRegexp.h:63
 TRegexp.h:64