imgtools/imglib/boostlibrary/boost/regex/v4/regbase.hpp
author lorewang
Thu, 11 Nov 2010 13:49:10 +0800
changeset 679 85cca48b4293
parent 600 6d08f4a05d93
permissions -rw-r--r--
merge after pull
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
600
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     1
/*
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     2
 *
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     3
 * Copyright (c) 1998-2002
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     4
 * John Maddock
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     5
 *
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     6
 * Use, modification and distribution are subject to the 
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     7
 * Boost Software License, Version 1.0. (See accompanying file 
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     8
 * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     9
 *
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    10
 */
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    11
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    12
 /*
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    13
  *   LOCATION:    see http://www.boost.org for most recent version.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    14
  *   FILE         regbase.cpp
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    15
  *   VERSION      see <boost/version.hpp>
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    16
  *   DESCRIPTION: Declares class regbase.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    17
  */
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    18
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    19
#ifndef BOOST_REGEX_V4_REGBASE_HPP
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    20
#define BOOST_REGEX_V4_REGBASE_HPP
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    21
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    22
#ifdef BOOST_MSVC
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    23
#pragma warning(push)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    24
#pragma warning(disable: 4103)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    25
#endif
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    26
#ifdef BOOST_HAS_ABI_HEADERS
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    27
#  include BOOST_ABI_PREFIX
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    28
#endif
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    29
#ifdef BOOST_MSVC
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    30
#pragma warning(pop)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    31
#endif
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    32
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    33
namespace boost{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    34
//
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    35
// class regbase
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    36
// handles error codes and flags
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    37
//
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    38
class BOOST_REGEX_DECL regbase
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    39
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    40
public:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    41
   enum flag_type_
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    42
   {
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    43
      //
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    44
      // Divide the flags up into logical groups:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    45
      // bits 0-7 indicate main synatx type.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    46
      // bits 8-15 indicate syntax subtype.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    47
      // bits 16-31 indicate options that are common to all
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    48
      // regex syntaxes.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    49
      // In all cases the default is 0.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    50
      //
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    51
      // Main synatx group:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    52
      //
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    53
      perl_syntax_group = 0,                      // default
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    54
      basic_syntax_group = 1,                     // POSIX basic
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    55
      literal = 2,                                // all characters are literals
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    56
      main_option_type = literal | basic_syntax_group | perl_syntax_group, // everything!
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    57
      //
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    58
      // options specific to perl group:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    59
      //
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    60
      no_bk_refs = 1 << 8,                        // \d not allowed
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    61
      no_perl_ex = 1 << 9,                        // disable perl extensions
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    62
      no_mod_m = 1 << 10,                         // disable Perl m modifier
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    63
      mod_x = 1 << 11,                            // Perl x modifier
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    64
      mod_s = 1 << 12,                            // force s modifier on (overrides match_not_dot_newline)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    65
      no_mod_s = 1 << 13,                         // force s modifier off (overrides match_not_dot_newline)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    66
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    67
      //
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    68
      // options specific to basic group:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    69
      //
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    70
      no_char_classes = 1 << 8,                   // [[:CLASS:]] not allowed
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    71
      no_intervals = 1 << 9,                      // {x,y} not allowed
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    72
      bk_plus_qm = 1 << 10,                       // uses \+ and \?
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    73
      bk_vbar = 1 << 11,                          // use \| for alternatives
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    74
      emacs_ex = 1 << 12,                         // enables emacs extensions
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    75
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    76
      //
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    77
      // options common to all groups:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    78
      //
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    79
      no_escape_in_lists = 1 << 16,                     // '\' not special inside [...]
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    80
      newline_alt = 1 << 17,                            // \n is the same as |
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    81
      no_except = 1 << 18,                              // no exception on error
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    82
      failbit = 1 << 19,                                // error flag
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    83
      icase = 1 << 20,                                  // characters are matched regardless of case
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    84
      nocollate = 0,                                    // don't use locale specific collation (deprecated)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    85
      collate = 1 << 21,                                // use locale specific collation
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    86
      nosubs = 1 << 22,                                 // don't mark sub-expressions
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    87
      save_subexpression_location = 1 << 23,            // save subexpression locations
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    88
      no_empty_expressions = 1 << 24,                   // no empty expressions allowed
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    89
      optimize = 0,                                     // not really supported
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    90
      
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    91
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    92
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    93
      basic = basic_syntax_group | collate | no_escape_in_lists,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    94
      extended = no_bk_refs | collate | no_perl_ex | no_escape_in_lists,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    95
      normal = 0,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    96
      emacs = basic_syntax_group | collate | emacs_ex | bk_vbar,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    97
      awk = no_bk_refs | collate | no_perl_ex,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    98
      grep = basic | newline_alt,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    99
      egrep = extended | newline_alt,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   100
      sed = basic,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   101
      perl = normal,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   102
      ECMAScript = normal,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   103
      JavaScript = normal,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   104
      JScript = normal
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   105
   };
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   106
   typedef unsigned int flag_type;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   107
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   108
   enum restart_info
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   109
   {
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   110
      restart_any = 0,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   111
      restart_word = 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   112
      restart_line = 2,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   113
      restart_buf = 3,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   114
      restart_continue = 4,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   115
      restart_lit = 5,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   116
      restart_fixed_lit = 6, 
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   117
      restart_count = 7
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   118
   };
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   119
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   120
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   121
//
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   122
// provide std lib proposal compatible constants:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   123
//
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   124
namespace regex_constants{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   125
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   126
   enum flag_type_
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   127
   {
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   128
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   129
      no_except = ::boost::regbase::no_except,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   130
      failbit = ::boost::regbase::failbit,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   131
      literal = ::boost::regbase::literal,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   132
      icase = ::boost::regbase::icase,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   133
      nocollate = ::boost::regbase::nocollate,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   134
      collate = ::boost::regbase::collate,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   135
      nosubs = ::boost::regbase::nosubs,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   136
      optimize = ::boost::regbase::optimize,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   137
      bk_plus_qm = ::boost::regbase::bk_plus_qm,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   138
      bk_vbar = ::boost::regbase::bk_vbar,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   139
      no_intervals = ::boost::regbase::no_intervals,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   140
      no_char_classes = ::boost::regbase::no_char_classes,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   141
      no_escape_in_lists = ::boost::regbase::no_escape_in_lists,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   142
      no_mod_m = ::boost::regbase::no_mod_m,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   143
      mod_x = ::boost::regbase::mod_x,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   144
      mod_s = ::boost::regbase::mod_s,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   145
      no_mod_s = ::boost::regbase::no_mod_s,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   146
      save_subexpression_location = ::boost::regbase::save_subexpression_location,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   147
      no_empty_expressions = ::boost::regbase::no_empty_expressions,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   148
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   149
      basic = ::boost::regbase::basic,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   150
      extended = ::boost::regbase::extended,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   151
      normal = ::boost::regbase::normal,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   152
      emacs = ::boost::regbase::emacs,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   153
      awk = ::boost::regbase::awk,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   154
      grep = ::boost::regbase::grep,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   155
      egrep = ::boost::regbase::egrep,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   156
      sed = basic,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   157
      perl = normal,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   158
      ECMAScript = normal,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   159
      JavaScript = normal,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   160
      JScript = normal
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   161
   };
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   162
   typedef ::boost::regbase::flag_type syntax_option_type;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   163
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   164
} // namespace regex_constants
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   165
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   166
} // namespace boost
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   167
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   168
#ifdef BOOST_MSVC
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   169
#pragma warning(push)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   170
#pragma warning(disable: 4103)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   171
#endif
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   172
#ifdef BOOST_HAS_ABI_HEADERS
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   173
#  include BOOST_ABI_SUFFIX
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   174
#endif
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   175
#ifdef BOOST_MSVC
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   176
#pragma warning(pop)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   177
#endif
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   178
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   179
#endif
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   180