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

#ifndef __gnu_regexp_RE__
#define __gnu_regexp_RE__

#pragma interface

#include <gnu/regexp/REToken.h>
#include <gcj/array.h>

extern "Java"
{
  namespace gnu
  {
    namespace regexp
    {
      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::regexp::RE : public ::gnu::regexp::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::regexp::RESyntax *);
private:
  RE (::gnu::regexp::REToken *, ::gnu::regexp::REToken *, jint, jint, jint, jint);
  RE (::java::lang::Object *, jint, ::gnu::regexp::RESyntax *, jint, jint);
public:  // actually protected
  RE ();
  virtual void initialize (::java::lang::Object *, jint, ::gnu::regexp::RESyntax *, jint, jint);
private:
  static ::gnu::regexp::RE$ParseCharClassResult *parseCharClass (jint, jcharArray, jint, jint, jint, ::gnu::regexp::RESyntax *, jint);
  static jint getCharUnit (jcharArray, jint, ::gnu::regexp::RE$CharUnit *, jboolean);
  static jint parseInt (jcharArray, jint, jint, jint);
  static ::gnu::regexp::RE$CharExpression *getCharExpression (jcharArray, jint, jint, ::gnu::regexp::RESyntax *);
  static ::gnu::regexp::RE$NamedProperty *getNamedProperty (jcharArray, jint, jint);
  static ::gnu::regexp::RETokenNamedProperty *getRETokenNamedProperty (jint, ::gnu::regexp::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::regexp::CharIndexed *, jint, jint);
public:
  virtual jint getNumSubs () { return numSubs; }
public: // actually package-private
  virtual void setUncle (::gnu::regexp::REToken *);
  virtual jboolean chain (::gnu::regexp::REToken *);
public:
  virtual jint getMinimumLength () { return minimumLength; }
  virtual jint getMaximumLength () { return maximumLength; }
  virtual JArray< ::gnu::regexp::REMatch *> *getAllMatches (::java::lang::Object *);
  virtual JArray< ::gnu::regexp::REMatch *> *getAllMatches (::java::lang::Object *, jint);
  virtual JArray< ::gnu::regexp::REMatch *> *getAllMatches (::java::lang::Object *, jint, jint);
private:
  JArray< ::gnu::regexp::REMatch *> *getAllMatchesImpl (::gnu::regexp::CharIndexed *, jint, jint);
public: // actually package-private
  virtual jboolean match (::gnu::regexp::CharIndexed *, ::gnu::regexp::REMatch *);
public:
  virtual ::gnu::regexp::REMatch *getMatch (::java::lang::Object *);
  virtual ::gnu::regexp::REMatch *getMatch (::java::lang::Object *, jint);
  virtual ::gnu::regexp::REMatch *getMatch (::java::lang::Object *, jint, jint);
  virtual ::gnu::regexp::REMatch *getMatch (::java::lang::Object *, jint, jint, ::java::lang::StringBuffer *);
public: // actually package-private
  virtual ::gnu::regexp::REMatch *getMatchImpl (::gnu::regexp::CharIndexed *, jint, jint, ::java::lang::StringBuffer *);
public:
  virtual ::gnu::regexp::REMatchEnumeration *getMatchEnumeration (::java::lang::Object *);
  virtual ::gnu::regexp::REMatchEnumeration *getMatchEnumeration (::java::lang::Object *, jint);
  virtual ::gnu::regexp::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::regexp::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::regexp::CharIndexed *, ::java::lang::String *, jint, jint);
public:
  static ::java::lang::String *getReplacement (::java::lang::String *, ::gnu::regexp::REMatch *, jint);
private:
  void addToken (::gnu::regexp::REToken *);
  static ::gnu::regexp::REToken *setRepeated (::gnu::regexp::REToken *, jint, jint, jint);
  static jint getPosixSet (jcharArray, jint, ::java::lang::StringBuffer *);
  jint getMinMax (jcharArray, jint, ::gnu::regexp::RE$IntPair *, ::gnu::regexp::RESyntax *);
public:
  virtual ::java::lang::String *toString ();
public: // actually package-private
  virtual void dump (::java::lang::StringBuffer *);
private:
  static ::gnu::regexp::CharIndexed *makeCharIndexed (::java::lang::Object *, jint);
  static ::java::lang::String *VERSION;
  static ::java::util::ResourceBundle *messages;
  ::gnu::regexp::REToken * __attribute__((aligned(__alignof__( ::gnu::regexp::REToken )))) firstToken;
  ::gnu::regexp::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;

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

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

#endif /* __gnu_regexp_RE__ */
