forked from boostorg/regex
Compare commits
51 Commits
boost-1.29
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
74c7ea377d | |||
460d2a97a9 | |||
6104fe14eb | |||
1c1ed068f4 | |||
7321d18f08 | |||
c8f2ed3bdb | |||
c233f06654 | |||
c3869beffe | |||
7057896f90 | |||
125c0f99fb | |||
180c7d64a2 | |||
6746fd87cc | |||
498fcb125b | |||
a65a747866 | |||
18213d9661 | |||
6d54921a1b | |||
d80d6ffc09 | |||
3c00a90080 | |||
5cf85df857 | |||
3819294ac1 | |||
ea96eafacc | |||
a31ae14cf8 | |||
158c26d85c | |||
86e5251979 | |||
cebaf09b5d | |||
d0ba00a2e7 | |||
75293e9854 | |||
45e593c4fe | |||
251099c828 | |||
5705d52e84 | |||
88a0f9d75a | |||
fbb087dec9 | |||
c84ebf1c5b | |||
1eec12f177 | |||
82ad27c468 | |||
897c33be2a | |||
2ecd905fb2 | |||
abef9c7249 | |||
0e37a76df0 | |||
adc4ee41e3 | |||
9a4e5d29c1 | |||
ff4890b2e2 | |||
3a5f4775f7 | |||
5a65397974 | |||
e5d9c95456 | |||
b6a13dd215 | |||
cf285ed3e5 | |||
66ddab7fae | |||
09bfc7f853 | |||
13df8a293b | |||
40ab965ee9 |
1304
appendix.htm
1304
appendix.htm
File diff suppressed because it is too large
Load Diff
@ -9,6 +9,8 @@ lib boost_regex : ../src/$(SOURCES).cpp
|
||||
<sysinclude>$(BOOST_ROOT)
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
<msvc><release><runtime-link-dynamic><threading>multi
|
||||
<msvc><debug><runtime-link-dynamic><threading>multi
|
||||
:
|
||||
debug release
|
||||
;
|
||||
@ -23,12 +25,77 @@ dll boost_regex : ../src/$(SOURCES).cpp
|
||||
;
|
||||
|
||||
|
||||
rule boost-regex-stage-tag ( toolset variant : properties * )
|
||||
{
|
||||
local lib-thread-opt = s ;
|
||||
if <threading>multi in $(properties)
|
||||
{
|
||||
lib-thread-opt = m ;
|
||||
}
|
||||
|
||||
local lib-rt-opt = s ;
|
||||
if <runtime-link>dynamic in $(properties)
|
||||
{
|
||||
lib-rt-opt = d ;
|
||||
}
|
||||
|
||||
local lib-link-opt = s ;
|
||||
if <target-type>DLL in $(properties)
|
||||
{
|
||||
lib-link-opt = i ;
|
||||
}
|
||||
|
||||
local lib-debug-opt = "" ;
|
||||
if [ MATCH .*(debug).* : $(variant) ]
|
||||
{
|
||||
lib-debug-opt = d ;
|
||||
}
|
||||
|
||||
local lib-toolset = $(toolset) ;
|
||||
|
||||
local warning-var = regex.$(toolset)-warning-issued ;
|
||||
local warning ;
|
||||
|
||||
switch $(toolset)
|
||||
{
|
||||
|
||||
case borland :
|
||||
if ! ( BORLAND_VERSION) in 4 5 6 )
|
||||
{
|
||||
BORLAND_VERSION = 5 ; # chose default version
|
||||
warning = "BORLAND_VERSION not set to 4, 5, or 6
|
||||
staged Boost.Regex library will be named appropriately for version" $(BORLAND_VERSION) ;
|
||||
}
|
||||
lib-toolset = bcb$(BORLAND_VERSION) ;
|
||||
|
||||
case msvc :
|
||||
warning = "msvc toolset builds Boost.Regex library for vc6; use vc7 or vc7.1 toolsets for other versions" ;
|
||||
lib-toolset = vc6 ;
|
||||
|
||||
case msvc-stlport :
|
||||
warning = "msvc-stlport toolset only builds Boost.Regex library for use with vc6" ;
|
||||
lib-toolset = vc6-stlport ;
|
||||
if <runtime-build>debug in $(properties)
|
||||
{
|
||||
lib-debug-opt = dd ;
|
||||
}
|
||||
}
|
||||
|
||||
if $(warning) && ! $($(warning-var))
|
||||
{
|
||||
ECHO Warning: $(warning) ;
|
||||
$(warning-var) = issued ;
|
||||
}
|
||||
return $(properties) <tag><$(variant)>_$(lib-toolset)_$(lib-thread-opt)$(lib-rt-opt)$(lib-link-opt)$(lib-debug-opt) ;
|
||||
}
|
||||
|
||||
stage bin-stage : <lib>boost_regex <dll>boost_regex
|
||||
:
|
||||
<tag><debug>"_debug"
|
||||
boost-regex-stage-tag
|
||||
:
|
||||
debug release
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
|
15
build/Jamfile.v2
Normal file
15
build/Jamfile.v2
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
project boost/regex
|
||||
: source-location ../src
|
||||
;
|
||||
SOURCES = c_regex_traits c_regex_traits_common cpp_regex_traits
|
||||
cregex fileiter posix_api regex regex_debug
|
||||
regex_synch w32_regex_traits wide_posix_api instances winstances ;
|
||||
|
||||
|
||||
lib boost_regex : $(SOURCES).cpp
|
||||
:
|
||||
<link>static:<define>BOOST_REGEX_NO_LIB=1
|
||||
<link>static:<define>BOOST_REGEX_STATIC_LINK=1
|
||||
<link>shared:<define>BOOST_RE_BUILD_DLL=1
|
||||
;
|
@ -35,7 +35,7 @@ BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/instances.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_cstring.hpp ../../../boost/regex/detail/regex_format.hpp ../../../boost/regex/detail/regex_kmp.hpp ../../../boost/regex/detail/regex_library_include.hpp ../../../boost/regex/detail/regex_match.hpp ../../../boost/regex/detail/regex_raw_buffer.hpp ../../../boost/regex/detail/regex_split.hpp ../../../boost/regex/detail/regex_stack.hpp ../../../boost/regex/detail/regex_synch.hpp
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/v3/fileiter.hpp ../../../boost/regex/v3/instances.hpp ../../../boost/regex/v3/regex_compile.hpp ../../../boost/regex/v3/regex_cstring.hpp ../../../boost/regex/v3/regex_format.hpp ../../../boost/regex/v3/regex_kmp.hpp ../../../boost/regex/v3/regex_library_include.hpp ../../../boost/regex/v3/regex_match.hpp ../../../boost/regex/v3/regex_raw_buffer.hpp ../../../boost/regex/v3/regex_split.hpp ../../../boost/regex/v3/regex_stack.hpp ../../../boost/regex/v3/regex_synch.hpp
|
||||
|
||||
all : bcb4 bcb4\boost_regex_bcb4_sss bcb4\boost_regex_bcb4_sss.lib bcb4\boost_regex_bcb4_mss bcb4\boost_regex_bcb4_mss.lib bcb4\boost_regex_bcb4_mdi bcb4\boost_regex_bcb4_mdi.lib bcb4\boost_regex_bcb4_sdi bcb4\boost_regex_bcb4_sdi.lib bcb4\boost_regex_bcb4_mds bcb4\boost_regex_bcb4_mds.lib bcb4\boost_regex_bcb4_sds bcb4\boost_regex_bcb4_sds.lib
|
||||
|
||||
@ -565,3 +565,4 @@ bcb4\boost_regex_bcb4_sds.lib : bcb4\boost_regex_bcb4_sds\c_regex_traits.obj bcb
|
||||
/P128 /C /u /a $(XSFLAGS) bcb4\boost_regex_bcb4_sds.lib -+bcb4\boost_regex_bcb4_sds\c_regex_traits.obj -+bcb4\boost_regex_bcb4_sds\c_regex_traits_common.obj -+bcb4\boost_regex_bcb4_sds\cpp_regex_traits.obj -+bcb4\boost_regex_bcb4_sds\cregex.obj -+bcb4\boost_regex_bcb4_sds\fileiter.obj -+bcb4\boost_regex_bcb4_sds\instances.obj -+bcb4\boost_regex_bcb4_sds\posix_api.obj -+bcb4\boost_regex_bcb4_sds\regex.obj -+bcb4\boost_regex_bcb4_sds\regex_debug.obj -+bcb4\boost_regex_bcb4_sds\regex_synch.obj -+bcb4\boost_regex_bcb4_sds\w32_regex_traits.obj -+bcb4\boost_regex_bcb4_sds\wide_posix_api.obj -+bcb4\boost_regex_bcb4_sds\winstances.obj
|
||||
|
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/instances.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_cstring.hpp ../../../boost/regex/detail/regex_format.hpp ../../../boost/regex/detail/regex_kmp.hpp ../../../boost/regex/detail/regex_library_include.hpp ../../../boost/regex/detail/regex_match.hpp ../../../boost/regex/detail/regex_raw_buffer.hpp ../../../boost/regex/detail/regex_split.hpp ../../../boost/regex/detail/regex_stack.hpp ../../../boost/regex/detail/regex_synch.hpp
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/v3/fileiter.hpp ../../../boost/regex/v3/instances.hpp ../../../boost/regex/v3/regex_compile.hpp ../../../boost/regex/v3/regex_cstring.hpp ../../../boost/regex/v3/regex_format.hpp ../../../boost/regex/v3/regex_kmp.hpp ../../../boost/regex/v3/regex_library_include.hpp ../../../boost/regex/v3/regex_match.hpp ../../../boost/regex/v3/regex_raw_buffer.hpp ../../../boost/regex/v3/regex_split.hpp ../../../boost/regex/v3/regex_stack.hpp ../../../boost/regex/v3/regex_synch.hpp
|
||||
|
||||
all : bcb5 bcb5\boost_regex_bcb5_sss bcb5\boost_regex_bcb5_sss.lib bcb5\boost_regex_bcb5_mss bcb5\boost_regex_bcb5_mss.lib bcb5\boost_regex_bcb5_mdi bcb5\boost_regex_bcb5_mdi.lib bcb5\boost_regex_bcb5_sdi bcb5\boost_regex_bcb5_sdi.lib bcb5\boost_regex_bcb5_mds bcb5\boost_regex_bcb5_mds.lib bcb5\boost_regex_bcb5_sds bcb5\boost_regex_bcb5_sds.lib
|
||||
|
||||
@ -565,3 +565,4 @@ bcb5\boost_regex_bcb5_sds.lib : bcb5\boost_regex_bcb5_sds\c_regex_traits.obj bcb
|
||||
/P128 /C /u /a $(XSFLAGS) bcb5\boost_regex_bcb5_sds.lib -+bcb5\boost_regex_bcb5_sds\c_regex_traits.obj -+bcb5\boost_regex_bcb5_sds\c_regex_traits_common.obj -+bcb5\boost_regex_bcb5_sds\cpp_regex_traits.obj -+bcb5\boost_regex_bcb5_sds\cregex.obj -+bcb5\boost_regex_bcb5_sds\fileiter.obj -+bcb5\boost_regex_bcb5_sds\instances.obj -+bcb5\boost_regex_bcb5_sds\posix_api.obj -+bcb5\boost_regex_bcb5_sds\regex.obj -+bcb5\boost_regex_bcb5_sds\regex_debug.obj -+bcb5\boost_regex_bcb5_sds\regex_synch.obj -+bcb5\boost_regex_bcb5_sds\w32_regex_traits.obj -+bcb5\boost_regex_bcb5_sds\wide_posix_api.obj -+bcb5\boost_regex_bcb5_sds\winstances.obj
|
||||
|
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/instances.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_cstring.hpp ../../../boost/regex/detail/regex_format.hpp ../../../boost/regex/detail/regex_kmp.hpp ../../../boost/regex/detail/regex_library_include.hpp ../../../boost/regex/detail/regex_match.hpp ../../../boost/regex/detail/regex_raw_buffer.hpp ../../../boost/regex/detail/regex_split.hpp ../../../boost/regex/detail/regex_stack.hpp ../../../boost/regex/detail/regex_synch.hpp
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/v3/fileiter.hpp ../../../boost/regex/v3/instances.hpp ../../../boost/regex/v3/regex_compile.hpp ../../../boost/regex/v3/regex_cstring.hpp ../../../boost/regex/v3/regex_format.hpp ../../../boost/regex/v3/regex_kmp.hpp ../../../boost/regex/v3/regex_library_include.hpp ../../../boost/regex/v3/regex_match.hpp ../../../boost/regex/v3/regex_raw_buffer.hpp ../../../boost/regex/v3/regex_split.hpp ../../../boost/regex/v3/regex_stack.hpp ../../../boost/regex/v3/regex_synch.hpp
|
||||
|
||||
all : bcb6 bcb6\boost_regex_bcb6_sss bcb6\boost_regex_bcb6_sss.lib bcb6\boost_regex_bcb6_mss bcb6\boost_regex_bcb6_mss.lib bcb6\boost_regex_bcb6_mdi bcb6\boost_regex_bcb6_mdi.lib bcb6\boost_regex_bcb6_sdi bcb6\boost_regex_bcb6_sdi.lib bcb6\boost_regex_bcb6_mds bcb6\boost_regex_bcb6_mds.lib bcb6\boost_regex_bcb6_sds bcb6\boost_regex_bcb6_sds.lib bcb6\boost_regex_bcb6_sssdd bcb6\boost_regex_bcb6_sssdd.lib bcb6\boost_regex_bcb6_mssdd bcb6\boost_regex_bcb6_mssdd.lib bcb6\boost_regex_bcb6_mdidd bcb6\boost_regex_bcb6_mdidd.lib bcb6\boost_regex_bcb6_sdidd bcb6\boost_regex_bcb6_sdidd.lib bcb6\boost_regex_bcb6_mdsdd bcb6\boost_regex_bcb6_mdsdd.lib bcb6\boost_regex_bcb6_sdsdd bcb6\boost_regex_bcb6_sdsdd.lib
|
||||
|
||||
@ -1083,3 +1083,4 @@ bcb6\boost_regex_bcb6_sdsdd.lib : bcb6\boost_regex_bcb6_sdsdd\c_regex_traits.obj
|
||||
/P128 /C /u /a $(XSFLAGS) bcb6\boost_regex_bcb6_sdsdd.lib -+bcb6\boost_regex_bcb6_sdsdd\c_regex_traits.obj -+bcb6\boost_regex_bcb6_sdsdd\c_regex_traits_common.obj -+bcb6\boost_regex_bcb6_sdsdd\cpp_regex_traits.obj -+bcb6\boost_regex_bcb6_sdsdd\cregex.obj -+bcb6\boost_regex_bcb6_sdsdd\fileiter.obj -+bcb6\boost_regex_bcb6_sdsdd\instances.obj -+bcb6\boost_regex_bcb6_sdsdd\posix_api.obj -+bcb6\boost_regex_bcb6_sdsdd\regex.obj -+bcb6\boost_regex_bcb6_sdsdd\regex_debug.obj -+bcb6\boost_regex_bcb6_sdsdd\regex_synch.obj -+bcb6\boost_regex_bcb6_sdsdd\w32_regex_traits.obj -+bcb6\boost_regex_bcb6_sdsdd\wide_posix_api.obj -+bcb6\boost_regex_bcb6_sdsdd\winstances.obj
|
||||
|
|
||||
|
||||
|
||||
|
@ -6,13 +6,13 @@ for file in ../../../boost/regex/*.hpp ; do
|
||||
fi
|
||||
done
|
||||
|
||||
for file in ../../../boost/regex/detail/*.hpp; do
|
||||
for file in ../../../boost/regex/v3/*.hpp; do
|
||||
if [ -f $file ]; then
|
||||
header="$header $file"
|
||||
fi
|
||||
done
|
||||
|
||||
for file in ../../../boost/regex/detail/*.hxx; do
|
||||
for file in ../../../boost/regex/v3/*.hxx; do
|
||||
if [ -f $file ]; then
|
||||
header="$header $file"
|
||||
fi
|
||||
@ -26,3 +26,4 @@ for file in ../src/*.cpp; do
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@ C1=-c -O2 -I../../../ -fPIC
|
||||
C2=-c -g -I../../../ -fPIC
|
||||
|
||||
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/instances.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_cstring.hpp ../../../boost/regex/detail/regex_format.hpp ../../../boost/regex/detail/regex_kmp.hpp ../../../boost/regex/detail/regex_library_include.hpp ../../../boost/regex/detail/regex_match.hpp ../../../boost/regex/detail/regex_raw_buffer.hpp ../../../boost/regex/detail/regex_split.hpp ../../../boost/regex/detail/regex_stack.hpp ../../../boost/regex/detail/regex_synch.hpp
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/v3/fileiter.hpp ../../../boost/regex/v3/instances.hpp ../../../boost/regex/v3/regex_compile.hpp ../../../boost/regex/v3/regex_cstring.hpp ../../../boost/regex/v3/regex_format.hpp ../../../boost/regex/v3/regex_kmp.hpp ../../../boost/regex/v3/regex_library_include.hpp ../../../boost/regex/v3/regex_match.hpp ../../../boost/regex/v3/regex_raw_buffer.hpp ../../../boost/regex/v3/regex_split.hpp ../../../boost/regex/v3/regex_stack.hpp ../../../boost/regex/v3/regex_synch.hpp
|
||||
|
||||
all : gcc gcc gcc/boost_regex_shared ./gcc/libboost_regex.so gcc gcc/boost_regex_debug_shared ./gcc/libboost_regex_debug.so
|
||||
|
||||
@ -148,3 +148,4 @@ boost_regex_debug_clean :
|
||||
./gcc/libboost_regex_debug.so : gcc/boost_regex_debug_shared/c_regex_traits.o gcc/boost_regex_debug_shared/c_regex_traits_common.o gcc/boost_regex_debug_shared/cpp_regex_traits.o gcc/boost_regex_debug_shared/cregex.o gcc/boost_regex_debug_shared/fileiter.o gcc/boost_regex_debug_shared/instances.o gcc/boost_regex_debug_shared/posix_api.o gcc/boost_regex_debug_shared/regex.o gcc/boost_regex_debug_shared/regex_debug.o gcc/boost_regex_debug_shared/regex_synch.o gcc/boost_regex_debug_shared/w32_regex_traits.o gcc/boost_regex_debug_shared/wide_posix_api.o gcc/boost_regex_debug_shared/winstances.o
|
||||
$(LINKER) -o gcc/libboost_regex_debug.so $(LDFLAGS) gcc/boost_regex_debug_shared/c_regex_traits.o gcc/boost_regex_debug_shared/c_regex_traits_common.o gcc/boost_regex_debug_shared/cpp_regex_traits.o gcc/boost_regex_debug_shared/cregex.o gcc/boost_regex_debug_shared/fileiter.o gcc/boost_regex_debug_shared/instances.o gcc/boost_regex_debug_shared/posix_api.o gcc/boost_regex_debug_shared/regex.o gcc/boost_regex_debug_shared/regex_debug.o gcc/boost_regex_debug_shared/regex_synch.o gcc/boost_regex_debug_shared/w32_regex_traits.o gcc/boost_regex_debug_shared/wide_posix_api.o gcc/boost_regex_debug_shared/winstances.o $(LIBS)
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ C2=-c -g -I../../../
|
||||
|
||||
|
||||
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/instances.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_cstring.hpp ../../../boost/regex/detail/regex_format.hpp ../../../boost/regex/detail/regex_kmp.hpp ../../../boost/regex/detail/regex_library_include.hpp ../../../boost/regex/detail/regex_match.hpp ../../../boost/regex/detail/regex_raw_buffer.hpp ../../../boost/regex/detail/regex_split.hpp ../../../boost/regex/detail/regex_stack.hpp ../../../boost/regex/detail/regex_synch.hpp
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/v3/fileiter.hpp ../../../boost/regex/v3/instances.hpp ../../../boost/regex/v3/regex_compile.hpp ../../../boost/regex/v3/regex_cstring.hpp ../../../boost/regex/v3/regex_format.hpp ../../../boost/regex/v3/regex_kmp.hpp ../../../boost/regex/v3/regex_library_include.hpp ../../../boost/regex/v3/regex_match.hpp ../../../boost/regex/v3/regex_raw_buffer.hpp ../../../boost/regex/v3/regex_split.hpp ../../../boost/regex/v3/regex_stack.hpp ../../../boost/regex/v3/regex_synch.hpp
|
||||
|
||||
all : gcc gcc gcc/boost_regex ./gcc/libboost_regex.a gcc gcc/boost_regex_debug ./gcc/libboost_regex_debug.a
|
||||
|
||||
@ -151,3 +151,4 @@ boost_regex_debug_clean :
|
||||
ar -r gcc/libboost_regex_debug.a gcc/boost_regex_debug/c_regex_traits.o gcc/boost_regex_debug/c_regex_traits_common.o gcc/boost_regex_debug/cpp_regex_traits.o gcc/boost_regex_debug/cregex.o gcc/boost_regex_debug/fileiter.o gcc/boost_regex_debug/instances.o gcc/boost_regex_debug/posix_api.o gcc/boost_regex_debug/regex.o gcc/boost_regex_debug/regex_debug.o gcc/boost_regex_debug/regex_synch.o gcc/boost_regex_debug/w32_regex_traits.o gcc/boost_regex_debug/wide_posix_api.o gcc/boost_regex_debug/winstances.o
|
||||
-ar -s gcc/libboost_regex_debug.a
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@ C1=-c -O2 -I../../../
|
||||
|
||||
|
||||
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/instances.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_cstring.hpp ../../../boost/regex/detail/regex_format.hpp ../../../boost/regex/detail/regex_kmp.hpp ../../../boost/regex/detail/regex_library_include.hpp ../../../boost/regex/detail/regex_match.hpp ../../../boost/regex/detail/regex_raw_buffer.hpp ../../../boost/regex/detail/regex_split.hpp ../../../boost/regex/detail/regex_stack.hpp ../../../boost/regex/detail/regex_synch.hpp
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/v3/fileiter.hpp ../../../boost/regex/v3/instances.hpp ../../../boost/regex/v3/regex_compile.hpp ../../../boost/regex/v3/regex_cstring.hpp ../../../boost/regex/v3/regex_format.hpp ../../../boost/regex/v3/regex_kmp.hpp ../../../boost/regex/v3/regex_library_include.hpp ../../../boost/regex/v3/regex_match.hpp ../../../boost/regex/v3/regex_raw_buffer.hpp ../../../boost/regex/v3/regex_split.hpp ../../../boost/regex/v3/regex_stack.hpp ../../../boost/regex/v3/regex_synch.hpp
|
||||
|
||||
all : $(DIRNAME) $(DIRNAME) $(DIRNAME)/boost_regex ./$(DIRNAME)/libboost_regex.so
|
||||
|
||||
@ -92,3 +92,4 @@ boost_regex_clean :
|
||||
./$(DIRNAME)/libboost_regex.so : $(DIRNAME)/boost_regex/c_regex_traits.o $(DIRNAME)/boost_regex/c_regex_traits_common.o $(DIRNAME)/boost_regex/cpp_regex_traits.o $(DIRNAME)/boost_regex/cregex.o $(DIRNAME)/boost_regex/fileiter.o $(DIRNAME)/boost_regex/instances.o $(DIRNAME)/boost_regex/posix_api.o $(DIRNAME)/boost_regex/regex.o $(DIRNAME)/boost_regex/regex_debug.o $(DIRNAME)/boost_regex/regex_synch.o $(DIRNAME)/boost_regex/w32_regex_traits.o $(DIRNAME)/boost_regex/wide_posix_api.o $(DIRNAME)/boost_regex/winstances.o
|
||||
$(LINKER) $(LDFLAGS) -o $(DIRNAME)/libboost_regex.so $(DIRNAME)/boost_regex/c_regex_traits.o $(DIRNAME)/boost_regex/c_regex_traits_common.o $(DIRNAME)/boost_regex/cpp_regex_traits.o $(DIRNAME)/boost_regex/cregex.o $(DIRNAME)/boost_regex/fileiter.o $(DIRNAME)/boost_regex/instances.o $(DIRNAME)/boost_regex/posix_api.o $(DIRNAME)/boost_regex/regex.o $(DIRNAME)/boost_regex/regex_debug.o $(DIRNAME)/boost_regex/regex_synch.o $(DIRNAME)/boost_regex/w32_regex_traits.o $(DIRNAME)/boost_regex/wide_posix_api.o $(DIRNAME)/boost_regex/winstances.o $(LIBS)
|
||||
|
||||
|
||||
|
@ -34,7 +34,7 @@ SUNWS_CACHE_NAME=SunWS_cache
|
||||
|
||||
|
||||
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/instances.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_cstring.hpp ../../../boost/regex/detail/regex_format.hpp ../../../boost/regex/detail/regex_kmp.hpp ../../../boost/regex/detail/regex_library_include.hpp ../../../boost/regex/detail/regex_match.hpp ../../../boost/regex/detail/regex_raw_buffer.hpp ../../../boost/regex/detail/regex_split.hpp ../../../boost/regex/detail/regex_stack.hpp ../../../boost/regex/detail/regex_synch.hpp
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/v3/fileiter.hpp ../../../boost/regex/v3/instances.hpp ../../../boost/regex/v3/regex_compile.hpp ../../../boost/regex/v3/regex_cstring.hpp ../../../boost/regex/v3/regex_format.hpp ../../../boost/regex/v3/regex_kmp.hpp ../../../boost/regex/v3/regex_library_include.hpp ../../../boost/regex/v3/regex_match.hpp ../../../boost/regex/v3/regex_raw_buffer.hpp ../../../boost/regex/v3/regex_split.hpp ../../../boost/regex/v3/regex_stack.hpp ../../../boost/regex/v3/regex_synch.hpp
|
||||
|
||||
all : sunpro sunpro/libboost_regex$(LIBSUFFIX) sunpro/libboost_regex$(LIBSUFFIX).a sunpro/libboost_regex_mt$(LIBSUFFIX) sunpro/libboost_regex_mt$(LIBSUFFIX).a sunpro/shared_libboost_regex$(LIBSUFFIX) sunpro/libboost_regex$(LIBSUFFIX).so sunpro/shared_libboost_regex_mt$(LIBSUFFIX) sunpro/libboost_regex_mt$(LIBSUFFIX).so
|
||||
|
||||
@ -262,3 +262,4 @@ libboost_regex_mt$(LIBSUFFIX)_clean_shared :
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX).so : sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/c_regex_traits.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/c_regex_traits_common.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/cpp_regex_traits.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/cregex.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/fileiter.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/instances.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/posix_api.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/regex.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/regex_debug.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/regex_synch.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/w32_regex_traits.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/wide_posix_api.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/winstances.o
|
||||
CC -KPIC -O2 -mt -I../../../ -G -o sunpro/libboost_regex_mt$(LIBSUFFIX).so $(LDFLAGS) sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/c_regex_traits.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/c_regex_traits_common.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/cpp_regex_traits.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/cregex.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/fileiter.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/instances.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/posix_api.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/regex.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/regex_debug.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/regex_synch.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/w32_regex_traits.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/wide_posix_api.o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/winstances.o $(LIBS)
|
||||
|
||||
|
||||
|
@ -40,7 +40,7 @@ NULL=nul
|
||||
!ENDIF
|
||||
|
||||
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/instances.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_cstring.hpp ../../../boost/regex/detail/regex_format.hpp ../../../boost/regex/detail/regex_kmp.hpp ../../../boost/regex/detail/regex_library_include.hpp ../../../boost/regex/detail/regex_match.hpp ../../../boost/regex/detail/regex_raw_buffer.hpp ../../../boost/regex/detail/regex_split.hpp ../../../boost/regex/detail/regex_stack.hpp ../../../boost/regex/detail/regex_synch.hpp
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/v3/cregex.hpp ../../../boost/regex/v3/fileiter.hpp ../../../boost/regex/v3/instances.hpp ../../../boost/regex/v3/regex.hpp ../../../boost/regex/v3/regex_compile.hpp ../../../boost/regex/v3/regex_cstring.hpp ../../../boost/regex/v3/regex_format.hpp ../../../boost/regex/v3/regex_fwd.hpp ../../../boost/regex/v3/regex_kmp.hpp ../../../boost/regex/v3/regex_library_include.hpp ../../../boost/regex/v3/regex_match.hpp ../../../boost/regex/v3/regex_raw_buffer.hpp ../../../boost/regex/v3/regex_split.hpp ../../../boost/regex/v3/regex_stack.hpp ../../../boost/regex/v3/regex_synch.hpp ../../../boost/regex/v3/regex_traits.hpp
|
||||
|
||||
all : main_dir boost_regex_vc6-stlport_mss_dir ./vc6-stlport/boost_regex_vc6-stlport_mss.lib boost_regex_vc6-stlport_mssd_dir ./vc6-stlport/boost_regex_vc6-stlport_mssd.lib boost_regex_vc6-stlport_mdid_dir ./vc6-stlport/boost_regex_vc6-stlport_mdid.lib boost_regex_vc6-stlport_mdi_dir ./vc6-stlport/boost_regex_vc6-stlport_mdi.lib boost_regex_vc6-stlport_mds_dir ./vc6-stlport/boost_regex_vc6-stlport_mds.lib boost_regex_vc6-stlport_mdsd_dir ./vc6-stlport/boost_regex_vc6-stlport_mdsd.lib boost_regex_vc6-stlport_mdidd_dir ./vc6-stlport/boost_regex_vc6-stlport_mdidd.lib boost_regex_vc6-stlport_mssdd_dir ./vc6-stlport/boost_regex_vc6-stlport_mssdd.lib boost_regex_vc6-stlport_mdsdd_dir ./vc6-stlport/boost_regex_vc6-stlport_mdsdd.lib
|
||||
|
||||
|
@ -36,7 +36,7 @@ NULL=nul
|
||||
!ENDIF
|
||||
|
||||
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/instances.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_cstring.hpp ../../../boost/regex/detail/regex_format.hpp ../../../boost/regex/detail/regex_kmp.hpp ../../../boost/regex/detail/regex_library_include.hpp ../../../boost/regex/detail/regex_match.hpp ../../../boost/regex/detail/regex_raw_buffer.hpp ../../../boost/regex/detail/regex_split.hpp ../../../boost/regex/detail/regex_stack.hpp ../../../boost/regex/detail/regex_synch.hpp
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/v3/cregex.hpp ../../../boost/regex/v3/fileiter.hpp ../../../boost/regex/v3/instances.hpp ../../../boost/regex/v3/regex.hpp ../../../boost/regex/v3/regex_compile.hpp ../../../boost/regex/v3/regex_cstring.hpp ../../../boost/regex/v3/regex_format.hpp ../../../boost/regex/v3/regex_fwd.hpp ../../../boost/regex/v3/regex_kmp.hpp ../../../boost/regex/v3/regex_library_include.hpp ../../../boost/regex/v3/regex_match.hpp ../../../boost/regex/v3/regex_raw_buffer.hpp ../../../boost/regex/v3/regex_split.hpp ../../../boost/regex/v3/regex_stack.hpp ../../../boost/regex/v3/regex_synch.hpp ../../../boost/regex/v3/regex_traits.hpp
|
||||
|
||||
all : main_dir boost_regex_vc6_sss_dir ./vc6/boost_regex_vc6_sss.lib boost_regex_vc6_mss_dir ./vc6/boost_regex_vc6_mss.lib boost_regex_vc6_sssd_dir ./vc6/boost_regex_vc6_sssd.lib boost_regex_vc6_mssd_dir ./vc6/boost_regex_vc6_mssd.lib boost_regex_vc6_mdid_dir ./vc6/boost_regex_vc6_mdid.lib boost_regex_vc6_mdi_dir ./vc6/boost_regex_vc6_mdi.lib boost_regex_vc6_mds_dir ./vc6/boost_regex_vc6_mds.lib boost_regex_vc6_mdsd_dir ./vc6/boost_regex_vc6_mdsd.lib
|
||||
|
||||
|
576
build/vc7-stlport.mak
Normal file
576
build/vc7-stlport.mak
Normal file
@ -0,0 +1,576 @@
|
||||
#
|
||||
# auto generated makefile for VC6+STLPort
|
||||
#
|
||||
# usage:
|
||||
# make
|
||||
# brings libraries up to date
|
||||
# make install
|
||||
# brings libraries up to date and copies binaries to your VC6 /lib and /bin directories (recomended)
|
||||
#
|
||||
|
||||
#
|
||||
# Add additional compiler options here:
|
||||
#
|
||||
CXXFLAGS=
|
||||
#
|
||||
# Add additional include directories here:
|
||||
#
|
||||
INCLUDES=
|
||||
#
|
||||
# add additional linker flags here:
|
||||
#
|
||||
XLFLAGS=
|
||||
#
|
||||
# add additional static-library creation flags here:
|
||||
#
|
||||
XSFLAGS=
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(MSVCDIR)" == ""
|
||||
!ERROR Variable MSVCDIR not set.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(STLPORT_PATH)" == ""
|
||||
!ERROR Variable STLPORT_PATH not set.
|
||||
!ENDIF
|
||||
|
||||
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/v3/cregex.hpp ../../../boost/regex/v3/fileiter.hpp ../../../boost/regex/v3/instances.hpp ../../../boost/regex/v3/regex.hpp ../../../boost/regex/v3/regex_compile.hpp ../../../boost/regex/v3/regex_cstring.hpp ../../../boost/regex/v3/regex_format.hpp ../../../boost/regex/v3/regex_fwd.hpp ../../../boost/regex/v3/regex_kmp.hpp ../../../boost/regex/v3/regex_library_include.hpp ../../../boost/regex/v3/regex_match.hpp ../../../boost/regex/v3/regex_raw_buffer.hpp ../../../boost/regex/v3/regex_split.hpp ../../../boost/regex/v3/regex_stack.hpp ../../../boost/regex/v3/regex_synch.hpp ../../../boost/regex/v3/regex_traits.hpp
|
||||
|
||||
all : main_dir boost_regex_vc7-stlport_mss_dir ./vc7-stlport/boost_regex_vc7-stlport_mss.lib boost_regex_vc7-stlport_mssd_dir ./vc7-stlport/boost_regex_vc7-stlport_mssd.lib boost_regex_vc7-stlport_mdid_dir ./vc7-stlport/boost_regex_vc7-stlport_mdid.lib boost_regex_vc7-stlport_mdi_dir ./vc7-stlport/boost_regex_vc7-stlport_mdi.lib boost_regex_vc7-stlport_mds_dir ./vc7-stlport/boost_regex_vc7-stlport_mds.lib boost_regex_vc7-stlport_mdsd_dir ./vc7-stlport/boost_regex_vc7-stlport_mdsd.lib boost_regex_vc7-stlport_mdidd_dir ./vc7-stlport/boost_regex_vc7-stlport_mdidd.lib boost_regex_vc7-stlport_mssdd_dir ./vc7-stlport/boost_regex_vc7-stlport_mssdd.lib boost_regex_vc7-stlport_mdsdd_dir ./vc7-stlport/boost_regex_vc7-stlport_mdsdd.lib
|
||||
|
||||
clean : boost_regex_vc7-stlport_mss_clean boost_regex_vc7-stlport_mssd_clean boost_regex_vc7-stlport_mdid_clean boost_regex_vc7-stlport_mdi_clean boost_regex_vc7-stlport_mds_clean boost_regex_vc7-stlport_mdsd_clean boost_regex_vc7-stlport_mdidd_clean boost_regex_vc7-stlport_mssdd_clean boost_regex_vc7-stlport_mdsdd_clean
|
||||
|
||||
install : stlport_check all
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mss.lib "$(MSVCDIR)\lib"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mssd.lib "$(MSVCDIR)\lib"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mdid.lib "$(MSVCDIR)\lib"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mdid.dll "$(MSVCDIR)\bin"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mdi.lib "$(MSVCDIR)\lib"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mdi.dll "$(MSVCDIR)\bin"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mds.lib "$(MSVCDIR)\lib"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mdsd.lib "$(MSVCDIR)\lib"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mdidd.lib "$(MSVCDIR)\lib"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mdidd.dll "$(MSVCDIR)\bin"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mdidd.pdb "$(MSVCDIR)\lib"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mssdd.lib "$(MSVCDIR)\lib"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mssdd.pdb "$(MSVCDIR)\lib"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mdsdd.lib "$(MSVCDIR)\lib"
|
||||
copy vc7-stlport\boost_regex_vc7-stlport_mdsdd.pdb "$(MSVCDIR)\lib"
|
||||
|
||||
main_dir :
|
||||
@if not exist "vc7-stlport\$(NULL)" mkdir vc7-stlport
|
||||
|
||||
stlport_check : $(STLPORT_PATH)\stlport\string
|
||||
echo
|
||||
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc7-stlport_mss.lib
|
||||
#
|
||||
########################################################
|
||||
vc7-stlport/boost_regex_vc7-stlport_mss/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mss/boost_regex_vc7-stlport_mss.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mss/ -Fdvc7-stlport/boost_regex_vc7-stlport_mss.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mss/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mss/boost_regex_vc7-stlport_mss.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mss/ -Fdvc7-stlport/boost_regex_vc7-stlport_mss.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mss/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mss/boost_regex_vc7-stlport_mss.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mss/ -Fdvc7-stlport/boost_regex_vc7-stlport_mss.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mss/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mss/boost_regex_vc7-stlport_mss.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mss/ -Fdvc7-stlport/boost_regex_vc7-stlport_mss.pdb ../src/cregex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mss/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mss/boost_regex_vc7-stlport_mss.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mss/ -Fdvc7-stlport/boost_regex_vc7-stlport_mss.pdb ../src/fileiter.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mss/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mss/boost_regex_vc7-stlport_mss.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mss/ -Fdvc7-stlport/boost_regex_vc7-stlport_mss.pdb ../src/instances.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mss/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mss/boost_regex_vc7-stlport_mss.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mss/ -Fdvc7-stlport/boost_regex_vc7-stlport_mss.pdb ../src/posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mss/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mss/boost_regex_vc7-stlport_mss.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mss/ -Fdvc7-stlport/boost_regex_vc7-stlport_mss.pdb ../src/regex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mss/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mss/boost_regex_vc7-stlport_mss.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mss/ -Fdvc7-stlport/boost_regex_vc7-stlport_mss.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mss/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mss/boost_regex_vc7-stlport_mss.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mss/ -Fdvc7-stlport/boost_regex_vc7-stlport_mss.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mss/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mss/boost_regex_vc7-stlport_mss.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mss/ -Fdvc7-stlport/boost_regex_vc7-stlport_mss.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mss/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mss/boost_regex_vc7-stlport_mss.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mss/ -Fdvc7-stlport/boost_regex_vc7-stlport_mss.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mss/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mss/boost_regex_vc7-stlport_mss.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mss/ -Fdvc7-stlport/boost_regex_vc7-stlport_mss.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc7-stlport_mss_dir :
|
||||
@if not exist "vc7-stlport\boost_regex_vc7-stlport_mss\$(NULL)" mkdir vc7-stlport\boost_regex_vc7-stlport_mss
|
||||
|
||||
boost_regex_vc7-stlport_mss_clean :
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mss\*.obj
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mss\*.idb
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mss\*.exp
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mss\*.pch
|
||||
|
||||
./vc7-stlport/boost_regex_vc7-stlport_mss.lib : vc7-stlport/boost_regex_vc7-stlport_mss/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mss/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mss/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mss/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mss/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mss/instances.obj vc7-stlport/boost_regex_vc7-stlport_mss/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mss/regex.obj vc7-stlport/boost_regex_vc7-stlport_mss/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mss/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mss/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mss/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mss/winstances.obj
|
||||
link -lib /nologo /out:vc7-stlport/boost_regex_vc7-stlport_mss.lib $(XSFLAGS) vc7-stlport/boost_regex_vc7-stlport_mss/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mss/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mss/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mss/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mss/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mss/instances.obj vc7-stlport/boost_regex_vc7-stlport_mss/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mss/regex.obj vc7-stlport/boost_regex_vc7-stlport_mss/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mss/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mss/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mss/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mss/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc7-stlport_mssd.lib
|
||||
#
|
||||
########################################################
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssd/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssd/boost_regex_vc7-stlport_mssd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssd.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssd/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssd/boost_regex_vc7-stlport_mssd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssd.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssd/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssd/boost_regex_vc7-stlport_mssd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssd.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssd/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssd/boost_regex_vc7-stlport_mssd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssd.pdb ../src/cregex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssd/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssd/boost_regex_vc7-stlport_mssd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssd.pdb ../src/fileiter.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssd/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssd/boost_regex_vc7-stlport_mssd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssd.pdb ../src/instances.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssd/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssd/boost_regex_vc7-stlport_mssd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssd.pdb ../src/posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssd/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssd/boost_regex_vc7-stlport_mssd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssd.pdb ../src/regex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssd/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssd/boost_regex_vc7-stlport_mssd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssd.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssd/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssd/boost_regex_vc7-stlport_mssd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssd.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssd/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssd/boost_regex_vc7-stlport_mssd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssd.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssd/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssd/boost_regex_vc7-stlport_mssd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssd.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssd/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssd/boost_regex_vc7-stlport_mssd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssd.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc7-stlport_mssd_dir :
|
||||
@if not exist "vc7-stlport\boost_regex_vc7-stlport_mssd\$(NULL)" mkdir vc7-stlport\boost_regex_vc7-stlport_mssd
|
||||
|
||||
boost_regex_vc7-stlport_mssd_clean :
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mssd\*.obj
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mssd\*.idb
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mssd\*.exp
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mssd\*.pch
|
||||
|
||||
./vc7-stlport/boost_regex_vc7-stlport_mssd.lib : vc7-stlport/boost_regex_vc7-stlport_mssd/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mssd/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mssd/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mssd/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mssd/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mssd/instances.obj vc7-stlport/boost_regex_vc7-stlport_mssd/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mssd/regex.obj vc7-stlport/boost_regex_vc7-stlport_mssd/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mssd/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mssd/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mssd/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mssd/winstances.obj
|
||||
link -lib /nologo /out:vc7-stlport/boost_regex_vc7-stlport_mssd.lib $(XSFLAGS) vc7-stlport/boost_regex_vc7-stlport_mssd/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mssd/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mssd/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mssd/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mssd/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mssd/instances.obj vc7-stlport/boost_regex_vc7-stlport_mssd/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mssd/regex.obj vc7-stlport/boost_regex_vc7-stlport_mssd/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mssd/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mssd/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mssd/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mssd/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc7-stlport_mdid.lib
|
||||
#
|
||||
########################################################
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdid/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdid/boost_regex_vc7-stlport_mdid.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdid/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdid.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdid/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdid/boost_regex_vc7-stlport_mdid.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdid/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdid.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdid/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdid/boost_regex_vc7-stlport_mdid.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdid/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdid.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdid/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdid/boost_regex_vc7-stlport_mdid.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdid/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdid.pdb ../src/cregex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdid/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdid/boost_regex_vc7-stlport_mdid.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdid/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdid.pdb ../src/fileiter.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdid/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdid/boost_regex_vc7-stlport_mdid.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdid/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdid.pdb ../src/instances.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdid/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdid/boost_regex_vc7-stlport_mdid.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdid/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdid.pdb ../src/posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdid/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdid/boost_regex_vc7-stlport_mdid.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdid/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdid.pdb ../src/regex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdid/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdid/boost_regex_vc7-stlport_mdid.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdid/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdid.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdid/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdid/boost_regex_vc7-stlport_mdid.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdid/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdid.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdid/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdid/boost_regex_vc7-stlport_mdid.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdid/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdid.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdid/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdid/boost_regex_vc7-stlport_mdid.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdid/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdid.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdid/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdid/boost_regex_vc7-stlport_mdid.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdid/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdid.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc7-stlport_mdid_dir :
|
||||
@if not exist "vc7-stlport\boost_regex_vc7-stlport_mdid\$(NULL)" mkdir vc7-stlport\boost_regex_vc7-stlport_mdid
|
||||
|
||||
boost_regex_vc7-stlport_mdid_clean :
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdid\*.obj
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdid\*.idb
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdid\*.exp
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdid\*.pch
|
||||
|
||||
./vc7-stlport/boost_regex_vc7-stlport_mdid.lib : vc7-stlport/boost_regex_vc7-stlport_mdid/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdid/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mdid/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdid/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mdid/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mdid/instances.obj vc7-stlport/boost_regex_vc7-stlport_mdid/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdid/regex.obj vc7-stlport/boost_regex_vc7-stlport_mdid/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mdid/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mdid/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdid/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdid/winstances.obj
|
||||
link kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"vc7-stlport/boost_regex_vc7-stlport_mdid.pdb" /debug /machine:I386 /out:"vc7-stlport/boost_regex_vc7-stlport_mdid.dll" /implib:"vc7-stlport/boost_regex_vc7-stlport_mdid.lib" /LIBPATH:$(STLPORT_PATH)\lib $(XLFLAGS) vc7-stlport/boost_regex_vc7-stlport_mdid/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdid/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mdid/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdid/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mdid/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mdid/instances.obj vc7-stlport/boost_regex_vc7-stlport_mdid/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdid/regex.obj vc7-stlport/boost_regex_vc7-stlport_mdid/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mdid/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mdid/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdid/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdid/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc7-stlport_mdi.lib
|
||||
#
|
||||
########################################################
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdi/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdi/boost_regex_vc7-stlport_mdi.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdi/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdi.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdi/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdi/boost_regex_vc7-stlport_mdi.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdi/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdi.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdi/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdi/boost_regex_vc7-stlport_mdi.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdi/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdi.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdi/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdi/boost_regex_vc7-stlport_mdi.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdi/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdi.pdb ../src/cregex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdi/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdi/boost_regex_vc7-stlport_mdi.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdi/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdi.pdb ../src/fileiter.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdi/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdi/boost_regex_vc7-stlport_mdi.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdi/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdi.pdb ../src/instances.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdi/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdi/boost_regex_vc7-stlport_mdi.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdi/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdi.pdb ../src/posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdi/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdi/boost_regex_vc7-stlport_mdi.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdi/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdi.pdb ../src/regex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdi/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdi/boost_regex_vc7-stlport_mdi.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdi/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdi.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdi/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdi/boost_regex_vc7-stlport_mdi.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdi/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdi.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdi/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdi/boost_regex_vc7-stlport_mdi.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdi/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdi.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdi/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdi/boost_regex_vc7-stlport_mdi.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdi/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdi.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdi/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdi/boost_regex_vc7-stlport_mdi.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdi/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdi.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc7-stlport_mdi_dir :
|
||||
@if not exist "vc7-stlport\boost_regex_vc7-stlport_mdi\$(NULL)" mkdir vc7-stlport\boost_regex_vc7-stlport_mdi
|
||||
|
||||
boost_regex_vc7-stlport_mdi_clean :
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdi\*.obj
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdi\*.idb
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdi\*.exp
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdi\*.pch
|
||||
|
||||
./vc7-stlport/boost_regex_vc7-stlport_mdi.lib : vc7-stlport/boost_regex_vc7-stlport_mdi/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdi/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mdi/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdi/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mdi/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mdi/instances.obj vc7-stlport/boost_regex_vc7-stlport_mdi/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdi/regex.obj vc7-stlport/boost_regex_vc7-stlport_mdi/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mdi/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mdi/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdi/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdi/winstances.obj
|
||||
link kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"vc7-stlport/boost_regex_vc7-stlport_mdi.pdb" /debug /machine:I386 /out:"vc7-stlport/boost_regex_vc7-stlport_mdi.dll" /implib:"vc7-stlport/boost_regex_vc7-stlport_mdi.lib" /LIBPATH:$(STLPORT_PATH)\lib $(XLFLAGS) vc7-stlport/boost_regex_vc7-stlport_mdi/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdi/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mdi/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdi/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mdi/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mdi/instances.obj vc7-stlport/boost_regex_vc7-stlport_mdi/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdi/regex.obj vc7-stlport/boost_regex_vc7-stlport_mdi/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mdi/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mdi/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdi/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdi/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc7-stlport_mds.lib
|
||||
#
|
||||
########################################################
|
||||
vc7-stlport/boost_regex_vc7-stlport_mds/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mds/boost_regex_vc7-stlport_mds.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mds/ -Fdvc7-stlport/boost_regex_vc7-stlport_mds.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mds/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mds/boost_regex_vc7-stlport_mds.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mds/ -Fdvc7-stlport/boost_regex_vc7-stlport_mds.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mds/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mds/boost_regex_vc7-stlport_mds.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mds/ -Fdvc7-stlport/boost_regex_vc7-stlport_mds.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mds/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mds/boost_regex_vc7-stlport_mds.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mds/ -Fdvc7-stlport/boost_regex_vc7-stlport_mds.pdb ../src/cregex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mds/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mds/boost_regex_vc7-stlport_mds.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mds/ -Fdvc7-stlport/boost_regex_vc7-stlport_mds.pdb ../src/fileiter.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mds/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mds/boost_regex_vc7-stlport_mds.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mds/ -Fdvc7-stlport/boost_regex_vc7-stlport_mds.pdb ../src/instances.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mds/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mds/boost_regex_vc7-stlport_mds.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mds/ -Fdvc7-stlport/boost_regex_vc7-stlport_mds.pdb ../src/posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mds/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mds/boost_regex_vc7-stlport_mds.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mds/ -Fdvc7-stlport/boost_regex_vc7-stlport_mds.pdb ../src/regex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mds/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mds/boost_regex_vc7-stlport_mds.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mds/ -Fdvc7-stlport/boost_regex_vc7-stlport_mds.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mds/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mds/boost_regex_vc7-stlport_mds.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mds/ -Fdvc7-stlport/boost_regex_vc7-stlport_mds.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mds/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mds/boost_regex_vc7-stlport_mds.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mds/ -Fdvc7-stlport/boost_regex_vc7-stlport_mds.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mds/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mds/boost_regex_vc7-stlport_mds.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mds/ -Fdvc7-stlport/boost_regex_vc7-stlport_mds.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mds/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mds/boost_regex_vc7-stlport_mds.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mds/ -Fdvc7-stlport/boost_regex_vc7-stlport_mds.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc7-stlport_mds_dir :
|
||||
@if not exist "vc7-stlport\boost_regex_vc7-stlport_mds\$(NULL)" mkdir vc7-stlport\boost_regex_vc7-stlport_mds
|
||||
|
||||
boost_regex_vc7-stlport_mds_clean :
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mds\*.obj
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mds\*.idb
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mds\*.exp
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mds\*.pch
|
||||
|
||||
./vc7-stlport/boost_regex_vc7-stlport_mds.lib : vc7-stlport/boost_regex_vc7-stlport_mds/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mds/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mds/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mds/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mds/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mds/instances.obj vc7-stlport/boost_regex_vc7-stlport_mds/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mds/regex.obj vc7-stlport/boost_regex_vc7-stlport_mds/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mds/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mds/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mds/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mds/winstances.obj
|
||||
link -lib /nologo /out:vc7-stlport/boost_regex_vc7-stlport_mds.lib $(XSFLAGS) vc7-stlport/boost_regex_vc7-stlport_mds/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mds/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mds/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mds/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mds/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mds/instances.obj vc7-stlport/boost_regex_vc7-stlport_mds/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mds/regex.obj vc7-stlport/boost_regex_vc7-stlport_mds/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mds/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mds/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mds/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mds/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc7-stlport_mdsd.lib
|
||||
#
|
||||
########################################################
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsd/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsd/boost_regex_vc7-stlport_mdsd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsd.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsd/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsd/boost_regex_vc7-stlport_mdsd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsd.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsd/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsd/boost_regex_vc7-stlport_mdsd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsd.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsd/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsd/boost_regex_vc7-stlport_mdsd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsd.pdb ../src/cregex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsd/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsd/boost_regex_vc7-stlport_mdsd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsd.pdb ../src/fileiter.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsd/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsd/boost_regex_vc7-stlport_mdsd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsd.pdb ../src/instances.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsd/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsd/boost_regex_vc7-stlport_mdsd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsd.pdb ../src/posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsd/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsd/boost_regex_vc7-stlport_mdsd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsd.pdb ../src/regex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsd/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsd/boost_regex_vc7-stlport_mdsd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsd.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsd/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsd/boost_regex_vc7-stlport_mdsd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsd.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsd/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsd/boost_regex_vc7-stlport_mdsd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsd.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsd/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsd/boost_regex_vc7-stlport_mdsd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsd.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsd/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsd/boost_regex_vc7-stlport_mdsd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsd.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc7-stlport_mdsd_dir :
|
||||
@if not exist "vc7-stlport\boost_regex_vc7-stlport_mdsd\$(NULL)" mkdir vc7-stlport\boost_regex_vc7-stlport_mdsd
|
||||
|
||||
boost_regex_vc7-stlport_mdsd_clean :
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdsd\*.obj
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdsd\*.idb
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdsd\*.exp
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdsd\*.pch
|
||||
|
||||
./vc7-stlport/boost_regex_vc7-stlport_mdsd.lib : vc7-stlport/boost_regex_vc7-stlport_mdsd/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/instances.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/regex.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/winstances.obj
|
||||
link -lib /nologo /out:vc7-stlport/boost_regex_vc7-stlport_mdsd.lib $(XSFLAGS) vc7-stlport/boost_regex_vc7-stlport_mdsd/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/instances.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/regex.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdsd/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc7-stlport_mdidd.lib
|
||||
#
|
||||
########################################################
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdidd/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdidd/boost_regex_vc7-stlport_mdidd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdidd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdidd.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdidd/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdidd/boost_regex_vc7-stlport_mdidd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdidd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdidd.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdidd/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdidd/boost_regex_vc7-stlport_mdidd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdidd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdidd.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdidd/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdidd/boost_regex_vc7-stlport_mdidd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdidd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdidd.pdb ../src/cregex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdidd/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdidd/boost_regex_vc7-stlport_mdidd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdidd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdidd.pdb ../src/fileiter.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdidd/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdidd/boost_regex_vc7-stlport_mdidd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdidd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdidd.pdb ../src/instances.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdidd/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdidd/boost_regex_vc7-stlport_mdidd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdidd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdidd.pdb ../src/posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdidd/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdidd/boost_regex_vc7-stlport_mdidd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdidd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdidd.pdb ../src/regex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdidd/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdidd/boost_regex_vc7-stlport_mdidd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdidd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdidd.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdidd/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdidd/boost_regex_vc7-stlport_mdidd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdidd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdidd.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdidd/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdidd/boost_regex_vc7-stlport_mdidd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdidd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdidd.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdidd/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdidd/boost_regex_vc7-stlport_mdidd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdidd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdidd.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdidd/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdidd/boost_regex_vc7-stlport_mdidd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdidd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdidd.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc7-stlport_mdidd_dir :
|
||||
@if not exist "vc7-stlport\boost_regex_vc7-stlport_mdidd\$(NULL)" mkdir vc7-stlport\boost_regex_vc7-stlport_mdidd
|
||||
|
||||
boost_regex_vc7-stlport_mdidd_clean :
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdidd\*.obj
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdidd\*.idb
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdidd\*.exp
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdidd\*.pch
|
||||
|
||||
./vc7-stlport/boost_regex_vc7-stlport_mdidd.lib : vc7-stlport/boost_regex_vc7-stlport_mdidd/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/instances.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/regex.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/winstances.obj
|
||||
link kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"vc7-stlport/boost_regex_vc7-stlport_mdidd.pdb" /debug /machine:I386 /out:"vc7-stlport/boost_regex_vc7-stlport_mdidd.dll" /implib:"vc7-stlport/boost_regex_vc7-stlport_mdidd.lib" /LIBPATH:$(STLPORT_PATH)\lib $(XLFLAGS) vc7-stlport/boost_regex_vc7-stlport_mdidd/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/instances.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/regex.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdidd/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc7-stlport_mssdd.lib
|
||||
#
|
||||
########################################################
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssdd/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssdd/boost_regex_vc7-stlport_mssdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssdd.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssdd/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssdd/boost_regex_vc7-stlport_mssdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssdd.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssdd/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssdd/boost_regex_vc7-stlport_mssdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssdd.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssdd/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssdd/boost_regex_vc7-stlport_mssdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssdd.pdb ../src/cregex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssdd/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssdd/boost_regex_vc7-stlport_mssdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssdd.pdb ../src/fileiter.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssdd/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssdd/boost_regex_vc7-stlport_mssdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssdd.pdb ../src/instances.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssdd/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssdd/boost_regex_vc7-stlport_mssdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssdd.pdb ../src/posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssdd/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssdd/boost_regex_vc7-stlport_mssdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssdd.pdb ../src/regex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssdd/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssdd/boost_regex_vc7-stlport_mssdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssdd.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssdd/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssdd/boost_regex_vc7-stlport_mssdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssdd.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssdd/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssdd/boost_regex_vc7-stlport_mssdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssdd.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssdd/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssdd/boost_regex_vc7-stlport_mssdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssdd.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mssdd/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mssdd/boost_regex_vc7-stlport_mssdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mssdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mssdd.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc7-stlport_mssdd_dir :
|
||||
@if not exist "vc7-stlport\boost_regex_vc7-stlport_mssdd\$(NULL)" mkdir vc7-stlport\boost_regex_vc7-stlport_mssdd
|
||||
|
||||
boost_regex_vc7-stlport_mssdd_clean :
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mssdd\*.obj
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mssdd\*.idb
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mssdd\*.exp
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mssdd\*.pch
|
||||
|
||||
./vc7-stlport/boost_regex_vc7-stlport_mssdd.lib : vc7-stlport/boost_regex_vc7-stlport_mssdd/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/instances.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/regex.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/winstances.obj
|
||||
link -lib /nologo /out:vc7-stlport/boost_regex_vc7-stlport_mssdd.lib $(XSFLAGS) vc7-stlport/boost_regex_vc7-stlport_mssdd/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/instances.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/regex.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mssdd/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc7-stlport_mdsdd.lib
|
||||
#
|
||||
########################################################
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsdd/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsdd/boost_regex_vc7-stlport_mdsdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsdd.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsdd/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsdd/boost_regex_vc7-stlport_mdsdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsdd.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsdd/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsdd/boost_regex_vc7-stlport_mdsdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsdd.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsdd/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsdd/boost_regex_vc7-stlport_mdsdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsdd.pdb ../src/cregex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsdd/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsdd/boost_regex_vc7-stlport_mdsdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsdd.pdb ../src/fileiter.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsdd/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsdd/boost_regex_vc7-stlport_mdsdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsdd.pdb ../src/instances.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsdd/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsdd/boost_regex_vc7-stlport_mdsdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsdd.pdb ../src/posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsdd/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsdd/boost_regex_vc7-stlport_mdsdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsdd.pdb ../src/regex.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsdd/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsdd/boost_regex_vc7-stlport_mdsdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsdd.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsdd/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsdd/boost_regex_vc7-stlport_mdsdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsdd.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsdd/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsdd/boost_regex_vc7-stlport_mdsdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsdd.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsdd/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsdd/boost_regex_vc7-stlport_mdsdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsdd.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc7-stlport/boost_regex_vc7-stlport_mdsdd/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc7-stlport/boost_regex_vc7-stlport_mdsdd/boost_regex_vc7-stlport_mdsdd.pch -Fo./vc7-stlport/boost_regex_vc7-stlport_mdsdd/ -Fdvc7-stlport/boost_regex_vc7-stlport_mdsdd.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc7-stlport_mdsdd_dir :
|
||||
@if not exist "vc7-stlport\boost_regex_vc7-stlport_mdsdd\$(NULL)" mkdir vc7-stlport\boost_regex_vc7-stlport_mdsdd
|
||||
|
||||
boost_regex_vc7-stlport_mdsdd_clean :
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdsdd\*.obj
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdsdd\*.idb
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdsdd\*.exp
|
||||
del vc7-stlport\boost_regex_vc7-stlport_mdsdd\*.pch
|
||||
|
||||
./vc7-stlport/boost_regex_vc7-stlport_mdsdd.lib : vc7-stlport/boost_regex_vc7-stlport_mdsdd/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/instances.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/regex.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/winstances.obj
|
||||
link -lib /nologo /out:vc7-stlport/boost_regex_vc7-stlport_mdsdd.lib $(XSFLAGS) vc7-stlport/boost_regex_vc7-stlport_mdsdd/c_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/c_regex_traits_common.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/cpp_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/cregex.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/fileiter.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/instances.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/regex.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/regex_debug.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/regex_synch.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/w32_regex_traits.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/wide_posix_api.obj vc7-stlport/boost_regex_vc7-stlport_mdsdd/winstances.obj
|
||||
|
@ -36,7 +36,7 @@ NULL=nul
|
||||
!ENDIF
|
||||
|
||||
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/instances.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_cstring.hpp ../../../boost/regex/detail/regex_format.hpp ../../../boost/regex/detail/regex_kmp.hpp ../../../boost/regex/detail/regex_library_include.hpp ../../../boost/regex/detail/regex_match.hpp ../../../boost/regex/detail/regex_raw_buffer.hpp ../../../boost/regex/detail/regex_split.hpp ../../../boost/regex/detail/regex_stack.hpp ../../../boost/regex/detail/regex_synch.hpp
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/v3/cregex.hpp ../../../boost/regex/v3/fileiter.hpp ../../../boost/regex/v3/instances.hpp ../../../boost/regex/v3/regex.hpp ../../../boost/regex/v3/regex_compile.hpp ../../../boost/regex/v3/regex_cstring.hpp ../../../boost/regex/v3/regex_format.hpp ../../../boost/regex/v3/regex_fwd.hpp ../../../boost/regex/v3/regex_kmp.hpp ../../../boost/regex/v3/regex_library_include.hpp ../../../boost/regex/v3/regex_match.hpp ../../../boost/regex/v3/regex_raw_buffer.hpp ../../../boost/regex/v3/regex_split.hpp ../../../boost/regex/v3/regex_stack.hpp ../../../boost/regex/v3/regex_synch.hpp ../../../boost/regex/v3/regex_traits.hpp
|
||||
|
||||
all : main_dir boost_regex_vc7_sss_dir ./vc7/boost_regex_vc7_sss.lib boost_regex_vc7_mss_dir ./vc7/boost_regex_vc7_mss.lib boost_regex_vc7_sssd_dir ./vc7/boost_regex_vc7_sssd.lib boost_regex_vc7_mssd_dir ./vc7/boost_regex_vc7_mssd.lib boost_regex_vc7_mdid_dir ./vc7/boost_regex_vc7_mdid.lib boost_regex_vc7_mdi_dir ./vc7/boost_regex_vc7_mdi.lib boost_regex_vc7_mds_dir ./vc7/boost_regex_vc7_mds.lib boost_regex_vc7_mdsd_dir ./vc7/boost_regex_vc7_mdsd.lib
|
||||
|
||||
|
576
build/vc71-stlport.mak
Normal file
576
build/vc71-stlport.mak
Normal file
@ -0,0 +1,576 @@
|
||||
#
|
||||
# auto generated makefile for VC6+STLPort
|
||||
#
|
||||
# usage:
|
||||
# make
|
||||
# brings libraries up to date
|
||||
# make install
|
||||
# brings libraries up to date and copies binaries to your VC6 /lib and /bin directories (recomended)
|
||||
#
|
||||
|
||||
#
|
||||
# Add additional compiler options here:
|
||||
#
|
||||
CXXFLAGS=
|
||||
#
|
||||
# Add additional include directories here:
|
||||
#
|
||||
INCLUDES=
|
||||
#
|
||||
# add additional linker flags here:
|
||||
#
|
||||
XLFLAGS=
|
||||
#
|
||||
# add additional static-library creation flags here:
|
||||
#
|
||||
XSFLAGS=
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(MSVCDIR)" == ""
|
||||
!ERROR Variable MSVCDIR not set.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(STLPORT_PATH)" == ""
|
||||
!ERROR Variable STLPORT_PATH not set.
|
||||
!ENDIF
|
||||
|
||||
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/v3/cregex.hpp ../../../boost/regex/v3/fileiter.hpp ../../../boost/regex/v3/instances.hpp ../../../boost/regex/v3/regex.hpp ../../../boost/regex/v3/regex_compile.hpp ../../../boost/regex/v3/regex_cstring.hpp ../../../boost/regex/v3/regex_format.hpp ../../../boost/regex/v3/regex_fwd.hpp ../../../boost/regex/v3/regex_kmp.hpp ../../../boost/regex/v3/regex_library_include.hpp ../../../boost/regex/v3/regex_match.hpp ../../../boost/regex/v3/regex_raw_buffer.hpp ../../../boost/regex/v3/regex_split.hpp ../../../boost/regex/v3/regex_stack.hpp ../../../boost/regex/v3/regex_synch.hpp ../../../boost/regex/v3/regex_traits.hpp
|
||||
|
||||
all : main_dir boost_regex_vc71-stlport_mss_dir ./vc71-stlport/boost_regex_vc71-stlport_mss.lib boost_regex_vc71-stlport_mssd_dir ./vc71-stlport/boost_regex_vc71-stlport_mssd.lib boost_regex_vc71-stlport_mdid_dir ./vc71-stlport/boost_regex_vc71-stlport_mdid.lib boost_regex_vc71-stlport_mdi_dir ./vc71-stlport/boost_regex_vc71-stlport_mdi.lib boost_regex_vc71-stlport_mds_dir ./vc71-stlport/boost_regex_vc71-stlport_mds.lib boost_regex_vc71-stlport_mdsd_dir ./vc71-stlport/boost_regex_vc71-stlport_mdsd.lib boost_regex_vc71-stlport_mdidd_dir ./vc71-stlport/boost_regex_vc71-stlport_mdidd.lib boost_regex_vc71-stlport_mssdd_dir ./vc71-stlport/boost_regex_vc71-stlport_mssdd.lib boost_regex_vc71-stlport_mdsdd_dir ./vc71-stlport/boost_regex_vc71-stlport_mdsdd.lib
|
||||
|
||||
clean : boost_regex_vc71-stlport_mss_clean boost_regex_vc71-stlport_mssd_clean boost_regex_vc71-stlport_mdid_clean boost_regex_vc71-stlport_mdi_clean boost_regex_vc71-stlport_mds_clean boost_regex_vc71-stlport_mdsd_clean boost_regex_vc71-stlport_mdidd_clean boost_regex_vc71-stlport_mssdd_clean boost_regex_vc71-stlport_mdsdd_clean
|
||||
|
||||
install : stlport_check all
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mss.lib "$(MSVCDIR)\lib"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mssd.lib "$(MSVCDIR)\lib"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mdid.lib "$(MSVCDIR)\lib"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mdid.dll "$(MSVCDIR)\bin"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mdi.lib "$(MSVCDIR)\lib"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mdi.dll "$(MSVCDIR)\bin"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mds.lib "$(MSVCDIR)\lib"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mdsd.lib "$(MSVCDIR)\lib"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mdidd.lib "$(MSVCDIR)\lib"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mdidd.dll "$(MSVCDIR)\bin"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mdidd.pdb "$(MSVCDIR)\lib"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mssdd.lib "$(MSVCDIR)\lib"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mssdd.pdb "$(MSVCDIR)\lib"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mdsdd.lib "$(MSVCDIR)\lib"
|
||||
copy vc71-stlport\boost_regex_vc71-stlport_mdsdd.pdb "$(MSVCDIR)\lib"
|
||||
|
||||
main_dir :
|
||||
@if not exist "vc71-stlport\$(NULL)" mkdir vc71-stlport
|
||||
|
||||
stlport_check : $(STLPORT_PATH)\stlport\string
|
||||
echo
|
||||
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71-stlport_mss.lib
|
||||
#
|
||||
########################################################
|
||||
vc71-stlport/boost_regex_vc71-stlport_mss/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mss/boost_regex_vc71-stlport_mss.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mss/ -Fdvc71-stlport/boost_regex_vc71-stlport_mss.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mss/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mss/boost_regex_vc71-stlport_mss.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mss/ -Fdvc71-stlport/boost_regex_vc71-stlport_mss.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mss/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mss/boost_regex_vc71-stlport_mss.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mss/ -Fdvc71-stlport/boost_regex_vc71-stlport_mss.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mss/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mss/boost_regex_vc71-stlport_mss.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mss/ -Fdvc71-stlport/boost_regex_vc71-stlport_mss.pdb ../src/cregex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mss/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mss/boost_regex_vc71-stlport_mss.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mss/ -Fdvc71-stlport/boost_regex_vc71-stlport_mss.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mss/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mss/boost_regex_vc71-stlport_mss.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mss/ -Fdvc71-stlport/boost_regex_vc71-stlport_mss.pdb ../src/instances.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mss/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mss/boost_regex_vc71-stlport_mss.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mss/ -Fdvc71-stlport/boost_regex_vc71-stlport_mss.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mss/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mss/boost_regex_vc71-stlport_mss.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mss/ -Fdvc71-stlport/boost_regex_vc71-stlport_mss.pdb ../src/regex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mss/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mss/boost_regex_vc71-stlport_mss.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mss/ -Fdvc71-stlport/boost_regex_vc71-stlport_mss.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mss/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mss/boost_regex_vc71-stlport_mss.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mss/ -Fdvc71-stlport/boost_regex_vc71-stlport_mss.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mss/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mss/boost_regex_vc71-stlport_mss.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mss/ -Fdvc71-stlport/boost_regex_vc71-stlport_mss.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mss/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mss/boost_regex_vc71-stlport_mss.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mss/ -Fdvc71-stlport/boost_regex_vc71-stlport_mss.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mss/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mss/boost_regex_vc71-stlport_mss.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mss/ -Fdvc71-stlport/boost_regex_vc71-stlport_mss.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71-stlport_mss_dir :
|
||||
@if not exist "vc71-stlport\boost_regex_vc71-stlport_mss\$(NULL)" mkdir vc71-stlport\boost_regex_vc71-stlport_mss
|
||||
|
||||
boost_regex_vc71-stlport_mss_clean :
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mss\*.obj
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mss\*.idb
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mss\*.exp
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mss\*.pch
|
||||
|
||||
./vc71-stlport/boost_regex_vc71-stlport_mss.lib : vc71-stlport/boost_regex_vc71-stlport_mss/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mss/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mss/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mss/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mss/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mss/instances.obj vc71-stlport/boost_regex_vc71-stlport_mss/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mss/regex.obj vc71-stlport/boost_regex_vc71-stlport_mss/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mss/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mss/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mss/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mss/winstances.obj
|
||||
link -lib /nologo /out:vc71-stlport/boost_regex_vc71-stlport_mss.lib $(XSFLAGS) vc71-stlport/boost_regex_vc71-stlport_mss/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mss/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mss/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mss/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mss/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mss/instances.obj vc71-stlport/boost_regex_vc71-stlport_mss/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mss/regex.obj vc71-stlport/boost_regex_vc71-stlport_mss/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mss/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mss/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mss/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mss/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71-stlport_mssd.lib
|
||||
#
|
||||
########################################################
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssd/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssd/boost_regex_vc71-stlport_mssd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssd.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssd/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssd/boost_regex_vc71-stlport_mssd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssd.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssd/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssd/boost_regex_vc71-stlport_mssd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssd.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssd/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssd/boost_regex_vc71-stlport_mssd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssd.pdb ../src/cregex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssd/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssd/boost_regex_vc71-stlport_mssd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssd.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssd/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssd/boost_regex_vc71-stlport_mssd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssd.pdb ../src/instances.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssd/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssd/boost_regex_vc71-stlport_mssd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssd.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssd/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssd/boost_regex_vc71-stlport_mssd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssd.pdb ../src/regex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssd/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssd/boost_regex_vc71-stlport_mssd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssd.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssd/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssd/boost_regex_vc71-stlport_mssd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssd.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssd/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssd/boost_regex_vc71-stlport_mssd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssd.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssd/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssd/boost_regex_vc71-stlport_mssd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssd.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssd/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssd/boost_regex_vc71-stlport_mssd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssd.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71-stlport_mssd_dir :
|
||||
@if not exist "vc71-stlport\boost_regex_vc71-stlport_mssd\$(NULL)" mkdir vc71-stlport\boost_regex_vc71-stlport_mssd
|
||||
|
||||
boost_regex_vc71-stlport_mssd_clean :
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mssd\*.obj
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mssd\*.idb
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mssd\*.exp
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mssd\*.pch
|
||||
|
||||
./vc71-stlport/boost_regex_vc71-stlport_mssd.lib : vc71-stlport/boost_regex_vc71-stlport_mssd/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mssd/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mssd/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mssd/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mssd/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mssd/instances.obj vc71-stlport/boost_regex_vc71-stlport_mssd/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mssd/regex.obj vc71-stlport/boost_regex_vc71-stlport_mssd/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mssd/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mssd/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mssd/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mssd/winstances.obj
|
||||
link -lib /nologo /out:vc71-stlport/boost_regex_vc71-stlport_mssd.lib $(XSFLAGS) vc71-stlport/boost_regex_vc71-stlport_mssd/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mssd/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mssd/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mssd/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mssd/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mssd/instances.obj vc71-stlport/boost_regex_vc71-stlport_mssd/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mssd/regex.obj vc71-stlport/boost_regex_vc71-stlport_mssd/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mssd/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mssd/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mssd/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mssd/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71-stlport_mdid.lib
|
||||
#
|
||||
########################################################
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdid/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdid/boost_regex_vc71-stlport_mdid.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdid/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdid.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdid/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdid/boost_regex_vc71-stlport_mdid.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdid/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdid.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdid/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdid/boost_regex_vc71-stlport_mdid.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdid/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdid.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdid/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdid/boost_regex_vc71-stlport_mdid.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdid/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdid.pdb ../src/cregex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdid/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdid/boost_regex_vc71-stlport_mdid.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdid/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdid.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdid/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdid/boost_regex_vc71-stlport_mdid.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdid/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdid.pdb ../src/instances.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdid/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdid/boost_regex_vc71-stlport_mdid.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdid/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdid.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdid/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdid/boost_regex_vc71-stlport_mdid.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdid/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdid.pdb ../src/regex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdid/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdid/boost_regex_vc71-stlport_mdid.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdid/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdid.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdid/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdid/boost_regex_vc71-stlport_mdid.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdid/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdid.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdid/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdid/boost_regex_vc71-stlport_mdid.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdid/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdid.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdid/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdid/boost_regex_vc71-stlport_mdid.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdid/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdid.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdid/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdid/boost_regex_vc71-stlport_mdid.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdid/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdid.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71-stlport_mdid_dir :
|
||||
@if not exist "vc71-stlport\boost_regex_vc71-stlport_mdid\$(NULL)" mkdir vc71-stlport\boost_regex_vc71-stlport_mdid
|
||||
|
||||
boost_regex_vc71-stlport_mdid_clean :
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdid\*.obj
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdid\*.idb
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdid\*.exp
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdid\*.pch
|
||||
|
||||
./vc71-stlport/boost_regex_vc71-stlport_mdid.lib : vc71-stlport/boost_regex_vc71-stlport_mdid/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdid/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mdid/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdid/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mdid/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mdid/instances.obj vc71-stlport/boost_regex_vc71-stlport_mdid/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdid/regex.obj vc71-stlport/boost_regex_vc71-stlport_mdid/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mdid/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mdid/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdid/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdid/winstances.obj
|
||||
link kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"vc71-stlport/boost_regex_vc71-stlport_mdid.pdb" /debug /machine:I386 /out:"vc71-stlport/boost_regex_vc71-stlport_mdid.dll" /implib:"vc71-stlport/boost_regex_vc71-stlport_mdid.lib" /LIBPATH:$(STLPORT_PATH)\lib $(XLFLAGS) vc71-stlport/boost_regex_vc71-stlport_mdid/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdid/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mdid/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdid/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mdid/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mdid/instances.obj vc71-stlport/boost_regex_vc71-stlport_mdid/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdid/regex.obj vc71-stlport/boost_regex_vc71-stlport_mdid/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mdid/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mdid/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdid/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdid/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71-stlport_mdi.lib
|
||||
#
|
||||
########################################################
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdi/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdi/boost_regex_vc71-stlport_mdi.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdi/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdi.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdi/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdi/boost_regex_vc71-stlport_mdi.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdi/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdi.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdi/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdi/boost_regex_vc71-stlport_mdi.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdi/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdi.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdi/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdi/boost_regex_vc71-stlport_mdi.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdi/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdi.pdb ../src/cregex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdi/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdi/boost_regex_vc71-stlport_mdi.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdi/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdi.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdi/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdi/boost_regex_vc71-stlport_mdi.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdi/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdi.pdb ../src/instances.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdi/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdi/boost_regex_vc71-stlport_mdi.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdi/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdi.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdi/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdi/boost_regex_vc71-stlport_mdi.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdi/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdi.pdb ../src/regex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdi/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdi/boost_regex_vc71-stlport_mdi.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdi/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdi.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdi/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdi/boost_regex_vc71-stlport_mdi.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdi/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdi.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdi/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdi/boost_regex_vc71-stlport_mdi.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdi/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdi.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdi/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdi/boost_regex_vc71-stlport_mdi.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdi/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdi.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdi/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /I$(STLPORT_PATH)\stlport /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdi/boost_regex_vc71-stlport_mdi.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdi/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdi.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71-stlport_mdi_dir :
|
||||
@if not exist "vc71-stlport\boost_regex_vc71-stlport_mdi\$(NULL)" mkdir vc71-stlport\boost_regex_vc71-stlport_mdi
|
||||
|
||||
boost_regex_vc71-stlport_mdi_clean :
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdi\*.obj
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdi\*.idb
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdi\*.exp
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdi\*.pch
|
||||
|
||||
./vc71-stlport/boost_regex_vc71-stlport_mdi.lib : vc71-stlport/boost_regex_vc71-stlport_mdi/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdi/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mdi/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdi/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mdi/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mdi/instances.obj vc71-stlport/boost_regex_vc71-stlport_mdi/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdi/regex.obj vc71-stlport/boost_regex_vc71-stlport_mdi/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mdi/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mdi/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdi/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdi/winstances.obj
|
||||
link kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"vc71-stlport/boost_regex_vc71-stlport_mdi.pdb" /debug /machine:I386 /out:"vc71-stlport/boost_regex_vc71-stlport_mdi.dll" /implib:"vc71-stlport/boost_regex_vc71-stlport_mdi.lib" /LIBPATH:$(STLPORT_PATH)\lib $(XLFLAGS) vc71-stlport/boost_regex_vc71-stlport_mdi/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdi/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mdi/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdi/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mdi/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mdi/instances.obj vc71-stlport/boost_regex_vc71-stlport_mdi/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdi/regex.obj vc71-stlport/boost_regex_vc71-stlport_mdi/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mdi/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mdi/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdi/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdi/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71-stlport_mds.lib
|
||||
#
|
||||
########################################################
|
||||
vc71-stlport/boost_regex_vc71-stlport_mds/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mds/boost_regex_vc71-stlport_mds.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mds/ -Fdvc71-stlport/boost_regex_vc71-stlport_mds.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mds/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mds/boost_regex_vc71-stlport_mds.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mds/ -Fdvc71-stlport/boost_regex_vc71-stlport_mds.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mds/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mds/boost_regex_vc71-stlport_mds.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mds/ -Fdvc71-stlport/boost_regex_vc71-stlport_mds.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mds/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mds/boost_regex_vc71-stlport_mds.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mds/ -Fdvc71-stlport/boost_regex_vc71-stlport_mds.pdb ../src/cregex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mds/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mds/boost_regex_vc71-stlport_mds.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mds/ -Fdvc71-stlport/boost_regex_vc71-stlport_mds.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mds/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mds/boost_regex_vc71-stlport_mds.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mds/ -Fdvc71-stlport/boost_regex_vc71-stlport_mds.pdb ../src/instances.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mds/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mds/boost_regex_vc71-stlport_mds.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mds/ -Fdvc71-stlport/boost_regex_vc71-stlport_mds.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mds/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mds/boost_regex_vc71-stlport_mds.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mds/ -Fdvc71-stlport/boost_regex_vc71-stlport_mds.pdb ../src/regex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mds/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mds/boost_regex_vc71-stlport_mds.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mds/ -Fdvc71-stlport/boost_regex_vc71-stlport_mds.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mds/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mds/boost_regex_vc71-stlport_mds.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mds/ -Fdvc71-stlport/boost_regex_vc71-stlport_mds.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mds/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mds/boost_regex_vc71-stlport_mds.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mds/ -Fdvc71-stlport/boost_regex_vc71-stlport_mds.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mds/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mds/boost_regex_vc71-stlport_mds.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mds/ -Fdvc71-stlport/boost_regex_vc71-stlport_mds.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mds/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mds/boost_regex_vc71-stlport_mds.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mds/ -Fdvc71-stlport/boost_regex_vc71-stlport_mds.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71-stlport_mds_dir :
|
||||
@if not exist "vc71-stlport\boost_regex_vc71-stlport_mds\$(NULL)" mkdir vc71-stlport\boost_regex_vc71-stlport_mds
|
||||
|
||||
boost_regex_vc71-stlport_mds_clean :
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mds\*.obj
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mds\*.idb
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mds\*.exp
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mds\*.pch
|
||||
|
||||
./vc71-stlport/boost_regex_vc71-stlport_mds.lib : vc71-stlport/boost_regex_vc71-stlport_mds/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mds/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mds/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mds/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mds/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mds/instances.obj vc71-stlport/boost_regex_vc71-stlport_mds/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mds/regex.obj vc71-stlport/boost_regex_vc71-stlport_mds/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mds/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mds/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mds/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mds/winstances.obj
|
||||
link -lib /nologo /out:vc71-stlport/boost_regex_vc71-stlport_mds.lib $(XSFLAGS) vc71-stlport/boost_regex_vc71-stlport_mds/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mds/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mds/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mds/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mds/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mds/instances.obj vc71-stlport/boost_regex_vc71-stlport_mds/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mds/regex.obj vc71-stlport/boost_regex_vc71-stlport_mds/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mds/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mds/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mds/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mds/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71-stlport_mdsd.lib
|
||||
#
|
||||
########################################################
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsd/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsd/boost_regex_vc71-stlport_mdsd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsd.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsd/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsd/boost_regex_vc71-stlport_mdsd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsd.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsd/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsd/boost_regex_vc71-stlport_mdsd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsd.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsd/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsd/boost_regex_vc71-stlport_mdsd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsd.pdb ../src/cregex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsd/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsd/boost_regex_vc71-stlport_mdsd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsd.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsd/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsd/boost_regex_vc71-stlport_mdsd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsd.pdb ../src/instances.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsd/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsd/boost_regex_vc71-stlport_mdsd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsd.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsd/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsd/boost_regex_vc71-stlport_mdsd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsd.pdb ../src/regex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsd/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsd/boost_regex_vc71-stlport_mdsd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsd.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsd/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsd/boost_regex_vc71-stlport_mdsd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsd.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsd/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsd/boost_regex_vc71-stlport_mdsd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsd.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsd/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsd/boost_regex_vc71-stlport_mdsd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsd.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsd/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsd/boost_regex_vc71-stlport_mdsd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsd.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71-stlport_mdsd_dir :
|
||||
@if not exist "vc71-stlport\boost_regex_vc71-stlport_mdsd\$(NULL)" mkdir vc71-stlport\boost_regex_vc71-stlport_mdsd
|
||||
|
||||
boost_regex_vc71-stlport_mdsd_clean :
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdsd\*.obj
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdsd\*.idb
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdsd\*.exp
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdsd\*.pch
|
||||
|
||||
./vc71-stlport/boost_regex_vc71-stlport_mdsd.lib : vc71-stlport/boost_regex_vc71-stlport_mdsd/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/instances.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/regex.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/winstances.obj
|
||||
link -lib /nologo /out:vc71-stlport/boost_regex_vc71-stlport_mdsd.lib $(XSFLAGS) vc71-stlport/boost_regex_vc71-stlport_mdsd/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/instances.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/regex.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdsd/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71-stlport_mdidd.lib
|
||||
#
|
||||
########################################################
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdidd/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdidd/boost_regex_vc71-stlport_mdidd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdidd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdidd.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdidd/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdidd/boost_regex_vc71-stlport_mdidd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdidd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdidd.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdidd/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdidd/boost_regex_vc71-stlport_mdidd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdidd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdidd.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdidd/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdidd/boost_regex_vc71-stlport_mdidd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdidd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdidd.pdb ../src/cregex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdidd/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdidd/boost_regex_vc71-stlport_mdidd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdidd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdidd.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdidd/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdidd/boost_regex_vc71-stlport_mdidd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdidd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdidd.pdb ../src/instances.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdidd/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdidd/boost_regex_vc71-stlport_mdidd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdidd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdidd.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdidd/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdidd/boost_regex_vc71-stlport_mdidd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdidd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdidd.pdb ../src/regex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdidd/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdidd/boost_regex_vc71-stlport_mdidd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdidd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdidd.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdidd/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdidd/boost_regex_vc71-stlport_mdidd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdidd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdidd.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdidd/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdidd/boost_regex_vc71-stlport_mdidd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdidd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdidd.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdidd/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdidd/boost_regex_vc71-stlport_mdidd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdidd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdidd.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdidd/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdidd/boost_regex_vc71-stlport_mdidd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdidd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdidd.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71-stlport_mdidd_dir :
|
||||
@if not exist "vc71-stlport\boost_regex_vc71-stlport_mdidd\$(NULL)" mkdir vc71-stlport\boost_regex_vc71-stlport_mdidd
|
||||
|
||||
boost_regex_vc71-stlport_mdidd_clean :
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdidd\*.obj
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdidd\*.idb
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdidd\*.exp
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdidd\*.pch
|
||||
|
||||
./vc71-stlport/boost_regex_vc71-stlport_mdidd.lib : vc71-stlport/boost_regex_vc71-stlport_mdidd/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/instances.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/regex.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/winstances.obj
|
||||
link kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"vc71-stlport/boost_regex_vc71-stlport_mdidd.pdb" /debug /machine:I386 /out:"vc71-stlport/boost_regex_vc71-stlport_mdidd.dll" /implib:"vc71-stlport/boost_regex_vc71-stlport_mdidd.lib" /LIBPATH:$(STLPORT_PATH)\lib $(XLFLAGS) vc71-stlport/boost_regex_vc71-stlport_mdidd/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/instances.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/regex.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdidd/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71-stlport_mssdd.lib
|
||||
#
|
||||
########################################################
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssdd/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssdd/boost_regex_vc71-stlport_mssdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssdd.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssdd/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssdd/boost_regex_vc71-stlport_mssdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssdd.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssdd/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssdd/boost_regex_vc71-stlport_mssdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssdd.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssdd/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssdd/boost_regex_vc71-stlport_mssdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssdd.pdb ../src/cregex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssdd/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssdd/boost_regex_vc71-stlport_mssdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssdd.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssdd/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssdd/boost_regex_vc71-stlport_mssdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssdd.pdb ../src/instances.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssdd/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssdd/boost_regex_vc71-stlport_mssdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssdd.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssdd/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssdd/boost_regex_vc71-stlport_mssdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssdd.pdb ../src/regex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssdd/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssdd/boost_regex_vc71-stlport_mssdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssdd.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssdd/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssdd/boost_regex_vc71-stlport_mssdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssdd.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssdd/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssdd/boost_regex_vc71-stlport_mssdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssdd.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssdd/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssdd/boost_regex_vc71-stlport_mssdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssdd.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mssdd/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I..\..\..\ /D__STL_DEBUG /D_STLP_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mssdd/boost_regex_vc71-stlport_mssdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mssdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mssdd.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71-stlport_mssdd_dir :
|
||||
@if not exist "vc71-stlport\boost_regex_vc71-stlport_mssdd\$(NULL)" mkdir vc71-stlport\boost_regex_vc71-stlport_mssdd
|
||||
|
||||
boost_regex_vc71-stlport_mssdd_clean :
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mssdd\*.obj
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mssdd\*.idb
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mssdd\*.exp
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mssdd\*.pch
|
||||
|
||||
./vc71-stlport/boost_regex_vc71-stlport_mssdd.lib : vc71-stlport/boost_regex_vc71-stlport_mssdd/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/instances.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/regex.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/winstances.obj
|
||||
link -lib /nologo /out:vc71-stlport/boost_regex_vc71-stlport_mssdd.lib $(XSFLAGS) vc71-stlport/boost_regex_vc71-stlport_mssdd/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/instances.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/regex.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mssdd/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71-stlport_mdsdd.lib
|
||||
#
|
||||
########################################################
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsdd/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsdd/boost_regex_vc71-stlport_mdsdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsdd.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsdd/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsdd/boost_regex_vc71-stlport_mdsdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsdd.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsdd/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsdd/boost_regex_vc71-stlport_mdsdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsdd.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsdd/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsdd/boost_regex_vc71-stlport_mdsdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsdd.pdb ../src/cregex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsdd/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsdd/boost_regex_vc71-stlport_mdsdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsdd.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsdd/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsdd/boost_regex_vc71-stlport_mdsdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsdd.pdb ../src/instances.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsdd/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsdd/boost_regex_vc71-stlport_mdsdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsdd.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsdd/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsdd/boost_regex_vc71-stlport_mdsdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsdd.pdb ../src/regex.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsdd/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsdd/boost_regex_vc71-stlport_mdsdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsdd.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsdd/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsdd/boost_regex_vc71-stlport_mdsdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsdd.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsdd/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsdd/boost_regex_vc71-stlport_mdsdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsdd.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsdd/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsdd/boost_regex_vc71-stlport_mdsdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsdd.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71-stlport/boost_regex_vc71-stlport_mdsdd/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I$(STLPORT_PATH)\stlport /I../../../ /DBOOST_REGEX_STATIC_LINK /D__STL_DEBUG /D_STLP_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /FD /GZ /c $(CXXFLAGS) -Fpvc71-stlport/boost_regex_vc71-stlport_mdsdd/boost_regex_vc71-stlport_mdsdd.pch -Fo./vc71-stlport/boost_regex_vc71-stlport_mdsdd/ -Fdvc71-stlport/boost_regex_vc71-stlport_mdsdd.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71-stlport_mdsdd_dir :
|
||||
@if not exist "vc71-stlport\boost_regex_vc71-stlport_mdsdd\$(NULL)" mkdir vc71-stlport\boost_regex_vc71-stlport_mdsdd
|
||||
|
||||
boost_regex_vc71-stlport_mdsdd_clean :
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdsdd\*.obj
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdsdd\*.idb
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdsdd\*.exp
|
||||
del vc71-stlport\boost_regex_vc71-stlport_mdsdd\*.pch
|
||||
|
||||
./vc71-stlport/boost_regex_vc71-stlport_mdsdd.lib : vc71-stlport/boost_regex_vc71-stlport_mdsdd/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/instances.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/regex.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/winstances.obj
|
||||
link -lib /nologo /out:vc71-stlport/boost_regex_vc71-stlport_mdsdd.lib $(XSFLAGS) vc71-stlport/boost_regex_vc71-stlport_mdsdd/c_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/c_regex_traits_common.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/cpp_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/cregex.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/fileiter.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/instances.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/regex.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/regex_debug.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/regex_synch.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/w32_regex_traits.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/wide_posix_api.obj vc71-stlport/boost_regex_vc71-stlport_mdsdd/winstances.obj
|
||||
|
512
build/vc71.mak
Normal file
512
build/vc71.mak
Normal file
@ -0,0 +1,512 @@
|
||||
#
|
||||
# auto generated makefile for VC6 compiler
|
||||
#
|
||||
# usage:
|
||||
# make
|
||||
# brings libraries up to date
|
||||
# make install
|
||||
# brings libraries up to date and copies binaries to your VC6 /lib and /bin directories (recomended)
|
||||
#
|
||||
|
||||
#
|
||||
# Add additional compiler options here:
|
||||
#
|
||||
CXXFLAGS=
|
||||
#
|
||||
# Add additional include directories here:
|
||||
#
|
||||
INCLUDES=
|
||||
#
|
||||
# add additional linker flags here:
|
||||
#
|
||||
XLFLAGS=
|
||||
#
|
||||
# add additional static-library creation flags here:
|
||||
#
|
||||
XSFLAGS=
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(MSVCDIR)" == ""
|
||||
!ERROR Variable MSVCDIR not set.
|
||||
!ENDIF
|
||||
|
||||
|
||||
ALL_HEADER= ../../../boost/regex/config.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/user.hpp ../../../boost/regex/v3/cregex.hpp ../../../boost/regex/v3/fileiter.hpp ../../../boost/regex/v3/instances.hpp ../../../boost/regex/v3/regex.hpp ../../../boost/regex/v3/regex_compile.hpp ../../../boost/regex/v3/regex_cstring.hpp ../../../boost/regex/v3/regex_format.hpp ../../../boost/regex/v3/regex_fwd.hpp ../../../boost/regex/v3/regex_kmp.hpp ../../../boost/regex/v3/regex_library_include.hpp ../../../boost/regex/v3/regex_match.hpp ../../../boost/regex/v3/regex_raw_buffer.hpp ../../../boost/regex/v3/regex_split.hpp ../../../boost/regex/v3/regex_stack.hpp ../../../boost/regex/v3/regex_synch.hpp ../../../boost/regex/v3/regex_traits.hpp
|
||||
|
||||
all : main_dir boost_regex_vc71_sss_dir ./vc71/boost_regex_vc71_sss.lib boost_regex_vc71_mss_dir ./vc71/boost_regex_vc71_mss.lib boost_regex_vc71_sssd_dir ./vc71/boost_regex_vc71_sssd.lib boost_regex_vc71_mssd_dir ./vc71/boost_regex_vc71_mssd.lib boost_regex_vc71_mdid_dir ./vc71/boost_regex_vc71_mdid.lib boost_regex_vc71_mdi_dir ./vc71/boost_regex_vc71_mdi.lib boost_regex_vc71_mds_dir ./vc71/boost_regex_vc71_mds.lib boost_regex_vc71_mdsd_dir ./vc71/boost_regex_vc71_mdsd.lib
|
||||
|
||||
clean : boost_regex_vc71_sss_clean boost_regex_vc71_mss_clean boost_regex_vc71_sssd_clean boost_regex_vc71_mssd_clean boost_regex_vc71_mdid_clean boost_regex_vc71_mdi_clean boost_regex_vc71_mds_clean boost_regex_vc71_mdsd_clean
|
||||
|
||||
install : all
|
||||
copy vc71\boost_regex_vc71_sss.lib "$(MSVCDIR)\lib"
|
||||
copy vc71\boost_regex_vc71_mss.lib "$(MSVCDIR)\lib"
|
||||
copy vc71\boost_regex_vc71_sssd.lib "$(MSVCDIR)\lib"
|
||||
copy vc71\boost_regex_vc71_sssd.pdb "$(MSVCDIR)\lib"
|
||||
copy vc71\boost_regex_vc71_mssd.lib "$(MSVCDIR)\lib"
|
||||
copy vc71\boost_regex_vc71_mssd.pdb "$(MSVCDIR)\lib"
|
||||
copy vc71\boost_regex_vc71_mdid.lib "$(MSVCDIR)\lib"
|
||||
copy vc71\boost_regex_vc71_mdid.dll "$(MSVCDIR)\bin"
|
||||
copy vc71\boost_regex_vc71_mdid.pdb "$(MSVCDIR)\lib"
|
||||
copy vc71\boost_regex_vc71_mdi.lib "$(MSVCDIR)\lib"
|
||||
copy vc71\boost_regex_vc71_mdi.dll "$(MSVCDIR)\bin"
|
||||
copy vc71\boost_regex_vc71_mds.lib "$(MSVCDIR)\lib"
|
||||
copy vc71\boost_regex_vc71_mdsd.lib "$(MSVCDIR)\lib"
|
||||
copy vc71\boost_regex_vc71_mdsd.pdb "$(MSVCDIR)\lib"
|
||||
|
||||
main_dir :
|
||||
@if not exist "vc71\$(NULL)" mkdir vc71
|
||||
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71_sss.lib
|
||||
#
|
||||
########################################################
|
||||
vc71/boost_regex_vc71_sss/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sss/boost_regex_vc71_sss.pch -Fo./vc71/boost_regex_vc71_sss/ -Fdvc71/boost_regex_vc71_sss.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sss/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sss/boost_regex_vc71_sss.pch -Fo./vc71/boost_regex_vc71_sss/ -Fdvc71/boost_regex_vc71_sss.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sss/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sss/boost_regex_vc71_sss.pch -Fo./vc71/boost_regex_vc71_sss/ -Fdvc71/boost_regex_vc71_sss.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sss/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sss/boost_regex_vc71_sss.pch -Fo./vc71/boost_regex_vc71_sss/ -Fdvc71/boost_regex_vc71_sss.pdb ../src/cregex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sss/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sss/boost_regex_vc71_sss.pch -Fo./vc71/boost_regex_vc71_sss/ -Fdvc71/boost_regex_vc71_sss.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sss/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sss/boost_regex_vc71_sss.pch -Fo./vc71/boost_regex_vc71_sss/ -Fdvc71/boost_regex_vc71_sss.pdb ../src/instances.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sss/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sss/boost_regex_vc71_sss.pch -Fo./vc71/boost_regex_vc71_sss/ -Fdvc71/boost_regex_vc71_sss.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sss/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sss/boost_regex_vc71_sss.pch -Fo./vc71/boost_regex_vc71_sss/ -Fdvc71/boost_regex_vc71_sss.pdb ../src/regex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sss/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sss/boost_regex_vc71_sss.pch -Fo./vc71/boost_regex_vc71_sss/ -Fdvc71/boost_regex_vc71_sss.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sss/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sss/boost_regex_vc71_sss.pch -Fo./vc71/boost_regex_vc71_sss/ -Fdvc71/boost_regex_vc71_sss.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sss/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sss/boost_regex_vc71_sss.pch -Fo./vc71/boost_regex_vc71_sss/ -Fdvc71/boost_regex_vc71_sss.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sss/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sss/boost_regex_vc71_sss.pch -Fo./vc71/boost_regex_vc71_sss/ -Fdvc71/boost_regex_vc71_sss.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sss/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sss/boost_regex_vc71_sss.pch -Fo./vc71/boost_regex_vc71_sss/ -Fdvc71/boost_regex_vc71_sss.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71_sss_dir :
|
||||
@if not exist "vc71\boost_regex_vc71_sss\$(NULL)" mkdir vc71\boost_regex_vc71_sss
|
||||
|
||||
boost_regex_vc71_sss_clean :
|
||||
del vc71\boost_regex_vc71_sss\*.obj
|
||||
del vc71\boost_regex_vc71_sss\*.idb
|
||||
del vc71\boost_regex_vc71_sss\*.exp
|
||||
del vc71\boost_regex_vc71_sss\*.pch
|
||||
|
||||
./vc71/boost_regex_vc71_sss.lib : vc71/boost_regex_vc71_sss/c_regex_traits.obj vc71/boost_regex_vc71_sss/c_regex_traits_common.obj vc71/boost_regex_vc71_sss/cpp_regex_traits.obj vc71/boost_regex_vc71_sss/cregex.obj vc71/boost_regex_vc71_sss/fileiter.obj vc71/boost_regex_vc71_sss/instances.obj vc71/boost_regex_vc71_sss/posix_api.obj vc71/boost_regex_vc71_sss/regex.obj vc71/boost_regex_vc71_sss/regex_debug.obj vc71/boost_regex_vc71_sss/regex_synch.obj vc71/boost_regex_vc71_sss/w32_regex_traits.obj vc71/boost_regex_vc71_sss/wide_posix_api.obj vc71/boost_regex_vc71_sss/winstances.obj
|
||||
link -lib /nologo /out:vc71/boost_regex_vc71_sss.lib $(XSFLAGS) vc71/boost_regex_vc71_sss/c_regex_traits.obj vc71/boost_regex_vc71_sss/c_regex_traits_common.obj vc71/boost_regex_vc71_sss/cpp_regex_traits.obj vc71/boost_regex_vc71_sss/cregex.obj vc71/boost_regex_vc71_sss/fileiter.obj vc71/boost_regex_vc71_sss/instances.obj vc71/boost_regex_vc71_sss/posix_api.obj vc71/boost_regex_vc71_sss/regex.obj vc71/boost_regex_vc71_sss/regex_debug.obj vc71/boost_regex_vc71_sss/regex_synch.obj vc71/boost_regex_vc71_sss/w32_regex_traits.obj vc71/boost_regex_vc71_sss/wide_posix_api.obj vc71/boost_regex_vc71_sss/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71_mss.lib
|
||||
#
|
||||
########################################################
|
||||
vc71/boost_regex_vc71_mss/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mss/boost_regex_vc71_mss.pch -Fo./vc71/boost_regex_vc71_mss/ -Fdvc71/boost_regex_vc71_mss.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mss/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mss/boost_regex_vc71_mss.pch -Fo./vc71/boost_regex_vc71_mss/ -Fdvc71/boost_regex_vc71_mss.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mss/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mss/boost_regex_vc71_mss.pch -Fo./vc71/boost_regex_vc71_mss/ -Fdvc71/boost_regex_vc71_mss.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mss/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mss/boost_regex_vc71_mss.pch -Fo./vc71/boost_regex_vc71_mss/ -Fdvc71/boost_regex_vc71_mss.pdb ../src/cregex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mss/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mss/boost_regex_vc71_mss.pch -Fo./vc71/boost_regex_vc71_mss/ -Fdvc71/boost_regex_vc71_mss.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mss/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mss/boost_regex_vc71_mss.pch -Fo./vc71/boost_regex_vc71_mss/ -Fdvc71/boost_regex_vc71_mss.pdb ../src/instances.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mss/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mss/boost_regex_vc71_mss.pch -Fo./vc71/boost_regex_vc71_mss/ -Fdvc71/boost_regex_vc71_mss.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mss/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mss/boost_regex_vc71_mss.pch -Fo./vc71/boost_regex_vc71_mss/ -Fdvc71/boost_regex_vc71_mss.pdb ../src/regex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mss/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mss/boost_regex_vc71_mss.pch -Fo./vc71/boost_regex_vc71_mss/ -Fdvc71/boost_regex_vc71_mss.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mss/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mss/boost_regex_vc71_mss.pch -Fo./vc71/boost_regex_vc71_mss/ -Fdvc71/boost_regex_vc71_mss.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mss/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mss/boost_regex_vc71_mss.pch -Fo./vc71/boost_regex_vc71_mss/ -Fdvc71/boost_regex_vc71_mss.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mss/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mss/boost_regex_vc71_mss.pch -Fo./vc71/boost_regex_vc71_mss/ -Fdvc71/boost_regex_vc71_mss.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mss/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /O2 /GB /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mss/boost_regex_vc71_mss.pch -Fo./vc71/boost_regex_vc71_mss/ -Fdvc71/boost_regex_vc71_mss.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71_mss_dir :
|
||||
@if not exist "vc71\boost_regex_vc71_mss\$(NULL)" mkdir vc71\boost_regex_vc71_mss
|
||||
|
||||
boost_regex_vc71_mss_clean :
|
||||
del vc71\boost_regex_vc71_mss\*.obj
|
||||
del vc71\boost_regex_vc71_mss\*.idb
|
||||
del vc71\boost_regex_vc71_mss\*.exp
|
||||
del vc71\boost_regex_vc71_mss\*.pch
|
||||
|
||||
./vc71/boost_regex_vc71_mss.lib : vc71/boost_regex_vc71_mss/c_regex_traits.obj vc71/boost_regex_vc71_mss/c_regex_traits_common.obj vc71/boost_regex_vc71_mss/cpp_regex_traits.obj vc71/boost_regex_vc71_mss/cregex.obj vc71/boost_regex_vc71_mss/fileiter.obj vc71/boost_regex_vc71_mss/instances.obj vc71/boost_regex_vc71_mss/posix_api.obj vc71/boost_regex_vc71_mss/regex.obj vc71/boost_regex_vc71_mss/regex_debug.obj vc71/boost_regex_vc71_mss/regex_synch.obj vc71/boost_regex_vc71_mss/w32_regex_traits.obj vc71/boost_regex_vc71_mss/wide_posix_api.obj vc71/boost_regex_vc71_mss/winstances.obj
|
||||
link -lib /nologo /out:vc71/boost_regex_vc71_mss.lib $(XSFLAGS) vc71/boost_regex_vc71_mss/c_regex_traits.obj vc71/boost_regex_vc71_mss/c_regex_traits_common.obj vc71/boost_regex_vc71_mss/cpp_regex_traits.obj vc71/boost_regex_vc71_mss/cregex.obj vc71/boost_regex_vc71_mss/fileiter.obj vc71/boost_regex_vc71_mss/instances.obj vc71/boost_regex_vc71_mss/posix_api.obj vc71/boost_regex_vc71_mss/regex.obj vc71/boost_regex_vc71_mss/regex_debug.obj vc71/boost_regex_vc71_mss/regex_synch.obj vc71/boost_regex_vc71_mss/w32_regex_traits.obj vc71/boost_regex_vc71_mss/wide_posix_api.obj vc71/boost_regex_vc71_mss/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71_sssd.lib
|
||||
#
|
||||
########################################################
|
||||
vc71/boost_regex_vc71_sssd/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MLd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sssd/boost_regex_vc71_sssd.pch -Fo./vc71/boost_regex_vc71_sssd/ -Fdvc71/boost_regex_vc71_sssd.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sssd/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MLd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sssd/boost_regex_vc71_sssd.pch -Fo./vc71/boost_regex_vc71_sssd/ -Fdvc71/boost_regex_vc71_sssd.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sssd/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MLd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sssd/boost_regex_vc71_sssd.pch -Fo./vc71/boost_regex_vc71_sssd/ -Fdvc71/boost_regex_vc71_sssd.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sssd/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MLd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sssd/boost_regex_vc71_sssd.pch -Fo./vc71/boost_regex_vc71_sssd/ -Fdvc71/boost_regex_vc71_sssd.pdb ../src/cregex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sssd/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MLd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sssd/boost_regex_vc71_sssd.pch -Fo./vc71/boost_regex_vc71_sssd/ -Fdvc71/boost_regex_vc71_sssd.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sssd/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MLd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sssd/boost_regex_vc71_sssd.pch -Fo./vc71/boost_regex_vc71_sssd/ -Fdvc71/boost_regex_vc71_sssd.pdb ../src/instances.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sssd/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MLd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sssd/boost_regex_vc71_sssd.pch -Fo./vc71/boost_regex_vc71_sssd/ -Fdvc71/boost_regex_vc71_sssd.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sssd/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MLd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sssd/boost_regex_vc71_sssd.pch -Fo./vc71/boost_regex_vc71_sssd/ -Fdvc71/boost_regex_vc71_sssd.pdb ../src/regex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sssd/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MLd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sssd/boost_regex_vc71_sssd.pch -Fo./vc71/boost_regex_vc71_sssd/ -Fdvc71/boost_regex_vc71_sssd.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sssd/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MLd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sssd/boost_regex_vc71_sssd.pch -Fo./vc71/boost_regex_vc71_sssd/ -Fdvc71/boost_regex_vc71_sssd.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sssd/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MLd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sssd/boost_regex_vc71_sssd.pch -Fo./vc71/boost_regex_vc71_sssd/ -Fdvc71/boost_regex_vc71_sssd.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sssd/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MLd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sssd/boost_regex_vc71_sssd.pch -Fo./vc71/boost_regex_vc71_sssd/ -Fdvc71/boost_regex_vc71_sssd.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_sssd/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MLd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_sssd/boost_regex_vc71_sssd.pch -Fo./vc71/boost_regex_vc71_sssd/ -Fdvc71/boost_regex_vc71_sssd.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71_sssd_dir :
|
||||
@if not exist "vc71\boost_regex_vc71_sssd\$(NULL)" mkdir vc71\boost_regex_vc71_sssd
|
||||
|
||||
boost_regex_vc71_sssd_clean :
|
||||
del vc71\boost_regex_vc71_sssd\*.obj
|
||||
del vc71\boost_regex_vc71_sssd\*.idb
|
||||
del vc71\boost_regex_vc71_sssd\*.exp
|
||||
del vc71\boost_regex_vc71_sssd\*.pch
|
||||
|
||||
./vc71/boost_regex_vc71_sssd.lib : vc71/boost_regex_vc71_sssd/c_regex_traits.obj vc71/boost_regex_vc71_sssd/c_regex_traits_common.obj vc71/boost_regex_vc71_sssd/cpp_regex_traits.obj vc71/boost_regex_vc71_sssd/cregex.obj vc71/boost_regex_vc71_sssd/fileiter.obj vc71/boost_regex_vc71_sssd/instances.obj vc71/boost_regex_vc71_sssd/posix_api.obj vc71/boost_regex_vc71_sssd/regex.obj vc71/boost_regex_vc71_sssd/regex_debug.obj vc71/boost_regex_vc71_sssd/regex_synch.obj vc71/boost_regex_vc71_sssd/w32_regex_traits.obj vc71/boost_regex_vc71_sssd/wide_posix_api.obj vc71/boost_regex_vc71_sssd/winstances.obj
|
||||
link -lib /nologo /out:vc71/boost_regex_vc71_sssd.lib $(XSFLAGS) vc71/boost_regex_vc71_sssd/c_regex_traits.obj vc71/boost_regex_vc71_sssd/c_regex_traits_common.obj vc71/boost_regex_vc71_sssd/cpp_regex_traits.obj vc71/boost_regex_vc71_sssd/cregex.obj vc71/boost_regex_vc71_sssd/fileiter.obj vc71/boost_regex_vc71_sssd/instances.obj vc71/boost_regex_vc71_sssd/posix_api.obj vc71/boost_regex_vc71_sssd/regex.obj vc71/boost_regex_vc71_sssd/regex_debug.obj vc71/boost_regex_vc71_sssd/regex_synch.obj vc71/boost_regex_vc71_sssd/w32_regex_traits.obj vc71/boost_regex_vc71_sssd/wide_posix_api.obj vc71/boost_regex_vc71_sssd/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71_mssd.lib
|
||||
#
|
||||
########################################################
|
||||
vc71/boost_regex_vc71_mssd/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mssd/boost_regex_vc71_mssd.pch -Fo./vc71/boost_regex_vc71_mssd/ -Fdvc71/boost_regex_vc71_mssd.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mssd/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mssd/boost_regex_vc71_mssd.pch -Fo./vc71/boost_regex_vc71_mssd/ -Fdvc71/boost_regex_vc71_mssd.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mssd/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mssd/boost_regex_vc71_mssd.pch -Fo./vc71/boost_regex_vc71_mssd/ -Fdvc71/boost_regex_vc71_mssd.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mssd/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mssd/boost_regex_vc71_mssd.pch -Fo./vc71/boost_regex_vc71_mssd/ -Fdvc71/boost_regex_vc71_mssd.pdb ../src/cregex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mssd/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mssd/boost_regex_vc71_mssd.pch -Fo./vc71/boost_regex_vc71_mssd/ -Fdvc71/boost_regex_vc71_mssd.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mssd/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mssd/boost_regex_vc71_mssd.pch -Fo./vc71/boost_regex_vc71_mssd/ -Fdvc71/boost_regex_vc71_mssd.pdb ../src/instances.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mssd/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mssd/boost_regex_vc71_mssd.pch -Fo./vc71/boost_regex_vc71_mssd/ -Fdvc71/boost_regex_vc71_mssd.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mssd/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mssd/boost_regex_vc71_mssd.pch -Fo./vc71/boost_regex_vc71_mssd/ -Fdvc71/boost_regex_vc71_mssd.pdb ../src/regex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mssd/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mssd/boost_regex_vc71_mssd.pch -Fo./vc71/boost_regex_vc71_mssd/ -Fdvc71/boost_regex_vc71_mssd.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mssd/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mssd/boost_regex_vc71_mssd.pch -Fo./vc71/boost_regex_vc71_mssd/ -Fdvc71/boost_regex_vc71_mssd.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mssd/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mssd/boost_regex_vc71_mssd.pch -Fo./vc71/boost_regex_vc71_mssd/ -Fdvc71/boost_regex_vc71_mssd.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mssd/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mssd/boost_regex_vc71_mssd.pch -Fo./vc71/boost_regex_vc71_mssd/ -Fdvc71/boost_regex_vc71_mssd.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mssd/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mssd/boost_regex_vc71_mssd.pch -Fo./vc71/boost_regex_vc71_mssd/ -Fdvc71/boost_regex_vc71_mssd.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71_mssd_dir :
|
||||
@if not exist "vc71\boost_regex_vc71_mssd\$(NULL)" mkdir vc71\boost_regex_vc71_mssd
|
||||
|
||||
boost_regex_vc71_mssd_clean :
|
||||
del vc71\boost_regex_vc71_mssd\*.obj
|
||||
del vc71\boost_regex_vc71_mssd\*.idb
|
||||
del vc71\boost_regex_vc71_mssd\*.exp
|
||||
del vc71\boost_regex_vc71_mssd\*.pch
|
||||
|
||||
./vc71/boost_regex_vc71_mssd.lib : vc71/boost_regex_vc71_mssd/c_regex_traits.obj vc71/boost_regex_vc71_mssd/c_regex_traits_common.obj vc71/boost_regex_vc71_mssd/cpp_regex_traits.obj vc71/boost_regex_vc71_mssd/cregex.obj vc71/boost_regex_vc71_mssd/fileiter.obj vc71/boost_regex_vc71_mssd/instances.obj vc71/boost_regex_vc71_mssd/posix_api.obj vc71/boost_regex_vc71_mssd/regex.obj vc71/boost_regex_vc71_mssd/regex_debug.obj vc71/boost_regex_vc71_mssd/regex_synch.obj vc71/boost_regex_vc71_mssd/w32_regex_traits.obj vc71/boost_regex_vc71_mssd/wide_posix_api.obj vc71/boost_regex_vc71_mssd/winstances.obj
|
||||
link -lib /nologo /out:vc71/boost_regex_vc71_mssd.lib $(XSFLAGS) vc71/boost_regex_vc71_mssd/c_regex_traits.obj vc71/boost_regex_vc71_mssd/c_regex_traits_common.obj vc71/boost_regex_vc71_mssd/cpp_regex_traits.obj vc71/boost_regex_vc71_mssd/cregex.obj vc71/boost_regex_vc71_mssd/fileiter.obj vc71/boost_regex_vc71_mssd/instances.obj vc71/boost_regex_vc71_mssd/posix_api.obj vc71/boost_regex_vc71_mssd/regex.obj vc71/boost_regex_vc71_mssd/regex_debug.obj vc71/boost_regex_vc71_mssd/regex_synch.obj vc71/boost_regex_vc71_mssd/w32_regex_traits.obj vc71/boost_regex_vc71_mssd/wide_posix_api.obj vc71/boost_regex_vc71_mssd/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71_mdid.lib
|
||||
#
|
||||
########################################################
|
||||
vc71/boost_regex_vc71_mdid/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdid/boost_regex_vc71_mdid.pch -Fo./vc71/boost_regex_vc71_mdid/ -Fdvc71/boost_regex_vc71_mdid.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdid/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdid/boost_regex_vc71_mdid.pch -Fo./vc71/boost_regex_vc71_mdid/ -Fdvc71/boost_regex_vc71_mdid.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdid/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdid/boost_regex_vc71_mdid.pch -Fo./vc71/boost_regex_vc71_mdid/ -Fdvc71/boost_regex_vc71_mdid.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdid/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdid/boost_regex_vc71_mdid.pch -Fo./vc71/boost_regex_vc71_mdid/ -Fdvc71/boost_regex_vc71_mdid.pdb ../src/cregex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdid/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdid/boost_regex_vc71_mdid.pch -Fo./vc71/boost_regex_vc71_mdid/ -Fdvc71/boost_regex_vc71_mdid.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdid/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdid/boost_regex_vc71_mdid.pch -Fo./vc71/boost_regex_vc71_mdid/ -Fdvc71/boost_regex_vc71_mdid.pdb ../src/instances.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdid/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdid/boost_regex_vc71_mdid.pch -Fo./vc71/boost_regex_vc71_mdid/ -Fdvc71/boost_regex_vc71_mdid.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdid/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdid/boost_regex_vc71_mdid.pch -Fo./vc71/boost_regex_vc71_mdid/ -Fdvc71/boost_regex_vc71_mdid.pdb ../src/regex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdid/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdid/boost_regex_vc71_mdid.pch -Fo./vc71/boost_regex_vc71_mdid/ -Fdvc71/boost_regex_vc71_mdid.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdid/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdid/boost_regex_vc71_mdid.pch -Fo./vc71/boost_regex_vc71_mdid/ -Fdvc71/boost_regex_vc71_mdid.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdid/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdid/boost_regex_vc71_mdid.pch -Fo./vc71/boost_regex_vc71_mdid/ -Fdvc71/boost_regex_vc71_mdid.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdid/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdid/boost_regex_vc71_mdid.pch -Fo./vc71/boost_regex_vc71_mdid/ -Fdvc71/boost_regex_vc71_mdid.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdid/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdid/boost_regex_vc71_mdid.pch -Fo./vc71/boost_regex_vc71_mdid/ -Fdvc71/boost_regex_vc71_mdid.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71_mdid_dir :
|
||||
@if not exist "vc71\boost_regex_vc71_mdid\$(NULL)" mkdir vc71\boost_regex_vc71_mdid
|
||||
|
||||
boost_regex_vc71_mdid_clean :
|
||||
del vc71\boost_regex_vc71_mdid\*.obj
|
||||
del vc71\boost_regex_vc71_mdid\*.idb
|
||||
del vc71\boost_regex_vc71_mdid\*.exp
|
||||
del vc71\boost_regex_vc71_mdid\*.pch
|
||||
|
||||
./vc71/boost_regex_vc71_mdid.lib : vc71/boost_regex_vc71_mdid/c_regex_traits.obj vc71/boost_regex_vc71_mdid/c_regex_traits_common.obj vc71/boost_regex_vc71_mdid/cpp_regex_traits.obj vc71/boost_regex_vc71_mdid/cregex.obj vc71/boost_regex_vc71_mdid/fileiter.obj vc71/boost_regex_vc71_mdid/instances.obj vc71/boost_regex_vc71_mdid/posix_api.obj vc71/boost_regex_vc71_mdid/regex.obj vc71/boost_regex_vc71_mdid/regex_debug.obj vc71/boost_regex_vc71_mdid/regex_synch.obj vc71/boost_regex_vc71_mdid/w32_regex_traits.obj vc71/boost_regex_vc71_mdid/wide_posix_api.obj vc71/boost_regex_vc71_mdid/winstances.obj
|
||||
link kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"vc71/boost_regex_vc71_mdid.pdb" /debug /machine:I386 /out:"vc71/boost_regex_vc71_mdid.dll" /implib:"vc71/boost_regex_vc71_mdid.lib" /LIBPATH:$(STLPORT_PATH)\lib $(XLFLAGS) vc71/boost_regex_vc71_mdid/c_regex_traits.obj vc71/boost_regex_vc71_mdid/c_regex_traits_common.obj vc71/boost_regex_vc71_mdid/cpp_regex_traits.obj vc71/boost_regex_vc71_mdid/cregex.obj vc71/boost_regex_vc71_mdid/fileiter.obj vc71/boost_regex_vc71_mdid/instances.obj vc71/boost_regex_vc71_mdid/posix_api.obj vc71/boost_regex_vc71_mdid/regex.obj vc71/boost_regex_vc71_mdid/regex_debug.obj vc71/boost_regex_vc71_mdid/regex_synch.obj vc71/boost_regex_vc71_mdid/w32_regex_traits.obj vc71/boost_regex_vc71_mdid/wide_posix_api.obj vc71/boost_regex_vc71_mdid/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71_mdi.lib
|
||||
#
|
||||
########################################################
|
||||
vc71/boost_regex_vc71_mdi/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdi/boost_regex_vc71_mdi.pch -Fo./vc71/boost_regex_vc71_mdi/ -Fdvc71/boost_regex_vc71_mdi.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdi/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdi/boost_regex_vc71_mdi.pch -Fo./vc71/boost_regex_vc71_mdi/ -Fdvc71/boost_regex_vc71_mdi.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdi/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdi/boost_regex_vc71_mdi.pch -Fo./vc71/boost_regex_vc71_mdi/ -Fdvc71/boost_regex_vc71_mdi.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdi/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdi/boost_regex_vc71_mdi.pch -Fo./vc71/boost_regex_vc71_mdi/ -Fdvc71/boost_regex_vc71_mdi.pdb ../src/cregex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdi/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdi/boost_regex_vc71_mdi.pch -Fo./vc71/boost_regex_vc71_mdi/ -Fdvc71/boost_regex_vc71_mdi.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdi/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdi/boost_regex_vc71_mdi.pch -Fo./vc71/boost_regex_vc71_mdi/ -Fdvc71/boost_regex_vc71_mdi.pdb ../src/instances.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdi/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdi/boost_regex_vc71_mdi.pch -Fo./vc71/boost_regex_vc71_mdi/ -Fdvc71/boost_regex_vc71_mdi.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdi/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdi/boost_regex_vc71_mdi.pch -Fo./vc71/boost_regex_vc71_mdi/ -Fdvc71/boost_regex_vc71_mdi.pdb ../src/regex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdi/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdi/boost_regex_vc71_mdi.pch -Fo./vc71/boost_regex_vc71_mdi/ -Fdvc71/boost_regex_vc71_mdi.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdi/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdi/boost_regex_vc71_mdi.pch -Fo./vc71/boost_regex_vc71_mdi/ -Fdvc71/boost_regex_vc71_mdi.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdi/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdi/boost_regex_vc71_mdi.pch -Fo./vc71/boost_regex_vc71_mdi/ -Fdvc71/boost_regex_vc71_mdi.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdi/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdi/boost_regex_vc71_mdi.pch -Fo./vc71/boost_regex_vc71_mdi/ -Fdvc71/boost_regex_vc71_mdi.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdi/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdi/boost_regex_vc71_mdi.pch -Fo./vc71/boost_regex_vc71_mdi/ -Fdvc71/boost_regex_vc71_mdi.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71_mdi_dir :
|
||||
@if not exist "vc71\boost_regex_vc71_mdi\$(NULL)" mkdir vc71\boost_regex_vc71_mdi
|
||||
|
||||
boost_regex_vc71_mdi_clean :
|
||||
del vc71\boost_regex_vc71_mdi\*.obj
|
||||
del vc71\boost_regex_vc71_mdi\*.idb
|
||||
del vc71\boost_regex_vc71_mdi\*.exp
|
||||
del vc71\boost_regex_vc71_mdi\*.pch
|
||||
|
||||
./vc71/boost_regex_vc71_mdi.lib : vc71/boost_regex_vc71_mdi/c_regex_traits.obj vc71/boost_regex_vc71_mdi/c_regex_traits_common.obj vc71/boost_regex_vc71_mdi/cpp_regex_traits.obj vc71/boost_regex_vc71_mdi/cregex.obj vc71/boost_regex_vc71_mdi/fileiter.obj vc71/boost_regex_vc71_mdi/instances.obj vc71/boost_regex_vc71_mdi/posix_api.obj vc71/boost_regex_vc71_mdi/regex.obj vc71/boost_regex_vc71_mdi/regex_debug.obj vc71/boost_regex_vc71_mdi/regex_synch.obj vc71/boost_regex_vc71_mdi/w32_regex_traits.obj vc71/boost_regex_vc71_mdi/wide_posix_api.obj vc71/boost_regex_vc71_mdi/winstances.obj
|
||||
link kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"vc71/boost_regex_vc71_mdi.pdb" /debug /machine:I386 /out:"vc71/boost_regex_vc71_mdi.dll" /implib:"vc71/boost_regex_vc71_mdi.lib" /LIBPATH:$(STLPORT_PATH)\lib $(XLFLAGS) vc71/boost_regex_vc71_mdi/c_regex_traits.obj vc71/boost_regex_vc71_mdi/c_regex_traits_common.obj vc71/boost_regex_vc71_mdi/cpp_regex_traits.obj vc71/boost_regex_vc71_mdi/cregex.obj vc71/boost_regex_vc71_mdi/fileiter.obj vc71/boost_regex_vc71_mdi/instances.obj vc71/boost_regex_vc71_mdi/posix_api.obj vc71/boost_regex_vc71_mdi/regex.obj vc71/boost_regex_vc71_mdi/regex_debug.obj vc71/boost_regex_vc71_mdi/regex_synch.obj vc71/boost_regex_vc71_mdi/w32_regex_traits.obj vc71/boost_regex_vc71_mdi/wide_posix_api.obj vc71/boost_regex_vc71_mdi/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71_mds.lib
|
||||
#
|
||||
########################################################
|
||||
vc71/boost_regex_vc71_mds/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mds/boost_regex_vc71_mds.pch -Fo./vc71/boost_regex_vc71_mds/ -Fdvc71/boost_regex_vc71_mds.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mds/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mds/boost_regex_vc71_mds.pch -Fo./vc71/boost_regex_vc71_mds/ -Fdvc71/boost_regex_vc71_mds.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mds/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mds/boost_regex_vc71_mds.pch -Fo./vc71/boost_regex_vc71_mds/ -Fdvc71/boost_regex_vc71_mds.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mds/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mds/boost_regex_vc71_mds.pch -Fo./vc71/boost_regex_vc71_mds/ -Fdvc71/boost_regex_vc71_mds.pdb ../src/cregex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mds/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mds/boost_regex_vc71_mds.pch -Fo./vc71/boost_regex_vc71_mds/ -Fdvc71/boost_regex_vc71_mds.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mds/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mds/boost_regex_vc71_mds.pch -Fo./vc71/boost_regex_vc71_mds/ -Fdvc71/boost_regex_vc71_mds.pdb ../src/instances.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mds/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mds/boost_regex_vc71_mds.pch -Fo./vc71/boost_regex_vc71_mds/ -Fdvc71/boost_regex_vc71_mds.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mds/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mds/boost_regex_vc71_mds.pch -Fo./vc71/boost_regex_vc71_mds/ -Fdvc71/boost_regex_vc71_mds.pdb ../src/regex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mds/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mds/boost_regex_vc71_mds.pch -Fo./vc71/boost_regex_vc71_mds/ -Fdvc71/boost_regex_vc71_mds.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mds/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mds/boost_regex_vc71_mds.pch -Fo./vc71/boost_regex_vc71_mds/ -Fdvc71/boost_regex_vc71_mds.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mds/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mds/boost_regex_vc71_mds.pch -Fo./vc71/boost_regex_vc71_mds/ -Fdvc71/boost_regex_vc71_mds.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mds/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mds/boost_regex_vc71_mds.pch -Fo./vc71/boost_regex_vc71_mds/ -Fdvc71/boost_regex_vc71_mds.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mds/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /O2 /GB /GF /Gy /I../../../ /DBOOST_REGEX_STATIC_LINK /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /YX /FD /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mds/boost_regex_vc71_mds.pch -Fo./vc71/boost_regex_vc71_mds/ -Fdvc71/boost_regex_vc71_mds.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71_mds_dir :
|
||||
@if not exist "vc71\boost_regex_vc71_mds\$(NULL)" mkdir vc71\boost_regex_vc71_mds
|
||||
|
||||
boost_regex_vc71_mds_clean :
|
||||
del vc71\boost_regex_vc71_mds\*.obj
|
||||
del vc71\boost_regex_vc71_mds\*.idb
|
||||
del vc71\boost_regex_vc71_mds\*.exp
|
||||
del vc71\boost_regex_vc71_mds\*.pch
|
||||
|
||||
./vc71/boost_regex_vc71_mds.lib : vc71/boost_regex_vc71_mds/c_regex_traits.obj vc71/boost_regex_vc71_mds/c_regex_traits_common.obj vc71/boost_regex_vc71_mds/cpp_regex_traits.obj vc71/boost_regex_vc71_mds/cregex.obj vc71/boost_regex_vc71_mds/fileiter.obj vc71/boost_regex_vc71_mds/instances.obj vc71/boost_regex_vc71_mds/posix_api.obj vc71/boost_regex_vc71_mds/regex.obj vc71/boost_regex_vc71_mds/regex_debug.obj vc71/boost_regex_vc71_mds/regex_synch.obj vc71/boost_regex_vc71_mds/w32_regex_traits.obj vc71/boost_regex_vc71_mds/wide_posix_api.obj vc71/boost_regex_vc71_mds/winstances.obj
|
||||
link -lib /nologo /out:vc71/boost_regex_vc71_mds.lib $(XSFLAGS) vc71/boost_regex_vc71_mds/c_regex_traits.obj vc71/boost_regex_vc71_mds/c_regex_traits_common.obj vc71/boost_regex_vc71_mds/cpp_regex_traits.obj vc71/boost_regex_vc71_mds/cregex.obj vc71/boost_regex_vc71_mds/fileiter.obj vc71/boost_regex_vc71_mds/instances.obj vc71/boost_regex_vc71_mds/posix_api.obj vc71/boost_regex_vc71_mds/regex.obj vc71/boost_regex_vc71_mds/regex_debug.obj vc71/boost_regex_vc71_mds/regex_synch.obj vc71/boost_regex_vc71_mds/w32_regex_traits.obj vc71/boost_regex_vc71_mds/wide_posix_api.obj vc71/boost_regex_vc71_mds/winstances.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for boost_regex_vc71_mdsd.lib
|
||||
#
|
||||
########################################################
|
||||
vc71/boost_regex_vc71_mdsd/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdsd/boost_regex_vc71_mdsd.pch -Fo./vc71/boost_regex_vc71_mdsd/ -Fdvc71/boost_regex_vc71_mdsd.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdsd/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdsd/boost_regex_vc71_mdsd.pch -Fo./vc71/boost_regex_vc71_mdsd/ -Fdvc71/boost_regex_vc71_mdsd.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdsd/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdsd/boost_regex_vc71_mdsd.pch -Fo./vc71/boost_regex_vc71_mdsd/ -Fdvc71/boost_regex_vc71_mdsd.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdsd/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdsd/boost_regex_vc71_mdsd.pch -Fo./vc71/boost_regex_vc71_mdsd/ -Fdvc71/boost_regex_vc71_mdsd.pdb ../src/cregex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdsd/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdsd/boost_regex_vc71_mdsd.pch -Fo./vc71/boost_regex_vc71_mdsd/ -Fdvc71/boost_regex_vc71_mdsd.pdb ../src/fileiter.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdsd/instances.obj: ../src/instances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdsd/boost_regex_vc71_mdsd.pch -Fo./vc71/boost_regex_vc71_mdsd/ -Fdvc71/boost_regex_vc71_mdsd.pdb ../src/instances.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdsd/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdsd/boost_regex_vc71_mdsd.pch -Fo./vc71/boost_regex_vc71_mdsd/ -Fdvc71/boost_regex_vc71_mdsd.pdb ../src/posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdsd/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdsd/boost_regex_vc71_mdsd.pch -Fo./vc71/boost_regex_vc71_mdsd/ -Fdvc71/boost_regex_vc71_mdsd.pdb ../src/regex.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdsd/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdsd/boost_regex_vc71_mdsd.pch -Fo./vc71/boost_regex_vc71_mdsd/ -Fdvc71/boost_regex_vc71_mdsd.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdsd/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdsd/boost_regex_vc71_mdsd.pch -Fo./vc71/boost_regex_vc71_mdsd/ -Fdvc71/boost_regex_vc71_mdsd.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdsd/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdsd/boost_regex_vc71_mdsd.pch -Fo./vc71/boost_regex_vc71_mdsd/ -Fdvc71/boost_regex_vc71_mdsd.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdsd/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdsd/boost_regex_vc71_mdsd.pch -Fo./vc71/boost_regex_vc71_mdsd/ -Fdvc71/boost_regex_vc71_mdsd.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc71/boost_regex_vc71_mdsd/winstances.obj: ../src/winstances.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /DBOOST_REGEX_STATIC_LINK /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc71/boost_regex_vc71_mdsd/boost_regex_vc71_mdsd.pch -Fo./vc71/boost_regex_vc71_mdsd/ -Fdvc71/boost_regex_vc71_mdsd.pdb ../src/winstances.cpp
|
||||
|
||||
boost_regex_vc71_mdsd_dir :
|
||||
@if not exist "vc71\boost_regex_vc71_mdsd\$(NULL)" mkdir vc71\boost_regex_vc71_mdsd
|
||||
|
||||
boost_regex_vc71_mdsd_clean :
|
||||
del vc71\boost_regex_vc71_mdsd\*.obj
|
||||
del vc71\boost_regex_vc71_mdsd\*.idb
|
||||
del vc71\boost_regex_vc71_mdsd\*.exp
|
||||
del vc71\boost_regex_vc71_mdsd\*.pch
|
||||
|
||||
./vc71/boost_regex_vc71_mdsd.lib : vc71/boost_regex_vc71_mdsd/c_regex_traits.obj vc71/boost_regex_vc71_mdsd/c_regex_traits_common.obj vc71/boost_regex_vc71_mdsd/cpp_regex_traits.obj vc71/boost_regex_vc71_mdsd/cregex.obj vc71/boost_regex_vc71_mdsd/fileiter.obj vc71/boost_regex_vc71_mdsd/instances.obj vc71/boost_regex_vc71_mdsd/posix_api.obj vc71/boost_regex_vc71_mdsd/regex.obj vc71/boost_regex_vc71_mdsd/regex_debug.obj vc71/boost_regex_vc71_mdsd/regex_synch.obj vc71/boost_regex_vc71_mdsd/w32_regex_traits.obj vc71/boost_regex_vc71_mdsd/wide_posix_api.obj vc71/boost_regex_vc71_mdsd/winstances.obj
|
||||
link -lib /nologo /out:vc71/boost_regex_vc71_mdsd.lib $(XSFLAGS) vc71/boost_regex_vc71_mdsd/c_regex_traits.obj vc71/boost_regex_vc71_mdsd/c_regex_traits_common.obj vc71/boost_regex_vc71_mdsd/cpp_regex_traits.obj vc71/boost_regex_vc71_mdsd/cregex.obj vc71/boost_regex_vc71_mdsd/fileiter.obj vc71/boost_regex_vc71_mdsd/instances.obj vc71/boost_regex_vc71_mdsd/posix_api.obj vc71/boost_regex_vc71_mdsd/regex.obj vc71/boost_regex_vc71_mdsd/regex_debug.obj vc71/boost_regex_vc71_mdsd/regex_synch.obj vc71/boost_regex_vc71_mdsd/w32_regex_traits.obj vc71/boost_regex_vc71_mdsd/wide_posix_api.obj vc71/boost_regex_vc71_mdsd/winstances.obj
|
||||
|
@ -362,6 +362,27 @@ out="vc7.mak"
|
||||
no_single="no"
|
||||
subdir="vc7"
|
||||
vc6_gen
|
||||
#
|
||||
# generate vc7-stlport makefile:
|
||||
is_stlport="yes"
|
||||
out="vc7-stlport.mak"
|
||||
no_single="yes"
|
||||
subdir="vc7-stlport"
|
||||
vc6_stlp_gen
|
||||
#
|
||||
# generate vc71 makefile:
|
||||
is_stlport="no"
|
||||
out="vc71.mak"
|
||||
no_single="no"
|
||||
subdir="vc71"
|
||||
vc6_gen
|
||||
#
|
||||
# generate vc71-stlport makefile:
|
||||
is_stlport="yes"
|
||||
out="vc71-stlport.mak"
|
||||
no_single="yes"
|
||||
subdir="vc71-stlport"
|
||||
vc6_stlp_gen
|
||||
|
||||
|
||||
#
|
||||
@ -372,3 +393,4 @@ rm -f $tout $iout
|
||||
|
||||
|
||||
|
||||
|
||||
|
82
doc/Attic/bad_expression.html
Normal file
82
doc/Attic/bad_expression.html
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: bad_expression</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
<h2 align="center">class bad_expression</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<hr>
|
||||
<h3>Synopsis</h3>
|
||||
<p>#include <<a href="../../boost/regex/pattern_except.hpp">boost/pattern_except.hpp</a>></p>
|
||||
<p>The class <code>bad_expression</code> defines the type of objects thrown as
|
||||
exceptions to report errors during the conversion from a string representing a
|
||||
regular expression to a finite state machine. </p>
|
||||
<pre>
|
||||
<b>namespace</b> boost{
|
||||
|
||||
<b>class</b> bad_pattern : <b>public</b> std::runtime_error
|
||||
{
|
||||
<b>public</b>:
|
||||
<b>explicit</b> bad_pattern(<b>const</b> std::string& s) : std::runtime_error(s){};
|
||||
};
|
||||
|
||||
<b>class</b> bad_expression : <b>public</b> bad_pattern
|
||||
{
|
||||
<b>public</b>:
|
||||
bad_expression(<b>const</b> std::string& s) : bad_pattern(s) {}
|
||||
};
|
||||
|
||||
|
||||
} // namespace boost
|
||||
</pre>
|
||||
<h3>Description</h3>
|
||||
<pre>
|
||||
bad_expression(const string& what_arg);
|
||||
</pre>
|
||||
<p><b>Effects:</b> Constructs an object of class <code>bad_expression</code>.</p>
|
||||
<b></b>
|
||||
<p><b>Postcondition:</b> <code>strcmp(what(), what_arg.c_str()) == 0</code>.</p>
|
||||
<p>Footnotes: the class <i>bad_pattern</i> forms the base class for all
|
||||
pattern-matching exceptions, of which <i>bad_expression</i> is one. The choice
|
||||
of <i>std::runtime_error</i> as the base class for <i>bad_pattern</i> is moot;
|
||||
depending upon how the library is used exceptions may be either logic errors
|
||||
(programmer supplied expressions) or run time errors (user supplied
|
||||
expressions).</p>
|
||||
<p></p>
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
<p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
1293
doc/Attic/basic_regex.html
Normal file
1293
doc/Attic/basic_regex.html
Normal file
File diff suppressed because it is too large
Load Diff
232
doc/Attic/configuration.html
Normal file
232
doc/Attic/configuration.html
Normal file
@ -0,0 +1,232 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Configuration and setup</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">Configuration and setup</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<h2>Contents</h2>
|
||||
|
||||
<dl class="index">
|
||||
<dt><a href="#compiler">Compiler setup</a></dt>
|
||||
|
||||
<dt><a href="#locale">Locale and traits class selection</a></dt>
|
||||
|
||||
<dt><a href="#linkage">Linkage Options</a></dt>
|
||||
|
||||
<dt><a href="#algorithm">Algorithm Selection</a></dt>
|
||||
|
||||
<dt><a href="#tuning">Algorithm Tuning</a></dt>
|
||||
</dl>
|
||||
|
||||
<h3><a name="compiler"></a>Compiler setup.</h3>
|
||||
|
||||
<p>You shouldn't need to do anything special to configure
|
||||
boost.regex for use with your compiler - the <a href="../../config/index.html">boost.config</a> subsystem should already
|
||||
take care of it, if you do have problems (or you are using a
|
||||
particularly obscure compiler or platform) then <a href="../../config/index.html">boost.config</a> has a <a href="../../config/config.htm#config_script">configure</a> script.</p>
|
||||
|
||||
<h3><a name="locale"></a>Locale and traits class selection.</h3>
|
||||
|
||||
<p>The following macros (see <a href="../../../boost/regex/user.hpp">user.hpp</a>) control how
|
||||
boost.regex interacts with the user's locale:</p>
|
||||
|
||||
<table id="Table2" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="1">
|
||||
<tr>
|
||||
<td width="265">BOOST_REGEX_USE_C_LOCALE</td>
|
||||
<td>Forces boost.regex to use the global C locale in its traits
|
||||
class support: this is the default behavior on non-windows
|
||||
platforms, but MS Windows platforms normally use the Win32 API for
|
||||
locale support.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="265">BOOST_REGEX_USE_CPP_LOCALE</td>
|
||||
<td>Forces boost.regex to use std::locale in it's default traits
|
||||
class, regular expressions can then be imbued with an
|
||||
instance specific locale.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="265">BOOST_REGEX_NO_W32</td>
|
||||
<td>Tells boost.regex not to use any Win32 API's even when
|
||||
available (implies BOOST_REGEX_USE_C_LOCALE unless
|
||||
BOOST_REGEX_USE_CPP_LOCALE is set).</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<h3><a name="linkage"></a>Linkage Options</h3>
|
||||
|
||||
<table id="Table3" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="1">
|
||||
<tr>
|
||||
<td>BOOST_REGEX_DYN_LINK</td>
|
||||
<td>For Microsoft and Borland C++ builds, this tells boost.regex
|
||||
that it should link to the dll build of the boost.regex. By
|
||||
default boost.regex will link to its static library build, even if
|
||||
the dynamic C runtime library is in use.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>BOOST_REGEX_NO_LIB</td>
|
||||
<td>For Microsoft and Borland C++ builds, this tells boost.regex
|
||||
that it should not automatically select the library to link
|
||||
to.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<h3><a name="algorithm"></a>Algorithm Selection</h3>
|
||||
|
||||
<table id="Table4" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="1">
|
||||
<tr>
|
||||
<td width="253">BOOST_REGEX_V3</td>
|
||||
<td>Tells boost.regex to use the boost-1.30.0 matching algorithm,
|
||||
define only if you need maximum compatibility with previous
|
||||
behavior.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="253">BOOST_REGEX_RECURSIVE</td>
|
||||
<td>Tells boost.regex to use a stack-recursive matching
|
||||
algorithm. This is generally the fastest option (although
|
||||
there is very little in it), but can cause stack overflow in
|
||||
extreme cases, on Win32 this can be handled safely, but this is not
|
||||
the case on other platforms.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="253">BOOST_REGEX_NON_RECURSIVE</td>
|
||||
<td>Tells boost.regex to use a non-stack recursive matching
|
||||
algorithm, this can be slightly slower than the alternative, but is
|
||||
always safe no matter how pathological the regular
|
||||
expression. This is the default on non-Win32 platforms.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<h3><a name="tuning"></a>Algorithm Tuning</h3>
|
||||
|
||||
<p>The following option applies only if BOOST_REGEX_RECURSIVE is
|
||||
set.</p>
|
||||
|
||||
<table id="Table6" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="1">
|
||||
<tr>
|
||||
<td>BOOST_REGEX_HAS_MS_STACK_GUARD</td>
|
||||
<td>Tells boost.regex that Microsoft style __try - __except blocks
|
||||
are supported, and can be used to safely trap stack overflow.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p>The following options apply only if BOOST_REGEX_NON_RECURSIVE is
|
||||
set.</p>
|
||||
|
||||
<table id="Table5" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="1">
|
||||
<tr>
|
||||
<td>BOOST_REGEX_BLOCKSIZE</td>
|
||||
<td>In non-recursive mode, boost.regex uses largish blocks of
|
||||
memory to act as a stack for the state machine, the larger the
|
||||
block size then the fewer allocations that will take place.
|
||||
This defaults to 4096 bytes, which is large enough to match the
|
||||
vast majority of regular expressions without further
|
||||
allocations, however, you can choose smaller or larger values
|
||||
depending upon your platforms characteristics.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>BOOST_REGEX_MAX_BLOCKS</td>
|
||||
<td>Tells boost.regex how many blocks of size BOOST_REGEX_BLOCKSIZE
|
||||
it is permitted to use. If this value is exceeded then
|
||||
boost.regex will stop trying to find a match and throw a
|
||||
std::runtime_error. Defaults to 1024, don't forget to tweek
|
||||
this value if you alter BOOST_REGEX_BLOCKSIZE by much.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>BOOST_REGEX_MAX_CACHE_BLOCKS</td>
|
||||
<td>Tells boost.regex how many memory blocks to store in it's
|
||||
internal cache - memory blocks are taken from this cache rather
|
||||
than by calling ::operator new. Generally speeking this can
|
||||
be an order of magnitude faster than calling ::opertator new each
|
||||
time a memory block is required, but has the downside that
|
||||
boost.regex can end up caching a large chunk of memory (by default
|
||||
up to 16 blocks each of BOOST_REGEX_BLOCKSIZE size). If
|
||||
memory is tight then try defining this to 0 (disables all caching),
|
||||
or if that is too slow, then a value of 1 or 2, may be
|
||||
sufficient. On the other hand, on large multi-processor,
|
||||
multi-threaded systems, you may find that a higher value is in
|
||||
order.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
110
doc/Attic/contacts.html
Normal file
110
doc/Attic/contacts.html
Normal file
@ -0,0 +1,110 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Contacts</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1" >
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border=0></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">Contacts and Acknowledgements</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border=0></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<p>The author can be contacted at <a href="mailto:john_maddock@compuserve.com">
|
||||
john_maddock@compuserve.com</a>, the home page for this library is
|
||||
at <a href="http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm">
|
||||
http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm</a>,
|
||||
and the official boost version can be obtained from <a href="../libraries.htm">www.boost.org/libraries.htm</a>.</p>
|
||||
|
||||
<p>I am indebted to Robert Sedgewick's "Algorithms in C++" for
|
||||
forcing me to think about algorithms and their performance, and to
|
||||
the folks at boost for forcing me to <i>think</i>, period. The
|
||||
following people have all contributed useful comments or fixes:
|
||||
Dave Abrahams, Mike Allison, Edan Ayal, Jayashree Balasubramanian,
|
||||
Jan B<>lsche, Beman Dawes, Paul Baxter, David Bergman, David
|
||||
Dennerline, Edward Diener, Peter Dimov, Robert Dunn, Fabio Forno,
|
||||
Tobias Gabrielsson, Rob Gillen, Marc Gregoire, Chris Hecker, Nick
|
||||
Hodapp, Jesse Jones, Martin Jost, Boris Krasnovskiy, Jan Hermelink,
|
||||
Max Leung, Wei-hao Lin, Jens Maurer, Richard Peters, Heiko Schmidt,
|
||||
Jason Shirk, Gerald Slacik, Scobie Smith, Mike Smyth, Alexander
|
||||
Sokolovsky, Herv<72> Poirier, Michael Raykh, Marc Recht, Scott
|
||||
VanCamp, Bruno Voigt, Alexey Voinov, Jerry Waldorf, Rob Ward,
|
||||
Lealon Watts, Thomas Witt and Yuval Yosef. I am also grateful to
|
||||
the manuals supplied with the Henry Spencer, Perl and GNU regular
|
||||
expression libraries - wherever possible I have tried to maintain
|
||||
compatibility with these libraries and with the POSIX standard -
|
||||
the code however is entirely my own, including any bugs! I can
|
||||
absolutely guarantee that I will not fix any bugs I don't know
|
||||
about, so if you have any comments or spot any bugs, please get in
|
||||
touch.</p>
|
||||
|
||||
<p>Useful further information can be found at:</p>
|
||||
|
||||
<p>A short tutorial on regular expressions <a href="http://www.devshed.com/Server_Side/Administration/RegExp/">can be
|
||||
found here</a>.</p>
|
||||
|
||||
<p>The <a href="http://www.opengroup.org/onlinepubs/7908799/toc.htm">Open Unix
|
||||
Specification</a> contains a wealth of useful material, including
|
||||
the regular expression syntax, and specifications for <a href="http://www.opengroup.org/onlinepubs/7908799/xsh/regex.h.html">
|
||||
<regex.h></a> and <a href="http://www.opengroup.org/onlinepubs/7908799/xsh/nl_types.h.html">
|
||||
<nl_types.h></a>.</p>
|
||||
|
||||
<p>The <a href="http://www.cs.ucr.edu/~stelo/pattern.html">Pattern
|
||||
Matching Pointers</a> site is a "must visit" resource for anyone
|
||||
interested in pattern matching.</p>
|
||||
|
||||
<p><a href="http://glimpse.cs.arizona.edu/">Glimpse and Agrep</a>,
|
||||
use a simplified regular expression syntax to achieve faster search
|
||||
times.</p>
|
||||
|
||||
<p><a href="http://glimpse.cs.arizona.edu/udi.html">Udi Manber</a>
|
||||
and <a href="http://www.dcc.uchile.cl/~rbaeza/">Ricardo
|
||||
Baeza-Yates</a> both have a selection of useful pattern matching
|
||||
papers available from their respective web sites.</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
99
doc/Attic/examples.html
Normal file
99
doc/Attic/examples.html
Normal file
@ -0,0 +1,99 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Examples</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><IMG height="86" alt="C++ Boost" src="../../../c++boost.gif" width="277" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
<h2 align="center">Examples</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><IMG height="45" alt="Boost.Regex Index" src="uarrow.gif" width="43" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<BR>
|
||||
<HR>
|
||||
<P>There are three demo applications that ship with this library, they all come
|
||||
with makefiles for Borland, Microsoft and gcc compilers, otherwise you will
|
||||
have to create your own makefiles.</P>
|
||||
<H5>regress.exe:</H5>
|
||||
<P>A regression test application that gives the matching/searching algorithms a
|
||||
full workout. The presence of this program is your guarantee that the library
|
||||
will behave as claimed - at least as far as those items tested are concerned -
|
||||
if anyone spots anything that isn't being tested I'd be glad to hear about it.</P>
|
||||
<P>Files: <A href="../test/regress/parse.cpp">parse.cpp</A>, <A href="../test/regress/regress.cpp">
|
||||
regress.cpp</A>, <A href="../test/regress/tests.cpp">tests.cpp</A>.</P>
|
||||
<H5>jgrep.exe</H5>
|
||||
<P>A simple grep implementation, run with no command line options to find out its
|
||||
usage. Look at <A href="../src/fileiter.cpp">fileiter.cpp</A>/fileiter.hpp and
|
||||
the mapfile class to see an example of a "smart" bidirectional iterator that
|
||||
can be used with boost.regex or any other STL algorithm.</P>
|
||||
<P>Files: <A href="../example/jgrep/jgrep.cpp">jgrep.cpp</A>, <A href="../example/jgrep/main.cpp">
|
||||
main.cpp</A>.</P>
|
||||
<H5>timer.exe</H5>
|
||||
<P>A simple interactive expression matching application, the results of all
|
||||
matches are timed, allowing the programmer to optimize their regular
|
||||
expressions where performance is critical.</P>
|
||||
<P>Files: <A href="../example/timer/regex_timer.cpp">regex_timer.cpp</A>.</P>
|
||||
<H5>Code snippets</H5>
|
||||
<P>The snippets examples contain the code examples used in the documentation:</P>
|
||||
<P><A href="../example/snippets/credit_card_example.cpp">credit_card_example.cpp</A>:
|
||||
Credit card number formatting code.</P>
|
||||
<P><A href="../example/snippets/partial_regex_grep.cpp">partial_regex_grep.cpp</A>:
|
||||
Search example using partial matches.</P>
|
||||
<P><A href="../example/snippets/partial_regex_match.cpp">partial_regex_match.cpp</A>:
|
||||
regex_match example using partial matches.</P>
|
||||
<P><A href="../example/snippets/regex_grep_example_1.cpp">regex_grep_example_1.cpp</A>:
|
||||
regex_grep example 1: searches a cpp file for class definitions.</P>
|
||||
<P><A href="../example/snippets/regex_grep_example_2.cpp">regex_grep_example_2.cpp</A>:
|
||||
regex_grep example 2: searches a cpp file for class definitions, using a global
|
||||
callback function.</P>
|
||||
<P><A href="../example/snippets/regex_grep_example_3.cpp">regex_grep_example_3.cpp</A>:
|
||||
regex_grep example 2: searches a cpp file for class definitions, using a bound
|
||||
member function callback.</P>
|
||||
<P><A href="../example/snippets/regex_grep_example_4.cpp">regex_grep_example_4.cpp</A>:
|
||||
regex_grep example 2: searches a cpp file for class definitions, using a C++
|
||||
Builder closure as a callback.</P>
|
||||
<P><A href="../example/snippets/regex_match_example.cpp">regex_match_example.cpp</A>:
|
||||
ftp based regex_match example.</P>
|
||||
<P><A href="../example/snippets/regex_merge_example.cpp">regex_merge_example.cpp</A>:
|
||||
regex_merge example: converts a C++ file to syntax highlighted HTML.</P>
|
||||
<P><A href="../example/snippets/regex_replace_example.cpp">regex_replace_example.cpp</A>:
|
||||
regex_replace example: converts a C++ file to syntax highlighted HTML</P>
|
||||
<P><A href="../example/snippets/regex_search_example.cpp">regex_search_example.cpp</A>:
|
||||
regex_search example: searches a cpp file for class definitions.</P>
|
||||
<P><A href="../example/snippets/regex_split_example_1.cpp">regex_split_example_1.cpp</A>:
|
||||
regex_split example: split a string into tokens.</P>
|
||||
<P><A href="../example/snippets/regex_split_example_2.cpp">regex_split_example_2.cpp</A>
|
||||
: regex_split example: spit out linked URL's.</P>
|
||||
<P></P>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
<p><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
162
doc/Attic/faq.html
Normal file
162
doc/Attic/faq.html
Normal file
@ -0,0 +1,162 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: FAQ</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">FAQ</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<font color="#ff0000"><font color="#ff0000"></font></font>
|
||||
<p><font color="#ff0000"><font color="#ff0000"><font color=
|
||||
"#ff0000"> Q. Why can't I use the "convenience" versions of
|
||||
regex_match / regex_search / regex_grep / regex_format /
|
||||
regex_merge?</font></font></font></p>
|
||||
|
||||
<p>A. These versions may or may not be available depending upon the
|
||||
capabilities of your compiler, the rules determining the format of
|
||||
these functions are quite complex - and only the versions visible
|
||||
to a standard compliant compiler are given in the help. To find out
|
||||
what your compiler supports, run <boost/regex.hpp> through
|
||||
your C++ pre-processor, and search the output file for the function
|
||||
that you are interested in.<font color="#ff0000"><font color=
|
||||
"#ff0000"></font></font></p>
|
||||
|
||||
<p><font color="#ff0000"><font color="#ff0000">Q. I can't get
|
||||
regex++ to work with escape characters, what's going
|
||||
on?</font></font></p>
|
||||
|
||||
<p>A. If you embed regular expressions in C++ code, then remember
|
||||
that escape characters are processed twice: once by the C++
|
||||
compiler, and once by the regex++ expression compiler, so to pass
|
||||
the regular expression \d+ to regex++, you need to embed "\\d+" in
|
||||
your code. Likewise to match a literal backslash you will need to
|
||||
embed "\\\\" in your code. <font color="#ff0000"></font></p>
|
||||
|
||||
<p><font color="#ff0000">Q. Why does using parenthesis in a POSIX
|
||||
regular expression change the result of a match?</font></p>
|
||||
|
||||
<p>For POSIX (extended and basic) regular expressions, but not for
|
||||
perl regexes, parentheses don't only mark; they determine what the
|
||||
best match is as well. When the expression is compiled as a POSIX
|
||||
basic or extended regex then Boost.regex follows the POSIX standard
|
||||
leftmost longest rule for determining what matched. So if there is
|
||||
more than one possible match after considering the whole
|
||||
expression, it looks next at the first sub-expression and then the
|
||||
second sub-expression and so on. So...</p>
|
||||
|
||||
<pre>
|
||||
"(0*)([0-9]*)" against "00123" would produce
|
||||
$1 = "00"
|
||||
$2 = "123"
|
||||
</pre>
|
||||
|
||||
<p>where as</p>
|
||||
|
||||
<pre>
|
||||
"0*([0-9)*" against "00123" would produce
|
||||
$1 = "00123"
|
||||
</pre>
|
||||
|
||||
<p>If you think about it, had $1 only matched the "123", this would
|
||||
be "less good" than the match "00123" which is both further to the
|
||||
left and longer. If you want $1 to match only the "123" part, then
|
||||
you need to use something like:</p>
|
||||
|
||||
<pre>
|
||||
"0*([1-9][0-9]*)"
|
||||
</pre>
|
||||
|
||||
<p>as the expression.</p>
|
||||
|
||||
<p><font color="#ff0000">Q. Why don't character ranges work
|
||||
properly (POSIX mode only)?</font><br>
|
||||
A. The POSIX standard specifies that character range expressions
|
||||
are locale sensitive - so for example the expression [A-Z] will
|
||||
match any collating element that collates between 'A' and 'Z'. That
|
||||
means that for most locales other than "C" or "POSIX", [A-Z] would
|
||||
match the single character 't' for example, which is not what most
|
||||
people expect - or at least not what most people have come to
|
||||
expect from regular expression engines. For this reason, the
|
||||
default behaviour of boost.regex (perl mode) is to turn locale
|
||||
sensitive collation off by not setting the regex_constants::collate
|
||||
compile time flag. However if you set a non-default compile time
|
||||
flag - for example regex_constants::extended or
|
||||
regex_constants::basic, then locale dependent collation will be
|
||||
enabled, this also applies to the POSIX API functions which use
|
||||
either regex_constants::extended or regex_constants::basic
|
||||
internally. <i>[Note - when regex_constants::nocollate in effect,
|
||||
the library behaves "as if" the LC_COLLATE locale category were
|
||||
always "C", regardless of what its actually set to - end
|
||||
note</i>].</p>
|
||||
|
||||
<p><font color="#ff0000">Q. Why are there no throw specifications
|
||||
on any of the functions? What exceptions can the library
|
||||
throw?</font></p>
|
||||
|
||||
<p>A. Not all compilers support (or honor) throw specifications,
|
||||
others support them but with reduced efficiency. Throw
|
||||
specifications may be added at a later date as compilers begin to
|
||||
handle this better. The library should throw only three types of
|
||||
exception: boost::bad_expression can be thrown by basic_regex when
|
||||
compiling a regular expression, std::runtime_error can be thrown
|
||||
when a call to basic_regex::imbue tries to open a message catalogue
|
||||
that doesn't exist, or when a call to regex_search or regex_match
|
||||
results in an "everlasting" search, or when a call to
|
||||
RegEx::GrepFiles or RegEx::FindFiles tries to open a file that
|
||||
cannot be opened, finally std::bad_alloc can be thrown by just
|
||||
about any of the functions in this library.</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
272
doc/Attic/format_syntax.html
Normal file
272
doc/Attic/format_syntax.html
Normal file
@ -0,0 +1,272 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: Format String Syntax</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">Format String Syntax</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<p>Format strings are used by the algorithm <a href="template_class_ref.htm#reg_merge">regex_merge</a> and by <a
|
||||
href="match_results.html">match_results::format</a>, and are used
|
||||
to transform one string into another.</p>
|
||||
|
||||
<p>There are three kind of format string: sed, Perl and extended,
|
||||
the extended syntax is a superset of the others so this is covered
|
||||
first.</p>
|
||||
|
||||
<p><b><i>Extended format syntax</i></b></p>
|
||||
|
||||
<p>In format strings, all characters are treated as literals
|
||||
except: ()$\?:</p>
|
||||
|
||||
<p>To use any of these as literals you must prefix them with the
|
||||
escape character \</p>
|
||||
|
||||
<p>The following special sequences are recognized: <br>
|
||||
<br>
|
||||
<i>Grouping:</i></p>
|
||||
|
||||
<p>Use the parenthesis characters ( and ) to group sub-expressions
|
||||
within the format string, use \( and \) to represent literal '('
|
||||
and ')'. <br>
|
||||
<br>
|
||||
<i>Sub-expression expansions:</i></p>
|
||||
|
||||
<p>The following Perl like expressions expand to a particular
|
||||
matched sub-expression:<br>
|
||||
</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table id="Table2" cellspacing="0" cellpadding="7" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">$`</td>
|
||||
<td valign="top" width="43%">Expands to all the text from the end
|
||||
of the previous match to the start of the current match, if there
|
||||
was no previous match in the current operation, then everything
|
||||
from the start of the input string to the start of the match.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">$'</td>
|
||||
<td valign="top" width="43%">Expands to all the text from the end
|
||||
of the match to the end of the input string.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">$&</td>
|
||||
<td valign="top" width="43%">Expands to all of the current
|
||||
match.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">$0</td>
|
||||
<td valign="top" width="43%">Expands to all of the current
|
||||
match.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">$N</td>
|
||||
<td valign="top" width="43%">Expands to the text that matched
|
||||
sub-expression <i>N</i>.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p><i>Conditional expressions:</i></p>
|
||||
|
||||
<p>Conditional expressions allow two different format strings to be
|
||||
selected dependent upon whether a sub-expression participated in
|
||||
the match or not:</p>
|
||||
|
||||
<p>?Ntrue_expression:false_expression</p>
|
||||
|
||||
<p>Executes true_expression if sub-expression <i>N</i> participated
|
||||
in the match, otherwise executes false_expression.</p>
|
||||
|
||||
<p>Example: suppose we search for "(while)|(for)" then the format
|
||||
string "?1WHILE:FOR" would output what matched, but in upper
|
||||
case. <br>
|
||||
<br>
|
||||
<i>Escape sequences:</i></p>
|
||||
|
||||
<p>The following escape sequences are also allowed:<br>
|
||||
</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table id="Table3" cellspacing="0" cellpadding="7" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\a</td>
|
||||
<td valign="top" width="43%">The bell character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\f</td>
|
||||
<td valign="top" width="43%">The form feed character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\n</td>
|
||||
<td valign="top" width="43%">The newline character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\r</td>
|
||||
<td valign="top" width="43%">The carriage return character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\t</td>
|
||||
<td valign="top" width="43%">The tab character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\v</td>
|
||||
<td valign="top" width="43%">A vertical tab character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\x</td>
|
||||
<td valign="top" width="43%">A hexadecimal character - for example
|
||||
\x0D.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\x{}</td>
|
||||
<td valign="top" width="43%">A possible Unicode hexadecimal
|
||||
character - for example \x{1A0}</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\cx</td>
|
||||
<td valign="top" width="43%">The ASCII escape character x, for
|
||||
example \c@ is equivalent to escape-@.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\e</td>
|
||||
<td valign="top" width="43%">The ASCII escape character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\dd</td>
|
||||
<td valign="top" width="43%">An octal character constant, for
|
||||
example \10.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p><b><i>Perl format strings</i></b></p>
|
||||
|
||||
<p>Perl format strings are the same as the default syntax except
|
||||
that the characters ()?: have no special meaning.</p>
|
||||
|
||||
<p><b><i>Sed format strings</i></b></p>
|
||||
|
||||
<p>Sed format strings use only the characters \ and & as
|
||||
special characters.</p>
|
||||
|
||||
<p>\n where n is a digit, is expanded to the nth
|
||||
sub-expression.</p>
|
||||
|
||||
<p>& is expanded to the whole of the match (equivalent to
|
||||
\0).</p>
|
||||
|
||||
<p>Other escape sequences are expanded as per the default
|
||||
syntax.</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
52
doc/Attic/headers.html
Normal file
52
doc/Attic/headers.html
Normal file
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Headers</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Headers</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>There are two main headers used by this library: <boost/regex.hpp>
|
||||
provides full access to the entire library, while <boost/cregex.hpp>
|
||||
provides access to just the high level class RegEx, and the POSIX API
|
||||
functions.
|
||||
</P>
|
||||
<P>There is also a header containing only forward declarations
|
||||
<boost/regex_fwd.hpp> for use when an interface is dependent upon
|
||||
boost::basic_regex, but otherwise does not need the full definitions.</P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
58
doc/Attic/history.html
Normal file
58
doc/Attic/history.html
Normal file
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: History</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">History</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>Boost 1.31.0.</P>
|
||||
<UL>
|
||||
<LI>
|
||||
Completely rewritten pattern matching code - it is now up to 10 times faster
|
||||
than before.</LI>
|
||||
<LI>
|
||||
Reorganized documentation.</LI>
|
||||
<LI>
|
||||
Deprecated all interfaces that are not part of the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
|
||||
regular expression standardization proposal</A>.</LI>
|
||||
<LI>
|
||||
Added regex_iterator and regex_token_iterator.</LI>
|
||||
<LI>
|
||||
Added support for Perl style independent sub-expressions.</LI></UL>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
45
doc/Attic/implementation.html
Normal file
45
doc/Attic/implementation.html
Normal file
@ -0,0 +1,45 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Implementation</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Implementation</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>Todo.</P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
237
doc/Attic/install.html
Normal file
237
doc/Attic/install.html
Normal file
@ -0,0 +1,237 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Index</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Installation</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P><EM>[ </EM><STRONG><I>Important</I></STRONG><EM>: If you are upgrading from the
|
||||
2.x version of this library then you will find a number of changes to the
|
||||
documented header names and library interfaces, existing code should still
|
||||
compile unchanged however - see </EM><A href="appendix.htm#upgrade"><FONT color="#0000ff">
|
||||
<EM>Note for Upgraders</EM></FONT></A><EM>. ]</EM></P>
|
||||
<P>When you extract the library from its zip file, you must preserve its internal
|
||||
directory structure (for example by using the -d option when extracting). If
|
||||
you didn't do that when extracting, then you'd better stop reading this, delete
|
||||
the files you just extracted, and try again!
|
||||
</P>
|
||||
<P>This library should not need configuring before use; most popular
|
||||
compilers/standard libraries/platforms are already supported "as is". If you do
|
||||
experience configuration problems, or just want to test the configuration with
|
||||
your compiler, then the process is the same as for all of boost; see the <A href="../config/config.htm">
|
||||
configuration library documentation</A>.</P>
|
||||
<P>The library will encase all code inside namespace boost.
|
||||
</P>
|
||||
<P>Unlike some other template libraries, this library consists of a mixture of
|
||||
template code (in the headers) and static code and data (in cpp files).
|
||||
Consequently it is necessary to build the library's support code into a library
|
||||
or archive file before you can use it, instructions for specific platforms are
|
||||
as follows:
|
||||
</P>
|
||||
<P><B><A name="bcb"></A>Borland C++ Builder:</B>
|
||||
</P>
|
||||
<UL>
|
||||
<LI>
|
||||
Open up a console window and change to the <boost>\libs\regex\build
|
||||
directory.
|
||||
<LI>
|
||||
Select the appropriate makefile (bcb4.mak for C++ Builder 4, bcb5.mak for C++
|
||||
Builder 5, and bcb6.mak for C++ Builder 6).
|
||||
<LI>
|
||||
Invoke the makefile (pass the full path to your version of make if you have
|
||||
more than one version installed, the makefile relies on the path to make to
|
||||
obtain your C++ Builder installation directory and tools) for example:
|
||||
</LI>
|
||||
</UL>
|
||||
<PRE>make -fbcb5.mak</PRE>
|
||||
<P>The build process will build a variety of .lib and .dll files (the exact number
|
||||
depends upon the version of Borland's tools you are using) the .lib and dll
|
||||
files will be in a sub-directory called bcb4 or bcb5 depending upon the
|
||||
makefile used. To install the libraries into your development system use:</P>
|
||||
<P>make -fbcb5.mak install</P>
|
||||
<P>library files will be copied to <BCROOT>/lib and the dll's to
|
||||
<BCROOT>/bin, where <BCROOT> corresponds to the install path of
|
||||
your Borland C++ tools.
|
||||
</P>
|
||||
<P>You may also remove temporary files created during the build process (excluding
|
||||
lib and dll files) by using:</P>
|
||||
<P>make -fbcb5.mak clean</P>
|
||||
<P>Finally when you use regex++ it is only necessary for you to add the
|
||||
<boost> root director to your list of include directories for that
|
||||
project. It is not necessary for you to manually add a .lib file to the
|
||||
project; the headers will automatically select the correct .lib file for your
|
||||
build mode and tell the linker to include it. There is one caveat however: the
|
||||
library can not tell the difference between VCL and non-VCL enabled builds when
|
||||
building a GUI application from the command line, if you build from the command
|
||||
line with the 5.5 command line tools then you must define the pre-processor
|
||||
symbol _NO_VCL in order to ensure that the correct link libraries are selected:
|
||||
the C++ Builder IDE normally sets this automatically. Hint, users of the 5.5
|
||||
command line tools may want to add a -D_NO_VCL to bcc32.cfg in order to set
|
||||
this option permanently.
|
||||
</P>
|
||||
<P>If you would prefer to do a static link to the regex libraries even when using
|
||||
the dll runtime then define BOOST_REGEX_STATIC_LINK, and if you want to
|
||||
suppress automatic linking altogether (and supply your own custom build of the
|
||||
lib) then define BOOST_REGEX_NO_LIB.</P>
|
||||
<P>If you are building with C++ Builder 6, you will find that
|
||||
<boost/regex.hpp> can not be used in a pre-compiled header (the actual
|
||||
problem is in <locale> which gets included by <boost/regex.hpp>),
|
||||
if this causes problems for you, then try defining BOOST_NO_STD_LOCALE when
|
||||
building, this will disable some features throughout boost, but may save you a
|
||||
lot in compile times!</P>
|
||||
<P><B><A name="vc"></A>Microsoft Visual C++ 6</B><STRONG> and 7</STRONG></P>
|
||||
<P>You need version 6 of MSVC to build this library. If you are using VC5 then you
|
||||
may want to look at one of the previous releases of this <A href="http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm">
|
||||
library</A>
|
||||
</P>
|
||||
<P>Open up a command prompt, which has the necessary MSVC environment variables
|
||||
defined (for example by using the batch file Vcvars32.bat installed by the
|
||||
Visual Studio installation), and change to the <boost>\libs\regex\build
|
||||
directory.
|
||||
</P>
|
||||
<P>Select the correct makefile - vc6.mak for "vanilla" Visual C++ 6 or
|
||||
vc6-stlport.mak if you are using STLPort.</P>
|
||||
<P>Invoke the makefile like this:</P>
|
||||
<P>nmake -fvc6.mak</P>
|
||||
<P>You will now have a collection of lib and dll files in a "vc6" subdirectory, to
|
||||
install these into your development system use:</P>
|
||||
<P>nmake -fvc6.mak install</P>
|
||||
<P>The lib files will be copied to your <VC6>\lib directory and the dll
|
||||
files to <VC6>\bin, where <VC6> is the root of your Visual C++ 6
|
||||
installation.</P>
|
||||
<P>You can delete all the temporary files created during the build (excluding lib
|
||||
and dll files) using:</P>
|
||||
<P>nmake -fvc6.mak clean
|
||||
</P>
|
||||
<P>Finally when you use regex++ it is only necessary for you to add the
|
||||
<boost> root directory to your list of include directories for that
|
||||
project. It is not necessary for you to manually add a .lib file to the
|
||||
project; the headers will automatically select the correct .lib file for your
|
||||
build mode and tell the linker to include it.
|
||||
</P>
|
||||
<P>Note that if you want to statically link to the regex library when using the
|
||||
dynamic C++ runtime, define BOOST_REGEX_STATIC_LINK when building your project
|
||||
(this only has an effect for release builds). If you want to add the source
|
||||
directly to your project then define BOOST_REGEX_NO_LIB to disable automatic
|
||||
library selection.</P>
|
||||
<P><STRONG><I>Important</I></STRONG><EM>: there have been some reports of
|
||||
compiler-optimization bugs affecting this library, (particularly with VC6
|
||||
versions prior to service patch 5) the workaround is to build the library using
|
||||
/Oityb1 rather than /O2. That is to use all optimization settings except /Oa.
|
||||
This problem is reported to affect some standard library code as well (in fact
|
||||
I'm not sure if the problem is with the regex code or the underlying standard
|
||||
library), so it's probably worthwhile applying this workaround in normal
|
||||
practice in any case.</EM></P>
|
||||
<P>Note: if you have replaced the C++ standard library that comes with VC6, then
|
||||
when you build the library you must ensure that the environment variables
|
||||
"INCLUDE" and "LIB" have been updated to reflect the include and library paths
|
||||
for the new library - see vcvars32.bat (part of your Visual Studio
|
||||
installation) for more details. Alternatively if STLPort is in c:/stlport then
|
||||
you could use:</P>
|
||||
<P>nmake INCLUDES="-Ic:/stlport/stlport" XLFLAGS="/LIBPATH:c:/stlport/lib"
|
||||
-fvc6-stlport.mak</P>
|
||||
<P>If you are building with the full STLPort v4.x, then use the vc6-stlport.mak
|
||||
file provided and set the environment variable STLPORT_PATH to point to the
|
||||
location of your STLport installation (Note that the full STLPort libraries
|
||||
appear not to support single-thread static builds).
|
||||
<BR>
|
||||
|
||||
<BR>
|
||||
|
||||
</P>
|
||||
<P><B><A name="gcc"></A>GCC(2.95 and 3.x)</B>
|
||||
</P>
|
||||
<P>There is a conservative makefile for the g++ compiler. From the command prompt
|
||||
change to the <boost>/libs/regex/build directory and type:
|
||||
</P>
|
||||
<P>make -fgcc.mak
|
||||
</P>
|
||||
<P>At the end of the build process you should have a gcc sub-directory containing
|
||||
release and debug versions of the library (libboost_regex.a and
|
||||
libboost_regex_debug.a). When you build projects that use regex++, you will
|
||||
need to add the boost install directory to your list of include paths and add
|
||||
<boost>/libs/regex/build/gcc/libboost_regex.a to your list of library
|
||||
files.
|
||||
</P>
|
||||
<P>There is also a makefile to build the library as a shared library:</P>
|
||||
<P>make -fgcc-shared.mak</P>
|
||||
<P>which will build libboost_regex.so and libboost_regex_debug.so.</P>
|
||||
<P>Both of the these makefiles support the following environment variables:</P>
|
||||
<P>CXXFLAGS: extra compiler options - note that this applies to both the debug and
|
||||
release builds.</P>
|
||||
<P>INCLUDES: additional include directories.</P>
|
||||
<P>LDFLAGS: additional linker options.</P>
|
||||
<P>LIBS: additional library files.</P>
|
||||
<P>For the more adventurous there is a configure script in
|
||||
<boost>/libs/config; see the <A href="../config/config.htm">config library
|
||||
documentation</A>.</P>
|
||||
<P><B><A name="sun"></A>Sun Workshop 6.1</B></P>
|
||||
<P>There is a makefile for the sun (6.1) compiler (C++ version 3.12). From the
|
||||
command prompt change to the <boost>/libs/regex/build directory and type:
|
||||
</P>
|
||||
<P>dmake -f sunpro.mak
|
||||
</P>
|
||||
<P>At the end of the build process you should have a sunpro sub-directory
|
||||
containing single and multithread versions of the library (libboost_regex.a,
|
||||
libboost_regex.so, libboost_regex_mt.a and libboost_regex_mt.so). When you
|
||||
build projects that use regex++, you will need to add the boost install
|
||||
directory to your list of include paths and add
|
||||
<boost>/libs/regex/build/sunpro/ to your library search path.
|
||||
</P>
|
||||
<P>Both of the these makefiles support the following environment variables:</P>
|
||||
<P>CXXFLAGS: extra compiler options - note that this applies to both the single
|
||||
and multithreaded builds.</P>
|
||||
<P>INCLUDES: additional include directories.</P>
|
||||
<P>LDFLAGS: additional linker options.</P>
|
||||
<P>LIBS: additional library files.</P>
|
||||
<P>LIBSUFFIX: a suffix to mangle the library name with (defaults to nothing).</P>
|
||||
<P>This makefile does not set any architecture specific options like -xarch=v9,
|
||||
you can set these by defining the appropriate macros, for example:</P>
|
||||
<P>dmake CXXFLAGS="-xarch=v9" LDFLAGS="-xarch=v9" LIBSUFFIX="_v9" -f sunpro.mak</P>
|
||||
<P>will build v9 variants of the regex library named libboost_regex_v9.a etc.</P>
|
||||
<P><B><A name="other"></A>Other compilers:</B>
|
||||
</P>
|
||||
<P>There is a generic makefile (<A href="build/generic.mak">generic.mak</A>)
|
||||
provided in <boost-root>/libs/regex/build - see that makefile for details
|
||||
of environment variables that need to be set before use. Alternatively you can
|
||||
using the <A href="../../tools/build/index.html">Jam based build system</A>. If
|
||||
you need to configure the library for your platform, then refer to the <A href="../config/config.htm">
|
||||
config library documentation</A>
|
||||
.
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
176
doc/Attic/introduction.html
Normal file
176
doc/Attic/introduction.html
Normal file
@ -0,0 +1,176 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Introduction</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Introduction</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>Regular expressions are a form of pattern-matching that are often used in text
|
||||
processing; many users will be familiar with the Unix utilities <I>grep</I>, <I>sed</I>
|
||||
and <I>awk</I>, and the programming language <I>Perl</I>, each of which make
|
||||
extensive use of regular expressions. Traditionally C++ users have been limited
|
||||
to the POSIX C API's for manipulating regular expressions, and while regex++
|
||||
does provide these API's, they do not represent the best way to use the
|
||||
library. For example regex++ can cope with wide character strings, or search
|
||||
and replace operations (in a manner analogous to either sed or Perl), something
|
||||
that traditional C libraries can not do.</P>
|
||||
<P>The class <A href="basic_regex.html">boost::basic_regex</A> is the key class in
|
||||
this library; it represents a "machine readable" regular expression, and is
|
||||
very closely modeled on std::basic_string, think of it as a string plus the
|
||||
actual state-machine required by the regular expression algorithms. Like
|
||||
std::basic_string there are two typedefs that are almost always the means by
|
||||
which this class is referenced:</P>
|
||||
<pre><B>namespace </B>boost{
|
||||
|
||||
<B>template</B> <<B>class</B> charT,
|
||||
<B> class</B> traits = regex_traits<charT>,
|
||||
<B>class</B> Allocator = std::allocator<charT> >
|
||||
<B>class</B> basic_regex;
|
||||
|
||||
<B>typedef</B> basic_regex<<B>char</B>> regex;
|
||||
<B>typedef</B> basic_regex<<B>wchar_t></B> wregex;
|
||||
|
||||
}</pre>
|
||||
<P>To see how this library can be used, imagine that we are writing a credit card
|
||||
processing application. Credit card numbers generally come as a string of
|
||||
16-digits, separated into groups of 4-digits, and separated by either a space
|
||||
or a hyphen. Before storing a credit card number in a database (not necessarily
|
||||
something your customers will appreciate!), we may want to verify that the
|
||||
number is in the correct format. To match any digit we could use the regular
|
||||
expression [0-9], however ranges of characters like this are actually locale
|
||||
dependent. Instead we should use the POSIX standard form [[:digit:]], or the
|
||||
regex++ and Perl shorthand for this \d (note that many older libraries tended
|
||||
to be hard-coded to the C-locale, consequently this was not an issue for them).
|
||||
That leaves us with the following regular expression to validate credit card
|
||||
number formats:</P>
|
||||
<P>(\d{4}[- ]){3}\d{4}</P>
|
||||
<P>Here the parenthesis act to group (and mark for future reference)
|
||||
sub-expressions, and the {4} means "repeat exactly 4 times". This is an example
|
||||
of the extended regular expression syntax used by Perl, awk and egrep. Regex++
|
||||
also supports the older "basic" syntax used by sed and grep, but this is
|
||||
generally less useful, unless you already have some basic regular expressions
|
||||
that you need to reuse.</P>
|
||||
<P>Now let's take that expression and place it in some C++ code to validate the
|
||||
format of a credit card number:</P>
|
||||
<PRE><B>bool</B> validate_card_format(<B>const</B> std::string s)
|
||||
{
|
||||
<B>static</B> <B>const</B> <A href="basic_regex.html">boost::regex</A> e("(\\d{4}[- ]){3}\\d{4}");
|
||||
<B>return</B> <A href="regex_match.html">regex_match</A>(s, e);
|
||||
}</PRE>
|
||||
<P>Note how we had to add some extra escapes to the expression: remember that the
|
||||
escape is seen once by the C++ compiler, before it gets to be seen by the
|
||||
regular expression engine, consequently escapes in regular expressions have to
|
||||
be doubled up when embedding them in C/C++ code. Also note that all the
|
||||
examples assume that your compiler supports Koenig lookup, if yours doesn't
|
||||
(for example VC6), then you will have to add some boost:: prefixes to some of
|
||||
the function calls in the examples.</P>
|
||||
<P>Those of you who are familiar with credit card processing, will have realized
|
||||
that while the format used above is suitable for human readable card numbers,
|
||||
it does not represent the format required by online credit card systems; these
|
||||
require the number as a string of 16 (or possibly 15) digits, without any
|
||||
intervening spaces. What we need is a means to convert easily between the two
|
||||
formats, and this is where search and replace comes in. Those who are familiar
|
||||
with the utilities <I>sed</I> and <I>Perl</I> will already be ahead here; we
|
||||
need two strings - one a regular expression - the other a "<A href="format_syntax.html">format
|
||||
string</A>" that provides a description of the text to replace the match
|
||||
with. In regex++ this search and replace operation is performed with the
|
||||
algorithm regex_replace, for our credit card example we can write two algorithms
|
||||
like this to provide the format conversions:</P>
|
||||
<PRE><I>// match any format with the regular expression:
|
||||
</I><B>const</B> boost::regex e("\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z");
|
||||
<B>const</B> std::string machine_format("\\1\\2\\3\\4");
|
||||
<B>const</B> std::string human_format("\\1-\\2-\\3-\\4");
|
||||
|
||||
std::string machine_readable_card_number(<B>const</B> std::string s)
|
||||
{
|
||||
<B>return</B> <A href="regex_replace.html">regex_replace</A>(s, e, machine_format, boost::match_default | boost::format_sed);
|
||||
}
|
||||
|
||||
std::string human_readable_card_number(<B>const</B> std::string s)
|
||||
{
|
||||
<B>return</B> <A href="regex_replace.html">regex_replace</A>(s, e, human_format, boost::match_default | boost::format_sed);
|
||||
}</PRE>
|
||||
<P>Here we've used marked sub-expressions in the regular expression to split out
|
||||
the four parts of the card number as separate fields, the format string then
|
||||
uses the sed-like syntax to replace the matched text with the reformatted
|
||||
version.</P>
|
||||
<P>In the examples above, we haven't directly manipulated the results of a regular
|
||||
expression match, however in general the result of a match contains a number of
|
||||
sub-expression matches in addition to the overall match. When the library needs
|
||||
to report a regular expression match it does so using an instance of the class <A href="match_results.html">
|
||||
match_results</A>, as before there are typedefs of this class for the most
|
||||
common cases:
|
||||
</P>
|
||||
<PRE><B>namespace </B>boost{
|
||||
<B>typedef</B> match_results<<B>const</B> <B>char</B>*> cmatch;
|
||||
<B>typedef</B> match_results<<B>const</B> <B>wchar_t</B>*> wcmatch;
|
||||
<STRONG>typedef</STRONG> match_results<std::string::const_iterator> smatch;
|
||||
<STRONG>typedef</STRONG> match_results<std::wstring::const_iterator> wsmatch;
|
||||
}</PRE>
|
||||
<P>The algorithms <A href="regex_search.html">regex_search</A> and <A href="regex_grep.html">
|
||||
regex_grep</A> (i.e. finding all matches in a string) make use of
|
||||
match_results to report what matched.</P>
|
||||
<P>Note that these algorithms are not restricted to searching regular C-strings,
|
||||
any bidirectional iterator type can be searched, allowing for the possibility
|
||||
of seamlessly searching almost any kind of data.
|
||||
</P>
|
||||
<P>For search and replace operations in addition to the algorithm <A href="regex_replace.html">
|
||||
regex_replace</A> that we have already seen, the algorithm <A href="regex_format.html">
|
||||
regex_format</A> takes the result of a match and a format string, and
|
||||
produces a new string by merging the two.</P>
|
||||
<P>For those that dislike templates, there is a high level wrapper class RegEx
|
||||
that is an encapsulation of the lower level template code - it provides a
|
||||
simplified interface for those that don't need the full power of the library,
|
||||
and supports only narrow characters, and the "extended" regular expression
|
||||
syntax.
|
||||
</P>
|
||||
<P>The <A href="posix_api.html">POSIX API</A> functions: regcomp, regexec, regfree
|
||||
and regerror, are available in both narrow character and Unicode versions, and
|
||||
are provided for those who need compatibility with these API's.
|
||||
</P>
|
||||
<P>Finally, note that the library now has run-time <A href="localisation.html">localization</A>
|
||||
support, and recognizes the full POSIX regular expression syntax - including
|
||||
advanced features like multi-character collating elements and equivalence
|
||||
classes - as well as providing compatibility with other regular expression
|
||||
libraries including GNU and BSD4 regex packages, and to a more limited extent
|
||||
Perl 5.
|
||||
</P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
1032
doc/Attic/localisation.html
Normal file
1032
doc/Attic/localisation.html
Normal file
File diff suppressed because it is too large
Load Diff
330
doc/Attic/match_flag_type.html
Normal file
330
doc/Attic/match_flag_type.html
Normal file
@ -0,0 +1,330 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: match_flag_type</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">match_flag_type</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<h3>Synopsis</h3>
|
||||
|
||||
<p>The type <code>match_flag_type</code> is an implementation
|
||||
defined bitmask type (17.3.2.1.2) that controls how a regular
|
||||
expression is matched against a character sequence.</p>
|
||||
|
||||
<pre>
|
||||
namespace std{ namespace regex_constants{
|
||||
|
||||
typedef bitmask_type match_flag_type;
|
||||
|
||||
static const match_flag_type match_default = 0;
|
||||
static const match_flag_type match_not_bob;
|
||||
static const match_flag_type match_not_eob;
|
||||
static const match_flag_type match_not_bol;
|
||||
static const match_flag_type match_not_eol;
|
||||
static const match_flag_type match_not_bow;
|
||||
static const match_flag_type match_not_eow;
|
||||
static const match_flag_type match_any;
|
||||
static const match_flag_type match_not_null;
|
||||
static const match_flag_type match_continuous;
|
||||
static const match_flag_type match_partial;
|
||||
static const match_flag_type match_prev_avail;
|
||||
static const match_flag_type match_not_dot_newline;
|
||||
static const match_flag_type match_not_dot_null;
|
||||
|
||||
static const match_flag_type format_default = 0;
|
||||
static const match_flag_type format_sed;
|
||||
static const match_flag_type format_perl;
|
||||
static const match_flag_type format_no_copy;
|
||||
static const match_flag_type format_first_only;
|
||||
static const match_flag_type format_all;
|
||||
|
||||
} // namespace regex_constants
|
||||
} // namespace std
|
||||
</pre>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The type <code>match_flag_type</code> is an implementation
|
||||
defined bitmask type (17.3.2.1.2). When matching a regular
|
||||
expression against a sequence of characters [first, last) then
|
||||
setting its elements has the effects listed in the table below:</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table id="Table2" cellspacing="1" cellpadding="7" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>Element</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Effect if set</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_default</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that matching of regular expressions proceeds without
|
||||
any modification of the normal rules used in ECMA-262, ECMAScript
|
||||
Language Specification, Chapter 15 part 10, RegExp (Regular
|
||||
Expression) Objects (FWD.1)</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">match_not_bob</td>
|
||||
<td valign="top" width="50%">Specifies that the expression "\A"
|
||||
should not match against the sub-sequence [first,first).</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">match_not_eob</td>
|
||||
<td valign="top" width="50%">Specifies that the expressions "\z"
|
||||
and "\Z" should not match against the sub-sequence
|
||||
[last,last).</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_not_bol</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that the expression "^" should not be matched against
|
||||
the sub-sequence [first,first).</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_not_eol</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that the expression "$" should not be matched against
|
||||
the sub-sequence [last,last).</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_not_bow</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that the expression "\b" should not be matched against
|
||||
the sub-sequence [first,first).</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_not_eow</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that the expression "\b" should not be matched against
|
||||
the sub-sequence [last,last).</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_any</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that if more than one match is possible then any match
|
||||
is an acceptable result.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_not_null</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that the expression can not be matched against an
|
||||
empty sequence.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_continuous</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that the expression must match a sub-sequence that
|
||||
begins at <i>first</i>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_partial</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that if no match can be found, then it is acceptable
|
||||
to return a match [from, last) where from!=last, if there exists
|
||||
some sequence of characters [from,to) of which [from,last) is a
|
||||
prefix, and which would result in a full match.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_prev_avail</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that <code>--first</code> is a valid iterator
|
||||
position, when this flag is set then the flags <code>
|
||||
match_not_bol</code> and <code>match_not_bow</code> are ignored by
|
||||
the regular expression algorithms (RE.7) and iterators (RE.8).</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">match_not_dot_newline</td>
|
||||
<td valign="top" width="50%">Specifies that the expression "." does
|
||||
not match a newline character.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">match_not_dot_null</td>
|
||||
<td valign="top" width="50%">Specified that the expression "." does
|
||||
not match a character null '\0'.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>format_default</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that when a regular expression match is to be replaced
|
||||
by a new string, that the new string is constructed using the rules
|
||||
used by the ECMAScript replace function in ECMA-262, ECMAScript
|
||||
Language Specification, Chapter 15 part 5.4.11
|
||||
String.prototype.replace. (FWD.1). In addition during search and
|
||||
replace operations then all non-overlapping occurrences of the
|
||||
regular expression are located and replaced, and sections of the
|
||||
input that did not match the expression, are copied unchanged to
|
||||
the output string.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>format_sed</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that when a regular expression match is to be replaced
|
||||
by a new string, that the new string is constructed using the rules
|
||||
used by the Unix sed utility in IEEE Std 1003.1-2001, Portable
|
||||
Operating SystemInterface (POSIX ), Shells and Utilities..</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>format_perl</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that when a regular expression match is to be replaced
|
||||
by a new string, that the new string is constructed using an
|
||||
implementation defined superset of the rules used by the ECMAScript
|
||||
replace function in ECMA-262, ECMAScript Language Specification,
|
||||
Chapter 15 part 5.4.11 String.prototype.replace (FWD.1).</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%" height="32">format_all</td>
|
||||
<td valign="top" width="50%" height="32">Specifies that all syntax
|
||||
extensions are enabled, including conditional
|
||||
(?ddexpression1:expression2) replacements.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>format_no_copy</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>When specified during a search and replace operation, then
|
||||
sections of the character container sequence being searched that do
|
||||
match the regular expression, are not copied to the output
|
||||
string.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>format_first_only</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>When specified during a search and replace operation, then only
|
||||
the first occurrence of the regular expression is replaced.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
511
doc/Attic/match_results.html
Normal file
511
doc/Attic/match_results.html
Normal file
@ -0,0 +1,511 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: class match_results</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">class match_results</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<h3>Contents</h3>
|
||||
|
||||
<dl class="index">
|
||||
<dt><a href="#synopsis">Synopsis</a></dt>
|
||||
|
||||
<dt><a href="#description">Description</a></dt>
|
||||
</dl>
|
||||
|
||||
<h3><a name="synopsis"></a>Synopsis</h3>
|
||||
|
||||
<p>#include <<a href="../../boost/regex.hpp">boost/regex.hpp</a>></p>
|
||||
|
||||
<p>Regular expressions are different from many simple
|
||||
pattern-matching algorithms in that as well as finding an overall
|
||||
match they can also produce sub-expression matches: each
|
||||
sub-expression being delimited in the pattern by a pair of
|
||||
parenthesis (...). There has to be some method for reporting
|
||||
sub-expression matches back to the user: this is achieved this by
|
||||
defining a class <i>match_results</i> that acts as an indexed
|
||||
collection of sub-expression matches, each sub-expression match
|
||||
being contained in an object of type <i><a href="sub_match.html">
|
||||
sub_match</a></i> .</p>
|
||||
|
||||
<p>Template class match_results denotes a collection of character
|
||||
sequences representing the result of a regular expression match.
|
||||
Objects of type match_results are passed to the algorithms <a href="regex_match.html">regex_match</a> and <a href="regex_search">
|
||||
regex_search</a>, and are returned by the iterator <a href="regex_iterator.html">regex_iterator</a> . Storage for the
|
||||
collection is allocated and freed as necessary by the member
|
||||
functions of class match_results.</p>
|
||||
|
||||
<p>The template class match_results conforms to the requirements of
|
||||
a Sequence, as specified in (lib.sequence.reqmts), except that only
|
||||
operations defined for const-qualified Sequences are supported.</p>
|
||||
|
||||
<p>Class template match_results is most commonly used as one of the
|
||||
typedefs cmatch, wcmatch, smatch, or wsmatch:</p>
|
||||
|
||||
<pre>
|
||||
template <class BidirectionalIterator,
|
||||
class Allocator = allocator<sub_match<BidirectionalIterator> >
|
||||
class match_results;
|
||||
|
||||
typedef match_results<const char*> cmatch;
|
||||
typedef match_results<const wchar_t*> wcmatch;
|
||||
typedef match_results<string::const_iterator> smatch;
|
||||
typedef match_results<wstring::const_iterator> wsmatch;
|
||||
|
||||
template <class BidirectionalIterator,
|
||||
class Allocator = allocator<sub_match<BidirectionalIterator> >
|
||||
class match_results
|
||||
{
|
||||
public:
|
||||
typedef sub_match<BidirectionalIterator> value_type;
|
||||
typedef const value_type& const_reference;
|
||||
typedef const_reference reference;
|
||||
typedef implementation defined const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type;
|
||||
typedef typename Allocator::size_type size_type;
|
||||
typedef Allocator allocator_type;
|
||||
typedef typename iterator_traits<BidirectionalIterator>::value_type char_type;
|
||||
typedef basic_string<char_type> string_type;
|
||||
|
||||
// construct/copy/destroy:
|
||||
explicit match_results(const Allocator& a = Allocator());
|
||||
match_results(const match_results& m);
|
||||
match_results& operator=(const match_results& m);
|
||||
~match_results();
|
||||
|
||||
// size:
|
||||
size_type size() const;
|
||||
size_type max_size() const;
|
||||
bool empty() const;
|
||||
// element access:
|
||||
difference_type length(int sub = 0) const;
|
||||
difference_type position(unsigned int sub = 0) const;
|
||||
string_type str(int sub = 0) const;
|
||||
const_reference operator[](int n) const;
|
||||
|
||||
const_reference prefix() const;
|
||||
|
||||
const_reference suffix() const;
|
||||
const_iterator begin() const;
|
||||
const_iterator end() const;
|
||||
// format:
|
||||
template <class OutputIterator>
|
||||
OutputIterator format(OutputIterator out,
|
||||
const string_type& fmt,
|
||||
match_flag_type flags = format_default) const;
|
||||
string_type format(const string_type& fmt,
|
||||
match_flag_type flags = format_default) const;
|
||||
|
||||
allocator_type get_allocator() const;
|
||||
void swap(match_results& that);
|
||||
};
|
||||
|
||||
template <class BidirectionalIterator, class Allocator>
|
||||
bool operator == (const match_results<BidirectionalIterator, Allocator>& m1,
|
||||
const match_results<BidirectionalIterator, Allocator>& m2);
|
||||
template <class BidirectionalIterator, class Allocator>
|
||||
bool operator != (const match_results<BidirectionalIterator, Allocator>& m1,
|
||||
const match_results<BidirectionalIterator, Allocator>& m2);
|
||||
|
||||
template <class charT, class traits, class BidirectionalIterator, class Allocator>
|
||||
basic_ostream<charT, traits>&
|
||||
operator << (basic_ostream<charT, traits>& os,
|
||||
const match_results<BidirectionalIterator, Allocator>& m);
|
||||
|
||||
template <class BidirectionalIterator, class Allocator>
|
||||
void swap(match_results<BidirectionalIterator, Allocator>& m1,
|
||||
match_results<BidirectionalIterator, Allocator>& m2);
|
||||
</pre>
|
||||
|
||||
<h3><a name="description"></a>Description</h3>
|
||||
|
||||
<h4>match_results constructors</h4>
|
||||
|
||||
<p>In all <code>match_results</code> constructors, a copy of the
|
||||
Allocator argument is used for any memory allocation performed by
|
||||
the constructor or member functions during the lifetime of the
|
||||
object.</p>
|
||||
|
||||
<pre>
|
||||
match_results(const Allocator& a = Allocator());
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Constructs an object of class match_results. The
|
||||
postconditions of this function are indicated in the table:</p>
|
||||
|
||||
<p align="center"></p>
|
||||
|
||||
<center>
|
||||
<table id="Table2" cellspacing="1" cellpadding="7" width="624"
|
||||
border="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" width="50%"><b></b>
|
||||
<p><b>Element</b></p>
|
||||
</td>
|
||||
<td valign="top" width="50%"><b></b>
|
||||
<p><b>Value</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>empty()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>true</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>size()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>0</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>str()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>basic_string<charT>()</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<pre>
|
||||
match_results(const match_results& m);
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Constructs an object of class match_results, as
|
||||
a copy of m.</p>
|
||||
|
||||
<pre>
|
||||
match_results& operator=(const match_results& m);
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Assigns m to *this. The postconditions of this
|
||||
function are indicated in the table:</p>
|
||||
|
||||
<p align="center"></p>
|
||||
|
||||
<center>
|
||||
<table id="Table3" cellspacing="1" cellpadding="7" width="624"
|
||||
border="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" width="50%"><b></b>
|
||||
<p><b>Element</b></p>
|
||||
</td>
|
||||
<td valign="top" width="50%"><b></b>
|
||||
<p><b>Value</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>empty()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.empty().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>size()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.size().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>str(n)</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.str(n) for all integers n < m.size().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>prefix()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.prefix().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>suffix()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.suffix().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*this)[n]</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m[n] for all integers n < m.size().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>length(n)</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.length(n) for all integers n < m.size().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>position(n)</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.position(n) for all integers n < m.size().</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4>match_results size</h4>
|
||||
|
||||
<pre>
|
||||
size_type size()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns the number of sub_match elements stored
|
||||
in *this.</p>
|
||||
|
||||
<pre>
|
||||
size_type max_size()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns the maximum number of sub_match elements
|
||||
that can be stored in *this.</p>
|
||||
|
||||
<pre>
|
||||
bool empty()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns <code>size() == 0</code>.</p>
|
||||
|
||||
<h4>match_results element access</h4>
|
||||
|
||||
<pre>
|
||||
difference_type length(int sub = 0)const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns <code>(*this)[sub].length()</code>.</p>
|
||||
|
||||
<pre>
|
||||
difference_type position(unsigned int sub = 0)const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns <code>std::distance(prefix().first,
|
||||
(*this)[sub].first).</code></p>
|
||||
|
||||
<pre>
|
||||
string_type str(int sub = 0)const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns <code>
|
||||
string_type((*this)[sub]).</code></p>
|
||||
|
||||
<pre>
|
||||
const_reference operator[](int n) const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a reference to the <code>
|
||||
sub_match</code> object representing the character sequence that
|
||||
matched marked sub-expression <i>n</i>. If <code>n == 0</code> then
|
||||
returns a reference to a <code>sub_match</code> object representing
|
||||
the character sequence that matched the whole regular
|
||||
expression.</p>
|
||||
|
||||
<pre>
|
||||
const_reference prefix()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a reference to the <code>
|
||||
sub_match</code> object representing the character sequence from
|
||||
the start of the string being matched/searched, to the start of the
|
||||
match found.</p>
|
||||
|
||||
<pre>
|
||||
const_reference suffix()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a reference to the <code>
|
||||
sub_match</code> object representing the character sequence from
|
||||
the end of the match found to the end of the string being
|
||||
matched/searched.</p>
|
||||
|
||||
<pre>
|
||||
const_iterator begin()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a starting iterator that enumerates over
|
||||
all the marked sub-expression matches stored in *this.</p>
|
||||
|
||||
<pre>
|
||||
const_iterator end()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a terminating iterator that enumerates
|
||||
over all the marked sub-expression matches stored in *this.</p>
|
||||
|
||||
<h4>match_results reformatting</h4>
|
||||
|
||||
<pre>
|
||||
template <class OutputIterator>
|
||||
OutputIterator format(OutputIterator out,
|
||||
const string_type& fmt,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = format_default);
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Requires:</b> The type OutputIterator conforms to the Output
|
||||
Iterator requirements (24.1.2).</p>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Copies the character sequence <i>[fmt.begin(),
|
||||
fmt.end())</i> to OutputIterator <i>out</i>. For each format
|
||||
specifier or escape sequence in <i>fmt</i>, replace that sequence
|
||||
with either the character(s) it represents, or the sequence of
|
||||
characters within *this to which it refers. The bitmasks specified
|
||||
in <i><a href="match_flag_type.html">flags</a></i> determines what
|
||||
<a href="format_syntax.html">format specifiers or escape sequences
|
||||
are recognized</a>, by default this is the format used by ECMA-262,
|
||||
ECMAScript Language Specification, Chapter 15 part 5.4.11
|
||||
String.prototype.replace.</p>
|
||||
|
||||
<b></b>
|
||||
<p><b>Returns:</b> <i>out</i>.</p>
|
||||
|
||||
<pre>
|
||||
string_type format(const string_type& fmt,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = format_default);
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a copy of the string <i>fmt</i>. For
|
||||
each format specifier or escape sequence in <i>fmt</i>, replace
|
||||
that sequence with either the character(s) it represents, or the
|
||||
sequence of characters within *this to which it refers. The
|
||||
bitmasks specified in <i><a href="match_flag_type.html">
|
||||
flags</a></i> determines what <a href="format_syntax.html">format
|
||||
specifiers or escape sequences are recognized</a>, by default this
|
||||
is the format used by ECMA-262, ECMAScript Language Specification,
|
||||
Chapter 15 part 5.4.11 String.prototype.replace.</p>
|
||||
|
||||
<pre>
|
||||
allocator_type get_allocator()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a copy of the Allocator that was passed
|
||||
to the object's constructor.</p>
|
||||
|
||||
<pre>
|
||||
void swap(match_results& that);
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Swaps the contents of the two sequences.</p>
|
||||
|
||||
<b></b>
|
||||
<p><b>Postcondition:</b> <code>*this</code> contains the sequence
|
||||
of matched sub-expressions that were in <code>that</code>, <code>
|
||||
that</code> contains the sequence of matched sub-expressions that
|
||||
were in <code>*this</code>.</p>
|
||||
|
||||
<b></b>
|
||||
<p><b>Complexity:</b> constant time.</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
185
doc/Attic/partial_matches.html
Normal file
185
doc/Attic/partial_matches.html
Normal file
@ -0,0 +1,185 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Partial Matches</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Partial Matches</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>The <A href="match_flag_type.html">match-flag</A> <CODE>match_partial</CODE> can
|
||||
be passed to the following algorithms: <A href="regex_match.html">regex_match</A>,
|
||||
<A href="regex_search.html">regex_search</A>, and <A href="regex_grep.html">regex_grep</A>.
|
||||
When used it indicates that partial as well as full matches should be found. A
|
||||
partial match is one that matched one or more characters at the end of the text
|
||||
input, but did not match all of the regular expression (although it may have
|
||||
done so had more input been available). Partial matches are typically used when
|
||||
either validating data input (checking each character as it is entered on the
|
||||
keyboard), or when searching texts that are either too long to load into memory
|
||||
(or even into a memory mapped file), or are of indeterminate length (for
|
||||
example the source may be a socket or similar). Partial and full matches can be
|
||||
differentiated as shown in the following table (the variable M represents an
|
||||
instance of <A href="match_results.html">match_results<></A> as filled in
|
||||
by regex_match, regex_search or regex_grep):<BR>
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table2" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD vAlign="top" width="20%"> </TD>
|
||||
<TD vAlign="top" width="20%">Result</TD>
|
||||
<TD vAlign="top" width="20%">M[0].matched</TD>
|
||||
<TD vAlign="top" width="20%">M[0].first</TD>
|
||||
<TD vAlign="top" width="20%">M[0].second</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="20%">No match</TD>
|
||||
<TD vAlign="top" width="20%">False</TD>
|
||||
<TD vAlign="top" width="20%">Undefined</TD>
|
||||
<TD vAlign="top" width="20%">Undefined</TD>
|
||||
<TD vAlign="top" width="20%">Undefined</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="20%">Partial match</TD>
|
||||
<TD vAlign="top" width="20%">True</TD>
|
||||
<TD vAlign="top" width="20%">False</TD>
|
||||
<TD vAlign="top" width="20%">Start of partial match.</TD>
|
||||
<TD vAlign="top" width="20%">End of partial match (end of text).</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="20%">Full match</TD>
|
||||
<TD vAlign="top" width="20%">True</TD>
|
||||
<TD vAlign="top" width="20%">True</TD>
|
||||
<TD vAlign="top" width="20%">Start of full match.</TD>
|
||||
<TD vAlign="top" width="20%">End of full match.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<P>The following <A href="../example/snippets/partial_regex_match.cpp">example</A>
|
||||
tests to see whether the text could be a valid credit card number, as the user
|
||||
presses a key, the character entered would be added to the string being built
|
||||
up, and passed to <CODE>is_possible_card_number</CODE>. If this returns true
|
||||
then the text could be a valid card number, so the user interface's OK button
|
||||
would be enabled. If it returns false, then this is not yet a valid card
|
||||
number, but could be with more input, so the user interface would disable the
|
||||
OK button. Finally, if the procedure throws an exception the input could never
|
||||
become a valid number, and the inputted character must be discarded, and a
|
||||
suitable error indication displayed to the user.</P>
|
||||
<PRE>#include <string>
|
||||
#include <iostream>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
boost::regex e("(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})");
|
||||
|
||||
bool is_possible_card_number(const std::string& input)
|
||||
{
|
||||
//
|
||||
// return false for partial match, true for full match, or throw for
|
||||
// impossible match based on what we have so far...
|
||||
boost::match_results<std::string::const_iterator> what;
|
||||
if(0 == boost::regex_match(input, what, e, boost::match_default | boost::match_partial))
|
||||
{
|
||||
// the input so far could not possibly be valid so reject it:
|
||||
throw std::runtime_error("Invalid data entered - this could not possibly be a valid card number");
|
||||
}
|
||||
// OK so far so good, but have we finished?
|
||||
if(what[0].matched)
|
||||
{
|
||||
// excellent, we have a result:
|
||||
return true;
|
||||
}
|
||||
// what we have so far is only a partial match...
|
||||
return false;
|
||||
}</PRE>
|
||||
<P>In the following <A href="../example/snippets/partial_regex_match.cpp">example</A>,
|
||||
text input is taken from a stream containing an unknown amount of text; this
|
||||
example simply counts the number of html tags encountered in the stream. The
|
||||
text is loaded into a buffer and searched a part at a time, if a partial match
|
||||
was encountered, then the partial match gets searched a second time as the
|
||||
start of the next batch of text:</P>
|
||||
<PRE>#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
// match some kind of html tag:
|
||||
boost::regex e("<[^>]*>");
|
||||
// count how many:
|
||||
unsigned int tags = 0;
|
||||
// saved position of partial match:
|
||||
char* next_pos = 0;
|
||||
|
||||
bool grep_callback(const boost::match_results<char*>& m)
|
||||
{
|
||||
if(m[0].matched == false)
|
||||
{
|
||||
// save position and return:
|
||||
next_pos = m[0].first;
|
||||
}
|
||||
else
|
||||
++tags;
|
||||
return true;
|
||||
}
|
||||
|
||||
void search(std::istream& is)
|
||||
{
|
||||
char buf[4096];
|
||||
next_pos = buf + sizeof(buf);
|
||||
bool have_more = true;
|
||||
while(have_more)
|
||||
{
|
||||
// how much do we copy forward from last try:
|
||||
unsigned leftover = (buf + sizeof(buf)) - next_pos;
|
||||
// and how much is left to fill:
|
||||
unsigned size = next_pos - buf;
|
||||
// copy forward whatever we have left:
|
||||
memcpy(buf, next_pos, leftover);
|
||||
// fill the rest from the stream:
|
||||
unsigned read = is.readsome(buf + leftover, size);
|
||||
// check to see if we've run out of text:
|
||||
have_more = read == size;
|
||||
// reset next_pos:
|
||||
next_pos = buf + sizeof(buf);
|
||||
// and then grep:
|
||||
boost::regex_grep(grep_callback,
|
||||
buf,
|
||||
buf + read + leftover,
|
||||
e,
|
||||
boost::match_default | boost::match_partial);
|
||||
}
|
||||
}</PRE>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
54
doc/Attic/performance.html
Normal file
54
doc/Attic/performance.html
Normal file
@ -0,0 +1,54 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Performance</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Performance</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>The performance of Boost.regex in both recursive and non-recursive modes should
|
||||
be broadly comparable to other regular expression libraries: recursive mode is
|
||||
slightly faster (especially where memory allocation requires thread
|
||||
synchronisation), but not by much. The following pages compare
|
||||
Boost.regex with various other regular expression libraries for the following
|
||||
compilers:</P>
|
||||
<P><A href="vc71-performance.html">Visual Studio.Net 2003 (recursive Boost.regex
|
||||
implementation)</A>.</P>
|
||||
<P><A href="gcc-performance.html">Gcc 3.2 (cygwin) (non-recursive Boost.regex
|
||||
implementation).</A></P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
288
doc/Attic/posix_api.html
Normal file
288
doc/Attic/posix_api.html
Normal file
@ -0,0 +1,288 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: POSIX API Compatibility Functions</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">POSIX API Compatibility Functions</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<PRE>#include <boost/cregex.hpp>
|
||||
<I>or</I>:
|
||||
#include <boost/regex.h></PRE>
|
||||
<P>The following functions are available for users who need a POSIX compatible C
|
||||
library, they are available in both Unicode and narrow character versions, the
|
||||
standard POSIX API names are macros that expand to one version or the other
|
||||
depending upon whether UNICODE is defined or not.
|
||||
</P>
|
||||
<P><B>Important</B>: Note that all the symbols defined here are enclosed inside
|
||||
namespace <I>boost</I> when used in C++ programs, unless you use #include
|
||||
<boost/regex.h> instead - in which case the symbols are still defined in
|
||||
namespace boost, but are made available in the global namespace as well.</P>
|
||||
<P>The functions are defined as:
|
||||
</P>
|
||||
<PRE>extern "C" {
|
||||
<B>int</B> regcompA(regex_tA*, <B>const</B> <B>char</B>*, <B>int</B>);
|
||||
<B>unsigned</B> <B>int</B> regerrorA(<B>int</B>, <B>const</B> regex_tA*, <B>char</B>*, <B>unsigned</B> <B>int</B>);
|
||||
<B>int</B> regexecA(<B>const</B> regex_tA*, <B>const</B> <B>char</B>*, <B>unsigned</B> <B>int</B>, regmatch_t*, <B>int</B>);
|
||||
<B>void</B> regfreeA(regex_tA*);
|
||||
|
||||
<B>int</B> regcompW(regex_tW*, <B>const</B> <B>wchar_t</B>*, <B>int</B>);
|
||||
<B>unsigned</B> <B>int</B> regerrorW(<B>int</B>, <B>const</B> regex_tW*, <B>wchar_t</B>*, <B>unsigned</B> <B>int</B>);
|
||||
<B>int</B> regexecW(<B>const</B> regex_tW*, <B>const</B> <B>wchar_t</B>*, <B>unsigned</B> <B>int</B>, regmatch_t*, <B>int</B>);
|
||||
<B>void</B> regfreeW(regex_tW*);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define regcomp regcompW
|
||||
#define regerror regerrorW
|
||||
#define regexec regexecW
|
||||
#define regfree regfreeW
|
||||
#define regex_t regex_tW
|
||||
#else
|
||||
#define regcomp regcompA
|
||||
#define regerror regerrorA
|
||||
#define regexec regexecA
|
||||
#define regfree regfreeA
|
||||
#define regex_t regex_tA
|
||||
#endif
|
||||
}</PRE>
|
||||
<P>All the functions operate on structure <B>regex_t</B>, which exposes two public
|
||||
members:
|
||||
</P>
|
||||
<P><B>unsigned int re_nsub</B> this is filled in by <B>regcomp</B> and indicates
|
||||
the number of sub-expressions contained in the regular expression.
|
||||
</P>
|
||||
<P><B>const TCHAR* re_endp</B> points to the end of the expression to compile when
|
||||
the flag REG_PEND is set.
|
||||
</P>
|
||||
<P><I>Footnote: regex_t is actually a #define - it is either regex_tA or regex_tW
|
||||
depending upon whether UNICODE is defined or not, TCHAR is either char or
|
||||
wchar_t again depending upon the macro UNICODE.</I>
|
||||
</P>
|
||||
<H3>regcomp</H3>
|
||||
<P><B>regcomp</B> takes a pointer to a <B>regex_t</B>, a pointer to the expression
|
||||
to compile and a flags parameter which can be a combination of:
|
||||
<BR>
|
||||
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table2" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_EXTENDED</TD>
|
||||
<TD vAlign="top" width="45%">Compiles modern regular expressions. Equivalent to
|
||||
regbase::char_classes | regbase::intervals | regbase::bk_refs.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_BASIC</TD>
|
||||
<TD vAlign="top" width="45%">Compiles basic (obsolete) regular expression syntax.
|
||||
Equivalent to regbase::char_classes | regbase::intervals | regbase::limited_ops
|
||||
| regbase::bk_braces | regbase::bk_parens | regbase::bk_refs.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_NOSPEC</TD>
|
||||
<TD vAlign="top" width="45%">All characters are ordinary, the expression is a
|
||||
literal string.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_ICASE</TD>
|
||||
<TD vAlign="top" width="45%">Compiles for matching that ignores character case.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_NOSUB</TD>
|
||||
<TD vAlign="top" width="45%">Has no effect in this library.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_NEWLINE</TD>
|
||||
<TD vAlign="top" width="45%">When this flag is set a dot does not match the
|
||||
newline character.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_PEND</TD>
|
||||
<TD vAlign="top" width="45%">When this flag is set the re_endp parameter of the
|
||||
regex_t structure must point to the end of the regular expression to compile.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_NOCOLLATE</TD>
|
||||
<TD vAlign="top" width="45%">When this flag is set then locale dependent collation
|
||||
for character ranges is turned off.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_ESCAPE_IN_LISTS<BR>
|
||||
, , ,
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">When this flag is set, then escape sequences are
|
||||
permitted in bracket expressions (character sets).</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_NEWLINE_ALT </TD>
|
||||
<TD vAlign="top" width="45%">When this flag is set then the newline character is
|
||||
equivalent to the alternation operator |.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_PERL </TD>
|
||||
<TD vAlign="top" width="45%">Compiles Perl like regular expressions.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_AWK</TD>
|
||||
<TD vAlign="top" width="45%">A shortcut for awk-like behavior: REG_EXTENDED |
|
||||
REG_ESCAPE_IN_LISTS</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_GREP</TD>
|
||||
<TD vAlign="top" width="45%">A shortcut for grep like behavior: REG_BASIC |
|
||||
REG_NEWLINE_ALT</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_EGREP</TD>
|
||||
<TD vAlign="top" width="45%"> A shortcut for egrep like behavior:
|
||||
REG_EXTENDED | REG_NEWLINE_ALT</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<H3>regerror</H3>
|
||||
<P>regerror takes the following parameters, it maps an error code to a human
|
||||
readable string:
|
||||
<BR>
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table3" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="50%">int code</TD>
|
||||
<TD vAlign="top" width="50%">The error code.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">const regex_t* e</TD>
|
||||
<TD vAlign="top" width="50%">The regular expression (can be null).</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">char* buf</TD>
|
||||
<TD vAlign="top" width="50%">The buffer to fill in with the error message.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">unsigned int buf_size</TD>
|
||||
<TD vAlign="top" width="50%">The length of buf.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<P>If the error code is OR'ed with REG_ITOA then the message that results is the
|
||||
printable name of the code rather than a message, for example "REG_BADPAT". If
|
||||
the code is REG_ATIO then <B>e</B> must not be null and <B>e->re_pend</B> must
|
||||
point to the printable name of an error code, the return value is then the
|
||||
value of the error code. For any other value of <B>code</B>, the return value
|
||||
is the number of characters in the error message, if the return value is
|
||||
greater than or equal to <B>buf_size</B> then <B>regerror</B> will have to be
|
||||
called again with a larger buffer.</P>
|
||||
<H3>regexec</H3>
|
||||
<P><B>regexec</B> finds the first occurrence of expression <B>e</B> within string <B>buf</B>.
|
||||
If <B>len</B> is non-zero then *<B>m</B> is filled in with what matched the
|
||||
regular expression, <B>m[0]</B> contains what matched the whole string, <B>m[1] </B>
|
||||
the first sub-expression etc, see <B>regmatch_t</B> in the header file
|
||||
declaration for more details. The <B>eflags</B> parameter can be a combination
|
||||
of:
|
||||
<BR>
|
||||
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table4" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="50%">REG_NOTBOL</TD>
|
||||
<TD vAlign="top" width="50%">Parameter <B>buf </B>does not represent the start of
|
||||
a line.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">REG_NOTEOL</TD>
|
||||
<TD vAlign="top" width="50%">Parameter <B>buf</B> does not terminate at the end of
|
||||
a line.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">REG_STARTEND</TD>
|
||||
<TD vAlign="top" width="50%">The string searched starts at buf + pmatch[0].rm_so
|
||||
and ends at buf + pmatch[0].rm_eo.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<H3>regfree</H3>
|
||||
<P>Finally <B>regfree</B> frees all the memory that was allocated by regcomp.
|
||||
</P>
|
||||
<P><I>Footnote: this is an abridged reference to the POSIX API functions, it is
|
||||
provided for compatibility with other libraries, rather than an API to be used
|
||||
in new code (unless you need access from a language other than C++). This
|
||||
version of these functions should also happily coexist with other versions, as
|
||||
the names used are macros that expand to the actual function names.</I>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
84
doc/Attic/redistributables.html
Normal file
84
doc/Attic/redistributables.html
Normal file
@ -0,0 +1,84 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Redistributables and Library Names</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Redistributables and Library Names</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>If you are using Microsoft or Borland C++ and link to a dll version of the run
|
||||
time library, then you will also link to one of the dll versions of boost.regex.
|
||||
While these dll's are redistributable, there are no "standard" versions, so
|
||||
when installing on the users PC, you should place these in a directory private
|
||||
to your application, and not in the PC's directory path. Note that if you link
|
||||
to a static version of your run time library, then you will also link to a
|
||||
static version of boost.regex and no dll's will need to be distributed. The
|
||||
possible boost.regex dll and library names are computed according to the following
|
||||
formula:<BR>
|
||||
</P>
|
||||
<P></P>
|
||||
<P>"boost_regex_"<BR>
|
||||
+ BOOST_LIB_TOOLSET<BR>
|
||||
+ "_"<BR>
|
||||
+ BOOST_LIB_THREAD_OPT<BR>
|
||||
+ BOOST_LIB_RT_OPT<BR>
|
||||
+ BOOST_LIB_LINK_OPT<BR>
|
||||
+ BOOST_LIB_DEBUG_OPT<BR>
|
||||
<BR>
|
||||
These are defined as:<BR>
|
||||
<BR>
|
||||
BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).<BR>
|
||||
<BR>
|
||||
BOOST_LIB_THREAD_OPT: "s" for single thread builds,<BR>
|
||||
"m" for multithread builds.<BR>
|
||||
<BR>
|
||||
BOOST_LIB_RT_OPT: "s" for static runtime,<BR>
|
||||
"d" for dynamic runtime.<BR>
|
||||
<BR>
|
||||
BOOST_LIB_LINK_OPT: "s" for static link,<BR>
|
||||
"i" for dynamic link.<BR>
|
||||
<BR>
|
||||
BOOST_LIB_DEBUG_OPT: nothing for release builds,<BR>
|
||||
"d" for debug builds,<BR>
|
||||
"dd" for debug-diagnostic builds (_STLP_DEBUG).</P>
|
||||
<P>
|
||||
Note: you can disable automatic library selection by defining the symbol
|
||||
BOOST_REGEX_NO_LIB when compiling, this is useful if you want to statically
|
||||
link even though you're using the dll version of your run time library, or if
|
||||
you need to debug boost.regex.
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
46
doc/Attic/reg_expression.html
Normal file
46
doc/Attic/reg_expression.html
Normal file
@ -0,0 +1,46 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Class reg_expression (deprecated)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Class reg_expression (deprecated)</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>The use of class template reg_expression is deprecated: use <A href="basic_regex.html">
|
||||
basic_regex</A> instead.</P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
91
doc/Attic/regbase.html
Normal file
91
doc/Attic/regbase.html
Normal file
@ -0,0 +1,91 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: regbase</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">regbase</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<p>Use of the type <code>boost::regbase</code> is now deprecated,
|
||||
and the type does not form a part of the <a href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
|
||||
regular expression standardization proposal</a>. This type
|
||||
still exists as a base class of <code>boost::basic_regex</code>,
|
||||
and you can still refer to <code>
|
||||
boost::regbase::constant_name</code> in your code, however for
|
||||
maximum portability to other std regex implementations you should
|
||||
instead use either:</p>
|
||||
|
||||
<pre>
|
||||
boost::regex_constants::constant_name
|
||||
</pre>
|
||||
|
||||
<p>or</p>
|
||||
|
||||
<pre>
|
||||
boost::regex::constant_name
|
||||
</pre>
|
||||
|
||||
<p>or</p>
|
||||
|
||||
<pre>
|
||||
boost::wregex::constant_name
|
||||
</pre>
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
620
doc/Attic/regex.html
Normal file
620
doc/Attic/regex.html
Normal file
@ -0,0 +1,620 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: class RegEx (deprecated)</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">class RegEx (deprecated)</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<p>The high level wrapper class RegEx is now deprecated and does
|
||||
not form a part of the <a href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
|
||||
regular expression standardization proposal</a>. This type
|
||||
still exists, and existing code will continue to compile, however
|
||||
the following documentation is unlikely to be further updated.</p>
|
||||
|
||||
<pre>
|
||||
#include <boost/cregex.hpp>
|
||||
</pre>
|
||||
|
||||
<p>The class RegEx provides a high level simplified interface to
|
||||
the regular expression library, this class only handles narrow
|
||||
character strings, and regular expressions always follow the
|
||||
"normal" syntax - that is the same as the perl / ECMAScript
|
||||
synatx.</p>
|
||||
|
||||
<pre>
|
||||
<b>typedef</b> <b>bool</b> (*GrepCallback)(<b>const</b> RegEx& expression);
|
||||
<b>typedef</b> <b>bool</b> (*GrepFileCallback)(<b>const</b> <b>char</b>* file, <b>const</b> RegEx& expression);
|
||||
<b>typedef</b> <b>bool</b> (*FindFilesCallback)(<b>const</b> <b>char</b>* file);
|
||||
|
||||
<b>class</b> RegEx
|
||||
{
|
||||
<b>public</b>:
|
||||
RegEx();
|
||||
RegEx(<b>const</b> RegEx& o);
|
||||
~RegEx();
|
||||
RegEx(<b>const</b> <b>char</b>* c, <b>bool</b> icase = <b>false</b>);
|
||||
<strong>explicit</strong> RegEx(<b>const</b> std::string& s, <b>bool</b> icase = <b>false</b>);
|
||||
RegEx& <b>operator</b>=(<b>const</b> RegEx& o);
|
||||
RegEx& <b>operator</b>=(<b>const</b> <b>char</b>* p);
|
||||
RegEx& <b>operator</b>=(<b>const</b> std::string& s);
|
||||
<b>unsigned</b> <b>int</b> SetExpression(<b>const</b> <b>char</b>* p, <b>bool</b> icase = <b>false</b>);
|
||||
<b>unsigned</b> <b>int</b> SetExpression(<b>const</b> std::string& s, <b>bool</b> icase = <b>false</b>);
|
||||
std::string Expression()<b>const</b>;
|
||||
<font color="#000080"><i>//
|
||||
</i> <i>// now matching operators:</i>
|
||||
<i>//</i></font>
|
||||
<b>bool</b> Match(<b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>bool</b> Match(<b>const</b> std::string& s, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>bool</b> Search(<b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>bool</b> Search(<b>const</b> std::string& s, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b> std::string& s, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> Grep(std::vector<std::string>& v, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> Grep(std::vector<std::string>& v, <b>const</b> std::string& s, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> Grep(std::vector<<b>unsigned</b> <b>int</b>>& v, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> Grep(std::vector<<b>unsigned</b> <b>int</b>>& v, <b>const</b> std::string& s, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback cb, <b>const</b> std::string& files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback cb, <b>const</b> std::string& files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
std::string Merge(<b>const</b> std::string& in, <b>const</b> std::string& fmt, <b>bool</b> copy = <b>true</b>, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
std::string Merge(<b>const</b> char* in, <b>const</b> char* fmt, <b>bool</b> copy = <b>true</b>, <b>unsigned int</b> flags = match_default);
|
||||
<b>unsigned</b> Split(std::vector<std::string>& v, std::string& s, <b>unsigned</b> flags = match_default, <b>unsigned</b> max_count = ~0);
|
||||
<font color="#000080"><i>//
|
||||
</i> <i>// now operators for returning what matched in more detail:
|
||||
</i> <i>//
|
||||
</i></font> <b>unsigned</b> <b>int</b> Position(<b>int</b> i = 0)<b>const</b>;
|
||||
<b>unsigned</b> <b>int</b> Length(<b>int</b> i = 0)<b>const</b>;
|
||||
<strong>bool</strong> Matched(<strong>int</strong> i = 0)<strong>const</strong>;
|
||||
<b>unsigned</b> <b>int</b> Line()<b>const</b>;
|
||||
<b>unsigned int</b> Marks() const;
|
||||
std::string What(<b>int</b> i)<b>const</b>;
|
||||
std::string <b>operator</b>[](<b>int</b> i)<b>const</b> ;
|
||||
|
||||
<strong>static const unsigned int</strong> npos;
|
||||
};
|
||||
</pre>
|
||||
|
||||
<p>Member functions for class RegEx are defined as follows:<br>
|
||||
</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table id="Table2" cellspacing="0" cellpadding="7" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx();</td>
|
||||
<td valign="top" width="42%">Default constructor, constructs an
|
||||
instance of RegEx without any valid expression.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx(<b>const</b> RegEx& o);</td>
|
||||
<td valign="top" width="42%">Copy constructor, all the properties
|
||||
of parameter <i>o</i> are copied.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx(<b>const</b> <b>char</b>* c, <b>
|
||||
bool</b> icase = <b>false</b>);</td>
|
||||
<td valign="top" width="42%">Constructs an instance of RegEx,
|
||||
setting the expression to <i>c</i>, if <i>icase</i> is <i>true</i>
|
||||
then matching is insensitive to case, otherwise it is sensitive to
|
||||
case. Throws <i>bad_expression</i> on failure.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx(<b>const</b> std::string& s,
|
||||
<b>bool</b> icase = <b>false</b>);</td>
|
||||
<td valign="top" width="42%">Constructs an instance of RegEx,
|
||||
setting the expression to <i>s</i>, if <i>icase</i> is <i>true</i>
|
||||
then matching is insensitive to case, otherwise it is sensitive to
|
||||
case. Throws <i>bad_expression</i> on failure.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx& <b>
|
||||
operator</b>=(<b>const</b> RegEx& o);</td>
|
||||
<td valign="top" width="42%">Default assignment operator.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx& <b>
|
||||
operator</b>=(<b>const</b> <b>char</b>* p);</td>
|
||||
<td valign="top" width="42%">Assignment operator, equivalent to
|
||||
calling <i>SetExpression(p, false).</i> Throws <i>
|
||||
bad_expression</i> on failure.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx& <b>
|
||||
operator</b>=(<b>const</b> std::string& s);</td>
|
||||
<td valign="top" width="42%">Assignment operator, equivalent to
|
||||
calling <i>SetExpression(s, false).</i> Throws <i>
|
||||
bad_expression</i> on failure.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
SetExpression(<b>constchar</b>* p, <b>bool</b> icase = <b>
|
||||
false</b>);</td>
|
||||
<td valign="top" width="42%">Sets the current expression to <i>
|
||||
p</i>, if <i>icase</i> is <i>true</i> then matching is insensitive
|
||||
to case, otherwise it is sensitive to case. Throws <i>
|
||||
bad_expression</i> on failure.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
SetExpression(<b>const</b> std::string& s, <b>bool</b> icase =
|
||||
<b>false</b>);</td>
|
||||
<td valign="top" width="42%">Sets the current expression to <i>
|
||||
s</i>, if <i>icase</i> is <i>true</i> then matching is insensitive
|
||||
to case, otherwise it is sensitive to case. Throws <i>
|
||||
bad_expression</i> on failure.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">std::string
|
||||
Expression()<b>const</b>;</td>
|
||||
<td valign="top" width="42%">Returns a copy of the current regular
|
||||
expression.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>bool</b> Match(<b>const</b> <b>
|
||||
char</b>* p, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Attempts to match the current
|
||||
expression against the text <i>p</i> using the match flags <i>
|
||||
flags</i> - see <a href="match_flag_type.html">match flags</a>.
|
||||
Returns <i>true</i> if the expression matches the whole of the
|
||||
input string.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>bool</b> Match(<b>const</b>
|
||||
std::string& s, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default) ;</td>
|
||||
<td valign="top" width="42%">Attempts to match the current
|
||||
expression against the text <i>s</i> using the match flags <i>
|
||||
flags</i> - see <a href="match_flag_type.html">match flags</a>.
|
||||
Returns <i>true</i> if the expression matches the whole of the
|
||||
input string.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>bool</b> Search(<b>const</b> <b>
|
||||
char</b>* p, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Attempts to find a match for the
|
||||
current expression somewhere in the text <i>p</i> using the match
|
||||
flags <i>flags</i> - see <a href="match_flag_type.html">match
|
||||
flags</a>. Returns <i>true</i> if the match succeeds.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>bool</b> Search(<b>const</b>
|
||||
std::string& s, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default) ;</td>
|
||||
<td valign="top" width="42%">Attempts to find a match for the
|
||||
current expression somewhere in the text <i>s</i> using the match
|
||||
flags <i>flags</i> - see <a href="match_flag_type.html">match
|
||||
flags</a>. Returns <i>true</i> if the match succeeds.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Grep(GrepCallback cb, <b>const</b> <b>char</b>* p, <b>unsigned</b>
|
||||
<b>int</b> flags = match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the text <i>p</i> using the match flags <i>flags</i>
|
||||
- see <a href="match_flag_type.html">match flags</a>. For each
|
||||
match found calls the call-back function <i>cb</i> as: cb(*this);
|
||||
|
||||
<p>If at any stage the call-back function returns false then the
|
||||
grep operation terminates, otherwise continues until no further
|
||||
matches are found. Returns the number of matches found.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Grep(GrepCallback cb, <b>const</b> std::string& s, <b>
|
||||
unsigned</b> <b>int</b> flags = match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the text <i>s</i> using the match flags <i>flags</i>
|
||||
- see <a href="match_flag_type.html">match flags</a>. For each
|
||||
match found calls the call-back function <i>cb</i> as: cb(*this);
|
||||
|
||||
<p>If at any stage the call-back function returns false then the
|
||||
grep operation terminates, otherwise continues until no further
|
||||
matches are found. Returns the number of matches found.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Grep(std::vector<std::string>& v, <b>const</b> <b>
|
||||
char</b>* p, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the text <i>p</i> using the match flags <i>flags</i>
|
||||
- see <a href="match_flag_type.html">match flags</a>. For each
|
||||
match pushes a copy of what matched onto <i>v</i>. Returns the
|
||||
number of matches found.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Grep(std::vector<std::string>& v, <b>const</b>
|
||||
std::string& s, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the text <i>s</i> using the match flags <i>flags</i>
|
||||
- see <a href="match_flag_type.html">match flags</a>. For each
|
||||
match pushes a copy of what matched onto <i>v</i>. Returns the
|
||||
number of matches found.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Grep(std::vector<<b>unsigned int</b>>& v, <b>const</b>
|
||||
<b>char</b>* p, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the text <i>p</i> using the match flags <i>flags</i>
|
||||
- see <a href="match_flag_type.html">match flags</a>. For each
|
||||
match pushes the starting index of what matched onto <i>v</i>.
|
||||
Returns the number of matches found.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Grep(std::vector<<b>unsigned int</b>>& v, <b>const</b>
|
||||
std::string& s, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the text <i>s</i> using the match flags <i>flags</i>
|
||||
- see <a href="match_flag_type.html">match flags</a>. For each
|
||||
match pushes the starting index of what matched onto <i>v</i>.
|
||||
Returns the number of matches found.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
GrepFiles(GrepFileCallback cb, <b>const</b> <b>char</b>* files, <b>
|
||||
bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the files <i>files</i> using the match flags <i>
|
||||
flags</i> - see <a href="match_flag_type.html">match flags</a>. For
|
||||
each match calls the call-back function cb.
|
||||
|
||||
<p>If the call-back returns false then the algorithm returns
|
||||
without considering further matches in the current file, or any
|
||||
further files. </p>
|
||||
|
||||
<p>The parameter <i>files</i> can include wild card characters '*'
|
||||
and '?', if the parameter <i>recurse</i> is true then searches
|
||||
sub-directories for matching file names. </p>
|
||||
|
||||
<p>Returns the total number of matches found.</p>
|
||||
|
||||
<p>May throw an exception derived from std::runtime_error if file
|
||||
io fails.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
GrepFiles(GrepFileCallback cb, <b>const</b> std::string& files,
|
||||
<b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b>
|
||||
flags = match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the files <i>files</i> using the match flags <i>
|
||||
flags</i> - see <a href="match_flag_type.html">match flags</a>. For
|
||||
each match calls the call-back function cb.
|
||||
|
||||
<p>If the call-back returns false then the algorithm returns
|
||||
without considering further matches in the current file, or any
|
||||
further files. </p>
|
||||
|
||||
<p>The parameter <i>files</i> can include wild card characters '*'
|
||||
and '?', if the parameter <i>recurse</i> is true then searches
|
||||
sub-directories for matching file names. </p>
|
||||
|
||||
<p>Returns the total number of matches found.</p>
|
||||
|
||||
<p>May throw an exception derived from std::runtime_error if file
|
||||
io fails.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
FindFiles(FindFilesCallback cb, <b>const</b> <b>char</b>* files,
|
||||
<b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b>
|
||||
flags = match_default);</td>
|
||||
<td valign="top" width="42%">Searches <i>files</i> to find all
|
||||
those which contain at least one match of the current expression
|
||||
using the match flags <i>flags</i> - see <a href="match_flag_type.html">match flags</a>. For each matching file
|
||||
calls the call-back function cb.
|
||||
|
||||
<p>If the call-back returns false then the algorithm returns
|
||||
without considering any further files. </p>
|
||||
|
||||
<p>The parameter <i>files</i> can include wild card characters '*'
|
||||
and '?', if the parameter <i>recurse</i> is true then searches
|
||||
sub-directories for matching file names. </p>
|
||||
|
||||
<p>Returns the total number of files found.</p>
|
||||
|
||||
<p>May throw an exception derived from std::runtime_error if file
|
||||
io fails.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
FindFiles(FindFilesCallback cb, <b>const</b> std::string&
|
||||
files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>
|
||||
int</b> flags = match_default);</td>
|
||||
<td valign="top" width="42%">Searches <i>files</i> to find all
|
||||
those which contain at least one match of the current expression
|
||||
using the match flags <i>flags</i> - see <a href="match_flag_type.html">match flags</a>. For each matching file
|
||||
calls the call-back function cb.
|
||||
|
||||
<p>If the call-back returns false then the algorithm returns
|
||||
without considering any further files. </p>
|
||||
|
||||
<p>The parameter <i>files</i> can include wild card characters '*'
|
||||
and '?', if the parameter <i>recurse</i> is true then searches
|
||||
sub-directories for matching file names. </p>
|
||||
|
||||
<p>Returns the total number of files found.</p>
|
||||
|
||||
<p>May throw an exception derived from std::runtime_error if file
|
||||
io fails.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">std::string Merge(<b>const</b>
|
||||
std::string& in, <b>const</b> std::string& fmt, <b>bool</b>
|
||||
copy = <b>true</b>, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Performs a search and replace
|
||||
operation: searches through the string <i>in</i> for all
|
||||
occurrences of the current expression, for each occurrence replaces
|
||||
the match with the format string <i>fmt</i>. Uses <i>flags</i> to
|
||||
determine what gets matched, and how the format string should be
|
||||
treated. If <i>copy</i> is true then all unmatched sections of
|
||||
input are copied unchanged to output, if the flag <em>
|
||||
format_first_only</em> is set then only the first occurance of the
|
||||
pattern found is replaced. Returns the new string. See <a href="format_synatx.html">also format string syntax</a>, <a href="match_flag_type.html">match flags</a> and <a href="match_flag_type.html">format flags</a>.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">std::string Merge(<b>const</b> char*
|
||||
in, <b>const</b> char* fmt, <b>bool</b> copy = <b>true</b>, <b>
|
||||
unsigned int</b> flags = match_default);</td>
|
||||
<td valign="top" width="42%">Performs a search and replace
|
||||
operation: searches through the string <i>in</i> for all
|
||||
occurrences of the current expression, for each occurrence replaces
|
||||
the match with the format string <i>fmt</i>. Uses <i>flags</i> to
|
||||
determine what gets matched, and how the format string should be
|
||||
treated. If <i>copy</i> is true then all unmatched sections of
|
||||
input are copied unchanged to output, if the flag <em>
|
||||
format_first_only</em> is set then only the first occurance of the
|
||||
pattern found is replaced. Returns the new string. See <a href="format_synatx.html">also format string syntax</a>, <a href="match_flag_type.html">match flags</a> and <a href="match_flag_type.html">format flags</a>.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top"><b>unsigned</b>
|
||||
Split(std::vector<std::string>& v, std::string& s,
|
||||
<b>unsigned</b> flags = match_default, <b>unsigned</b> max_count =
|
||||
~0);</td>
|
||||
<td valign="top">Splits the input string and pushes each one onto
|
||||
the vector. If the expression contains no marked sub-expressions,
|
||||
then one string is outputted for each section of the input that
|
||||
does not match the expression. If the expression does contain
|
||||
marked sub-expressions, then outputs one string for each marked
|
||||
sub-expression each time a match occurs. Outputs no more than <i>
|
||||
max_count</i> strings. Before returning, deletes from the input
|
||||
string <i>s</i> all of the input that has been processed (all of
|
||||
the string if <i>max_count</i> was not reached). Returns the number
|
||||
of strings pushed onto the vector.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Position(<b>int</b> i = 0)<b>const</b>;</td>
|
||||
<td valign="top" width="42%">Returns the position of what matched
|
||||
sub-expression <i>i</i>. If <i>i = 0</i> then returns the position
|
||||
of the whole match. Returns RegEx::npos if the supplied index is
|
||||
invalid, or if the specified sub-expression did not participate in
|
||||
the match.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Length(<b>int</b> i = 0)<b>const</b>;</td>
|
||||
<td valign="top" width="42%">Returns the length of what matched
|
||||
sub-expression <i>i</i>. If <i>i = 0</i> then returns the length of
|
||||
the whole match. Returns RegEx::npos if the supplied index is
|
||||
invalid, or if the specified sub-expression did not participate in
|
||||
the match.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><strong>bool</strong> Matched(<strong>int</strong> i =
|
||||
0)<strong>const</strong>;</td>
|
||||
<td>Returns true if sub-expression <em>i</em> was matched, false
|
||||
otherwise.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Line()<b>const</b>;</td>
|
||||
<td valign="top" width="42%">Returns the line on which the match
|
||||
occurred, indexes start from 1 not zero, if no match occurred then
|
||||
returns RegEx::npos.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned int</b> Marks()
|
||||
const;</td>
|
||||
<td valign="top" width="42%">Returns the number of marked
|
||||
sub-expressions contained in the expression. Note that this
|
||||
includes the whole match (sub-expression zero), so the value
|
||||
returned is always >= 1.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">std::string What(<b>int</b>
|
||||
i)<b>const</b>;</td>
|
||||
<td valign="top" width="42%">Returns a copy of what matched
|
||||
sub-expression <i>i</i>. If <i>i = 0</i> then returns a copy of the
|
||||
whole match. Returns a null string if the index is invalid or if
|
||||
the specified sub-expression did not participate in a match.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">std::string <b>
|
||||
operator</b>[](<b>int</b> i)<b>const</b> ;</td>
|
||||
<td valign="top" width="42%">Returns <i>what(i);</i>
|
||||
|
||||
<p>Can be used to simplify access to sub-expression matches, and
|
||||
make usage more perl-like.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
213
doc/Attic/regex_format.html
Normal file
213
doc/Attic/regex_format.html
Normal file
@ -0,0 +1,213 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: Algorithm regex_format (deprecated)</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">Algorithm regex_format (deprecated)</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<p>The algorithm regex_format is deprecated; new code should use
|
||||
match_results::format instead. Existing code will continue to
|
||||
compile, the following documentation is taken from the previous
|
||||
version of boost.regex and will not be further updated:</p>
|
||||
|
||||
<h3>Algorithm regex_format</h3>
|
||||
|
||||
<pre>
|
||||
#include <<a href="../../boost/regex.hpp">boost/regex.hpp</a>>
|
||||
</pre>
|
||||
|
||||
<p>The algorithm regex_format takes the results of a match and
|
||||
creates a new string based upon a <a href="format_syntax.html">
|
||||
format string</a>, regex_format can be used for search and replace
|
||||
operations:</p>
|
||||
|
||||
<pre>
|
||||
<b>template</b> <<b>class</b> OutputIterator, <b>class</b> iterator, <b>class</b> Allocator, <b>class</b> charT>
|
||||
OutputIterator regex_format(OutputIterator out,
|
||||
<b>const</b> match_results<iterator, Allocator>& m,
|
||||
<b>const</b> charT* fmt,
|
||||
match_flag_type flags = 0);
|
||||
<b>template</b> <<b>class</b> OutputIterator, <b>class</b> iterator, <b>class</b> Allocator, <b>class</b> charT>
|
||||
OutputIterator regex_format(OutputIterator out,
|
||||
<b>const</b> match_results<iterator, Allocator>& m,
|
||||
<b>const</b> std::basic_string<charT>& fmt,
|
||||
match_flag_type flags = 0);
|
||||
</pre>
|
||||
|
||||
<p>The library also defines the following convenience variation of
|
||||
regex_format, which returns the result directly as a string, rather
|
||||
than outputting to an iterator [note - this version may not be
|
||||
available, or may be available in a more limited form, depending
|
||||
upon your compilers capabilities]:</p>
|
||||
|
||||
<pre>
|
||||
<b>template</b> <<b>class</b> iterator, <b>class</b> Allocator, <b>class</b> charT>
|
||||
std::basic_string<charT> regex_format
|
||||
(<b>const</b> match_results<iterator, Allocator>& m,
|
||||
<b>const</b> charT* fmt,
|
||||
match_flag_type flags = 0);
|
||||
|
||||
<b>template</b> <<b>class</b> iterator, <b>class</b> Allocator, <b>class</b> charT>
|
||||
std::basic_string<charT> regex_format
|
||||
(<b>const</b> match_results<iterator, Allocator>& m,
|
||||
<b>const</b> std::basic_string<charT>& fmt,
|
||||
match_flag_type flags = 0);
|
||||
</pre>
|
||||
|
||||
<p>Parameters to the main version of the function are passed as
|
||||
follows:</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table id="Table2" cellspacing="0" cellpadding="7" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%">OutputIterator out</td>
|
||||
<td valign="top" width="44%">An output iterator type, the output
|
||||
string is sent to this iterator. Typically this would be a
|
||||
std::ostream_iterator.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%"><b>const</b>
|
||||
match_results<iterator, Allocator>& m</td>
|
||||
<td valign="top" width="44%">An instance of match_results<>
|
||||
obtained from one of the matching algorithms above, and denoting
|
||||
what matched.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%"><b>const</b> charT* fmt</td>
|
||||
<td valign="top" width="44%">A format string that determines how
|
||||
the match is transformed into the new string.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%"><b>unsigned</b> flags</td>
|
||||
<td valign="top" width="44%">Optional flags which describe how the
|
||||
format string is to be interpreted.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p><a name="format_flags"></a>Format flags are defined as
|
||||
follows:</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table id="Table3" cellspacing="0" cellpadding="7" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%">format_all</td>
|
||||
<td valign="top" width="43%">Enables all syntax options (perl-like
|
||||
plus extentions).</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%">format_sed</td>
|
||||
<td valign="top" width="43%">Allows only a sed-like syntax.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%">format_perl</td>
|
||||
<td valign="top" width="43%">Allows only a perl-like syntax.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%">format_no_copy</td>
|
||||
<td valign="top" width="43%">Disables copying of unmatched sections
|
||||
to the output string during <a href="regex_merge.html">
|
||||
regex_merge</a> operations.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>format_first_only</td>
|
||||
<td>When this flag is set only the first occurance will be replaced
|
||||
(applies to regex_merge only).</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p>The format string syntax (and available options) is described
|
||||
more fully under <a href="format_syntax.html">format strings</a>
|
||||
.</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
386
doc/Attic/regex_grep.html
Normal file
386
doc/Attic/regex_grep.html
Normal file
@ -0,0 +1,386 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Algorithm regex_grep (deprecated)</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
<h2 align="center">Algorithm regex_grep (deprecated)</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<hr>
|
||||
<p>The algorithm regex_grep is deprecated in favor of <a href="regex_iterator.html">regex_iterator</a>
|
||||
which provides a more convenient and standard library friendly interface.</p>
|
||||
<p>The following documentation is taken unchanged from the previous boost release,
|
||||
and will not be updated in future.</p>
|
||||
<hr>
|
||||
<pre>
|
||||
#include <<a href="../../boost/regex.hpp">boost/regex.hpp</a>>
|
||||
</pre>
|
||||
<p>regex_grep allows you to search through a bidirectional-iterator range and
|
||||
locate all the (non-overlapping) matches with a given regular expression. The
|
||||
function is declared as:</p>
|
||||
<pre>
|
||||
<b>template</b> <<b>class</b> Predicate, <b>class</b> iterator, <b>class</b> charT, <b>class</b> traits, <b>class</b> Allocator>
|
||||
<b>unsigned</b> <b>int</b> regex_grep(Predicate foo,
|
||||
iterator first,
|
||||
iterator last,
|
||||
<b>const</b> basic_regex<charT, traits, Allocator>& e,
|
||||
<b>unsigned</b> flags = match_default)
|
||||
</pre>
|
||||
<p>The library also defines the following convenience versions, which take either
|
||||
a const charT*, or a const std::basic_string<>& in place of a pair of
|
||||
iterators [note - these versions may not be available, or may be available in a
|
||||
more limited form, depending upon your compilers capabilities]:</p>
|
||||
<pre>
|
||||
<b>template</b> <<b>class</b> Predicate, <b>class</b> charT, <b>class</b> Allocator, <b>class</b> traits>
|
||||
<b>unsigned</b> <b>int</b> regex_grep(Predicate foo,
|
||||
<b>const</b> charT* str,
|
||||
<b>const</b> basic_regex<charT, traits, Allocator>& e,
|
||||
<b>unsigned</b> flags = match_default);
|
||||
|
||||
<b>template</b> <<b>class</b> Predicate, <b>class</b> ST, <b>class</b> SA, <b>class</b> Allocator, <b>class</b> charT, <b>class</b> traits>
|
||||
<b>unsigned</b> <b>int</b> regex_grep(Predicate foo,
|
||||
<b>const</b> std::basic_string<charT, ST, SA>& s,
|
||||
<b>const</b> basic_regex<charT, traits, Allocator>& e,
|
||||
<b>unsigned</b> flags = match_default);
|
||||
</pre>
|
||||
<p>The parameters for the primary version of regex_grep have the following
|
||||
meanings: </p>
|
||||
<p></p>
|
||||
<table id="Table2" cellspacing="0" cellpadding="7" width="624" border="0">
|
||||
<tr>
|
||||
<td width="5%"> </td>
|
||||
<td valign="top" width="50%">foo</td>
|
||||
<td valign="top" width="50%">A predicate function object or function pointer, see
|
||||
below for more information.</td>
|
||||
<td width="5%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top" width="50%">first</td>
|
||||
<td valign="top" width="50%">The start of the range to search.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top" width="50%">last</td>
|
||||
<td valign="top" width="50%">The end of the range to search.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top" width="50%">e</td>
|
||||
<td valign="top" width="50%">The regular expression to search for.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top" width="50%">flags</td>
|
||||
<td valign="top" width="50%">The flags that determine how matching is carried out,
|
||||
one of the <a href="#match_type">match_flags</a> enumerators.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<p>The algorithm finds all of the non-overlapping matches of the expression e, for
|
||||
each match it fills a <a href="#reg_match">match_results</a><iterator,
|
||||
Allocator> structure, which contains information on what matched, and calls
|
||||
the predicate foo, passing the match_results<iterator, Allocator> as a
|
||||
single argument. If the predicate returns true, then the grep operation
|
||||
continues, otherwise it terminates without searching for further matches. The
|
||||
function returns the number of matches found.</p>
|
||||
<p>The general form of the predicate is:</p>
|
||||
<pre>
|
||||
<b>struct</b> grep_predicate
|
||||
{
|
||||
<b> bool</b> <b>operator</b>()(<b>const</b> match_results<iterator_type, typename expression_type::alloc_type::template rebind<sub_match<BidirectionalIterator> >::other>& m);
|
||||
};
|
||||
</pre>
|
||||
<p>Note that in almost every case the allocator parameter can be omitted, when
|
||||
specifying the <a href="match_results.html">match_results</a> type,
|
||||
alternatively one of the typedefs cmatch, wcmatch, smatch or wsmatch can be
|
||||
used.</p>
|
||||
<p>For example the regular expression "a*b" would find one match in the string
|
||||
"aaaaab" and two in the string "aaabb".</p>
|
||||
<p>Remember this algorithm can be used for a lot more than implementing a version
|
||||
of grep, the predicate can be and do anything that you want, grep utilities
|
||||
would output the results to the screen, another program could index a file
|
||||
based on a regular expression and store a set of bookmarks in a list, or a text
|
||||
file conversion utility would output to file. The results of one regex_grep can
|
||||
even be chained into another regex_grep to create recursive parsers.</p>
|
||||
<P>The algorithm may throw <CODE>std::runtime_error</CODE> if the complexity
|
||||
of matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<p><a href="../example/snippets/regex_grep_example_1.cpp"> Example</a>: convert
|
||||
the example from <i>regex_search</i> to use <i>regex_grep</i> instead:</p>
|
||||
<pre>
|
||||
<font color="#008000">#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
</font><font color="#000080"><i>// IndexClasses:
|
||||
// takes the contents of a file in the form of a string
|
||||
// and searches for all the C++ class definitions, storing
|
||||
// their locations in a map of strings/int's
|
||||
</i></font><b>typedef</b> std::map<std::string, <b>int</b>, std::less<std::string> > map_type;
|
||||
|
||||
const char* re =
|
||||
// possibly leading whitespace:
|
||||
"^[[:space:]]*"
|
||||
// possible template declaration:
|
||||
"(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"
|
||||
// class or struct:
|
||||
"(class|struct)[[:space:]]*"
|
||||
// leading declspec macros etc:
|
||||
"("
|
||||
"\\<\\w+\\>"
|
||||
"("
|
||||
"[[:blank:]]*\\([^)]*\\)"
|
||||
")?"
|
||||
"[[:space:]]*"
|
||||
")*"
|
||||
// the class name
|
||||
"(\\<\\w*\\>)[[:space:]]*"
|
||||
// template specialisation parameters
|
||||
"(<[^;:{]+>)?[[:space:]]*"
|
||||
// terminate in { or :
|
||||
"(\\{|:[^;\\{()]*\\{)";
|
||||
|
||||
boost::regex expression(re);
|
||||
<b>class</b> IndexClassesPred
|
||||
{
|
||||
map_type& m;
|
||||
std::string::const_iterator base;
|
||||
<b>public</b>:
|
||||
IndexClassesPred(map_type& a, std::string::const_iterator b) : m(a), base(b) {}
|
||||
<b>bool</b> <b>operator</b>()(<b>const</b> smatch& what)
|
||||
{
|
||||
<font color=
|
||||
#000080> <i>// what[0] contains the whole string
|
||||
</i> <i>// what[5] contains the class name.
|
||||
</i> <i>// what[6] contains the template specialisation if any.
|
||||
</i> <i>// add class name and position to map:
|
||||
</i></font> m[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - base;
|
||||
<b>return</b> <b>true</b>;
|
||||
}
|
||||
};
|
||||
<b>void</b> IndexClasses(map_type& m, <b>const</b> std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
regex_grep(IndexClassesPred(m, start), start, end, expression);
|
||||
}
|
||||
</pre>
|
||||
<p><a href="../example/snippets/regex_grep_example_2.cpp"> Example</a>: Use
|
||||
regex_grep to call a global callback function:</p>
|
||||
<pre>
|
||||
<font color="#008000">#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
</font><font color="#000080"><i>// purpose:
|
||||
// takes the contents of a file in the form of a string
|
||||
// and searches for all the C++ class definitions, storing
|
||||
// their locations in a map of strings/int's
|
||||
</i></font><b>typedef</b> std::map<std::string, <b>int</b>, std::less<std::string> > map_type;
|
||||
|
||||
const char* re =
|
||||
// possibly leading whitespace:
|
||||
"^[[:space:]]*"
|
||||
// possible template declaration:
|
||||
"(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"
|
||||
// class or struct:
|
||||
"(class|struct)[[:space:]]*"
|
||||
// leading declspec macros etc:
|
||||
"("
|
||||
"\\<\\w+\\>"
|
||||
"("
|
||||
"[[:blank:]]*\\([^)]*\\)"
|
||||
")?"
|
||||
"[[:space:]]*"
|
||||
")*"
|
||||
// the class name
|
||||
"(\\<\\w*\\>)[[:space:]]*"
|
||||
// template specialisation parameters
|
||||
"(<[^;:{]+>)?[[:space:]]*"
|
||||
// terminate in { or :
|
||||
"(\\{|:[^;\\{()]*\\{)";
|
||||
|
||||
boost::regex expression(re);
|
||||
map_type class_index;
|
||||
std::string::const_iterator base;
|
||||
|
||||
<b>bool</b> grep_callback(<b>const</b> boost::smatch& what)
|
||||
{
|
||||
<font color="#000080"> <i>// what[0] contains the whole string
|
||||
</i> <i>// what[5] contains the class name.
|
||||
</i> <i>// what[6] contains the template specialisation if any.
|
||||
</i> <i>// add class name and position to map:
|
||||
</i></font> class_index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - base;
|
||||
<b>return</b> <b>true</b>;
|
||||
}
|
||||
<b>void</b> IndexClasses(<b>const</b> std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
base = start;
|
||||
regex_grep(grep_callback, start, end, expression, match_default);
|
||||
}
|
||||
|
||||
</pre>
|
||||
<p><a href="../example/snippets/regex_grep_example_3.cpp"> Example</a>: use
|
||||
regex_grep to call a class member function, use the standard library adapters <i>std::mem_fun</i>
|
||||
and <i>std::bind1st</i> to convert the member function into a predicate:</p>
|
||||
<pre>
|
||||
<font color="#008000">#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
#include <functional>
|
||||
</font><font color="#000080"><i>// purpose:
|
||||
// takes the contents of a file in the form of a string
|
||||
// and searches for all the C++ class definitions, storing
|
||||
// their locations in a map of strings/int's
|
||||
|
||||
</i></font><b>typedef</b> std::map<std::string, <b>int</b>, std::less<std::string> > map_type;
|
||||
<b>class</b> class_index
|
||||
{
|
||||
boost::regex expression;
|
||||
map_type index;
|
||||
std::string::const_iterator base;
|
||||
<b>bool</b> grep_callback(boost::smatch what);
|
||||
<b>public</b>:
|
||||
<b> void</b> IndexClasses(<b>const</b> std::string& file);
|
||||
class_index()
|
||||
: index(),
|
||||
expression(<font color=
|
||||
#000080>"^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"
|
||||
"(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?"
|
||||
"[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?"
|
||||
"(\\{|:[^;\\{()]*\\{)"
|
||||
</font> ){}
|
||||
};
|
||||
<b>bool</b> class_index::grep_callback(boost::smatch what)
|
||||
{
|
||||
<font color="#000080"> <i>// what[0] contains the whole string
|
||||
</i> <i>// what[5] contains the class name.
|
||||
</i> <i>// what[6] contains the template specialisation if any.
|
||||
</i> <i>// add class name and position to map:
|
||||
</i></font> index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - base;
|
||||
<b>return</b> <b>true</b>;
|
||||
}
|
||||
|
||||
<b>void</b> class_index::IndexClasses(<b>const</b> std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
base = start;
|
||||
regex_grep(std::bind1st(std::mem_fun(&class_index::grep_callback), <b>this</b>),
|
||||
start,
|
||||
end,
|
||||
expression);
|
||||
}
|
||||
|
||||
</pre>
|
||||
<p><a href="../example/snippets/regex_grep_example_4.cpp"> Finally</a>, C++
|
||||
Builder users can use C++ Builder's closure type as a callback argument:</p>
|
||||
<pre>
|
||||
<font color="#008000">#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
#include <functional>
|
||||
</font><font color="#000080"><i>// purpose:
|
||||
// takes the contents of a file in the form of a string
|
||||
// and searches for all the C++ class definitions, storing
|
||||
// their locations in a map of strings/int's
|
||||
|
||||
</i></font><b>typedef</b> std::map<std::string, <b>int</b>, std::less<std::string> > map_type;
|
||||
<b>class</b> class_index
|
||||
{
|
||||
boost::regex expression;
|
||||
map_type index;
|
||||
std::string::const_iterator base;
|
||||
<b>typedef</b> boost::smatch arg_type;
|
||||
<b>bool</b> grep_callback(<b>const</b> arg_type& what);
|
||||
<b>public</b>:
|
||||
<b>typedef</b> <b>bool</b> (<b>__closure</b>* grep_callback_type)(<b>const</b> arg_type&);
|
||||
<b>void</b> IndexClasses(<b>const</b> std::string& file);
|
||||
class_index()
|
||||
: index(),
|
||||
expression(<font color=
|
||||
#000080>"^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"
|
||||
"(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?"
|
||||
"[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?"
|
||||
"(\\{|:[^;\\{()]*\\{)"
|
||||
</font> ){}
|
||||
};
|
||||
|
||||
<b>bool</b> class_index::grep_callback(<b>const</b> arg_type& what)
|
||||
{
|
||||
<font color=
|
||||
#000080> <i>// what[0] contains the whole string</i>
|
||||
<i>// what[5] contains the class name.</i>
|
||||
<i>// what[6] contains the template specialisation if any.</i>
|
||||
<i>// add class name and position to map:</i></font>
|
||||
index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - base;
|
||||
<b>return</b> <b>true</b>;
|
||||
}
|
||||
|
||||
<b>void</b> class_index::IndexClasses(<b>const</b> std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
base = start;
|
||||
class_index::grep_callback_type cl = &(<b>this</b>->grep_callback);
|
||||
regex_grep(cl,
|
||||
start,
|
||||
end,
|
||||
expression);
|
||||
}
|
||||
</pre>
|
||||
<p></p>
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
<p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
427
doc/Attic/regex_iterator.html
Normal file
427
doc/Attic/regex_iterator.html
Normal file
@ -0,0 +1,427 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: regex_iterator</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link href="../../../boost.css" type="text/css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" alt="C++ Boost" src="../../../c++boost.gif" width="277" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
<h2 align="center">regex_iterator</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" alt="Boost.Regex Index" src="uarrow.gif" width="43" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<hr>
|
||||
<h3>Contents</h3>
|
||||
<dl class="index">
|
||||
<dt><a href="#synopsis">Synopsis</a> <dt><a href="#description">Description</a> <dt><a href="#examples">
|
||||
Examples</a></dt>
|
||||
</dl>
|
||||
<h3><a name="synopsis"></a>Synopsis</h3>
|
||||
<p>The iterator type regex_iterator will enumerate all of the regular expression
|
||||
matches found in some sequence: dereferencing a regex_iterator yields a
|
||||
reference to a <a href="match_results.html">match_results</a> object.</p>
|
||||
<pre>
|
||||
template <class BidirectionalIterator,
|
||||
class charT = iterator_traits<BidirectionalIterator>::value_type,
|
||||
class traits = regex_traits<charT>,
|
||||
class Allocator = allocator<charT> >
|
||||
class regex_iterator
|
||||
{
|
||||
public:
|
||||
typedef basic_regex<charT, traits, Allocator> regex_type;
|
||||
typedef match_results<BidirectionalIterator> value_type;
|
||||
typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type;
|
||||
typedef const value_type* pointer;
|
||||
typedef const value_type& reference;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
|
||||
regex_iterator();
|
||||
regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
|
||||
const regex_type& re,
|
||||
match_flag_type m = match_default);
|
||||
regex_iterator(const regex_iterator&);
|
||||
regex_iterator& operator=(const regex_iterator&);
|
||||
bool operator==(const regex_iterator&);
|
||||
bool operator!=(const regex_iterator&);
|
||||
const value_type& operator*();
|
||||
const value_type* operator->();
|
||||
regex_iterator& operator++();
|
||||
regex_iterator operator++(int);
|
||||
};
|
||||
|
||||
</pre>
|
||||
<h3><a name="description"></a>Description</h3>
|
||||
<p>A regex_iterator is constructed from a pair of iterators, and enumerates all
|
||||
occurrences of a regular expression within that iterator range.</p>
|
||||
<pre>
|
||||
regex_iterator();
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> constructs an end of sequence regex_iterator.</p>
|
||||
<pre>
|
||||
regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
|
||||
const regex_type& re,
|
||||
match_flag_type m = match_default);
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> constructs a regex_iterator that will enumerate all occurrences
|
||||
of the expression <em>re</em>, within the sequence <em>[a,b)</em>, and found
|
||||
using match flags <em>m</em>. The object <em>re</em> must exist for the
|
||||
lifetime of the regex_iterator.</p>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<pre>
|
||||
regex_iterator(const regex_iterator& that);
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> constructs a copy of <code>that</code>.</p>
|
||||
<b></b>
|
||||
<p><b>Postconditions:</b> <code>*this == that</code>.</p>
|
||||
<pre>
|
||||
regex_iterator& operator=(const regex_iterator&);
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> sets <code>*this</code> equal to those in <code>that</code>.</p>
|
||||
<b></b>
|
||||
<p><b>Postconditions:</b> <code>*this == that</code>.</p>
|
||||
<pre>
|
||||
bool operator==(const regex_iterator& that);
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> returns true if *this is equal to that.</p>
|
||||
<pre>
|
||||
bool operator!=(const regex_iterator&);
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> returns <code>!(*this == that)</code>.</p>
|
||||
<pre>
|
||||
const value_type& operator*();
|
||||
</pre>
|
||||
<p><b>Effects:</b> dereferencing a regex_iterator object <em>it</em> yields a
|
||||
const reference to a <a href="match_results.html">match_results</a> object,
|
||||
whose members are set as follows:</p>
|
||||
<p></p>
|
||||
<table id="Table2" cellspacing="1" cellpadding="7" width="624" border="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" width="50%"><b></b>
|
||||
<p><b>Element</b></p>
|
||||
</td>
|
||||
<td valign="top" width="50%"><b></b>
|
||||
<p><b>Value</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).size()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>re.mark_count()</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).empty()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>false</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).prefix().first</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>The end of the last match found, or the start of the underlying sequence if
|
||||
this is the first match enumerated</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).prefix().last</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[0].first</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).prefix().matched</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).prefix().first != (*it).prefix().second</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).suffix().first</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[0].second</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).suffix().last</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>The end of the underlying sequence.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).suffix().matched</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).suffix().first != (*it).suffix().second</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[0].first</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>The start of the sequence of characters that matched the regular expression</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[0].second</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>The end of the sequence of characters that matched the regular expression</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[0].matched</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p><code>true</code> if a full match was found, and <code>false</code> if it was a
|
||||
partial match (found as a result of the <code>match_partial</code> flag being
|
||||
set).</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[n].first</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>For all integers n < (*it).size(), the start of the sequence that matched
|
||||
sub-expression <i>n</i>. Alternatively, if sub-expression n did not participate
|
||||
in the match, then <i>last</i>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[n].second</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>For all integers n < (*it).size(), the end of the sequence that matched
|
||||
sub-expression <i>n</i>. Alternatively, if sub-expression n did not participate
|
||||
in the match, then <i>last</i>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[n].matched</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>For all integers n < (*it).size(), true if sub-expression <i>n</i> participated
|
||||
in the match, false otherwise.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">(*it).position(n)</td>
|
||||
<td valign="top" width="50%">For all integers n < (*it).size(), then the
|
||||
distance from the start of the underlying sequence to the start of
|
||||
sub-expression match <em>n</em>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<pre>
|
||||
const value_type* operator->();
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> returns <code>&(*this)</code>.</p>
|
||||
<pre>
|
||||
regex_iterator& operator++();
|
||||
</pre>
|
||||
<p><strong>Effects:</strong> moves the iterator to the next match in the
|
||||
underlying sequence, or the end of sequence iterator if none if found.
|
||||
When the last match found matched a zero length string, then the
|
||||
regex_iterator will find the next match as follows: if there exists a non-zero
|
||||
length match that starts at the same location as the last one, then returns it,
|
||||
otherwise starts looking for the next (possibly zero length) match from one
|
||||
position to the right of the last match.</p>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<b></b>
|
||||
<p><b>Returns:</b> <code>*this</code>.</p>
|
||||
<pre>
|
||||
regex_iterator operator++(int);
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> constructs a copy <code>result</code> of <code>*this</code>,
|
||||
then calls <code>++(*this)</code>.</p>
|
||||
<b></b>
|
||||
<p><b>Returns:</b> <code>result</code>.</p>
|
||||
<h3>Examples</h3>
|
||||
<p>The following <a href="../example/snippets/regex_iterator_example.cpp">example</a>
|
||||
takes a C++ source file and builds up an index of class names, and the location
|
||||
of that class in the file.</p>
|
||||
<pre>
|
||||
<font color="#008040">#include <string></font>
|
||||
<font color="#008040">#include <map></font>
|
||||
<font color="#008040">#include <fstream></font>
|
||||
<font color="#008040">#include <iostream></font>
|
||||
<font color="#008040">#include <boost/regex.hpp></font>
|
||||
|
||||
<b>using</b> <b>namespace</b> std;
|
||||
|
||||
<i><font color="#000080">// purpose:</font></i>
|
||||
<i><font color=
|
||||
#000080>// takes the contents of a file in the form of a string</font></i>
|
||||
<i><font color=
|
||||
#000080>// and searches for all the C++ class definitions, storing</font></i>
|
||||
<i><font color=
|
||||
#000080>// their locations in a map of strings/int's</font></i>
|
||||
|
||||
<b>typedef</b> std::map<std::string, std::string::difference_type, std::less<std::string> > map_type;
|
||||
|
||||
<b>const</b> <b>char</b>* re =
|
||||
<i><font color=
|
||||
#000080>// possibly leading whitespace: </font></i>
|
||||
<font color="#0000ff">"^[[:space:]]*"</font>
|
||||
<i><font color=
|
||||
#000080>// possible template declaration:</font></i>
|
||||
<font color=
|
||||
#0000ff>"(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"</font>
|
||||
<i><font color="#000080">// class or struct:</font></i>
|
||||
<font color="#0000ff">"(class|struct)[[:space:]]*"</font>
|
||||
<i><font color=
|
||||
#000080>// leading declspec macros etc:</font></i>
|
||||
<font color="#0000ff">"("</font>
|
||||
<font color="#0000ff">"\\<\\w+\\>"</font>
|
||||
<font color="#0000ff">"("</font>
|
||||
<font color="#0000ff">"[[:blank:]]*\\([^)]*\\)"</font>
|
||||
<font color="#0000ff">")?"</font>
|
||||
<font color="#0000ff">"[[:space:]]*"</font>
|
||||
<font color="#0000ff">")*"</font>
|
||||
<i><font color="#000080">// the class name</font></i>
|
||||
<font color="#0000ff">"(\\<\\w*\\>)[[:space:]]*"</font>
|
||||
<i><font color=
|
||||
#000080>// template specialisation parameters</font></i>
|
||||
<font color="#0000ff">"(<[^;:{]+>)?[[:space:]]*"</font>
|
||||
<i><font color="#000080">// terminate in { or :</font></i>
|
||||
<font color="#0000ff">"(\\{|:[^;\\{()]*\\{)"</font>;
|
||||
|
||||
|
||||
boost::regex expression(re);
|
||||
map_type class_index;
|
||||
|
||||
<b>bool</b> regex_callback(<b>const</b> boost::match_results<std::string::const_iterator>& what)
|
||||
{
|
||||
<i><font color=
|
||||
#000080>// what[0] contains the whole string</font></i>
|
||||
<i><font color=
|
||||
#000080>// what[5] contains the class name.</font></i>
|
||||
<i><font color=
|
||||
#000080>// what[6] contains the template specialisation if any.</font></i>
|
||||
<i><font color=
|
||||
#000080>// add class name and position to map:</font></i>
|
||||
class_index[what[<font color=
|
||||
#0000a0>5</font>].str() + what[<font color=
|
||||
#0000a0>6</font>].str()] = what.position(<font color=
|
||||
#0000a0>5</font>);
|
||||
<b>return</b> <b>true</b>;
|
||||
}
|
||||
|
||||
<b>void</b> load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
s.reserve(is.rdbuf()->in_avail());
|
||||
<b>char</b> c;
|
||||
<b>while</b>(is.get(c))
|
||||
{
|
||||
<b>if</b>(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * <font color="#0000a0">3</font>);
|
||||
s.append(<font color="#0000a0">1</font>, c);
|
||||
}
|
||||
}
|
||||
|
||||
<b>int</b> main(<b>int</b> argc, <b>const</b> <b>char</b>** argv)
|
||||
{
|
||||
std::string text;
|
||||
<b>for</b>(<b>int</b> i = <font color=
|
||||
#0000a0>1</font>; i < argc; ++i)
|
||||
{
|
||||
cout << <font color=
|
||||
#0000ff>"Processing file "</font> << argv[i] << endl;
|
||||
std::ifstream fs(argv[i]);
|
||||
load_file(text, fs);
|
||||
<i><font color=
|
||||
#000080>// construct our iterators:</font></i>
|
||||
boost::regex_iterator<std::string::const_iterator> m1(text.begin(), text.end(), expression);
|
||||
boost::regex_iterator<std::string::const_iterator> m2;
|
||||
std::for_each(m1, m2, <20>ex_callback);
|
||||
<i><font color="#000080">// copy results:</font></i>
|
||||
cout << class_index.size() << <font color=
|
||||
#0000ff>" matches found"</font> << endl;
|
||||
map_type::iterator c, d;
|
||||
c = class_index.begin();
|
||||
d = class_index.end();
|
||||
<b>while</b>(c != d)
|
||||
{
|
||||
cout << <font color=
|
||||
#0000ff>"class \""</font> << (*c).first << <font
|
||||
color=
|
||||
#0000ff>"\" found at index: "</font> << (*c).second << endl;
|
||||
++c;
|
||||
}
|
||||
class_index.erase(class_index.begin(), class_index.end());
|
||||
}
|
||||
<b>return</b> <font color="#0000a0">0</font>;
|
||||
}
|
||||
</pre>
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
<p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
317
doc/Attic/regex_match.html
Normal file
317
doc/Attic/regex_match.html
Normal file
@ -0,0 +1,317 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Algorithm regex_match</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Algorithm regex_match</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<H3>Contents</H3>
|
||||
<dl class="index">
|
||||
<dt><a href="#synopsis">Synopsis</a> <dt><a href="#description">Description</a> <dt><a href="#examples">
|
||||
Examples</a></dt>
|
||||
</dl>
|
||||
<H3><A name="synopsis"></A>Synopsis</H3>
|
||||
<PRE><A name=query_match></A>#include <<A href="../../boost/regex.hpp">boost/regex.hpp</A>> </PRE>
|
||||
<P>The algorithm regex _match determines whether a given regular expression
|
||||
matches a given sequence denoted by a pair of bidirectional-iterators, the
|
||||
algorithm is defined as follows, <STRONG>note that the result is true only if the
|
||||
expression matches the whole of the input sequence</STRONG>, the main use of
|
||||
this function is data input validation.
|
||||
<PRE>template <class BidirectionalIterator, class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
|
||||
<A href="match_results.html">match_results</A><BidirectionalIterator, Allocator>& m,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);
|
||||
|
||||
template <class BidirectionalIterator, class charT, class traits, class Allocator2>
|
||||
bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);
|
||||
|
||||
template <class charT, class Allocator, class traits, class Allocator2>
|
||||
bool regex_match(const charT* str, <A href="match_results.html">match_results</A><const charT*, Allocator>& m,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);
|
||||
|
||||
template <class ST, class SA, class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_match(const basic_string<charT, ST, SA>& s,
|
||||
<A href="match_results.html">match_results</A><typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);
|
||||
|
||||
template <class charT, class traits, class Allocator2>
|
||||
bool regex_match(const charT* str,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);
|
||||
|
||||
template <class ST, class SA, class charT, class traits, class Allocator2>
|
||||
bool regex_match(const basic_string<charT, ST, SA>& s,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);
|
||||
</PRE>
|
||||
<H3><A name="description"></A>Description</H3>
|
||||
<PRE>template <class BidirectionalIterator, class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
|
||||
<A href="match_results.html">match_results</A><BidirectionalIterator, Allocator>& m,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
|
||||
<P><B> Requires:</B> Type BidirectionalIterator meets the requirements of a
|
||||
Bidirectional Iterator (24.1.4).</P>
|
||||
<P><B> Effects: </B>Determines whether there is an exact match between the regular
|
||||
expression <I>e</I>, and all of the character sequence [first, last), parameter <I>
|
||||
flags</I> is used to <A href="match_flag_type.html">control how the expression
|
||||
is matched</A> against the character sequence. Returns true if such a match
|
||||
exists, false otherwise.</P>
|
||||
<P><STRONG>Throws:</STRONG> <code>std::runtime_error</code> if the complexity of matching the
|
||||
expression against an N character string begins to exceed O(N<SUP>2</SUP>), or
|
||||
if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<P><B> Postconditions: </B>If the function returns false, then the effect on
|
||||
parameter <I>m</I> is undefined, otherwise the effects on parameter <I>m</I> are
|
||||
given in the table:</P>
|
||||
<P align="center">
|
||||
<CENTER>
|
||||
<TABLE id="Table2" cellSpacing="1" cellPadding="7" width="624" border="1">
|
||||
<TBODY>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P><B> Element</B>
|
||||
</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P><B> Value</B>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.size()</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>e.mark_count()</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.empty()</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>false</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>first</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().last</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>first</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>false</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>last</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().last</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>last</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>false</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>first</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].second</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>last</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P><CODE> true</CODE> if a full match was found, and <CODE>false</CODE> if it was
|
||||
a partial match (found as a result of the <CODE>match_partial</CODE> flag being
|
||||
set).</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[n].first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>For all integers n < m.size(), the start of the sequence that matched
|
||||
sub-expression <I>n</I>. Alternatively, if sub-expression n did not participate
|
||||
in the match, then <I>last</I>.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[n].second</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>For all integers n < m.size(), the end of the sequence that matched
|
||||
sub-expression <I>n</I>. Alternatively, if sub-expression n did not participate
|
||||
in the match, then <I>last</I>.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[n].matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>For all integers n < m.size(), true if sub-expression <I>n</I> participated
|
||||
in the match, false otherwise.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TBODY></TD></TR></TABLE>
|
||||
</CENTER>
|
||||
<P></P>
|
||||
<DIV></DIV>
|
||||
<PRE> </PRE>
|
||||
<PRE>template <class BidirectionalIterator, class charT, class traits, class Allocator2>
|
||||
bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Behaves "as if" by constructing an instance of <CODE><A href="match_results.html">
|
||||
match_results</A><</CODE>BidirectionalIterator<CODE>> what</CODE>,
|
||||
and then returning the result of <CODE>regex_match(first, last, what, e, flags)</CODE>.</P>
|
||||
<PRE>template <class charT, class Allocator, class traits, class Allocator2>
|
||||
bool regex_match(const charT* str, <A href="match_results.html">match_results</A><const charT*, Allocator>& m,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_match(str, str +
|
||||
char_traits<charT>::length(str), m, e, flags)</CODE>.</P>
|
||||
<PRE>template <class ST, class SA, class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_match(const basic_string<charT, ST, SA>& s,
|
||||
<A href="match_results.html">match_results</A><typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_match(s.begin(), s.end(), m, e,
|
||||
flags)</CODE>.</P>
|
||||
<PRE>template <class charT, class traits, class Allocator2>
|
||||
bool regex_match(const charT* str,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_match(str, str +
|
||||
char_traits<charT>::length(str), e, flags)</CODE>.</P>
|
||||
<PRE>template <class ST, class SA, class charT, class traits, class Allocator2>
|
||||
bool regex_match(const basic_string<charT, ST, SA>& s,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_match(s.begin(), s.end(), e,
|
||||
flags)</CODE>.
|
||||
<H3><A name="examples"></A>Examples</H3>
|
||||
<P>The following <A href="../example/snippets/regex_match_example.cpp">example</A>
|
||||
processes an ftp response:
|
||||
<P></P>
|
||||
<PRE><FONT color=#008000>#include <stdlib.h>
|
||||
#include <boost/regex.hpp>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
</FONT><B>using namespace</B> boost;
|
||||
|
||||
regex expression(<FONT color=#000080>"([0-9]+)(\\-| |$)(.*)"</FONT>);
|
||||
|
||||
<FONT color=#000080><I>// process_ftp:
|
||||
// on success returns the ftp response code, and fills
|
||||
// msg with the ftp response message.
|
||||
</I></FONT><B>int</B> process_ftp(<B>const</B> <B>char</B>* response, std::string* msg)
|
||||
{
|
||||
cmatch what;
|
||||
<B>if</B>(regex_match(response, what, expression))
|
||||
{
|
||||
<FONT color=#000080> <I>// what[0] contains the whole string
|
||||
</I> <I>// what[1] contains the response code
|
||||
</I> <I>// what[2] contains the separator character
|
||||
</I> <I>// what[3] contains the text message.
|
||||
</I></FONT> <B>if</B>(msg)
|
||||
msg->assign(what[3].first, what[3].second);
|
||||
<B>return</B> std::atoi(what[1].first);
|
||||
}
|
||||
<FONT color=#000080> <I>// failure did not match
|
||||
</I></FONT> <B>if</B>(msg)
|
||||
msg->erase();
|
||||
<B>return</B> -1;
|
||||
}
|
||||
<P>
|
||||
<HR></PRE>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
47
doc/Attic/regex_merge.html
Normal file
47
doc/Attic/regex_merge.html
Normal file
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Algorithm regex_merge (deprecated)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Algorithm regex_merge (deprecated)</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>Algorithm regex_merge has been renamed <A href="regex_replace.html">regex_replace</A>,
|
||||
existing code will continue to compile, but new code should use <A href="regex_replace.html">
|
||||
regex_replace</A> instead.</P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
213
doc/Attic/regex_replace.html
Normal file
213
doc/Attic/regex_replace.html
Normal file
@ -0,0 +1,213 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Algorithm regex_replace</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<LINK href="../../../boost.css" type="text/css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td vAlign="top" width="300">
|
||||
<h3><A href="../../../index.htm"><IMG height="86" alt="C++ Boost" src="../../../c++boost.gif" width="277" border="0"></A></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Algorithm regex_replace</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><A href="index.html"><IMG height="45" alt="Boost.Regex Index" src="uarrow.gif" width="43" border="0"></A></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<H3>Contents</H3>
|
||||
<dl class="index">
|
||||
<dt><A href="#synopsis">Synopsis</A> <dt><a href="#description">Description</a> <dt><A href="#examples">
|
||||
Examples</A></dt></dl>
|
||||
<H3><A name="synopsis"></A>Synopsis</H3>
|
||||
<PRE>#include <<A href="../../../boost/regex.hpp">boost/regex.hpp</A>> </PRE>
|
||||
<P>The algorithm regex_replace searches through a string finding
|
||||
all the matches to the regular expression: for each match it then calls <A href="match_results.html">
|
||||
match_results::format</A> to format the string and sends the result to the
|
||||
output iterator. Sections of text that do not match are copied to the output
|
||||
unchanged only if the <EM>flags</EM> parameter does not have the flag <A href="match_flags.html">
|
||||
format_no_copy</A> set. If the flag <A href="match_flags.html">format_first_only</A>
|
||||
is set then only the first occurrence is replaced rather than all
|
||||
occurrences. <PRE>template <class OutputIterator, class BidirectionalIterator, class traits,
|
||||
class Allocator, class charT>
|
||||
OutputIterator regex_replace(OutputIterator out,
|
||||
BidirectionalIterator first,
|
||||
BidirectionalIterator last,
|
||||
const basic_regex<charT, traits, Allocator>& e,
|
||||
const basic_string<charT>& fmt,
|
||||
match_flag_type flags = match_default);
|
||||
|
||||
template <class traits, class Allocator, class charT>
|
||||
basic_string<charT> regex_replace(const basic_string<charT>& s,
|
||||
const basic_regex<charT, traits, Allocator>& e,
|
||||
const basic_string<charT>& fmt,
|
||||
match_flag_type flags = match_default);
|
||||
|
||||
</PRE>
|
||||
<H3><A name="description"></A>Description</H3>
|
||||
<PRE>template <class OutputIterator, class BidirectionalIterator, class traits,
|
||||
class Allocator, class charT>
|
||||
OutputIterator regex_replace(OutputIterator out,
|
||||
BidirectionalIterator first,
|
||||
BidirectionalIterator last,
|
||||
const basic_regex<charT, traits, Allocator>& e,
|
||||
const basic_string<charT>& fmt,
|
||||
match_flag_type flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Finds all the non-overlapping matches <I>m</I> of type <CODE>match_results<BidirectionalIterator>
|
||||
</CODE>that occur within the sequence [first, last). If no such matches are
|
||||
found and <CODE>!(flags & format_no_copy)</CODE> then calls <CODE>std::copy(first,
|
||||
last, out)</CODE>. Otherwise, for each match found, if <CODE>!(flags &
|
||||
format_no_copy)</CODE> calls <CODE>std::copy(m.prefix().first, m.prefix().last,
|
||||
out)</CODE>, and then calls <CODE>m.format(out, fmt, flags)</CODE>. Finally
|
||||
if <CODE>!(flags & format_no_copy)</CODE> calls <CODE>std::copy(last_m.suffix().first,
|
||||
last_m,suffix().last, out) </CODE>where <CODE>last_m</CODE> is a copy of the
|
||||
last match found. If <CODE>flags & format_first_only</CODE> is non-zero
|
||||
then only the first match found is replaced.</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<P><B> Returns:</B> <CODE>out</CODE>.
|
||||
</P>
|
||||
<PRE>template <class traits, class Allocator, class charT>
|
||||
basic_string<charT> regex_replace(const basic_string<charT>& s,
|
||||
const basic_regex<charT, traits, Allocator>& e,
|
||||
const basic_string<charT>& fmt,
|
||||
match_flag_type flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Constructs an object <CODE>basic_string<charT> result</CODE>,
|
||||
calls <CODE>regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt,
|
||||
flags)</CODE>, and then returns <CODE>result</CODE>.
|
||||
<H3><A name="examples"></A>Examples</H3>
|
||||
<P>The following <A href="../example/snippets/regex_replace_example.cpp">example</A>
|
||||
takes C/C++ source code as input, and outputs syntax highlighted HTML code.</P>
|
||||
<P></P>
|
||||
<PRE><FONT color=#008080>#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <iterator>
|
||||
#include <boost/regex.hpp>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
</FONT>
|
||||
<FONT color=#000080><I>// purpose:
|
||||
// takes the contents of a file and transform to
|
||||
// syntax highlighted code in html format
|
||||
</I></FONT>
|
||||
boost::regex e1, e2;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* expression_text;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* format_string;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* pre_expression;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* pre_format;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* header_text;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* footer_text;
|
||||
|
||||
<B>void</B> load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
s.reserve(is.rdbuf()->in_avail());
|
||||
<B>char</B> c;
|
||||
<B>while</B>(is.get(c))
|
||||
{
|
||||
<B>if</B>(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * <FONT color=#000080>3</FONT>);
|
||||
s.append(<FONT color=#000080>1</FONT>, c);
|
||||
}
|
||||
}
|
||||
|
||||
<B>int</B> main(<B>int</B> argc, <B>const</B> <B>char</B>** argv)
|
||||
{
|
||||
try{
|
||||
e1.assign(expression_text);
|
||||
e2.assign(pre_expression);
|
||||
<B>for</B>(<B>int</B> i = <FONT color=#000080>1</FONT>; i < argc; ++i)
|
||||
{
|
||||
std::cout << <FONT color=#0000ff>"Processing file "</FONT> << argv[i] << std::endl;
|
||||
std::ifstream fs(argv[i]);
|
||||
std::string in;
|
||||
load_file(in, fs);
|
||||
std::string out_name(std::string(argv[i]) + std::string(<FONT color=#0000ff>".htm"</FONT>));
|
||||
std::ofstream os(out_name.c_str());
|
||||
os << header_text;
|
||||
<FONT color=#000080><I>// strip '<' and '>' first by outputting to a
|
||||
</I></FONT> <FONT color=#000080><I>// temporary string stream
|
||||
</I></FONT> std::ostringstream t(std::ios::out | std::ios::binary);
|
||||
std::ostream_iterator<<B>char</B>, <B>char</B>> oi(t);
|
||||
boost::regex_replace(oi, in.begin(), in.end(),
|
||||
e2, pre_format, boost::match_default | boost::format_all);
|
||||
<FONT color=#000080><I>// then output to final output stream
|
||||
</I></FONT> <FONT color=#000080><I>// adding syntax highlighting:
|
||||
</I></FONT> std::string s(t.str());
|
||||
std::ostream_iterator<<B>char</B>, <B>char</B>> out(os);
|
||||
boost::regex_replace(out, s.begin(), s.end(),
|
||||
e1, format_string, boost::match_default | boost::format_all);
|
||||
os << footer_text;
|
||||
}
|
||||
}
|
||||
<STRONG>catch</STRONG>(...)
|
||||
{ <STRONG>return</STRONG> -1; }
|
||||
<B>return</B> <FONT color=#000080>0</FONT>;
|
||||
}
|
||||
|
||||
<B>extern</B> <B>const</B> <B>char</B>* pre_expression = <FONT color=#0000ff>"(<)|(>)|\\r"</FONT>;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* pre_format = <FONT color=#0000ff>"(?1<)(?2>)"</FONT>;
|
||||
|
||||
|
||||
<B>const</B> <B>char</B>* expression_text = <FONT color=#000080><I>// preprocessor directives: index 1
|
||||
</I></FONT> <FONT color=#0000ff>"(^[[:blank:]]*#(?:[^\\\\\\n]|\\\\[^\\n[:punct:][:word:]]*[\\n[:punct:][:word:]])*)|"
|
||||
</FONT> <FONT color=#000080><I>// comment: index 2
|
||||
</I></FONT> <FONT color=#0000ff>"(//[^\\n]*|/\\*.*?\\*/)|"
|
||||
</FONT> <FONT color=#000080><I>// literals: index 3
|
||||
</I></FONT> <FONT color=#0000ff>"\\<([+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\\.)?[[:digit:]]+(?:[eE][+-]?[[:digit:]]+)?))u?(?:(?:int(?:8|16|32|64))|L)?)\\>|"
|
||||
</FONT> <FONT color=#000080><I>// string literals: index 4
|
||||
</I></FONT> <FONT color=#0000ff>"('(?:[^\\\\']|\\\\.)*'|\"(?:[^\\\\\"]|\\\\.)*\")|"
|
||||
</FONT> <FONT color=#000080><I>// keywords: index 5
|
||||
</I></FONT> <FONT color=#0000ff>"\\<(__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import"
|
||||
</FONT> <FONT color=#0000ff>"|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall"
|
||||
</FONT> <FONT color=#0000ff>"|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|bool"
|
||||
</FONT> <FONT color=#0000ff>"|break|case|catch|cdecl|char|class|const|const_cast|continue|default|delete"
|
||||
</FONT> <FONT color=#0000ff>"|do|double|dynamic_cast|else|enum|explicit|extern|false|float|for|friend|goto"
|
||||
</FONT> <FONT color=#0000ff>"|if|inline|int|long|mutable|namespace|new|operator|pascal|private|protected"
|
||||
</FONT> <FONT color=#0000ff>"|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_cast"
|
||||
</FONT> <FONT color=#0000ff>"|struct|switch|template|this|throw|true|try|typedef|typeid|typename|union|unsigned"
|
||||
</FONT> <FONT color=#0000ff>"|using|virtual|void|volatile|wchar_t|while)\\>"
|
||||
</FONT> ;
|
||||
|
||||
<B>const</B> <B>char</B>* format_string = <FONT color=#0000ff>"(?1<font color=\"#008040\">$&</font>)"
|
||||
</FONT> <FONT color=#0000ff>"(?2<I><font color=\"#000080\">$&</font></I>)"
|
||||
</FONT> <FONT color=#0000ff>"(?3<font color=\"#0000A0\">$&</font>)"
|
||||
</FONT> <FONT color=#0000ff>"(?4<font color=\"#0000FF\">$&</font>)"
|
||||
</FONT> <FONT color=#0000ff>"(?5<B>$&</B>)"</FONT>;
|
||||
|
||||
<B>const</B> <B>char</B>* header_text = <FONT color=#0000ff>"<HTML>\n<HEAD>\n"
|
||||
</FONT> <FONT color=#0000ff>"<TITLE>Auto-generated html formated source</TITLE>\n"
|
||||
</FONT> <FONT color=#0000ff>"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=windows-1252\">\n"
|
||||
</FONT> <FONT color=#0000ff>"</HEAD>\n"
|
||||
</FONT> <FONT color=#0000ff>"<BODY LINK=\"#0000ff\" VLINK=\"#800080\" BGCOLOR=\"#ffffff\">\n"
|
||||
</FONT> <FONT color=#0000ff>"<P> </P>\n<PRE>"</FONT>;
|
||||
|
||||
<B>const</B> <B>char</B>* footer_text = <FONT color=#0000ff>"</PRE>\n</BODY>\n\n"</FONT>;
|
||||
</PRE>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
328
doc/Attic/regex_search.html
Normal file
328
doc/Attic/regex_search.html
Normal file
@ -0,0 +1,328 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Algorithm regex_search</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<LINK href="../../../boost.css" type="text/css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td vAlign="top" width="300">
|
||||
<h3><A href="../../../index.htm"><IMG height="86" alt="C++ Boost" src="../../../c++boost.gif" width="277" border="0"></A></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Algorithm regex_search</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><A href="index.html"><IMG height="45" alt="Boost.Regex Index" src="uarrow.gif" width="43" border="0"></A></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<H3>Contents</H3>
|
||||
<dl class="index">
|
||||
<dt><A href="#synopsis">Synopsis</A> <dt><a href="#description">Description</a> <dt><A href="#examples">
|
||||
Examples</A></dt></dl>
|
||||
<H3><A name="synopsis"></A>Synopsis</H3>
|
||||
<PRE>#include <<A href="../../boost/regex.hpp">boost/regex.hpp</A>> </PRE>
|
||||
<P></P>
|
||||
<P>The algorithm regex_search will search a range denoted by a pair of
|
||||
bidirectional-iterators for a given regular expression. The algorithm uses
|
||||
various heuristics to reduce the search time by only checking for a match if a
|
||||
match could conceivably start at that position. The algorithm is defined as
|
||||
follows:
|
||||
<PRE>template <class BidirectionalIterator,
|
||||
class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
|
||||
<a href="match_results.html">match_results</a><BidirectionalIterator, Allocator>& m,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator2>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);
|
||||
|
||||
template <class ST, class SA,
|
||||
class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_search(const basic_string<charT, ST, SA>& s,
|
||||
<a href="match_results.html">match_results</a><
|
||||
typename basic_string<charT, ST,SA>::const_iterator,
|
||||
Allocator>& m,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator2>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);
|
||||
|
||||
template<class charT, class Allocator, class traits,
|
||||
class Allocator2>
|
||||
bool regex_search(const charT* str,
|
||||
<a href="match_results.html">match_results</a><const charT*, Allocator>& m,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator2>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);
|
||||
|
||||
template <class BidirectionalIterator, class Allocator,
|
||||
class charT, class traits>
|
||||
bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);
|
||||
|
||||
template <class charT, class Allocator,
|
||||
class traits>
|
||||
bool regex_search(const charT* str,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);
|
||||
|
||||
template<class ST, class SA,
|
||||
class Allocator, class charT,
|
||||
class traits>
|
||||
bool regex_search(const basic_string<charT, ST, SA>& s,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);
|
||||
</PRE>
|
||||
<H3><A name="description"></A>Description</H3>
|
||||
<PRE>template <class BidirectionalIterator, class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
|
||||
<a href="match_results.html">match_results</a><BidirectionalIterator, Allocator>& m,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator2>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
|
||||
<P><B> Requires:</B> Type BidirectionalIterator meets the requirements of a
|
||||
Bidirectional Iterator (24.1.4).</P>
|
||||
<P><B> Effects: </B>Determines whether there is some sub-sequence within
|
||||
[first,last) that matches the regular expression <I>e</I>, parameter <I>flags</I>
|
||||
is used to control how the expression is matched against the character
|
||||
sequence. Returns true if such a sequence exists, false otherwise.</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<P><B> Postconditions: </B>If the function returns false, then the effect on
|
||||
parameter <I>m</I> is undefined, otherwise the effects on parameter <I>m</I> are
|
||||
given in the table:</P>
|
||||
<DIV align="center">
|
||||
<CENTER>
|
||||
<TABLE id="Table2" cellSpacing="1" cellPadding="7" width="624" border="1">
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P><B> Element</B></P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P><B> Value</B>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.size()</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>e.mark_count()</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.empty()</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>false</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>first</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().last</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].first</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().first != m.prefix().second</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].second</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().last</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>last</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().first != m.suffix().second</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The start of the sequence of characters that matched the regular expression</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].second</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The end of the sequence of characters that matched the regular expression</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P><CODE> true</CODE> if a full match was found, and <CODE>false</CODE> if it was
|
||||
a partial match (found as a result of the <CODE>match_partial</CODE> flag being
|
||||
set).</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[n].first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>For all integers n < m.size(), the start of the sequence that matched
|
||||
sub-expression <I>n</I>. Alternatively, if sub-expression n did not participate
|
||||
in the match, then <I>last</I>.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[n].second</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>For all integers n < m.size(), the end of the sequence that matched
|
||||
sub-expression <I>n</I>. Alternatively, if sub-expression n did not participate
|
||||
in the match, then <I>last</I>.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[n].matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>For all integers n < m.size(), true if sub-expression <I>n</I> participated
|
||||
in the match, false otherwise.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TD></TR></TABLE>
|
||||
</CENTER>
|
||||
</DIV>
|
||||
<PRE>template <class charT, class Allocator, class traits, class Allocator2>
|
||||
bool regex_search(const charT* str, <a href="match_results.html">match_results</a><const charT*, Allocator>& m,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator2>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_search(str, str +
|
||||
char_traits<charT>::length(str), m, e, flags)</CODE>.</P>
|
||||
<PRE>template <class ST, class SA, class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_search(const basic_string<charT, ST, SA>& s,
|
||||
<a href="match_results.html">match_results</a><typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator2>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_search(s.begin(), s.end(), m,
|
||||
e, flags)</CODE>.</P>
|
||||
<PRE>template <class iterator, class Allocator, class charT,
|
||||
class traits>
|
||||
bool regex_search(iterator first, iterator last,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Behaves "as if" by constructing an instance of <CODE><a href="match_results.html">
|
||||
match_results</a><</CODE>BidirectionalIterator<CODE>> what</CODE>,
|
||||
and then returning the result of <CODE>regex_search(first, last, what, e, flags)</CODE>.</P>
|
||||
<PRE>template <class charT, class Allocator, class traits>
|
||||
bool regex_search(const charT* str
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_search(str, str +
|
||||
char_traits<charT>::length(str), e, flags)</CODE>.</P>
|
||||
<PRE>template <class ST, class SA, class Allocator, class charT,
|
||||
class traits>
|
||||
bool regex_search(const basic_string<charT, ST, SA>& s,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_search(s.begin(), s.end(), e,
|
||||
flags)</CODE>.
|
||||
<H3><A name="examples"></A>Examples</H3>
|
||||
<P>The following <A href="../example/snippets/regex_search_example.cpp">example</A>,
|
||||
takes the contents of a file in the form of a string, and searches for all the
|
||||
C++ class declarations in the file. The code will work regardless of the way
|
||||
that std::string is implemented, for example it could easily be modified to
|
||||
work with the SGI rope class, which uses a non-contiguous storage strategy.</P>
|
||||
<P></P>
|
||||
<PRE><FONT color=#008000>#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
</FONT><FONT color=#000080><I>
|
||||
// purpose:
|
||||
// takes the contents of a file in the form of a string
|
||||
// and searches for all the C++ class definitions, storing
|
||||
// their locations in a map of strings/int's
|
||||
</I></FONT><B>typedef</B> std::map<std::string, <B>int</B>, std::less<std::string> > map_type;
|
||||
|
||||
boost::regex expression("^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?(\\{|:[^;\\{()]*\\{)");
|
||||
<B>
|
||||
void</B> IndexClasses(map_type& m, <B>const</B> std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
boost::<a href="match_results.html">match_results</a><std::string::const_iterator> what;
|
||||
<B>unsigned</B> <B>int</B> flags = boost::match_default;
|
||||
<B>while</B>(regex_search(start, end, what, expression, flags))
|
||||
{
|
||||
<FONT color=#000080> <I>// what[0] contains the whole string
|
||||
</I> <I>// what[5] contains the class name.
|
||||
</I> <I>// what[6] contains the template specialisation if any.
|
||||
</I> <I>// add class name and position to map:
|
||||
</I></FONT> m[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - file.begin();
|
||||
<FONT color=#000080><I>// update search position:
|
||||
</I></FONT> start = what[0].second;
|
||||
<FONT color=#000080><I>// update flags:
|
||||
</I></FONT> flags |= boost::match_prev_avail;
|
||||
flags |= boost::match_not_bob;
|
||||
}
|
||||
}
|
||||
</PRE>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
148
doc/Attic/regex_split.html
Normal file
148
doc/Attic/regex_split.html
Normal file
@ -0,0 +1,148 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Algorithm regex_split (deprecated)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Algorithm regex_split (deprecated)</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>The algorithm regex_split has been deprecated in favor of the iterator <A href="regex_token_iterator.html">
|
||||
regex_token_iterator</A> which has a more flexible and powerful interface,
|
||||
as well as following the more usual standard library "pull" rather than "push"
|
||||
semantics.</P>
|
||||
<P>Code which uses regex_split will continue to compile, the following
|
||||
documentation is taken from the previous boost.regex version:</P>
|
||||
<H3><A name="regex_split"></A>Algorithm regex_split</H3>
|
||||
<PRE>#include <<A href="../../../boost/regex.hpp">boost/regex.hpp</A>> </PRE>
|
||||
<P>Algorithm regex_split performs a similar operation to the perl split operation,
|
||||
and comes in three overloaded forms:
|
||||
</P>
|
||||
<PRE><B>template</B> <<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1, <B>class</B> Traits2, <B>class</B> Alloc2>
|
||||
std::size_t regex_split(OutputIterator out,
|
||||
std::basic_string<charT, Traits1, Alloc1>& s,
|
||||
<B> const</B> basic_regex<charT, Traits2, Alloc2>& e,
|
||||
<B> unsigned</B> flags,
|
||||
std::size_t max_split);
|
||||
|
||||
<B>template</B> <<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1, <B>class</B> Traits2, <B>class</B> Alloc2>
|
||||
std::size_t regex_split(OutputIterator out,
|
||||
std::basic_string<charT, Traits1, Alloc1>& s,
|
||||
<B> const</B> basic_regex<charT, Traits2, Alloc2>& e,
|
||||
<B>unsigned</B> flags = match_default);
|
||||
|
||||
<B>template</B> <<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1>
|
||||
std::size_t regex_split(OutputIterator out,
|
||||
std::basic_string<charT, Traits1, Alloc1>& s);</PRE>
|
||||
<P><STRONG>Effects: </STRONG>Each version of the algorithm takes an
|
||||
output-iterator for output, and a string for input. If the expression contains
|
||||
no marked sub-expressions, then the algorithm writes one string onto the
|
||||
output-iterator for each section of input that does not match the expression.
|
||||
If the expression does contain marked sub-expressions, then each time a match
|
||||
is found, one string for each marked sub-expression will be written to the
|
||||
output-iterator. No more than <I>max_split </I>strings will be written to the
|
||||
output-iterator. Before returning, all the input processed will be deleted from
|
||||
the string <I>s</I> (if <I>max_split </I>is not reached then all of <I>s</I> will
|
||||
be deleted). Returns the number of strings written to the output-iterator. If
|
||||
the parameter <I>max_split</I> is not specified then it defaults to UINT_MAX.
|
||||
If no expression is specified, then it defaults to "\s+", and splitting occurs
|
||||
on whitespace.
|
||||
</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<P><A href="../example/snippets/regex_split_example_1.cpp">Example</A>: the
|
||||
following function will split the input string into a series of tokens, and
|
||||
remove each token from the string <I>s</I>:
|
||||
</P>
|
||||
<PRE><B>unsigned</B> tokenise(std::list<std::string>& l, std::string& s)
|
||||
{
|
||||
<B> return</B> boost::regex_split(std::back_inserter(l), s);
|
||||
}</PRE>
|
||||
<P><A href="../example/snippets/regex_split_example_2.cpp">Example</A>: the
|
||||
following short program will extract all of the URL's from a html file, and
|
||||
print them out to <I>cout</I>:
|
||||
</P>
|
||||
<PRE><FONT color=#008000>#include <list>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <boost/regex.hpp>
|
||||
</FONT>
|
||||
boost::regex e(<FONT color=#000080>"<\\s*A\\s+[^>]*href\\s*=\\s*\"([^\"]*)\""</FONT>,
|
||||
boost::regbase::normal | boost::regbase::icase);
|
||||
|
||||
<B>void</B> load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
<FONT color=#000080>//
|
||||
// attempt to grow string buffer to match file size,
|
||||
// this doesn't always work...
|
||||
</FONT> s.reserve(is.rdbuf()-&gtin_avail());
|
||||
<B>char</B> c;
|
||||
<B>while</B>(is.get(c))
|
||||
{
|
||||
<FONT color=#000080>// use logarithmic growth stategy, in case
|
||||
// in_avail (above) returned zero:
|
||||
</FONT> <B>if</B>(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * 3);
|
||||
s.append(1, c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
<B>int</B> main(<B>int</B> argc, <B>char</B>** argv)
|
||||
{
|
||||
std::string s;
|
||||
std::list<std::string> l;
|
||||
|
||||
<B>for</B>(<B>int</B> i = 1; i < argc; ++i)
|
||||
{
|
||||
std::cout << <FONT color=#000080>"Findings URL's in "</FONT> << argv[i] << <FONT color=#000080>":"</FONT> << std::endl;
|
||||
s.erase();
|
||||
std::ifstream is(argv[i]);
|
||||
load_file(s, is);
|
||||
boost::regex_split(std::back_inserter(l), s, e);
|
||||
<B>while</B>(l.size())
|
||||
{
|
||||
s = *(l.begin());
|
||||
l.pop_front();
|
||||
std::cout << s << std::endl;
|
||||
}
|
||||
}
|
||||
<B>return</B> 0;
|
||||
}</PRE>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
286
doc/Attic/regex_token_iterator.html
Normal file
286
doc/Attic/regex_token_iterator.html
Normal file
@ -0,0 +1,286 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: regex_token_iterator</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<LINK href="../../../boost.css" type="text/css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td vAlign="top" width="300">
|
||||
<h3><A href="../../../index.htm"><IMG height="86" alt="C++ Boost" src="../../../c++boost.gif" width="277" border="0"></A></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">regex_token_iterator</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><A href="index.html"><IMG height="45" alt="Boost.Regex Index" src="uarrow.gif" width="43" border="0"></A></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<H3>Contents</H3>
|
||||
<dl class="index">
|
||||
<dt><A href="#synopsis">Synopsis</A> <dt><a href="#description">Description</a> <dt><A href="#examples">
|
||||
Examples</A></dt></dl>
|
||||
<H3><A name="synopsis"></A>Synopsis</H3>
|
||||
<P>The template class <CODE>regex_token_iterator</CODE> is an iterator adapter;
|
||||
that is to say it represents a new view of an existing iterator sequence, by
|
||||
enumerating all the occurrences of a regular expression within that sequence,
|
||||
and presenting one or more new strings for each match found. Each position
|
||||
enumerated by the iterator is a string that represents what matched a
|
||||
particular sub-expression within the regular expression. When class <CODE>regex_token_iterator</CODE>
|
||||
is used to enumerate a single sub-expression with index -1, then the iterator
|
||||
performs field splitting: that is to say it enumerates one string for each
|
||||
section of the character container sequence that does not match the regular
|
||||
expression specified.</P>
|
||||
<PRE>
|
||||
template <class BidirectionalIterator,
|
||||
class charT = iterator_traits<BidirectionalIterator>::value_type,
|
||||
class traits = regex_traits<charT>,
|
||||
class Allocator = allocator<charT> >
|
||||
class regex_token_iterator
|
||||
{
|
||||
public:
|
||||
typedef basic_regex<charT, traits, Allocator> regex_type;
|
||||
typedef basic_string<charT> value_type;
|
||||
typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type;
|
||||
typedef const value_type* pointer;
|
||||
typedef const value_type& reference;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
|
||||
regex_token_iterator();
|
||||
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
|
||||
int submatch = 0, match_flag_type m = match_default);
|
||||
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
|
||||
const std::vector<int>& submatches, match_flag_type m = match_default);
|
||||
template <std::size_t N>
|
||||
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
|
||||
const int (&submatches)[N], match_flag_type m = match_default);
|
||||
regex_token_iterator(const regex_token_iterator&);
|
||||
regex_token_iterator& operator=(const regex_token_iterator&);
|
||||
bool operator==(const regex_token_iterator&);
|
||||
bool operator!=(const regex_token_iterator&);
|
||||
const value_type& operator*();
|
||||
const value_type* operator->();
|
||||
regex_token_iterator& operator++();
|
||||
regex_token_iterator operator++(int);
|
||||
};
|
||||
</PRE>
|
||||
<H3><A name="description"></A>Description</H3>
|
||||
<PRE>regex_token_iterator();</PRE>
|
||||
<P><B> Effects:</B> constructs an end of sequence iterator.</P>
|
||||
<PRE>regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
|
||||
int submatch = 0, match_flag_type m = match_default);</PRE>
|
||||
<P><B> Preconditions: </B><CODE>!re.empty()</CODE>.</P>
|
||||
<P><B> Effects:</B> constructs a regex_token_iterator that will enumerate one
|
||||
string for each regular expression match of the expression <EM>re</EM> found
|
||||
within the sequence <EM>[a,b)</EM>, using match flags <EM>m</EM>. The
|
||||
string enumerated is the sub-expression <EM>submatch </EM>for each match
|
||||
found; if <EM>submatch </EM>is -1, then enumerates all the text sequences that
|
||||
did not match the expression <EM>re </EM>(that is to performs field splitting).</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<PRE>regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
|
||||
const std::vector<int>& submatches, match_flag_type m = match_default);</PRE>
|
||||
<P><B> Preconditions:</B> <CODE>submatches.size() && !re.empty()</CODE>.</P>
|
||||
<P><B> Effects:</B> constructs a regex_token_iterator that will enumerate <EM>submatches.size()</EM>
|
||||
strings for each regular expression match of the expression <EM>re</EM> found
|
||||
within the sequence <EM>[a,b)</EM>, using match flags <EM>m</EM>. For
|
||||
each match found one string will be enumerated for each sub-expression
|
||||
index contained within <EM>submatches </EM>vector; if <EM>submatches[0] </EM>
|
||||
is -1, then the first string enumerated for each match will be all of the text
|
||||
from end of the last match to the start of the current match, in addition there
|
||||
will be one extra string enumerated when no more matches can be found: from the
|
||||
end of the last match found, to the end of the underlying sequence.</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<PRE>template <std::size_t N>
|
||||
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
|
||||
const int (&submatches)[R], match_flag_type m = match_default);</PRE>
|
||||
<P><B> Preconditions: </B><CODE>!re.empty()</CODE>.</P>
|
||||
<P><STRONG>Effects:</STRONG></B> constructs a regex_token_iterator that will
|
||||
enumerate <EM>R</EM> strings for each regular expression match of the
|
||||
expression <EM>re</EM> found within the sequence <EM>[a,b)</EM>, using match
|
||||
flags <EM>m</EM>. For each match found one string will be
|
||||
enumerated for each sub-expression index contained within the <EM>submatches
|
||||
</EM>array; if <EM>submatches[0] </EM>is -1, then the first string enumerated
|
||||
for each match will be all of the text from end of the last match to the start
|
||||
of the current match, in addition there will be one extra string enumerated
|
||||
when no more matches can be found: from the end of the last match found, to the
|
||||
end of the underlying sequence.</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<PRE>regex_token_iterator(const regex_token_iterator& that);</PRE>
|
||||
<P><B> Effects: </B>constructs a copy of <CODE>that</CODE>.</P>
|
||||
<P><B> Postconditions:</B> <CODE>*this == that</CODE>.</P>
|
||||
<PRE>regex_token_iterator& operator=(const regex_token_iterator& that);</PRE>
|
||||
<P><B> Effects: </B>sets <CODE>*this</CODE> to be equal to <CODE>that</CODE>.</P>
|
||||
<P><B> Postconditions:</B> <CODE>*this == that</CODE>.</P>
|
||||
<PRE>bool operator==(const regex_token_iterator&);</PRE>
|
||||
<P>
|
||||
<B>Effects: </B>returns true if *this is the same position as that.</P>
|
||||
<PRE>bool operator!=(const regex_token_iterator&);</PRE>
|
||||
<P>
|
||||
<B>Effects: </B>returns <CODE>!(*this == that)</CODE>.</P>
|
||||
<PRE>const value_type& operator*();</PRE>
|
||||
<P>
|
||||
<B>Effects: </B>returns the current string being enumerated.</P>
|
||||
<PRE>const value_type* operator->();</PRE>
|
||||
<P>
|
||||
<B>Effects: </B>returns <CODE>&(*this)</CODE>.</P>
|
||||
<PRE>regex_token_iterator& operator++();</PRE>
|
||||
<P>
|
||||
<B>Effects: </B>Moves on to the next string to be enumerated.</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<B>
|
||||
<P>
|
||||
Returns:</B><CODE> *this</CODE>.</P><PRE>regex_token_iterator& operator++(int);</PRE>
|
||||
<P><B> Effects:</B> constructs a copy <CODE>result</CODE> of <CODE>*this</CODE>,
|
||||
then calls <CODE>++(*this)</CODE>.</P>
|
||||
<P><B> Returns:</B> <CODE>result</CODE>.<A name="examples"></A>
|
||||
<H3>Examples</H3>
|
||||
<P>The following <A href="../example/snippets/regex_token_iterator_example_1.cpp">example</A>
|
||||
takes a string and splits it into a series of tokens:</P>
|
||||
<pre>
|
||||
<FONT color=#008040>#include <iostream></FONT>
|
||||
<FONT color=#008040>#include <boost/regex.hpp></FONT>
|
||||
|
||||
<B>using</B> <B>namespace</B> std;
|
||||
|
||||
<B>int</B> main(<B>int</B> argc)
|
||||
{
|
||||
string s;
|
||||
<B>do</B>{
|
||||
<B>if</B>(argc == <FONT color=#0000a0>1</FONT>)
|
||||
{
|
||||
cout << <FONT color=#0000ff>"Enter text to split (or \"quit\" to exit): "</FONT>;
|
||||
getline(cin, s);
|
||||
<B>if</B>(s == <FONT color=#0000ff>"quit"</FONT>) <B>break</B>;
|
||||
}
|
||||
<B>else</B>
|
||||
s = <FONT color=#0000ff>"This is a string of tokens"</FONT>;
|
||||
|
||||
boost::regex re(<FONT color=#0000ff>"\\s+"</FONT>);
|
||||
boost::regex_token_iterator<std::string::const_iterator> i(s.begin(), s.end(), re, -<FONT color=#0000a0>1</FONT>);
|
||||
boost::regex_token_iterator<std::string::const_iterator> j;
|
||||
|
||||
<B>unsigned</B> count = <FONT color=#0000a0>0</FONT>;
|
||||
<B>while</B>(i != j)
|
||||
{
|
||||
cout << *i++ << endl;
|
||||
count++;
|
||||
}
|
||||
cout << <FONT color=#0000ff>"There were "</FONT> << count << <FONT color=#0000ff>" tokens found."</FONT> << endl;
|
||||
|
||||
}<B>while</B>(argc == <FONT color=#0000a0>1</FONT>);
|
||||
<B>return</B> <FONT color=#0000a0>0</FONT>;
|
||||
}
|
||||
|
||||
</pre>
|
||||
<P>The following <A href="../example/snippets/regex_token_iterator_example_2.cpp">example</A>
|
||||
takes a html file and outputs a list of all the linked files:</P>
|
||||
<pre>
|
||||
<FONT color=#008040>#include <fstream></FONT>
|
||||
<FONT color=#008040>#include <iostream></FONT>
|
||||
<FONT color=#008040>#include <iterator></FONT>
|
||||
<FONT color=#008040>#include <boost/regex.hpp></FONT>
|
||||
|
||||
boost::regex e(<FONT color=#0000ff>"<\\s*A\\s+[^>]*href\\s*=\\s*\"([^\"]*)\""</FONT>,
|
||||
boost::regex::normal | boost::regbase::icase);
|
||||
|
||||
<B>void</B> load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
<I><FONT color=#000080>//</FONT></I>
|
||||
<I><FONT color=#000080>// attempt to grow string buffer to match file size,</FONT></I>
|
||||
<I><FONT color=#000080>// this doesn't always work...</FONT></I>
|
||||
s.reserve(is.rdbuf()->in_avail());
|
||||
<B>char</B> c;
|
||||
<B>while</B>(is.get(c))
|
||||
{
|
||||
<I><FONT color=#000080>// use logarithmic growth stategy, in case</FONT></I>
|
||||
<I><FONT color=#000080>// in_avail (above) returned zero:</FONT></I>
|
||||
<B>if</B>(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * <FONT color=#0000a0>3</FONT>);
|
||||
s.append(<FONT color=#0000a0>1</FONT>, c);
|
||||
}
|
||||
}
|
||||
|
||||
<B>int</B> main(<B>int</B> argc, <B>char</B>** argv)
|
||||
{
|
||||
std::string s;
|
||||
<B>int</B> i;
|
||||
<B>for</B>(i = <FONT color=#0000a0>1</FONT>; i < argc; ++i)
|
||||
{
|
||||
std::cout << <FONT color=#0000ff>"Findings URL's in "</FONT> << argv[i] << <FONT color=#0000ff>":"</FONT> << std::endl;
|
||||
s.erase();
|
||||
std::ifstream is(argv[i]);
|
||||
load_file(s, is);
|
||||
boost::regex_token_iterator<std::string::const_iterator>
|
||||
i(s.begin(), s.end(), e, <FONT color=#0000a0>1</FONT>);
|
||||
boost::regex_token_iterator<std::string::const_iterator> j;
|
||||
<B>while</B>(i != j)
|
||||
{
|
||||
std::cout << *i++ << std::endl;
|
||||
}
|
||||
}
|
||||
<I><FONT color=#000080>//</FONT></I>
|
||||
<I><FONT color=#000080>// alternative method:</FONT></I>
|
||||
<I><FONT color=#000080>// test the array-literal constructor, and split out the whole</FONT></I>
|
||||
<I><FONT color=#000080>// match as well as $1....</FONT></I>
|
||||
<I><FONT color=#000080>//</FONT></I>
|
||||
<B>for</B>(i = <FONT color=#0000a0>1</FONT>; i < argc; ++i)
|
||||
{
|
||||
std::cout << <FONT color=#0000ff>"Findings URL's in "</FONT> << argv[i] << <FONT color=#0000ff>":"</FONT> << std::endl;
|
||||
s.erase();
|
||||
std::ifstream is(argv[i]);
|
||||
load_file(s, is);
|
||||
<B>const</B> <B>int</B> subs[] = {<FONT color=#0000a0>1</FONT>, <FONT color=#0000a0>0</FONT>,};
|
||||
boost::regex_token_iterator<std::string::const_iterator>
|
||||
i(s.begin(), s.end(), e, subs);
|
||||
boost::regex_token_iterator<std::string::const_iterator> j;
|
||||
<B>while</B>(i != j)
|
||||
{
|
||||
std::cout << *i++ << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
<B>return</B> <FONT color=#0000a0>0</FONT>;
|
||||
}
|
||||
</pre>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
48
doc/Attic/regex_traits.html
Normal file
48
doc/Attic/regex_traits.html
Normal file
@ -0,0 +1,48 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: class regex_traits</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">class regex_traits</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>Under construction.</P>
|
||||
<P>The current boost.regex traits class design will be migrated to that specified
|
||||
in the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">regular
|
||||
expression standardization proposal</A>. </P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
79
doc/Attic/standards.html
Normal file
79
doc/Attic/standards.html
Normal file
@ -0,0 +1,79 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Standards Conformance</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Standards Conformance</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<H3>C++</H3>
|
||||
<P>Boost.regex is intended to conform to the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
|
||||
regular expression standardization proposal</A>, which will appear in a
|
||||
future C++ standard technical report (and hopefully in a future version of the
|
||||
standard). Currently there are some differences in how the regular
|
||||
expression traits classes are defined, these will be fixed in a future release.</P>
|
||||
<H3>ECMAScript / JavaScript</H3>
|
||||
<P>All of the ECMAScript regular expression syntax features are supported, except
|
||||
that:</P>
|
||||
<P>Negated class escapes (\S, \D and \W) are not permitted inside character class
|
||||
definitions ( [...] ).</P>
|
||||
<P>The escape sequence \u matches any upper case character (the same as
|
||||
[[:upper:]]) rather than a Unicode escape sequence; use \x{DDDD} for
|
||||
Unicode escape sequences.</P>
|
||||
<H3>Perl</H3>
|
||||
<P>Almost all Perl features are supported, except for:</P>
|
||||
<P>\N{name} Use [[:name:]] instead.</P>
|
||||
<P>\pP and \PP</P>
|
||||
<P>(?imsx-imsx)</P>
|
||||
<P>(?<=pattern)</P>
|
||||
<P>(?<!pattern)</P>
|
||||
<P>(?{code})</P>
|
||||
<P>(??{code})</P>
|
||||
<P>(?(condition)yes-pattern) and (?(condition)yes-pattern|no-pattern)</P>
|
||||
<P>These embarrassments / limitations will be removed in due course, mainly
|
||||
dependent upon user demand.</P>
|
||||
<H3>POSIX</H3>
|
||||
<P>All the POSIX basic and extended regular expression features are supported,
|
||||
except that:</P>
|
||||
<P>No character collating names are recognized except those specified in the POSIX
|
||||
standard for the C locale, unless they are explicitly registered with the
|
||||
traits class.</P>
|
||||
<P>Character equivalence classes ( [[=a=]] etc) are probably buggy except on
|
||||
Win32. Implementing this feature requires knowledge of the format of the
|
||||
string sort keys produced by the system; if you need this, and the default
|
||||
implementation doesn't work on your platform, then you will need to supply a
|
||||
custom traits class.</P>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
426
doc/Attic/sub_match.html
Normal file
426
doc/Attic/sub_match.html
Normal file
@ -0,0 +1,426 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: sub_match</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">sub_match</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<H3>Synopsis</H3>
|
||||
<P>#include <<A href="../../boost/regex.hpp">boost/regex.hpp</A>>
|
||||
</P>
|
||||
<P>Regular expressions are different from many simple pattern-matching algorithms
|
||||
in that as well as finding an overall match they can also produce
|
||||
sub-expression matches: each sub-expression being delimited in the pattern by a
|
||||
pair of parenthesis (...). There has to be some method for reporting
|
||||
sub-expression matches back to the user: this is achieved this by defining a
|
||||
class <I><A href="match_results.htm">match_results</A></I> that acts as an
|
||||
indexed collection of sub-expression matches, each sub-expression match being
|
||||
contained in an object of type <I>sub_match</I>
|
||||
.
|
||||
<P>Objects of type <EM>sub_match</EM> may only obtained by subscripting an object
|
||||
of type <EM><A href="match_results.html">match_results</A></EM>
|
||||
.
|
||||
<P>When the marked sub-expression denoted by an object of type sub_match<>
|
||||
participated in a regular expression match then member <CODE>matched</CODE> evaluates
|
||||
to true, and members <CODE>first</CODE> and <CODE>second</CODE> denote the
|
||||
range of characters <CODE>[first,second)</CODE> which formed that match.
|
||||
Otherwise <CODE>matched</CODE> is false, and members <CODE>first</CODE> and <CODE>second</CODE>
|
||||
contained undefined values.</P>
|
||||
<P>If an object of type <CODE>sub_match<></CODE> represents sub-expression 0
|
||||
- that is to say the whole match - then member <CODE>matched</CODE> is always
|
||||
true, unless a partial match was obtained as a result of the flag <CODE>match_partial</CODE>
|
||||
being passed to a regular expression algorithm, in which case member <CODE>matched</CODE>
|
||||
is false, and members <CODE>first</CODE> and <CODE>second</CODE> represent the
|
||||
character range that formed the partial match.</P>
|
||||
<PRE>
|
||||
namespace boost{
|
||||
|
||||
template <class BidirectionalIterator>
|
||||
class sub_match : public std::pair<BidirectionalIterator, BidirectionalIterator>
|
||||
{
|
||||
public:
|
||||
typedef typename iterator_traits<BidirectionalIterator>::value_type value_type;
|
||||
typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type;
|
||||
typedef BidirectionalIterator iterator;
|
||||
|
||||
bool matched;
|
||||
|
||||
difference_type length()const;
|
||||
operator basic_string<value_type>()const;
|
||||
basic_string<value_type> str()const;
|
||||
|
||||
int compare(const sub_match& s)const;
|
||||
int compare(const basic_string<value_type>& s)const;
|
||||
int compare(const value_type* s)const;
|
||||
};
|
||||
|
||||
template <class BidirectionalIterator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
|
||||
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator == (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator != (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator < (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator > (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator >= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator <= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& rhs);
|
||||
|
||||
template <class BidirectionalIterator>
|
||||
bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
|
||||
template <class BidirectionalIterator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs);
|
||||
|
||||
template <class BidirectionalIterator>
|
||||
bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
|
||||
template <class BidirectionalIterator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs);
|
||||
|
||||
template <class charT, class traits, class BidirectionalIterator>
|
||||
basic_ostream<charT, traits>&
|
||||
operator << (basic_ostream<charT, traits>& os,
|
||||
const sub_match<BidirectionalIterator>& m);
|
||||
|
||||
} // namespace boost</PRE>
|
||||
<H3>Description</H3>
|
||||
<H4>
|
||||
sub_match members</H4>
|
||||
<PRE>typedef typename std::iterator_traits<iterator>::value_type value_type;</PRE>
|
||||
<P>The type pointed to by the iterators.</P>
|
||||
<PRE>typedef typename std::iterator_traits<iterator>::difference_type difference_type;</PRE>
|
||||
<P>A type that represents the difference between two iterators.</P>
|
||||
<PRE>typedef iterator iterator_type;</PRE>
|
||||
<P>The iterator type.</P>
|
||||
<PRE>iterator first</PRE>
|
||||
<P>An iterator denoting the position of the start of the match.</P>
|
||||
<PRE>iterator second</PRE>
|
||||
<P>An iterator denoting the position of the end of the match.</P>
|
||||
<PRE>bool matched</PRE>
|
||||
<P>A Boolean value denoting whether this sub-expression participated in the match.</P>
|
||||
<PRE>static difference_type length();</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>(matched ? 0 : distance(first, second))</CODE>.</P><PRE>operator basic_string<value_type>()const;</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>(matched ? basic_string<value_type>(first,
|
||||
second) : basic_string<value_type>()).</P></CODE><PRE>basic_string<value_type> str()const;</PRE>
|
||||
|
||||
<P><B>
|
||||
Effects: </B>returns <CODE>(matched ? basic_string<value_type>(first,
|
||||
second) : basic_string<value_type>())</CODE>.</P><PRE>int compare(const sub_match& s)const;</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>str().compare(s.str())</CODE>.</P><PRE>int compare(const basic_string<value_type>& s)const;</PRE>
|
||||
|
||||
<P><B>
|
||||
Effects: </B>returns <CODE>str().compare(s)</CODE>.</P><PRE>int compare(const value_type* s)const;</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>str().compare(s)</CODE>.</P>
|
||||
<H4>
|
||||
sub_match non-member operators</H4>
|
||||
<PRE>template <class BidirectionalIterator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.compare(rhs) == 0</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.compare(rhs) != 0</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.compare(rhs) < 0</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);</PRE>
|
||||
|
||||
<P><B>
|
||||
Effects: </B>returns <CODE>lhs.compare(rhs) <= 0</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.compare(rhs) >= 0</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.compare(rhs) > 0</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs < rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs > rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs >= rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs <= rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() < rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() > rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() >= rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() <= rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs < rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs > rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs >= rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs <= rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() < rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() > rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() >= rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() <= rhs</CODE>.</P><PRE>template <class charT, class traits, class BidirectionalIterator>
|
||||
basic_ostream<charT, traits>&
|
||||
operator << (basic_ostream<charT, traits>& os
|
||||
const sub_match<BidirectionalIterator>& m);</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>(os << m.str())</CODE>.
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
773
doc/Attic/syntax.html
Normal file
773
doc/Attic/syntax.html
Normal file
@ -0,0 +1,773 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Regular Expression Syntax</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Regular Expression Syntax</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<P>This section covers the regular expression syntax used by this library, this is
|
||||
a programmers guide, the actual syntax presented to your program's users will
|
||||
depend upon the flags used during expression compilation.
|
||||
</P>
|
||||
<H3>Literals
|
||||
</H3>
|
||||
<P>All characters are literals except: ".", "|", "*", "?", "+", "(", ")", "{",
|
||||
"}", "[", "]", "^", "$" and "\". These characters are literals when preceded by
|
||||
a "\". A literal is a character that matches itself, or matches the result of
|
||||
traits_type::translate(), where traits_type is the traits template parameter to
|
||||
class basic_regex.</P>
|
||||
<H3>Wildcard
|
||||
</H3>
|
||||
<P>The dot character "." matches any single character except : when <I>match_not_dot_null</I>
|
||||
is passed to the matching algorithms, the dot does not match a null character;
|
||||
when <I>match_not_dot_newline</I> is passed to the matching algorithms, then
|
||||
the dot does not match a newline character.
|
||||
</P>
|
||||
<H3>Repeats
|
||||
</H3>
|
||||
<P>A repeat is an expression that is repeated an arbitrary number of times. An
|
||||
expression followed by "*" can be repeated any number of times including zero.
|
||||
An expression followed by "+" can be repeated any number of times, but at least
|
||||
once, if the expression is compiled with the flag regex_constants::bk_plus_qm
|
||||
then "+" is an ordinary character and "\+" represents a repeat of once or more.
|
||||
An expression followed by "?" may be repeated zero or one times only, if the
|
||||
expression is compiled with the flag regex_constants::bk_plus_qm then "?" is an
|
||||
ordinary character and "\?" represents the repeat zero or once operator. When
|
||||
it is necessary to specify the minimum and maximum number of repeats
|
||||
explicitly, the bounds operator "{}" may be used, thus "a{2}" is the letter "a"
|
||||
repeated exactly twice, "a{2,4}" represents the letter "a" repeated between 2
|
||||
and 4 times, and "a{2,}" represents the letter "a" repeated at least twice with
|
||||
no upper limit. Note that there must be no white-space inside the {}, and there
|
||||
is no upper limit on the values of the lower and upper bounds. When the
|
||||
expression is compiled with the flag regex_constants::bk_braces then "{" and
|
||||
"}" are ordinary characters and "\{" and "\}" are used to delimit bounds
|
||||
instead. All repeat expressions refer to the shortest possible previous
|
||||
sub-expression: a single character; a character set, or a sub-expression
|
||||
grouped with "()" for example.
|
||||
</P>
|
||||
<P>Examples:
|
||||
</P>
|
||||
<P>"ba*" will match all of "b", "ba", "baaa" etc.
|
||||
</P>
|
||||
<P>"ba+" will match "ba" or "baaaa" for example but not "b".
|
||||
</P>
|
||||
<P>"ba?" will match "b" or "ba".
|
||||
</P>
|
||||
<P>"ba{2,4}" will match "baa", "baaa" and "baaaa".
|
||||
</P>
|
||||
<H3>Non-greedy repeats
|
||||
</H3>
|
||||
<P>Whenever the "extended" regular expression syntax is in use (the default) then
|
||||
non-greedy repeats are possible by appending a '?' after the repeat; a
|
||||
non-greedy repeat is one which will match the <I>shortest</I> possible string.
|
||||
</P>
|
||||
<P>For example to match html tag pairs one could use something like:
|
||||
</P>
|
||||
<P>"<\s*tagname[^>]*>(.*?)<\s*/tagname\s*>"
|
||||
</P>
|
||||
<P>In this case $1 will contain the text between the tag pairs, and will be the
|
||||
shortest possible matching string.
|
||||
</P>
|
||||
<H3>Parenthesis
|
||||
</H3>
|
||||
<P>Parentheses serve two purposes, to group items together into a sub-expression,
|
||||
and to mark what generated the match. For example the expression "(ab)*" would
|
||||
match all of the string "ababab". The matching algorithms <A href="template_class_ref.htm#query_match">
|
||||
regex_match</A> and <A href="template_class_ref.htm#reg_search">regex_search</A>
|
||||
each take an instance of <A href="template_class_ref.htm#reg_match">match_results</A>
|
||||
that reports what caused the match, on exit from these functions the <A href="template_class_ref.htm#reg_match">
|
||||
match_results</A> contains information both on what the whole expression
|
||||
matched and on what each sub-expression matched. In the example above
|
||||
match_results[1] would contain a pair of iterators denoting the final "ab" of
|
||||
the matching string. It is permissible for sub-expressions to match null
|
||||
strings. If a sub-expression takes no part in a match - for example if it is
|
||||
part of an alternative that is not taken - then both of the iterators that are
|
||||
returned for that sub-expression point to the end of the input string, and the <I>matched</I>
|
||||
parameter for that sub-expression is <I>false</I>. Sub-expressions are indexed
|
||||
from left to right starting from 1, sub-expression 0 is the whole expression.
|
||||
</P>
|
||||
<H3>Non-Marking Parenthesis
|
||||
</H3>
|
||||
<P>Sometimes you need to group sub-expressions with parenthesis, but don't want
|
||||
the parenthesis to spit out another marked sub-expression, in this case a
|
||||
non-marking parenthesis (?:expression) can be used. For example the following
|
||||
expression creates no sub-expressions:
|
||||
</P>
|
||||
<P>"(?:abc)*"</P>
|
||||
<H3>Forward Lookahead Asserts
|
||||
</H3>
|
||||
<P>There are two forms of these; one for positive forward lookahead asserts, and
|
||||
one for negative lookahead asserts:</P>
|
||||
<P>"(?=abc)" matches zero characters only if they are followed by the expression
|
||||
"abc".</P>
|
||||
<P>"(?!abc)" matches zero characters only if they are not followed by the
|
||||
expression "abc".</P>
|
||||
<H3>Independent sub-expressions</H3>
|
||||
<P>"(?>expression)" matches "expression" as an independent atom (the algorithm
|
||||
will not backtrack into it if a failure occurs later in the expression).</P>
|
||||
<H3>Alternatives
|
||||
</H3>
|
||||
<P>Alternatives occur when the expression can match either one sub-expression or
|
||||
another, each alternative is separated by a "|", or a "\|" if the flag
|
||||
regex_constants::bk_vbar is set, or by a newline character if the flag
|
||||
regex_constants::newline_alt is set. Each alternative is the largest possible
|
||||
previous sub-expression; this is the opposite behavior from repetition
|
||||
operators.
|
||||
</P>
|
||||
<P>Examples:
|
||||
</P>
|
||||
<P>"a(b|c)" could match "ab" or "ac".
|
||||
</P>
|
||||
<P>"abc|def" could match "abc" or "def".
|
||||
</P>
|
||||
<H3>Sets
|
||||
</H3>
|
||||
<P>A set is a set of characters that can match any single character that is a
|
||||
member of the set. Sets are delimited by "[" and "]" and can contain literals,
|
||||
character ranges, character classes, collating elements and equivalence
|
||||
classes. Set declarations that start with "^" contain the compliment of the
|
||||
elements that follow.
|
||||
</P>
|
||||
<P>Examples:
|
||||
</P>
|
||||
<P>Character literals:
|
||||
</P>
|
||||
<P>"[abc]" will match either of "a", "b", or "c".
|
||||
</P>
|
||||
<P>"[^abc] will match any character other than "a", "b", or "c".
|
||||
</P>
|
||||
<P>Character ranges:
|
||||
</P>
|
||||
<P>"[a-z]" will match any character in the range "a" to "z".
|
||||
</P>
|
||||
<P>"[^A-Z]" will match any character other than those in the range "A" to "Z".
|
||||
</P>
|
||||
<P>Note that character ranges are highly locale dependent if the flag
|
||||
regex_constants::collate is set: they match any character that collates between
|
||||
the endpoints of the range, ranges will only behave according to ASCII rules
|
||||
when the default "C" locale is in effect. For example if the library is
|
||||
compiled with the Win32 localization model, then [a-z] will match the ASCII
|
||||
characters a-z, and also 'A', 'B' etc, but not 'Z' which collates just after
|
||||
'z'. This locale specific behavior is disabled by default (in perl mode), and
|
||||
forces ranges to collate according to ASCII character code.
|
||||
</P>
|
||||
<P>Character classes are denoted using the syntax "[:classname:]" within a set
|
||||
declaration, for example "[[:space:]]" is the set of all whitespace characters.
|
||||
Character classes are only available if the flag regex_constants::char_classes
|
||||
is set. The available character classes are:
|
||||
<BR>
|
||||
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table2" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="50%">alnum</TD>
|
||||
<TD vAlign="top" width="50%">Any alpha numeric character.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">alpha</TD>
|
||||
<TD vAlign="top" width="50%">Any alphabetical character a-z and A-Z. Other
|
||||
characters may also be included depending upon the locale.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">blank</TD>
|
||||
<TD vAlign="top" width="50%">Any blank character, either a space or a tab.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">cntrl</TD>
|
||||
<TD vAlign="top" width="50%">Any control character.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">digit</TD>
|
||||
<TD vAlign="top" width="50%">Any digit 0-9.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">graph</TD>
|
||||
<TD vAlign="top" width="50%">Any graphical character.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">lower</TD>
|
||||
<TD vAlign="top" width="50%">Any lower case character a-z. Other characters may
|
||||
also be included depending upon the locale.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">print</TD>
|
||||
<TD vAlign="top" width="50%">Any printable character.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">punct</TD>
|
||||
<TD vAlign="top" width="50%">Any punctuation character.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">space</TD>
|
||||
<TD vAlign="top" width="50%">Any whitespace character.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">upper</TD>
|
||||
<TD vAlign="top" width="50%">Any upper case character A-Z. Other characters may
|
||||
also be included depending upon the locale.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">xdigit</TD>
|
||||
<TD vAlign="top" width="50%">Any hexadecimal digit character, 0-9, a-f and A-F.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">word</TD>
|
||||
<TD vAlign="top" width="50%">Any word character - all alphanumeric characters plus
|
||||
the underscore.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">Unicode</TD>
|
||||
<TD vAlign="top" width="50%">Any character whose code is greater than 255, this
|
||||
applies to the wide character traits classes only.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<P>There are some shortcuts that can be used in place of the character classes,
|
||||
provided the flag regex_constants::escape_in_lists is set then you can use:
|
||||
</P>
|
||||
<P>\w in place of [:word:]
|
||||
</P>
|
||||
<P>\s in place of [:space:]
|
||||
</P>
|
||||
<P>\d in place of [:digit:]
|
||||
</P>
|
||||
<P>\l in place of [:lower:]
|
||||
</P>
|
||||
<P>\u in place of [:upper:]
|
||||
</P>
|
||||
<P>Collating elements take the general form [.tagname.] inside a set declaration,
|
||||
where <I>tagname</I> is either a single character, or a name of a collating
|
||||
element, for example [[.a.]] is equivalent to [a], and [[.comma.]] is
|
||||
equivalent to [,]. The library supports all the standard POSIX collating
|
||||
element names, and in addition the following digraphs: "ae", "ch", "ll", "ss",
|
||||
"nj", "dz", "lj", each in lower, upper and title case variations.
|
||||
Multi-character collating elements can result in the set matching more than one
|
||||
character, for example [[.ae.]] would match two characters, but note that
|
||||
[^[.ae.]] would only match one character.
|
||||
</P>
|
||||
<P>
|
||||
Equivalence classes take the general form[=tagname=] inside a set declaration,
|
||||
where <I>tagname</I> is either a single character, or a name of a collating
|
||||
element, and matches any character that is a member of the same primary
|
||||
equivalence class as the collating element [.tagname.]. An equivalence class is
|
||||
a set of characters that collate the same, a primary equivalence class is a set
|
||||
of characters whose primary sort key are all the same (for example strings are
|
||||
typically collated by character, then by accent, and then by case; the primary
|
||||
sort key then relates to the character, the secondary to the accentation, and
|
||||
the tertiary to the case). If there is no equivalence class corresponding to <I>tagname</I>
|
||||
, then[=tagname=] is exactly the same as [.tagname.]. Unfortunately there is no
|
||||
locale independent method of obtaining the primary sort key for a character,
|
||||
except under Win32. For other operating systems the library will "guess" the
|
||||
primary sort key from the full sort key (obtained from <I>strxfrm</I>), so
|
||||
equivalence classes are probably best considered broken under any operating
|
||||
system other than Win32.
|
||||
</P>
|
||||
<P>To include a literal "-" in a set declaration then: make it the first character
|
||||
after the opening "[" or "[^", the endpoint of a range, a collating element, or
|
||||
if the flag regex_constants::escape_in_lists is set then precede with an escape
|
||||
character as in "[\-]". To include a literal "[" or "]" or "^" in a set then
|
||||
make them the endpoint of a range, a collating element, or precede with an
|
||||
escape character if the flag regex_constants::escape_in_lists is set.
|
||||
</P>
|
||||
<H3>Line anchors
|
||||
</H3>
|
||||
<P>An anchor is something that matches the null string at the start or end of a
|
||||
line: "^" matches the null string at the start of a line, "$" matches the null
|
||||
string at the end of a line.
|
||||
</P>
|
||||
<H3>Back references
|
||||
</H3>
|
||||
<P>A back reference is a reference to a previous sub-expression that has already
|
||||
been matched, the reference is to what the sub-expression matched, not to the
|
||||
expression itself. A back reference consists of the escape character "\"
|
||||
followed by a digit "1" to "9", "\1" refers to the first sub-expression, "\2"
|
||||
to the second etc. For example the expression "(.*)\1" matches any string that
|
||||
is repeated about its mid-point for example "abcabc" or "xyzxyz". A back
|
||||
reference to a sub-expression that did not participate in any match, matches
|
||||
the null string: NB this is different to some other regular expression
|
||||
matchers. Back references are only available if the expression is compiled with
|
||||
the flag regex_constants::bk_refs set.
|
||||
</P>
|
||||
<H3>Characters by code
|
||||
</H3>
|
||||
<P>This is an extension to the algorithm that is not available in other libraries,
|
||||
it consists of the escape character followed by the digit "0" followed by the
|
||||
octal character code. For example "\023" represents the character whose octal
|
||||
code is 23. Where ambiguity could occur use parentheses to break the expression
|
||||
up: "\0103" represents the character whose code is 103, "(\010)3 represents the
|
||||
character 10 followed by "3". To match characters by their hexadecimal code,
|
||||
use \x followed by a string of hexadecimal digits, optionally enclosed inside
|
||||
{}, for example \xf0 or \x{aff}, notice the latter example is a Unicode
|
||||
character.</P>
|
||||
<H3>Word operators
|
||||
</H3>
|
||||
<P>The following operators are provided for compatibility with the GNU regular
|
||||
expression library.
|
||||
</P>
|
||||
<P>"\w" matches any single character that is a member of the "word" character
|
||||
class, this is identical to the expression "[[:word:]]".
|
||||
</P>
|
||||
<P>"\W" matches any single character that is not a member of the "word" character
|
||||
class, this is identical to the expression "[^[:word:]]".
|
||||
</P>
|
||||
<P>"\<" matches the null string at the start of a word.
|
||||
</P>
|
||||
<P>"\>" matches the null string at the end of the word.
|
||||
</P>
|
||||
<P>"\b" matches the null string at either the start or the end of a word.
|
||||
</P>
|
||||
<P>"\B" matches a null string within a word.
|
||||
</P>
|
||||
<P>The start of the sequence passed to the matching algorithms is considered to be
|
||||
a potential start of a word unless the flag match_not_bow is set. The end of
|
||||
the sequence passed to the matching algorithms is considered to be a potential
|
||||
end of a word unless the flag match_not_eow is set.
|
||||
</P>
|
||||
<H3>Buffer operators
|
||||
</H3>
|
||||
<P>The following operators are provided for compatibility with the GNU regular
|
||||
expression library, and Perl regular expressions:
|
||||
</P>
|
||||
<P>"\`" matches the start of a buffer.
|
||||
</P>
|
||||
<P>"\A" matches the start of the buffer.
|
||||
</P>
|
||||
<P>"\'" matches the end of a buffer.
|
||||
</P>
|
||||
<P>"\z" matches the end of a buffer.
|
||||
</P>
|
||||
<P>"\Z" matches the end of a buffer, or possibly one or more new line characters
|
||||
followed by the end of the buffer.
|
||||
</P>
|
||||
<P>A buffer is considered to consist of the whole sequence passed to the matching
|
||||
algorithms, unless the flags match_not_bob or match_not_eob are set.
|
||||
</P>
|
||||
<H3>Escape operator
|
||||
</H3>
|
||||
<P>The escape character "\" has several meanings.
|
||||
</P>
|
||||
<P>Inside a set declaration the escape character is a normal character unless the
|
||||
flag regex_constants::escape_in_lists is set in which case whatever follows the
|
||||
escape is a literal character regardless of its normal meaning.
|
||||
</P>
|
||||
<P>The escape operator may introduce an operator for example: back references, or
|
||||
a word operator.
|
||||
</P>
|
||||
<P>The escape operator may make the following character normal, for example "\*"
|
||||
represents a literal "*" rather than the repeat operator.
|
||||
</P>
|
||||
<H4>Single character escape sequences
|
||||
</H4>
|
||||
<P>The following escape sequences are aliases for single characters:
|
||||
<BR>
|
||||
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table3" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="33%">Escape sequence
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Character code
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Meaning
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\a
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x07
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Bell character.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\f
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x0C
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Form feed.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\n
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x0A
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Newline character.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\r
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x0D
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Carriage return.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\t
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x09
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Tab character.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\v
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x0B
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Vertical tab.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\e
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x1B
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">ASCII Escape character.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\0dd
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0dd
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">An octal character code, where <I>dd</I> is one or
|
||||
more octal digits.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\xXX
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0xXX
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">A hexadecimal character code, where XX is one or more
|
||||
hexadecimal digits.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\x{XX}
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0xXX
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">A hexadecimal character code, where XX is one or more
|
||||
hexadecimal digits, optionally a Unicode character.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\cZ
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">z-@
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">An ASCII escape sequence control-Z, where Z is any
|
||||
ASCII character greater than or equal to the character code for '@'.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<H4>Miscellaneous escape sequences:
|
||||
</H4>
|
||||
<P>The following are provided mostly for perl compatibility, but note that there
|
||||
are some differences in the meanings of \l \L \u and \U:
|
||||
<BR>
|
||||
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table4" cellSpacing="0" cellPadding="6" width="100%" border="0">
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\w
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [[:word:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\W
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [^[:word:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\s
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [[:space:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\S
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [^[:space:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\d
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [[:digit:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\D
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [^[:digit:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\l
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [[:lower:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\L
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [^[:lower:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\u
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [[:upper:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\U
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [^[:upper:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\C
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Any single character, equivalent to '.'.
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\X
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Match any Unicode combining character sequence, for
|
||||
example "a\x 0301" (a letter a with an acute).
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\Q
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">The begin quote operator, everything that follows is
|
||||
treated as a literal character until a \E end quote operator is found.
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\E
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">The end quote operator, terminates a sequence begun
|
||||
with \Q.
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<H3>What gets matched?
|
||||
</H3>
|
||||
<P>
|
||||
When the expression is compiled as a Perl-compatible regex then the matching
|
||||
algorithms will perform a depth first search on the state machine and report
|
||||
the first match found.</P>
|
||||
<P>
|
||||
When the expression is compiled as a POSIX-compatible regex then the matching
|
||||
algorithms will match the first possible matching string, if more than one
|
||||
string starting at a given location can match then it matches the longest
|
||||
possible string, unless the flag match_any is set, in which case the first
|
||||
match encountered is returned. Use of the match_any option can reduce the time
|
||||
taken to find the match - but is only useful if the user is less concerned
|
||||
about what matched - for example it would not be suitable for search and
|
||||
replace operations. In cases where their are multiple possible matches all
|
||||
starting at the same location, and all of the same length, then the match
|
||||
chosen is the one with the longest first sub-expression, if that is the same
|
||||
for two or more matches, then the second sub-expression will be examined and so
|
||||
on.
|
||||
</P><P>
|
||||
The following table examples illustrate the main differences between Perl and
|
||||
POSIX regular expression matching rules:
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table5" cellSpacing="1" cellPadding="7" width="624" border="1">
|
||||
<TBODY>
|
||||
<TR>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P>Expression</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P>Text</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P>POSIX leftmost longest match</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P>ECMAScript depth first search match</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>a|ab</CODE></P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
xaby</CODE>
|
||||
</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
"ab"</CODE></P></TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
"a"</CODE></P></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
.*([[:alnum:]]+).*</CODE></P></TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
" abc def xyz "</CODE></P></TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P>$0 = " abc def xyz "<BR>
|
||||
$1 = "abc"</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P>$0 = " abc def xyz "<BR>
|
||||
$1 = "z"</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
.*(a|xayy)</CODE></P></TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
zzxayyzz</CODE></P></TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
"zzxayy"</CODE></P></TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>"zzxa"</CODE></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TBODY></CODE></TD></TR></TABLE>
|
||||
<P>These differences between Perl matching rules, and POSIX matching rules, mean
|
||||
that these two regular expression syntaxes differ not only in the features
|
||||
offered, but also in the form that the state machine takes and/or the
|
||||
algorithms used to traverse the state machine.</p>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
332
doc/Attic/syntax_option_type.html
Normal file
332
doc/Attic/syntax_option_type.html
Normal file
@ -0,0 +1,332 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: syntax_option_type</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">syntax_option_type</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<H3>Synopsis</H3>
|
||||
<P>Type syntax_option type is an implementation defined bitmask type that controls
|
||||
how a regular expression string is to be interpreted. For convenience
|
||||
note that all the constants listed here, are also duplicated within the scope
|
||||
of class template <A href="basic_regex.html">basic_regex</A>.</P>
|
||||
<PRE>namespace std{ namespace regex_constants{
|
||||
|
||||
typedef bitmask_type syntax_option_type;
|
||||
// these flags are standardized:
|
||||
static const syntax_option_type normal;
|
||||
static const syntax_option_type icase;
|
||||
static const syntax_option_type nosubs;
|
||||
static const syntax_option_type optimize;
|
||||
static const syntax_option_type collate;
|
||||
static const syntax_option_type ECMAScript = normal;
|
||||
static const syntax_option_type JavaScript = normal;
|
||||
static const syntax_option_type JScript = normal;
|
||||
static const syntax_option_type basic;
|
||||
static const syntax_option_type extended;
|
||||
static const syntax_option_type awk;
|
||||
static const syntax_option_type grep;
|
||||
static const syntax_option_type egrep;
|
||||
static const syntax_option_type sed = basic;
|
||||
static const syntax_option_type perl;<BR>// these are boost.regex specific:<BR>static const syntax_option_type escape_in_lists;<BR>static const syntax_option_type char_classes;<BR>static const syntax_option_type intervals;<BR>static const syntax_option_type limited_ops;<BR>static const syntax_option_type newline_alt;<BR>static const syntax_option_type bk_plus_qm;<BR>static const syntax_option_type bk_braces;<BR>static const syntax_option_type bk_parens;<BR>static const syntax_option_type bk_refs;<BR>static const syntax_option_type bk_vbar;<BR>static const syntax_option_type use_except;<BR>static const syntax_option_type failbit;<BR>static const syntax_option_type literal;<BR>static const syntax_option_type nocollate;<BR>static const syntax_option_type perlex;<BR>static const syntax_option_type emacs;<BR>
|
||||
} // namespace regex_constants
|
||||
} // namespace std</PRE>
|
||||
<H3>Description</H3>
|
||||
<P>The type <CODE>syntax_option_type</CODE> is an implementation defined bitmask
|
||||
type (17.3.2.1.2). Setting its elements has the effects listed in the table
|
||||
below, a valid value of type <CODE>syntax_option_type</CODE> will always have
|
||||
exactly one of the elements <CODE>normal, basic, extended, awk, grep, egrep, sed
|
||||
or perl</CODE> set.</P>
|
||||
<P>Note that for convenience all the constants listed here are duplicated within
|
||||
the scope of class template basic_regex, so you can use any of:</P>
|
||||
<PRE>boost::regex_constants::constant_name</PRE>
|
||||
<P>or</P>
|
||||
<PRE>boost::regex::constant_name</PRE>
|
||||
<P>or</P>
|
||||
<PRE>boost::wregex::constant_name</PRE>
|
||||
<P>in an interchangeable manner.</P>
|
||||
<P>
|
||||
<TABLE id="Table2" height="1274" cellSpacing="1" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>Element</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Effect if set</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>normal</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the grammar recognized by the regular expression engine uses its
|
||||
normal semantics: that is the same as that given in the ECMA-262, ECMAScript
|
||||
Language Specification, Chapter 15 part 10, RegExp (Regular Expression) Objects
|
||||
(FWD.1).</P>
|
||||
<P>boost.regex also recognizes most perl-compatible extensions in this mode.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>icase</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that matching of regular expressions against a character container
|
||||
sequence shall be performed without regard to case.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>nosubs</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that when a regular expression is matched against a character
|
||||
container sequence, then no sub-expression matches are to be stored in the
|
||||
supplied match_results structure.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>optimize</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the regular expression engine should pay more attention to the
|
||||
speed with which regular expressions are matched, and less to the speed with
|
||||
which regular expression objects are constructed. Otherwise it has no
|
||||
detectable effect on the program output. This currently has no effect for
|
||||
boost.regex.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>collate</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that character ranges of the form "[a-b]" should be locale sensitive.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>ECMAScript</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The same as normal.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>JavaScript</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The same as normal.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>JScript</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The same as normal.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>basic</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the grammar recognized by the regular expression engine is the
|
||||
same as that used by POSIX basic regular expressions in IEEE Std 1003.1-2001,
|
||||
Portable Operating System Interface (POSIX ), Base Definitions and Headers,
|
||||
Section 9, Regular Expressions (FWD.1).
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>extended</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the grammar recognized by the regular expression engine is the
|
||||
same as that used by POSIX extended regular expressions in IEEE Std
|
||||
1003.1-2001, Portable Operating System Interface (POSIX ), Base Definitions and
|
||||
Headers, Section 9, Regular Expressions (FWD.1).</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>awk</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the grammar recognized by the regular expression engine is the
|
||||
same as that used by POSIX utility awk in IEEE Std 1003.1-2001, Portable
|
||||
Operating System Interface (POSIX ), Shells and Utilities, Section 4, awk
|
||||
(FWD.1).</P>
|
||||
<P>That is to say: the same as POSIX extended syntax, but with escape sequences in
|
||||
character classes permitted.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>grep</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the grammar recognized by the regular expression engine is the
|
||||
same as that used by POSIX utility grep in IEEE Std 1003.1-2001, Portable
|
||||
Operating System Interface (POSIX ), Shells and Utilities, Section 4,
|
||||
Utilities, grep (FWD.1).</P>
|
||||
<P>That is to say, the same as POSIX basic syntax, but with the newline character
|
||||
acting as an alternation character in addition to "|".</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>egrep</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the grammar recognized by the regular expression engine is the
|
||||
same as that used by POSIX utility grep when given the -E option in IEEE Std
|
||||
1003.1-2001, Portable Operating System Interface (POSIX ), Shells and
|
||||
Utilities, Section 4, Utilities, grep (FWD.1).</P>
|
||||
<P>That is to say, the same as POSIX extended syntax, but with the newline
|
||||
character acting as an alternation character in addition to "|".</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>sed</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The same as basic.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>perl</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The same as normal.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<P>The following constants are specific to this particular regular expression
|
||||
implementation and do not appear in the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
|
||||
regular expression standardization proposal</A>:</P>
|
||||
<P>
|
||||
<TABLE id="Table3" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase::escape_in_lists</TD>
|
||||
<TD vAlign="top" width="45%">Allows the use of the escape "\" character in sets of
|
||||
characters, for example [\]] represents the set of characters containing only
|
||||
"]". If this flag is not set then "\" is an ordinary character inside sets.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase::char_classes</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set, character classes [:classname:]
|
||||
are allowed inside character set declarations, for example "[[:word:]]"
|
||||
represents the set of all characters that belong to the character class "word".</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: intervals</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set, repetition intervals are
|
||||
allowed, for example "a{2,4}" represents a repeat of between 2 and 4 letter
|
||||
a's.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: limited_ops</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set all of "+", "?" and "|" are
|
||||
ordinary characters in all situations.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: newline_alt</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set, then the newline character "\n"
|
||||
has the same effect as the alternation operator "|".</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: bk_plus_qm</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set then "\+" represents the one or
|
||||
more repetition operator and "\?" represents the zero or one repetition
|
||||
operator. When this bit is not set then "+" and "?" are used instead.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: bk_braces</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set then "\{" and "\}" are used for
|
||||
bounded repetitions and "{" and "}" are normal characters. This is the opposite
|
||||
of default behavior.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: bk_parens</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set then "\(" and "\)" are used to
|
||||
group sub-expressions and "(" and ")" are ordinary characters, this is the
|
||||
opposite of default behavior.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: bk_refs</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set then back references are
|
||||
allowed.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: bk_vbar</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set then "\|" represents the
|
||||
alternation operator and "|" is an ordinary character. This is the opposite of
|
||||
default behavior.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: use_except</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set then a <A href="#bad_expression">bad_expression</A>
|
||||
exception will be thrown on error. Use of this flag is deprecated -
|
||||
basic_regex will always throw on error.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: failbit</TD>
|
||||
<TD vAlign="top" width="45%">This bit is set on error, if regbase::use_except is
|
||||
not set, then this bit should be checked to see if a regular expression is
|
||||
valid before usage.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase::literal</TD>
|
||||
<TD vAlign="top" width="45%">All characters in the string are treated as literals,
|
||||
there are no special characters or escape sequences.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%" height="24">regbase::emacs</TD>
|
||||
<TD vAlign="top" width="45%" height="24">Provides compatability with the emacs
|
||||
editor, eqivalent to: bk_braces | bk_parens | bk_refs | bk_vbar.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<P>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></P>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
68
doc/Attic/thread_safety.html
Normal file
68
doc/Attic/thread_safety.html
Normal file
@ -0,0 +1,68 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Thread Safety</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Thread Safety</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<P>Class <A href="basic_regex.html">basic_regex</A><> and its typedefs regex
|
||||
and wregex are thread safe, in that compiled regular expressions can safely be
|
||||
shared between threads. The matching algorithms <A href="regex_match.html">regex_match</A>,
|
||||
<A href="regex_search.html">regex_search</A>, <A href="regex_grep.html">regex_grep</A>,
|
||||
<A href="regex_format.html">regex_format</A> and <A href="regex_merge.html">regex_merge</A>
|
||||
are all re-entrant and thread safe. Class <A href="match_results.html">match_results</A>
|
||||
is now thread safe, in that the results of a match can be safely copied from
|
||||
one thread to another (for example one thread may find matches and push
|
||||
match_results instances onto a queue, while another thread pops them off the
|
||||
other end), otherwise use a separate instance of <A href="match_results.html">match_results</A>
|
||||
per thread.
|
||||
</P>
|
||||
<P>The <A href="posix_api.html">POSIX API functions</A> are all re-entrant and
|
||||
thread safe, regular expressions compiled with <I>regcomp</I> can also be
|
||||
shared between threads.
|
||||
</P>
|
||||
<P>The class<A href="regex.html"> RegEx</A> is only thread safe if each thread
|
||||
gets its own RegEx instance (apartment threading) - this is a consequence of
|
||||
RegEx handling both compiling and matching regular expressions.
|
||||
</P>
|
||||
<P>Finally note that changing the global locale invalidates all compiled regular
|
||||
expressions, therefore calling <I>set_locale</I> from one thread while another
|
||||
uses regular expressions <I>will</I> produce unpredictable results.
|
||||
</P>
|
||||
<P>
|
||||
There is also a requirement that there is only one thread executing prior to
|
||||
the start of main().</P>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
BIN
doc/Attic/uarrow.gif
Normal file
BIN
doc/Attic/uarrow.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
82
doc/bad_expression.html
Normal file
82
doc/bad_expression.html
Normal file
@ -0,0 +1,82 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: bad_expression</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
<h2 align="center">class bad_expression</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<hr>
|
||||
<h3>Synopsis</h3>
|
||||
<p>#include <<a href="../../boost/regex/pattern_except.hpp">boost/pattern_except.hpp</a>></p>
|
||||
<p>The class <code>bad_expression</code> defines the type of objects thrown as
|
||||
exceptions to report errors during the conversion from a string representing a
|
||||
regular expression to a finite state machine. </p>
|
||||
<pre>
|
||||
<b>namespace</b> boost{
|
||||
|
||||
<b>class</b> bad_pattern : <b>public</b> std::runtime_error
|
||||
{
|
||||
<b>public</b>:
|
||||
<b>explicit</b> bad_pattern(<b>const</b> std::string& s) : std::runtime_error(s){};
|
||||
};
|
||||
|
||||
<b>class</b> bad_expression : <b>public</b> bad_pattern
|
||||
{
|
||||
<b>public</b>:
|
||||
bad_expression(<b>const</b> std::string& s) : bad_pattern(s) {}
|
||||
};
|
||||
|
||||
|
||||
} // namespace boost
|
||||
</pre>
|
||||
<h3>Description</h3>
|
||||
<pre>
|
||||
bad_expression(const string& what_arg);
|
||||
</pre>
|
||||
<p><b>Effects:</b> Constructs an object of class <code>bad_expression</code>.</p>
|
||||
<b></b>
|
||||
<p><b>Postcondition:</b> <code>strcmp(what(), what_arg.c_str()) == 0</code>.</p>
|
||||
<p>Footnotes: the class <i>bad_pattern</i> forms the base class for all
|
||||
pattern-matching exceptions, of which <i>bad_expression</i> is one. The choice
|
||||
of <i>std::runtime_error</i> as the base class for <i>bad_pattern</i> is moot;
|
||||
depending upon how the library is used exceptions may be either logic errors
|
||||
(programmer supplied expressions) or run time errors (user supplied
|
||||
expressions).</p>
|
||||
<p></p>
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
<p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
1293
doc/basic_regex.html
Normal file
1293
doc/basic_regex.html
Normal file
File diff suppressed because it is too large
Load Diff
232
doc/configuration.html
Normal file
232
doc/configuration.html
Normal file
@ -0,0 +1,232 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Configuration and setup</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">Configuration and setup</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<h2>Contents</h2>
|
||||
|
||||
<dl class="index">
|
||||
<dt><a href="#compiler">Compiler setup</a></dt>
|
||||
|
||||
<dt><a href="#locale">Locale and traits class selection</a></dt>
|
||||
|
||||
<dt><a href="#linkage">Linkage Options</a></dt>
|
||||
|
||||
<dt><a href="#algorithm">Algorithm Selection</a></dt>
|
||||
|
||||
<dt><a href="#tuning">Algorithm Tuning</a></dt>
|
||||
</dl>
|
||||
|
||||
<h3><a name="compiler"></a>Compiler setup.</h3>
|
||||
|
||||
<p>You shouldn't need to do anything special to configure
|
||||
boost.regex for use with your compiler - the <a href="../../config/index.html">boost.config</a> subsystem should already
|
||||
take care of it, if you do have problems (or you are using a
|
||||
particularly obscure compiler or platform) then <a href="../../config/index.html">boost.config</a> has a <a href="../../config/config.htm#config_script">configure</a> script.</p>
|
||||
|
||||
<h3><a name="locale"></a>Locale and traits class selection.</h3>
|
||||
|
||||
<p>The following macros (see <a href="../../../boost/regex/user.hpp">user.hpp</a>) control how
|
||||
boost.regex interacts with the user's locale:</p>
|
||||
|
||||
<table id="Table2" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="1">
|
||||
<tr>
|
||||
<td width="265">BOOST_REGEX_USE_C_LOCALE</td>
|
||||
<td>Forces boost.regex to use the global C locale in its traits
|
||||
class support: this is the default behavior on non-windows
|
||||
platforms, but MS Windows platforms normally use the Win32 API for
|
||||
locale support.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="265">BOOST_REGEX_USE_CPP_LOCALE</td>
|
||||
<td>Forces boost.regex to use std::locale in it's default traits
|
||||
class, regular expressions can then be imbued with an
|
||||
instance specific locale.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="265">BOOST_REGEX_NO_W32</td>
|
||||
<td>Tells boost.regex not to use any Win32 API's even when
|
||||
available (implies BOOST_REGEX_USE_C_LOCALE unless
|
||||
BOOST_REGEX_USE_CPP_LOCALE is set).</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<h3><a name="linkage"></a>Linkage Options</h3>
|
||||
|
||||
<table id="Table3" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="1">
|
||||
<tr>
|
||||
<td>BOOST_REGEX_DYN_LINK</td>
|
||||
<td>For Microsoft and Borland C++ builds, this tells boost.regex
|
||||
that it should link to the dll build of the boost.regex. By
|
||||
default boost.regex will link to its static library build, even if
|
||||
the dynamic C runtime library is in use.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>BOOST_REGEX_NO_LIB</td>
|
||||
<td>For Microsoft and Borland C++ builds, this tells boost.regex
|
||||
that it should not automatically select the library to link
|
||||
to.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<h3><a name="algorithm"></a>Algorithm Selection</h3>
|
||||
|
||||
<table id="Table4" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="1">
|
||||
<tr>
|
||||
<td width="253">BOOST_REGEX_V3</td>
|
||||
<td>Tells boost.regex to use the boost-1.30.0 matching algorithm,
|
||||
define only if you need maximum compatibility with previous
|
||||
behavior.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="253">BOOST_REGEX_RECURSIVE</td>
|
||||
<td>Tells boost.regex to use a stack-recursive matching
|
||||
algorithm. This is generally the fastest option (although
|
||||
there is very little in it), but can cause stack overflow in
|
||||
extreme cases, on Win32 this can be handled safely, but this is not
|
||||
the case on other platforms.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td width="253">BOOST_REGEX_NON_RECURSIVE</td>
|
||||
<td>Tells boost.regex to use a non-stack recursive matching
|
||||
algorithm, this can be slightly slower than the alternative, but is
|
||||
always safe no matter how pathological the regular
|
||||
expression. This is the default on non-Win32 platforms.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<h3><a name="tuning"></a>Algorithm Tuning</h3>
|
||||
|
||||
<p>The following option applies only if BOOST_REGEX_RECURSIVE is
|
||||
set.</p>
|
||||
|
||||
<table id="Table6" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="1">
|
||||
<tr>
|
||||
<td>BOOST_REGEX_HAS_MS_STACK_GUARD</td>
|
||||
<td>Tells boost.regex that Microsoft style __try - __except blocks
|
||||
are supported, and can be used to safely trap stack overflow.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p>The following options apply only if BOOST_REGEX_NON_RECURSIVE is
|
||||
set.</p>
|
||||
|
||||
<table id="Table5" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="1">
|
||||
<tr>
|
||||
<td>BOOST_REGEX_BLOCKSIZE</td>
|
||||
<td>In non-recursive mode, boost.regex uses largish blocks of
|
||||
memory to act as a stack for the state machine, the larger the
|
||||
block size then the fewer allocations that will take place.
|
||||
This defaults to 4096 bytes, which is large enough to match the
|
||||
vast majority of regular expressions without further
|
||||
allocations, however, you can choose smaller or larger values
|
||||
depending upon your platforms characteristics.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>BOOST_REGEX_MAX_BLOCKS</td>
|
||||
<td>Tells boost.regex how many blocks of size BOOST_REGEX_BLOCKSIZE
|
||||
it is permitted to use. If this value is exceeded then
|
||||
boost.regex will stop trying to find a match and throw a
|
||||
std::runtime_error. Defaults to 1024, don't forget to tweek
|
||||
this value if you alter BOOST_REGEX_BLOCKSIZE by much.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>BOOST_REGEX_MAX_CACHE_BLOCKS</td>
|
||||
<td>Tells boost.regex how many memory blocks to store in it's
|
||||
internal cache - memory blocks are taken from this cache rather
|
||||
than by calling ::operator new. Generally speeking this can
|
||||
be an order of magnitude faster than calling ::opertator new each
|
||||
time a memory block is required, but has the downside that
|
||||
boost.regex can end up caching a large chunk of memory (by default
|
||||
up to 16 blocks each of BOOST_REGEX_BLOCKSIZE size). If
|
||||
memory is tight then try defining this to 0 (disables all caching),
|
||||
or if that is too slow, then a value of 1 or 2, may be
|
||||
sufficient. On the other hand, on large multi-processor,
|
||||
multi-threaded systems, you may find that a higher value is in
|
||||
order.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
110
doc/contacts.html
Normal file
110
doc/contacts.html
Normal file
@ -0,0 +1,110 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Contacts</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1" >
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border=0></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">Contacts and Acknowledgements</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border=0></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<p>The author can be contacted at <a href="mailto:john_maddock@compuserve.com">
|
||||
john_maddock@compuserve.com</a>, the home page for this library is
|
||||
at <a href="http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm">
|
||||
http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm</a>,
|
||||
and the official boost version can be obtained from <a href="../libraries.htm">www.boost.org/libraries.htm</a>.</p>
|
||||
|
||||
<p>I am indebted to Robert Sedgewick's "Algorithms in C++" for
|
||||
forcing me to think about algorithms and their performance, and to
|
||||
the folks at boost for forcing me to <i>think</i>, period. The
|
||||
following people have all contributed useful comments or fixes:
|
||||
Dave Abrahams, Mike Allison, Edan Ayal, Jayashree Balasubramanian,
|
||||
Jan B<>lsche, Beman Dawes, Paul Baxter, David Bergman, David
|
||||
Dennerline, Edward Diener, Peter Dimov, Robert Dunn, Fabio Forno,
|
||||
Tobias Gabrielsson, Rob Gillen, Marc Gregoire, Chris Hecker, Nick
|
||||
Hodapp, Jesse Jones, Martin Jost, Boris Krasnovskiy, Jan Hermelink,
|
||||
Max Leung, Wei-hao Lin, Jens Maurer, Richard Peters, Heiko Schmidt,
|
||||
Jason Shirk, Gerald Slacik, Scobie Smith, Mike Smyth, Alexander
|
||||
Sokolovsky, Herv<72> Poirier, Michael Raykh, Marc Recht, Scott
|
||||
VanCamp, Bruno Voigt, Alexey Voinov, Jerry Waldorf, Rob Ward,
|
||||
Lealon Watts, Thomas Witt and Yuval Yosef. I am also grateful to
|
||||
the manuals supplied with the Henry Spencer, Perl and GNU regular
|
||||
expression libraries - wherever possible I have tried to maintain
|
||||
compatibility with these libraries and with the POSIX standard -
|
||||
the code however is entirely my own, including any bugs! I can
|
||||
absolutely guarantee that I will not fix any bugs I don't know
|
||||
about, so if you have any comments or spot any bugs, please get in
|
||||
touch.</p>
|
||||
|
||||
<p>Useful further information can be found at:</p>
|
||||
|
||||
<p>A short tutorial on regular expressions <a href="http://www.devshed.com/Server_Side/Administration/RegExp/">can be
|
||||
found here</a>.</p>
|
||||
|
||||
<p>The <a href="http://www.opengroup.org/onlinepubs/7908799/toc.htm">Open Unix
|
||||
Specification</a> contains a wealth of useful material, including
|
||||
the regular expression syntax, and specifications for <a href="http://www.opengroup.org/onlinepubs/7908799/xsh/regex.h.html">
|
||||
<regex.h></a> and <a href="http://www.opengroup.org/onlinepubs/7908799/xsh/nl_types.h.html">
|
||||
<nl_types.h></a>.</p>
|
||||
|
||||
<p>The <a href="http://www.cs.ucr.edu/~stelo/pattern.html">Pattern
|
||||
Matching Pointers</a> site is a "must visit" resource for anyone
|
||||
interested in pattern matching.</p>
|
||||
|
||||
<p><a href="http://glimpse.cs.arizona.edu/">Glimpse and Agrep</a>,
|
||||
use a simplified regular expression syntax to achieve faster search
|
||||
times.</p>
|
||||
|
||||
<p><a href="http://glimpse.cs.arizona.edu/udi.html">Udi Manber</a>
|
||||
and <a href="http://www.dcc.uchile.cl/~rbaeza/">Ricardo
|
||||
Baeza-Yates</a> both have a selection of useful pattern matching
|
||||
papers available from their respective web sites.</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
99
doc/examples.html
Normal file
99
doc/examples.html
Normal file
@ -0,0 +1,99 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Examples</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><IMG height="86" alt="C++ Boost" src="../../../c++boost.gif" width="277" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
<h2 align="center">Examples</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><IMG height="45" alt="Boost.Regex Index" src="uarrow.gif" width="43" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<BR>
|
||||
<HR>
|
||||
<P>There are three demo applications that ship with this library, they all come
|
||||
with makefiles for Borland, Microsoft and gcc compilers, otherwise you will
|
||||
have to create your own makefiles.</P>
|
||||
<H5>regress.exe:</H5>
|
||||
<P>A regression test application that gives the matching/searching algorithms a
|
||||
full workout. The presence of this program is your guarantee that the library
|
||||
will behave as claimed - at least as far as those items tested are concerned -
|
||||
if anyone spots anything that isn't being tested I'd be glad to hear about it.</P>
|
||||
<P>Files: <A href="../test/regress/parse.cpp">parse.cpp</A>, <A href="../test/regress/regress.cpp">
|
||||
regress.cpp</A>, <A href="../test/regress/tests.cpp">tests.cpp</A>.</P>
|
||||
<H5>jgrep.exe</H5>
|
||||
<P>A simple grep implementation, run with no command line options to find out its
|
||||
usage. Look at <A href="../src/fileiter.cpp">fileiter.cpp</A>/fileiter.hpp and
|
||||
the mapfile class to see an example of a "smart" bidirectional iterator that
|
||||
can be used with boost.regex or any other STL algorithm.</P>
|
||||
<P>Files: <A href="../example/jgrep/jgrep.cpp">jgrep.cpp</A>, <A href="../example/jgrep/main.cpp">
|
||||
main.cpp</A>.</P>
|
||||
<H5>timer.exe</H5>
|
||||
<P>A simple interactive expression matching application, the results of all
|
||||
matches are timed, allowing the programmer to optimize their regular
|
||||
expressions where performance is critical.</P>
|
||||
<P>Files: <A href="../example/timer/regex_timer.cpp">regex_timer.cpp</A>.</P>
|
||||
<H5>Code snippets</H5>
|
||||
<P>The snippets examples contain the code examples used in the documentation:</P>
|
||||
<P><A href="../example/snippets/credit_card_example.cpp">credit_card_example.cpp</A>:
|
||||
Credit card number formatting code.</P>
|
||||
<P><A href="../example/snippets/partial_regex_grep.cpp">partial_regex_grep.cpp</A>:
|
||||
Search example using partial matches.</P>
|
||||
<P><A href="../example/snippets/partial_regex_match.cpp">partial_regex_match.cpp</A>:
|
||||
regex_match example using partial matches.</P>
|
||||
<P><A href="../example/snippets/regex_grep_example_1.cpp">regex_grep_example_1.cpp</A>:
|
||||
regex_grep example 1: searches a cpp file for class definitions.</P>
|
||||
<P><A href="../example/snippets/regex_grep_example_2.cpp">regex_grep_example_2.cpp</A>:
|
||||
regex_grep example 2: searches a cpp file for class definitions, using a global
|
||||
callback function.</P>
|
||||
<P><A href="../example/snippets/regex_grep_example_3.cpp">regex_grep_example_3.cpp</A>:
|
||||
regex_grep example 2: searches a cpp file for class definitions, using a bound
|
||||
member function callback.</P>
|
||||
<P><A href="../example/snippets/regex_grep_example_4.cpp">regex_grep_example_4.cpp</A>:
|
||||
regex_grep example 2: searches a cpp file for class definitions, using a C++
|
||||
Builder closure as a callback.</P>
|
||||
<P><A href="../example/snippets/regex_match_example.cpp">regex_match_example.cpp</A>:
|
||||
ftp based regex_match example.</P>
|
||||
<P><A href="../example/snippets/regex_merge_example.cpp">regex_merge_example.cpp</A>:
|
||||
regex_merge example: converts a C++ file to syntax highlighted HTML.</P>
|
||||
<P><A href="../example/snippets/regex_replace_example.cpp">regex_replace_example.cpp</A>:
|
||||
regex_replace example: converts a C++ file to syntax highlighted HTML</P>
|
||||
<P><A href="../example/snippets/regex_search_example.cpp">regex_search_example.cpp</A>:
|
||||
regex_search example: searches a cpp file for class definitions.</P>
|
||||
<P><A href="../example/snippets/regex_split_example_1.cpp">regex_split_example_1.cpp</A>:
|
||||
regex_split example: split a string into tokens.</P>
|
||||
<P><A href="../example/snippets/regex_split_example_2.cpp">regex_split_example_2.cpp</A>
|
||||
: regex_split example: spit out linked URL's.</P>
|
||||
<P></P>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
<p><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
162
doc/faq.html
Normal file
162
doc/faq.html
Normal file
@ -0,0 +1,162 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: FAQ</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">FAQ</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<font color="#ff0000"><font color="#ff0000"></font></font>
|
||||
<p><font color="#ff0000"><font color="#ff0000"><font color=
|
||||
"#ff0000"> Q. Why can't I use the "convenience" versions of
|
||||
regex_match / regex_search / regex_grep / regex_format /
|
||||
regex_merge?</font></font></font></p>
|
||||
|
||||
<p>A. These versions may or may not be available depending upon the
|
||||
capabilities of your compiler, the rules determining the format of
|
||||
these functions are quite complex - and only the versions visible
|
||||
to a standard compliant compiler are given in the help. To find out
|
||||
what your compiler supports, run <boost/regex.hpp> through
|
||||
your C++ pre-processor, and search the output file for the function
|
||||
that you are interested in.<font color="#ff0000"><font color=
|
||||
"#ff0000"></font></font></p>
|
||||
|
||||
<p><font color="#ff0000"><font color="#ff0000">Q. I can't get
|
||||
regex++ to work with escape characters, what's going
|
||||
on?</font></font></p>
|
||||
|
||||
<p>A. If you embed regular expressions in C++ code, then remember
|
||||
that escape characters are processed twice: once by the C++
|
||||
compiler, and once by the regex++ expression compiler, so to pass
|
||||
the regular expression \d+ to regex++, you need to embed "\\d+" in
|
||||
your code. Likewise to match a literal backslash you will need to
|
||||
embed "\\\\" in your code. <font color="#ff0000"></font></p>
|
||||
|
||||
<p><font color="#ff0000">Q. Why does using parenthesis in a POSIX
|
||||
regular expression change the result of a match?</font></p>
|
||||
|
||||
<p>For POSIX (extended and basic) regular expressions, but not for
|
||||
perl regexes, parentheses don't only mark; they determine what the
|
||||
best match is as well. When the expression is compiled as a POSIX
|
||||
basic or extended regex then Boost.regex follows the POSIX standard
|
||||
leftmost longest rule for determining what matched. So if there is
|
||||
more than one possible match after considering the whole
|
||||
expression, it looks next at the first sub-expression and then the
|
||||
second sub-expression and so on. So...</p>
|
||||
|
||||
<pre>
|
||||
"(0*)([0-9]*)" against "00123" would produce
|
||||
$1 = "00"
|
||||
$2 = "123"
|
||||
</pre>
|
||||
|
||||
<p>where as</p>
|
||||
|
||||
<pre>
|
||||
"0*([0-9)*" against "00123" would produce
|
||||
$1 = "00123"
|
||||
</pre>
|
||||
|
||||
<p>If you think about it, had $1 only matched the "123", this would
|
||||
be "less good" than the match "00123" which is both further to the
|
||||
left and longer. If you want $1 to match only the "123" part, then
|
||||
you need to use something like:</p>
|
||||
|
||||
<pre>
|
||||
"0*([1-9][0-9]*)"
|
||||
</pre>
|
||||
|
||||
<p>as the expression.</p>
|
||||
|
||||
<p><font color="#ff0000">Q. Why don't character ranges work
|
||||
properly (POSIX mode only)?</font><br>
|
||||
A. The POSIX standard specifies that character range expressions
|
||||
are locale sensitive - so for example the expression [A-Z] will
|
||||
match any collating element that collates between 'A' and 'Z'. That
|
||||
means that for most locales other than "C" or "POSIX", [A-Z] would
|
||||
match the single character 't' for example, which is not what most
|
||||
people expect - or at least not what most people have come to
|
||||
expect from regular expression engines. For this reason, the
|
||||
default behaviour of boost.regex (perl mode) is to turn locale
|
||||
sensitive collation off by not setting the regex_constants::collate
|
||||
compile time flag. However if you set a non-default compile time
|
||||
flag - for example regex_constants::extended or
|
||||
regex_constants::basic, then locale dependent collation will be
|
||||
enabled, this also applies to the POSIX API functions which use
|
||||
either regex_constants::extended or regex_constants::basic
|
||||
internally. <i>[Note - when regex_constants::nocollate in effect,
|
||||
the library behaves "as if" the LC_COLLATE locale category were
|
||||
always "C", regardless of what its actually set to - end
|
||||
note</i>].</p>
|
||||
|
||||
<p><font color="#ff0000">Q. Why are there no throw specifications
|
||||
on any of the functions? What exceptions can the library
|
||||
throw?</font></p>
|
||||
|
||||
<p>A. Not all compilers support (or honor) throw specifications,
|
||||
others support them but with reduced efficiency. Throw
|
||||
specifications may be added at a later date as compilers begin to
|
||||
handle this better. The library should throw only three types of
|
||||
exception: boost::bad_expression can be thrown by basic_regex when
|
||||
compiling a regular expression, std::runtime_error can be thrown
|
||||
when a call to basic_regex::imbue tries to open a message catalogue
|
||||
that doesn't exist, or when a call to regex_search or regex_match
|
||||
results in an "everlasting" search, or when a call to
|
||||
RegEx::GrepFiles or RegEx::FindFiles tries to open a file that
|
||||
cannot be opened, finally std::bad_alloc can be thrown by just
|
||||
about any of the functions in this library.</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
272
doc/format_syntax.html
Normal file
272
doc/format_syntax.html
Normal file
@ -0,0 +1,272 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: Format String Syntax</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">Format String Syntax</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<p>Format strings are used by the algorithm <a href="template_class_ref.htm#reg_merge">regex_merge</a> and by <a
|
||||
href="match_results.html">match_results::format</a>, and are used
|
||||
to transform one string into another.</p>
|
||||
|
||||
<p>There are three kind of format string: sed, Perl and extended,
|
||||
the extended syntax is a superset of the others so this is covered
|
||||
first.</p>
|
||||
|
||||
<p><b><i>Extended format syntax</i></b></p>
|
||||
|
||||
<p>In format strings, all characters are treated as literals
|
||||
except: ()$\?:</p>
|
||||
|
||||
<p>To use any of these as literals you must prefix them with the
|
||||
escape character \</p>
|
||||
|
||||
<p>The following special sequences are recognized: <br>
|
||||
<br>
|
||||
<i>Grouping:</i></p>
|
||||
|
||||
<p>Use the parenthesis characters ( and ) to group sub-expressions
|
||||
within the format string, use \( and \) to represent literal '('
|
||||
and ')'. <br>
|
||||
<br>
|
||||
<i>Sub-expression expansions:</i></p>
|
||||
|
||||
<p>The following Perl like expressions expand to a particular
|
||||
matched sub-expression:<br>
|
||||
</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table id="Table2" cellspacing="0" cellpadding="7" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">$`</td>
|
||||
<td valign="top" width="43%">Expands to all the text from the end
|
||||
of the previous match to the start of the current match, if there
|
||||
was no previous match in the current operation, then everything
|
||||
from the start of the input string to the start of the match.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">$'</td>
|
||||
<td valign="top" width="43%">Expands to all the text from the end
|
||||
of the match to the end of the input string.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">$&</td>
|
||||
<td valign="top" width="43%">Expands to all of the current
|
||||
match.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">$0</td>
|
||||
<td valign="top" width="43%">Expands to all of the current
|
||||
match.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">$N</td>
|
||||
<td valign="top" width="43%">Expands to the text that matched
|
||||
sub-expression <i>N</i>.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p><i>Conditional expressions:</i></p>
|
||||
|
||||
<p>Conditional expressions allow two different format strings to be
|
||||
selected dependent upon whether a sub-expression participated in
|
||||
the match or not:</p>
|
||||
|
||||
<p>?Ntrue_expression:false_expression</p>
|
||||
|
||||
<p>Executes true_expression if sub-expression <i>N</i> participated
|
||||
in the match, otherwise executes false_expression.</p>
|
||||
|
||||
<p>Example: suppose we search for "(while)|(for)" then the format
|
||||
string "?1WHILE:FOR" would output what matched, but in upper
|
||||
case. <br>
|
||||
<br>
|
||||
<i>Escape sequences:</i></p>
|
||||
|
||||
<p>The following escape sequences are also allowed:<br>
|
||||
</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table id="Table3" cellspacing="0" cellpadding="7" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\a</td>
|
||||
<td valign="top" width="43%">The bell character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\f</td>
|
||||
<td valign="top" width="43%">The form feed character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\n</td>
|
||||
<td valign="top" width="43%">The newline character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\r</td>
|
||||
<td valign="top" width="43%">The carriage return character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\t</td>
|
||||
<td valign="top" width="43%">The tab character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\v</td>
|
||||
<td valign="top" width="43%">A vertical tab character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\x</td>
|
||||
<td valign="top" width="43%">A hexadecimal character - for example
|
||||
\x0D.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\x{}</td>
|
||||
<td valign="top" width="43%">A possible Unicode hexadecimal
|
||||
character - for example \x{1A0}</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\cx</td>
|
||||
<td valign="top" width="43%">The ASCII escape character x, for
|
||||
example \c@ is equivalent to escape-@.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\e</td>
|
||||
<td valign="top" width="43%">The ASCII escape character.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="8%"> </td>
|
||||
<td valign="top" width="40%">\dd</td>
|
||||
<td valign="top" width="43%">An octal character constant, for
|
||||
example \10.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p><b><i>Perl format strings</i></b></p>
|
||||
|
||||
<p>Perl format strings are the same as the default syntax except
|
||||
that the characters ()?: have no special meaning.</p>
|
||||
|
||||
<p><b><i>Sed format strings</i></b></p>
|
||||
|
||||
<p>Sed format strings use only the characters \ and & as
|
||||
special characters.</p>
|
||||
|
||||
<p>\n where n is a digit, is expanded to the nth
|
||||
sub-expression.</p>
|
||||
|
||||
<p>& is expanded to the whole of the match (equivalent to
|
||||
\0).</p>
|
||||
|
||||
<p>Other escape sequences are expanded as per the default
|
||||
syntax.</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
539
doc/gcc-performance.html
Normal file
539
doc/gcc-performance.html
Normal file
@ -0,0 +1,539 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Regular Expression Performance Comparison (gcc 3.2)</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
|
||||
<META content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot" name="Template">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
</head>
|
||||
<body bgcolor="#ffffff" link="#0000ff" vlink="#800080">
|
||||
<h2>Regular Expression Performance Comparison</h2>
|
||||
<p>The following tables provide comparisons between the following regular
|
||||
expression libraries:</p>
|
||||
<p><a href="http://www.boost.org/">The Boost regex library</a>.</p>
|
||||
<p><a href="http://www.gnu.org">The GNU regular expression library</a>.</p>
|
||||
<p>Philip Hazel's <a href="http://www.pcre.org">PCRE</a> library.</p>
|
||||
<h3>Details</h3>
|
||||
<p>Machine: Intel Pentium 4 2.8GHz PC.</p>
|
||||
<p>Compiler: GNU C++ version 3.2 20020927 (prerelease).</p>
|
||||
<p>C++ Standard Library: GNU libstdc++ version 20020927.</p>
|
||||
<p>OS: Cygwin.</p>
|
||||
<p>Boost version: 1.31.0.</p>
|
||||
<p>PCRE version: 4.1.</p>
|
||||
<p>As ever care should be taken in interpreting the results, only sensible regular
|
||||
expressions (rather than pathological cases) are given, most are taken from the
|
||||
Boost regex examples, or from the <a href="http://www.regxlib.com/">Library of
|
||||
Regular Expressions</a>. In addition, some variation in the relative
|
||||
performance of these libraries can be expected on other machines - as memory
|
||||
access and processor caching effects can be quite large for most finite state
|
||||
machine algorithms. In each case the first figure given is the relative time
|
||||
taken (so a value of 1.0 is as good as it gets), while the second figure is the
|
||||
actual time taken.</p>
|
||||
<h3>Averages</h3>
|
||||
<p>The following are the average relative scores for all the tests: the perfect
|
||||
regular expression library would score 1, in practice anything less than 2
|
||||
is pretty good.</p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1.4503</td>
|
||||
<td>1.49124</td>
|
||||
<td>108.372</td>
|
||||
<td>1.56255</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Comparison 1: Long Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within a long English language text was measured
|
||||
(<a href="ftp://ibiblio.org/pub/docs/books/gutenberg/etext02/mtent12.zip">mtent12.txt</a>
|
||||
from <a href="http://promo.net/pg/">Project Gutenberg</a>, 19Mb). </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Twain</code></td>
|
||||
<td>3.49<br>
|
||||
(0.205s)</td>
|
||||
<td>4.09<br>
|
||||
(0.24s)</td>
|
||||
<td>65.2<br>
|
||||
(3.83s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.0588s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Huck[[:alpha:]]+</code></td>
|
||||
<td>3.86<br>
|
||||
(0.203s)</td>
|
||||
<td>4.52<br>
|
||||
(0.238s)</td>
|
||||
<td>100<br>
|
||||
(5.26s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.0526s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>[[:alpha:]]+ing</code></td>
|
||||
<td><font color="#008000">1.01<br>
|
||||
(1.23s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.22s)</font></td>
|
||||
<td>4.95<br>
|
||||
(6.04s)</td>
|
||||
<td>4.67<br>
|
||||
(5.71s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[^ ]*?Twain</code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.31s)</font></td>
|
||||
<td><font color="#008000">1.05<br>
|
||||
(0.326s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>3.32<br>
|
||||
(1.03s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Tom|Sawyer|Huckleberry|Finn</code></td>
|
||||
<td><font color="#008000">1.02<br>
|
||||
(0.125s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.123s)</font></td>
|
||||
<td>165<br>
|
||||
(20.3s)</td>
|
||||
<td><font color="#008000">1.08<br>
|
||||
(0.133s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> (Tom|Sawyer|Huckleberry|Finn).{0,30}river|river.{0,30}(Tom|Sawyer|Huckleberry|Finn)</code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.345s)</font></td>
|
||||
<td><font color="#008000">1.03<br>
|
||||
(0.355s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>1.71<br>
|
||||
(0.59s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Comparison 2: Medium Sized Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within a medium sized English language text was
|
||||
measured (the first 50K from mtent12.txt). </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Twain</code></td>
|
||||
<td>1.8<br>
|
||||
(0.000519s)</td>
|
||||
<td>2.14<br>
|
||||
(0.000616s)</td>
|
||||
<td>9.08<br>
|
||||
(0.00262s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000289s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Huck[[:alpha:]]+</code></td>
|
||||
<td>3.65<br>
|
||||
(0.000499s)</td>
|
||||
<td>4.36<br>
|
||||
(0.000597s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000137s)</font></td>
|
||||
<td>1.43<br>
|
||||
(0.000196s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>[[:alpha:]]+ing</code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.00258s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.00258s)</font></td>
|
||||
<td>5.28<br>
|
||||
(0.0136s)</td>
|
||||
<td>5.63<br>
|
||||
(0.0145s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[^ ]*?Twain</code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000929s)</font></td>
|
||||
<td><font color="#008000">1.03<br>
|
||||
(0.000957s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>2.82<br>
|
||||
(0.00262s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Tom|Sawyer|Huckleberry|Finn</code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000812s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000812s)</font></td>
|
||||
<td>60.1<br>
|
||||
(0.0488s)</td>
|
||||
<td>1.28<br>
|
||||
(0.00104s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> (Tom|Sawyer|Huckleberry|Finn).{0,30}river|river.{0,30}(Tom|Sawyer|Huckleberry|Finn)</code></td>
|
||||
<td><font color="#008000">1.02<br>
|
||||
(0.00178s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.00174s)</font></td>
|
||||
<td>242<br>
|
||||
(0.421s)</td>
|
||||
<td>1.3<br>
|
||||
(0.00227s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Comparison 3: C++ Code Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within the C++ source file <a href="../../../boost/crc.hpp">
|
||||
boost/crc.hpp</a> was measured. </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\<\w+\>([
|
||||
]*\([^)]*\))?[[:space:]]*)*(\<\w*\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?(\{|:[^;\{()]*\{)</code></td>
|
||||
<td><font color="#008000">1.04<br>
|
||||
(0.000144s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000139s)</font></td>
|
||||
<td>862<br>
|
||||
(0.12s)</td>
|
||||
<td>4.56<br>
|
||||
(0.000636s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>(^[
|
||||
]*#(?:[^\\\n]|\\[^\n_[:punct:][:alnum:]]*[\n[:punct:][:word:]])*)|(//[^\n]*|/\*.*?\*/)|\<([+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\.)?[[:digit:]]+(?:[eE][+-]?[[:digit:]]+)?))u?(?:(?:int(?:8|16|32|64))|L)?)\>|('(?:[^\\']|\\.)*'|"(?:[^\\"]|\\.)*")|\<(__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|bool|break|case|catch|cdecl|char|class|const|const_cast|continue|default|delete|do|double|dynamic_cast|else|enum|explicit|extern|false|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|operator|pascal|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_cast|struct|switch|template|this|throw|true|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\></code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.0139s)</font></td>
|
||||
<td><font color="#008000">1.01<br>
|
||||
(0.0141s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>1.55<br>
|
||||
(0.0216s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[ ]*#[ ]*include[ ]+("[^"]+"|<[^>]+>)</code></td>
|
||||
<td><font color="#008000">1.04<br>
|
||||
(0.000332s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000318s)</font></td>
|
||||
<td>130<br>
|
||||
(0.0413s)</td>
|
||||
<td>1.72<br>
|
||||
(0.000547s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[ ]*#[ ]*include[ ]+("boost/[^"]+"|<boost/[^>]+>)</code></td>
|
||||
<td><font color="#008000">1.02<br>
|
||||
(0.000323s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000318s)</font></td>
|
||||
<td>150<br>
|
||||
(0.0476s)</td>
|
||||
<td>1.72<br>
|
||||
(0.000547s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<h3></h3>
|
||||
<H3>Comparison 4: HTML Document Search
|
||||
</H3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within the html file <a href="../../libraries.htm">libs/libraries.htm</a>
|
||||
was measured. </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>beman|john|dave</code></td>
|
||||
<td><font color="#008000">1.03<br>
|
||||
(0.000367s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000357s)</font></td>
|
||||
<td>47.4<br>
|
||||
(0.0169s)</td>
|
||||
<td>1.16<br>
|
||||
(0.000416s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code><p>.*?</p></code></td>
|
||||
<td>1.25<br>
|
||||
(0.000459s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000367s)</font></td>
|
||||
<td>NA</td>
|
||||
<td><font color="#008000">1.03<br>
|
||||
(0.000376s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> <a[^>]+href=("[^"]*"|[^[:space:]]+)[^>]*></code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000509s)</font></td>
|
||||
<td><font color="#008000">1.02<br>
|
||||
(0.000518s)</font></td>
|
||||
<td>305<br>
|
||||
(0.155s)</td>
|
||||
<td><font color="#008000">1.1<br>
|
||||
(0.000558s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> <h[12345678][^>]*>.*?</h[12345678]></code></td>
|
||||
<td><font color="#008000">1.04<br>
|
||||
(0.00025s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.00024s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>1.16<br>
|
||||
(0.000279s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> <img[^>]+src=("[^"]*"|[^[:space:]]+)[^>]*></code></td>
|
||||
<td>2.22<br>
|
||||
(0.000489s)</td>
|
||||
<td>1.69<br>
|
||||
(0.000372s)</td>
|
||||
<td>148<br>
|
||||
(0.0326s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.00022s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> <font[^>]+face=("[^"]*"|[^[:space:]]+)[^>]*>.*?</font></code></td>
|
||||
<td>1.71<br>
|
||||
(0.000371s)</td>
|
||||
<td>1.75<br>
|
||||
(0.000381s)</td>
|
||||
<td>NA</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000218s)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Comparison 3: Simple Matches</h3>
|
||||
<p>For each of the following regular expressions the time taken to match against
|
||||
the text indicated was measured. </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>Text</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>abc</code></td>
|
||||
<td>abc</td>
|
||||
<td>1.36<br>
|
||||
(2.15e-07s)</td>
|
||||
<td>1.36<br>
|
||||
(2.15e-07s)</td>
|
||||
<td>2.76<br>
|
||||
(4.34e-07s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.58e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^([0-9]+)(\-| |$)(.*)$</code></td>
|
||||
<td>100- this is a line of ftp response which contains a message string</td>
|
||||
<td>1.55<br>
|
||||
(7.26e-07s)</td>
|
||||
<td>1.51<br>
|
||||
(7.07e-07s)</td>
|
||||
<td>319<br>
|
||||
(0.000149s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(4.67e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>([[:digit:]]{4}[- ]){3}[[:digit:]]{3,4}</code></td>
|
||||
<td>1234-5678-1234-456</td>
|
||||
<td>1.96<br>
|
||||
(9.54e-07s)</td>
|
||||
<td>1.96<br>
|
||||
(9.54e-07s)</td>
|
||||
<td>44.5<br>
|
||||
(2.17e-05s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(4.87e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
|
||||
<td>john_maddock@compuserve.com</td>
|
||||
<td>1.22<br>
|
||||
(1.51e-06s)</td>
|
||||
<td>1.23<br>
|
||||
(1.53e-06s)</td>
|
||||
<td>162<br>
|
||||
(0.000201s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.24e-06s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
|
||||
<td>foo12@foo.edu</td>
|
||||
<td>1.28<br>
|
||||
(1.47e-06s)</td>
|
||||
<td>1.3<br>
|
||||
(1.49e-06s)</td>
|
||||
<td>104<br>
|
||||
(0.00012s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.15e-06s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
|
||||
<td>bob.smith@foo.tv</td>
|
||||
<td>1.28<br>
|
||||
(1.47e-06s)</td>
|
||||
<td>1.3<br>
|
||||
(1.49e-06s)</td>
|
||||
<td>113<br>
|
||||
(0.00013s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.15e-06s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
|
||||
<td>EH10 2QQ</td>
|
||||
<td>1.38<br>
|
||||
(4.68e-07s)</td>
|
||||
<td>1.41<br>
|
||||
(4.77e-07s)</td>
|
||||
<td>13.5<br>
|
||||
(4.59e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.39e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
|
||||
<td>G1 1AA</td>
|
||||
<td>1.28<br>
|
||||
(4.35e-07s)</td>
|
||||
<td>1.25<br>
|
||||
(4.25e-07s)</td>
|
||||
<td>11.7<br>
|
||||
(3.97e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.39e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
|
||||
<td>SW1 1ZZ</td>
|
||||
<td>1.32<br>
|
||||
(4.53e-07s)</td>
|
||||
<td>1.31<br>
|
||||
(4.49e-07s)</td>
|
||||
<td>12.2<br>
|
||||
(4.2e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.44e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$</code></td>
|
||||
<td>4/1/2001</td>
|
||||
<td>1.16<br>
|
||||
(3.82e-07s)</td>
|
||||
<td>1.2<br>
|
||||
(3.96e-07s)</td>
|
||||
<td>13.9<br>
|
||||
(4.59e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.29e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$</code></td>
|
||||
<td>12/12/2001</td>
|
||||
<td>1.38<br>
|
||||
(4.49e-07s)</td>
|
||||
<td>1.38<br>
|
||||
(4.49e-07s)</td>
|
||||
<td>16<br>
|
||||
(5.2e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.25e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
|
||||
<td>123</td>
|
||||
<td>1.19<br>
|
||||
(7.64e-07s)</td>
|
||||
<td>1.16<br>
|
||||
(7.45e-07s)</td>
|
||||
<td>7.51<br>
|
||||
(4.81e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(6.4e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
|
||||
<td>+3.14159</td>
|
||||
<td>1.32<br>
|
||||
(8.97e-07s)</td>
|
||||
<td>1.31<br>
|
||||
(8.88e-07s)</td>
|
||||
<td>14<br>
|
||||
(9.48e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(6.78e-07s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
|
||||
<td>-3.14159</td>
|
||||
<td>1.32<br>
|
||||
(8.97e-07s)</td>
|
||||
<td>1.31<br>
|
||||
(8.88e-07s)</td>
|
||||
<td>14<br>
|
||||
(9.48e-06s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(6.78e-07s)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<hr>
|
||||
<p>Copyright John Maddock April 2003, all rights reserved.</p>
|
||||
</body>
|
||||
</html>
|
52
doc/headers.html
Normal file
52
doc/headers.html
Normal file
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Headers</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Headers</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>There are two main headers used by this library: <boost/regex.hpp>
|
||||
provides full access to the entire library, while <boost/cregex.hpp>
|
||||
provides access to just the high level class RegEx, and the POSIX API
|
||||
functions.
|
||||
</P>
|
||||
<P>There is also a header containing only forward declarations
|
||||
<boost/regex_fwd.hpp> for use when an interface is dependent upon
|
||||
boost::basic_regex, but otherwise does not need the full definitions.</P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
58
doc/history.html
Normal file
58
doc/history.html
Normal file
@ -0,0 +1,58 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: History</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">History</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>Boost 1.31.0.</P>
|
||||
<UL>
|
||||
<LI>
|
||||
Completely rewritten pattern matching code - it is now up to 10 times faster
|
||||
than before.</LI>
|
||||
<LI>
|
||||
Reorganized documentation.</LI>
|
||||
<LI>
|
||||
Deprecated all interfaces that are not part of the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
|
||||
regular expression standardization proposal</A>.</LI>
|
||||
<LI>
|
||||
Added regex_iterator and regex_token_iterator.</LI>
|
||||
<LI>
|
||||
Added support for Perl style independent sub-expressions.</LI></UL>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
45
doc/implementation.html
Normal file
45
doc/implementation.html
Normal file
@ -0,0 +1,45 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Implementation</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Implementation</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>Todo.</P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
127
doc/index.html
Normal file
127
doc/index.html
Normal file
@ -0,0 +1,127 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: Index</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td style="WIDTH: 353px">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
<h2 align="center">Index</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="../../index.html"><img height="45" width="43" alt="Boost Libraries Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<hr>
|
||||
<h2>Contents</h2>
|
||||
<dl class="index">
|
||||
<dt><a href="introduction.html">Overview</a></dt>
|
||||
<dt><a href="configuration.html">Configuration and setup</a></dt>
|
||||
<dt><a href="install.html">Installation</a></dt>
|
||||
<dd>
|
||||
<dl class="index">
|
||||
<dt><a href="install.html#bcb">Borland C++ Builder</a></dt> <dt><a href="install.html#vc">
|
||||
Microsoft Visual C++</a></dt> <dt><a href="install.html#gcc">GNU G++</a></dt>
|
||||
<dt><a href="install.html#sun">Sun Forte Compiler</a></dt> <dt><a href="install.html#other">
|
||||
Other compilers (building with bjam)</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Reference</dt>
|
||||
<dd>
|
||||
<dl class="index">
|
||||
<dt>Types</dt>
|
||||
<dd>
|
||||
<dl class="index">
|
||||
<dt><a href="syntax_option_type.html">syntax_option_type</a></dt> <dt><a href="match_flag_type.html">
|
||||
match_flag_type</a></dt> <dt><a href="bad_expression.html">class bad_expression</a></dt>
|
||||
<dt><a href="regex_traits.html">class regex_traits</a></dt> <dt><a href="basic_regex.html">
|
||||
class template basic_regex</a></dt> <dt><a href="sub_match.html">class template
|
||||
sub_match</a></dt> <dt><a href="match_results.html">class template
|
||||
match_results</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Algorithms</dt>
|
||||
<dd>
|
||||
<dl class="index">
|
||||
<dt><a href="regex_match.html">regex_match</a></dt> <dt><a href="regex_search.html">regex_search</a></dt>
|
||||
<dt><a href="regex_replace.html">regex_replace</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Iterators</dt>
|
||||
<dd>
|
||||
<dl class="index">
|
||||
<dt><a href="regex_iterator.html">regex_iterator</a></dt>
|
||||
<dt><a href="regex_token_iterator.html">regex_token_iterator</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Misc.</dt>
|
||||
<dd>
|
||||
<dl class="index">
|
||||
<dt><a href="posix_api.html">POSIX API Compatibility Functions</a></dt>
|
||||
<dt><a href="partial_matches.html">Partial matches</a></dt>
|
||||
<dt><a href="syntax.html">Regular Expression Syntax</a></dt>
|
||||
<dt><a href="format_syntax.html">Format String Syntax</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt>Deprecated interfaces</dt>
|
||||
<dd>
|
||||
<dl class="index">
|
||||
<dt><a href="regbase.html">class regbase</a></dt> <dt><a href="reg_expression.html">class
|
||||
template reg_expression</a></dt> <dt><a href="regex_grep.html">Algorithm
|
||||
regex_grep</a></dt> <dt><a href="regex_format.html">Algorithm regex_format</a></dt>
|
||||
<dt><a href="regex_merge.html">Algorithm regex_merge</a></dt> <dt><a href="regex_split.html">
|
||||
Algorithm regex_split</a></dt>
|
||||
<dt><a href="regex.html">class RegEx</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt><a href="faq.html">FAQ</a></dt>
|
||||
<dt>Appendix</dt>
|
||||
<dd>
|
||||
<dl class="index">
|
||||
<dt><a href="implementation.html">Implementation</a></dt>
|
||||
<dt><a href="thread_safety.html">Thread Safety</a></dt>
|
||||
<dt><a href="localisation.html">Localisation</a></dt>
|
||||
<dt><a href="examples.html">Examples</a></dt>
|
||||
<dt><a href="headers.html">Headers</a></dt>
|
||||
<dt><a href="redistributables.html">Redistributables and Library Names</a></dt>
|
||||
<dt><a href="standards.html">Standards Conformance</a></dt>
|
||||
<dt><a href="history.html">History</a></dt>
|
||||
<dt><a href="performance.html">Performance</a></dt>
|
||||
<dt><a href="contacts.html">Contacts and Acknowledgements</a></dt>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
237
doc/install.html
Normal file
237
doc/install.html
Normal file
@ -0,0 +1,237 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Index</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Installation</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P><EM>[ </EM><STRONG><I>Important</I></STRONG><EM>: If you are upgrading from the
|
||||
2.x version of this library then you will find a number of changes to the
|
||||
documented header names and library interfaces, existing code should still
|
||||
compile unchanged however - see </EM><A href="appendix.htm#upgrade"><FONT color="#0000ff">
|
||||
<EM>Note for Upgraders</EM></FONT></A><EM>. ]</EM></P>
|
||||
<P>When you extract the library from its zip file, you must preserve its internal
|
||||
directory structure (for example by using the -d option when extracting). If
|
||||
you didn't do that when extracting, then you'd better stop reading this, delete
|
||||
the files you just extracted, and try again!
|
||||
</P>
|
||||
<P>This library should not need configuring before use; most popular
|
||||
compilers/standard libraries/platforms are already supported "as is". If you do
|
||||
experience configuration problems, or just want to test the configuration with
|
||||
your compiler, then the process is the same as for all of boost; see the <A href="../config/config.htm">
|
||||
configuration library documentation</A>.</P>
|
||||
<P>The library will encase all code inside namespace boost.
|
||||
</P>
|
||||
<P>Unlike some other template libraries, this library consists of a mixture of
|
||||
template code (in the headers) and static code and data (in cpp files).
|
||||
Consequently it is necessary to build the library's support code into a library
|
||||
or archive file before you can use it, instructions for specific platforms are
|
||||
as follows:
|
||||
</P>
|
||||
<P><B><A name="bcb"></A>Borland C++ Builder:</B>
|
||||
</P>
|
||||
<UL>
|
||||
<LI>
|
||||
Open up a console window and change to the <boost>\libs\regex\build
|
||||
directory.
|
||||
<LI>
|
||||
Select the appropriate makefile (bcb4.mak for C++ Builder 4, bcb5.mak for C++
|
||||
Builder 5, and bcb6.mak for C++ Builder 6).
|
||||
<LI>
|
||||
Invoke the makefile (pass the full path to your version of make if you have
|
||||
more than one version installed, the makefile relies on the path to make to
|
||||
obtain your C++ Builder installation directory and tools) for example:
|
||||
</LI>
|
||||
</UL>
|
||||
<PRE>make -fbcb5.mak</PRE>
|
||||
<P>The build process will build a variety of .lib and .dll files (the exact number
|
||||
depends upon the version of Borland's tools you are using) the .lib and dll
|
||||
files will be in a sub-directory called bcb4 or bcb5 depending upon the
|
||||
makefile used. To install the libraries into your development system use:</P>
|
||||
<P>make -fbcb5.mak install</P>
|
||||
<P>library files will be copied to <BCROOT>/lib and the dll's to
|
||||
<BCROOT>/bin, where <BCROOT> corresponds to the install path of
|
||||
your Borland C++ tools.
|
||||
</P>
|
||||
<P>You may also remove temporary files created during the build process (excluding
|
||||
lib and dll files) by using:</P>
|
||||
<P>make -fbcb5.mak clean</P>
|
||||
<P>Finally when you use regex++ it is only necessary for you to add the
|
||||
<boost> root director to your list of include directories for that
|
||||
project. It is not necessary for you to manually add a .lib file to the
|
||||
project; the headers will automatically select the correct .lib file for your
|
||||
build mode and tell the linker to include it. There is one caveat however: the
|
||||
library can not tell the difference between VCL and non-VCL enabled builds when
|
||||
building a GUI application from the command line, if you build from the command
|
||||
line with the 5.5 command line tools then you must define the pre-processor
|
||||
symbol _NO_VCL in order to ensure that the correct link libraries are selected:
|
||||
the C++ Builder IDE normally sets this automatically. Hint, users of the 5.5
|
||||
command line tools may want to add a -D_NO_VCL to bcc32.cfg in order to set
|
||||
this option permanently.
|
||||
</P>
|
||||
<P>If you would prefer to do a static link to the regex libraries even when using
|
||||
the dll runtime then define BOOST_REGEX_STATIC_LINK, and if you want to
|
||||
suppress automatic linking altogether (and supply your own custom build of the
|
||||
lib) then define BOOST_REGEX_NO_LIB.</P>
|
||||
<P>If you are building with C++ Builder 6, you will find that
|
||||
<boost/regex.hpp> can not be used in a pre-compiled header (the actual
|
||||
problem is in <locale> which gets included by <boost/regex.hpp>),
|
||||
if this causes problems for you, then try defining BOOST_NO_STD_LOCALE when
|
||||
building, this will disable some features throughout boost, but may save you a
|
||||
lot in compile times!</P>
|
||||
<P><B><A name="vc"></A>Microsoft Visual C++ 6</B><STRONG> and 7</STRONG></P>
|
||||
<P>You need version 6 of MSVC to build this library. If you are using VC5 then you
|
||||
may want to look at one of the previous releases of this <A href="http://ourworld.compuserve.com/homepages/john_maddock/regexpp.htm">
|
||||
library</A>
|
||||
</P>
|
||||
<P>Open up a command prompt, which has the necessary MSVC environment variables
|
||||
defined (for example by using the batch file Vcvars32.bat installed by the
|
||||
Visual Studio installation), and change to the <boost>\libs\regex\build
|
||||
directory.
|
||||
</P>
|
||||
<P>Select the correct makefile - vc6.mak for "vanilla" Visual C++ 6 or
|
||||
vc6-stlport.mak if you are using STLPort.</P>
|
||||
<P>Invoke the makefile like this:</P>
|
||||
<P>nmake -fvc6.mak</P>
|
||||
<P>You will now have a collection of lib and dll files in a "vc6" subdirectory, to
|
||||
install these into your development system use:</P>
|
||||
<P>nmake -fvc6.mak install</P>
|
||||
<P>The lib files will be copied to your <VC6>\lib directory and the dll
|
||||
files to <VC6>\bin, where <VC6> is the root of your Visual C++ 6
|
||||
installation.</P>
|
||||
<P>You can delete all the temporary files created during the build (excluding lib
|
||||
and dll files) using:</P>
|
||||
<P>nmake -fvc6.mak clean
|
||||
</P>
|
||||
<P>Finally when you use regex++ it is only necessary for you to add the
|
||||
<boost> root directory to your list of include directories for that
|
||||
project. It is not necessary for you to manually add a .lib file to the
|
||||
project; the headers will automatically select the correct .lib file for your
|
||||
build mode and tell the linker to include it.
|
||||
</P>
|
||||
<P>Note that if you want to statically link to the regex library when using the
|
||||
dynamic C++ runtime, define BOOST_REGEX_STATIC_LINK when building your project
|
||||
(this only has an effect for release builds). If you want to add the source
|
||||
directly to your project then define BOOST_REGEX_NO_LIB to disable automatic
|
||||
library selection.</P>
|
||||
<P><STRONG><I>Important</I></STRONG><EM>: there have been some reports of
|
||||
compiler-optimization bugs affecting this library, (particularly with VC6
|
||||
versions prior to service patch 5) the workaround is to build the library using
|
||||
/Oityb1 rather than /O2. That is to use all optimization settings except /Oa.
|
||||
This problem is reported to affect some standard library code as well (in fact
|
||||
I'm not sure if the problem is with the regex code or the underlying standard
|
||||
library), so it's probably worthwhile applying this workaround in normal
|
||||
practice in any case.</EM></P>
|
||||
<P>Note: if you have replaced the C++ standard library that comes with VC6, then
|
||||
when you build the library you must ensure that the environment variables
|
||||
"INCLUDE" and "LIB" have been updated to reflect the include and library paths
|
||||
for the new library - see vcvars32.bat (part of your Visual Studio
|
||||
installation) for more details. Alternatively if STLPort is in c:/stlport then
|
||||
you could use:</P>
|
||||
<P>nmake INCLUDES="-Ic:/stlport/stlport" XLFLAGS="/LIBPATH:c:/stlport/lib"
|
||||
-fvc6-stlport.mak</P>
|
||||
<P>If you are building with the full STLPort v4.x, then use the vc6-stlport.mak
|
||||
file provided and set the environment variable STLPORT_PATH to point to the
|
||||
location of your STLport installation (Note that the full STLPort libraries
|
||||
appear not to support single-thread static builds).
|
||||
<BR>
|
||||
|
||||
<BR>
|
||||
|
||||
</P>
|
||||
<P><B><A name="gcc"></A>GCC(2.95 and 3.x)</B>
|
||||
</P>
|
||||
<P>There is a conservative makefile for the g++ compiler. From the command prompt
|
||||
change to the <boost>/libs/regex/build directory and type:
|
||||
</P>
|
||||
<P>make -fgcc.mak
|
||||
</P>
|
||||
<P>At the end of the build process you should have a gcc sub-directory containing
|
||||
release and debug versions of the library (libboost_regex.a and
|
||||
libboost_regex_debug.a). When you build projects that use regex++, you will
|
||||
need to add the boost install directory to your list of include paths and add
|
||||
<boost>/libs/regex/build/gcc/libboost_regex.a to your list of library
|
||||
files.
|
||||
</P>
|
||||
<P>There is also a makefile to build the library as a shared library:</P>
|
||||
<P>make -fgcc-shared.mak</P>
|
||||
<P>which will build libboost_regex.so and libboost_regex_debug.so.</P>
|
||||
<P>Both of the these makefiles support the following environment variables:</P>
|
||||
<P>CXXFLAGS: extra compiler options - note that this applies to both the debug and
|
||||
release builds.</P>
|
||||
<P>INCLUDES: additional include directories.</P>
|
||||
<P>LDFLAGS: additional linker options.</P>
|
||||
<P>LIBS: additional library files.</P>
|
||||
<P>For the more adventurous there is a configure script in
|
||||
<boost>/libs/config; see the <A href="../config/config.htm">config library
|
||||
documentation</A>.</P>
|
||||
<P><B><A name="sun"></A>Sun Workshop 6.1</B></P>
|
||||
<P>There is a makefile for the sun (6.1) compiler (C++ version 3.12). From the
|
||||
command prompt change to the <boost>/libs/regex/build directory and type:
|
||||
</P>
|
||||
<P>dmake -f sunpro.mak
|
||||
</P>
|
||||
<P>At the end of the build process you should have a sunpro sub-directory
|
||||
containing single and multithread versions of the library (libboost_regex.a,
|
||||
libboost_regex.so, libboost_regex_mt.a and libboost_regex_mt.so). When you
|
||||
build projects that use regex++, you will need to add the boost install
|
||||
directory to your list of include paths and add
|
||||
<boost>/libs/regex/build/sunpro/ to your library search path.
|
||||
</P>
|
||||
<P>Both of the these makefiles support the following environment variables:</P>
|
||||
<P>CXXFLAGS: extra compiler options - note that this applies to both the single
|
||||
and multithreaded builds.</P>
|
||||
<P>INCLUDES: additional include directories.</P>
|
||||
<P>LDFLAGS: additional linker options.</P>
|
||||
<P>LIBS: additional library files.</P>
|
||||
<P>LIBSUFFIX: a suffix to mangle the library name with (defaults to nothing).</P>
|
||||
<P>This makefile does not set any architecture specific options like -xarch=v9,
|
||||
you can set these by defining the appropriate macros, for example:</P>
|
||||
<P>dmake CXXFLAGS="-xarch=v9" LDFLAGS="-xarch=v9" LIBSUFFIX="_v9" -f sunpro.mak</P>
|
||||
<P>will build v9 variants of the regex library named libboost_regex_v9.a etc.</P>
|
||||
<P><B><A name="other"></A>Other compilers:</B>
|
||||
</P>
|
||||
<P>There is a generic makefile (<A href="build/generic.mak">generic.mak</A>)
|
||||
provided in <boost-root>/libs/regex/build - see that makefile for details
|
||||
of environment variables that need to be set before use. Alternatively you can
|
||||
using the <A href="../../tools/build/index.html">Jam based build system</A>. If
|
||||
you need to configure the library for your platform, then refer to the <A href="../config/config.htm">
|
||||
config library documentation</A>
|
||||
.
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
176
doc/introduction.html
Normal file
176
doc/introduction.html
Normal file
@ -0,0 +1,176 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Introduction</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Introduction</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>Regular expressions are a form of pattern-matching that are often used in text
|
||||
processing; many users will be familiar with the Unix utilities <I>grep</I>, <I>sed</I>
|
||||
and <I>awk</I>, and the programming language <I>Perl</I>, each of which make
|
||||
extensive use of regular expressions. Traditionally C++ users have been limited
|
||||
to the POSIX C API's for manipulating regular expressions, and while regex++
|
||||
does provide these API's, they do not represent the best way to use the
|
||||
library. For example regex++ can cope with wide character strings, or search
|
||||
and replace operations (in a manner analogous to either sed or Perl), something
|
||||
that traditional C libraries can not do.</P>
|
||||
<P>The class <A href="basic_regex.html">boost::basic_regex</A> is the key class in
|
||||
this library; it represents a "machine readable" regular expression, and is
|
||||
very closely modeled on std::basic_string, think of it as a string plus the
|
||||
actual state-machine required by the regular expression algorithms. Like
|
||||
std::basic_string there are two typedefs that are almost always the means by
|
||||
which this class is referenced:</P>
|
||||
<pre><B>namespace </B>boost{
|
||||
|
||||
<B>template</B> <<B>class</B> charT,
|
||||
<B> class</B> traits = regex_traits<charT>,
|
||||
<B>class</B> Allocator = std::allocator<charT> >
|
||||
<B>class</B> basic_regex;
|
||||
|
||||
<B>typedef</B> basic_regex<<B>char</B>> regex;
|
||||
<B>typedef</B> basic_regex<<B>wchar_t></B> wregex;
|
||||
|
||||
}</pre>
|
||||
<P>To see how this library can be used, imagine that we are writing a credit card
|
||||
processing application. Credit card numbers generally come as a string of
|
||||
16-digits, separated into groups of 4-digits, and separated by either a space
|
||||
or a hyphen. Before storing a credit card number in a database (not necessarily
|
||||
something your customers will appreciate!), we may want to verify that the
|
||||
number is in the correct format. To match any digit we could use the regular
|
||||
expression [0-9], however ranges of characters like this are actually locale
|
||||
dependent. Instead we should use the POSIX standard form [[:digit:]], or the
|
||||
regex++ and Perl shorthand for this \d (note that many older libraries tended
|
||||
to be hard-coded to the C-locale, consequently this was not an issue for them).
|
||||
That leaves us with the following regular expression to validate credit card
|
||||
number formats:</P>
|
||||
<P>(\d{4}[- ]){3}\d{4}</P>
|
||||
<P>Here the parenthesis act to group (and mark for future reference)
|
||||
sub-expressions, and the {4} means "repeat exactly 4 times". This is an example
|
||||
of the extended regular expression syntax used by Perl, awk and egrep. Regex++
|
||||
also supports the older "basic" syntax used by sed and grep, but this is
|
||||
generally less useful, unless you already have some basic regular expressions
|
||||
that you need to reuse.</P>
|
||||
<P>Now let's take that expression and place it in some C++ code to validate the
|
||||
format of a credit card number:</P>
|
||||
<PRE><B>bool</B> validate_card_format(<B>const</B> std::string s)
|
||||
{
|
||||
<B>static</B> <B>const</B> <A href="basic_regex.html">boost::regex</A> e("(\\d{4}[- ]){3}\\d{4}");
|
||||
<B>return</B> <A href="regex_match.html">regex_match</A>(s, e);
|
||||
}</PRE>
|
||||
<P>Note how we had to add some extra escapes to the expression: remember that the
|
||||
escape is seen once by the C++ compiler, before it gets to be seen by the
|
||||
regular expression engine, consequently escapes in regular expressions have to
|
||||
be doubled up when embedding them in C/C++ code. Also note that all the
|
||||
examples assume that your compiler supports Koenig lookup, if yours doesn't
|
||||
(for example VC6), then you will have to add some boost:: prefixes to some of
|
||||
the function calls in the examples.</P>
|
||||
<P>Those of you who are familiar with credit card processing, will have realized
|
||||
that while the format used above is suitable for human readable card numbers,
|
||||
it does not represent the format required by online credit card systems; these
|
||||
require the number as a string of 16 (or possibly 15) digits, without any
|
||||
intervening spaces. What we need is a means to convert easily between the two
|
||||
formats, and this is where search and replace comes in. Those who are familiar
|
||||
with the utilities <I>sed</I> and <I>Perl</I> will already be ahead here; we
|
||||
need two strings - one a regular expression - the other a "<A href="format_syntax.html">format
|
||||
string</A>" that provides a description of the text to replace the match
|
||||
with. In regex++ this search and replace operation is performed with the
|
||||
algorithm regex_replace, for our credit card example we can write two algorithms
|
||||
like this to provide the format conversions:</P>
|
||||
<PRE><I>// match any format with the regular expression:
|
||||
</I><B>const</B> boost::regex e("\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z");
|
||||
<B>const</B> std::string machine_format("\\1\\2\\3\\4");
|
||||
<B>const</B> std::string human_format("\\1-\\2-\\3-\\4");
|
||||
|
||||
std::string machine_readable_card_number(<B>const</B> std::string s)
|
||||
{
|
||||
<B>return</B> <A href="regex_replace.html">regex_replace</A>(s, e, machine_format, boost::match_default | boost::format_sed);
|
||||
}
|
||||
|
||||
std::string human_readable_card_number(<B>const</B> std::string s)
|
||||
{
|
||||
<B>return</B> <A href="regex_replace.html">regex_replace</A>(s, e, human_format, boost::match_default | boost::format_sed);
|
||||
}</PRE>
|
||||
<P>Here we've used marked sub-expressions in the regular expression to split out
|
||||
the four parts of the card number as separate fields, the format string then
|
||||
uses the sed-like syntax to replace the matched text with the reformatted
|
||||
version.</P>
|
||||
<P>In the examples above, we haven't directly manipulated the results of a regular
|
||||
expression match, however in general the result of a match contains a number of
|
||||
sub-expression matches in addition to the overall match. When the library needs
|
||||
to report a regular expression match it does so using an instance of the class <A href="match_results.html">
|
||||
match_results</A>, as before there are typedefs of this class for the most
|
||||
common cases:
|
||||
</P>
|
||||
<PRE><B>namespace </B>boost{
|
||||
<B>typedef</B> match_results<<B>const</B> <B>char</B>*> cmatch;
|
||||
<B>typedef</B> match_results<<B>const</B> <B>wchar_t</B>*> wcmatch;
|
||||
<STRONG>typedef</STRONG> match_results<std::string::const_iterator> smatch;
|
||||
<STRONG>typedef</STRONG> match_results<std::wstring::const_iterator> wsmatch;
|
||||
}</PRE>
|
||||
<P>The algorithms <A href="regex_search.html">regex_search</A> and <A href="regex_grep.html">
|
||||
regex_grep</A> (i.e. finding all matches in a string) make use of
|
||||
match_results to report what matched.</P>
|
||||
<P>Note that these algorithms are not restricted to searching regular C-strings,
|
||||
any bidirectional iterator type can be searched, allowing for the possibility
|
||||
of seamlessly searching almost any kind of data.
|
||||
</P>
|
||||
<P>For search and replace operations in addition to the algorithm <A href="regex_replace.html">
|
||||
regex_replace</A> that we have already seen, the algorithm <A href="regex_format.html">
|
||||
regex_format</A> takes the result of a match and a format string, and
|
||||
produces a new string by merging the two.</P>
|
||||
<P>For those that dislike templates, there is a high level wrapper class RegEx
|
||||
that is an encapsulation of the lower level template code - it provides a
|
||||
simplified interface for those that don't need the full power of the library,
|
||||
and supports only narrow characters, and the "extended" regular expression
|
||||
syntax.
|
||||
</P>
|
||||
<P>The <A href="posix_api.html">POSIX API</A> functions: regcomp, regexec, regfree
|
||||
and regerror, are available in both narrow character and Unicode versions, and
|
||||
are provided for those who need compatibility with these API's.
|
||||
</P>
|
||||
<P>Finally, note that the library now has run-time <A href="localisation.html">localization</A>
|
||||
support, and recognizes the full POSIX regular expression syntax - including
|
||||
advanced features like multi-character collating elements and equivalence
|
||||
classes - as well as providing compatibility with other regular expression
|
||||
libraries including GNU and BSD4 regex packages, and to a more limited extent
|
||||
Perl 5.
|
||||
</P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
1032
doc/localisation.html
Normal file
1032
doc/localisation.html
Normal file
File diff suppressed because it is too large
Load Diff
330
doc/match_flag_type.html
Normal file
330
doc/match_flag_type.html
Normal file
@ -0,0 +1,330 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: match_flag_type</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">match_flag_type</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<h3>Synopsis</h3>
|
||||
|
||||
<p>The type <code>match_flag_type</code> is an implementation
|
||||
defined bitmask type (17.3.2.1.2) that controls how a regular
|
||||
expression is matched against a character sequence.</p>
|
||||
|
||||
<pre>
|
||||
namespace std{ namespace regex_constants{
|
||||
|
||||
typedef bitmask_type match_flag_type;
|
||||
|
||||
static const match_flag_type match_default = 0;
|
||||
static const match_flag_type match_not_bob;
|
||||
static const match_flag_type match_not_eob;
|
||||
static const match_flag_type match_not_bol;
|
||||
static const match_flag_type match_not_eol;
|
||||
static const match_flag_type match_not_bow;
|
||||
static const match_flag_type match_not_eow;
|
||||
static const match_flag_type match_any;
|
||||
static const match_flag_type match_not_null;
|
||||
static const match_flag_type match_continuous;
|
||||
static const match_flag_type match_partial;
|
||||
static const match_flag_type match_prev_avail;
|
||||
static const match_flag_type match_not_dot_newline;
|
||||
static const match_flag_type match_not_dot_null;
|
||||
|
||||
static const match_flag_type format_default = 0;
|
||||
static const match_flag_type format_sed;
|
||||
static const match_flag_type format_perl;
|
||||
static const match_flag_type format_no_copy;
|
||||
static const match_flag_type format_first_only;
|
||||
static const match_flag_type format_all;
|
||||
|
||||
} // namespace regex_constants
|
||||
} // namespace std
|
||||
</pre>
|
||||
|
||||
<h3>Description</h3>
|
||||
|
||||
<p>The type <code>match_flag_type</code> is an implementation
|
||||
defined bitmask type (17.3.2.1.2). When matching a regular
|
||||
expression against a sequence of characters [first, last) then
|
||||
setting its elements has the effects listed in the table below:</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table id="Table2" cellspacing="1" cellpadding="7" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>Element</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Effect if set</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_default</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that matching of regular expressions proceeds without
|
||||
any modification of the normal rules used in ECMA-262, ECMAScript
|
||||
Language Specification, Chapter 15 part 10, RegExp (Regular
|
||||
Expression) Objects (FWD.1)</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">match_not_bob</td>
|
||||
<td valign="top" width="50%">Specifies that the expression "\A"
|
||||
should not match against the sub-sequence [first,first).</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">match_not_eob</td>
|
||||
<td valign="top" width="50%">Specifies that the expressions "\z"
|
||||
and "\Z" should not match against the sub-sequence
|
||||
[last,last).</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_not_bol</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that the expression "^" should not be matched against
|
||||
the sub-sequence [first,first).</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_not_eol</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that the expression "$" should not be matched against
|
||||
the sub-sequence [last,last).</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_not_bow</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that the expression "\b" should not be matched against
|
||||
the sub-sequence [first,first).</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_not_eow</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that the expression "\b" should not be matched against
|
||||
the sub-sequence [last,last).</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_any</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that if more than one match is possible then any match
|
||||
is an acceptable result.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_not_null</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that the expression can not be matched against an
|
||||
empty sequence.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_continuous</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that the expression must match a sub-sequence that
|
||||
begins at <i>first</i>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_partial</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that if no match can be found, then it is acceptable
|
||||
to return a match [from, last) where from!=last, if there exists
|
||||
some sequence of characters [from,to) of which [from,last) is a
|
||||
prefix, and which would result in a full match.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>match_prev_avail</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that <code>--first</code> is a valid iterator
|
||||
position, when this flag is set then the flags <code>
|
||||
match_not_bol</code> and <code>match_not_bow</code> are ignored by
|
||||
the regular expression algorithms (RE.7) and iterators (RE.8).</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">match_not_dot_newline</td>
|
||||
<td valign="top" width="50%">Specifies that the expression "." does
|
||||
not match a newline character.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">match_not_dot_null</td>
|
||||
<td valign="top" width="50%">Specified that the expression "." does
|
||||
not match a character null '\0'.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>format_default</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that when a regular expression match is to be replaced
|
||||
by a new string, that the new string is constructed using the rules
|
||||
used by the ECMAScript replace function in ECMA-262, ECMAScript
|
||||
Language Specification, Chapter 15 part 5.4.11
|
||||
String.prototype.replace. (FWD.1). In addition during search and
|
||||
replace operations then all non-overlapping occurrences of the
|
||||
regular expression are located and replaced, and sections of the
|
||||
input that did not match the expression, are copied unchanged to
|
||||
the output string.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>format_sed</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that when a regular expression match is to be replaced
|
||||
by a new string, that the new string is constructed using the rules
|
||||
used by the Unix sed utility in IEEE Std 1003.1-2001, Portable
|
||||
Operating SystemInterface (POSIX ), Shells and Utilities..</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>format_perl</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>Specifies that when a regular expression match is to be replaced
|
||||
by a new string, that the new string is constructed using an
|
||||
implementation defined superset of the rules used by the ECMAScript
|
||||
replace function in ECMA-262, ECMAScript Language Specification,
|
||||
Chapter 15 part 5.4.11 String.prototype.replace (FWD.1).</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%" height="32">format_all</td>
|
||||
<td valign="top" width="50%" height="32">Specifies that all syntax
|
||||
extensions are enabled, including conditional
|
||||
(?ddexpression1:expression2) replacements.</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>format_no_copy</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>When specified during a search and replace operation, then
|
||||
sections of the character container sequence being searched that do
|
||||
match the regular expression, are not copied to the output
|
||||
string.</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>format_first_only</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>When specified during a search and replace operation, then only
|
||||
the first occurrence of the regular expression is replaced.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
511
doc/match_results.html
Normal file
511
doc/match_results.html
Normal file
@ -0,0 +1,511 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: class match_results</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">class match_results</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<h3>Contents</h3>
|
||||
|
||||
<dl class="index">
|
||||
<dt><a href="#synopsis">Synopsis</a></dt>
|
||||
|
||||
<dt><a href="#description">Description</a></dt>
|
||||
</dl>
|
||||
|
||||
<h3><a name="synopsis"></a>Synopsis</h3>
|
||||
|
||||
<p>#include <<a href="../../boost/regex.hpp">boost/regex.hpp</a>></p>
|
||||
|
||||
<p>Regular expressions are different from many simple
|
||||
pattern-matching algorithms in that as well as finding an overall
|
||||
match they can also produce sub-expression matches: each
|
||||
sub-expression being delimited in the pattern by a pair of
|
||||
parenthesis (...). There has to be some method for reporting
|
||||
sub-expression matches back to the user: this is achieved this by
|
||||
defining a class <i>match_results</i> that acts as an indexed
|
||||
collection of sub-expression matches, each sub-expression match
|
||||
being contained in an object of type <i><a href="sub_match.html">
|
||||
sub_match</a></i> .</p>
|
||||
|
||||
<p>Template class match_results denotes a collection of character
|
||||
sequences representing the result of a regular expression match.
|
||||
Objects of type match_results are passed to the algorithms <a href="regex_match.html">regex_match</a> and <a href="regex_search">
|
||||
regex_search</a>, and are returned by the iterator <a href="regex_iterator.html">regex_iterator</a> . Storage for the
|
||||
collection is allocated and freed as necessary by the member
|
||||
functions of class match_results.</p>
|
||||
|
||||
<p>The template class match_results conforms to the requirements of
|
||||
a Sequence, as specified in (lib.sequence.reqmts), except that only
|
||||
operations defined for const-qualified Sequences are supported.</p>
|
||||
|
||||
<p>Class template match_results is most commonly used as one of the
|
||||
typedefs cmatch, wcmatch, smatch, or wsmatch:</p>
|
||||
|
||||
<pre>
|
||||
template <class BidirectionalIterator,
|
||||
class Allocator = allocator<sub_match<BidirectionalIterator> >
|
||||
class match_results;
|
||||
|
||||
typedef match_results<const char*> cmatch;
|
||||
typedef match_results<const wchar_t*> wcmatch;
|
||||
typedef match_results<string::const_iterator> smatch;
|
||||
typedef match_results<wstring::const_iterator> wsmatch;
|
||||
|
||||
template <class BidirectionalIterator,
|
||||
class Allocator = allocator<sub_match<BidirectionalIterator> >
|
||||
class match_results
|
||||
{
|
||||
public:
|
||||
typedef sub_match<BidirectionalIterator> value_type;
|
||||
typedef const value_type& const_reference;
|
||||
typedef const_reference reference;
|
||||
typedef implementation defined const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type;
|
||||
typedef typename Allocator::size_type size_type;
|
||||
typedef Allocator allocator_type;
|
||||
typedef typename iterator_traits<BidirectionalIterator>::value_type char_type;
|
||||
typedef basic_string<char_type> string_type;
|
||||
|
||||
// construct/copy/destroy:
|
||||
explicit match_results(const Allocator& a = Allocator());
|
||||
match_results(const match_results& m);
|
||||
match_results& operator=(const match_results& m);
|
||||
~match_results();
|
||||
|
||||
// size:
|
||||
size_type size() const;
|
||||
size_type max_size() const;
|
||||
bool empty() const;
|
||||
// element access:
|
||||
difference_type length(int sub = 0) const;
|
||||
difference_type position(unsigned int sub = 0) const;
|
||||
string_type str(int sub = 0) const;
|
||||
const_reference operator[](int n) const;
|
||||
|
||||
const_reference prefix() const;
|
||||
|
||||
const_reference suffix() const;
|
||||
const_iterator begin() const;
|
||||
const_iterator end() const;
|
||||
// format:
|
||||
template <class OutputIterator>
|
||||
OutputIterator format(OutputIterator out,
|
||||
const string_type& fmt,
|
||||
match_flag_type flags = format_default) const;
|
||||
string_type format(const string_type& fmt,
|
||||
match_flag_type flags = format_default) const;
|
||||
|
||||
allocator_type get_allocator() const;
|
||||
void swap(match_results& that);
|
||||
};
|
||||
|
||||
template <class BidirectionalIterator, class Allocator>
|
||||
bool operator == (const match_results<BidirectionalIterator, Allocator>& m1,
|
||||
const match_results<BidirectionalIterator, Allocator>& m2);
|
||||
template <class BidirectionalIterator, class Allocator>
|
||||
bool operator != (const match_results<BidirectionalIterator, Allocator>& m1,
|
||||
const match_results<BidirectionalIterator, Allocator>& m2);
|
||||
|
||||
template <class charT, class traits, class BidirectionalIterator, class Allocator>
|
||||
basic_ostream<charT, traits>&
|
||||
operator << (basic_ostream<charT, traits>& os,
|
||||
const match_results<BidirectionalIterator, Allocator>& m);
|
||||
|
||||
template <class BidirectionalIterator, class Allocator>
|
||||
void swap(match_results<BidirectionalIterator, Allocator>& m1,
|
||||
match_results<BidirectionalIterator, Allocator>& m2);
|
||||
</pre>
|
||||
|
||||
<h3><a name="description"></a>Description</h3>
|
||||
|
||||
<h4>match_results constructors</h4>
|
||||
|
||||
<p>In all <code>match_results</code> constructors, a copy of the
|
||||
Allocator argument is used for any memory allocation performed by
|
||||
the constructor or member functions during the lifetime of the
|
||||
object.</p>
|
||||
|
||||
<pre>
|
||||
match_results(const Allocator& a = Allocator());
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Constructs an object of class match_results. The
|
||||
postconditions of this function are indicated in the table:</p>
|
||||
|
||||
<p align="center"></p>
|
||||
|
||||
<center>
|
||||
<table id="Table2" cellspacing="1" cellpadding="7" width="624"
|
||||
border="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" width="50%"><b></b>
|
||||
<p><b>Element</b></p>
|
||||
</td>
|
||||
<td valign="top" width="50%"><b></b>
|
||||
<p><b>Value</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>empty()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>true</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>size()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>0</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>str()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>basic_string<charT>()</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<pre>
|
||||
match_results(const match_results& m);
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Constructs an object of class match_results, as
|
||||
a copy of m.</p>
|
||||
|
||||
<pre>
|
||||
match_results& operator=(const match_results& m);
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Assigns m to *this. The postconditions of this
|
||||
function are indicated in the table:</p>
|
||||
|
||||
<p align="center"></p>
|
||||
|
||||
<center>
|
||||
<table id="Table3" cellspacing="1" cellpadding="7" width="624"
|
||||
border="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" width="50%"><b></b>
|
||||
<p><b>Element</b></p>
|
||||
</td>
|
||||
<td valign="top" width="50%"><b></b>
|
||||
<p><b>Value</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>empty()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.empty().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>size()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.size().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>str(n)</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.str(n) for all integers n < m.size().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>prefix()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.prefix().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>suffix()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.suffix().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*this)[n]</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m[n] for all integers n < m.size().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>length(n)</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.length(n) for all integers n < m.size().</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>position(n)</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>m.position(n) for all integers n < m.size().</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<h4>match_results size</h4>
|
||||
|
||||
<pre>
|
||||
size_type size()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns the number of sub_match elements stored
|
||||
in *this.</p>
|
||||
|
||||
<pre>
|
||||
size_type max_size()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns the maximum number of sub_match elements
|
||||
that can be stored in *this.</p>
|
||||
|
||||
<pre>
|
||||
bool empty()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns <code>size() == 0</code>.</p>
|
||||
|
||||
<h4>match_results element access</h4>
|
||||
|
||||
<pre>
|
||||
difference_type length(int sub = 0)const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns <code>(*this)[sub].length()</code>.</p>
|
||||
|
||||
<pre>
|
||||
difference_type position(unsigned int sub = 0)const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns <code>std::distance(prefix().first,
|
||||
(*this)[sub].first).</code></p>
|
||||
|
||||
<pre>
|
||||
string_type str(int sub = 0)const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns <code>
|
||||
string_type((*this)[sub]).</code></p>
|
||||
|
||||
<pre>
|
||||
const_reference operator[](int n) const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a reference to the <code>
|
||||
sub_match</code> object representing the character sequence that
|
||||
matched marked sub-expression <i>n</i>. If <code>n == 0</code> then
|
||||
returns a reference to a <code>sub_match</code> object representing
|
||||
the character sequence that matched the whole regular
|
||||
expression.</p>
|
||||
|
||||
<pre>
|
||||
const_reference prefix()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a reference to the <code>
|
||||
sub_match</code> object representing the character sequence from
|
||||
the start of the string being matched/searched, to the start of the
|
||||
match found.</p>
|
||||
|
||||
<pre>
|
||||
const_reference suffix()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a reference to the <code>
|
||||
sub_match</code> object representing the character sequence from
|
||||
the end of the match found to the end of the string being
|
||||
matched/searched.</p>
|
||||
|
||||
<pre>
|
||||
const_iterator begin()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a starting iterator that enumerates over
|
||||
all the marked sub-expression matches stored in *this.</p>
|
||||
|
||||
<pre>
|
||||
const_iterator end()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a terminating iterator that enumerates
|
||||
over all the marked sub-expression matches stored in *this.</p>
|
||||
|
||||
<h4>match_results reformatting</h4>
|
||||
|
||||
<pre>
|
||||
template <class OutputIterator>
|
||||
OutputIterator format(OutputIterator out,
|
||||
const string_type& fmt,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = format_default);
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Requires:</b> The type OutputIterator conforms to the Output
|
||||
Iterator requirements (24.1.2).</p>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Copies the character sequence <i>[fmt.begin(),
|
||||
fmt.end())</i> to OutputIterator <i>out</i>. For each format
|
||||
specifier or escape sequence in <i>fmt</i>, replace that sequence
|
||||
with either the character(s) it represents, or the sequence of
|
||||
characters within *this to which it refers. The bitmasks specified
|
||||
in <i><a href="match_flag_type.html">flags</a></i> determines what
|
||||
<a href="format_syntax.html">format specifiers or escape sequences
|
||||
are recognized</a>, by default this is the format used by ECMA-262,
|
||||
ECMAScript Language Specification, Chapter 15 part 5.4.11
|
||||
String.prototype.replace.</p>
|
||||
|
||||
<b></b>
|
||||
<p><b>Returns:</b> <i>out</i>.</p>
|
||||
|
||||
<pre>
|
||||
string_type format(const string_type& fmt,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = format_default);
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a copy of the string <i>fmt</i>. For
|
||||
each format specifier or escape sequence in <i>fmt</i>, replace
|
||||
that sequence with either the character(s) it represents, or the
|
||||
sequence of characters within *this to which it refers. The
|
||||
bitmasks specified in <i><a href="match_flag_type.html">
|
||||
flags</a></i> determines what <a href="format_syntax.html">format
|
||||
specifiers or escape sequences are recognized</a>, by default this
|
||||
is the format used by ECMA-262, ECMAScript Language Specification,
|
||||
Chapter 15 part 5.4.11 String.prototype.replace.</p>
|
||||
|
||||
<pre>
|
||||
allocator_type get_allocator()const;
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Returns a copy of the Allocator that was passed
|
||||
to the object's constructor.</p>
|
||||
|
||||
<pre>
|
||||
void swap(match_results& that);
|
||||
</pre>
|
||||
|
||||
<b></b>
|
||||
<p><b>Effects:</b> Swaps the contents of the two sequences.</p>
|
||||
|
||||
<b></b>
|
||||
<p><b>Postcondition:</b> <code>*this</code> contains the sequence
|
||||
of matched sub-expressions that were in <code>that</code>, <code>
|
||||
that</code> contains the sequence of matched sub-expressions that
|
||||
were in <code>*this</code>.</p>
|
||||
|
||||
<b></b>
|
||||
<p><b>Complexity:</b> constant time.</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
185
doc/partial_matches.html
Normal file
185
doc/partial_matches.html
Normal file
@ -0,0 +1,185 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Partial Matches</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Partial Matches</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>The <A href="match_flag_type.html">match-flag</A> <CODE>match_partial</CODE> can
|
||||
be passed to the following algorithms: <A href="regex_match.html">regex_match</A>,
|
||||
<A href="regex_search.html">regex_search</A>, and <A href="regex_grep.html">regex_grep</A>.
|
||||
When used it indicates that partial as well as full matches should be found. A
|
||||
partial match is one that matched one or more characters at the end of the text
|
||||
input, but did not match all of the regular expression (although it may have
|
||||
done so had more input been available). Partial matches are typically used when
|
||||
either validating data input (checking each character as it is entered on the
|
||||
keyboard), or when searching texts that are either too long to load into memory
|
||||
(or even into a memory mapped file), or are of indeterminate length (for
|
||||
example the source may be a socket or similar). Partial and full matches can be
|
||||
differentiated as shown in the following table (the variable M represents an
|
||||
instance of <A href="match_results.html">match_results<></A> as filled in
|
||||
by regex_match, regex_search or regex_grep):<BR>
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table2" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD vAlign="top" width="20%"> </TD>
|
||||
<TD vAlign="top" width="20%">Result</TD>
|
||||
<TD vAlign="top" width="20%">M[0].matched</TD>
|
||||
<TD vAlign="top" width="20%">M[0].first</TD>
|
||||
<TD vAlign="top" width="20%">M[0].second</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="20%">No match</TD>
|
||||
<TD vAlign="top" width="20%">False</TD>
|
||||
<TD vAlign="top" width="20%">Undefined</TD>
|
||||
<TD vAlign="top" width="20%">Undefined</TD>
|
||||
<TD vAlign="top" width="20%">Undefined</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="20%">Partial match</TD>
|
||||
<TD vAlign="top" width="20%">True</TD>
|
||||
<TD vAlign="top" width="20%">False</TD>
|
||||
<TD vAlign="top" width="20%">Start of partial match.</TD>
|
||||
<TD vAlign="top" width="20%">End of partial match (end of text).</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="20%">Full match</TD>
|
||||
<TD vAlign="top" width="20%">True</TD>
|
||||
<TD vAlign="top" width="20%">True</TD>
|
||||
<TD vAlign="top" width="20%">Start of full match.</TD>
|
||||
<TD vAlign="top" width="20%">End of full match.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<P>The following <A href="../example/snippets/partial_regex_match.cpp">example</A>
|
||||
tests to see whether the text could be a valid credit card number, as the user
|
||||
presses a key, the character entered would be added to the string being built
|
||||
up, and passed to <CODE>is_possible_card_number</CODE>. If this returns true
|
||||
then the text could be a valid card number, so the user interface's OK button
|
||||
would be enabled. If it returns false, then this is not yet a valid card
|
||||
number, but could be with more input, so the user interface would disable the
|
||||
OK button. Finally, if the procedure throws an exception the input could never
|
||||
become a valid number, and the inputted character must be discarded, and a
|
||||
suitable error indication displayed to the user.</P>
|
||||
<PRE>#include <string>
|
||||
#include <iostream>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
boost::regex e("(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})");
|
||||
|
||||
bool is_possible_card_number(const std::string& input)
|
||||
{
|
||||
//
|
||||
// return false for partial match, true for full match, or throw for
|
||||
// impossible match based on what we have so far...
|
||||
boost::match_results<std::string::const_iterator> what;
|
||||
if(0 == boost::regex_match(input, what, e, boost::match_default | boost::match_partial))
|
||||
{
|
||||
// the input so far could not possibly be valid so reject it:
|
||||
throw std::runtime_error("Invalid data entered - this could not possibly be a valid card number");
|
||||
}
|
||||
// OK so far so good, but have we finished?
|
||||
if(what[0].matched)
|
||||
{
|
||||
// excellent, we have a result:
|
||||
return true;
|
||||
}
|
||||
// what we have so far is only a partial match...
|
||||
return false;
|
||||
}</PRE>
|
||||
<P>In the following <A href="../example/snippets/partial_regex_match.cpp">example</A>,
|
||||
text input is taken from a stream containing an unknown amount of text; this
|
||||
example simply counts the number of html tags encountered in the stream. The
|
||||
text is loaded into a buffer and searched a part at a time, if a partial match
|
||||
was encountered, then the partial match gets searched a second time as the
|
||||
start of the next batch of text:</P>
|
||||
<PRE>#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
// match some kind of html tag:
|
||||
boost::regex e("<[^>]*>");
|
||||
// count how many:
|
||||
unsigned int tags = 0;
|
||||
// saved position of partial match:
|
||||
char* next_pos = 0;
|
||||
|
||||
bool grep_callback(const boost::match_results<char*>& m)
|
||||
{
|
||||
if(m[0].matched == false)
|
||||
{
|
||||
// save position and return:
|
||||
next_pos = m[0].first;
|
||||
}
|
||||
else
|
||||
++tags;
|
||||
return true;
|
||||
}
|
||||
|
||||
void search(std::istream& is)
|
||||
{
|
||||
char buf[4096];
|
||||
next_pos = buf + sizeof(buf);
|
||||
bool have_more = true;
|
||||
while(have_more)
|
||||
{
|
||||
// how much do we copy forward from last try:
|
||||
unsigned leftover = (buf + sizeof(buf)) - next_pos;
|
||||
// and how much is left to fill:
|
||||
unsigned size = next_pos - buf;
|
||||
// copy forward whatever we have left:
|
||||
memcpy(buf, next_pos, leftover);
|
||||
// fill the rest from the stream:
|
||||
unsigned read = is.readsome(buf + leftover, size);
|
||||
// check to see if we've run out of text:
|
||||
have_more = read == size;
|
||||
// reset next_pos:
|
||||
next_pos = buf + sizeof(buf);
|
||||
// and then grep:
|
||||
boost::regex_grep(grep_callback,
|
||||
buf,
|
||||
buf + read + leftover,
|
||||
e,
|
||||
boost::match_default | boost::match_partial);
|
||||
}
|
||||
}</PRE>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
54
doc/performance.html
Normal file
54
doc/performance.html
Normal file
@ -0,0 +1,54 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Performance</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Performance</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>The performance of Boost.regex in both recursive and non-recursive modes should
|
||||
be broadly comparable to other regular expression libraries: recursive mode is
|
||||
slightly faster (especially where memory allocation requires thread
|
||||
synchronisation), but not by much. The following pages compare
|
||||
Boost.regex with various other regular expression libraries for the following
|
||||
compilers:</P>
|
||||
<P><A href="vc71-performance.html">Visual Studio.Net 2003 (recursive Boost.regex
|
||||
implementation)</A>.</P>
|
||||
<P><A href="gcc-performance.html">Gcc 3.2 (cygwin) (non-recursive Boost.regex
|
||||
implementation).</A></P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
288
doc/posix_api.html
Normal file
288
doc/posix_api.html
Normal file
@ -0,0 +1,288 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: POSIX API Compatibility Functions</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">POSIX API Compatibility Functions</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<PRE>#include <boost/cregex.hpp>
|
||||
<I>or</I>:
|
||||
#include <boost/regex.h></PRE>
|
||||
<P>The following functions are available for users who need a POSIX compatible C
|
||||
library, they are available in both Unicode and narrow character versions, the
|
||||
standard POSIX API names are macros that expand to one version or the other
|
||||
depending upon whether UNICODE is defined or not.
|
||||
</P>
|
||||
<P><B>Important</B>: Note that all the symbols defined here are enclosed inside
|
||||
namespace <I>boost</I> when used in C++ programs, unless you use #include
|
||||
<boost/regex.h> instead - in which case the symbols are still defined in
|
||||
namespace boost, but are made available in the global namespace as well.</P>
|
||||
<P>The functions are defined as:
|
||||
</P>
|
||||
<PRE>extern "C" {
|
||||
<B>int</B> regcompA(regex_tA*, <B>const</B> <B>char</B>*, <B>int</B>);
|
||||
<B>unsigned</B> <B>int</B> regerrorA(<B>int</B>, <B>const</B> regex_tA*, <B>char</B>*, <B>unsigned</B> <B>int</B>);
|
||||
<B>int</B> regexecA(<B>const</B> regex_tA*, <B>const</B> <B>char</B>*, <B>unsigned</B> <B>int</B>, regmatch_t*, <B>int</B>);
|
||||
<B>void</B> regfreeA(regex_tA*);
|
||||
|
||||
<B>int</B> regcompW(regex_tW*, <B>const</B> <B>wchar_t</B>*, <B>int</B>);
|
||||
<B>unsigned</B> <B>int</B> regerrorW(<B>int</B>, <B>const</B> regex_tW*, <B>wchar_t</B>*, <B>unsigned</B> <B>int</B>);
|
||||
<B>int</B> regexecW(<B>const</B> regex_tW*, <B>const</B> <B>wchar_t</B>*, <B>unsigned</B> <B>int</B>, regmatch_t*, <B>int</B>);
|
||||
<B>void</B> regfreeW(regex_tW*);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define regcomp regcompW
|
||||
#define regerror regerrorW
|
||||
#define regexec regexecW
|
||||
#define regfree regfreeW
|
||||
#define regex_t regex_tW
|
||||
#else
|
||||
#define regcomp regcompA
|
||||
#define regerror regerrorA
|
||||
#define regexec regexecA
|
||||
#define regfree regfreeA
|
||||
#define regex_t regex_tA
|
||||
#endif
|
||||
}</PRE>
|
||||
<P>All the functions operate on structure <B>regex_t</B>, which exposes two public
|
||||
members:
|
||||
</P>
|
||||
<P><B>unsigned int re_nsub</B> this is filled in by <B>regcomp</B> and indicates
|
||||
the number of sub-expressions contained in the regular expression.
|
||||
</P>
|
||||
<P><B>const TCHAR* re_endp</B> points to the end of the expression to compile when
|
||||
the flag REG_PEND is set.
|
||||
</P>
|
||||
<P><I>Footnote: regex_t is actually a #define - it is either regex_tA or regex_tW
|
||||
depending upon whether UNICODE is defined or not, TCHAR is either char or
|
||||
wchar_t again depending upon the macro UNICODE.</I>
|
||||
</P>
|
||||
<H3>regcomp</H3>
|
||||
<P><B>regcomp</B> takes a pointer to a <B>regex_t</B>, a pointer to the expression
|
||||
to compile and a flags parameter which can be a combination of:
|
||||
<BR>
|
||||
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table2" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_EXTENDED</TD>
|
||||
<TD vAlign="top" width="45%">Compiles modern regular expressions. Equivalent to
|
||||
regbase::char_classes | regbase::intervals | regbase::bk_refs.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_BASIC</TD>
|
||||
<TD vAlign="top" width="45%">Compiles basic (obsolete) regular expression syntax.
|
||||
Equivalent to regbase::char_classes | regbase::intervals | regbase::limited_ops
|
||||
| regbase::bk_braces | regbase::bk_parens | regbase::bk_refs.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_NOSPEC</TD>
|
||||
<TD vAlign="top" width="45%">All characters are ordinary, the expression is a
|
||||
literal string.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_ICASE</TD>
|
||||
<TD vAlign="top" width="45%">Compiles for matching that ignores character case.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_NOSUB</TD>
|
||||
<TD vAlign="top" width="45%">Has no effect in this library.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_NEWLINE</TD>
|
||||
<TD vAlign="top" width="45%">When this flag is set a dot does not match the
|
||||
newline character.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_PEND</TD>
|
||||
<TD vAlign="top" width="45%">When this flag is set the re_endp parameter of the
|
||||
regex_t structure must point to the end of the regular expression to compile.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_NOCOLLATE</TD>
|
||||
<TD vAlign="top" width="45%">When this flag is set then locale dependent collation
|
||||
for character ranges is turned off.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_ESCAPE_IN_LISTS<BR>
|
||||
, , ,
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">When this flag is set, then escape sequences are
|
||||
permitted in bracket expressions (character sets).</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_NEWLINE_ALT </TD>
|
||||
<TD vAlign="top" width="45%">When this flag is set then the newline character is
|
||||
equivalent to the alternation operator |.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_PERL </TD>
|
||||
<TD vAlign="top" width="45%">Compiles Perl like regular expressions.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_AWK</TD>
|
||||
<TD vAlign="top" width="45%">A shortcut for awk-like behavior: REG_EXTENDED |
|
||||
REG_ESCAPE_IN_LISTS</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_GREP</TD>
|
||||
<TD vAlign="top" width="45%">A shortcut for grep like behavior: REG_BASIC |
|
||||
REG_NEWLINE_ALT</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">REG_EGREP</TD>
|
||||
<TD vAlign="top" width="45%"> A shortcut for egrep like behavior:
|
||||
REG_EXTENDED | REG_NEWLINE_ALT</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<H3>regerror</H3>
|
||||
<P>regerror takes the following parameters, it maps an error code to a human
|
||||
readable string:
|
||||
<BR>
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table3" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="50%">int code</TD>
|
||||
<TD vAlign="top" width="50%">The error code.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">const regex_t* e</TD>
|
||||
<TD vAlign="top" width="50%">The regular expression (can be null).</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">char* buf</TD>
|
||||
<TD vAlign="top" width="50%">The buffer to fill in with the error message.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">unsigned int buf_size</TD>
|
||||
<TD vAlign="top" width="50%">The length of buf.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<P>If the error code is OR'ed with REG_ITOA then the message that results is the
|
||||
printable name of the code rather than a message, for example "REG_BADPAT". If
|
||||
the code is REG_ATIO then <B>e</B> must not be null and <B>e->re_pend</B> must
|
||||
point to the printable name of an error code, the return value is then the
|
||||
value of the error code. For any other value of <B>code</B>, the return value
|
||||
is the number of characters in the error message, if the return value is
|
||||
greater than or equal to <B>buf_size</B> then <B>regerror</B> will have to be
|
||||
called again with a larger buffer.</P>
|
||||
<H3>regexec</H3>
|
||||
<P><B>regexec</B> finds the first occurrence of expression <B>e</B> within string <B>buf</B>.
|
||||
If <B>len</B> is non-zero then *<B>m</B> is filled in with what matched the
|
||||
regular expression, <B>m[0]</B> contains what matched the whole string, <B>m[1] </B>
|
||||
the first sub-expression etc, see <B>regmatch_t</B> in the header file
|
||||
declaration for more details. The <B>eflags</B> parameter can be a combination
|
||||
of:
|
||||
<BR>
|
||||
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table4" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="50%">REG_NOTBOL</TD>
|
||||
<TD vAlign="top" width="50%">Parameter <B>buf </B>does not represent the start of
|
||||
a line.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">REG_NOTEOL</TD>
|
||||
<TD vAlign="top" width="50%">Parameter <B>buf</B> does not terminate at the end of
|
||||
a line.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">REG_STARTEND</TD>
|
||||
<TD vAlign="top" width="50%">The string searched starts at buf + pmatch[0].rm_so
|
||||
and ends at buf + pmatch[0].rm_eo.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<H3>regfree</H3>
|
||||
<P>Finally <B>regfree</B> frees all the memory that was allocated by regcomp.
|
||||
</P>
|
||||
<P><I>Footnote: this is an abridged reference to the POSIX API functions, it is
|
||||
provided for compatibility with other libraries, rather than an API to be used
|
||||
in new code (unless you need access from a language other than C++). This
|
||||
version of these functions should also happily coexist with other versions, as
|
||||
the names used are macros that expand to the actual function names.</I>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
84
doc/redistributables.html
Normal file
84
doc/redistributables.html
Normal file
@ -0,0 +1,84 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Redistributables and Library Names</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Redistributables and Library Names</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>If you are using Microsoft or Borland C++ and link to a dll version of the run
|
||||
time library, then you will also link to one of the dll versions of boost.regex.
|
||||
While these dll's are redistributable, there are no "standard" versions, so
|
||||
when installing on the users PC, you should place these in a directory private
|
||||
to your application, and not in the PC's directory path. Note that if you link
|
||||
to a static version of your run time library, then you will also link to a
|
||||
static version of boost.regex and no dll's will need to be distributed. The
|
||||
possible boost.regex dll and library names are computed according to the following
|
||||
formula:<BR>
|
||||
</P>
|
||||
<P></P>
|
||||
<P>"boost_regex_"<BR>
|
||||
+ BOOST_LIB_TOOLSET<BR>
|
||||
+ "_"<BR>
|
||||
+ BOOST_LIB_THREAD_OPT<BR>
|
||||
+ BOOST_LIB_RT_OPT<BR>
|
||||
+ BOOST_LIB_LINK_OPT<BR>
|
||||
+ BOOST_LIB_DEBUG_OPT<BR>
|
||||
<BR>
|
||||
These are defined as:<BR>
|
||||
<BR>
|
||||
BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).<BR>
|
||||
<BR>
|
||||
BOOST_LIB_THREAD_OPT: "s" for single thread builds,<BR>
|
||||
"m" for multithread builds.<BR>
|
||||
<BR>
|
||||
BOOST_LIB_RT_OPT: "s" for static runtime,<BR>
|
||||
"d" for dynamic runtime.<BR>
|
||||
<BR>
|
||||
BOOST_LIB_LINK_OPT: "s" for static link,<BR>
|
||||
"i" for dynamic link.<BR>
|
||||
<BR>
|
||||
BOOST_LIB_DEBUG_OPT: nothing for release builds,<BR>
|
||||
"d" for debug builds,<BR>
|
||||
"dd" for debug-diagnostic builds (_STLP_DEBUG).</P>
|
||||
<P>
|
||||
Note: you can disable automatic library selection by defining the symbol
|
||||
BOOST_REGEX_NO_LIB when compiling, this is useful if you want to statically
|
||||
link even though you're using the dll version of your run time library, or if
|
||||
you need to debug boost.regex.
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
46
doc/reg_expression.html
Normal file
46
doc/reg_expression.html
Normal file
@ -0,0 +1,46 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Class reg_expression (deprecated)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Class reg_expression (deprecated)</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>The use of class template reg_expression is deprecated: use <A href="basic_regex.html">
|
||||
basic_regex</A> instead.</P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
91
doc/regbase.html
Normal file
91
doc/regbase.html
Normal file
@ -0,0 +1,91 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: regbase</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">regbase</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<p>Use of the type <code>boost::regbase</code> is now deprecated,
|
||||
and the type does not form a part of the <a href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
|
||||
regular expression standardization proposal</a>. This type
|
||||
still exists as a base class of <code>boost::basic_regex</code>,
|
||||
and you can still refer to <code>
|
||||
boost::regbase::constant_name</code> in your code, however for
|
||||
maximum portability to other std regex implementations you should
|
||||
instead use either:</p>
|
||||
|
||||
<pre>
|
||||
boost::regex_constants::constant_name
|
||||
</pre>
|
||||
|
||||
<p>or</p>
|
||||
|
||||
<pre>
|
||||
boost::regex::constant_name
|
||||
</pre>
|
||||
|
||||
<p>or</p>
|
||||
|
||||
<pre>
|
||||
boost::wregex::constant_name
|
||||
</pre>
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
620
doc/regex.html
Normal file
620
doc/regex.html
Normal file
@ -0,0 +1,620 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: class RegEx (deprecated)</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">class RegEx (deprecated)</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<p>The high level wrapper class RegEx is now deprecated and does
|
||||
not form a part of the <a href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
|
||||
regular expression standardization proposal</a>. This type
|
||||
still exists, and existing code will continue to compile, however
|
||||
the following documentation is unlikely to be further updated.</p>
|
||||
|
||||
<pre>
|
||||
#include <boost/cregex.hpp>
|
||||
</pre>
|
||||
|
||||
<p>The class RegEx provides a high level simplified interface to
|
||||
the regular expression library, this class only handles narrow
|
||||
character strings, and regular expressions always follow the
|
||||
"normal" syntax - that is the same as the perl / ECMAScript
|
||||
synatx.</p>
|
||||
|
||||
<pre>
|
||||
<b>typedef</b> <b>bool</b> (*GrepCallback)(<b>const</b> RegEx& expression);
|
||||
<b>typedef</b> <b>bool</b> (*GrepFileCallback)(<b>const</b> <b>char</b>* file, <b>const</b> RegEx& expression);
|
||||
<b>typedef</b> <b>bool</b> (*FindFilesCallback)(<b>const</b> <b>char</b>* file);
|
||||
|
||||
<b>class</b> RegEx
|
||||
{
|
||||
<b>public</b>:
|
||||
RegEx();
|
||||
RegEx(<b>const</b> RegEx& o);
|
||||
~RegEx();
|
||||
RegEx(<b>const</b> <b>char</b>* c, <b>bool</b> icase = <b>false</b>);
|
||||
<strong>explicit</strong> RegEx(<b>const</b> std::string& s, <b>bool</b> icase = <b>false</b>);
|
||||
RegEx& <b>operator</b>=(<b>const</b> RegEx& o);
|
||||
RegEx& <b>operator</b>=(<b>const</b> <b>char</b>* p);
|
||||
RegEx& <b>operator</b>=(<b>const</b> std::string& s);
|
||||
<b>unsigned</b> <b>int</b> SetExpression(<b>const</b> <b>char</b>* p, <b>bool</b> icase = <b>false</b>);
|
||||
<b>unsigned</b> <b>int</b> SetExpression(<b>const</b> std::string& s, <b>bool</b> icase = <b>false</b>);
|
||||
std::string Expression()<b>const</b>;
|
||||
<font color="#000080"><i>//
|
||||
</i> <i>// now matching operators:</i>
|
||||
<i>//</i></font>
|
||||
<b>bool</b> Match(<b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>bool</b> Match(<b>const</b> std::string& s, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>bool</b> Search(<b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>bool</b> Search(<b>const</b> std::string& s, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> Grep(GrepCallback cb, <b>const</b> std::string& s, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> Grep(std::vector<std::string>& v, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> Grep(std::vector<std::string>& v, <b>const</b> std::string& s, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> Grep(std::vector<<b>unsigned</b> <b>int</b>>& v, <b>const</b> <b>char</b>* p, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> Grep(std::vector<<b>unsigned</b> <b>int</b>>& v, <b>const</b> std::string& s, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> GrepFiles(GrepFileCallback cb, <b>const</b> std::string& files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback cb, <b>const</b> <b>char</b>* files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
<b>unsigned</b> <b>int</b> FindFiles(FindFilesCallback cb, <b>const</b> std::string& files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
std::string Merge(<b>const</b> std::string& in, <b>const</b> std::string& fmt, <b>bool</b> copy = <b>true</b>, <b>unsigned</b> <b>int</b> flags = match_default);
|
||||
std::string Merge(<b>const</b> char* in, <b>const</b> char* fmt, <b>bool</b> copy = <b>true</b>, <b>unsigned int</b> flags = match_default);
|
||||
<b>unsigned</b> Split(std::vector<std::string>& v, std::string& s, <b>unsigned</b> flags = match_default, <b>unsigned</b> max_count = ~0);
|
||||
<font color="#000080"><i>//
|
||||
</i> <i>// now operators for returning what matched in more detail:
|
||||
</i> <i>//
|
||||
</i></font> <b>unsigned</b> <b>int</b> Position(<b>int</b> i = 0)<b>const</b>;
|
||||
<b>unsigned</b> <b>int</b> Length(<b>int</b> i = 0)<b>const</b>;
|
||||
<strong>bool</strong> Matched(<strong>int</strong> i = 0)<strong>const</strong>;
|
||||
<b>unsigned</b> <b>int</b> Line()<b>const</b>;
|
||||
<b>unsigned int</b> Marks() const;
|
||||
std::string What(<b>int</b> i)<b>const</b>;
|
||||
std::string <b>operator</b>[](<b>int</b> i)<b>const</b> ;
|
||||
|
||||
<strong>static const unsigned int</strong> npos;
|
||||
};
|
||||
</pre>
|
||||
|
||||
<p>Member functions for class RegEx are defined as follows:<br>
|
||||
</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table id="Table2" cellspacing="0" cellpadding="7" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx();</td>
|
||||
<td valign="top" width="42%">Default constructor, constructs an
|
||||
instance of RegEx without any valid expression.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx(<b>const</b> RegEx& o);</td>
|
||||
<td valign="top" width="42%">Copy constructor, all the properties
|
||||
of parameter <i>o</i> are copied.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx(<b>const</b> <b>char</b>* c, <b>
|
||||
bool</b> icase = <b>false</b>);</td>
|
||||
<td valign="top" width="42%">Constructs an instance of RegEx,
|
||||
setting the expression to <i>c</i>, if <i>icase</i> is <i>true</i>
|
||||
then matching is insensitive to case, otherwise it is sensitive to
|
||||
case. Throws <i>bad_expression</i> on failure.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx(<b>const</b> std::string& s,
|
||||
<b>bool</b> icase = <b>false</b>);</td>
|
||||
<td valign="top" width="42%">Constructs an instance of RegEx,
|
||||
setting the expression to <i>s</i>, if <i>icase</i> is <i>true</i>
|
||||
then matching is insensitive to case, otherwise it is sensitive to
|
||||
case. Throws <i>bad_expression</i> on failure.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx& <b>
|
||||
operator</b>=(<b>const</b> RegEx& o);</td>
|
||||
<td valign="top" width="42%">Default assignment operator.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx& <b>
|
||||
operator</b>=(<b>const</b> <b>char</b>* p);</td>
|
||||
<td valign="top" width="42%">Assignment operator, equivalent to
|
||||
calling <i>SetExpression(p, false).</i> Throws <i>
|
||||
bad_expression</i> on failure.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">RegEx& <b>
|
||||
operator</b>=(<b>const</b> std::string& s);</td>
|
||||
<td valign="top" width="42%">Assignment operator, equivalent to
|
||||
calling <i>SetExpression(s, false).</i> Throws <i>
|
||||
bad_expression</i> on failure.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
SetExpression(<b>constchar</b>* p, <b>bool</b> icase = <b>
|
||||
false</b>);</td>
|
||||
<td valign="top" width="42%">Sets the current expression to <i>
|
||||
p</i>, if <i>icase</i> is <i>true</i> then matching is insensitive
|
||||
to case, otherwise it is sensitive to case. Throws <i>
|
||||
bad_expression</i> on failure.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
SetExpression(<b>const</b> std::string& s, <b>bool</b> icase =
|
||||
<b>false</b>);</td>
|
||||
<td valign="top" width="42%">Sets the current expression to <i>
|
||||
s</i>, if <i>icase</i> is <i>true</i> then matching is insensitive
|
||||
to case, otherwise it is sensitive to case. Throws <i>
|
||||
bad_expression</i> on failure.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">std::string
|
||||
Expression()<b>const</b>;</td>
|
||||
<td valign="top" width="42%">Returns a copy of the current regular
|
||||
expression.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>bool</b> Match(<b>const</b> <b>
|
||||
char</b>* p, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Attempts to match the current
|
||||
expression against the text <i>p</i> using the match flags <i>
|
||||
flags</i> - see <a href="match_flag_type.html">match flags</a>.
|
||||
Returns <i>true</i> if the expression matches the whole of the
|
||||
input string.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>bool</b> Match(<b>const</b>
|
||||
std::string& s, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default) ;</td>
|
||||
<td valign="top" width="42%">Attempts to match the current
|
||||
expression against the text <i>s</i> using the match flags <i>
|
||||
flags</i> - see <a href="match_flag_type.html">match flags</a>.
|
||||
Returns <i>true</i> if the expression matches the whole of the
|
||||
input string.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>bool</b> Search(<b>const</b> <b>
|
||||
char</b>* p, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Attempts to find a match for the
|
||||
current expression somewhere in the text <i>p</i> using the match
|
||||
flags <i>flags</i> - see <a href="match_flag_type.html">match
|
||||
flags</a>. Returns <i>true</i> if the match succeeds.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>bool</b> Search(<b>const</b>
|
||||
std::string& s, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default) ;</td>
|
||||
<td valign="top" width="42%">Attempts to find a match for the
|
||||
current expression somewhere in the text <i>s</i> using the match
|
||||
flags <i>flags</i> - see <a href="match_flag_type.html">match
|
||||
flags</a>. Returns <i>true</i> if the match succeeds.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Grep(GrepCallback cb, <b>const</b> <b>char</b>* p, <b>unsigned</b>
|
||||
<b>int</b> flags = match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the text <i>p</i> using the match flags <i>flags</i>
|
||||
- see <a href="match_flag_type.html">match flags</a>. For each
|
||||
match found calls the call-back function <i>cb</i> as: cb(*this);
|
||||
|
||||
<p>If at any stage the call-back function returns false then the
|
||||
grep operation terminates, otherwise continues until no further
|
||||
matches are found. Returns the number of matches found.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Grep(GrepCallback cb, <b>const</b> std::string& s, <b>
|
||||
unsigned</b> <b>int</b> flags = match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the text <i>s</i> using the match flags <i>flags</i>
|
||||
- see <a href="match_flag_type.html">match flags</a>. For each
|
||||
match found calls the call-back function <i>cb</i> as: cb(*this);
|
||||
|
||||
<p>If at any stage the call-back function returns false then the
|
||||
grep operation terminates, otherwise continues until no further
|
||||
matches are found. Returns the number of matches found.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Grep(std::vector<std::string>& v, <b>const</b> <b>
|
||||
char</b>* p, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the text <i>p</i> using the match flags <i>flags</i>
|
||||
- see <a href="match_flag_type.html">match flags</a>. For each
|
||||
match pushes a copy of what matched onto <i>v</i>. Returns the
|
||||
number of matches found.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Grep(std::vector<std::string>& v, <b>const</b>
|
||||
std::string& s, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the text <i>s</i> using the match flags <i>flags</i>
|
||||
- see <a href="match_flag_type.html">match flags</a>. For each
|
||||
match pushes a copy of what matched onto <i>v</i>. Returns the
|
||||
number of matches found.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Grep(std::vector<<b>unsigned int</b>>& v, <b>const</b>
|
||||
<b>char</b>* p, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the text <i>p</i> using the match flags <i>flags</i>
|
||||
- see <a href="match_flag_type.html">match flags</a>. For each
|
||||
match pushes the starting index of what matched onto <i>v</i>.
|
||||
Returns the number of matches found.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Grep(std::vector<<b>unsigned int</b>>& v, <b>const</b>
|
||||
std::string& s, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the text <i>s</i> using the match flags <i>flags</i>
|
||||
- see <a href="match_flag_type.html">match flags</a>. For each
|
||||
match pushes the starting index of what matched onto <i>v</i>.
|
||||
Returns the number of matches found.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
GrepFiles(GrepFileCallback cb, <b>const</b> <b>char</b>* files, <b>
|
||||
bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the files <i>files</i> using the match flags <i>
|
||||
flags</i> - see <a href="match_flag_type.html">match flags</a>. For
|
||||
each match calls the call-back function cb.
|
||||
|
||||
<p>If the call-back returns false then the algorithm returns
|
||||
without considering further matches in the current file, or any
|
||||
further files. </p>
|
||||
|
||||
<p>The parameter <i>files</i> can include wild card characters '*'
|
||||
and '?', if the parameter <i>recurse</i> is true then searches
|
||||
sub-directories for matching file names. </p>
|
||||
|
||||
<p>Returns the total number of matches found.</p>
|
||||
|
||||
<p>May throw an exception derived from std::runtime_error if file
|
||||
io fails.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
GrepFiles(GrepFileCallback cb, <b>const</b> std::string& files,
|
||||
<b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b>
|
||||
flags = match_default);</td>
|
||||
<td valign="top" width="42%">Finds all matches of the current
|
||||
expression in the files <i>files</i> using the match flags <i>
|
||||
flags</i> - see <a href="match_flag_type.html">match flags</a>. For
|
||||
each match calls the call-back function cb.
|
||||
|
||||
<p>If the call-back returns false then the algorithm returns
|
||||
without considering further matches in the current file, or any
|
||||
further files. </p>
|
||||
|
||||
<p>The parameter <i>files</i> can include wild card characters '*'
|
||||
and '?', if the parameter <i>recurse</i> is true then searches
|
||||
sub-directories for matching file names. </p>
|
||||
|
||||
<p>Returns the total number of matches found.</p>
|
||||
|
||||
<p>May throw an exception derived from std::runtime_error if file
|
||||
io fails.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
FindFiles(FindFilesCallback cb, <b>const</b> <b>char</b>* files,
|
||||
<b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>int</b>
|
||||
flags = match_default);</td>
|
||||
<td valign="top" width="42%">Searches <i>files</i> to find all
|
||||
those which contain at least one match of the current expression
|
||||
using the match flags <i>flags</i> - see <a href="match_flag_type.html">match flags</a>. For each matching file
|
||||
calls the call-back function cb.
|
||||
|
||||
<p>If the call-back returns false then the algorithm returns
|
||||
without considering any further files. </p>
|
||||
|
||||
<p>The parameter <i>files</i> can include wild card characters '*'
|
||||
and '?', if the parameter <i>recurse</i> is true then searches
|
||||
sub-directories for matching file names. </p>
|
||||
|
||||
<p>Returns the total number of files found.</p>
|
||||
|
||||
<p>May throw an exception derived from std::runtime_error if file
|
||||
io fails.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
FindFiles(FindFilesCallback cb, <b>const</b> std::string&
|
||||
files, <b>bool</b> recurse = <b>false</b>, <b>unsigned</b> <b>
|
||||
int</b> flags = match_default);</td>
|
||||
<td valign="top" width="42%">Searches <i>files</i> to find all
|
||||
those which contain at least one match of the current expression
|
||||
using the match flags <i>flags</i> - see <a href="match_flag_type.html">match flags</a>. For each matching file
|
||||
calls the call-back function cb.
|
||||
|
||||
<p>If the call-back returns false then the algorithm returns
|
||||
without considering any further files. </p>
|
||||
|
||||
<p>The parameter <i>files</i> can include wild card characters '*'
|
||||
and '?', if the parameter <i>recurse</i> is true then searches
|
||||
sub-directories for matching file names. </p>
|
||||
|
||||
<p>Returns the total number of files found.</p>
|
||||
|
||||
<p>May throw an exception derived from std::runtime_error if file
|
||||
io fails.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">std::string Merge(<b>const</b>
|
||||
std::string& in, <b>const</b> std::string& fmt, <b>bool</b>
|
||||
copy = <b>true</b>, <b>unsigned</b> <b>int</b> flags =
|
||||
match_default);</td>
|
||||
<td valign="top" width="42%">Performs a search and replace
|
||||
operation: searches through the string <i>in</i> for all
|
||||
occurrences of the current expression, for each occurrence replaces
|
||||
the match with the format string <i>fmt</i>. Uses <i>flags</i> to
|
||||
determine what gets matched, and how the format string should be
|
||||
treated. If <i>copy</i> is true then all unmatched sections of
|
||||
input are copied unchanged to output, if the flag <em>
|
||||
format_first_only</em> is set then only the first occurance of the
|
||||
pattern found is replaced. Returns the new string. See <a href="format_synatx.html">also format string syntax</a>, <a href="match_flag_type.html">match flags</a> and <a href="match_flag_type.html">format flags</a>.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">std::string Merge(<b>const</b> char*
|
||||
in, <b>const</b> char* fmt, <b>bool</b> copy = <b>true</b>, <b>
|
||||
unsigned int</b> flags = match_default);</td>
|
||||
<td valign="top" width="42%">Performs a search and replace
|
||||
operation: searches through the string <i>in</i> for all
|
||||
occurrences of the current expression, for each occurrence replaces
|
||||
the match with the format string <i>fmt</i>. Uses <i>flags</i> to
|
||||
determine what gets matched, and how the format string should be
|
||||
treated. If <i>copy</i> is true then all unmatched sections of
|
||||
input are copied unchanged to output, if the flag <em>
|
||||
format_first_only</em> is set then only the first occurance of the
|
||||
pattern found is replaced. Returns the new string. See <a href="format_synatx.html">also format string syntax</a>, <a href="match_flag_type.html">match flags</a> and <a href="match_flag_type.html">format flags</a>.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top"><b>unsigned</b>
|
||||
Split(std::vector<std::string>& v, std::string& s,
|
||||
<b>unsigned</b> flags = match_default, <b>unsigned</b> max_count =
|
||||
~0);</td>
|
||||
<td valign="top">Splits the input string and pushes each one onto
|
||||
the vector. If the expression contains no marked sub-expressions,
|
||||
then one string is outputted for each section of the input that
|
||||
does not match the expression. If the expression does contain
|
||||
marked sub-expressions, then outputs one string for each marked
|
||||
sub-expression each time a match occurs. Outputs no more than <i>
|
||||
max_count</i> strings. Before returning, deletes from the input
|
||||
string <i>s</i> all of the input that has been processed (all of
|
||||
the string if <i>max_count</i> was not reached). Returns the number
|
||||
of strings pushed onto the vector.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Position(<b>int</b> i = 0)<b>const</b>;</td>
|
||||
<td valign="top" width="42%">Returns the position of what matched
|
||||
sub-expression <i>i</i>. If <i>i = 0</i> then returns the position
|
||||
of the whole match. Returns RegEx::npos if the supplied index is
|
||||
invalid, or if the specified sub-expression did not participate in
|
||||
the match.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Length(<b>int</b> i = 0)<b>const</b>;</td>
|
||||
<td valign="top" width="42%">Returns the length of what matched
|
||||
sub-expression <i>i</i>. If <i>i = 0</i> then returns the length of
|
||||
the whole match. Returns RegEx::npos if the supplied index is
|
||||
invalid, or if the specified sub-expression did not participate in
|
||||
the match.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><strong>bool</strong> Matched(<strong>int</strong> i =
|
||||
0)<strong>const</strong>;</td>
|
||||
<td>Returns true if sub-expression <em>i</em> was matched, false
|
||||
otherwise.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned</b> <b>int</b>
|
||||
Line()<b>const</b>;</td>
|
||||
<td valign="top" width="42%">Returns the line on which the match
|
||||
occurred, indexes start from 1 not zero, if no match occurred then
|
||||
returns RegEx::npos.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%"><b>unsigned int</b> Marks()
|
||||
const;</td>
|
||||
<td valign="top" width="42%">Returns the number of marked
|
||||
sub-expressions contained in the expression. Note that this
|
||||
includes the whole match (sub-expression zero), so the value
|
||||
returned is always >= 1.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">std::string What(<b>int</b>
|
||||
i)<b>const</b>;</td>
|
||||
<td valign="top" width="42%">Returns a copy of what matched
|
||||
sub-expression <i>i</i>. If <i>i = 0</i> then returns a copy of the
|
||||
whole match. Returns a null string if the index is invalid or if
|
||||
the specified sub-expression did not participate in a match.</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="7%"> </td>
|
||||
<td valign="top" width="43%">std::string <b>
|
||||
operator</b>[](<b>int</b> i)<b>const</b> ;</td>
|
||||
<td valign="top" width="42%">Returns <i>what(i);</i>
|
||||
|
||||
<p>Can be used to simplify access to sub-expression matches, and
|
||||
make usage more perl-like.</p>
|
||||
</td>
|
||||
<td valign="top" width="7%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
213
doc/regex_format.html
Normal file
213
doc/regex_format.html
Normal file
@ -0,0 +1,213 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<title>Boost.Regex: Algorithm regex_format (deprecated)</title>
|
||||
<meta http-equiv="Content-Type" content=
|
||||
"text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt=
|
||||
"C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
|
||||
<h2 align="center">Algorithm regex_format (deprecated)</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt=
|
||||
"Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<hr>
|
||||
<p>The algorithm regex_format is deprecated; new code should use
|
||||
match_results::format instead. Existing code will continue to
|
||||
compile, the following documentation is taken from the previous
|
||||
version of boost.regex and will not be further updated:</p>
|
||||
|
||||
<h3>Algorithm regex_format</h3>
|
||||
|
||||
<pre>
|
||||
#include <<a href="../../boost/regex.hpp">boost/regex.hpp</a>>
|
||||
</pre>
|
||||
|
||||
<p>The algorithm regex_format takes the results of a match and
|
||||
creates a new string based upon a <a href="format_syntax.html">
|
||||
format string</a>, regex_format can be used for search and replace
|
||||
operations:</p>
|
||||
|
||||
<pre>
|
||||
<b>template</b> <<b>class</b> OutputIterator, <b>class</b> iterator, <b>class</b> Allocator, <b>class</b> charT>
|
||||
OutputIterator regex_format(OutputIterator out,
|
||||
<b>const</b> match_results<iterator, Allocator>& m,
|
||||
<b>const</b> charT* fmt,
|
||||
match_flag_type flags = 0);
|
||||
<b>template</b> <<b>class</b> OutputIterator, <b>class</b> iterator, <b>class</b> Allocator, <b>class</b> charT>
|
||||
OutputIterator regex_format(OutputIterator out,
|
||||
<b>const</b> match_results<iterator, Allocator>& m,
|
||||
<b>const</b> std::basic_string<charT>& fmt,
|
||||
match_flag_type flags = 0);
|
||||
</pre>
|
||||
|
||||
<p>The library also defines the following convenience variation of
|
||||
regex_format, which returns the result directly as a string, rather
|
||||
than outputting to an iterator [note - this version may not be
|
||||
available, or may be available in a more limited form, depending
|
||||
upon your compilers capabilities]:</p>
|
||||
|
||||
<pre>
|
||||
<b>template</b> <<b>class</b> iterator, <b>class</b> Allocator, <b>class</b> charT>
|
||||
std::basic_string<charT> regex_format
|
||||
(<b>const</b> match_results<iterator, Allocator>& m,
|
||||
<b>const</b> charT* fmt,
|
||||
match_flag_type flags = 0);
|
||||
|
||||
<b>template</b> <<b>class</b> iterator, <b>class</b> Allocator, <b>class</b> charT>
|
||||
std::basic_string<charT> regex_format
|
||||
(<b>const</b> match_results<iterator, Allocator>& m,
|
||||
<b>const</b> std::basic_string<charT>& fmt,
|
||||
match_flag_type flags = 0);
|
||||
</pre>
|
||||
|
||||
<p>Parameters to the main version of the function are passed as
|
||||
follows:</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table id="Table2" cellspacing="0" cellpadding="7" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%">OutputIterator out</td>
|
||||
<td valign="top" width="44%">An output iterator type, the output
|
||||
string is sent to this iterator. Typically this would be a
|
||||
std::ostream_iterator.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%"><b>const</b>
|
||||
match_results<iterator, Allocator>& m</td>
|
||||
<td valign="top" width="44%">An instance of match_results<>
|
||||
obtained from one of the matching algorithms above, and denoting
|
||||
what matched.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%"><b>const</b> charT* fmt</td>
|
||||
<td valign="top" width="44%">A format string that determines how
|
||||
the match is transformed into the new string.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%"><b>unsigned</b> flags</td>
|
||||
<td valign="top" width="44%">Optional flags which describe how the
|
||||
format string is to be interpreted.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p><a name="format_flags"></a>Format flags are defined as
|
||||
follows:</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<table id="Table3" cellspacing="0" cellpadding="7" width="100%"
|
||||
border="0">
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%">format_all</td>
|
||||
<td valign="top" width="43%">Enables all syntax options (perl-like
|
||||
plus extentions).</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%">format_sed</td>
|
||||
<td valign="top" width="43%">Allows only a sed-like syntax.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%">format_perl</td>
|
||||
<td valign="top" width="43%">Allows only a perl-like syntax.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td valign="top" width="9%"> </td>
|
||||
<td valign="top" width="39%">format_no_copy</td>
|
||||
<td valign="top" width="43%">Disables copying of unmatched sections
|
||||
to the output string during <a href="regex_merge.html">
|
||||
regex_merge</a> operations.</td>
|
||||
<td valign="top" width="9%"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td>format_first_only</td>
|
||||
<td>When this flag is set only the first occurance will be replaced
|
||||
(applies to regex_merge only).</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
<p>The format string syntax (and available options) is described
|
||||
more fully under <a href="format_syntax.html">format strings</a>
|
||||
.</p>
|
||||
|
||||
<p></p>
|
||||
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
|
||||
<p><i>© Copyright <a href="mailto:jm@regex.fsnet.co.uk">John
|
||||
Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
386
doc/regex_grep.html
Normal file
386
doc/regex_grep.html
Normal file
@ -0,0 +1,386 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Algorithm regex_grep (deprecated)</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
<h2 align="center">Algorithm regex_grep (deprecated)</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<hr>
|
||||
<p>The algorithm regex_grep is deprecated in favor of <a href="regex_iterator.html">regex_iterator</a>
|
||||
which provides a more convenient and standard library friendly interface.</p>
|
||||
<p>The following documentation is taken unchanged from the previous boost release,
|
||||
and will not be updated in future.</p>
|
||||
<hr>
|
||||
<pre>
|
||||
#include <<a href="../../boost/regex.hpp">boost/regex.hpp</a>>
|
||||
</pre>
|
||||
<p>regex_grep allows you to search through a bidirectional-iterator range and
|
||||
locate all the (non-overlapping) matches with a given regular expression. The
|
||||
function is declared as:</p>
|
||||
<pre>
|
||||
<b>template</b> <<b>class</b> Predicate, <b>class</b> iterator, <b>class</b> charT, <b>class</b> traits, <b>class</b> Allocator>
|
||||
<b>unsigned</b> <b>int</b> regex_grep(Predicate foo,
|
||||
iterator first,
|
||||
iterator last,
|
||||
<b>const</b> basic_regex<charT, traits, Allocator>& e,
|
||||
<b>unsigned</b> flags = match_default)
|
||||
</pre>
|
||||
<p>The library also defines the following convenience versions, which take either
|
||||
a const charT*, or a const std::basic_string<>& in place of a pair of
|
||||
iterators [note - these versions may not be available, or may be available in a
|
||||
more limited form, depending upon your compilers capabilities]:</p>
|
||||
<pre>
|
||||
<b>template</b> <<b>class</b> Predicate, <b>class</b> charT, <b>class</b> Allocator, <b>class</b> traits>
|
||||
<b>unsigned</b> <b>int</b> regex_grep(Predicate foo,
|
||||
<b>const</b> charT* str,
|
||||
<b>const</b> basic_regex<charT, traits, Allocator>& e,
|
||||
<b>unsigned</b> flags = match_default);
|
||||
|
||||
<b>template</b> <<b>class</b> Predicate, <b>class</b> ST, <b>class</b> SA, <b>class</b> Allocator, <b>class</b> charT, <b>class</b> traits>
|
||||
<b>unsigned</b> <b>int</b> regex_grep(Predicate foo,
|
||||
<b>const</b> std::basic_string<charT, ST, SA>& s,
|
||||
<b>const</b> basic_regex<charT, traits, Allocator>& e,
|
||||
<b>unsigned</b> flags = match_default);
|
||||
</pre>
|
||||
<p>The parameters for the primary version of regex_grep have the following
|
||||
meanings: </p>
|
||||
<p></p>
|
||||
<table id="Table2" cellspacing="0" cellpadding="7" width="624" border="0">
|
||||
<tr>
|
||||
<td width="5%"> </td>
|
||||
<td valign="top" width="50%">foo</td>
|
||||
<td valign="top" width="50%">A predicate function object or function pointer, see
|
||||
below for more information.</td>
|
||||
<td width="5%"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top" width="50%">first</td>
|
||||
<td valign="top" width="50%">The start of the range to search.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top" width="50%">last</td>
|
||||
<td valign="top" width="50%">The end of the range to search.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top" width="50%">e</td>
|
||||
<td valign="top" width="50%">The regular expression to search for.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td valign="top" width="50%">flags</td>
|
||||
<td valign="top" width="50%">The flags that determine how matching is carried out,
|
||||
one of the <a href="#match_type">match_flags</a> enumerators.</td>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<p>The algorithm finds all of the non-overlapping matches of the expression e, for
|
||||
each match it fills a <a href="#reg_match">match_results</a><iterator,
|
||||
Allocator> structure, which contains information on what matched, and calls
|
||||
the predicate foo, passing the match_results<iterator, Allocator> as a
|
||||
single argument. If the predicate returns true, then the grep operation
|
||||
continues, otherwise it terminates without searching for further matches. The
|
||||
function returns the number of matches found.</p>
|
||||
<p>The general form of the predicate is:</p>
|
||||
<pre>
|
||||
<b>struct</b> grep_predicate
|
||||
{
|
||||
<b> bool</b> <b>operator</b>()(<b>const</b> match_results<iterator_type, typename expression_type::alloc_type::template rebind<sub_match<BidirectionalIterator> >::other>& m);
|
||||
};
|
||||
</pre>
|
||||
<p>Note that in almost every case the allocator parameter can be omitted, when
|
||||
specifying the <a href="match_results.html">match_results</a> type,
|
||||
alternatively one of the typedefs cmatch, wcmatch, smatch or wsmatch can be
|
||||
used.</p>
|
||||
<p>For example the regular expression "a*b" would find one match in the string
|
||||
"aaaaab" and two in the string "aaabb".</p>
|
||||
<p>Remember this algorithm can be used for a lot more than implementing a version
|
||||
of grep, the predicate can be and do anything that you want, grep utilities
|
||||
would output the results to the screen, another program could index a file
|
||||
based on a regular expression and store a set of bookmarks in a list, or a text
|
||||
file conversion utility would output to file. The results of one regex_grep can
|
||||
even be chained into another regex_grep to create recursive parsers.</p>
|
||||
<P>The algorithm may throw <CODE>std::runtime_error</CODE> if the complexity
|
||||
of matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<p><a href="../example/snippets/regex_grep_example_1.cpp"> Example</a>: convert
|
||||
the example from <i>regex_search</i> to use <i>regex_grep</i> instead:</p>
|
||||
<pre>
|
||||
<font color="#008000">#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
</font><font color="#000080"><i>// IndexClasses:
|
||||
// takes the contents of a file in the form of a string
|
||||
// and searches for all the C++ class definitions, storing
|
||||
// their locations in a map of strings/int's
|
||||
</i></font><b>typedef</b> std::map<std::string, <b>int</b>, std::less<std::string> > map_type;
|
||||
|
||||
const char* re =
|
||||
// possibly leading whitespace:
|
||||
"^[[:space:]]*"
|
||||
// possible template declaration:
|
||||
"(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"
|
||||
// class or struct:
|
||||
"(class|struct)[[:space:]]*"
|
||||
// leading declspec macros etc:
|
||||
"("
|
||||
"\\<\\w+\\>"
|
||||
"("
|
||||
"[[:blank:]]*\\([^)]*\\)"
|
||||
")?"
|
||||
"[[:space:]]*"
|
||||
")*"
|
||||
// the class name
|
||||
"(\\<\\w*\\>)[[:space:]]*"
|
||||
// template specialisation parameters
|
||||
"(<[^;:{]+>)?[[:space:]]*"
|
||||
// terminate in { or :
|
||||
"(\\{|:[^;\\{()]*\\{)";
|
||||
|
||||
boost::regex expression(re);
|
||||
<b>class</b> IndexClassesPred
|
||||
{
|
||||
map_type& m;
|
||||
std::string::const_iterator base;
|
||||
<b>public</b>:
|
||||
IndexClassesPred(map_type& a, std::string::const_iterator b) : m(a), base(b) {}
|
||||
<b>bool</b> <b>operator</b>()(<b>const</b> smatch& what)
|
||||
{
|
||||
<font color=
|
||||
#000080> <i>// what[0] contains the whole string
|
||||
</i> <i>// what[5] contains the class name.
|
||||
</i> <i>// what[6] contains the template specialisation if any.
|
||||
</i> <i>// add class name and position to map:
|
||||
</i></font> m[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - base;
|
||||
<b>return</b> <b>true</b>;
|
||||
}
|
||||
};
|
||||
<b>void</b> IndexClasses(map_type& m, <b>const</b> std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
regex_grep(IndexClassesPred(m, start), start, end, expression);
|
||||
}
|
||||
</pre>
|
||||
<p><a href="../example/snippets/regex_grep_example_2.cpp"> Example</a>: Use
|
||||
regex_grep to call a global callback function:</p>
|
||||
<pre>
|
||||
<font color="#008000">#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
</font><font color="#000080"><i>// purpose:
|
||||
// takes the contents of a file in the form of a string
|
||||
// and searches for all the C++ class definitions, storing
|
||||
// their locations in a map of strings/int's
|
||||
</i></font><b>typedef</b> std::map<std::string, <b>int</b>, std::less<std::string> > map_type;
|
||||
|
||||
const char* re =
|
||||
// possibly leading whitespace:
|
||||
"^[[:space:]]*"
|
||||
// possible template declaration:
|
||||
"(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"
|
||||
// class or struct:
|
||||
"(class|struct)[[:space:]]*"
|
||||
// leading declspec macros etc:
|
||||
"("
|
||||
"\\<\\w+\\>"
|
||||
"("
|
||||
"[[:blank:]]*\\([^)]*\\)"
|
||||
")?"
|
||||
"[[:space:]]*"
|
||||
")*"
|
||||
// the class name
|
||||
"(\\<\\w*\\>)[[:space:]]*"
|
||||
// template specialisation parameters
|
||||
"(<[^;:{]+>)?[[:space:]]*"
|
||||
// terminate in { or :
|
||||
"(\\{|:[^;\\{()]*\\{)";
|
||||
|
||||
boost::regex expression(re);
|
||||
map_type class_index;
|
||||
std::string::const_iterator base;
|
||||
|
||||
<b>bool</b> grep_callback(<b>const</b> boost::smatch& what)
|
||||
{
|
||||
<font color="#000080"> <i>// what[0] contains the whole string
|
||||
</i> <i>// what[5] contains the class name.
|
||||
</i> <i>// what[6] contains the template specialisation if any.
|
||||
</i> <i>// add class name and position to map:
|
||||
</i></font> class_index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - base;
|
||||
<b>return</b> <b>true</b>;
|
||||
}
|
||||
<b>void</b> IndexClasses(<b>const</b> std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
base = start;
|
||||
regex_grep(grep_callback, start, end, expression, match_default);
|
||||
}
|
||||
|
||||
</pre>
|
||||
<p><a href="../example/snippets/regex_grep_example_3.cpp"> Example</a>: use
|
||||
regex_grep to call a class member function, use the standard library adapters <i>std::mem_fun</i>
|
||||
and <i>std::bind1st</i> to convert the member function into a predicate:</p>
|
||||
<pre>
|
||||
<font color="#008000">#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
#include <functional>
|
||||
</font><font color="#000080"><i>// purpose:
|
||||
// takes the contents of a file in the form of a string
|
||||
// and searches for all the C++ class definitions, storing
|
||||
// their locations in a map of strings/int's
|
||||
|
||||
</i></font><b>typedef</b> std::map<std::string, <b>int</b>, std::less<std::string> > map_type;
|
||||
<b>class</b> class_index
|
||||
{
|
||||
boost::regex expression;
|
||||
map_type index;
|
||||
std::string::const_iterator base;
|
||||
<b>bool</b> grep_callback(boost::smatch what);
|
||||
<b>public</b>:
|
||||
<b> void</b> IndexClasses(<b>const</b> std::string& file);
|
||||
class_index()
|
||||
: index(),
|
||||
expression(<font color=
|
||||
#000080>"^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"
|
||||
"(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?"
|
||||
"[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?"
|
||||
"(\\{|:[^;\\{()]*\\{)"
|
||||
</font> ){}
|
||||
};
|
||||
<b>bool</b> class_index::grep_callback(boost::smatch what)
|
||||
{
|
||||
<font color="#000080"> <i>// what[0] contains the whole string
|
||||
</i> <i>// what[5] contains the class name.
|
||||
</i> <i>// what[6] contains the template specialisation if any.
|
||||
</i> <i>// add class name and position to map:
|
||||
</i></font> index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - base;
|
||||
<b>return</b> <b>true</b>;
|
||||
}
|
||||
|
||||
<b>void</b> class_index::IndexClasses(<b>const</b> std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
base = start;
|
||||
regex_grep(std::bind1st(std::mem_fun(&class_index::grep_callback), <b>this</b>),
|
||||
start,
|
||||
end,
|
||||
expression);
|
||||
}
|
||||
|
||||
</pre>
|
||||
<p><a href="../example/snippets/regex_grep_example_4.cpp"> Finally</a>, C++
|
||||
Builder users can use C++ Builder's closure type as a callback argument:</p>
|
||||
<pre>
|
||||
<font color="#008000">#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
#include <functional>
|
||||
</font><font color="#000080"><i>// purpose:
|
||||
// takes the contents of a file in the form of a string
|
||||
// and searches for all the C++ class definitions, storing
|
||||
// their locations in a map of strings/int's
|
||||
|
||||
</i></font><b>typedef</b> std::map<std::string, <b>int</b>, std::less<std::string> > map_type;
|
||||
<b>class</b> class_index
|
||||
{
|
||||
boost::regex expression;
|
||||
map_type index;
|
||||
std::string::const_iterator base;
|
||||
<b>typedef</b> boost::smatch arg_type;
|
||||
<b>bool</b> grep_callback(<b>const</b> arg_type& what);
|
||||
<b>public</b>:
|
||||
<b>typedef</b> <b>bool</b> (<b>__closure</b>* grep_callback_type)(<b>const</b> arg_type&);
|
||||
<b>void</b> IndexClasses(<b>const</b> std::string& file);
|
||||
class_index()
|
||||
: index(),
|
||||
expression(<font color=
|
||||
#000080>"^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"
|
||||
"(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?"
|
||||
"[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?"
|
||||
"(\\{|:[^;\\{()]*\\{)"
|
||||
</font> ){}
|
||||
};
|
||||
|
||||
<b>bool</b> class_index::grep_callback(<b>const</b> arg_type& what)
|
||||
{
|
||||
<font color=
|
||||
#000080> <i>// what[0] contains the whole string</i>
|
||||
<i>// what[5] contains the class name.</i>
|
||||
<i>// what[6] contains the template specialisation if any.</i>
|
||||
<i>// add class name and position to map:</i></font>
|
||||
index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - base;
|
||||
<b>return</b> <b>true</b>;
|
||||
}
|
||||
|
||||
<b>void</b> class_index::IndexClasses(<b>const</b> std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
base = start;
|
||||
class_index::grep_callback_type cl = &(<b>this</b>->grep_callback);
|
||||
regex_grep(cl,
|
||||
start,
|
||||
end,
|
||||
expression);
|
||||
}
|
||||
</pre>
|
||||
<p></p>
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
<p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
427
doc/regex_iterator.html
Normal file
427
doc/regex_iterator.html
Normal file
@ -0,0 +1,427 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: regex_iterator</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link href="../../../boost.css" type="text/css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<p></p>
|
||||
<table id="Table1" cellspacing="1" cellpadding="1" width="100%" border="0">
|
||||
<tr>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" alt="C++ Boost" src="../../../c++boost.gif" width="277" border="0"></a></h3>
|
||||
</td>
|
||||
<td width="353">
|
||||
<h1 align="center">Boost.Regex</h1>
|
||||
<h2 align="center">regex_iterator</h2>
|
||||
</td>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" alt="Boost.Regex Index" src="uarrow.gif" width="43" border="0"></a></h3>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<hr>
|
||||
<h3>Contents</h3>
|
||||
<dl class="index">
|
||||
<dt><a href="#synopsis">Synopsis</a> <dt><a href="#description">Description</a> <dt><a href="#examples">
|
||||
Examples</a></dt>
|
||||
</dl>
|
||||
<h3><a name="synopsis"></a>Synopsis</h3>
|
||||
<p>The iterator type regex_iterator will enumerate all of the regular expression
|
||||
matches found in some sequence: dereferencing a regex_iterator yields a
|
||||
reference to a <a href="match_results.html">match_results</a> object.</p>
|
||||
<pre>
|
||||
template <class BidirectionalIterator,
|
||||
class charT = iterator_traits<BidirectionalIterator>::value_type,
|
||||
class traits = regex_traits<charT>,
|
||||
class Allocator = allocator<charT> >
|
||||
class regex_iterator
|
||||
{
|
||||
public:
|
||||
typedef basic_regex<charT, traits, Allocator> regex_type;
|
||||
typedef match_results<BidirectionalIterator> value_type;
|
||||
typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type;
|
||||
typedef const value_type* pointer;
|
||||
typedef const value_type& reference;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
|
||||
regex_iterator();
|
||||
regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
|
||||
const regex_type& re,
|
||||
match_flag_type m = match_default);
|
||||
regex_iterator(const regex_iterator&);
|
||||
regex_iterator& operator=(const regex_iterator&);
|
||||
bool operator==(const regex_iterator&);
|
||||
bool operator!=(const regex_iterator&);
|
||||
const value_type& operator*();
|
||||
const value_type* operator->();
|
||||
regex_iterator& operator++();
|
||||
regex_iterator operator++(int);
|
||||
};
|
||||
|
||||
</pre>
|
||||
<h3><a name="description"></a>Description</h3>
|
||||
<p>A regex_iterator is constructed from a pair of iterators, and enumerates all
|
||||
occurrences of a regular expression within that iterator range.</p>
|
||||
<pre>
|
||||
regex_iterator();
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> constructs an end of sequence regex_iterator.</p>
|
||||
<pre>
|
||||
regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
|
||||
const regex_type& re,
|
||||
match_flag_type m = match_default);
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> constructs a regex_iterator that will enumerate all occurrences
|
||||
of the expression <em>re</em>, within the sequence <em>[a,b)</em>, and found
|
||||
using match flags <em>m</em>. The object <em>re</em> must exist for the
|
||||
lifetime of the regex_iterator.</p>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<pre>
|
||||
regex_iterator(const regex_iterator& that);
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> constructs a copy of <code>that</code>.</p>
|
||||
<b></b>
|
||||
<p><b>Postconditions:</b> <code>*this == that</code>.</p>
|
||||
<pre>
|
||||
regex_iterator& operator=(const regex_iterator&);
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> sets <code>*this</code> equal to those in <code>that</code>.</p>
|
||||
<b></b>
|
||||
<p><b>Postconditions:</b> <code>*this == that</code>.</p>
|
||||
<pre>
|
||||
bool operator==(const regex_iterator& that);
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> returns true if *this is equal to that.</p>
|
||||
<pre>
|
||||
bool operator!=(const regex_iterator&);
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> returns <code>!(*this == that)</code>.</p>
|
||||
<pre>
|
||||
const value_type& operator*();
|
||||
</pre>
|
||||
<p><b>Effects:</b> dereferencing a regex_iterator object <em>it</em> yields a
|
||||
const reference to a <a href="match_results.html">match_results</a> object,
|
||||
whose members are set as follows:</p>
|
||||
<p></p>
|
||||
<table id="Table2" cellspacing="1" cellpadding="7" width="624" border="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" width="50%"><b></b>
|
||||
<p><b>Element</b></p>
|
||||
</td>
|
||||
<td valign="top" width="50%"><b></b>
|
||||
<p><b>Value</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).size()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>re.mark_count()</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).empty()</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>false</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).prefix().first</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>The end of the last match found, or the start of the underlying sequence if
|
||||
this is the first match enumerated</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).prefix().last</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[0].first</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).prefix().matched</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).prefix().first != (*it).prefix().second</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).suffix().first</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[0].second</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).suffix().last</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>The end of the underlying sequence.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).suffix().matched</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it).suffix().first != (*it).suffix().second</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[0].first</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>The start of the sequence of characters that matched the regular expression</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[0].second</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>The end of the sequence of characters that matched the regular expression</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[0].matched</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p><code>true</code> if a full match was found, and <code>false</code> if it was a
|
||||
partial match (found as a result of the <code>match_partial</code> flag being
|
||||
set).</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[n].first</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>For all integers n < (*it).size(), the start of the sequence that matched
|
||||
sub-expression <i>n</i>. Alternatively, if sub-expression n did not participate
|
||||
in the match, then <i>last</i>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[n].second</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>For all integers n < (*it).size(), the end of the sequence that matched
|
||||
sub-expression <i>n</i>. Alternatively, if sub-expression n did not participate
|
||||
in the match, then <i>last</i>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">
|
||||
<p>(*it)[n].matched</p>
|
||||
</td>
|
||||
<td valign="top" width="50%">
|
||||
<p>For all integers n < (*it).size(), true if sub-expression <i>n</i> participated
|
||||
in the match, false otherwise.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" width="50%">(*it).position(n)</td>
|
||||
<td valign="top" width="50%">For all integers n < (*it).size(), then the
|
||||
distance from the start of the underlying sequence to the start of
|
||||
sub-expression match <em>n</em>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<pre>
|
||||
const value_type* operator->();
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> returns <code>&(*this)</code>.</p>
|
||||
<pre>
|
||||
regex_iterator& operator++();
|
||||
</pre>
|
||||
<p><strong>Effects:</strong> moves the iterator to the next match in the
|
||||
underlying sequence, or the end of sequence iterator if none if found.
|
||||
When the last match found matched a zero length string, then the
|
||||
regex_iterator will find the next match as follows: if there exists a non-zero
|
||||
length match that starts at the same location as the last one, then returns it,
|
||||
otherwise starts looking for the next (possibly zero length) match from one
|
||||
position to the right of the last match.</p>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<b></b>
|
||||
<p><b>Returns:</b> <code>*this</code>.</p>
|
||||
<pre>
|
||||
regex_iterator operator++(int);
|
||||
</pre>
|
||||
<b></b>
|
||||
<p><b>Effects:</b> constructs a copy <code>result</code> of <code>*this</code>,
|
||||
then calls <code>++(*this)</code>.</p>
|
||||
<b></b>
|
||||
<p><b>Returns:</b> <code>result</code>.</p>
|
||||
<h3>Examples</h3>
|
||||
<p>The following <a href="../example/snippets/regex_iterator_example.cpp">example</a>
|
||||
takes a C++ source file and builds up an index of class names, and the location
|
||||
of that class in the file.</p>
|
||||
<pre>
|
||||
<font color="#008040">#include <string></font>
|
||||
<font color="#008040">#include <map></font>
|
||||
<font color="#008040">#include <fstream></font>
|
||||
<font color="#008040">#include <iostream></font>
|
||||
<font color="#008040">#include <boost/regex.hpp></font>
|
||||
|
||||
<b>using</b> <b>namespace</b> std;
|
||||
|
||||
<i><font color="#000080">// purpose:</font></i>
|
||||
<i><font color=
|
||||
#000080>// takes the contents of a file in the form of a string</font></i>
|
||||
<i><font color=
|
||||
#000080>// and searches for all the C++ class definitions, storing</font></i>
|
||||
<i><font color=
|
||||
#000080>// their locations in a map of strings/int's</font></i>
|
||||
|
||||
<b>typedef</b> std::map<std::string, std::string::difference_type, std::less<std::string> > map_type;
|
||||
|
||||
<b>const</b> <b>char</b>* re =
|
||||
<i><font color=
|
||||
#000080>// possibly leading whitespace: </font></i>
|
||||
<font color="#0000ff">"^[[:space:]]*"</font>
|
||||
<i><font color=
|
||||
#000080>// possible template declaration:</font></i>
|
||||
<font color=
|
||||
#0000ff>"(template[[:space:]]*<[^;:{]+>[[:space:]]*)?"</font>
|
||||
<i><font color="#000080">// class or struct:</font></i>
|
||||
<font color="#0000ff">"(class|struct)[[:space:]]*"</font>
|
||||
<i><font color=
|
||||
#000080>// leading declspec macros etc:</font></i>
|
||||
<font color="#0000ff">"("</font>
|
||||
<font color="#0000ff">"\\<\\w+\\>"</font>
|
||||
<font color="#0000ff">"("</font>
|
||||
<font color="#0000ff">"[[:blank:]]*\\([^)]*\\)"</font>
|
||||
<font color="#0000ff">")?"</font>
|
||||
<font color="#0000ff">"[[:space:]]*"</font>
|
||||
<font color="#0000ff">")*"</font>
|
||||
<i><font color="#000080">// the class name</font></i>
|
||||
<font color="#0000ff">"(\\<\\w*\\>)[[:space:]]*"</font>
|
||||
<i><font color=
|
||||
#000080>// template specialisation parameters</font></i>
|
||||
<font color="#0000ff">"(<[^;:{]+>)?[[:space:]]*"</font>
|
||||
<i><font color="#000080">// terminate in { or :</font></i>
|
||||
<font color="#0000ff">"(\\{|:[^;\\{()]*\\{)"</font>;
|
||||
|
||||
|
||||
boost::regex expression(re);
|
||||
map_type class_index;
|
||||
|
||||
<b>bool</b> regex_callback(<b>const</b> boost::match_results<std::string::const_iterator>& what)
|
||||
{
|
||||
<i><font color=
|
||||
#000080>// what[0] contains the whole string</font></i>
|
||||
<i><font color=
|
||||
#000080>// what[5] contains the class name.</font></i>
|
||||
<i><font color=
|
||||
#000080>// what[6] contains the template specialisation if any.</font></i>
|
||||
<i><font color=
|
||||
#000080>// add class name and position to map:</font></i>
|
||||
class_index[what[<font color=
|
||||
#0000a0>5</font>].str() + what[<font color=
|
||||
#0000a0>6</font>].str()] = what.position(<font color=
|
||||
#0000a0>5</font>);
|
||||
<b>return</b> <b>true</b>;
|
||||
}
|
||||
|
||||
<b>void</b> load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
s.reserve(is.rdbuf()->in_avail());
|
||||
<b>char</b> c;
|
||||
<b>while</b>(is.get(c))
|
||||
{
|
||||
<b>if</b>(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * <font color="#0000a0">3</font>);
|
||||
s.append(<font color="#0000a0">1</font>, c);
|
||||
}
|
||||
}
|
||||
|
||||
<b>int</b> main(<b>int</b> argc, <b>const</b> <b>char</b>** argv)
|
||||
{
|
||||
std::string text;
|
||||
<b>for</b>(<b>int</b> i = <font color=
|
||||
#0000a0>1</font>; i < argc; ++i)
|
||||
{
|
||||
cout << <font color=
|
||||
#0000ff>"Processing file "</font> << argv[i] << endl;
|
||||
std::ifstream fs(argv[i]);
|
||||
load_file(text, fs);
|
||||
<i><font color=
|
||||
#000080>// construct our iterators:</font></i>
|
||||
boost::regex_iterator<std::string::const_iterator> m1(text.begin(), text.end(), expression);
|
||||
boost::regex_iterator<std::string::const_iterator> m2;
|
||||
std::for_each(m1, m2, <20>ex_callback);
|
||||
<i><font color="#000080">// copy results:</font></i>
|
||||
cout << class_index.size() << <font color=
|
||||
#0000ff>" matches found"</font> << endl;
|
||||
map_type::iterator c, d;
|
||||
c = class_index.begin();
|
||||
d = class_index.end();
|
||||
<b>while</b>(c != d)
|
||||
{
|
||||
cout << <font color=
|
||||
#0000ff>"class \""</font> << (*c).first << <font
|
||||
color=
|
||||
#0000ff>"\" found at index: "</font> << (*c).second << endl;
|
||||
++c;
|
||||
}
|
||||
class_index.erase(class_index.begin(), class_index.end());
|
||||
}
|
||||
<b>return</b> <font color="#0000a0">0</font>;
|
||||
}
|
||||
</pre>
|
||||
<hr>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></p>
|
||||
<p><i><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan -->
|
||||
2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p>
|
||||
<p align="left"><i>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.</i></p>
|
||||
</body>
|
||||
</html>
|
317
doc/regex_match.html
Normal file
317
doc/regex_match.html
Normal file
@ -0,0 +1,317 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Algorithm regex_match</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Algorithm regex_match</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<H3>Contents</H3>
|
||||
<dl class="index">
|
||||
<dt><a href="#synopsis">Synopsis</a> <dt><a href="#description">Description</a> <dt><a href="#examples">
|
||||
Examples</a></dt>
|
||||
</dl>
|
||||
<H3><A name="synopsis"></A>Synopsis</H3>
|
||||
<PRE><A name=query_match></A>#include <<A href="../../boost/regex.hpp">boost/regex.hpp</A>> </PRE>
|
||||
<P>The algorithm regex _match determines whether a given regular expression
|
||||
matches a given sequence denoted by a pair of bidirectional-iterators, the
|
||||
algorithm is defined as follows, <STRONG>note that the result is true only if the
|
||||
expression matches the whole of the input sequence</STRONG>, the main use of
|
||||
this function is data input validation.
|
||||
<PRE>template <class BidirectionalIterator, class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
|
||||
<A href="match_results.html">match_results</A><BidirectionalIterator, Allocator>& m,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);
|
||||
|
||||
template <class BidirectionalIterator, class charT, class traits, class Allocator2>
|
||||
bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);
|
||||
|
||||
template <class charT, class Allocator, class traits, class Allocator2>
|
||||
bool regex_match(const charT* str, <A href="match_results.html">match_results</A><const charT*, Allocator>& m,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);
|
||||
|
||||
template <class ST, class SA, class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_match(const basic_string<charT, ST, SA>& s,
|
||||
<A href="match_results.html">match_results</A><typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);
|
||||
|
||||
template <class charT, class traits, class Allocator2>
|
||||
bool regex_match(const charT* str,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);
|
||||
|
||||
template <class ST, class SA, class charT, class traits, class Allocator2>
|
||||
bool regex_match(const basic_string<charT, ST, SA>& s,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);
|
||||
</PRE>
|
||||
<H3><A name="description"></A>Description</H3>
|
||||
<PRE>template <class BidirectionalIterator, class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
|
||||
<A href="match_results.html">match_results</A><BidirectionalIterator, Allocator>& m,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
|
||||
<P><B> Requires:</B> Type BidirectionalIterator meets the requirements of a
|
||||
Bidirectional Iterator (24.1.4).</P>
|
||||
<P><B> Effects: </B>Determines whether there is an exact match between the regular
|
||||
expression <I>e</I>, and all of the character sequence [first, last), parameter <I>
|
||||
flags</I> is used to <A href="match_flag_type.html">control how the expression
|
||||
is matched</A> against the character sequence. Returns true if such a match
|
||||
exists, false otherwise.</P>
|
||||
<P><STRONG>Throws:</STRONG> <code>std::runtime_error</code> if the complexity of matching the
|
||||
expression against an N character string begins to exceed O(N<SUP>2</SUP>), or
|
||||
if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<P><B> Postconditions: </B>If the function returns false, then the effect on
|
||||
parameter <I>m</I> is undefined, otherwise the effects on parameter <I>m</I> are
|
||||
given in the table:</P>
|
||||
<P align="center">
|
||||
<CENTER>
|
||||
<TABLE id="Table2" cellSpacing="1" cellPadding="7" width="624" border="1">
|
||||
<TBODY>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P><B> Element</B>
|
||||
</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P><B> Value</B>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.size()</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>e.mark_count()</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.empty()</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>false</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>first</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().last</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>first</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>false</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>last</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().last</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>last</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>false</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>first</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].second</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>last</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P><CODE> true</CODE> if a full match was found, and <CODE>false</CODE> if it was
|
||||
a partial match (found as a result of the <CODE>match_partial</CODE> flag being
|
||||
set).</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[n].first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>For all integers n < m.size(), the start of the sequence that matched
|
||||
sub-expression <I>n</I>. Alternatively, if sub-expression n did not participate
|
||||
in the match, then <I>last</I>.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[n].second</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>For all integers n < m.size(), the end of the sequence that matched
|
||||
sub-expression <I>n</I>. Alternatively, if sub-expression n did not participate
|
||||
in the match, then <I>last</I>.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[n].matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>For all integers n < m.size(), true if sub-expression <I>n</I> participated
|
||||
in the match, false otherwise.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TBODY></TD></TR></TABLE>
|
||||
</CENTER>
|
||||
<P></P>
|
||||
<DIV></DIV>
|
||||
<PRE> </PRE>
|
||||
<PRE>template <class BidirectionalIterator, class charT, class traits, class Allocator2>
|
||||
bool regex_match(BidirectionalIterator first, BidirectionalIterator last,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Behaves "as if" by constructing an instance of <CODE><A href="match_results.html">
|
||||
match_results</A><</CODE>BidirectionalIterator<CODE>> what</CODE>,
|
||||
and then returning the result of <CODE>regex_match(first, last, what, e, flags)</CODE>.</P>
|
||||
<PRE>template <class charT, class Allocator, class traits, class Allocator2>
|
||||
bool regex_match(const charT* str, <A href="match_results.html">match_results</A><const charT*, Allocator>& m,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_match(str, str +
|
||||
char_traits<charT>::length(str), m, e, flags)</CODE>.</P>
|
||||
<PRE>template <class ST, class SA, class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_match(const basic_string<charT, ST, SA>& s,
|
||||
<A href="match_results.html">match_results</A><typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_match(s.begin(), s.end(), m, e,
|
||||
flags)</CODE>.</P>
|
||||
<PRE>template <class charT, class traits, class Allocator2>
|
||||
bool regex_match(const charT* str,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_match(str, str +
|
||||
char_traits<charT>::length(str), e, flags)</CODE>.</P>
|
||||
<PRE>template <class ST, class SA, class charT, class traits, class Allocator2>
|
||||
bool regex_match(const basic_string<charT, ST, SA>& s,
|
||||
const <A href="basic_regex.html">basic_regex</A><charT, traits, Allocator2>& e,
|
||||
<A href="match_flag_type.html">match_flag_type</A> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_match(s.begin(), s.end(), e,
|
||||
flags)</CODE>.
|
||||
<H3><A name="examples"></A>Examples</H3>
|
||||
<P>The following <A href="../example/snippets/regex_match_example.cpp">example</A>
|
||||
processes an ftp response:
|
||||
<P></P>
|
||||
<PRE><FONT color=#008000>#include <stdlib.h>
|
||||
#include <boost/regex.hpp>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
</FONT><B>using namespace</B> boost;
|
||||
|
||||
regex expression(<FONT color=#000080>"([0-9]+)(\\-| |$)(.*)"</FONT>);
|
||||
|
||||
<FONT color=#000080><I>// process_ftp:
|
||||
// on success returns the ftp response code, and fills
|
||||
// msg with the ftp response message.
|
||||
</I></FONT><B>int</B> process_ftp(<B>const</B> <B>char</B>* response, std::string* msg)
|
||||
{
|
||||
cmatch what;
|
||||
<B>if</B>(regex_match(response, what, expression))
|
||||
{
|
||||
<FONT color=#000080> <I>// what[0] contains the whole string
|
||||
</I> <I>// what[1] contains the response code
|
||||
</I> <I>// what[2] contains the separator character
|
||||
</I> <I>// what[3] contains the text message.
|
||||
</I></FONT> <B>if</B>(msg)
|
||||
msg->assign(what[3].first, what[3].second);
|
||||
<B>return</B> std::atoi(what[1].first);
|
||||
}
|
||||
<FONT color=#000080> <I>// failure did not match
|
||||
</I></FONT> <B>if</B>(msg)
|
||||
msg->erase();
|
||||
<B>return</B> -1;
|
||||
}
|
||||
<P>
|
||||
<HR></PRE>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
47
doc/regex_merge.html
Normal file
47
doc/regex_merge.html
Normal file
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Algorithm regex_merge (deprecated)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Algorithm regex_merge (deprecated)</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>Algorithm regex_merge has been renamed <A href="regex_replace.html">regex_replace</A>,
|
||||
existing code will continue to compile, but new code should use <A href="regex_replace.html">
|
||||
regex_replace</A> instead.</P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
213
doc/regex_replace.html
Normal file
213
doc/regex_replace.html
Normal file
@ -0,0 +1,213 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Algorithm regex_replace</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<LINK href="../../../boost.css" type="text/css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td vAlign="top" width="300">
|
||||
<h3><A href="../../../index.htm"><IMG height="86" alt="C++ Boost" src="../../../c++boost.gif" width="277" border="0"></A></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Algorithm regex_replace</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><A href="index.html"><IMG height="45" alt="Boost.Regex Index" src="uarrow.gif" width="43" border="0"></A></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<H3>Contents</H3>
|
||||
<dl class="index">
|
||||
<dt><A href="#synopsis">Synopsis</A> <dt><a href="#description">Description</a> <dt><A href="#examples">
|
||||
Examples</A></dt></dl>
|
||||
<H3><A name="synopsis"></A>Synopsis</H3>
|
||||
<PRE>#include <<A href="../../../boost/regex.hpp">boost/regex.hpp</A>> </PRE>
|
||||
<P>The algorithm regex_replace searches through a string finding
|
||||
all the matches to the regular expression: for each match it then calls <A href="match_results.html">
|
||||
match_results::format</A> to format the string and sends the result to the
|
||||
output iterator. Sections of text that do not match are copied to the output
|
||||
unchanged only if the <EM>flags</EM> parameter does not have the flag <A href="match_flags.html">
|
||||
format_no_copy</A> set. If the flag <A href="match_flags.html">format_first_only</A>
|
||||
is set then only the first occurrence is replaced rather than all
|
||||
occurrences. <PRE>template <class OutputIterator, class BidirectionalIterator, class traits,
|
||||
class Allocator, class charT>
|
||||
OutputIterator regex_replace(OutputIterator out,
|
||||
BidirectionalIterator first,
|
||||
BidirectionalIterator last,
|
||||
const basic_regex<charT, traits, Allocator>& e,
|
||||
const basic_string<charT>& fmt,
|
||||
match_flag_type flags = match_default);
|
||||
|
||||
template <class traits, class Allocator, class charT>
|
||||
basic_string<charT> regex_replace(const basic_string<charT>& s,
|
||||
const basic_regex<charT, traits, Allocator>& e,
|
||||
const basic_string<charT>& fmt,
|
||||
match_flag_type flags = match_default);
|
||||
|
||||
</PRE>
|
||||
<H3><A name="description"></A>Description</H3>
|
||||
<PRE>template <class OutputIterator, class BidirectionalIterator, class traits,
|
||||
class Allocator, class charT>
|
||||
OutputIterator regex_replace(OutputIterator out,
|
||||
BidirectionalIterator first,
|
||||
BidirectionalIterator last,
|
||||
const basic_regex<charT, traits, Allocator>& e,
|
||||
const basic_string<charT>& fmt,
|
||||
match_flag_type flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Finds all the non-overlapping matches <I>m</I> of type <CODE>match_results<BidirectionalIterator>
|
||||
</CODE>that occur within the sequence [first, last). If no such matches are
|
||||
found and <CODE>!(flags & format_no_copy)</CODE> then calls <CODE>std::copy(first,
|
||||
last, out)</CODE>. Otherwise, for each match found, if <CODE>!(flags &
|
||||
format_no_copy)</CODE> calls <CODE>std::copy(m.prefix().first, m.prefix().last,
|
||||
out)</CODE>, and then calls <CODE>m.format(out, fmt, flags)</CODE>. Finally
|
||||
if <CODE>!(flags & format_no_copy)</CODE> calls <CODE>std::copy(last_m.suffix().first,
|
||||
last_m,suffix().last, out) </CODE>where <CODE>last_m</CODE> is a copy of the
|
||||
last match found. If <CODE>flags & format_first_only</CODE> is non-zero
|
||||
then only the first match found is replaced.</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<P><B> Returns:</B> <CODE>out</CODE>.
|
||||
</P>
|
||||
<PRE>template <class traits, class Allocator, class charT>
|
||||
basic_string<charT> regex_replace(const basic_string<charT>& s,
|
||||
const basic_regex<charT, traits, Allocator>& e,
|
||||
const basic_string<charT>& fmt,
|
||||
match_flag_type flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Constructs an object <CODE>basic_string<charT> result</CODE>,
|
||||
calls <CODE>regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt,
|
||||
flags)</CODE>, and then returns <CODE>result</CODE>.
|
||||
<H3><A name="examples"></A>Examples</H3>
|
||||
<P>The following <A href="../example/snippets/regex_replace_example.cpp">example</A>
|
||||
takes C/C++ source code as input, and outputs syntax highlighted HTML code.</P>
|
||||
<P></P>
|
||||
<PRE><FONT color=#008080>#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <iterator>
|
||||
#include <boost/regex.hpp>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
</FONT>
|
||||
<FONT color=#000080><I>// purpose:
|
||||
// takes the contents of a file and transform to
|
||||
// syntax highlighted code in html format
|
||||
</I></FONT>
|
||||
boost::regex e1, e2;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* expression_text;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* format_string;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* pre_expression;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* pre_format;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* header_text;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* footer_text;
|
||||
|
||||
<B>void</B> load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
s.reserve(is.rdbuf()->in_avail());
|
||||
<B>char</B> c;
|
||||
<B>while</B>(is.get(c))
|
||||
{
|
||||
<B>if</B>(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * <FONT color=#000080>3</FONT>);
|
||||
s.append(<FONT color=#000080>1</FONT>, c);
|
||||
}
|
||||
}
|
||||
|
||||
<B>int</B> main(<B>int</B> argc, <B>const</B> <B>char</B>** argv)
|
||||
{
|
||||
try{
|
||||
e1.assign(expression_text);
|
||||
e2.assign(pre_expression);
|
||||
<B>for</B>(<B>int</B> i = <FONT color=#000080>1</FONT>; i < argc; ++i)
|
||||
{
|
||||
std::cout << <FONT color=#0000ff>"Processing file "</FONT> << argv[i] << std::endl;
|
||||
std::ifstream fs(argv[i]);
|
||||
std::string in;
|
||||
load_file(in, fs);
|
||||
std::string out_name(std::string(argv[i]) + std::string(<FONT color=#0000ff>".htm"</FONT>));
|
||||
std::ofstream os(out_name.c_str());
|
||||
os << header_text;
|
||||
<FONT color=#000080><I>// strip '<' and '>' first by outputting to a
|
||||
</I></FONT> <FONT color=#000080><I>// temporary string stream
|
||||
</I></FONT> std::ostringstream t(std::ios::out | std::ios::binary);
|
||||
std::ostream_iterator<<B>char</B>, <B>char</B>> oi(t);
|
||||
boost::regex_replace(oi, in.begin(), in.end(),
|
||||
e2, pre_format, boost::match_default | boost::format_all);
|
||||
<FONT color=#000080><I>// then output to final output stream
|
||||
</I></FONT> <FONT color=#000080><I>// adding syntax highlighting:
|
||||
</I></FONT> std::string s(t.str());
|
||||
std::ostream_iterator<<B>char</B>, <B>char</B>> out(os);
|
||||
boost::regex_replace(out, s.begin(), s.end(),
|
||||
e1, format_string, boost::match_default | boost::format_all);
|
||||
os << footer_text;
|
||||
}
|
||||
}
|
||||
<STRONG>catch</STRONG>(...)
|
||||
{ <STRONG>return</STRONG> -1; }
|
||||
<B>return</B> <FONT color=#000080>0</FONT>;
|
||||
}
|
||||
|
||||
<B>extern</B> <B>const</B> <B>char</B>* pre_expression = <FONT color=#0000ff>"(<)|(>)|\\r"</FONT>;
|
||||
<B>extern</B> <B>const</B> <B>char</B>* pre_format = <FONT color=#0000ff>"(?1<)(?2>)"</FONT>;
|
||||
|
||||
|
||||
<B>const</B> <B>char</B>* expression_text = <FONT color=#000080><I>// preprocessor directives: index 1
|
||||
</I></FONT> <FONT color=#0000ff>"(^[[:blank:]]*#(?:[^\\\\\\n]|\\\\[^\\n[:punct:][:word:]]*[\\n[:punct:][:word:]])*)|"
|
||||
</FONT> <FONT color=#000080><I>// comment: index 2
|
||||
</I></FONT> <FONT color=#0000ff>"(//[^\\n]*|/\\*.*?\\*/)|"
|
||||
</FONT> <FONT color=#000080><I>// literals: index 3
|
||||
</I></FONT> <FONT color=#0000ff>"\\<([+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\\.)?[[:digit:]]+(?:[eE][+-]?[[:digit:]]+)?))u?(?:(?:int(?:8|16|32|64))|L)?)\\>|"
|
||||
</FONT> <FONT color=#000080><I>// string literals: index 4
|
||||
</I></FONT> <FONT color=#0000ff>"('(?:[^\\\\']|\\\\.)*'|\"(?:[^\\\\\"]|\\\\.)*\")|"
|
||||
</FONT> <FONT color=#000080><I>// keywords: index 5
|
||||
</I></FONT> <FONT color=#0000ff>"\\<(__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import"
|
||||
</FONT> <FONT color=#0000ff>"|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall"
|
||||
</FONT> <FONT color=#0000ff>"|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|bool"
|
||||
</FONT> <FONT color=#0000ff>"|break|case|catch|cdecl|char|class|const|const_cast|continue|default|delete"
|
||||
</FONT> <FONT color=#0000ff>"|do|double|dynamic_cast|else|enum|explicit|extern|false|float|for|friend|goto"
|
||||
</FONT> <FONT color=#0000ff>"|if|inline|int|long|mutable|namespace|new|operator|pascal|private|protected"
|
||||
</FONT> <FONT color=#0000ff>"|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_cast"
|
||||
</FONT> <FONT color=#0000ff>"|struct|switch|template|this|throw|true|try|typedef|typeid|typename|union|unsigned"
|
||||
</FONT> <FONT color=#0000ff>"|using|virtual|void|volatile|wchar_t|while)\\>"
|
||||
</FONT> ;
|
||||
|
||||
<B>const</B> <B>char</B>* format_string = <FONT color=#0000ff>"(?1<font color=\"#008040\">$&</font>)"
|
||||
</FONT> <FONT color=#0000ff>"(?2<I><font color=\"#000080\">$&</font></I>)"
|
||||
</FONT> <FONT color=#0000ff>"(?3<font color=\"#0000A0\">$&</font>)"
|
||||
</FONT> <FONT color=#0000ff>"(?4<font color=\"#0000FF\">$&</font>)"
|
||||
</FONT> <FONT color=#0000ff>"(?5<B>$&</B>)"</FONT>;
|
||||
|
||||
<B>const</B> <B>char</B>* header_text = <FONT color=#0000ff>"<HTML>\n<HEAD>\n"
|
||||
</FONT> <FONT color=#0000ff>"<TITLE>Auto-generated html formated source</TITLE>\n"
|
||||
</FONT> <FONT color=#0000ff>"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=windows-1252\">\n"
|
||||
</FONT> <FONT color=#0000ff>"</HEAD>\n"
|
||||
</FONT> <FONT color=#0000ff>"<BODY LINK=\"#0000ff\" VLINK=\"#800080\" BGCOLOR=\"#ffffff\">\n"
|
||||
</FONT> <FONT color=#0000ff>"<P> </P>\n<PRE>"</FONT>;
|
||||
|
||||
<B>const</B> <B>char</B>* footer_text = <FONT color=#0000ff>"</PRE>\n</BODY>\n\n"</FONT>;
|
||||
</PRE>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
328
doc/regex_search.html
Normal file
328
doc/regex_search.html
Normal file
@ -0,0 +1,328 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Algorithm regex_search</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<LINK href="../../../boost.css" type="text/css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td vAlign="top" width="300">
|
||||
<h3><A href="../../../index.htm"><IMG height="86" alt="C++ Boost" src="../../../c++boost.gif" width="277" border="0"></A></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Algorithm regex_search</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><A href="index.html"><IMG height="45" alt="Boost.Regex Index" src="uarrow.gif" width="43" border="0"></A></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<H3>Contents</H3>
|
||||
<dl class="index">
|
||||
<dt><A href="#synopsis">Synopsis</A> <dt><a href="#description">Description</a> <dt><A href="#examples">
|
||||
Examples</A></dt></dl>
|
||||
<H3><A name="synopsis"></A>Synopsis</H3>
|
||||
<PRE>#include <<A href="../../boost/regex.hpp">boost/regex.hpp</A>> </PRE>
|
||||
<P></P>
|
||||
<P>The algorithm regex_search will search a range denoted by a pair of
|
||||
bidirectional-iterators for a given regular expression. The algorithm uses
|
||||
various heuristics to reduce the search time by only checking for a match if a
|
||||
match could conceivably start at that position. The algorithm is defined as
|
||||
follows:
|
||||
<PRE>template <class BidirectionalIterator,
|
||||
class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
|
||||
<a href="match_results.html">match_results</a><BidirectionalIterator, Allocator>& m,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator2>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);
|
||||
|
||||
template <class ST, class SA,
|
||||
class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_search(const basic_string<charT, ST, SA>& s,
|
||||
<a href="match_results.html">match_results</a><
|
||||
typename basic_string<charT, ST,SA>::const_iterator,
|
||||
Allocator>& m,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator2>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);
|
||||
|
||||
template<class charT, class Allocator, class traits,
|
||||
class Allocator2>
|
||||
bool regex_search(const charT* str,
|
||||
<a href="match_results.html">match_results</a><const charT*, Allocator>& m,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator2>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);
|
||||
|
||||
template <class BidirectionalIterator, class Allocator,
|
||||
class charT, class traits>
|
||||
bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);
|
||||
|
||||
template <class charT, class Allocator,
|
||||
class traits>
|
||||
bool regex_search(const charT* str,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);
|
||||
|
||||
template<class ST, class SA,
|
||||
class Allocator, class charT,
|
||||
class traits>
|
||||
bool regex_search(const basic_string<charT, ST, SA>& s,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);
|
||||
</PRE>
|
||||
<H3><A name="description"></A>Description</H3>
|
||||
<PRE>template <class BidirectionalIterator, class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_search(BidirectionalIterator first, BidirectionalIterator last,
|
||||
<a href="match_results.html">match_results</a><BidirectionalIterator, Allocator>& m,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator2>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
|
||||
<P><B> Requires:</B> Type BidirectionalIterator meets the requirements of a
|
||||
Bidirectional Iterator (24.1.4).</P>
|
||||
<P><B> Effects: </B>Determines whether there is some sub-sequence within
|
||||
[first,last) that matches the regular expression <I>e</I>, parameter <I>flags</I>
|
||||
is used to control how the expression is matched against the character
|
||||
sequence. Returns true if such a sequence exists, false otherwise.</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<P><B> Postconditions: </B>If the function returns false, then the effect on
|
||||
parameter <I>m</I> is undefined, otherwise the effects on parameter <I>m</I> are
|
||||
given in the table:</P>
|
||||
<DIV align="center">
|
||||
<CENTER>
|
||||
<TABLE id="Table2" cellSpacing="1" cellPadding="7" width="624" border="1">
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P><B> Element</B></P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P><B> Value</B>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.size()</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>e.mark_count()</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.empty()</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>false</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>first</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().last</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].first</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.prefix().first != m.prefix().second</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].second</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().last</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>last</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m.suffix().first != m.suffix().second</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The start of the sequence of characters that matched the regular expression</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].second</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The end of the sequence of characters that matched the regular expression</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[0].matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P><CODE> true</CODE> if a full match was found, and <CODE>false</CODE> if it was
|
||||
a partial match (found as a result of the <CODE>match_partial</CODE> flag being
|
||||
set).</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[n].first</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>For all integers n < m.size(), the start of the sequence that matched
|
||||
sub-expression <I>n</I>. Alternatively, if sub-expression n did not participate
|
||||
in the match, then <I>last</I>.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[n].second</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>For all integers n < m.size(), the end of the sequence that matched
|
||||
sub-expression <I>n</I>. Alternatively, if sub-expression n did not participate
|
||||
in the match, then <I>last</I>.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>m[n].matched</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>For all integers n < m.size(), true if sub-expression <I>n</I> participated
|
||||
in the match, false otherwise.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TD></TR></TABLE>
|
||||
</CENTER>
|
||||
</DIV>
|
||||
<PRE>template <class charT, class Allocator, class traits, class Allocator2>
|
||||
bool regex_search(const charT* str, <a href="match_results.html">match_results</a><const charT*, Allocator>& m,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator2>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_search(str, str +
|
||||
char_traits<charT>::length(str), m, e, flags)</CODE>.</P>
|
||||
<PRE>template <class ST, class SA, class Allocator, class charT,
|
||||
class traits, class Allocator2>
|
||||
bool regex_search(const basic_string<charT, ST, SA>& s,
|
||||
<a href="match_results.html">match_results</a><typename basic_string<charT, ST, SA>::const_iterator, Allocator>& m,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator2>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_search(s.begin(), s.end(), m,
|
||||
e, flags)</CODE>.</P>
|
||||
<PRE>template <class iterator, class Allocator, class charT,
|
||||
class traits>
|
||||
bool regex_search(iterator first, iterator last,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Behaves "as if" by constructing an instance of <CODE><a href="match_results.html">
|
||||
match_results</a><</CODE>BidirectionalIterator<CODE>> what</CODE>,
|
||||
and then returning the result of <CODE>regex_search(first, last, what, e, flags)</CODE>.</P>
|
||||
<PRE>template <class charT, class Allocator, class traits>
|
||||
bool regex_search(const charT* str
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_search(str, str +
|
||||
char_traits<charT>::length(str), e, flags)</CODE>.</P>
|
||||
<PRE>template <class ST, class SA, class Allocator, class charT,
|
||||
class traits>
|
||||
bool regex_search(const basic_string<charT, ST, SA>& s,
|
||||
const <a href="basic_regex.html">basic_regex</a><charT, traits, Allocator>& e,
|
||||
<a href="match_flag_type.html">match_flag_type</a> flags = match_default);</PRE>
|
||||
<P><B> Effects:</B> Returns the result of <CODE>regex_search(s.begin(), s.end(), e,
|
||||
flags)</CODE>.
|
||||
<H3><A name="examples"></A>Examples</H3>
|
||||
<P>The following <A href="../example/snippets/regex_search_example.cpp">example</A>,
|
||||
takes the contents of a file in the form of a string, and searches for all the
|
||||
C++ class declarations in the file. The code will work regardless of the way
|
||||
that std::string is implemented, for example it could easily be modified to
|
||||
work with the SGI rope class, which uses a non-contiguous storage strategy.</P>
|
||||
<P></P>
|
||||
<PRE><FONT color=#008000>#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
</FONT><FONT color=#000080><I>
|
||||
// purpose:
|
||||
// takes the contents of a file in the form of a string
|
||||
// and searches for all the C++ class definitions, storing
|
||||
// their locations in a map of strings/int's
|
||||
</I></FONT><B>typedef</B> std::map<std::string, <B>int</B>, std::less<std::string> > map_type;
|
||||
|
||||
boost::regex expression("^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?(\\{|:[^;\\{()]*\\{)");
|
||||
<B>
|
||||
void</B> IndexClasses(map_type& m, <B>const</B> std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
boost::<a href="match_results.html">match_results</a><std::string::const_iterator> what;
|
||||
<B>unsigned</B> <B>int</B> flags = boost::match_default;
|
||||
<B>while</B>(regex_search(start, end, what, expression, flags))
|
||||
{
|
||||
<FONT color=#000080> <I>// what[0] contains the whole string
|
||||
</I> <I>// what[5] contains the class name.
|
||||
</I> <I>// what[6] contains the template specialisation if any.
|
||||
</I> <I>// add class name and position to map:
|
||||
</I></FONT> m[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - file.begin();
|
||||
<FONT color=#000080><I>// update search position:
|
||||
</I></FONT> start = what[0].second;
|
||||
<FONT color=#000080><I>// update flags:
|
||||
</I></FONT> flags |= boost::match_prev_avail;
|
||||
flags |= boost::match_not_bob;
|
||||
}
|
||||
}
|
||||
</PRE>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
148
doc/regex_split.html
Normal file
148
doc/regex_split.html
Normal file
@ -0,0 +1,148 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Algorithm regex_split (deprecated)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Algorithm regex_split (deprecated)</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>The algorithm regex_split has been deprecated in favor of the iterator <A href="regex_token_iterator.html">
|
||||
regex_token_iterator</A> which has a more flexible and powerful interface,
|
||||
as well as following the more usual standard library "pull" rather than "push"
|
||||
semantics.</P>
|
||||
<P>Code which uses regex_split will continue to compile, the following
|
||||
documentation is taken from the previous boost.regex version:</P>
|
||||
<H3><A name="regex_split"></A>Algorithm regex_split</H3>
|
||||
<PRE>#include <<A href="../../../boost/regex.hpp">boost/regex.hpp</A>> </PRE>
|
||||
<P>Algorithm regex_split performs a similar operation to the perl split operation,
|
||||
and comes in three overloaded forms:
|
||||
</P>
|
||||
<PRE><B>template</B> <<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1, <B>class</B> Traits2, <B>class</B> Alloc2>
|
||||
std::size_t regex_split(OutputIterator out,
|
||||
std::basic_string<charT, Traits1, Alloc1>& s,
|
||||
<B> const</B> basic_regex<charT, Traits2, Alloc2>& e,
|
||||
<B> unsigned</B> flags,
|
||||
std::size_t max_split);
|
||||
|
||||
<B>template</B> <<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1, <B>class</B> Traits2, <B>class</B> Alloc2>
|
||||
std::size_t regex_split(OutputIterator out,
|
||||
std::basic_string<charT, Traits1, Alloc1>& s,
|
||||
<B> const</B> basic_regex<charT, Traits2, Alloc2>& e,
|
||||
<B>unsigned</B> flags = match_default);
|
||||
|
||||
<B>template</B> <<B>class</B> OutputIterator, <B>class</B> charT, <B>class</B> Traits1, <B>class</B> Alloc1>
|
||||
std::size_t regex_split(OutputIterator out,
|
||||
std::basic_string<charT, Traits1, Alloc1>& s);</PRE>
|
||||
<P><STRONG>Effects: </STRONG>Each version of the algorithm takes an
|
||||
output-iterator for output, and a string for input. If the expression contains
|
||||
no marked sub-expressions, then the algorithm writes one string onto the
|
||||
output-iterator for each section of input that does not match the expression.
|
||||
If the expression does contain marked sub-expressions, then each time a match
|
||||
is found, one string for each marked sub-expression will be written to the
|
||||
output-iterator. No more than <I>max_split </I>strings will be written to the
|
||||
output-iterator. Before returning, all the input processed will be deleted from
|
||||
the string <I>s</I> (if <I>max_split </I>is not reached then all of <I>s</I> will
|
||||
be deleted). Returns the number of strings written to the output-iterator. If
|
||||
the parameter <I>max_split</I> is not specified then it defaults to UINT_MAX.
|
||||
If no expression is specified, then it defaults to "\s+", and splitting occurs
|
||||
on whitespace.
|
||||
</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<P><A href="../example/snippets/regex_split_example_1.cpp">Example</A>: the
|
||||
following function will split the input string into a series of tokens, and
|
||||
remove each token from the string <I>s</I>:
|
||||
</P>
|
||||
<PRE><B>unsigned</B> tokenise(std::list<std::string>& l, std::string& s)
|
||||
{
|
||||
<B> return</B> boost::regex_split(std::back_inserter(l), s);
|
||||
}</PRE>
|
||||
<P><A href="../example/snippets/regex_split_example_2.cpp">Example</A>: the
|
||||
following short program will extract all of the URL's from a html file, and
|
||||
print them out to <I>cout</I>:
|
||||
</P>
|
||||
<PRE><FONT color=#008000>#include <list>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <boost/regex.hpp>
|
||||
</FONT>
|
||||
boost::regex e(<FONT color=#000080>"<\\s*A\\s+[^>]*href\\s*=\\s*\"([^\"]*)\""</FONT>,
|
||||
boost::regbase::normal | boost::regbase::icase);
|
||||
|
||||
<B>void</B> load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
<FONT color=#000080>//
|
||||
// attempt to grow string buffer to match file size,
|
||||
// this doesn't always work...
|
||||
</FONT> s.reserve(is.rdbuf()-&gtin_avail());
|
||||
<B>char</B> c;
|
||||
<B>while</B>(is.get(c))
|
||||
{
|
||||
<FONT color=#000080>// use logarithmic growth stategy, in case
|
||||
// in_avail (above) returned zero:
|
||||
</FONT> <B>if</B>(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * 3);
|
||||
s.append(1, c);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
<B>int</B> main(<B>int</B> argc, <B>char</B>** argv)
|
||||
{
|
||||
std::string s;
|
||||
std::list<std::string> l;
|
||||
|
||||
<B>for</B>(<B>int</B> i = 1; i < argc; ++i)
|
||||
{
|
||||
std::cout << <FONT color=#000080>"Findings URL's in "</FONT> << argv[i] << <FONT color=#000080>":"</FONT> << std::endl;
|
||||
s.erase();
|
||||
std::ifstream is(argv[i]);
|
||||
load_file(s, is);
|
||||
boost::regex_split(std::back_inserter(l), s, e);
|
||||
<B>while</B>(l.size())
|
||||
{
|
||||
s = *(l.begin());
|
||||
l.pop_front();
|
||||
std::cout << s << std::endl;
|
||||
}
|
||||
}
|
||||
<B>return</B> 0;
|
||||
}</PRE>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
286
doc/regex_token_iterator.html
Normal file
286
doc/regex_token_iterator.html
Normal file
@ -0,0 +1,286 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: regex_token_iterator</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<LINK href="../../../boost.css" type="text/css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td vAlign="top" width="300">
|
||||
<h3><A href="../../../index.htm"><IMG height="86" alt="C++ Boost" src="../../../c++boost.gif" width="277" border="0"></A></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">regex_token_iterator</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><A href="index.html"><IMG height="45" alt="Boost.Regex Index" src="uarrow.gif" width="43" border="0"></A></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<H3>Contents</H3>
|
||||
<dl class="index">
|
||||
<dt><A href="#synopsis">Synopsis</A> <dt><a href="#description">Description</a> <dt><A href="#examples">
|
||||
Examples</A></dt></dl>
|
||||
<H3><A name="synopsis"></A>Synopsis</H3>
|
||||
<P>The template class <CODE>regex_token_iterator</CODE> is an iterator adapter;
|
||||
that is to say it represents a new view of an existing iterator sequence, by
|
||||
enumerating all the occurrences of a regular expression within that sequence,
|
||||
and presenting one or more new strings for each match found. Each position
|
||||
enumerated by the iterator is a string that represents what matched a
|
||||
particular sub-expression within the regular expression. When class <CODE>regex_token_iterator</CODE>
|
||||
is used to enumerate a single sub-expression with index -1, then the iterator
|
||||
performs field splitting: that is to say it enumerates one string for each
|
||||
section of the character container sequence that does not match the regular
|
||||
expression specified.</P>
|
||||
<PRE>
|
||||
template <class BidirectionalIterator,
|
||||
class charT = iterator_traits<BidirectionalIterator>::value_type,
|
||||
class traits = regex_traits<charT>,
|
||||
class Allocator = allocator<charT> >
|
||||
class regex_token_iterator
|
||||
{
|
||||
public:
|
||||
typedef basic_regex<charT, traits, Allocator> regex_type;
|
||||
typedef basic_string<charT> value_type;
|
||||
typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type;
|
||||
typedef const value_type* pointer;
|
||||
typedef const value_type& reference;
|
||||
typedef std::forward_iterator_tag iterator_category;
|
||||
|
||||
regex_token_iterator();
|
||||
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
|
||||
int submatch = 0, match_flag_type m = match_default);
|
||||
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
|
||||
const std::vector<int>& submatches, match_flag_type m = match_default);
|
||||
template <std::size_t N>
|
||||
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
|
||||
const int (&submatches)[N], match_flag_type m = match_default);
|
||||
regex_token_iterator(const regex_token_iterator&);
|
||||
regex_token_iterator& operator=(const regex_token_iterator&);
|
||||
bool operator==(const regex_token_iterator&);
|
||||
bool operator!=(const regex_token_iterator&);
|
||||
const value_type& operator*();
|
||||
const value_type* operator->();
|
||||
regex_token_iterator& operator++();
|
||||
regex_token_iterator operator++(int);
|
||||
};
|
||||
</PRE>
|
||||
<H3><A name="description"></A>Description</H3>
|
||||
<PRE>regex_token_iterator();</PRE>
|
||||
<P><B> Effects:</B> constructs an end of sequence iterator.</P>
|
||||
<PRE>regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
|
||||
int submatch = 0, match_flag_type m = match_default);</PRE>
|
||||
<P><B> Preconditions: </B><CODE>!re.empty()</CODE>.</P>
|
||||
<P><B> Effects:</B> constructs a regex_token_iterator that will enumerate one
|
||||
string for each regular expression match of the expression <EM>re</EM> found
|
||||
within the sequence <EM>[a,b)</EM>, using match flags <EM>m</EM>. The
|
||||
string enumerated is the sub-expression <EM>submatch </EM>for each match
|
||||
found; if <EM>submatch </EM>is -1, then enumerates all the text sequences that
|
||||
did not match the expression <EM>re </EM>(that is to performs field splitting).</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<PRE>regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
|
||||
const std::vector<int>& submatches, match_flag_type m = match_default);</PRE>
|
||||
<P><B> Preconditions:</B> <CODE>submatches.size() && !re.empty()</CODE>.</P>
|
||||
<P><B> Effects:</B> constructs a regex_token_iterator that will enumerate <EM>submatches.size()</EM>
|
||||
strings for each regular expression match of the expression <EM>re</EM> found
|
||||
within the sequence <EM>[a,b)</EM>, using match flags <EM>m</EM>. For
|
||||
each match found one string will be enumerated for each sub-expression
|
||||
index contained within <EM>submatches </EM>vector; if <EM>submatches[0] </EM>
|
||||
is -1, then the first string enumerated for each match will be all of the text
|
||||
from end of the last match to the start of the current match, in addition there
|
||||
will be one extra string enumerated when no more matches can be found: from the
|
||||
end of the last match found, to the end of the underlying sequence.</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<PRE>template <std::size_t N>
|
||||
regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
|
||||
const int (&submatches)[R], match_flag_type m = match_default);</PRE>
|
||||
<P><B> Preconditions: </B><CODE>!re.empty()</CODE>.</P>
|
||||
<P><STRONG>Effects:</STRONG></B> constructs a regex_token_iterator that will
|
||||
enumerate <EM>R</EM> strings for each regular expression match of the
|
||||
expression <EM>re</EM> found within the sequence <EM>[a,b)</EM>, using match
|
||||
flags <EM>m</EM>. For each match found one string will be
|
||||
enumerated for each sub-expression index contained within the <EM>submatches
|
||||
</EM>array; if <EM>submatches[0] </EM>is -1, then the first string enumerated
|
||||
for each match will be all of the text from end of the last match to the start
|
||||
of the current match, in addition there will be one extra string enumerated
|
||||
when no more matches can be found: from the end of the last match found, to the
|
||||
end of the underlying sequence.</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<PRE>regex_token_iterator(const regex_token_iterator& that);</PRE>
|
||||
<P><B> Effects: </B>constructs a copy of <CODE>that</CODE>.</P>
|
||||
<P><B> Postconditions:</B> <CODE>*this == that</CODE>.</P>
|
||||
<PRE>regex_token_iterator& operator=(const regex_token_iterator& that);</PRE>
|
||||
<P><B> Effects: </B>sets <CODE>*this</CODE> to be equal to <CODE>that</CODE>.</P>
|
||||
<P><B> Postconditions:</B> <CODE>*this == that</CODE>.</P>
|
||||
<PRE>bool operator==(const regex_token_iterator&);</PRE>
|
||||
<P>
|
||||
<B>Effects: </B>returns true if *this is the same position as that.</P>
|
||||
<PRE>bool operator!=(const regex_token_iterator&);</PRE>
|
||||
<P>
|
||||
<B>Effects: </B>returns <CODE>!(*this == that)</CODE>.</P>
|
||||
<PRE>const value_type& operator*();</PRE>
|
||||
<P>
|
||||
<B>Effects: </B>returns the current string being enumerated.</P>
|
||||
<PRE>const value_type* operator->();</PRE>
|
||||
<P>
|
||||
<B>Effects: </B>returns <CODE>&(*this)</CODE>.</P>
|
||||
<PRE>regex_token_iterator& operator++();</PRE>
|
||||
<P>
|
||||
<B>Effects: </B>Moves on to the next string to be enumerated.</P>
|
||||
<P><STRONG>Throws:</STRONG> <CODE>std::runtime_error</CODE> if the complexity of
|
||||
matching the expression against an N character string begins to exceed O(N<SUP>2</SUP>),
|
||||
or if the program runs out of stack space while matching the expression (if
|
||||
Boost.regex is <A href="configuration.html">configured</A> in recursive mode),
|
||||
or if the matcher exhausts it's permitted memory allocation (if Boost.regex is <A href="configuration.html">
|
||||
configured</A> in non-recursive mode).</P>
|
||||
<B>
|
||||
<P>
|
||||
Returns:</B><CODE> *this</CODE>.</P><PRE>regex_token_iterator& operator++(int);</PRE>
|
||||
<P><B> Effects:</B> constructs a copy <CODE>result</CODE> of <CODE>*this</CODE>,
|
||||
then calls <CODE>++(*this)</CODE>.</P>
|
||||
<P><B> Returns:</B> <CODE>result</CODE>.<A name="examples"></A>
|
||||
<H3>Examples</H3>
|
||||
<P>The following <A href="../example/snippets/regex_token_iterator_example_1.cpp">example</A>
|
||||
takes a string and splits it into a series of tokens:</P>
|
||||
<pre>
|
||||
<FONT color=#008040>#include <iostream></FONT>
|
||||
<FONT color=#008040>#include <boost/regex.hpp></FONT>
|
||||
|
||||
<B>using</B> <B>namespace</B> std;
|
||||
|
||||
<B>int</B> main(<B>int</B> argc)
|
||||
{
|
||||
string s;
|
||||
<B>do</B>{
|
||||
<B>if</B>(argc == <FONT color=#0000a0>1</FONT>)
|
||||
{
|
||||
cout << <FONT color=#0000ff>"Enter text to split (or \"quit\" to exit): "</FONT>;
|
||||
getline(cin, s);
|
||||
<B>if</B>(s == <FONT color=#0000ff>"quit"</FONT>) <B>break</B>;
|
||||
}
|
||||
<B>else</B>
|
||||
s = <FONT color=#0000ff>"This is a string of tokens"</FONT>;
|
||||
|
||||
boost::regex re(<FONT color=#0000ff>"\\s+"</FONT>);
|
||||
boost::regex_token_iterator<std::string::const_iterator> i(s.begin(), s.end(), re, -<FONT color=#0000a0>1</FONT>);
|
||||
boost::regex_token_iterator<std::string::const_iterator> j;
|
||||
|
||||
<B>unsigned</B> count = <FONT color=#0000a0>0</FONT>;
|
||||
<B>while</B>(i != j)
|
||||
{
|
||||
cout << *i++ << endl;
|
||||
count++;
|
||||
}
|
||||
cout << <FONT color=#0000ff>"There were "</FONT> << count << <FONT color=#0000ff>" tokens found."</FONT> << endl;
|
||||
|
||||
}<B>while</B>(argc == <FONT color=#0000a0>1</FONT>);
|
||||
<B>return</B> <FONT color=#0000a0>0</FONT>;
|
||||
}
|
||||
|
||||
</pre>
|
||||
<P>The following <A href="../example/snippets/regex_token_iterator_example_2.cpp">example</A>
|
||||
takes a html file and outputs a list of all the linked files:</P>
|
||||
<pre>
|
||||
<FONT color=#008040>#include <fstream></FONT>
|
||||
<FONT color=#008040>#include <iostream></FONT>
|
||||
<FONT color=#008040>#include <iterator></FONT>
|
||||
<FONT color=#008040>#include <boost/regex.hpp></FONT>
|
||||
|
||||
boost::regex e(<FONT color=#0000ff>"<\\s*A\\s+[^>]*href\\s*=\\s*\"([^\"]*)\""</FONT>,
|
||||
boost::regex::normal | boost::regbase::icase);
|
||||
|
||||
<B>void</B> load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
<I><FONT color=#000080>//</FONT></I>
|
||||
<I><FONT color=#000080>// attempt to grow string buffer to match file size,</FONT></I>
|
||||
<I><FONT color=#000080>// this doesn't always work...</FONT></I>
|
||||
s.reserve(is.rdbuf()->in_avail());
|
||||
<B>char</B> c;
|
||||
<B>while</B>(is.get(c))
|
||||
{
|
||||
<I><FONT color=#000080>// use logarithmic growth stategy, in case</FONT></I>
|
||||
<I><FONT color=#000080>// in_avail (above) returned zero:</FONT></I>
|
||||
<B>if</B>(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * <FONT color=#0000a0>3</FONT>);
|
||||
s.append(<FONT color=#0000a0>1</FONT>, c);
|
||||
}
|
||||
}
|
||||
|
||||
<B>int</B> main(<B>int</B> argc, <B>char</B>** argv)
|
||||
{
|
||||
std::string s;
|
||||
<B>int</B> i;
|
||||
<B>for</B>(i = <FONT color=#0000a0>1</FONT>; i < argc; ++i)
|
||||
{
|
||||
std::cout << <FONT color=#0000ff>"Findings URL's in "</FONT> << argv[i] << <FONT color=#0000ff>":"</FONT> << std::endl;
|
||||
s.erase();
|
||||
std::ifstream is(argv[i]);
|
||||
load_file(s, is);
|
||||
boost::regex_token_iterator<std::string::const_iterator>
|
||||
i(s.begin(), s.end(), e, <FONT color=#0000a0>1</FONT>);
|
||||
boost::regex_token_iterator<std::string::const_iterator> j;
|
||||
<B>while</B>(i != j)
|
||||
{
|
||||
std::cout << *i++ << std::endl;
|
||||
}
|
||||
}
|
||||
<I><FONT color=#000080>//</FONT></I>
|
||||
<I><FONT color=#000080>// alternative method:</FONT></I>
|
||||
<I><FONT color=#000080>// test the array-literal constructor, and split out the whole</FONT></I>
|
||||
<I><FONT color=#000080>// match as well as $1....</FONT></I>
|
||||
<I><FONT color=#000080>//</FONT></I>
|
||||
<B>for</B>(i = <FONT color=#0000a0>1</FONT>; i < argc; ++i)
|
||||
{
|
||||
std::cout << <FONT color=#0000ff>"Findings URL's in "</FONT> << argv[i] << <FONT color=#0000ff>":"</FONT> << std::endl;
|
||||
s.erase();
|
||||
std::ifstream is(argv[i]);
|
||||
load_file(s, is);
|
||||
<B>const</B> <B>int</B> subs[] = {<FONT color=#0000a0>1</FONT>, <FONT color=#0000a0>0</FONT>,};
|
||||
boost::regex_token_iterator<std::string::const_iterator>
|
||||
i(s.begin(), s.end(), e, subs);
|
||||
boost::regex_token_iterator<std::string::const_iterator> j;
|
||||
<B>while</B>(i != j)
|
||||
{
|
||||
std::cout << *i++ << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
<B>return</B> <FONT color=#0000a0>0</FONT>;
|
||||
}
|
||||
</pre>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
48
doc/regex_traits.html
Normal file
48
doc/regex_traits.html
Normal file
@ -0,0 +1,48 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: class regex_traits</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">class regex_traits</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<p></p>
|
||||
<P>Under construction.</P>
|
||||
<P>The current boost.regex traits class design will be migrated to that specified
|
||||
in the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">regular
|
||||
expression standardization proposal</A>. </P>
|
||||
<P>
|
||||
<HR>
|
||||
<P></P>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
79
doc/standards.html
Normal file
79
doc/standards.html
Normal file
@ -0,0 +1,79 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Standards Conformance</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Standards Conformance</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<H3>C++</H3>
|
||||
<P>Boost.regex is intended to conform to the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
|
||||
regular expression standardization proposal</A>, which will appear in a
|
||||
future C++ standard technical report (and hopefully in a future version of the
|
||||
standard). Currently there are some differences in how the regular
|
||||
expression traits classes are defined, these will be fixed in a future release.</P>
|
||||
<H3>ECMAScript / JavaScript</H3>
|
||||
<P>All of the ECMAScript regular expression syntax features are supported, except
|
||||
that:</P>
|
||||
<P>Negated class escapes (\S, \D and \W) are not permitted inside character class
|
||||
definitions ( [...] ).</P>
|
||||
<P>The escape sequence \u matches any upper case character (the same as
|
||||
[[:upper:]]) rather than a Unicode escape sequence; use \x{DDDD} for
|
||||
Unicode escape sequences.</P>
|
||||
<H3>Perl</H3>
|
||||
<P>Almost all Perl features are supported, except for:</P>
|
||||
<P>\N{name} Use [[:name:]] instead.</P>
|
||||
<P>\pP and \PP</P>
|
||||
<P>(?imsx-imsx)</P>
|
||||
<P>(?<=pattern)</P>
|
||||
<P>(?<!pattern)</P>
|
||||
<P>(?{code})</P>
|
||||
<P>(??{code})</P>
|
||||
<P>(?(condition)yes-pattern) and (?(condition)yes-pattern|no-pattern)</P>
|
||||
<P>These embarrassments / limitations will be removed in due course, mainly
|
||||
dependent upon user demand.</P>
|
||||
<H3>POSIX</H3>
|
||||
<P>All the POSIX basic and extended regular expression features are supported,
|
||||
except that:</P>
|
||||
<P>No character collating names are recognized except those specified in the POSIX
|
||||
standard for the C locale, unless they are explicitly registered with the
|
||||
traits class.</P>
|
||||
<P>Character equivalence classes ( [[=a=]] etc) are probably buggy except on
|
||||
Win32. Implementing this feature requires knowledge of the format of the
|
||||
string sort keys produced by the system; if you need this, and the default
|
||||
implementation doesn't work on your platform, then you will need to supply a
|
||||
custom traits class.</P>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
426
doc/sub_match.html
Normal file
426
doc/sub_match.html
Normal file
@ -0,0 +1,426 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: sub_match</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">sub_match</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<H3>Synopsis</H3>
|
||||
<P>#include <<A href="../../boost/regex.hpp">boost/regex.hpp</A>>
|
||||
</P>
|
||||
<P>Regular expressions are different from many simple pattern-matching algorithms
|
||||
in that as well as finding an overall match they can also produce
|
||||
sub-expression matches: each sub-expression being delimited in the pattern by a
|
||||
pair of parenthesis (...). There has to be some method for reporting
|
||||
sub-expression matches back to the user: this is achieved this by defining a
|
||||
class <I><A href="match_results.htm">match_results</A></I> that acts as an
|
||||
indexed collection of sub-expression matches, each sub-expression match being
|
||||
contained in an object of type <I>sub_match</I>
|
||||
.
|
||||
<P>Objects of type <EM>sub_match</EM> may only obtained by subscripting an object
|
||||
of type <EM><A href="match_results.html">match_results</A></EM>
|
||||
.
|
||||
<P>When the marked sub-expression denoted by an object of type sub_match<>
|
||||
participated in a regular expression match then member <CODE>matched</CODE> evaluates
|
||||
to true, and members <CODE>first</CODE> and <CODE>second</CODE> denote the
|
||||
range of characters <CODE>[first,second)</CODE> which formed that match.
|
||||
Otherwise <CODE>matched</CODE> is false, and members <CODE>first</CODE> and <CODE>second</CODE>
|
||||
contained undefined values.</P>
|
||||
<P>If an object of type <CODE>sub_match<></CODE> represents sub-expression 0
|
||||
- that is to say the whole match - then member <CODE>matched</CODE> is always
|
||||
true, unless a partial match was obtained as a result of the flag <CODE>match_partial</CODE>
|
||||
being passed to a regular expression algorithm, in which case member <CODE>matched</CODE>
|
||||
is false, and members <CODE>first</CODE> and <CODE>second</CODE> represent the
|
||||
character range that formed the partial match.</P>
|
||||
<PRE>
|
||||
namespace boost{
|
||||
|
||||
template <class BidirectionalIterator>
|
||||
class sub_match : public std::pair<BidirectionalIterator, BidirectionalIterator>
|
||||
{
|
||||
public:
|
||||
typedef typename iterator_traits<BidirectionalIterator>::value_type value_type;
|
||||
typedef typename iterator_traits<BidirectionalIterator>::difference_type difference_type;
|
||||
typedef BidirectionalIterator iterator;
|
||||
|
||||
bool matched;
|
||||
|
||||
difference_type length()const;
|
||||
operator basic_string<value_type>()const;
|
||||
basic_string<value_type> str()const;
|
||||
|
||||
int compare(const sub_match& s)const;
|
||||
int compare(const basic_string<value_type>& s)const;
|
||||
int compare(const value_type* s)const;
|
||||
};
|
||||
|
||||
template <class BidirectionalIterator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
|
||||
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator == (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator != (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator < (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator > (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator >= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator <= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& rhs);
|
||||
template <class BidirectionalIterator, class traits, class Allocator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>& rhs);
|
||||
|
||||
template <class BidirectionalIterator>
|
||||
bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
|
||||
template <class BidirectionalIterator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs);
|
||||
|
||||
template <class BidirectionalIterator>
|
||||
bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);
|
||||
|
||||
template <class BidirectionalIterator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs);
|
||||
template <class BidirectionalIterator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs);
|
||||
|
||||
template <class charT, class traits, class BidirectionalIterator>
|
||||
basic_ostream<charT, traits>&
|
||||
operator << (basic_ostream<charT, traits>& os,
|
||||
const sub_match<BidirectionalIterator>& m);
|
||||
|
||||
} // namespace boost</PRE>
|
||||
<H3>Description</H3>
|
||||
<H4>
|
||||
sub_match members</H4>
|
||||
<PRE>typedef typename std::iterator_traits<iterator>::value_type value_type;</PRE>
|
||||
<P>The type pointed to by the iterators.</P>
|
||||
<PRE>typedef typename std::iterator_traits<iterator>::difference_type difference_type;</PRE>
|
||||
<P>A type that represents the difference between two iterators.</P>
|
||||
<PRE>typedef iterator iterator_type;</PRE>
|
||||
<P>The iterator type.</P>
|
||||
<PRE>iterator first</PRE>
|
||||
<P>An iterator denoting the position of the start of the match.</P>
|
||||
<PRE>iterator second</PRE>
|
||||
<P>An iterator denoting the position of the end of the match.</P>
|
||||
<PRE>bool matched</PRE>
|
||||
<P>A Boolean value denoting whether this sub-expression participated in the match.</P>
|
||||
<PRE>static difference_type length();</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>(matched ? 0 : distance(first, second))</CODE>.</P><PRE>operator basic_string<value_type>()const;</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>(matched ? basic_string<value_type>(first,
|
||||
second) : basic_string<value_type>()).</P></CODE><PRE>basic_string<value_type> str()const;</PRE>
|
||||
|
||||
<P><B>
|
||||
Effects: </B>returns <CODE>(matched ? basic_string<value_type>(first,
|
||||
second) : basic_string<value_type>())</CODE>.</P><PRE>int compare(const sub_match& s)const;</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>str().compare(s.str())</CODE>.</P><PRE>int compare(const basic_string<value_type>& s)const;</PRE>
|
||||
|
||||
<P><B>
|
||||
Effects: </B>returns <CODE>str().compare(s)</CODE>.</P><PRE>int compare(const value_type* s)const;</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>str().compare(s)</CODE>.</P>
|
||||
<H4>
|
||||
sub_match non-member operators</H4>
|
||||
<PRE>template <class BidirectionalIterator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.compare(rhs) == 0</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.compare(rhs) != 0</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.compare(rhs) < 0</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);</PRE>
|
||||
|
||||
<P><B>
|
||||
Effects: </B>returns <CODE>lhs.compare(rhs) <= 0</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.compare(rhs) >= 0</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs);</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.compare(rhs) > 0</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs < rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs > rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs >= rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs <= rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() < rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() > rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() >= rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const* rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() <= rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs == rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs != rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs < rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs > rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs >= rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
|
||||
const sub_match<BidirectionalIterator>& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs <= rhs.str()</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator == (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() == rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator != (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() != rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator < (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() < rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator > (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() > rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator >= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() >= rhs</CODE>.</P><PRE>template <class BidirectionalIterator>
|
||||
bool operator <= (const sub_match<BidirectionalIterator>& lhs,
|
||||
typename iterator_traits<BidirectionalIterator>::value_type const& rhs); </PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>lhs.str() <= rhs</CODE>.</P><PRE>template <class charT, class traits, class BidirectionalIterator>
|
||||
basic_ostream<charT, traits>&
|
||||
operator << (basic_ostream<charT, traits>& os
|
||||
const sub_match<BidirectionalIterator>& m);</PRE>
|
||||
|
||||
<P> <B>
|
||||
Effects: </B>returns <CODE>(os << m.str())</CODE>.
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
773
doc/syntax.html
Normal file
773
doc/syntax.html
Normal file
@ -0,0 +1,773 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Regular Expression Syntax</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Regular Expression Syntax</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<P>This section covers the regular expression syntax used by this library, this is
|
||||
a programmers guide, the actual syntax presented to your program's users will
|
||||
depend upon the flags used during expression compilation.
|
||||
</P>
|
||||
<H3>Literals
|
||||
</H3>
|
||||
<P>All characters are literals except: ".", "|", "*", "?", "+", "(", ")", "{",
|
||||
"}", "[", "]", "^", "$" and "\". These characters are literals when preceded by
|
||||
a "\". A literal is a character that matches itself, or matches the result of
|
||||
traits_type::translate(), where traits_type is the traits template parameter to
|
||||
class basic_regex.</P>
|
||||
<H3>Wildcard
|
||||
</H3>
|
||||
<P>The dot character "." matches any single character except : when <I>match_not_dot_null</I>
|
||||
is passed to the matching algorithms, the dot does not match a null character;
|
||||
when <I>match_not_dot_newline</I> is passed to the matching algorithms, then
|
||||
the dot does not match a newline character.
|
||||
</P>
|
||||
<H3>Repeats
|
||||
</H3>
|
||||
<P>A repeat is an expression that is repeated an arbitrary number of times. An
|
||||
expression followed by "*" can be repeated any number of times including zero.
|
||||
An expression followed by "+" can be repeated any number of times, but at least
|
||||
once, if the expression is compiled with the flag regex_constants::bk_plus_qm
|
||||
then "+" is an ordinary character and "\+" represents a repeat of once or more.
|
||||
An expression followed by "?" may be repeated zero or one times only, if the
|
||||
expression is compiled with the flag regex_constants::bk_plus_qm then "?" is an
|
||||
ordinary character and "\?" represents the repeat zero or once operator. When
|
||||
it is necessary to specify the minimum and maximum number of repeats
|
||||
explicitly, the bounds operator "{}" may be used, thus "a{2}" is the letter "a"
|
||||
repeated exactly twice, "a{2,4}" represents the letter "a" repeated between 2
|
||||
and 4 times, and "a{2,}" represents the letter "a" repeated at least twice with
|
||||
no upper limit. Note that there must be no white-space inside the {}, and there
|
||||
is no upper limit on the values of the lower and upper bounds. When the
|
||||
expression is compiled with the flag regex_constants::bk_braces then "{" and
|
||||
"}" are ordinary characters and "\{" and "\}" are used to delimit bounds
|
||||
instead. All repeat expressions refer to the shortest possible previous
|
||||
sub-expression: a single character; a character set, or a sub-expression
|
||||
grouped with "()" for example.
|
||||
</P>
|
||||
<P>Examples:
|
||||
</P>
|
||||
<P>"ba*" will match all of "b", "ba", "baaa" etc.
|
||||
</P>
|
||||
<P>"ba+" will match "ba" or "baaaa" for example but not "b".
|
||||
</P>
|
||||
<P>"ba?" will match "b" or "ba".
|
||||
</P>
|
||||
<P>"ba{2,4}" will match "baa", "baaa" and "baaaa".
|
||||
</P>
|
||||
<H3>Non-greedy repeats
|
||||
</H3>
|
||||
<P>Whenever the "extended" regular expression syntax is in use (the default) then
|
||||
non-greedy repeats are possible by appending a '?' after the repeat; a
|
||||
non-greedy repeat is one which will match the <I>shortest</I> possible string.
|
||||
</P>
|
||||
<P>For example to match html tag pairs one could use something like:
|
||||
</P>
|
||||
<P>"<\s*tagname[^>]*>(.*?)<\s*/tagname\s*>"
|
||||
</P>
|
||||
<P>In this case $1 will contain the text between the tag pairs, and will be the
|
||||
shortest possible matching string.
|
||||
</P>
|
||||
<H3>Parenthesis
|
||||
</H3>
|
||||
<P>Parentheses serve two purposes, to group items together into a sub-expression,
|
||||
and to mark what generated the match. For example the expression "(ab)*" would
|
||||
match all of the string "ababab". The matching algorithms <A href="template_class_ref.htm#query_match">
|
||||
regex_match</A> and <A href="template_class_ref.htm#reg_search">regex_search</A>
|
||||
each take an instance of <A href="template_class_ref.htm#reg_match">match_results</A>
|
||||
that reports what caused the match, on exit from these functions the <A href="template_class_ref.htm#reg_match">
|
||||
match_results</A> contains information both on what the whole expression
|
||||
matched and on what each sub-expression matched. In the example above
|
||||
match_results[1] would contain a pair of iterators denoting the final "ab" of
|
||||
the matching string. It is permissible for sub-expressions to match null
|
||||
strings. If a sub-expression takes no part in a match - for example if it is
|
||||
part of an alternative that is not taken - then both of the iterators that are
|
||||
returned for that sub-expression point to the end of the input string, and the <I>matched</I>
|
||||
parameter for that sub-expression is <I>false</I>. Sub-expressions are indexed
|
||||
from left to right starting from 1, sub-expression 0 is the whole expression.
|
||||
</P>
|
||||
<H3>Non-Marking Parenthesis
|
||||
</H3>
|
||||
<P>Sometimes you need to group sub-expressions with parenthesis, but don't want
|
||||
the parenthesis to spit out another marked sub-expression, in this case a
|
||||
non-marking parenthesis (?:expression) can be used. For example the following
|
||||
expression creates no sub-expressions:
|
||||
</P>
|
||||
<P>"(?:abc)*"</P>
|
||||
<H3>Forward Lookahead Asserts
|
||||
</H3>
|
||||
<P>There are two forms of these; one for positive forward lookahead asserts, and
|
||||
one for negative lookahead asserts:</P>
|
||||
<P>"(?=abc)" matches zero characters only if they are followed by the expression
|
||||
"abc".</P>
|
||||
<P>"(?!abc)" matches zero characters only if they are not followed by the
|
||||
expression "abc".</P>
|
||||
<H3>Independent sub-expressions</H3>
|
||||
<P>"(?>expression)" matches "expression" as an independent atom (the algorithm
|
||||
will not backtrack into it if a failure occurs later in the expression).</P>
|
||||
<H3>Alternatives
|
||||
</H3>
|
||||
<P>Alternatives occur when the expression can match either one sub-expression or
|
||||
another, each alternative is separated by a "|", or a "\|" if the flag
|
||||
regex_constants::bk_vbar is set, or by a newline character if the flag
|
||||
regex_constants::newline_alt is set. Each alternative is the largest possible
|
||||
previous sub-expression; this is the opposite behavior from repetition
|
||||
operators.
|
||||
</P>
|
||||
<P>Examples:
|
||||
</P>
|
||||
<P>"a(b|c)" could match "ab" or "ac".
|
||||
</P>
|
||||
<P>"abc|def" could match "abc" or "def".
|
||||
</P>
|
||||
<H3>Sets
|
||||
</H3>
|
||||
<P>A set is a set of characters that can match any single character that is a
|
||||
member of the set. Sets are delimited by "[" and "]" and can contain literals,
|
||||
character ranges, character classes, collating elements and equivalence
|
||||
classes. Set declarations that start with "^" contain the compliment of the
|
||||
elements that follow.
|
||||
</P>
|
||||
<P>Examples:
|
||||
</P>
|
||||
<P>Character literals:
|
||||
</P>
|
||||
<P>"[abc]" will match either of "a", "b", or "c".
|
||||
</P>
|
||||
<P>"[^abc] will match any character other than "a", "b", or "c".
|
||||
</P>
|
||||
<P>Character ranges:
|
||||
</P>
|
||||
<P>"[a-z]" will match any character in the range "a" to "z".
|
||||
</P>
|
||||
<P>"[^A-Z]" will match any character other than those in the range "A" to "Z".
|
||||
</P>
|
||||
<P>Note that character ranges are highly locale dependent if the flag
|
||||
regex_constants::collate is set: they match any character that collates between
|
||||
the endpoints of the range, ranges will only behave according to ASCII rules
|
||||
when the default "C" locale is in effect. For example if the library is
|
||||
compiled with the Win32 localization model, then [a-z] will match the ASCII
|
||||
characters a-z, and also 'A', 'B' etc, but not 'Z' which collates just after
|
||||
'z'. This locale specific behavior is disabled by default (in perl mode), and
|
||||
forces ranges to collate according to ASCII character code.
|
||||
</P>
|
||||
<P>Character classes are denoted using the syntax "[:classname:]" within a set
|
||||
declaration, for example "[[:space:]]" is the set of all whitespace characters.
|
||||
Character classes are only available if the flag regex_constants::char_classes
|
||||
is set. The available character classes are:
|
||||
<BR>
|
||||
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table2" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="50%">alnum</TD>
|
||||
<TD vAlign="top" width="50%">Any alpha numeric character.</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">alpha</TD>
|
||||
<TD vAlign="top" width="50%">Any alphabetical character a-z and A-Z. Other
|
||||
characters may also be included depending upon the locale.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">blank</TD>
|
||||
<TD vAlign="top" width="50%">Any blank character, either a space or a tab.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">cntrl</TD>
|
||||
<TD vAlign="top" width="50%">Any control character.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">digit</TD>
|
||||
<TD vAlign="top" width="50%">Any digit 0-9.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">graph</TD>
|
||||
<TD vAlign="top" width="50%">Any graphical character.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">lower</TD>
|
||||
<TD vAlign="top" width="50%">Any lower case character a-z. Other characters may
|
||||
also be included depending upon the locale.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">print</TD>
|
||||
<TD vAlign="top" width="50%">Any printable character.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">punct</TD>
|
||||
<TD vAlign="top" width="50%">Any punctuation character.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">space</TD>
|
||||
<TD vAlign="top" width="50%">Any whitespace character.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">upper</TD>
|
||||
<TD vAlign="top" width="50%">Any upper case character A-Z. Other characters may
|
||||
also be included depending upon the locale.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">xdigit</TD>
|
||||
<TD vAlign="top" width="50%">Any hexadecimal digit character, 0-9, a-f and A-F.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">word</TD>
|
||||
<TD vAlign="top" width="50%">Any word character - all alphanumeric characters plus
|
||||
the underscore.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="50%">Unicode</TD>
|
||||
<TD vAlign="top" width="50%">Any character whose code is greater than 255, this
|
||||
applies to the wide character traits classes only.</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<P>There are some shortcuts that can be used in place of the character classes,
|
||||
provided the flag regex_constants::escape_in_lists is set then you can use:
|
||||
</P>
|
||||
<P>\w in place of [:word:]
|
||||
</P>
|
||||
<P>\s in place of [:space:]
|
||||
</P>
|
||||
<P>\d in place of [:digit:]
|
||||
</P>
|
||||
<P>\l in place of [:lower:]
|
||||
</P>
|
||||
<P>\u in place of [:upper:]
|
||||
</P>
|
||||
<P>Collating elements take the general form [.tagname.] inside a set declaration,
|
||||
where <I>tagname</I> is either a single character, or a name of a collating
|
||||
element, for example [[.a.]] is equivalent to [a], and [[.comma.]] is
|
||||
equivalent to [,]. The library supports all the standard POSIX collating
|
||||
element names, and in addition the following digraphs: "ae", "ch", "ll", "ss",
|
||||
"nj", "dz", "lj", each in lower, upper and title case variations.
|
||||
Multi-character collating elements can result in the set matching more than one
|
||||
character, for example [[.ae.]] would match two characters, but note that
|
||||
[^[.ae.]] would only match one character.
|
||||
</P>
|
||||
<P>
|
||||
Equivalence classes take the general form[=tagname=] inside a set declaration,
|
||||
where <I>tagname</I> is either a single character, or a name of a collating
|
||||
element, and matches any character that is a member of the same primary
|
||||
equivalence class as the collating element [.tagname.]. An equivalence class is
|
||||
a set of characters that collate the same, a primary equivalence class is a set
|
||||
of characters whose primary sort key are all the same (for example strings are
|
||||
typically collated by character, then by accent, and then by case; the primary
|
||||
sort key then relates to the character, the secondary to the accentation, and
|
||||
the tertiary to the case). If there is no equivalence class corresponding to <I>tagname</I>
|
||||
, then[=tagname=] is exactly the same as [.tagname.]. Unfortunately there is no
|
||||
locale independent method of obtaining the primary sort key for a character,
|
||||
except under Win32. For other operating systems the library will "guess" the
|
||||
primary sort key from the full sort key (obtained from <I>strxfrm</I>), so
|
||||
equivalence classes are probably best considered broken under any operating
|
||||
system other than Win32.
|
||||
</P>
|
||||
<P>To include a literal "-" in a set declaration then: make it the first character
|
||||
after the opening "[" or "[^", the endpoint of a range, a collating element, or
|
||||
if the flag regex_constants::escape_in_lists is set then precede with an escape
|
||||
character as in "[\-]". To include a literal "[" or "]" or "^" in a set then
|
||||
make them the endpoint of a range, a collating element, or precede with an
|
||||
escape character if the flag regex_constants::escape_in_lists is set.
|
||||
</P>
|
||||
<H3>Line anchors
|
||||
</H3>
|
||||
<P>An anchor is something that matches the null string at the start or end of a
|
||||
line: "^" matches the null string at the start of a line, "$" matches the null
|
||||
string at the end of a line.
|
||||
</P>
|
||||
<H3>Back references
|
||||
</H3>
|
||||
<P>A back reference is a reference to a previous sub-expression that has already
|
||||
been matched, the reference is to what the sub-expression matched, not to the
|
||||
expression itself. A back reference consists of the escape character "\"
|
||||
followed by a digit "1" to "9", "\1" refers to the first sub-expression, "\2"
|
||||
to the second etc. For example the expression "(.*)\1" matches any string that
|
||||
is repeated about its mid-point for example "abcabc" or "xyzxyz". A back
|
||||
reference to a sub-expression that did not participate in any match, matches
|
||||
the null string: NB this is different to some other regular expression
|
||||
matchers. Back references are only available if the expression is compiled with
|
||||
the flag regex_constants::bk_refs set.
|
||||
</P>
|
||||
<H3>Characters by code
|
||||
</H3>
|
||||
<P>This is an extension to the algorithm that is not available in other libraries,
|
||||
it consists of the escape character followed by the digit "0" followed by the
|
||||
octal character code. For example "\023" represents the character whose octal
|
||||
code is 23. Where ambiguity could occur use parentheses to break the expression
|
||||
up: "\0103" represents the character whose code is 103, "(\010)3 represents the
|
||||
character 10 followed by "3". To match characters by their hexadecimal code,
|
||||
use \x followed by a string of hexadecimal digits, optionally enclosed inside
|
||||
{}, for example \xf0 or \x{aff}, notice the latter example is a Unicode
|
||||
character.</P>
|
||||
<H3>Word operators
|
||||
</H3>
|
||||
<P>The following operators are provided for compatibility with the GNU regular
|
||||
expression library.
|
||||
</P>
|
||||
<P>"\w" matches any single character that is a member of the "word" character
|
||||
class, this is identical to the expression "[[:word:]]".
|
||||
</P>
|
||||
<P>"\W" matches any single character that is not a member of the "word" character
|
||||
class, this is identical to the expression "[^[:word:]]".
|
||||
</P>
|
||||
<P>"\<" matches the null string at the start of a word.
|
||||
</P>
|
||||
<P>"\>" matches the null string at the end of the word.
|
||||
</P>
|
||||
<P>"\b" matches the null string at either the start or the end of a word.
|
||||
</P>
|
||||
<P>"\B" matches a null string within a word.
|
||||
</P>
|
||||
<P>The start of the sequence passed to the matching algorithms is considered to be
|
||||
a potential start of a word unless the flag match_not_bow is set. The end of
|
||||
the sequence passed to the matching algorithms is considered to be a potential
|
||||
end of a word unless the flag match_not_eow is set.
|
||||
</P>
|
||||
<H3>Buffer operators
|
||||
</H3>
|
||||
<P>The following operators are provided for compatibility with the GNU regular
|
||||
expression library, and Perl regular expressions:
|
||||
</P>
|
||||
<P>"\`" matches the start of a buffer.
|
||||
</P>
|
||||
<P>"\A" matches the start of the buffer.
|
||||
</P>
|
||||
<P>"\'" matches the end of a buffer.
|
||||
</P>
|
||||
<P>"\z" matches the end of a buffer.
|
||||
</P>
|
||||
<P>"\Z" matches the end of a buffer, or possibly one or more new line characters
|
||||
followed by the end of the buffer.
|
||||
</P>
|
||||
<P>A buffer is considered to consist of the whole sequence passed to the matching
|
||||
algorithms, unless the flags match_not_bob or match_not_eob are set.
|
||||
</P>
|
||||
<H3>Escape operator
|
||||
</H3>
|
||||
<P>The escape character "\" has several meanings.
|
||||
</P>
|
||||
<P>Inside a set declaration the escape character is a normal character unless the
|
||||
flag regex_constants::escape_in_lists is set in which case whatever follows the
|
||||
escape is a literal character regardless of its normal meaning.
|
||||
</P>
|
||||
<P>The escape operator may introduce an operator for example: back references, or
|
||||
a word operator.
|
||||
</P>
|
||||
<P>The escape operator may make the following character normal, for example "\*"
|
||||
represents a literal "*" rather than the repeat operator.
|
||||
</P>
|
||||
<H4>Single character escape sequences
|
||||
</H4>
|
||||
<P>The following escape sequences are aliases for single characters:
|
||||
<BR>
|
||||
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table3" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="33%">Escape sequence
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Character code
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Meaning
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\a
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x07
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Bell character.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\f
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x0C
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Form feed.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\n
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x0A
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Newline character.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\r
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x0D
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Carriage return.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\t
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x09
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Tab character.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\v
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x0B
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">Vertical tab.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\e
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0x1B
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">ASCII Escape character.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\0dd
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0dd
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">An octal character code, where <I>dd</I> is one or
|
||||
more octal digits.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\xXX
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0xXX
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">A hexadecimal character code, where XX is one or more
|
||||
hexadecimal digits.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\x{XX}
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">0xXX
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">A hexadecimal character code, where XX is one or more
|
||||
hexadecimal digits, optionally a Unicode character.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD> </TD>
|
||||
<TD vAlign="top" width="33%">\cZ
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">z-@
|
||||
</TD>
|
||||
<TD vAlign="top" width="33%">An ASCII escape sequence control-Z, where Z is any
|
||||
ASCII character greater than or equal to the character code for '@'.
|
||||
</TD>
|
||||
<TD> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<H4>Miscellaneous escape sequences:
|
||||
</H4>
|
||||
<P>The following are provided mostly for perl compatibility, but note that there
|
||||
are some differences in the meanings of \l \L \u and \U:
|
||||
<BR>
|
||||
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table4" cellSpacing="0" cellPadding="6" width="100%" border="0">
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\w
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [[:word:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\W
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [^[:word:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\s
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [[:space:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\S
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [^[:space:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\d
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [[:digit:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\D
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [^[:digit:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\l
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [[:lower:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\L
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [^[:lower:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\u
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [[:upper:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\U
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Equivalent to [^[:upper:]].
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\C
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Any single character, equivalent to '.'.
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\X
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">Match any Unicode combining character sequence, for
|
||||
example "a\x 0301" (a letter a with an acute).
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\Q
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">The begin quote operator, everything that follows is
|
||||
treated as a literal character until a \E end quote operator is found.
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD width="5%"> </TD>
|
||||
<TD vAlign="top" width="45%">\E
|
||||
</TD>
|
||||
<TD vAlign="top" width="45%">The end quote operator, terminates a sequence begun
|
||||
with \Q.
|
||||
</TD>
|
||||
<TD width="5%"> </TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<H3>What gets matched?
|
||||
</H3>
|
||||
<P>
|
||||
When the expression is compiled as a Perl-compatible regex then the matching
|
||||
algorithms will perform a depth first search on the state machine and report
|
||||
the first match found.</P>
|
||||
<P>
|
||||
When the expression is compiled as a POSIX-compatible regex then the matching
|
||||
algorithms will match the first possible matching string, if more than one
|
||||
string starting at a given location can match then it matches the longest
|
||||
possible string, unless the flag match_any is set, in which case the first
|
||||
match encountered is returned. Use of the match_any option can reduce the time
|
||||
taken to find the match - but is only useful if the user is less concerned
|
||||
about what matched - for example it would not be suitable for search and
|
||||
replace operations. In cases where their are multiple possible matches all
|
||||
starting at the same location, and all of the same length, then the match
|
||||
chosen is the one with the longest first sub-expression, if that is the same
|
||||
for two or more matches, then the second sub-expression will be examined and so
|
||||
on.
|
||||
</P><P>
|
||||
The following table examples illustrate the main differences between Perl and
|
||||
POSIX regular expression matching rules:
|
||||
</P>
|
||||
<P>
|
||||
<TABLE id="Table5" cellSpacing="1" cellPadding="7" width="624" border="1">
|
||||
<TBODY>
|
||||
<TR>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P>Expression</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P>Text</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P>POSIX leftmost longest match</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P>ECMAScript depth first search match</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>a|ab</CODE></P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
xaby</CODE>
|
||||
</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
"ab"</CODE></P></TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
"a"</CODE></P></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
.*([[:alnum:]]+).*</CODE></P></TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
" abc def xyz "</CODE></P></TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P>$0 = " abc def xyz "<BR>
|
||||
$1 = "abc"</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P>$0 = " abc def xyz "<BR>
|
||||
$1 = "z"</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
.*(a|xayy)</CODE></P></TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
zzxayyzz</CODE></P></TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>
|
||||
"zzxayy"</CODE></P></TD>
|
||||
<TD vAlign="top" width="25%">
|
||||
<P><CODE>"zzxa"</CODE></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TBODY></CODE></TD></TR></TABLE>
|
||||
<P>These differences between Perl matching rules, and POSIX matching rules, mean
|
||||
that these two regular expression syntaxes differ not only in the features
|
||||
offered, but also in the form that the state machine takes and/or the
|
||||
algorithms used to traverse the state machine.</p>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
332
doc/syntax_option_type.html
Normal file
332
doc/syntax_option_type.html
Normal file
@ -0,0 +1,332 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: syntax_option_type</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">syntax_option_type</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<H3>Synopsis</H3>
|
||||
<P>Type syntax_option type is an implementation defined bitmask type that controls
|
||||
how a regular expression string is to be interpreted. For convenience
|
||||
note that all the constants listed here, are also duplicated within the scope
|
||||
of class template <A href="basic_regex.html">basic_regex</A>.</P>
|
||||
<PRE>namespace std{ namespace regex_constants{
|
||||
|
||||
typedef bitmask_type syntax_option_type;
|
||||
// these flags are standardized:
|
||||
static const syntax_option_type normal;
|
||||
static const syntax_option_type icase;
|
||||
static const syntax_option_type nosubs;
|
||||
static const syntax_option_type optimize;
|
||||
static const syntax_option_type collate;
|
||||
static const syntax_option_type ECMAScript = normal;
|
||||
static const syntax_option_type JavaScript = normal;
|
||||
static const syntax_option_type JScript = normal;
|
||||
static const syntax_option_type basic;
|
||||
static const syntax_option_type extended;
|
||||
static const syntax_option_type awk;
|
||||
static const syntax_option_type grep;
|
||||
static const syntax_option_type egrep;
|
||||
static const syntax_option_type sed = basic;
|
||||
static const syntax_option_type perl;<BR>// these are boost.regex specific:<BR>static const syntax_option_type escape_in_lists;<BR>static const syntax_option_type char_classes;<BR>static const syntax_option_type intervals;<BR>static const syntax_option_type limited_ops;<BR>static const syntax_option_type newline_alt;<BR>static const syntax_option_type bk_plus_qm;<BR>static const syntax_option_type bk_braces;<BR>static const syntax_option_type bk_parens;<BR>static const syntax_option_type bk_refs;<BR>static const syntax_option_type bk_vbar;<BR>static const syntax_option_type use_except;<BR>static const syntax_option_type failbit;<BR>static const syntax_option_type literal;<BR>static const syntax_option_type nocollate;<BR>static const syntax_option_type perlex;<BR>static const syntax_option_type emacs;<BR>
|
||||
} // namespace regex_constants
|
||||
} // namespace std</PRE>
|
||||
<H3>Description</H3>
|
||||
<P>The type <CODE>syntax_option_type</CODE> is an implementation defined bitmask
|
||||
type (17.3.2.1.2). Setting its elements has the effects listed in the table
|
||||
below, a valid value of type <CODE>syntax_option_type</CODE> will always have
|
||||
exactly one of the elements <CODE>normal, basic, extended, awk, grep, egrep, sed
|
||||
or perl</CODE> set.</P>
|
||||
<P>Note that for convenience all the constants listed here are duplicated within
|
||||
the scope of class template basic_regex, so you can use any of:</P>
|
||||
<PRE>boost::regex_constants::constant_name</PRE>
|
||||
<P>or</P>
|
||||
<PRE>boost::regex::constant_name</PRE>
|
||||
<P>or</P>
|
||||
<PRE>boost::wregex::constant_name</PRE>
|
||||
<P>in an interchangeable manner.</P>
|
||||
<P>
|
||||
<TABLE id="Table2" height="1274" cellSpacing="1" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>Element</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Effect if set</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>normal</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the grammar recognized by the regular expression engine uses its
|
||||
normal semantics: that is the same as that given in the ECMA-262, ECMAScript
|
||||
Language Specification, Chapter 15 part 10, RegExp (Regular Expression) Objects
|
||||
(FWD.1).</P>
|
||||
<P>boost.regex also recognizes most perl-compatible extensions in this mode.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>icase</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that matching of regular expressions against a character container
|
||||
sequence shall be performed without regard to case.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>nosubs</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that when a regular expression is matched against a character
|
||||
container sequence, then no sub-expression matches are to be stored in the
|
||||
supplied match_results structure.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>optimize</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the regular expression engine should pay more attention to the
|
||||
speed with which regular expressions are matched, and less to the speed with
|
||||
which regular expression objects are constructed. Otherwise it has no
|
||||
detectable effect on the program output. This currently has no effect for
|
||||
boost.regex.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>collate</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that character ranges of the form "[a-b]" should be locale sensitive.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>ECMAScript</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The same as normal.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>JavaScript</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The same as normal.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>JScript</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The same as normal.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>basic</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the grammar recognized by the regular expression engine is the
|
||||
same as that used by POSIX basic regular expressions in IEEE Std 1003.1-2001,
|
||||
Portable Operating System Interface (POSIX ), Base Definitions and Headers,
|
||||
Section 9, Regular Expressions (FWD.1).
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>extended</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the grammar recognized by the regular expression engine is the
|
||||
same as that used by POSIX extended regular expressions in IEEE Std
|
||||
1003.1-2001, Portable Operating System Interface (POSIX ), Base Definitions and
|
||||
Headers, Section 9, Regular Expressions (FWD.1).</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>awk</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the grammar recognized by the regular expression engine is the
|
||||
same as that used by POSIX utility awk in IEEE Std 1003.1-2001, Portable
|
||||
Operating System Interface (POSIX ), Shells and Utilities, Section 4, awk
|
||||
(FWD.1).</P>
|
||||
<P>That is to say: the same as POSIX extended syntax, but with escape sequences in
|
||||
character classes permitted.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>grep</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the grammar recognized by the regular expression engine is the
|
||||
same as that used by POSIX utility grep in IEEE Std 1003.1-2001, Portable
|
||||
Operating System Interface (POSIX ), Shells and Utilities, Section 4,
|
||||
Utilities, grep (FWD.1).</P>
|
||||
<P>That is to say, the same as POSIX basic syntax, but with the newline character
|
||||
acting as an alternation character in addition to "|".</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>egrep</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>Specifies that the grammar recognized by the regular expression engine is the
|
||||
same as that used by POSIX utility grep when given the -E option in IEEE Std
|
||||
1003.1-2001, Portable Operating System Interface (POSIX ), Shells and
|
||||
Utilities, Section 4, Utilities, grep (FWD.1).</P>
|
||||
<P>That is to say, the same as POSIX extended syntax, but with the newline
|
||||
character acting as an alternation character in addition to "|".</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>sed</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The same as basic.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="316">
|
||||
<P>perl</P>
|
||||
</TD>
|
||||
<TD vAlign="top" width="50%">
|
||||
<P>The same as normal.</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<P>The following constants are specific to this particular regular expression
|
||||
implementation and do not appear in the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm">
|
||||
regular expression standardization proposal</A>:</P>
|
||||
<P>
|
||||
<TABLE id="Table3" cellSpacing="0" cellPadding="7" width="100%" border="0">
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase::escape_in_lists</TD>
|
||||
<TD vAlign="top" width="45%">Allows the use of the escape "\" character in sets of
|
||||
characters, for example [\]] represents the set of characters containing only
|
||||
"]". If this flag is not set then "\" is an ordinary character inside sets.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase::char_classes</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set, character classes [:classname:]
|
||||
are allowed inside character set declarations, for example "[[:word:]]"
|
||||
represents the set of all characters that belong to the character class "word".</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: intervals</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set, repetition intervals are
|
||||
allowed, for example "a{2,4}" represents a repeat of between 2 and 4 letter
|
||||
a's.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: limited_ops</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set all of "+", "?" and "|" are
|
||||
ordinary characters in all situations.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: newline_alt</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set, then the newline character "\n"
|
||||
has the same effect as the alternation operator "|".</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: bk_plus_qm</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set then "\+" represents the one or
|
||||
more repetition operator and "\?" represents the zero or one repetition
|
||||
operator. When this bit is not set then "+" and "?" are used instead.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: bk_braces</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set then "\{" and "\}" are used for
|
||||
bounded repetitions and "{" and "}" are normal characters. This is the opposite
|
||||
of default behavior.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: bk_parens</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set then "\(" and "\)" are used to
|
||||
group sub-expressions and "(" and ")" are ordinary characters, this is the
|
||||
opposite of default behavior.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: bk_refs</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set then back references are
|
||||
allowed.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: bk_vbar</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set then "\|" represents the
|
||||
alternation operator and "|" is an ordinary character. This is the opposite of
|
||||
default behavior.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: use_except</TD>
|
||||
<TD vAlign="top" width="45%">When this bit is set then a <A href="#bad_expression">bad_expression</A>
|
||||
exception will be thrown on error. Use of this flag is deprecated -
|
||||
basic_regex will always throw on error.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase:: failbit</TD>
|
||||
<TD vAlign="top" width="45%">This bit is set on error, if regbase::use_except is
|
||||
not set, then this bit should be checked to see if a regular expression is
|
||||
valid before usage.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%">regbase::literal</TD>
|
||||
<TD vAlign="top" width="45%">All characters in the string are treated as literals,
|
||||
there are no special characters or escape sequences.</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD vAlign="top" width="45%" height="24">regbase::emacs</TD>
|
||||
<TD vAlign="top" width="45%" height="24">Provides compatability with the emacs
|
||||
editor, eqivalent to: bk_braces | bk_parens | bk_refs | bk_vbar.</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<P>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" --></P>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
68
doc/thread_safety.html
Normal file
68
doc/thread_safety.html
Normal file
@ -0,0 +1,68 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Boost.Regex: Thread Safety</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="stylesheet" type="text/css" href="../../../boost.css">
|
||||
</head>
|
||||
<body>
|
||||
<P>
|
||||
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">
|
||||
<TR>
|
||||
<td valign="top" width="300">
|
||||
<h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../c++boost.gif" border="0"></a></h3>
|
||||
</td>
|
||||
<TD width="353">
|
||||
<H1 align="center">Boost.Regex</H1>
|
||||
<H2 align="center">Thread Safety</H2>
|
||||
</TD>
|
||||
<td width="50">
|
||||
<h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3>
|
||||
</td>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
<HR>
|
||||
<P>Class <A href="basic_regex.html">basic_regex</A><> and its typedefs regex
|
||||
and wregex are thread safe, in that compiled regular expressions can safely be
|
||||
shared between threads. The matching algorithms <A href="regex_match.html">regex_match</A>,
|
||||
<A href="regex_search.html">regex_search</A>, <A href="regex_grep.html">regex_grep</A>,
|
||||
<A href="regex_format.html">regex_format</A> and <A href="regex_merge.html">regex_merge</A>
|
||||
are all re-entrant and thread safe. Class <A href="match_results.html">match_results</A>
|
||||
is now thread safe, in that the results of a match can be safely copied from
|
||||
one thread to another (for example one thread may find matches and push
|
||||
match_results instances onto a queue, while another thread pops them off the
|
||||
other end), otherwise use a separate instance of <A href="match_results.html">match_results</A>
|
||||
per thread.
|
||||
</P>
|
||||
<P>The <A href="posix_api.html">POSIX API functions</A> are all re-entrant and
|
||||
thread safe, regular expressions compiled with <I>regcomp</I> can also be
|
||||
shared between threads.
|
||||
</P>
|
||||
<P>The class<A href="regex.html"> RegEx</A> is only thread safe if each thread
|
||||
gets its own RegEx instance (apartment threading) - this is a consequence of
|
||||
RegEx handling both compiling and matching regular expressions.
|
||||
</P>
|
||||
<P>Finally note that changing the global locale invalidates all compiled regular
|
||||
expressions, therefore calling <I>set_locale</I> from one thread while another
|
||||
uses regular expressions <I>will</I> produce unpredictable results.
|
||||
</P>
|
||||
<P>
|
||||
There is also a requirement that there is only one thread executing prior to
|
||||
the start of main().</P>
|
||||
<HR>
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan -->
|
||||
17 May 2003
|
||||
<!--webbot bot="Timestamp" endspan i-checksum="39359" -->
|
||||
</p>
|
||||
<P><I><EFBFBD> Copyright <a href="mailto:jm@regex.fsnet.co.uk">John Maddock</a> 1998-<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2003<!--webbot bot="Timestamp" endspan i-checksum="39359" --></I></P>
|
||||
<P align="left"><I>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.</I></P>
|
||||
</body>
|
||||
</html>
|
||||
|
BIN
doc/uarrow.gif
Normal file
BIN
doc/uarrow.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
705
doc/vc71-performance.html
Normal file
705
doc/vc71-performance.html
Normal file
@ -0,0 +1,705 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Regular Expression Performance Comparison (Visual Studio.NET 2003)</title>
|
||||
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
|
||||
<META content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot" name="Template">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
</head>
|
||||
<body bgcolor="#ffffff" link="#0000ff" vlink="#800080">
|
||||
<h2>Regular Expression Performance Comparison</h2>
|
||||
<p>The following tables provide comparisons between the following regular
|
||||
expression libraries:</p>
|
||||
<p><a href="http://research.microsoft.com/projects/greta"> GRETA</a>.</p>
|
||||
<p><a href="http://www.boost.org/">The Boost regex library</a>.</p>
|
||||
<p><a href="http://arglist.com/regex/">Henry Spencer's regular expression library</a>
|
||||
- this is provided for comparison as a typical non-backtracking implementation.</p>
|
||||
<p>Philip Hazel's <a href="http://www.pcre.org">PCRE</a> library.</p>
|
||||
<h3>Details</h3>
|
||||
<p>Machine: Intel Pentium 4 2.8GHz PC.</p>
|
||||
<p>Compiler: Microsoft Visual C++ version 7.1.</p>
|
||||
<p>C++ Standard Library: Dinkumware standard library version 313.</p>
|
||||
<p>OS: Win32.</p>
|
||||
<p>Boost version: 1.31.0.</p>
|
||||
<p>PCRE version: 3.9.</p>
|
||||
<p>As ever care should be taken in interpreting the results, only sensible regular
|
||||
expressions (rather than pathological cases) are given, most are taken from the
|
||||
Boost regex examples, or from the <a href="http://www.regxlib.com/">Library of
|
||||
Regular Expressions</a>. In addition, some variation in the relative
|
||||
performance of these libraries can be expected on other machines - as memory
|
||||
access and processor caching effects can be quite large for most finite state
|
||||
machine algorithms. In each case the first figure given is the relative
|
||||
time taken (so a value of 1.0 is as good as it gets), while the second figure
|
||||
is the actual time taken.</p>
|
||||
<h3>Averages</h3>
|
||||
<p>The following are the average relative scores for all the tests: the perfect
|
||||
regular expression library would score 1, in practice anything less than 2
|
||||
is pretty good.</p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>GRETA</strong></td>
|
||||
<td><strong>GRETA<br>
|
||||
(non-recursive mode)</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>6.90669</td>
|
||||
<td>23.751</td>
|
||||
<td>1.62553</td>
|
||||
<td>1.38213</td>
|
||||
<td>110.973</td>
|
||||
<td>1.69371</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Comparison 1: Long Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within a long English language text was measured
|
||||
(<a href="ftp://ibiblio.org/pub/docs/books/gutenberg/etext02/mtent12.zip">mtent12.txt</a>
|
||||
from <a href="http://promo.net/pg/">Project Gutenberg</a>, 19Mb). </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>GRETA</strong></td>
|
||||
<td><strong>GRETA<br>
|
||||
(non-recursive mode)</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Twain</code></td>
|
||||
<td>19.7<br>
|
||||
(0.541s)</td>
|
||||
<td>85.5<br>
|
||||
(2.35s)</td>
|
||||
<td>3.09<br>
|
||||
(0.0851s)</td>
|
||||
<td>3.09<br>
|
||||
(0.0851s)</td>
|
||||
<td>131<br>
|
||||
(3.6s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.0275s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Huck[[:alpha:]]+</code></td>
|
||||
<td>11<br>
|
||||
(0.55s)</td>
|
||||
<td>93.4<br>
|
||||
(4.68s)</td>
|
||||
<td>3.4<br>
|
||||
(0.17s)</td>
|
||||
<td>3.35<br>
|
||||
(0.168s)</td>
|
||||
<td>124<br>
|
||||
(6.19s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.0501s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>[[:alpha:]]+ing</code></td>
|
||||
<td>11.3<br>
|
||||
(6.82s)</td>
|
||||
<td>21.3<br>
|
||||
(12.8s)</td>
|
||||
<td>1.83<br>
|
||||
(1.1s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.601s)</font></td>
|
||||
<td>6.47<br>
|
||||
(3.89s)</td>
|
||||
<td>4.75<br>
|
||||
(2.85s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[^ ]*?Twain</code></td>
|
||||
<td>5.75<br>
|
||||
(1.15s)</td>
|
||||
<td>17.1<br>
|
||||
(3.43s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.2s)</font></td>
|
||||
<td>1.3<br>
|
||||
(0.26s)</td>
|
||||
<td>NA</td>
|
||||
<td>3.8<br>
|
||||
(0.761s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Tom|Sawyer|Huckleberry|Finn</code></td>
|
||||
<td>28.5<br>
|
||||
(3.1s)</td>
|
||||
<td>77.2<br>
|
||||
(8.4s)</td>
|
||||
<td>2.3<br>
|
||||
(0.251s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.109s)</font></td>
|
||||
<td>191<br>
|
||||
(20.8s)</td>
|
||||
<td>1.77<br>
|
||||
(0.193s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> (Tom|Sawyer|Huckleberry|Finn).{0,30}river|river.{0,30}(Tom|Sawyer|Huckleberry|Finn)</code></td>
|
||||
<td>16.2<br>
|
||||
(4.14s)</td>
|
||||
<td>49<br>
|
||||
(12.5s)</td>
|
||||
<td>1.65<br>
|
||||
(0.42s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.255s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>2.43<br>
|
||||
(0.62s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Comparison 2: Medium Sized Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within a medium sized English language text was
|
||||
measured (the first 50K from mtent12.txt). </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>GRETA</strong></td>
|
||||
<td><strong>GRETA<br>
|
||||
(non-recursive mode)</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Twain</code></td>
|
||||
<td>9.49<br>
|
||||
(0.00274s)</td>
|
||||
<td>40.7<br>
|
||||
(0.0117s)</td>
|
||||
<td>1.54<br>
|
||||
(0.000445s)</td>
|
||||
<td>1.56<br>
|
||||
(0.00045s)</td>
|
||||
<td>13.5<br>
|
||||
(0.00391s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000289s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Huck[[:alpha:]]+</code></td>
|
||||
<td>14.3<br>
|
||||
(0.0027s)</td>
|
||||
<td>62.3<br>
|
||||
(0.0117s)</td>
|
||||
<td>2.26<br>
|
||||
(0.000425s)</td>
|
||||
<td>2.29<br>
|
||||
(0.000431s)</td>
|
||||
<td>1.27<br>
|
||||
(0.000239s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000188s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>[[:alpha:]]+ing</code></td>
|
||||
<td>7.34<br>
|
||||
(0.0178s)</td>
|
||||
<td>13.7<br>
|
||||
(0.0331s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.00243s)</font></td>
|
||||
<td><font color="#008000">1.02<br>
|
||||
(0.00246s)</font></td>
|
||||
<td>7.36<br>
|
||||
(0.0178s)</td>
|
||||
<td>5.87<br>
|
||||
(0.0142s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[^ ]*?Twain</code></td>
|
||||
<td>8.34<br>
|
||||
(0.00579s)</td>
|
||||
<td>24.8<br>
|
||||
(0.0172s)</td>
|
||||
<td>1.52<br>
|
||||
(0.00105s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000694s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>2.81<br>
|
||||
(0.00195s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>Tom|Sawyer|Huckleberry|Finn</code></td>
|
||||
<td>12.9<br>
|
||||
(0.00781s)</td>
|
||||
<td>35.1<br>
|
||||
(0.0213s)</td>
|
||||
<td>1.67<br>
|
||||
(0.00102s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000606s)</font></td>
|
||||
<td>81.5<br>
|
||||
(0.0494s)</td>
|
||||
<td>1.94<br>
|
||||
(0.00117s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> (Tom|Sawyer|Huckleberry|Finn).{0,30}river|river.{0,30}(Tom|Sawyer|Huckleberry|Finn)</code></td>
|
||||
<td>15.6<br>
|
||||
(0.0106s)</td>
|
||||
<td>46.6<br>
|
||||
(0.0319s)</td>
|
||||
<td>2.72<br>
|
||||
(0.00186s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000684s)</font></td>
|
||||
<td>311<br>
|
||||
(0.213s)</td>
|
||||
<td>1.72<br>
|
||||
(0.00117s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Comparison 3: C++ Code Search</h3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within the C++ source file <a href="../../../boost/crc.hpp">
|
||||
boost/crc.hpp</a> was measured. </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>GRETA</strong></td>
|
||||
<td><strong>GRETA<br>
|
||||
(non-recursive mode)</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\<\w+\>([
|
||||
]*\([^)]*\))?[[:space:]]*)*(\<\w*\>)[[:space:]]*(<[^;:{]+>[[:space:]]*)?(\{|:[^;\{()]*\{)</code></td>
|
||||
<td>8.88<br>
|
||||
(0.000792s)</td>
|
||||
<td>46.4<br>
|
||||
(0.00414s)</td>
|
||||
<td>1.19<br>
|
||||
(0.000106s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(8.92e-005s)</font></td>
|
||||
<td>688<br>
|
||||
(0.0614s)</td>
|
||||
<td>3.23<br>
|
||||
(0.000288s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>(^[
|
||||
]*#(?:[^\\\n]|\\[^\n_[:punct:][:alnum:]]*[\n[:punct:][:word:]])*)|(//[^\n]*|/\*.*?\*/)|\<([+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\.)?[[:digit:]]+(?:[eE][+-]?[[:digit:]]+)?))u?(?:(?:int(?:8|16|32|64))|L)?)\>|('(?:[^\\']|\\.)*'|"(?:[^\\"]|\\.)*")|\<(__asm|__cdecl|__declspec|__export|__far16|__fastcall|__fortran|__import|__pascal|__rtti|__stdcall|_asm|_cdecl|__except|_export|_far16|_fastcall|__finally|_fortran|_import|_pascal|_stdcall|__thread|__try|asm|auto|bool|break|case|catch|cdecl|char|class|const|const_cast|continue|default|delete|do|double|dynamic_cast|else|enum|explicit|extern|false|float|for|friend|goto|if|inline|int|long|mutable|namespace|new|operator|pascal|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_cast|struct|switch|template|this|throw|true|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\></code></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.00571s)</font></td>
|
||||
<td>5.31<br>
|
||||
(0.0303s)</td>
|
||||
<td>2.47<br>
|
||||
(0.0141s)</td>
|
||||
<td>1.92<br>
|
||||
(0.011s)</td>
|
||||
<td>NA</td>
|
||||
<td>3.29<br>
|
||||
(0.0188s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[ ]*#[ ]*include[ ]+("[^"]+"|<[^>]+>)</code></td>
|
||||
<td>5.78<br>
|
||||
(0.00172s)</td>
|
||||
<td>26.3<br>
|
||||
(0.00783s)</td>
|
||||
<td>1.12<br>
|
||||
(0.000333s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000298s)</font></td>
|
||||
<td>128<br>
|
||||
(0.0382s)</td>
|
||||
<td>1.74<br>
|
||||
(0.000518s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[ ]*#[ ]*include[ ]+("boost/[^"]+"|<boost/[^>]+>)</code></td>
|
||||
<td>10.2<br>
|
||||
(0.00305s)</td>
|
||||
<td>28.4<br>
|
||||
(0.00845s)</td>
|
||||
<td>1.12<br>
|
||||
(0.000333s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000298s)</font></td>
|
||||
<td>155<br>
|
||||
(0.0463s)</td>
|
||||
<td>1.74<br>
|
||||
(0.000519s)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<h3></h3>
|
||||
<H3>Comparison 4: HTML Document Search
|
||||
</H3>
|
||||
<p>For each of the following regular expressions the time taken to find all
|
||||
occurrences of the expression within the html file <a href="../../libraries.htm">libs/libraries.htm</a>
|
||||
was measured. </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>GRETA</strong></td>
|
||||
<td><strong>GRETA<br>
|
||||
(non-recursive mode)</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>beman|john|dave</code></td>
|
||||
<td>11<br>
|
||||
(0.00297s)</td>
|
||||
<td>34.3<br>
|
||||
(0.00922s)</td>
|
||||
<td>1.78<br>
|
||||
(0.000479s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000269s)</font></td>
|
||||
<td>55.2<br>
|
||||
(0.0149s)</td>
|
||||
<td>1.85<br>
|
||||
(0.000499s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code><p>.*?</p></code></td>
|
||||
<td>5.38<br>
|
||||
(0.00145s)</td>
|
||||
<td>21.8<br>
|
||||
(0.00587s)</td>
|
||||
<td><font color="#008000">1.02<br>
|
||||
(0.000274s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000269s)</font></td>
|
||||
<td>NA</td>
|
||||
<td><font color="#008000">1.05<br>
|
||||
(0.000283s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> <a[^>]+href=("[^"]*"|[^[:space:]]+)[^>]*></code></td>
|
||||
<td>4.51<br>
|
||||
(0.00207s)</td>
|
||||
<td>12.6<br>
|
||||
(0.00579s)</td>
|
||||
<td>1.34<br>
|
||||
(0.000616s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000459s)</font></td>
|
||||
<td>343<br>
|
||||
(0.158s)</td>
|
||||
<td><font color="#008000">1.09<br>
|
||||
(0.000499s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> <h[12345678][^>]*>.*?</h[12345678]></code></td>
|
||||
<td>7.39<br>
|
||||
(0.00143s)</td>
|
||||
<td>29.6<br>
|
||||
(0.00571s)</td>
|
||||
<td>1.87<br>
|
||||
(0.000362s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000193s)</font></td>
|
||||
<td>NA</td>
|
||||
<td>1.27<br>
|
||||
(0.000245s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> <img[^>]+src=("[^"]*"|[^[:space:]]+)[^>]*></code></td>
|
||||
<td>6.73<br>
|
||||
(0.00145s)</td>
|
||||
<td>27.3<br>
|
||||
(0.00587s)</td>
|
||||
<td>1.2<br>
|
||||
(0.000259s)</td>
|
||||
<td>1.32<br>
|
||||
(0.000283s)</td>
|
||||
<td>148<br>
|
||||
(0.0319s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.000215s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> <font[^>]+face=("[^"]*"|[^[:space:]]+)[^>]*>.*?</font></code></td>
|
||||
<td>6.93<br>
|
||||
(0.00153s)</td>
|
||||
<td>27<br>
|
||||
(0.00595s)</td>
|
||||
<td>1.22<br>
|
||||
(0.000269s)</td>
|
||||
<td>1.31<br>
|
||||
(0.000289s)</td>
|
||||
<td>NA</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(0.00022s)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Comparison 3: Simple Matches</h3>
|
||||
<p>For each of the following regular expressions the time taken to match against
|
||||
the text indicated was measured. </p>
|
||||
<table border="1" cellspacing="1">
|
||||
<tr>
|
||||
<td><strong>Expression</strong></td>
|
||||
<td><strong>Text</strong></td>
|
||||
<td><strong>GRETA</strong></td>
|
||||
<td><strong>GRETA<br>
|
||||
(non-recursive mode)</strong></td>
|
||||
<td><strong>Boost</strong></td>
|
||||
<td><strong>Boost + C++ locale</strong></td>
|
||||
<td><strong>POSIX</strong></td>
|
||||
<td><strong>PCRE</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>abc</code></td>
|
||||
<td>abc</td>
|
||||
<td>1.31<br>
|
||||
(2.2e-007s)</td>
|
||||
<td>1.94<br>
|
||||
(3.25e-007s)</td>
|
||||
<td>1.26<br>
|
||||
(2.1e-007s)</td>
|
||||
<td>1.24<br>
|
||||
(2.08e-007s)</td>
|
||||
<td>3.03<br>
|
||||
(5.06e-007s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.67e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^([0-9]+)(\-| |$)(.*)$</code></td>
|
||||
<td>100- this is a line of ftp response which contains a message string</td>
|
||||
<td>1.52<br>
|
||||
(6.88e-007s)</td>
|
||||
<td>2.28<br>
|
||||
(1.03e-006s)</td>
|
||||
<td>1.5<br>
|
||||
(6.78e-007s)</td>
|
||||
<td>1.5<br>
|
||||
(6.78e-007s)</td>
|
||||
<td>329<br>
|
||||
(0.000149s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(4.53e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>([[:digit:]]{4}[- ]){3}[[:digit:]]{3,4}</code></td>
|
||||
<td>1234-5678-1234-456</td>
|
||||
<td>2.04<br>
|
||||
(1.03e-006s)</td>
|
||||
<td>2.83<br>
|
||||
(1.43e-006s)</td>
|
||||
<td>2.12<br>
|
||||
(1.07e-006s)</td>
|
||||
<td>2.04<br>
|
||||
(1.03e-006s)</td>
|
||||
<td>30.8<br>
|
||||
(1.56e-005s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(5.05e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
|
||||
<td>john_maddock@compuserve.com</td>
|
||||
<td>1.48<br>
|
||||
(1.78e-006s)</td>
|
||||
<td>2.1<br>
|
||||
(2.52e-006s)</td>
|
||||
<td>1.35<br>
|
||||
(1.62e-006s)</td>
|
||||
<td>1.32<br>
|
||||
(1.59e-006s)</td>
|
||||
<td>165<br>
|
||||
(0.000198s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.2e-006s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
|
||||
<td>foo12@foo.edu</td>
|
||||
<td>1.28<br>
|
||||
(1.41e-006s)</td>
|
||||
<td>1.9<br>
|
||||
(2.1e-006s)</td>
|
||||
<td>1.42<br>
|
||||
(1.57e-006s)</td>
|
||||
<td>1.38<br>
|
||||
(1.53e-006s)</td>
|
||||
<td>107<br>
|
||||
(0.000119s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.11e-006s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$</code></td>
|
||||
<td>bob.smith@foo.tv</td>
|
||||
<td>1.29<br>
|
||||
(1.43e-006s)</td>
|
||||
<td>1.9<br>
|
||||
(2.1e-006s)</td>
|
||||
<td>1.42<br>
|
||||
(1.57e-006s)</td>
|
||||
<td>1.38<br>
|
||||
(1.53e-006s)</td>
|
||||
<td>119<br>
|
||||
(0.000132s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(1.11e-006s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
|
||||
<td>EH10 2QQ</td>
|
||||
<td>1.26<br>
|
||||
(4.63e-007s)</td>
|
||||
<td>1.77<br>
|
||||
(6.49e-007s)</td>
|
||||
<td>1.3<br>
|
||||
(4.77e-007s)</td>
|
||||
<td>1.2<br>
|
||||
(4.4e-007s)</td>
|
||||
<td>9.15<br>
|
||||
(3.36e-006s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.68e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
|
||||
<td>G1 1AA</td>
|
||||
<td><font color="#008000">1.06<br>
|
||||
(4.73e-007s)</font></td>
|
||||
<td>1.59<br>
|
||||
(7.07e-007s)</td>
|
||||
<td><font color="#008000">1.05<br>
|
||||
(4.68e-007s)</font></td>
|
||||
<td><font color="#008000">1<br>
|
||||
(4.44e-007s)</font></td>
|
||||
<td>12.9<br>
|
||||
(5.73e-006s)</td>
|
||||
<td>1.63<br>
|
||||
(7.26e-007s)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$</code></td>
|
||||
<td>SW1 1ZZ</td>
|
||||
<td>1.26<br>
|
||||
(9.17e-007s)</td>
|
||||
<td>1.84<br>
|
||||
(1.34e-006s)</td>
|
||||
<td>1.28<br>
|
||||
(9.26e-007s)</td>
|
||||
<td>1.21<br>
|
||||
(8.78e-007s)</td>
|
||||
<td>8.42<br>
|
||||
(6.11e-006s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(7.26e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$</code></td>
|
||||
<td>4/1/2001</td>
|
||||
<td>1.57<br>
|
||||
(9.73e-007s)</td>
|
||||
<td>2.28<br>
|
||||
(1.41e-006s)</td>
|
||||
<td>1.25<br>
|
||||
(7.73e-007s)</td>
|
||||
<td>1.26<br>
|
||||
(7.83e-007s)</td>
|
||||
<td>11.2<br>
|
||||
(6.95e-006s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(6.21e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code> ^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$</code></td>
|
||||
<td>12/12/2001</td>
|
||||
<td>1.52<br>
|
||||
(9.56e-007s)</td>
|
||||
<td>2.06<br>
|
||||
(1.3e-006s)</td>
|
||||
<td>1.29<br>
|
||||
(8.12e-007s)</td>
|
||||
<td>1.24<br>
|
||||
(7.83e-007s)</td>
|
||||
<td>12.4<br>
|
||||
(7.8e-006s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(6.3e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
|
||||
<td>123</td>
|
||||
<td>2.11<br>
|
||||
(7.35e-007s)</td>
|
||||
<td>3.18<br>
|
||||
(1.11e-006s)</td>
|
||||
<td>2.5<br>
|
||||
(8.7e-007s)</td>
|
||||
<td>2.44<br>
|
||||
(8.5e-007s)</td>
|
||||
<td>5.26<br>
|
||||
(1.83e-006s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.49e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
|
||||
<td>+3.14159</td>
|
||||
<td>1.31<br>
|
||||
(4.96e-007s)</td>
|
||||
<td>1.92<br>
|
||||
(7.26e-007s)</td>
|
||||
<td>1.26<br>
|
||||
(4.77e-007s)</td>
|
||||
<td>1.2<br>
|
||||
(4.53e-007s)</td>
|
||||
<td>9.71<br>
|
||||
(3.66e-006s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.77e-007s)</font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>^[-+]?[[:digit:]]*\.?[[:digit:]]*$</code></td>
|
||||
<td>-3.14159</td>
|
||||
<td>1.32<br>
|
||||
(4.97e-007s)</td>
|
||||
<td>1.92<br>
|
||||
(7.26e-007s)</td>
|
||||
<td>1.24<br>
|
||||
(4.67e-007s)</td>
|
||||
<td>1.2<br>
|
||||
(4.53e-007s)</td>
|
||||
<td>9.7<br>
|
||||
(3.66e-006s)</td>
|
||||
<td><font color="#008000">1<br>
|
||||
(3.78e-007s)</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
<hr>
|
||||
<p>Copyright John Maddock April 2003, all rights reserved.</p>
|
||||
</body>
|
||||
</html>
|
219
example/Jamfile
219
example/Jamfile
@ -4,193 +4,46 @@ subproject libs/regex/example ;
|
||||
SEARCH on testing.jam = $(BOOST_BUILD_PATH) ;
|
||||
include testing.jam ;
|
||||
|
||||
run timer/regex_timer.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
timer/input_script.txt
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
regex_timer
|
||||
;
|
||||
|
||||
run jgrep/jgrep.cpp jgrep/main.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
-n boost/ ../../../boost/regex.hpp
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
jgrep
|
||||
;
|
||||
|
||||
run snippets/credit_card_example.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
credit_card_example
|
||||
;
|
||||
|
||||
|
||||
run snippets/partial_regex_grep.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
../index.htm
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
partial_regex_grep
|
||||
;
|
||||
|
||||
run snippets/partial_regex_match.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
1234-5678-8765-4
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
partial_regex_match
|
||||
;
|
||||
|
||||
run snippets/regex_grep_example_1.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
../../../boost/rational.hpp
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
regex_grep_example_1
|
||||
;
|
||||
|
||||
run snippets/regex_grep_example_2.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
../../../boost/rational.hpp
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
regex_grep_example_2
|
||||
;
|
||||
|
||||
run snippets/regex_grep_example_3.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
../../../boost/rational.hpp
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
regex_grep_example_3
|
||||
;
|
||||
|
||||
run snippets/regex_grep_example_4.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
../../../boost/rational.hpp
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
regex_grep_example_4
|
||||
;
|
||||
|
||||
run snippets/regex_match_example.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
-auto
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
regex_match_example
|
||||
;
|
||||
|
||||
run snippets/regex_merge_example.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
../../../boost/rational.hpp
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
regex_merge_example
|
||||
;
|
||||
|
||||
run snippets/regex_search_example.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
../../../boost/rational.hpp
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
regex_search_example
|
||||
;
|
||||
|
||||
run snippets/regex_split_example_1.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
-auto
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
regex_split_example_1
|
||||
;
|
||||
|
||||
run snippets/regex_split_example_2.cpp
|
||||
<lib>../build/boost_regex$(SUFLIB)
|
||||
:
|
||||
../index.htm
|
||||
:
|
||||
:
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
:
|
||||
regex_split_example_2
|
||||
;
|
||||
|
||||
|
||||
rule regex-test-run ( sources + : input * )
|
||||
{
|
||||
return [
|
||||
run
|
||||
# sources
|
||||
$(sources)
|
||||
|
||||
# dependencies
|
||||
<lib>../build/boost_regex
|
||||
: # additional args
|
||||
$(input)
|
||||
: # test-files
|
||||
: # requirements
|
||||
<sysinclude>../../../
|
||||
<define>BOOST_REGEX_NO_LIB=1
|
||||
<define>BOOST_REGEX_STATIC_LINK=1
|
||||
<threading>multi
|
||||
: # test name
|
||||
] ;
|
||||
}
|
||||
|
||||
test-suite regex-examples :
|
||||
|
||||
[ regex-test-run timer/regex_timer.cpp : $(BOOST_ROOT)/libs/regex/example/timer/input_script.txt ]
|
||||
[ regex-test-run jgrep/jgrep.cpp jgrep/main.cpp : -n boost/ $(BOOST_ROOT)/boost/regex.hpp ]
|
||||
[ regex-test-run snippets/credit_card_example.cpp ]
|
||||
[ regex-test-run snippets/partial_regex_grep.cpp : $(BOOST_ROOT)/libs/regex/index.htm ]
|
||||
[ regex-test-run snippets/partial_regex_match.cpp : 1234-5678-8765-4 ]
|
||||
[ regex-test-run snippets/regex_grep_example_1.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
||||
[ regex-test-run snippets/regex_grep_example_2.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
||||
[ regex-test-run snippets/regex_grep_example_3.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
||||
[ regex-test-run snippets/regex_grep_example_4.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
||||
[ regex-test-run snippets/regex_match_example.cpp : -auto ]
|
||||
[ regex-test-run snippets/regex_merge_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
||||
[ regex-test-run snippets/regex_replace_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
||||
[ regex-test-run snippets/regex_search_example.cpp : $(BOOST_ROOT)/boost/rational.hpp ]
|
||||
[ regex-test-run snippets/regex_split_example_1.cpp : -auto ]
|
||||
[ regex-test-run snippets/regex_split_example_2.cpp : $(BOOST_ROOT)/libs/regex/doc/index.html ]
|
||||
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <algorithm>
|
||||
#include <boost/regex.hpp>
|
||||
#ifdef JM_OLD_IOSTREAM
|
||||
#include <iostream.h>
|
||||
@ -33,7 +34,11 @@ using std::endl;
|
||||
# pragma hrdstop
|
||||
#endif
|
||||
|
||||
#include <boost/regex/detail/fileiter.hpp>
|
||||
#ifdef BOOST_REGEX_V3
|
||||
#include <boost/regex/v3/fileiter.hpp>
|
||||
#else
|
||||
#include <boost/regex/v4/fileiter.hpp>
|
||||
#endif
|
||||
|
||||
#include "jgrep.h"
|
||||
|
||||
@ -47,10 +52,10 @@ class ogrep_predicate
|
||||
unsigned int& lines;
|
||||
const char* filename;
|
||||
unsigned int last_line;
|
||||
iterator end_of_storage;
|
||||
iterator end_of_storage, last_line_start;
|
||||
public:
|
||||
ogrep_predicate(unsigned int& i, const char* p, iterator e) : lines(i), filename(p), last_line(-1), end_of_storage(e) {}
|
||||
ogrep_predicate(const ogrep_predicate& o) : lines(o.lines), filename(o.filename), last_line(o.last_line), end_of_storage(o.end_of_storage) {}
|
||||
ogrep_predicate(unsigned int& i, const char* p, iterator start, iterator end) : lines(i), filename(p), last_line(-1), end_of_storage(end), last_line_start(start) {}
|
||||
ogrep_predicate(const ogrep_predicate& o) : lines(o.lines), filename(o.filename), last_line(o.last_line), end_of_storage(o.end_of_storage), last_line_start(o.last_line_start) {}
|
||||
bool operator () (const boost::match_results<iterator, Allocator>& i);
|
||||
};
|
||||
|
||||
@ -63,42 +68,54 @@ public:
|
||||
template <class iterator, class Allocator>
|
||||
bool ogrep_predicate<iterator, Allocator>::operator()(const boost::match_results<iterator, Allocator>& i)
|
||||
{
|
||||
// if we haven't printed the filename yet, then do it now:
|
||||
if(last_line == (unsigned int)-1)
|
||||
{
|
||||
cout << "File " << filename << ":" << endl;
|
||||
if(last_line != i.line())
|
||||
last_line = 0;
|
||||
}
|
||||
// calculate which line we are on, by adding the number of newlines
|
||||
// we've skipped in the last search:
|
||||
int current_line = last_line + std::count(last_line_start, end_of_storage, '\n');
|
||||
// if we haven't already printed this line out, then do it now:
|
||||
if(last_line != current_line)
|
||||
{
|
||||
++lines;
|
||||
last_line = i.line();
|
||||
last_line = current_line;
|
||||
if(count_only == 0)
|
||||
{
|
||||
if(show_lines)
|
||||
cout << i.line() << "\t";
|
||||
iterator ptr = i.line_start();
|
||||
while((ptr != end_of_storage) && (*ptr != '\n'))++ptr;
|
||||
iterator pos = i.line_start();
|
||||
while(pos != ptr)
|
||||
cout << current_line << "\t";
|
||||
const char* nls = "\n";
|
||||
iterator ptr = std::find_end(last_line_start, i[0].first, nls, nls+1);
|
||||
++ptr;
|
||||
iterator ptr2 = ptr;
|
||||
while((ptr2 != end_of_storage) && (*ptr2 != '\n'))++ptr2;
|
||||
while(ptr != ptr2)
|
||||
{
|
||||
cout.put(*pos);
|
||||
++pos;
|
||||
cout.put(*ptr);
|
||||
++ptr;
|
||||
}
|
||||
cout << endl;
|
||||
}
|
||||
}
|
||||
// set the last line seen to the start of the current match:
|
||||
last_line_start = i[0].first;
|
||||
return true;
|
||||
}
|
||||
|
||||
using namespace boost;
|
||||
|
||||
void process_grep(const char* file)
|
||||
{
|
||||
try{
|
||||
using namespace boost;
|
||||
mapfile f(file);
|
||||
unsigned int count = 0;
|
||||
ogrep_predicate<mapfile::iterator, allocator_type> oi(count, file, f.end());
|
||||
ogrep_predicate<mapfile::iterator, boost::match_results<mapfile::iterator>::allocator_type> oi(count, file, f.begin(), f.end());
|
||||
if(files_only)
|
||||
{
|
||||
bool ok;
|
||||
boost::match_results<mapfile::iterator, allocator_type> m;
|
||||
boost::match_results<mapfile::iterator> m;
|
||||
ok = regex_search(f.begin(), f.end(), m, e, match_not_dot_newline | match_not_dot_null);
|
||||
if(ok)
|
||||
cout << "File " << file << endl;
|
||||
@ -137,3 +154,4 @@ void process_grep(const char* file)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -34,7 +34,11 @@ using std::endl;
|
||||
# pragma hrdstop
|
||||
#endif
|
||||
|
||||
#include <boost/regex/detail/fileiter.hpp>
|
||||
#ifdef BOOST_REGEX_V3
|
||||
#include <boost/regex/v3/fileiter.hpp>
|
||||
#else
|
||||
#include <boost/regex/v4/fileiter.hpp>
|
||||
#endif
|
||||
#include "jgrep.h"
|
||||
|
||||
#ifndef JM_ALGO_INCLUDED
|
||||
@ -165,6 +169,8 @@ void parse_switch(const char* flag)
|
||||
}
|
||||
}
|
||||
|
||||
using namespace boost;
|
||||
|
||||
void HandleFile(const char* wild)
|
||||
{
|
||||
using namespace boost;
|
||||
@ -226,14 +232,14 @@ void HandleArg(const char* arg)
|
||||
{
|
||||
if(words_only == 0)
|
||||
{
|
||||
e.set_expression(arg, use_case ? regbase::normal : regbase::normal | regbase::icase);
|
||||
e.set_expression(arg, use_case ? regex::normal : regbase::normal | regbase::icase);
|
||||
//ei.set_expression(arg);
|
||||
}
|
||||
else
|
||||
{
|
||||
char* buf = new char[std::strlen(arg) + 8];
|
||||
std::sprintf(buf, "\\<%s\\>", arg);
|
||||
e.set_expression(buf, use_case ? regbase::normal : regbase::normal | regbase::icase);
|
||||
e.set_expression(buf, use_case ? regex::normal : regbase::normal | regbase::icase);
|
||||
//ei.set_expression(buf);
|
||||
delete[] buf;
|
||||
}
|
||||
@ -255,7 +261,7 @@ void HandleArg(const char* arg)
|
||||
}
|
||||
if(words_only)
|
||||
std::strcat(buf2, "\\>");
|
||||
e.set_expression(buf2, use_case ? regbase::normal : regbase::normal | regbase::icase);
|
||||
e.set_expression(buf2, use_case ? regex::normal : regbase::normal | regbase::icase);
|
||||
//ei.set_expression(buf2);
|
||||
delete[] buf2;
|
||||
}
|
||||
@ -286,3 +292,4 @@ int main(int argc, char * argv[])
|
||||
|
||||
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user