// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __gnu_java_util_regex_RE__
#define __gnu_java_util_regex_RE__

#pragma interface

#include <gnu/java/util/regex/REToken.h>
#include <gcj/array.h>

extern "Java"
{
  namespace gnu
  {
    namespace java
    {
      namespace util
      {
        namespace regex
        {
          class RE;
          class RE$IntPair;
          class REMatchEnumeration;
          class REMatch;
          class CharIndexed;
          class RETokenNamedProperty;
          class RE$NamedProperty;
          class RE$CharExpression;
          class RE$CharUnit;
          class RE$ParseCharClassResult;
          class RESyntax;
          class REToken;
        }
      }
    }
  }
}

class gnu::java::util::regex::RE : public ::gnu::java::util::regex::REToken
{
public:
  static ::java::lang::String *version ();
public: // actually package-private
  static ::java::lang::String *getLocalizedMessage (::java::lang::String *);
public:
  RE (::java::lang::Object *);
  RE (::java::lang::Object *, jint);
  RE (::java::lang::Object *, jint, ::gnu::java::util::regex::RESyntax *);
private:
  RE (::gnu::java::util::regex::REToken *, ::gnu::java::util::regex::REToken *, jint, jint, jint, jint);
  RE (::java::lang::Object *, jint, ::gnu::java::util::regex::RESyntax *, jint, jint);
public:  // actually protected
  RE ();
  virtual void initialize (::java::lang::Object *, jint, ::gnu::java::util::regex::RESyntax *, jint, jint);
private:
  static ::gnu::java::util::regex::RE$ParseCharClassResult *parseCharClass (jint, jcharArray, jint, jint, jint, ::gnu::java::util::regex::RESyntax *, jint);
  static jint getCharUnit (jcharArray, jint, ::gnu::java::util::regex::RE$CharUnit *, jboolean);
  static jint parseInt (jcharArray, jint, jint, jint);
  static ::gnu::java::util::regex::RE$CharExpression *getCharExpression (jcharArray, jint, jint, ::gnu::java::util::regex::RESyntax *);
  static ::gnu::java::util::regex::RE$NamedProperty *getNamedProperty (jcharArray, jint, jint);
  static ::gnu::java::util::regex::RETokenNamedProperty *getRETokenNamedProperty (jint, ::gnu::java::util::regex::RE$NamedProperty *, jboolean, jint);
public:
  virtual jboolean isMatch (::java::lang::Object *);
  virtual jboolean isMatch (::java::lang::Object *, jint);
  virtual jboolean isMatch (::java::lang::Object *, jint, jint);
private:
  jboolean isMatchImpl (::gnu::java::util::regex::CharIndexed *, jint, jint);
public:
  virtual jint getNumSubs () { return numSubs; }
public: // actually package-private
  virtual void setUncle (::gnu::java::util::regex::REToken *);
  virtual jboolean chain (::gnu::java::util::regex::REToken *);
public:
  virtual jint getMinimumLength () { return minimumLength; }
  virtual jint getMaximumLength () { return maximumLength; }
  virtual JArray< ::gnu::java::util::regex::REMatch *> *getAllMatches (::java::lang::Object *);
  virtual JArray< ::gnu::java::util::regex::REMatch *> *getAllMatches (::java::lang::Object *, jint);
  virtual JArray< ::gnu::java::util::regex::REMatch *> *getAllMatches (::java::lang::Object *, jint, jint);
private:
  JArray< ::gnu::java::util::regex::REMatch *> *getAllMatchesImpl (::gnu::java::util::regex::CharIndexed *, jint, jint);
public: // actually package-private
  virtual jboolean match (::gnu::java::util::regex::CharIndexed *, ::gnu::java::util::regex::REMatch *);
  virtual ::gnu::java::util::regex::REMatch *findMatch (::gnu::java::util::regex::CharIndexed *, ::gnu::java::util::regex::REMatch *);
public:
  virtual ::gnu::java::util::regex::REMatch *getMatch (::java::lang::Object *);
  virtual ::gnu::java::util::regex::REMatch *getMatch (::java::lang::Object *, jint);
  virtual ::gnu::java::util::regex::REMatch *getMatch (::java::lang::Object *, jint, jint);
  virtual ::gnu::java::util::regex::REMatch *getMatch (::java::lang::Object *, jint, jint, ::java::lang::StringBuffer *);
public: // actually package-private
  virtual ::gnu::java::util::regex::REMatch *getMatchImpl (::gnu::java::util::regex::CharIndexed *, jint, jint, ::java::lang::StringBuffer *);
public:
  virtual ::gnu::java::util::regex::REMatchEnumeration *getMatchEnumeration (::java::lang::Object *);
  virtual ::gnu::java::util::regex::REMatchEnumeration *getMatchEnumeration (::java::lang::Object *, jint);
  virtual ::gnu::java::util::regex::REMatchEnumeration *getMatchEnumeration (::java::lang::Object *, jint, jint);
  virtual ::java::lang::String *substitute (::java::lang::Object *, ::java::lang::String *);
  virtual ::java::lang::String *substitute (::java::lang::Object *, ::java::lang::String *, jint);
  virtual ::java::lang::String *substitute (::java::lang::Object *, ::java::lang::String *, jint, jint);
private:
  ::java::lang::String *substituteImpl (::gnu::java::util::regex::CharIndexed *, ::java::lang::String *, jint, jint);
public:
  virtual ::java::lang::String *substituteAll (::java::lang::Object *, ::java::lang::String *);
  virtual ::java::lang::String *substituteAll (::java::lang::Object *, ::java::lang::String *, jint);
  virtual ::java::lang::String *substituteAll (::java::lang::Object *, ::java::lang::String *, jint, jint);
private:
  ::java::lang::String *substituteAllImpl (::gnu::java::util::regex::CharIndexed *, ::java::lang::String *, jint, jint);
public:
  static ::java::lang::String *getReplacement (::java::lang::String *, ::gnu::java::util::regex::REMatch *, jint);
private:
  void addToken (::gnu::java::util::regex::REToken *);
  static ::gnu::java::util::regex::REToken *setRepeated (::gnu::java::util::regex::REToken *, jint, jint, jint);
  static jint getPosixSet (jcharArray, jint, ::java::lang::StringBuffer *);
  jint getMinMax (jcharArray, jint, ::gnu::java::util::regex::RE$IntPair *, ::gnu::java::util::regex::RESyntax *);
public:
  virtual ::java::lang::String *toString ();
public: // actually package-private
  virtual void dump (::java::lang::StringBuffer *);
public:
  static ::gnu::java::util::regex::CharIndexed *makeCharIndexed (::java::lang::Object *, jint);
private:
  static ::java::lang::String *VERSION;
  static ::java::util::ResourceBundle *messages;
  ::gnu::java::util::regex::REToken * __attribute__((aligned(__alignof__( ::gnu::java::util::regex::REToken )))) firstToken;
  ::gnu::java::util::regex::REToken *lastToken;
  jint numSubs;
  jint minimumLength;
  jint maximumLength;
public:
  static const jint REG_ICASE = 2L;
  static const jint REG_DOT_NEWLINE = 4L;
  static const jint REG_MULTILINE = 8L;
  static const jint REG_NOTBOL = 16L;
  static const jint REG_NOTEOL = 32L;
  static const jint REG_ANCHORINDEX = 64L;
  static const jint REG_NO_INTERPOLATE = 128L;
  static const jint REG_TRY_ENTIRE_MATCH = 256L;
  static const jint REG_REPLACE_USE_BACKSLASHESCAPE = 512L;
  static const jint REG_X_COMMENTS = 1024L;
  static const jint REG_ICASE_USASCII = 2048L;

  friend class gnu_java_util_regex_RE$NamedProperty;
  friend class gnu_java_util_regex_RE$CharExpression;
  friend class gnu_java_util_regex_RE$ParseCharClassResult;
  friend class gnu_java_util_regex_RE$CharUnit;
  friend class gnu_java_util_regex_RE$IntPair;

  static ::java::lang::Class class$;
};

#endif /* __gnu_java_util_regex_RE__ */
