imgtools/imglib/boostlibrary/boost/regex/v4/states.hpp
author wbernard
Sun, 10 Oct 2010 15:22:15 +0300
changeset 645 b8d81fa19e7d
parent 600 6d08f4a05d93
permissions -rw-r--r--
helium_12.0.0-63b64366f9cf
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         states.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 internal state machine structures.
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_STATES_HPP
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    20
#define BOOST_REGEX_V4_STATES_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
namespace re_detail{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    35
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    36
/*** mask_type *******************************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    37
Whenever we have a choice of two alternatives, we use an array of bytes
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    38
to indicate which of the two alternatives it is possible to take for any
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    39
given input character.  If mask_take is set, then we can take the next 
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    40
state, and if mask_skip is set then we can take the alternative.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    41
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    42
enum mask_type
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    43
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    44
   mask_take = 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    45
   mask_skip = 2,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    46
   mask_init = 4,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    47
   mask_any = mask_skip | mask_take,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    48
   mask_all = mask_any
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    49
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    50
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    51
/*** helpers **********************************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    52
These helpers let us use function overload resolution to detect whether
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    53
we have narrow or wide character strings:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    54
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    55
struct _narrow_type{};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    56
struct _wide_type{};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    57
template <class charT> struct is_byte;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    58
template<>             struct is_byte<char>         { typedef _narrow_type width_type; };
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    59
template<>             struct is_byte<unsigned char>{ typedef _narrow_type width_type; };
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    60
template<>             struct is_byte<signed char>  { typedef _narrow_type width_type; };
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    61
template <class charT> struct is_byte               { typedef _wide_type width_type; };
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    62
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    63
/*** enum syntax_element_type ******************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    64
Every record in the state machine falls into one of the following types:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    65
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    66
enum syntax_element_type
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    67
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    68
   // start of a marked sub-expression, or perl-style (?...) extension
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    69
   syntax_element_startmark = 0,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    70
   // end of a marked sub-expression, or perl-style (?...) extension
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    71
   syntax_element_endmark = syntax_element_startmark + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    72
   // any sequence of literal characters
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    73
   syntax_element_literal = syntax_element_endmark + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    74
   // start of line assertion: ^
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    75
   syntax_element_start_line = syntax_element_literal + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    76
   // end of line assertion $
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    77
   syntax_element_end_line = syntax_element_start_line + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    78
   // match any character: .
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    79
   syntax_element_wild = syntax_element_end_line + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    80
   // end of expression: we have a match when we get here
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    81
   syntax_element_match = syntax_element_wild + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    82
   // perl style word boundary: \b
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    83
   syntax_element_word_boundary = syntax_element_match + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    84
   // perl style within word boundary: \B
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    85
   syntax_element_within_word = syntax_element_word_boundary + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    86
   // start of word assertion: \<
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    87
   syntax_element_word_start = syntax_element_within_word + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    88
   // end of word assertion: \>
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    89
   syntax_element_word_end = syntax_element_word_start + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    90
   // start of buffer assertion: \`
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    91
   syntax_element_buffer_start = syntax_element_word_end + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    92
   // end of buffer assertion: \'
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    93
   syntax_element_buffer_end = syntax_element_buffer_start + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    94
   // backreference to previously matched sub-expression
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    95
   syntax_element_backref = syntax_element_buffer_end + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    96
   // either a wide character set [..] or one with multicharacter collating elements:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    97
   syntax_element_long_set = syntax_element_backref + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    98
   // narrow character set: [...]
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    99
   syntax_element_set = syntax_element_long_set + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   100
   // jump to a new state in the machine:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   101
   syntax_element_jump = syntax_element_set + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   102
   // choose between two production states:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   103
   syntax_element_alt = syntax_element_jump + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   104
   // a repeat
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   105
   syntax_element_rep = syntax_element_alt + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   106
   // match a combining character sequence
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   107
   syntax_element_combining = syntax_element_rep + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   108
   // perl style soft buffer end: \z
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   109
   syntax_element_soft_buffer_end = syntax_element_combining + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   110
   // perl style continuation: \G
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   111
   syntax_element_restart_continue = syntax_element_soft_buffer_end + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   112
   // single character repeats:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   113
   syntax_element_dot_rep = syntax_element_restart_continue + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   114
   syntax_element_char_rep = syntax_element_dot_rep + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   115
   syntax_element_short_set_rep = syntax_element_char_rep + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   116
   syntax_element_long_set_rep = syntax_element_short_set_rep + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   117
   // a backstep for lookbehind repeats:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   118
   syntax_element_backstep = syntax_element_long_set_rep + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   119
   // an assertion that a mark was matched:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   120
   syntax_element_assert_backref = syntax_element_backstep + 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   121
   syntax_element_toggle_case = syntax_element_assert_backref + 1
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   122
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   123
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   124
#ifdef BOOST_REGEX_DEBUG
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   125
// dwa 09/26/00 - This is needed to suppress warnings about an ambiguous conversion
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   126
std::ostream& operator<<(std::ostream&, syntax_element_type);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   127
#endif
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   128
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   129
struct re_syntax_base;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   130
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   131
/*** union offset_type ************************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   132
Points to another state in the machine.  During machine construction
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   133
we use integral offsets, but these are converted to pointers before
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   134
execution of the machine.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   135
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   136
union offset_type
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   137
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   138
   re_syntax_base*   p;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   139
   std::ptrdiff_t    i;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   140
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   141
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   142
/*** struct re_syntax_base ********************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   143
Base class for all states in the machine.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   144
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   145
struct re_syntax_base
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   146
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   147
   syntax_element_type   type;         // what kind of state this is
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   148
   offset_type           next;         // next state in the machine
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   149
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   150
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   151
/*** struct re_brace **************************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   152
A marked parenthesis.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   153
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   154
struct re_brace : public re_syntax_base
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   155
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   156
   // The index to match, can be zero (don't mark the sub-expression)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   157
   // or negative (for perl style (?...) extentions):
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   158
   int index;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   159
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   160
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   161
/*** struct re_dot **************************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   162
Match anything.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   163
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   164
enum
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   165
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   166
   dont_care = 1,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   167
   force_not_newline = 0,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   168
   force_newline = 2,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   169
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   170
   test_not_newline = 2,
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   171
   test_newline = 3
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   172
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   173
struct re_dot : public re_syntax_base
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   174
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   175
   unsigned char mask;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   176
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   177
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   178
/*** struct re_literal ************************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   179
A string of literals, following this structure will be an 
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   180
array of characters: charT[length]
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   181
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   182
struct re_literal : public re_syntax_base
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   183
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   184
   unsigned int length;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   185
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   186
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   187
/*** struct re_case ************************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   188
Indicates whether we are moving to a case insensive block or not
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   189
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   190
struct re_case : public re_syntax_base
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   191
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   192
   bool icase;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   193
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   194
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   195
/*** struct re_set_long ***********************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   196
A wide character set of characters, following this structure will be
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   197
an array of type charT:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   198
First csingles null-terminated strings
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   199
Then 2 * cranges NULL terminated strings
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   200
Then cequivalents NULL terminated strings
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   201
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   202
template <class mask_type>
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   203
struct re_set_long : public re_syntax_base
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   204
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   205
   unsigned int            csingles, cranges, cequivalents;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   206
   mask_type               cclasses;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   207
   mask_type               cnclasses;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   208
   bool                    isnot;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   209
   bool                    singleton;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   210
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   211
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   212
/*** struct re_set ****************************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   213
A set of narrow-characters, matches any of _map which is none-zero
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   214
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   215
struct re_set : public re_syntax_base
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   216
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   217
   unsigned char _map[1 << CHAR_BIT];
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   218
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   219
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   220
/*** struct re_jump ***************************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   221
Jump to a new location in the machine (not next).
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   222
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   223
struct re_jump : public re_syntax_base
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   224
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   225
   offset_type     alt;                 // location to jump to
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   226
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   227
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   228
/*** struct re_alt ***************************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   229
Jump to a new location in the machine (possibly next).
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   230
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   231
struct re_alt : public re_jump
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   232
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   233
   unsigned char   _map[1 << CHAR_BIT]; // which characters can take the jump
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   234
   unsigned int    can_be_null;         // true if we match a NULL string
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   235
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   236
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   237
/*** struct re_repeat *************************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   238
Repeat a section of the machine
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   239
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   240
struct re_repeat : public re_alt
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   241
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   242
   std::size_t   min, max;  // min and max allowable repeats
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   243
   int           state_id;        // Unique identifier for this repeat
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   244
   bool          leading;   // True if this repeat is at the start of the machine (lets us optimize some searches)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   245
   bool          greedy;    // True if this is a greedy repeat
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   246
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   247
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   248
/*** enum re_jump_size_type *******************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   249
Provides compiled size of re_jump structure (allowing for trailing alignment).
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   250
We provide this so we know how manybytes to insert when constructing the machine
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   251
(The value of padding_mask is defined in regex_raw_buffer.hpp).
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   252
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   253
enum re_jump_size_type
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   254
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   255
   re_jump_size = (sizeof(re_jump) + padding_mask) & ~(padding_mask),
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   256
   re_repeater_size = (sizeof(re_repeat) + padding_mask) & ~(padding_mask),
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   257
   re_alt_size = (sizeof(re_alt) + padding_mask) & ~(padding_mask)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   258
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   259
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   260
/*** proc re_is_set_member *********************************************
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   261
Forward declaration: we'll need this one later...
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   262
***********************************************************************/
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   263
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   264
template<class charT, class traits>
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   265
struct regex_data;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   266
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   267
template <class iterator, class charT, class traits_type, class char_classT>
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   268
iterator BOOST_REGEX_CALL re_is_set_member(iterator next, 
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   269
                          iterator last, 
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   270
                          const re_set_long<char_classT>* set_, 
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   271
                          const regex_data<charT, traits_type>& e, bool icase);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   272
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   273
} // namespace re_detail
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   274
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   275
} // namespace boost
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   276
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   277
#ifdef BOOST_MSVC
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   278
#pragma warning(push)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   279
#pragma warning(disable: 4103)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   280
#endif
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   281
#ifdef BOOST_HAS_ABI_HEADERS
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   282
#  include BOOST_ABI_SUFFIX
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   283
#endif
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   284
#ifdef BOOST_MSVC
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   285
#pragma warning(pop)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   286
#endif
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   287
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   288
#endif
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   289
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
   290