os/ossrv/ossrv_pub/boost_apis/boost/regex/v4/regbase.hpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/regex/v4/regbase.hpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,162 @@
     1.4 +/*
     1.5 + *
     1.6 + * Copyright (c) 1998-2002
     1.7 + * John Maddock
     1.8 + *
     1.9 + * Use, modification and distribution are subject to the 
    1.10 + * Boost Software License, Version 1.0. (See accompanying file 
    1.11 + * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    1.12 + *
    1.13 + */
    1.14 +
    1.15 + /*
    1.16 +  *   LOCATION:    see http://www.boost.org for most recent version.
    1.17 +  *   FILE         regbase.cpp
    1.18 +  *   VERSION      see <boost/version.hpp>
    1.19 +  *   DESCRIPTION: Declares class regbase.
    1.20 +  */
    1.21 +
    1.22 +#ifndef BOOST_REGEX_V4_REGBASE_HPP
    1.23 +#define BOOST_REGEX_V4_REGBASE_HPP
    1.24 +
    1.25 +#ifdef BOOST_HAS_ABI_HEADERS
    1.26 +#  include BOOST_ABI_PREFIX
    1.27 +#endif
    1.28 +
    1.29 +namespace boost{
    1.30 +//
    1.31 +// class regbase
    1.32 +// handles error codes and flags
    1.33 +//
    1.34 +class BOOST_REGEX_DECL regbase
    1.35 +{
    1.36 +public:
    1.37 +   enum flag_type_
    1.38 +   {
    1.39 +      //
    1.40 +      // Divide the flags up into logical groups:
    1.41 +      // bits 0-7 indicate main synatx type.
    1.42 +      // bits 8-15 indicate syntax subtype.
    1.43 +      // bits 16-31 indicate options that are common to all
    1.44 +      // regex syntaxes.
    1.45 +      // In all cases the default is 0.
    1.46 +      //
    1.47 +      // Main synatx group:
    1.48 +      //
    1.49 +      perl_syntax_group = 0,                      // default
    1.50 +      basic_syntax_group = 1,                     // POSIX basic
    1.51 +      literal = 2,                                // all characters are literals
    1.52 +      main_option_type = literal | basic_syntax_group | perl_syntax_group, // everything!
    1.53 +      //
    1.54 +      // options specific to perl group:
    1.55 +      //
    1.56 +      no_bk_refs = 1 << 8,                        // \d not allowed
    1.57 +      no_perl_ex = 1 << 9,                        // disable perl extensions
    1.58 +      no_mod_m = 1 << 10,                         // disable Perl m modifier
    1.59 +      mod_x = 1 << 11,                            // Perl x modifier
    1.60 +      mod_s = 1 << 12,                            // force s modifier on (overrides match_not_dot_newline)
    1.61 +      no_mod_s = 1 << 13,                         // force s modifier off (overrides match_not_dot_newline)
    1.62 +
    1.63 +      //
    1.64 +      // options specific to basic group:
    1.65 +      //
    1.66 +      no_char_classes = 1 << 8,                   // [[:CLASS:]] not allowed
    1.67 +      no_intervals = 1 << 9,                      // {x,y} not allowed
    1.68 +      bk_plus_qm = 1 << 10,                       // uses \+ and \?
    1.69 +      bk_vbar = 1 << 11,                          // use \| for alternatives
    1.70 +      emacs_ex = 1 << 12,                         // enables emacs extensions
    1.71 +
    1.72 +      //
    1.73 +      // options common to all groups:
    1.74 +      //
    1.75 +      no_escape_in_lists = 1 << 16,                     // '\' not special inside [...]
    1.76 +      newline_alt = 1 << 17,                            // \n is the same as |
    1.77 +      no_except = 1 << 18,                              // no exception on error
    1.78 +      failbit = 1 << 19,                                // error flag
    1.79 +      icase = 1 << 20,                                  // characters are matched regardless of case
    1.80 +      nocollate = 0,                                    // don't use locale specific collation (deprecated)
    1.81 +      collate = 1 << 21,                                // use locale specific collation
    1.82 +      nosubs = 1 << 22,                                 // don't mark sub-expressions
    1.83 +      optimize = 0,                                     // not really supported
    1.84 +      
    1.85 +
    1.86 +
    1.87 +      basic = basic_syntax_group | collate | no_escape_in_lists,
    1.88 +      extended = no_bk_refs | collate | no_perl_ex | no_escape_in_lists,
    1.89 +      normal = 0,
    1.90 +      emacs = basic_syntax_group | collate | emacs_ex | bk_vbar,
    1.91 +      awk = no_bk_refs | collate | no_perl_ex,
    1.92 +      grep = basic | newline_alt,
    1.93 +      egrep = extended | newline_alt,
    1.94 +      sed = basic,
    1.95 +      perl = normal,
    1.96 +      ECMAScript = normal,
    1.97 +      JavaScript = normal,
    1.98 +      JScript = normal
    1.99 +   };
   1.100 +   typedef unsigned int flag_type;
   1.101 +
   1.102 +   enum restart_info
   1.103 +   {
   1.104 +      restart_any = 0,
   1.105 +      restart_word = 1,
   1.106 +      restart_line = 2,
   1.107 +      restart_buf = 3,
   1.108 +      restart_continue = 4,
   1.109 +      restart_lit = 5,
   1.110 +      restart_fixed_lit = 6, 
   1.111 +      restart_count = 7
   1.112 +   };
   1.113 +};
   1.114 +
   1.115 +//
   1.116 +// provide std lib proposal compatible constants:
   1.117 +//
   1.118 +namespace regex_constants{
   1.119 +
   1.120 +   enum flag_type_
   1.121 +   {
   1.122 +
   1.123 +      no_except = ::boost::regbase::no_except,
   1.124 +      failbit = ::boost::regbase::failbit,
   1.125 +      literal = ::boost::regbase::literal,
   1.126 +      icase = ::boost::regbase::icase,
   1.127 +      nocollate = ::boost::regbase::nocollate,
   1.128 +      collate = ::boost::regbase::collate,
   1.129 +      nosubs = ::boost::regbase::nosubs,
   1.130 +      optimize = ::boost::regbase::optimize,
   1.131 +      bk_plus_qm = ::boost::regbase::bk_plus_qm,
   1.132 +      bk_vbar = ::boost::regbase::bk_vbar,
   1.133 +      no_intervals = ::boost::regbase::no_intervals,
   1.134 +      no_char_classes = ::boost::regbase::no_char_classes,
   1.135 +      no_escape_in_lists = ::boost::regbase::no_escape_in_lists,
   1.136 +      no_mod_m = ::boost::regbase::no_mod_m,
   1.137 +      mod_x = ::boost::regbase::mod_x,
   1.138 +      mod_s = ::boost::regbase::mod_s,
   1.139 +      no_mod_s = ::boost::regbase::no_mod_s,
   1.140 +
   1.141 +      basic = ::boost::regbase::basic,
   1.142 +      extended = ::boost::regbase::extended,
   1.143 +      normal = ::boost::regbase::normal,
   1.144 +      emacs = ::boost::regbase::emacs,
   1.145 +      awk = ::boost::regbase::awk,
   1.146 +      grep = ::boost::regbase::grep,
   1.147 +      egrep = ::boost::regbase::egrep,
   1.148 +      sed = basic,
   1.149 +      perl = normal,
   1.150 +      ECMAScript = normal,
   1.151 +      JavaScript = normal,
   1.152 +      JScript = normal
   1.153 +   };
   1.154 +   typedef ::boost::regbase::flag_type syntax_option_type;
   1.155 +
   1.156 +} // namespace regex_constants
   1.157 +
   1.158 +} // namespace boost
   1.159 +
   1.160 +#ifdef BOOST_HAS_ABI_HEADERS
   1.161 +#  include BOOST_ABI_SUFFIX
   1.162 +#endif
   1.163 +
   1.164 +#endif
   1.165 +