mirror of
https://github.com/boostorg/regex.git
synced 2025-07-16 05:42:15 +02:00
Moved some key template instances into the lib and out of user code.
Updated makefiles: renamed lib files with new more systematic naming convention. Added bcb6 support. Rewritten automatic lib selection. Updated copyright declarations. [SVN r13557]
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -307,3 +307,4 @@ public:
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -450,15 +450,6 @@ class match_results;
|
||||
// regular expression:
|
||||
//
|
||||
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
//
|
||||
// Ugly ugly hack,
|
||||
// template don't merge if they contain switch statements so declare these
|
||||
// templates in unnamed namespace (ie with internal linkage), each translation
|
||||
// unit then gets its own local copy, it works seemlessly but bloats the app.
|
||||
namespace{
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_REGEX_NO_FWD
|
||||
template <class charT, class traits = regex_traits<charT>, class Allocator = BOOST_DEFAULT_ALLOCATOR(charT) >
|
||||
#else
|
||||
@ -466,10 +457,10 @@ template <class charT, class traits, class Allocator >
|
||||
#endif
|
||||
class reg_expression : public regbase
|
||||
{
|
||||
public:
|
||||
typedef typename traits::size_type traits_size_type;
|
||||
typedef typename traits::uchar_type traits_uchar_type;
|
||||
typedef typename traits::string_type traits_string_type;
|
||||
public:
|
||||
// typedefs:
|
||||
typedef charT char_type;
|
||||
typedef traits traits_type;
|
||||
@ -712,7 +703,7 @@ protected:
|
||||
};
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::swap(reg_expression& that)throw()
|
||||
inline void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::swap(reg_expression& that)throw()
|
||||
{
|
||||
// this is not as efficient as it should be,
|
||||
// however swapping traits classes is problematic
|
||||
@ -723,10 +714,6 @@ void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::swap(reg_express
|
||||
}
|
||||
|
||||
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
//
|
||||
// class match_results and match_results_base
|
||||
// handles what matched where
|
||||
@ -1533,6 +1520,32 @@ iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
|
||||
|
||||
#include <boost/regex/detail/regex_compile.hpp>
|
||||
|
||||
//
|
||||
// template instances:
|
||||
//
|
||||
#define BOOST_REGEX_CHAR_T char
|
||||
#ifdef BOOST_REGEX_NARROW_INSTANTIATE
|
||||
# define BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
#include <boost/regex/detail/instances.hpp>
|
||||
#undef BOOST_REGEX_CHAR_T
|
||||
#ifdef BOOST_REGEX_INSTANTIATE
|
||||
# undef BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
#define BOOST_REGEX_CHAR_T wchar_t
|
||||
#ifdef BOOST_REGEX_WIDE_INSTANTIATE
|
||||
# define BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
#include <boost/regex/detail/instances.hpp>
|
||||
#undef BOOST_REGEX_CHAR_T
|
||||
#ifdef BOOST_REGEX_INSTANTIATE
|
||||
# undef BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost{
|
||||
#ifdef BOOST_REGEX_NO_FWD
|
||||
typedef reg_expression<char, regex_traits<char>, BOOST_DEFAULT_ALLOCATOR(char)> regex;
|
||||
@ -1549,7 +1562,6 @@ typedef match_results<std::wstring::const_iterator> wsmatch;
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include <boost/regex/detail/regex_match.hpp>
|
||||
#include <boost/regex/detail/regex_format.hpp>
|
||||
#include <boost/regex/detail/regex_split.hpp>
|
||||
@ -1582,5 +1594,6 @@ typedef match_results<std::wstring::const_iterator> wsmatch;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -40,6 +40,11 @@
|
||||
// this is harmless for a staic link:
|
||||
# define _RWSTD_COMPILE_INSTANTIATE
|
||||
# endif
|
||||
# endif
|
||||
# if (__BORLANDC__ <= 0x540) && !defined(BOOST_REGEX_NO_LIB) && !defined(_NO_VCL)
|
||||
// C++ Builder 4 and earlier, we can't tell whether we should be using
|
||||
// the VCL runtime or not, do a static link instead:
|
||||
# define BOOST_REGEX_STATIC_LINK
|
||||
# endif
|
||||
//
|
||||
// VCL support:
|
||||
@ -591,3 +596,4 @@ inline void pointer_construct(T* p, const T& t)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -447,3 +447,4 @@ using boost::re_detail::mapfile;
|
||||
|
||||
|
||||
|
||||
|
||||
|
166
include/boost/regex/detail/instances.hpp
Normal file
166
include/boost/regex/detail/instances.hpp
Normal file
@ -0,0 +1,166 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE instances.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Defines those template instances that are placed in the
|
||||
* library rather than in the users object files.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
|
||||
namespace boost{
|
||||
|
||||
//
|
||||
// this header can be included multiple times, each time with
|
||||
// a different character type, BOOST_REGEX_CHAR_T must be defined
|
||||
// first:
|
||||
//
|
||||
#ifndef BOOST_REGEX_CHAR_T
|
||||
# error "BOOST_REGEX_CHAR_T not defined"
|
||||
#endif
|
||||
|
||||
//
|
||||
// what follows is compiler specific:
|
||||
//
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# pragma option push -Jgx
|
||||
# endif
|
||||
|
||||
template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >;
|
||||
template class BOOST_REGEX_DECL re_detail::match_results_base<BOOST_REGEX_CHAR_T const*>;
|
||||
template class BOOST_REGEX_DECL re_detail::match_results_base<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>;
|
||||
template class BOOST_REGEX_DECL match_results<BOOST_REGEX_CHAR_T const*>;
|
||||
template class BOOST_REGEX_DECL match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>;
|
||||
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# pragma option pop
|
||||
# endif
|
||||
|
||||
#elif defined(BOOST_MSVC)
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# define template extern template
|
||||
# endif
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4251 4231 4660)
|
||||
|
||||
//
|
||||
// these next two lines are deliberate: raw_storage is used only internally
|
||||
// by reg_expression it is not exported from the dll:
|
||||
//
|
||||
template class re_detail::raw_storage< BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) >;
|
||||
template class BOOST_REGEX_DECL re_detail::raw_storage< BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) >;
|
||||
|
||||
template class BOOST_REGEX_DECL regex_traits< BOOST_REGEX_CHAR_T >;
|
||||
template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >;
|
||||
template class BOOST_REGEX_DECL re_detail::match_results_base<BOOST_REGEX_CHAR_T const*, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<BOOST_REGEX_CHAR_T const*>::type)>;
|
||||
template class BOOST_REGEX_DECL re_detail::match_results_base<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::type)>;
|
||||
template class BOOST_REGEX_DECL match_results<BOOST_REGEX_CHAR_T const*, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<BOOST_REGEX_CHAR_T const*>::type)>;
|
||||
template class BOOST_REGEX_DECL match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::type)>;
|
||||
|
||||
|
||||
#pragma warning(pop)
|
||||
|
||||
# ifdef template
|
||||
# undef template
|
||||
# endif
|
||||
|
||||
#elif !defined(BOOST_REGEX_HAS_DLL_RUNTIME)
|
||||
|
||||
//
|
||||
// for each [member] function declare a full specialisation of that
|
||||
// [member] function, then instantiate it in one translation unit.
|
||||
// This is not guarenteed to work according to the standard, but in
|
||||
// practice it should work for all compilers (unless they use a realy
|
||||
// perverse name mangling convention). Unfortunately this approach
|
||||
// does *not* work for Win32 style import/export, because that can
|
||||
// alter the class layout.
|
||||
//
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# define template template<>
|
||||
# endif
|
||||
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression<BOOST_REGEX_CHAR_T>(const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression<BOOST_REGEX_CHAR_T>(const BOOST_REGEX_CHAR_T* p, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)& a);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression<BOOST_REGEX_CHAR_T>(const BOOST_REGEX_CHAR_T* p, size_type len, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression<BOOST_REGEX_CHAR_T>(const reg_expression<BOOST_REGEX_CHAR_T>&);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::~reg_expression<BOOST_REGEX_CHAR_T>();
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>& BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator=(const reg_expression&);
|
||||
template BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::get_allocator()const;
|
||||
template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator==(const reg_expression<BOOST_REGEX_CHAR_T>&)const;
|
||||
template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator<(const reg_expression<BOOST_REGEX_CHAR_T>&)const;
|
||||
template BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::allocator()const;
|
||||
template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::set_expression(const BOOST_REGEX_CHAR_T* p, const BOOST_REGEX_CHAR_T* end, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f);
|
||||
template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_maps();
|
||||
template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_map(re_detail::re_syntax_base* node, unsigned BOOST_REGEX_CHAR_T* _map, unsigned int* pnull, unsigned BOOST_REGEX_CHAR_T mask, re_detail::re_syntax_base* terminal)const;
|
||||
template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_start(re_detail::re_syntax_base* node, BOOST_REGEX_CHAR_T c, re_detail::re_syntax_base* terminal)const;
|
||||
template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const;
|
||||
template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces);
|
||||
template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::move_offsets(re_detail::re_syntax_base* j, unsigned size);
|
||||
template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
|
||||
template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_aux(re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& singles, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& ranges, re_detail::jstack<boost::uint_fast32_t, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& classes, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& equivalents, bool isnot, const re_detail::_narrow_type&);
|
||||
template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_aux(re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& singles, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& ranges, re_detail::jstack<boost::uint_fast32_t, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& classes, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& equivalents, bool isnot, const re_detail::_wide_type&);
|
||||
template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot);
|
||||
template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_inner_set(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
|
||||
template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size);
|
||||
template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::add_literal(re_detail::re_syntax_base* dat, BOOST_REGEX_CHAR_T c);
|
||||
template BOOST_REGEX_CHAR_T BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_escape(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
|
||||
template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_range(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, unsigned& min, unsigned& max);
|
||||
template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::skip_space(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
|
||||
template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_restart(re_detail::re_syntax_base* dat);
|
||||
template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end);
|
||||
template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fail(unsigned int err);
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
#define iterator const BOOST_REGEX_CHAR_T*
|
||||
#define Allocator match_results_base<iterator>::alloc_type
|
||||
#define size_type match_results_base<iterator>::size_type
|
||||
|
||||
template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i);
|
||||
template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i, std::size_t pos);
|
||||
template match_results_base<iterator, Allocator>::match_results_base(const Allocator& a);
|
||||
template Allocator BOOST_REGEX_CALL match_results_base<iterator, Allocator>::allocator()const;
|
||||
template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::m_free();
|
||||
template bool match_results_base<iterator, Allocator>::operator==(const match_results_base<iterator, Allocator>& that)const;
|
||||
template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n);
|
||||
template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n, iterator i, iterator j);
|
||||
template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::cow();
|
||||
|
||||
#undef iterator
|
||||
#undef Allocator
|
||||
#undef size_type
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
# ifdef template
|
||||
# undef template
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -66,14 +66,6 @@ bool BOOST_REGEX_CALL re_maybe_set_member(charT c,
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
//
|
||||
// Ugly ugly hack,
|
||||
// templates don't merge if they contain switch statements so declare these
|
||||
// templates in unnamed namespace (ie with internal linkage), each translation
|
||||
// unit then gets its own local copy, it works seemlessly but bloats the app.
|
||||
namespace{
|
||||
#endif
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
inline bool BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_wide_type&)
|
||||
@ -2070,10 +2062,6 @@ void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::fail(unsigned in
|
||||
}
|
||||
|
||||
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
@ -2090,3 +2078,4 @@ void BOOST_REGEX_CALL reg_expression<charT, traits, Allocator>::fail(unsigned in
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -131,3 +131,4 @@ inline void BOOST_REGEX_CALL re_strfree(charT* p)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -576,3 +576,4 @@ std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -111,3 +111,4 @@ kmp_info<charT>* kmp_compile(iterator first, iterator last, charT, Trans transla
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -22,161 +22,163 @@
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
#ifndef BOOST_REGEX_LIBRARY_INCLUDE_HPP
|
||||
Libraries for Borland and Microsoft compilers are automatically
|
||||
selected here, the name of the lib is selected according to the following
|
||||
formula:
|
||||
|
||||
BOOST_LIB_NAME
|
||||
+ "_"
|
||||
+ BOOST_LIB_TOOLSET
|
||||
+ "_"
|
||||
+ BOOST_LIB_THREAD_OPT
|
||||
+ BOOST_LIB_RT_OPT
|
||||
+ BOOST_LIB_LINK_OPT
|
||||
+ BOOST_LIB_DEBUG_OPT
|
||||
|
||||
These are defined as:
|
||||
|
||||
BOOST_LIB_NAME: The base name of the lib (boost_regex).
|
||||
|
||||
BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).
|
||||
|
||||
BOOST_LIB_THREAD_OPT: "s" for single thread builds,
|
||||
"m" for multithread builds.
|
||||
|
||||
BOOST_LIB_RT_OPT: "s" for static runtime,
|
||||
"d" for dynamic runtime.
|
||||
|
||||
BOOST_LIB_LINK_OPT: "s" for static link,
|
||||
"i" for dynamic link.
|
||||
|
||||
BOOST_LIB_DEBUG_OPT: nothing for release builds,
|
||||
"d" for debug builds,
|
||||
"dd" for debug-diagnostic builds (_STLP_DEBUG).
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#if !defined(BOOST_REGEX_LIBRARY_INCLUDE_HPP) && !defined(BOOST_REGEX_NO_LIB)
|
||||
#define BOOST_REGEX_LIBRARY_INCLUDE_HPP
|
||||
#ifndef BOOST_REGEX_NO_LIB
|
||||
|
||||
#if defined(BOOST_MSVC) && !defined(BOOST_REGEX_BUILD_DLL)
|
||||
#if defined(__SGI_STL_PORT) || defined(_STLP_VERSION)
|
||||
#ifdef _DLL
|
||||
// All these are multithreaded:
|
||||
#if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
#pragma comment(lib, "vc6-stlport-re300ddl.lib")
|
||||
#elif defined(_DEBUG)
|
||||
#pragma comment(lib, "vc6-stlport-re300dl.lib")
|
||||
#elif defined(BOOST_REGEX_STATIC_LINK)
|
||||
// static regex lib, dll runtime
|
||||
#pragma comment(lib, "vc6-stlport-re300ls.lib")
|
||||
#else // DEBUG
|
||||
#pragma comment(lib, "vc6-stlport-re300l.lib")
|
||||
#endif // _DEBUG
|
||||
#else // _DLL
|
||||
#ifdef _MT
|
||||
#if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
#pragma comment(lib, "vc6-stlport-re300ddm.lib")
|
||||
#elif defined(_DEBUG)
|
||||
#pragma comment(lib, "vc6-stlport-re300dm.lib")
|
||||
#else //_DEBUG
|
||||
#pragma comment(lib, "vc6-stlport-re300m.lib")
|
||||
#endif //_DEBUG
|
||||
#else //_MT
|
||||
// STLPort does not support single threaded builds:
|
||||
#error STLPort does not support single threaded builds
|
||||
#endif //_MT
|
||||
#endif //_DLL
|
||||
#elif _MSC_VER < 1300
|
||||
#ifdef _DLL
|
||||
// All these are multithreaded:
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "vc6-re300dl.lib")
|
||||
#elif defined(BOOST_REGEX_STATIC_LINK)
|
||||
// static regex lib, dll runtime
|
||||
#pragma comment(lib, "vc6-re300ls.lib")
|
||||
#else // DEBUG
|
||||
#pragma comment(lib, "vc6-re300l.lib")
|
||||
#endif // _DEBUG
|
||||
#else // _DLL
|
||||
#ifdef _MT
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "vc6-re300dm.lib")
|
||||
#else //_DEBUG
|
||||
#pragma comment(lib, "vc6-re300m.lib")
|
||||
#endif //_DEBUG
|
||||
#else //_MT
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "vc6-re300d.lib")
|
||||
#else //_DEBUG
|
||||
#pragma comment(lib, "vc6-re300.lib")
|
||||
#endif //_DEBUG
|
||||
#endif //_MT
|
||||
#endif //_DLL
|
||||
#define BOOST_LIB_NAME "boost_regex"
|
||||
|
||||
//
|
||||
// select toolset:
|
||||
//
|
||||
#if defined(BOOST_MSVC) && (BOOST_MSVC == 1200) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||
|
||||
// vc6-stlport:
|
||||
# define BOOST_LIB_TOOLSET "vc6-stlport"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1200)
|
||||
|
||||
// vc6:
|
||||
# define BOOST_LIB_TOOLSET "vc6"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1300)
|
||||
|
||||
// vc7:
|
||||
# define BOOST_LIB_TOOLSET "vc7"
|
||||
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x560)
|
||||
|
||||
// CBuilder 6:
|
||||
# define BOOST_LIB_TOOLSET "bcb6"
|
||||
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
|
||||
|
||||
// CBuilder 6:
|
||||
# define BOOST_LIB_TOOLSET "bcb5"
|
||||
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x540)
|
||||
|
||||
// CBuilder 6:
|
||||
# define BOOST_LIB_TOOLSET "bcb4"
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// select thread opt:
|
||||
//
|
||||
#if defined(_MT) || defined(__MT__)
|
||||
# define BOOST_LIB_THREAD_OPT "m"
|
||||
#else
|
||||
#ifdef _DLL
|
||||
// All these are multithreaded:
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "vc7-re300dl.lib")
|
||||
#elif defined(BOOST_REGEX_STATIC_LINK)
|
||||
// static regex lib, dll runtime
|
||||
#pragma comment(lib, "vc7-re300ls.lib")
|
||||
#else // DEBUG
|
||||
#pragma comment(lib, "vc7-re300l.lib")
|
||||
#endif // _DEBUG
|
||||
#else // _DLL
|
||||
#ifdef _MT
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "vc7-re300dm.lib")
|
||||
#else //_DEBUG
|
||||
#pragma comment(lib, "vc7-re300m.lib")
|
||||
#endif //_DEBUG
|
||||
#else //_MT
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "vc7-re300d.lib")
|
||||
#else //_DEBUG
|
||||
#pragma comment(lib, "vc7-re300.lib")
|
||||
#endif //_DEBUG
|
||||
#endif //_MT
|
||||
#endif //_DLL
|
||||
#endif // __SGI_STL_PORT
|
||||
#endif //BOOST_MSVC
|
||||
# define BOOST_LIB_THREAD_OPT "s"
|
||||
#endif
|
||||
|
||||
//
|
||||
// select runtime opt:
|
||||
//
|
||||
#if defined(_DLL) || defined(_RTLDLL)
|
||||
# define BOOST_LIB_RT_OPT "d"
|
||||
#else
|
||||
# define BOOST_LIB_RT_OPT "s"
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__) && !defined(BOOST_REGEX_BUILD_DLL)
|
||||
|
||||
#if __BORLANDC__ < 0x550
|
||||
|
||||
#ifdef BOOST_REGEX_USE_VCL
|
||||
|
||||
#ifdef _RTLDLL
|
||||
#pragma comment(lib, "bcb4re300lv.lib")
|
||||
#else
|
||||
#pragma comment(lib, "bcb4re300v.lib")
|
||||
#endif
|
||||
|
||||
#else // VCL
|
||||
|
||||
#ifdef _RTLDLL
|
||||
#ifdef __MT__
|
||||
#pragma comment(lib, "bcb4re300lm.lib")
|
||||
#else // __MT__
|
||||
#pragma comment(lib, "bcb4re300l.lib")
|
||||
#endif // __MT__
|
||||
#else //_RTLDLL
|
||||
#ifdef __MT__
|
||||
#pragma comment(lib, "bcb4re300m.lib")
|
||||
#else // __MT__
|
||||
#pragma comment(lib, "bcb4re300.lib")
|
||||
#endif // __MT__
|
||||
#endif // _RTLDLL
|
||||
|
||||
#endif // VCL
|
||||
|
||||
#else // C++ Builder 5:
|
||||
//
|
||||
// select linkage opt:
|
||||
//
|
||||
#if (defined(_DLL) || defined(_RTLDLL)) && !defined(BOOST_REGEX_STATIC_LINK)
|
||||
# define BOOST_LIB_LINK_OPT "i"
|
||||
#else
|
||||
# define BOOST_LIB_LINK_OPT "s"
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_REGEX_USE_VCL
|
||||
|
||||
#ifdef _RTLDLL
|
||||
#pragma comment(lib, "bcb5re300lv.lib")
|
||||
#else
|
||||
#pragma comment(lib, "bcb5re300v.lib")
|
||||
#endif
|
||||
|
||||
#else // VCL
|
||||
|
||||
#ifdef _RTLDLL
|
||||
#ifdef __MT__
|
||||
#pragma comment(lib, "bcb5re300lm.lib")
|
||||
#else // __MT__
|
||||
#pragma comment(lib, "bcb5re300l.lib")
|
||||
#endif // __MT__
|
||||
#else //_RTLDLL
|
||||
#ifdef __MT__
|
||||
#pragma comment(lib, "bcb5re300m.lib")
|
||||
#else // __MT__
|
||||
#pragma comment(lib, "bcb5re300.lib")
|
||||
#endif // __MT__
|
||||
#endif // _RTLDLL
|
||||
|
||||
#endif // VCL
|
||||
|
||||
#endif
|
||||
|
||||
#endif //__BORLANDC__
|
||||
//
|
||||
// select debug opt:
|
||||
//
|
||||
#if defined(BOOST_MSVC) && defined(_DEBUG) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
|
||||
# define BOOST_LIB_DEBUG_OPT "dd"
|
||||
#elif defined(BOOST_MSVC) && defined(_DEBUG)
|
||||
# define BOOST_LIB_DEBUG_OPT "d"
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ == 0x560) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
|
||||
# define BOOST_LIB_DEBUG_OPT "dd"
|
||||
#else
|
||||
# define BOOST_LIB_DEBUG_OPT
|
||||
#endif
|
||||
|
||||
//
|
||||
// now include the lib:
|
||||
//
|
||||
#if defined(BOOST_LIB_NAME) \
|
||||
&& defined(BOOST_LIB_TOOLSET) \
|
||||
&& defined(BOOST_LIB_THREAD_OPT) \
|
||||
&& defined(BOOST_LIB_RT_OPT) \
|
||||
&& defined(BOOST_LIB_LINK_OPT) \
|
||||
&& defined(BOOST_LIB_DEBUG_OPT)
|
||||
|
||||
# pragma comment(lib, BOOST_LIB_NAME "_" BOOST_LIB_TOOLSET "_" BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_LINK_OPT BOOST_LIB_DEBUG_OPT ".lib")
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// finally undef any macros we may have set:
|
||||
//
|
||||
#if defined(BOOST_LIB_NAME)
|
||||
# undef BOOST_LIB_NAME
|
||||
#endif
|
||||
#if defined(BOOST_LIB_TOOLSET)
|
||||
# undef BOOST_LIB_TOOLSET
|
||||
#endif
|
||||
#if defined(BOOST_LIB_THREAD_OPT)
|
||||
# undef BOOST_LIB_THREAD_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_RT_OPT)
|
||||
# undef BOOST_LIB_RT_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_LINK_OPT)
|
||||
# undef BOOST_LIB_LINK_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_DEBUG_OPT)
|
||||
# undef BOOST_LIB_DEBUG_OPT
|
||||
#endif
|
||||
|
||||
#endif //BOOST_REGEX_NO_LIB
|
||||
|
||||
#endif // BOOST_REGEX_LIBRARY_INCLUDE_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -1912,3 +1912,4 @@ inline unsigned int regex_grep(bool (*foo)(const match_results<std::basic_string
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -246,3 +246,4 @@ void* BOOST_REGEX_CALL raw_storage<Allocator>::insert(size_type pos, size_type n
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -148,3 +148,4 @@ inline std::size_t regex_split(OutputIterator out,
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -223,3 +223,4 @@ jstack<T, Allocator>::~jstack()
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -210,3 +210,4 @@ BOOST_REGEX_DECL extern unsigned int re_lock_count;
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -54,3 +54,4 @@ public:
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -536,7 +536,13 @@ private:
|
||||
|
||||
} // namspace boost
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
#include <locale>
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
|
||||
@ -798,3 +804,4 @@ class regex_traits : public cpp_regex_traits<charT>
|
||||
#endif // include
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -46,3 +46,4 @@
|
||||
#include "libs/regex/src/regex.cpp"
|
||||
#include "libs/regex/src/regex_debug.cpp"
|
||||
#include "libs/regex/src/regex_synch.cpp"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -45,6 +45,13 @@
|
||||
// define this if bool is not a real type:
|
||||
// #define BOOST_REGEX_NO_BOOL
|
||||
|
||||
// define this if no template instances are to be placed in
|
||||
// the library rather than users object files:
|
||||
// #define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
|
||||
// define this if the forward declarations in regex_fwd.hpp
|
||||
// cause more problems than they are worth:
|
||||
// #define BOOST_REGEX_NO_FWD
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
@ -31,10 +31,6 @@
|
||||
// define BOOST_REGEX_NO_FWD if this
|
||||
// header doesn't work!
|
||||
//
|
||||
#ifdef __CYGWIN__
|
||||
# define BOOST_REGEX_NO_FWD
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_REGEX_NO_FWD
|
||||
# ifndef BOOST_RE_REGEX_HPP
|
||||
# include <boost/regex.hpp>
|
||||
@ -67,3 +63,5 @@ typedef reg_expression<wchar_t, regex_traits<wchar_t>, BOOST_DEFAULT_ALLOCATOR(w
|
||||
#endif // BOOST_REGEX_NO_FWD
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user