forked from boostorg/regex
Cleaned up comments to make regex.h C compatible.
[SVN r25414]
This commit is contained in:
@ -169,9 +169,9 @@ using std::distance;
|
|||||||
# endif
|
# endif
|
||||||
# define BOOST_REGEX_MAKE_BOOL(x) static_cast<bool>(x)
|
# define BOOST_REGEX_MAKE_BOOL(x) static_cast<bool>(x)
|
||||||
#endif
|
#endif
|
||||||
#endif // __cplusplus
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
// backwards compatibitity:
|
/* backwards compatibitity: */
|
||||||
#if defined(BOOST_RE_NO_LIB)
|
#if defined(BOOST_RE_NO_LIB)
|
||||||
# define BOOST_REGEX_NO_LIB
|
# define BOOST_REGEX_NO_LIB
|
||||||
#endif
|
#endif
|
||||||
@ -523,7 +523,7 @@ namespace std{
|
|||||||
# if !defined(BOOST_NO_STD_LOCALE) && !defined (__STL_NO_NATIVE_MBSTATE_T) && !defined(_STLP_NO_NATIVE_MBSTATE_T)
|
# if !defined(BOOST_NO_STD_LOCALE) && !defined (__STL_NO_NATIVE_MBSTATE_T) && !defined(_STLP_NO_NATIVE_MBSTATE_T)
|
||||||
using ::mbstate_t;
|
using ::mbstate_t;
|
||||||
# endif
|
# endif
|
||||||
# endif // BOOST_NO_WREGEX
|
# endif /* BOOST_NO_WREGEX */
|
||||||
using ::fseek;
|
using ::fseek;
|
||||||
using ::fread;
|
using ::fread;
|
||||||
using ::ftell;
|
using ::ftell;
|
||||||
|
@ -165,10 +165,10 @@ typedef enum
|
|||||||
} // namespace
|
} // namespace
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
//
|
//
|
||||||
// C++ high level wrapper goes here:
|
// C++ high level wrapper goes here:
|
||||||
//
|
//
|
||||||
#if defined(__cplusplus)
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
namespace boost{
|
namespace boost{
|
||||||
@ -271,7 +271,7 @@ public:
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // include guard
|
#endif /* include guard */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,52 +23,54 @@
|
|||||||
# include <boost/cstdint.hpp>
|
# include <boost/cstdint.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/detail/workaround.hpp>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
#include <boost/detail/workaround.hpp>
|
||||||
namespace boost{
|
namespace boost{
|
||||||
namespace regex_constants{
|
namespace regex_constants{
|
||||||
|
#else
|
||||||
|
#define BOOST_WORKAROUND(x, y) 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef enum _match_flags
|
typedef enum _match_flags
|
||||||
{
|
{
|
||||||
match_default = 0,
|
match_default = 0,
|
||||||
match_not_bol = 1, // first is not start of line
|
match_not_bol = 1, /* first is not start of line*/
|
||||||
match_not_eol = match_not_bol << 1, // last is not end of line
|
match_not_eol = match_not_bol << 1, /* last is not end of line*/
|
||||||
match_not_bob = match_not_eol << 1, // first is not start of buffer
|
match_not_bob = match_not_eol << 1, /* first is not start of buffer*/
|
||||||
match_not_eob = match_not_bob << 1, // last is not end of buffer
|
match_not_eob = match_not_bob << 1, /* last is not end of buffer*/
|
||||||
match_not_bow = match_not_eob << 1, // first is not start of word
|
match_not_bow = match_not_eob << 1, /* first is not start of word*/
|
||||||
match_not_eow = match_not_bow << 1, // last is not end of word
|
match_not_eow = match_not_bow << 1, /* last is not end of word*/
|
||||||
match_not_dot_newline = match_not_eow << 1, // \n is not matched by '.'
|
match_not_dot_newline = match_not_eow << 1, /* \n is not matched by '.'*/
|
||||||
match_not_dot_null = match_not_dot_newline << 1, // '\0' is not matched by '.'
|
match_not_dot_null = match_not_dot_newline << 1, /* '\0' is not matched by '.'*/
|
||||||
match_prev_avail = match_not_dot_null << 1, // *--first is a valid expression
|
match_prev_avail = match_not_dot_null << 1, /* *--first is a valid expression*/
|
||||||
match_init = match_prev_avail << 1, // internal use
|
match_init = match_prev_avail << 1, /* internal use*/
|
||||||
match_any = match_init << 1, // don't care what we match
|
match_any = match_init << 1, /* don't care what we match*/
|
||||||
match_not_null = match_any << 1, // string can't be null
|
match_not_null = match_any << 1, /* string can't be null*/
|
||||||
match_continuous = match_not_null << 1, // each grep match must continue from
|
match_continuous = match_not_null << 1, /* each grep match must continue from*/
|
||||||
// uninterupted from the previous one
|
/* uninterupted from the previous one*/
|
||||||
match_partial = match_continuous << 1, // find partial matches
|
match_partial = match_continuous << 1, /* find partial matches*/
|
||||||
|
|
||||||
match_stop = match_partial << 1, // stop after first match (grep) V3 only
|
match_stop = match_partial << 1, /* stop after first match (grep) V3 only*/
|
||||||
match_not_initial_null = match_stop, // don't match initial null, V4 only
|
match_not_initial_null = match_stop, /* don't match initial null, V4 only*/
|
||||||
match_all = match_stop << 1, // must find the whole of input even if match_any is set
|
match_all = match_stop << 1, /* must find the whole of input even if match_any is set*/
|
||||||
match_perl = match_all << 1, // Use perl matching rules
|
match_perl = match_all << 1, /* Use perl matching rules*/
|
||||||
match_posix = match_perl << 1, // Use POSIX matching rules
|
match_posix = match_perl << 1, /* Use POSIX matching rules*/
|
||||||
match_nosubs = match_posix << 1, // don't trap marked subs
|
match_nosubs = match_posix << 1, /* don't trap marked subs*/
|
||||||
match_extra = match_nosubs << 1, // include full capture information for repeated captures
|
match_extra = match_nosubs << 1, /* include full capture information for repeated captures*/
|
||||||
match_single_line = match_extra << 1, // treat text as single line and ignor any \n's when matching ^ and $.
|
match_single_line = match_extra << 1, /* treat text as single line and ignor any \n's when matching ^ and $.*/
|
||||||
match_unused1 = match_single_line << 1, // unused
|
match_unused1 = match_single_line << 1, /* unused*/
|
||||||
match_unused2 = match_unused1 << 1, // unused
|
match_unused2 = match_unused1 << 1, /* unused*/
|
||||||
match_unused3 = match_unused2 << 1, // unused
|
match_unused3 = match_unused2 << 1, /* unused*/
|
||||||
match_max = match_unused3,
|
match_max = match_unused3,
|
||||||
|
|
||||||
format_perl = 0, // perl style replacement
|
format_perl = 0, /* perl style replacement*/
|
||||||
format_default = 0, // ditto.
|
format_default = 0, /* ditto.*/
|
||||||
format_sed = match_max << 1, // sed style replacement.
|
format_sed = match_max << 1, /* sed style replacement.*/
|
||||||
format_all = format_sed << 1, // enable all extentions to sytax.
|
format_all = format_sed << 1, /* enable all extentions to sytax.*/
|
||||||
format_no_copy = format_all << 1, // don't copy non-matching segments.
|
format_no_copy = format_all << 1, /* don't copy non-matching segments.*/
|
||||||
format_first_only = format_no_copy << 1, // Only replace first occurance.
|
format_first_only = format_no_copy << 1, /* Only replace first occurance.*/
|
||||||
format_is_if = format_first_only << 1 // internal use only.
|
format_is_if = format_first_only << 1 /* internal use only.*/
|
||||||
|
|
||||||
} match_flags;
|
} match_flags;
|
||||||
|
|
||||||
@ -134,6 +136,6 @@ using regex_constants::format_first_only;
|
|||||||
//using regex_constants::format_is_if;
|
//using regex_constants::format_is_if;
|
||||||
|
|
||||||
} // namespace boost
|
} // namespace boost
|
||||||
#endif // __cplusplus
|
#endif /* __cplusplus */
|
||||||
#endif // include guard
|
#endif /* include guard */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user