//=-- RegexMatcher.h - Class for matching with regular expressions -----------=
//
//  This class defines a filter class for matching text against regular 
//  expressions.  This uses the regex class to do all of the hard work.
//
//=---------------------------------------------------------------------------=
//  This file is copyright (c) 1997-1998 Chris Lattner
//=---------------------------------------------------------------------------=

#ifndef REGEXMATCHER_H
#define REGEXMATCHER_H

class String;

#include "TextMatcher.h"
#include "Regex.h"

class RegexMatcher : public TextMatcher {
private :
  regex Pattern;

protected :
  virtual int MatchImpl(const char *S) {
    return Pattern.Match(S);
  }

public :
  RegexMatcher(const String &pattern) : Pattern(pattern) { }
};

#endif
