mirror of
https://github.com/boostorg/regex.git
synced 2026-04-29 10:13:20 +02:00
Compare commits
467 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 755ea5b2ad | |||
| 90f4367b8d | |||
| db5748ae7e | |||
| 46b7d89fff | |||
| 7ee1a58a84 | |||
| bfa2168237 | |||
| 2f3b212a22 | |||
| d3a9bbfabd | |||
| 233f083720 | |||
| c39176085b | |||
| bf96863756 | |||
| bb27376db2 | |||
| cbc098536e | |||
| 9ce6ff7205 | |||
| bb0ae0940e | |||
| 6581468288 | |||
| dd5e27addb | |||
| 1991c202ed | |||
| 4781768515 | |||
| 6025be01c1 | |||
| f353225685 | |||
| b2e8ee918f | |||
| 6064aa15cb | |||
| bc6504eda9 | |||
| 8a01dedb52 | |||
| 35bf922e17 | |||
| ec74461c36 | |||
| 799901aafc | |||
| c18e751bfc | |||
| a87dad5cc8 | |||
| bbd5296b4e | |||
| 9e9fc27dc6 | |||
| a97324c1c4 | |||
| 90b647cdd7 | |||
| 80eb2c2bee | |||
| ab8f05f2a1 | |||
| 7a525369cc | |||
| 69723060e5 | |||
| a56990d55a | |||
| 8aad9e15af | |||
| c2de12f113 | |||
| 3022a819e6 | |||
| 9b75e91909 | |||
| df966c1410 | |||
| 9ca851d01f | |||
| 28285007cc | |||
| 0ae6fb5796 | |||
| a48a6de286 | |||
| e9596db92b | |||
| b912fb5b64 | |||
| 9a3fee10dd | |||
| 0d5dcf41d9 | |||
| c9f906eb14 | |||
| 7775706a95 | |||
| 774981bb52 | |||
| 90560a3278 | |||
| 2e0466d662 | |||
| a694bc1ebb | |||
| b04bc5b5b0 | |||
| ed93c55832 | |||
| d3a8abb5ef | |||
| 5473345609 | |||
| 112422adc9 | |||
| 1d1fadeb5a | |||
| c81ebebd32 | |||
| 3e5efe81d2 | |||
| 91b21e78ff | |||
| 5d1f265345 | |||
| 506cd316b2 | |||
| c2c5b3f726 | |||
| 21c368964f | |||
| de28eb9b18 | |||
| ca144bb2b3 | |||
| a2f958b60c | |||
| 7c5e1f05c4 | |||
| ef25339d94 | |||
| 31370cd498 | |||
| ea94315d6b | |||
| f736d985fb | |||
| ecd5dd5ff3 | |||
| 077f211f2f | |||
| 2ee7ef601c | |||
| eff6f06792 | |||
| 1df0b9cacd | |||
| c3f16e3834 | |||
| 012fe3a99d | |||
| dbb39f3589 | |||
| 40735d5630 | |||
| d28ac18da2 | |||
| 29df3606a1 | |||
| 3bedef8c4e | |||
| c04cb21103 | |||
| 56fadadba8 | |||
| d7e194585d | |||
| e874d7710b | |||
| ca338db5ae | |||
| 018fbfec05 | |||
| b7cb69bae3 | |||
| 8545aeb1f3 | |||
| 2a248d1f87 | |||
| 9781fe3150 | |||
| c8c4c1c289 | |||
| 5ef242d146 | |||
| c2db73aec7 | |||
| 30acb7d2f8 | |||
| 1e48609cfd | |||
| 34355d3e79 | |||
| 434f3589a5 | |||
| 71a0e020e2 | |||
| de0ab9092a | |||
| ab6f20486b | |||
| 916dbeadbf | |||
| 9079cc8201 | |||
| e2c97fbb13 | |||
| bc140f1948 | |||
| 24fec31d2c | |||
| ad21d2cb2f | |||
| 50dccbe6e0 | |||
| 396136146f | |||
| c0e6b1f5a2 | |||
| 138d526839 | |||
| 8e60fd2cb7 | |||
| 5dfe10a136 | |||
| c2b82eae1f | |||
| b0a325cf65 | |||
| 54be0eaa9d | |||
| 276fa31266 | |||
| 2e968dea9c | |||
| 97d3cdad83 | |||
| 99f8d02805 | |||
| 7043e5585f | |||
| 048d5b788c | |||
| ee631c02eb | |||
| 4600a25228 | |||
| aebb44e507 | |||
| 8d994b14b2 | |||
| d310bc9835 | |||
| 6c02074270 | |||
| ca44c8182c | |||
| 2e10c5ec17 | |||
| ba148bae42 | |||
| 7c74a98ae5 | |||
| 9424952e8f | |||
| c3f14400b0 | |||
| 55a6787950 | |||
| 4c0572d98f | |||
| 25e51d3984 | |||
| c9b37542c5 | |||
| 6382470ac1 | |||
| 1dc081e1c2 | |||
| b3e28896b7 | |||
| 76176b302b | |||
| a262f28327 | |||
| e3aacc5c55 | |||
| dc90d07749 | |||
| 300ca31723 | |||
| c65dd3be41 | |||
| 5a29047906 | |||
| cdd130ae2d | |||
| 9f47972bcf | |||
| 0633ba70f2 | |||
| 8330b19cec | |||
| b8eab985e5 | |||
| f90d8c667e | |||
| 4b7f14e72d | |||
| 89515b9a8e | |||
| 3075aaba4a | |||
| 50b8204753 | |||
| 02c652c01e | |||
| b3f7d35f68 | |||
| f1312f16c4 | |||
| 9ebe515adf | |||
| c9efbea4a7 | |||
| 6cbda47155 | |||
| 3e60ca3481 | |||
| 3026d5e6c6 | |||
| f3088d1c77 | |||
| f82771be8c | |||
| 02f6fd45b8 | |||
| 9058b985a9 | |||
| 65f6604b24 | |||
| 16d6b87b1b | |||
| 82572db442 | |||
| 80104e292d | |||
| be01708af3 | |||
| 39f1fb4d17 | |||
| b84b17b3c4 | |||
| 2c3ff62e1b | |||
| 7858e47a26 | |||
| cd0072b3e7 | |||
| bf9350aa16 | |||
| 6b95ac002e | |||
| 7f93cee9af | |||
| e79458b0e3 | |||
| 207b0c63cd | |||
| f6b9c3d809 | |||
| a008c722a4 | |||
| dddfc1a63a | |||
| a247f4d7f8 | |||
| 84c2228b3f | |||
| ebc12d24c9 | |||
| 1a50827c46 | |||
| d19f04af7b | |||
| 2e9fa8c8f8 | |||
| c642977acd | |||
| 27875c1e55 | |||
| 42337410fc | |||
| aa132bec5d | |||
| d0258375ae | |||
| 7ba011232c | |||
| 6bb6cddad6 | |||
| f9d0907868 | |||
| 8324fad77c | |||
| 23f71d7727 | |||
| de9338cedf | |||
| dc3878df84 | |||
| aa68609a60 | |||
| a804285fb6 | |||
| 8b4da77f83 | |||
| 2606d1bdd1 | |||
| 9215a04042 | |||
| f7eb12d9c7 | |||
| 515044821c | |||
| 72a7a13565 | |||
| 63778bea05 | |||
| 54e9a2fbcb | |||
| ff1c0a0bb5 | |||
| c23a7a8cfe | |||
| 651256800f | |||
| 696fa47670 | |||
| ab5a7a768d | |||
| a669854a84 | |||
| 11ea8aab76 | |||
| ee85ed89a1 | |||
| 13dfa17e63 | |||
| 182616ea25 | |||
| 83306608a7 | |||
| f3c1b8d784 | |||
| 3b27d5a38e | |||
| 567d76e8e4 | |||
| 51ef8177d3 | |||
| 2e1ed31f34 | |||
| ccc9c16e93 | |||
| 4e412a1774 | |||
| e4248fcb19 | |||
| ae95ac6ad0 | |||
| feb3f7bc40 | |||
| b66ac65061 | |||
| d695b70ee9 | |||
| 222b16693c | |||
| 6750cf4892 | |||
| 9d565f63ed | |||
| 8a5b00c128 | |||
| 11f535596b | |||
| bba214f904 | |||
| 8be91f0568 | |||
| cddfd077a8 | |||
| 41e54c1cf2 | |||
| 0f2f6b6dfc | |||
| ff80be2019 | |||
| 8e03097d9d | |||
| e12105e591 | |||
| 1c915e3fda | |||
| cb9409160a | |||
| c32c644a38 | |||
| 5c0a6398ab | |||
| 4a851cf958 | |||
| 6f9ba7a289 | |||
| 4a06f15183 | |||
| 01a3b56f8a | |||
| 3fc6433d44 | |||
| 5255c45b0a | |||
| ed48905c5e | |||
| 13769e4fff | |||
| 6dfa7ef86c | |||
| eb91bf612a | |||
| e016ef8e21 | |||
| ca984697f0 | |||
| 2f9da388c1 | |||
| f50f35d1fc | |||
| df4b8e696f | |||
| 3673a0a888 | |||
| a69678c3c6 | |||
| 8fb69853fc | |||
| 70199360d3 | |||
| 9aa18a159d | |||
| 4122e8f08d | |||
| 922322b644 | |||
| 89d445c1b6 | |||
| 31d1dc1182 | |||
| 8bb6861595 | |||
| 11ddff601b | |||
| 088b492987 | |||
| 535e1b05cc | |||
| 1f15026060 | |||
| f0f32bdda1 | |||
| a81a1ea30f | |||
| 640f633395 | |||
| 0ed72c37e4 | |||
| 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 | |||
| 0fec291b28 | |||
| 6ee955be5f | |||
| eeae9a0762 | |||
| c7c8400efa | |||
| a7f8f56d92 | |||
| 66ac67533c | |||
| d9694bbc1f | |||
| f81bdae7f1 | |||
| aebf86bbe5 | |||
| de9ecb7407 | |||
| fa43c7ab1d | |||
| 5f0f6fa8f1 | |||
| 81f404ec69 | |||
| 38b55d0db8 | |||
| bed785ad19 | |||
| bb711db956 | |||
| 13f9af564d | |||
| 43cf48f61e | |||
| 2767f7f6ba | |||
| 035e752ed2 | |||
| 753a3d6584 | |||
| ab0051399e | |||
| 61ea1b566a | |||
| 1ad6328d33 | |||
| e6a371c6d6 | |||
| ee59983ea9 | |||
| ad769fcfdb | |||
| 2468d450f2 | |||
| d47f20f147 | |||
| 0575e50ddb | |||
| de40dac5d1 | |||
| b2c4abc9cf | |||
| b856079e74 | |||
| 293b945785 | |||
| 998f94ffe9 | |||
| 53de3c4ae6 | |||
| bbbd65c2e4 | |||
| 129cf61f65 | |||
| 992eb043af | |||
| 084af757b4 | |||
| 1035f25b65 | |||
| eacf31772b | |||
| 8d8a209d8b | |||
| 6b75e3962d | |||
| 1826080071 | |||
| 2ee6dec715 | |||
| 298651b2f6 | |||
| 752c43f9d4 | |||
| 976fb02a1b | |||
| d67a843d5a | |||
| 3e3752e992 | |||
| 7c42b3aca6 | |||
| bb89bbb29a | |||
| 2035a49533 | |||
| 6e82619133 | |||
| 1d560fae85 | |||
| b4cf815f7d | |||
| 1d3653812a | |||
| 9ef4719dff | |||
| e18c474222 | |||
| 7f6be58d92 | |||
| 11accf4a8b | |||
| b55cce9a42 | |||
| 6f9658fa6c | |||
| 936e0cfd99 | |||
| 290270440e | |||
| 76c85c7c34 | |||
| 44d33b20d5 | |||
| 98377b57aa | |||
| 43df21bca1 | |||
| c8e9df8fa2 | |||
| a5d1526fbb | |||
| f79497c625 | |||
| a108657449 | |||
| 9225fa8531 | |||
| 07c20c1926 | |||
| d227059666 | |||
| f5082341c0 | |||
| 5613d77433 | |||
| 6463dcfb07 | |||
| c07c4e0a11 | |||
| e993619390 | |||
| e22aaa9d20 | |||
| 52dbd281ca | |||
| e4138b5bdc | |||
| 534f6273c0 | |||
| b2dd7877da | |||
| 0cda8c8a2e | |||
| 04282b5d0a | |||
| 554832217c | |||
| 63130c1ef5 | |||
| edbc68df6c | |||
| 372a07902e | |||
| 4ae95dae74 | |||
| 277ca851c8 | |||
| f0d62fb2c0 | |||
| 7104418bd5 | |||
| 0bd54d3821 | |||
| c167b1f183 | |||
| 52920ff98f | |||
| 72c3b4ed13 | |||
| 6cc5cf41d5 | |||
| a7984bb149 | |||
| 876ff39307 | |||
| 79f80ad09d | |||
| 19d8e96cf5 | |||
| e047b2b509 | |||
| 28968bd2b6 | |||
| c4b295684b | |||
| 33b6eb0637 | |||
| de9ad8df74 | |||
| a042a0b6de | |||
| f16f300347 | |||
| a543dce5e3 | |||
| fe45d5bf4a | |||
| 4dd87c299f | |||
| 3d3f591516 | |||
| 5b5d4c3145 | |||
| 1c45c7a48d | |||
| 4922ae784f | |||
| 007c0da3b2 | |||
| 3fb0375da4 | |||
| 0cef054b31 | |||
| 7218f9847a | |||
| 2bc1f9c998 | |||
| 9edaddab6f | |||
| 1647dd908e | |||
| 187208adf5 | |||
| 30e9920147 | |||
| 1d473147fd | |||
| 1be8e9241b | |||
| e60414a5e7 | |||
| 7bd8e2a14d | |||
| b2396011f9 | |||
| b9628e449d |
-1347
File diff suppressed because it is too large
Load Diff
@@ -1,26 +0,0 @@
|
||||
subproject libs/regex/build ;
|
||||
|
||||
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 ;
|
||||
|
||||
lib libboost_regex$(SUFLIB) : ../src/$(SOURCES).cpp
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug release
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
|
||||
dll libboost_regex$(SUFDLL[1]) : ../src/$(SOURCES).cpp
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_BUILD_DLL=1
|
||||
:
|
||||
debug release
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
|
||||
-355
@@ -1,355 +0,0 @@
|
||||
#
|
||||
# auto generated makefile for C++ Builder
|
||||
#
|
||||
# usage:
|
||||
# make
|
||||
# brings libraries up to date
|
||||
# make install
|
||||
# brings libraries up to date and copies binaries to your C++ Builder /lib and /bin directories (recomended)
|
||||
# make clean
|
||||
# removes all temporary files.
|
||||
|
||||
#
|
||||
# Add additional compiler options here:
|
||||
#
|
||||
CXXFLAGS=
|
||||
#
|
||||
# Add additional include directories here:
|
||||
#
|
||||
INCLUDES=
|
||||
#
|
||||
# add additional linker flags here:
|
||||
#
|
||||
XLFLAGS=
|
||||
#
|
||||
# add additional libraries to link to here:
|
||||
#
|
||||
LIBS=
|
||||
#
|
||||
# add additional static-library creation flags here:
|
||||
#
|
||||
XSFLAGS=
|
||||
|
||||
!ifndef BCROOT
|
||||
BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
|
||||
ALL_HEADER=../../../boost/cregex.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_config.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_options.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 : bcb5 bcb5\bcb5re300 bcb5\bcb5re300.lib bcb5\bcb5re300m bcb5\bcb5re300m.lib bcb5\bcb5re300lm bcb5\bcb5re300lm.lib bcb5\bcb5re300l bcb5\bcb5re300l.lib
|
||||
|
||||
clean : bcb5re300_clean bcb5re300m_clean bcb5re300lm_clean bcb5re300l_clean
|
||||
|
||||
install : all
|
||||
copy bcb5\bcb5re300.lib $(BCROOT)\lib
|
||||
copy bcb5\bcb5re300m.lib $(BCROOT)\lib
|
||||
copy bcb5\bcb5re300lm.lib $(BCROOT)\lib
|
||||
copy bcb5\bcb5re300lm.dll $(BCROOT)\bin
|
||||
copy bcb5\bcb5re300l.lib $(BCROOT)\lib
|
||||
copy bcb5\bcb5re300l.dll $(BCROOT)\bin
|
||||
|
||||
bcb5 :
|
||||
-mkdir bcb5
|
||||
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb5re300.lib
|
||||
#
|
||||
########################################################
|
||||
bcb5\bcb5re300\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300 :
|
||||
-mkdir bcb5\bcb5re300
|
||||
|
||||
bcb5re300_clean :
|
||||
del bcb5\bcb5re300\*.obj
|
||||
del bcb5\bcb5re300\*.il?
|
||||
del bcb5\bcb5re300\*.csm
|
||||
del bcb5\bcb5re300\*.tds
|
||||
|
||||
bcb5\bcb5re300.lib : bcb5\bcb5re300\c_regex_traits.obj bcb5\bcb5re300\c_regex_traits_common.obj bcb5\bcb5re300\cpp_regex_traits.obj bcb5\bcb5re300\cregex.obj bcb5\bcb5re300\fileiter.obj bcb5\bcb5re300\posix_api.obj bcb5\bcb5re300\regex.obj bcb5\bcb5re300\regex_debug.obj bcb5\bcb5re300\regex_synch.obj bcb5\bcb5re300\w32_regex_traits.obj bcb5\bcb5re300\wide_posix_api.obj
|
||||
tlib @&&|
|
||||
/P32 /C /u /a $(XSFLAGS) bcb5\bcb5re300.lib +bcb5\bcb5re300\c_regex_traits.obj +bcb5\bcb5re300\c_regex_traits_common.obj +bcb5\bcb5re300\cpp_regex_traits.obj +bcb5\bcb5re300\cregex.obj +bcb5\bcb5re300\fileiter.obj +bcb5\bcb5re300\posix_api.obj +bcb5\bcb5re300\regex.obj +bcb5\bcb5re300\regex_debug.obj +bcb5\bcb5re300\regex_synch.obj +bcb5\bcb5re300\w32_regex_traits.obj +bcb5\bcb5re300\wide_posix_api.obj
|
||||
|
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb5re300m.lib
|
||||
#
|
||||
########################################################
|
||||
bcb5\bcb5re300m\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m :
|
||||
-mkdir bcb5\bcb5re300m
|
||||
|
||||
bcb5re300m_clean :
|
||||
del bcb5\bcb5re300m\*.obj
|
||||
del bcb5\bcb5re300m\*.il?
|
||||
del bcb5\bcb5re300m\*.csm
|
||||
del bcb5\bcb5re300m\*.tds
|
||||
|
||||
bcb5\bcb5re300m.lib : bcb5\bcb5re300m\c_regex_traits.obj bcb5\bcb5re300m\c_regex_traits_common.obj bcb5\bcb5re300m\cpp_regex_traits.obj bcb5\bcb5re300m\cregex.obj bcb5\bcb5re300m\fileiter.obj bcb5\bcb5re300m\posix_api.obj bcb5\bcb5re300m\regex.obj bcb5\bcb5re300m\regex_debug.obj bcb5\bcb5re300m\regex_synch.obj bcb5\bcb5re300m\w32_regex_traits.obj bcb5\bcb5re300m\wide_posix_api.obj
|
||||
tlib @&&|
|
||||
/P32 /C /u /a $(XSFLAGS) bcb5\bcb5re300m.lib +bcb5\bcb5re300m\c_regex_traits.obj +bcb5\bcb5re300m\c_regex_traits_common.obj +bcb5\bcb5re300m\cpp_regex_traits.obj +bcb5\bcb5re300m\cregex.obj +bcb5\bcb5re300m\fileiter.obj +bcb5\bcb5re300m\posix_api.obj +bcb5\bcb5re300m\regex.obj +bcb5\bcb5re300m\regex_debug.obj +bcb5\bcb5re300m\regex_synch.obj +bcb5\bcb5re300m\w32_regex_traits.obj +bcb5\bcb5re300m\wide_posix_api.obj
|
||||
|
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb5re300lm.lib
|
||||
#
|
||||
########################################################
|
||||
bcb5\bcb5re300lm\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm :
|
||||
-mkdir bcb5\bcb5re300lm
|
||||
|
||||
bcb5re300lm_clean :
|
||||
del bcb5\bcb5re300lm\*.obj
|
||||
del bcb5\bcb5re300lm\*.il?
|
||||
del bcb5\bcb5re300lm\*.csm
|
||||
del bcb5\bcb5re300lm\*.tds
|
||||
del bcb5\*.tds
|
||||
|
||||
bcb5\bcb5re300lm.lib : bcb5\bcb5re300lm\c_regex_traits.obj bcb5\bcb5re300lm\c_regex_traits_common.obj bcb5\bcb5re300lm\cpp_regex_traits.obj bcb5\bcb5re300lm\cregex.obj bcb5\bcb5re300lm\fileiter.obj bcb5\bcb5re300lm\posix_api.obj bcb5\bcb5re300lm\regex.obj bcb5\bcb5re300lm\regex_debug.obj bcb5\bcb5re300lm\regex_synch.obj bcb5\bcb5re300lm\w32_regex_traits.obj bcb5\bcb5re300lm\wide_posix_api.obj
|
||||
bcc32 @&&|
|
||||
-DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb5\bcb5re300lm.dll $(XLFLAGS) bcb5\bcb5re300lm\c_regex_traits.obj bcb5\bcb5re300lm\c_regex_traits_common.obj bcb5\bcb5re300lm\cpp_regex_traits.obj bcb5\bcb5re300lm\cregex.obj bcb5\bcb5re300lm\fileiter.obj bcb5\bcb5re300lm\posix_api.obj bcb5\bcb5re300lm\regex.obj bcb5\bcb5re300lm\regex_debug.obj bcb5\bcb5re300lm\regex_synch.obj bcb5\bcb5re300lm\w32_regex_traits.obj bcb5\bcb5re300lm\wide_posix_api.obj $(LIBS)
|
||||
|
|
||||
implib -c bcb5\bcb5re300lm.lib bcb5\bcb5re300lm.dll
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb5re300l.lib
|
||||
#
|
||||
########################################################
|
||||
bcb5\bcb5re300l\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l :
|
||||
-mkdir bcb5\bcb5re300l
|
||||
|
||||
bcb5re300l_clean :
|
||||
del bcb5\bcb5re300l\*.obj
|
||||
del bcb5\bcb5re300l\*.il?
|
||||
del bcb5\bcb5re300l\*.csm
|
||||
del bcb5\bcb5re300l\*.tds
|
||||
del bcb5\*.tds
|
||||
|
||||
bcb5\bcb5re300l.lib : bcb5\bcb5re300l\c_regex_traits.obj bcb5\bcb5re300l\c_regex_traits_common.obj bcb5\bcb5re300l\cpp_regex_traits.obj bcb5\bcb5re300l\cregex.obj bcb5\bcb5re300l\fileiter.obj bcb5\bcb5re300l\posix_api.obj bcb5\bcb5re300l\regex.obj bcb5\bcb5re300l\regex_debug.obj bcb5\bcb5re300l\regex_synch.obj bcb5\bcb5re300l\w32_regex_traits.obj bcb5\bcb5re300l\wide_posix_api.obj
|
||||
bcc32 @&&|
|
||||
-DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb5\bcb5re300l.dll $(XLFLAGS) bcb5\bcb5re300l\c_regex_traits.obj bcb5\bcb5re300l\c_regex_traits_common.obj bcb5\bcb5re300l\cpp_regex_traits.obj bcb5\bcb5re300l\cregex.obj bcb5\bcb5re300l\fileiter.obj bcb5\bcb5re300l\posix_api.obj bcb5\bcb5re300l\regex.obj bcb5\bcb5re300l\regex_debug.obj bcb5\bcb5re300l\regex_synch.obj bcb5\bcb5re300l\w32_regex_traits.obj bcb5\bcb5re300l\wide_posix_api.obj $(LIBS)
|
||||
|
|
||||
implib -c bcb5\bcb5re300l.lib bcb5\bcb5re300l.dll
|
||||
|
||||
-508
@@ -1,508 +0,0 @@
|
||||
#
|
||||
# auto generated makefile for C++ Builder
|
||||
#
|
||||
# usage:
|
||||
# make
|
||||
# brings libraries up to date
|
||||
# make install
|
||||
# brings libraries up to date and copies binaries to your C++ Builder /lib and /bin directories (recomended)
|
||||
# make clean
|
||||
# removes all temporary files.
|
||||
|
||||
#
|
||||
# Add additional compiler options here:
|
||||
#
|
||||
CXXFLAGS=
|
||||
#
|
||||
# Add additional include directories here:
|
||||
#
|
||||
INCLUDES=
|
||||
#
|
||||
# add additional linker flags here:
|
||||
#
|
||||
XLFLAGS=
|
||||
#
|
||||
# add additional libraries to link to here:
|
||||
#
|
||||
LIBS=
|
||||
#
|
||||
# add additional static-library creation flags here:
|
||||
#
|
||||
XSFLAGS=
|
||||
|
||||
!ifndef BCROOT
|
||||
BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
|
||||
ALL_HEADER=../../../boost/cregex.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_config.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_options.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 : bcb4 bcb4\bcb4re300 bcb4\bcb4re300.lib bcb4\bcb4re300m bcb4\bcb4re300m.lib bcb4\bcb4re300v bcb4\bcb4re300v.lib bcb4\bcb4re300lv bcb4\bcb4re300lv.lib bcb4\bcb4re300lm bcb4\bcb4re300lm.lib bcb4\bcb4re300l bcb4\bcb4re300l.lib
|
||||
|
||||
clean : bcb4re300_clean bcb4re300m_clean bcb4re300v_clean bcb4re300lv_clean bcb4re300lm_clean bcb4re300l_clean
|
||||
|
||||
install : all
|
||||
copy bcb4\bcb4re300.lib $(BCROOT)\lib
|
||||
copy bcb4\bcb4re300m.lib $(BCROOT)\lib
|
||||
copy bcb4\bcb4re300v.lib $(BCROOT)\lib
|
||||
copy bcb4\bcb4re300lv.lib $(BCROOT)\lib
|
||||
copy bcb4\bcb4re300lv.dll $(BCROOT)\bin
|
||||
copy bcb4\bcb4re300lm.lib $(BCROOT)\lib
|
||||
copy bcb4\bcb4re300lm.dll $(BCROOT)\bin
|
||||
copy bcb4\bcb4re300l.lib $(BCROOT)\lib
|
||||
copy bcb4\bcb4re300l.dll $(BCROOT)\bin
|
||||
|
||||
bcb4 :
|
||||
-mkdir bcb4
|
||||
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb4re300.lib
|
||||
#
|
||||
########################################################
|
||||
bcb4\bcb4re300\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300 :
|
||||
-mkdir bcb4\bcb4re300
|
||||
|
||||
bcb4re300_clean :
|
||||
del bcb4\bcb4re300\*.obj
|
||||
del bcb4\bcb4re300\*.il?
|
||||
del bcb4\bcb4re300\*.csm
|
||||
del bcb4\bcb4re300\*.tds
|
||||
|
||||
bcb4\bcb4re300.lib : bcb4\bcb4re300\c_regex_traits.obj bcb4\bcb4re300\c_regex_traits_common.obj bcb4\bcb4re300\cpp_regex_traits.obj bcb4\bcb4re300\cregex.obj bcb4\bcb4re300\fileiter.obj bcb4\bcb4re300\posix_api.obj bcb4\bcb4re300\regex.obj bcb4\bcb4re300\regex_debug.obj bcb4\bcb4re300\regex_synch.obj bcb4\bcb4re300\w32_regex_traits.obj bcb4\bcb4re300\wide_posix_api.obj
|
||||
tlib @&&|
|
||||
/P32 /C /u /a $(XSFLAGS) bcb4\bcb4re300.lib +bcb4\bcb4re300\c_regex_traits.obj +bcb4\bcb4re300\c_regex_traits_common.obj +bcb4\bcb4re300\cpp_regex_traits.obj +bcb4\bcb4re300\cregex.obj +bcb4\bcb4re300\fileiter.obj +bcb4\bcb4re300\posix_api.obj +bcb4\bcb4re300\regex.obj +bcb4\bcb4re300\regex_debug.obj +bcb4\bcb4re300\regex_synch.obj +bcb4\bcb4re300\w32_regex_traits.obj +bcb4\bcb4re300\wide_posix_api.obj
|
||||
|
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb4re300m.lib
|
||||
#
|
||||
########################################################
|
||||
bcb4\bcb4re300m\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300m\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300m\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300m\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300m\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300m\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300m\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300m\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300m\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300m\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300m\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300m\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300m\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300m\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300m\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300m\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300m\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300m\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300m\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300m\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300m\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300m\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300m :
|
||||
-mkdir bcb4\bcb4re300m
|
||||
|
||||
bcb4re300m_clean :
|
||||
del bcb4\bcb4re300m\*.obj
|
||||
del bcb4\bcb4re300m\*.il?
|
||||
del bcb4\bcb4re300m\*.csm
|
||||
del bcb4\bcb4re300m\*.tds
|
||||
|
||||
bcb4\bcb4re300m.lib : bcb4\bcb4re300m\c_regex_traits.obj bcb4\bcb4re300m\c_regex_traits_common.obj bcb4\bcb4re300m\cpp_regex_traits.obj bcb4\bcb4re300m\cregex.obj bcb4\bcb4re300m\fileiter.obj bcb4\bcb4re300m\posix_api.obj bcb4\bcb4re300m\regex.obj bcb4\bcb4re300m\regex_debug.obj bcb4\bcb4re300m\regex_synch.obj bcb4\bcb4re300m\w32_regex_traits.obj bcb4\bcb4re300m\wide_posix_api.obj
|
||||
tlib @&&|
|
||||
/P32 /C /u /a $(XSFLAGS) bcb4\bcb4re300m.lib +bcb4\bcb4re300m\c_regex_traits.obj +bcb4\bcb4re300m\c_regex_traits_common.obj +bcb4\bcb4re300m\cpp_regex_traits.obj +bcb4\bcb4re300m\cregex.obj +bcb4\bcb4re300m\fileiter.obj +bcb4\bcb4re300m\posix_api.obj +bcb4\bcb4re300m\regex.obj +bcb4\bcb4re300m\regex_debug.obj +bcb4\bcb4re300m\regex_synch.obj +bcb4\bcb4re300m\w32_regex_traits.obj +bcb4\bcb4re300m\wide_posix_api.obj
|
||||
|
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb4re300v.lib
|
||||
#
|
||||
########################################################
|
||||
bcb4\bcb4re300v\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300v\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300v\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300v\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300v\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300v\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300v\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300v\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300v\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300v\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300v\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300v\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300v\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300v\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300v\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300v\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300v\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300v\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300v\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300v\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300v\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb4\bcb4re300v\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300v :
|
||||
-mkdir bcb4\bcb4re300v
|
||||
|
||||
bcb4re300v_clean :
|
||||
del bcb4\bcb4re300v\*.obj
|
||||
del bcb4\bcb4re300v\*.il?
|
||||
del bcb4\bcb4re300v\*.csm
|
||||
del bcb4\bcb4re300v\*.tds
|
||||
|
||||
bcb4\bcb4re300v.lib : bcb4\bcb4re300v\c_regex_traits.obj bcb4\bcb4re300v\c_regex_traits_common.obj bcb4\bcb4re300v\cpp_regex_traits.obj bcb4\bcb4re300v\cregex.obj bcb4\bcb4re300v\fileiter.obj bcb4\bcb4re300v\posix_api.obj bcb4\bcb4re300v\regex.obj bcb4\bcb4re300v\regex_debug.obj bcb4\bcb4re300v\regex_synch.obj bcb4\bcb4re300v\w32_regex_traits.obj bcb4\bcb4re300v\wide_posix_api.obj
|
||||
tlib @&&|
|
||||
/P32 /C /u /a $(XSFLAGS) bcb4\bcb4re300v.lib +bcb4\bcb4re300v\c_regex_traits.obj +bcb4\bcb4re300v\c_regex_traits_common.obj +bcb4\bcb4re300v\cpp_regex_traits.obj +bcb4\bcb4re300v\cregex.obj +bcb4\bcb4re300v\fileiter.obj +bcb4\bcb4re300v\posix_api.obj +bcb4\bcb4re300v\regex.obj +bcb4\bcb4re300v\regex_debug.obj +bcb4\bcb4re300v\regex_synch.obj +bcb4\bcb4re300v\w32_regex_traits.obj +bcb4\bcb4re300v\wide_posix_api.obj
|
||||
|
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb4re300lv.lib
|
||||
#
|
||||
########################################################
|
||||
bcb4\bcb4re300lv\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lv\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lv\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lv\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lv\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lv\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lv\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lv\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lv\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lv\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lv\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lv\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lv\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lv\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lv\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lv\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lv\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lv\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lv\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lv\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lv\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lv\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lv :
|
||||
-mkdir bcb4\bcb4re300lv
|
||||
|
||||
bcb4re300lv_clean :
|
||||
del bcb4\bcb4re300lv\*.obj
|
||||
del bcb4\bcb4re300lv\*.il?
|
||||
del bcb4\bcb4re300lv\*.csm
|
||||
del bcb4\bcb4re300lv\*.tds
|
||||
del bcb4\*.tds
|
||||
|
||||
bcb4\bcb4re300lv.lib : bcb4\bcb4re300lv\c_regex_traits.obj bcb4\bcb4re300lv\c_regex_traits_common.obj bcb4\bcb4re300lv\cpp_regex_traits.obj bcb4\bcb4re300lv\cregex.obj bcb4\bcb4re300lv\fileiter.obj bcb4\bcb4re300lv\posix_api.obj bcb4\bcb4re300lv\regex.obj bcb4\bcb4re300lv\regex_debug.obj bcb4\bcb4re300lv\regex_synch.obj bcb4\bcb4re300lv\w32_regex_traits.obj bcb4\bcb4re300lv\wide_posix_api.obj
|
||||
bcc32 @&&|
|
||||
-DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb4\bcb4re300lv.dll $(XLFLAGS) bcb4\bcb4re300lv\c_regex_traits.obj bcb4\bcb4re300lv\c_regex_traits_common.obj bcb4\bcb4re300lv\cpp_regex_traits.obj bcb4\bcb4re300lv\cregex.obj bcb4\bcb4re300lv\fileiter.obj bcb4\bcb4re300lv\posix_api.obj bcb4\bcb4re300lv\regex.obj bcb4\bcb4re300lv\regex_debug.obj bcb4\bcb4re300lv\regex_synch.obj bcb4\bcb4re300lv\w32_regex_traits.obj bcb4\bcb4re300lv\wide_posix_api.obj $(LIBS)
|
||||
|
|
||||
implib -c bcb4\bcb4re300lv.lib bcb4\bcb4re300lv.dll
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb4re300lm.lib
|
||||
#
|
||||
########################################################
|
||||
bcb4\bcb4re300lm\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lm\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lm\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lm\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lm\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lm\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lm\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lm\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lm\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lm\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lm\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lm\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lm\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lm\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lm\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lm\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lm\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lm\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lm\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lm\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lm\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300lm\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300lm :
|
||||
-mkdir bcb4\bcb4re300lm
|
||||
|
||||
bcb4re300lm_clean :
|
||||
del bcb4\bcb4re300lm\*.obj
|
||||
del bcb4\bcb4re300lm\*.il?
|
||||
del bcb4\bcb4re300lm\*.csm
|
||||
del bcb4\bcb4re300lm\*.tds
|
||||
del bcb4\*.tds
|
||||
|
||||
bcb4\bcb4re300lm.lib : bcb4\bcb4re300lm\c_regex_traits.obj bcb4\bcb4re300lm\c_regex_traits_common.obj bcb4\bcb4re300lm\cpp_regex_traits.obj bcb4\bcb4re300lm\cregex.obj bcb4\bcb4re300lm\fileiter.obj bcb4\bcb4re300lm\posix_api.obj bcb4\bcb4re300lm\regex.obj bcb4\bcb4re300lm\regex_debug.obj bcb4\bcb4re300lm\regex_synch.obj bcb4\bcb4re300lm\w32_regex_traits.obj bcb4\bcb4re300lm\wide_posix_api.obj
|
||||
bcc32 @&&|
|
||||
-DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb4\bcb4re300lm.dll $(XLFLAGS) bcb4\bcb4re300lm\c_regex_traits.obj bcb4\bcb4re300lm\c_regex_traits_common.obj bcb4\bcb4re300lm\cpp_regex_traits.obj bcb4\bcb4re300lm\cregex.obj bcb4\bcb4re300lm\fileiter.obj bcb4\bcb4re300lm\posix_api.obj bcb4\bcb4re300lm\regex.obj bcb4\bcb4re300lm\regex_debug.obj bcb4\bcb4re300lm\regex_synch.obj bcb4\bcb4re300lm\w32_regex_traits.obj bcb4\bcb4re300lm\wide_posix_api.obj $(LIBS)
|
||||
|
|
||||
implib -c bcb4\bcb4re300lm.lib bcb4\bcb4re300lm.dll
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb4re300l.lib
|
||||
#
|
||||
########################################################
|
||||
bcb4\bcb4re300l\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300l\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300l\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300l\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300l\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300l\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300l\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300l\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300l\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300l\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300l\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300l\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300l\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300l\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300l\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300l\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300l\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300l\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300l\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300l\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300l\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb4\bcb4re300l\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb4\bcb4re300l :
|
||||
-mkdir bcb4\bcb4re300l
|
||||
|
||||
bcb4re300l_clean :
|
||||
del bcb4\bcb4re300l\*.obj
|
||||
del bcb4\bcb4re300l\*.il?
|
||||
del bcb4\bcb4re300l\*.csm
|
||||
del bcb4\bcb4re300l\*.tds
|
||||
del bcb4\*.tds
|
||||
|
||||
bcb4\bcb4re300l.lib : bcb4\bcb4re300l\c_regex_traits.obj bcb4\bcb4re300l\c_regex_traits_common.obj bcb4\bcb4re300l\cpp_regex_traits.obj bcb4\bcb4re300l\cregex.obj bcb4\bcb4re300l\fileiter.obj bcb4\bcb4re300l\posix_api.obj bcb4\bcb4re300l\regex.obj bcb4\bcb4re300l\regex_debug.obj bcb4\bcb4re300l\regex_synch.obj bcb4\bcb4re300l\w32_regex_traits.obj bcb4\bcb4re300l\wide_posix_api.obj
|
||||
bcc32 @&&|
|
||||
-DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb4\bcb4re300l.dll $(XLFLAGS) bcb4\bcb4re300l\c_regex_traits.obj bcb4\bcb4re300l\c_regex_traits_common.obj bcb4\bcb4re300l\cpp_regex_traits.obj bcb4\bcb4re300l\cregex.obj bcb4\bcb4re300l\fileiter.obj bcb4\bcb4re300l\posix_api.obj bcb4\bcb4re300l\regex.obj bcb4\bcb4re300l\regex_debug.obj bcb4\bcb4re300l\regex_synch.obj bcb4\bcb4re300l\w32_regex_traits.obj bcb4\bcb4re300l\wide_posix_api.obj $(LIBS)
|
||||
|
|
||||
implib -c bcb4\bcb4re300l.lib bcb4\bcb4re300l.dll
|
||||
|
||||
-508
@@ -1,508 +0,0 @@
|
||||
#
|
||||
# auto generated makefile for C++ Builder
|
||||
#
|
||||
# usage:
|
||||
# make
|
||||
# brings libraries up to date
|
||||
# make install
|
||||
# brings libraries up to date and copies binaries to your C++ Builder /lib and /bin directories (recomended)
|
||||
# make clean
|
||||
# removes all temporary files.
|
||||
|
||||
#
|
||||
# Add additional compiler options here:
|
||||
#
|
||||
CXXFLAGS=
|
||||
#
|
||||
# Add additional include directories here:
|
||||
#
|
||||
INCLUDES=
|
||||
#
|
||||
# add additional linker flags here:
|
||||
#
|
||||
XLFLAGS=
|
||||
#
|
||||
# add additional libraries to link to here:
|
||||
#
|
||||
LIBS=
|
||||
#
|
||||
# add additional static-library creation flags here:
|
||||
#
|
||||
XSFLAGS=
|
||||
|
||||
!ifndef BCROOT
|
||||
BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
|
||||
ALL_HEADER=../../../boost/cregex.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_config.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_options.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 : bcb5 bcb5\bcb5re300 bcb5\bcb5re300.lib bcb5\bcb5re300m bcb5\bcb5re300m.lib bcb5\bcb5re300v bcb5\bcb5re300v.lib bcb5\bcb5re300lv bcb5\bcb5re300lv.lib bcb5\bcb5re300lm bcb5\bcb5re300lm.lib bcb5\bcb5re300l bcb5\bcb5re300l.lib
|
||||
|
||||
clean : bcb5re300_clean bcb5re300m_clean bcb5re300v_clean bcb5re300lv_clean bcb5re300lm_clean bcb5re300l_clean
|
||||
|
||||
install : all
|
||||
copy bcb5\bcb5re300.lib $(BCROOT)\lib
|
||||
copy bcb5\bcb5re300m.lib $(BCROOT)\lib
|
||||
copy bcb5\bcb5re300v.lib $(BCROOT)\lib
|
||||
copy bcb5\bcb5re300lv.lib $(BCROOT)\lib
|
||||
copy bcb5\bcb5re300lv.dll $(BCROOT)\bin
|
||||
copy bcb5\bcb5re300lm.lib $(BCROOT)\lib
|
||||
copy bcb5\bcb5re300lm.dll $(BCROOT)\bin
|
||||
copy bcb5\bcb5re300l.lib $(BCROOT)\lib
|
||||
copy bcb5\bcb5re300l.dll $(BCROOT)\bin
|
||||
|
||||
bcb5 :
|
||||
-mkdir bcb5
|
||||
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb5re300.lib
|
||||
#
|
||||
########################################################
|
||||
bcb5\bcb5re300\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM- -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300 :
|
||||
-mkdir bcb5\bcb5re300
|
||||
|
||||
bcb5re300_clean :
|
||||
del bcb5\bcb5re300\*.obj
|
||||
del bcb5\bcb5re300\*.il?
|
||||
del bcb5\bcb5re300\*.csm
|
||||
del bcb5\bcb5re300\*.tds
|
||||
|
||||
bcb5\bcb5re300.lib : bcb5\bcb5re300\c_regex_traits.obj bcb5\bcb5re300\c_regex_traits_common.obj bcb5\bcb5re300\cpp_regex_traits.obj bcb5\bcb5re300\cregex.obj bcb5\bcb5re300\fileiter.obj bcb5\bcb5re300\posix_api.obj bcb5\bcb5re300\regex.obj bcb5\bcb5re300\regex_debug.obj bcb5\bcb5re300\regex_synch.obj bcb5\bcb5re300\w32_regex_traits.obj bcb5\bcb5re300\wide_posix_api.obj
|
||||
tlib @&&|
|
||||
/P32 /C /u /a $(XSFLAGS) bcb5\bcb5re300.lib +bcb5\bcb5re300\c_regex_traits.obj +bcb5\bcb5re300\c_regex_traits_common.obj +bcb5\bcb5re300\cpp_regex_traits.obj +bcb5\bcb5re300\cregex.obj +bcb5\bcb5re300\fileiter.obj +bcb5\bcb5re300\posix_api.obj +bcb5\bcb5re300\regex.obj +bcb5\bcb5re300\regex_debug.obj +bcb5\bcb5re300\regex_synch.obj +bcb5\bcb5re300\w32_regex_traits.obj +bcb5\bcb5re300\wide_posix_api.obj
|
||||
|
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb5re300m.lib
|
||||
#
|
||||
########################################################
|
||||
bcb5\bcb5re300m\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -D_NO_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300m\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300m :
|
||||
-mkdir bcb5\bcb5re300m
|
||||
|
||||
bcb5re300m_clean :
|
||||
del bcb5\bcb5re300m\*.obj
|
||||
del bcb5\bcb5re300m\*.il?
|
||||
del bcb5\bcb5re300m\*.csm
|
||||
del bcb5\bcb5re300m\*.tds
|
||||
|
||||
bcb5\bcb5re300m.lib : bcb5\bcb5re300m\c_regex_traits.obj bcb5\bcb5re300m\c_regex_traits_common.obj bcb5\bcb5re300m\cpp_regex_traits.obj bcb5\bcb5re300m\cregex.obj bcb5\bcb5re300m\fileiter.obj bcb5\bcb5re300m\posix_api.obj bcb5\bcb5re300m\regex.obj bcb5\bcb5re300m\regex_debug.obj bcb5\bcb5re300m\regex_synch.obj bcb5\bcb5re300m\w32_regex_traits.obj bcb5\bcb5re300m\wide_posix_api.obj
|
||||
tlib @&&|
|
||||
/P32 /C /u /a $(XSFLAGS) bcb5\bcb5re300m.lib +bcb5\bcb5re300m\c_regex_traits.obj +bcb5\bcb5re300m\c_regex_traits_common.obj +bcb5\bcb5re300m\cpp_regex_traits.obj +bcb5\bcb5re300m\cregex.obj +bcb5\bcb5re300m\fileiter.obj +bcb5\bcb5re300m\posix_api.obj +bcb5\bcb5re300m\regex.obj +bcb5\bcb5re300m\regex_debug.obj +bcb5\bcb5re300m\regex_synch.obj +bcb5\bcb5re300m\w32_regex_traits.obj +bcb5\bcb5re300m\wide_posix_api.obj
|
||||
|
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb5re300v.lib
|
||||
#
|
||||
########################################################
|
||||
bcb5\bcb5re300v\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300v\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300v\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300v\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300v\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300v\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300v\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300v\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300v\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300v\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300v\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300v\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300v\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300v\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300v\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300v\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300v\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300v\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300v\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300v\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300v\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -tWM -tWV -DJM_USE_VCL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ $(CXXFLAGS) -obcb5\bcb5re300v\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300v :
|
||||
-mkdir bcb5\bcb5re300v
|
||||
|
||||
bcb5re300v_clean :
|
||||
del bcb5\bcb5re300v\*.obj
|
||||
del bcb5\bcb5re300v\*.il?
|
||||
del bcb5\bcb5re300v\*.csm
|
||||
del bcb5\bcb5re300v\*.tds
|
||||
|
||||
bcb5\bcb5re300v.lib : bcb5\bcb5re300v\c_regex_traits.obj bcb5\bcb5re300v\c_regex_traits_common.obj bcb5\bcb5re300v\cpp_regex_traits.obj bcb5\bcb5re300v\cregex.obj bcb5\bcb5re300v\fileiter.obj bcb5\bcb5re300v\posix_api.obj bcb5\bcb5re300v\regex.obj bcb5\bcb5re300v\regex_debug.obj bcb5\bcb5re300v\regex_synch.obj bcb5\bcb5re300v\w32_regex_traits.obj bcb5\bcb5re300v\wide_posix_api.obj
|
||||
tlib @&&|
|
||||
/P32 /C /u /a $(XSFLAGS) bcb5\bcb5re300v.lib +bcb5\bcb5re300v\c_regex_traits.obj +bcb5\bcb5re300v\c_regex_traits_common.obj +bcb5\bcb5re300v\cpp_regex_traits.obj +bcb5\bcb5re300v\cregex.obj +bcb5\bcb5re300v\fileiter.obj +bcb5\bcb5re300v\posix_api.obj +bcb5\bcb5re300v\regex.obj +bcb5\bcb5re300v\regex_debug.obj +bcb5\bcb5re300v\regex_synch.obj +bcb5\bcb5re300v\w32_regex_traits.obj +bcb5\bcb5re300v\wide_posix_api.obj
|
||||
|
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb5re300lv.lib
|
||||
#
|
||||
########################################################
|
||||
bcb5\bcb5re300lv\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lv\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lv\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lv\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lv\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lv\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lv\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lv\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lv\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lv\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lv\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lv\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lv\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lv\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lv\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lv\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lv\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lv\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lv\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lv\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lv\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lv\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lv :
|
||||
-mkdir bcb5\bcb5re300lv
|
||||
|
||||
bcb5re300lv_clean :
|
||||
del bcb5\bcb5re300lv\*.obj
|
||||
del bcb5\bcb5re300lv\*.il?
|
||||
del bcb5\bcb5re300lv\*.csm
|
||||
del bcb5\bcb5re300lv\*.tds
|
||||
del bcb5\*.tds
|
||||
|
||||
bcb5\bcb5re300lv.lib : bcb5\bcb5re300lv\c_regex_traits.obj bcb5\bcb5re300lv\c_regex_traits_common.obj bcb5\bcb5re300lv\cpp_regex_traits.obj bcb5\bcb5re300lv\cregex.obj bcb5\bcb5re300lv\fileiter.obj bcb5\bcb5re300lv\posix_api.obj bcb5\bcb5re300lv\regex.obj bcb5\bcb5re300lv\regex_debug.obj bcb5\bcb5re300lv\regex_synch.obj bcb5\bcb5re300lv\w32_regex_traits.obj bcb5\bcb5re300lv\wide_posix_api.obj
|
||||
bcc32 @&&|
|
||||
-DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -tWV -DJM_USE_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8037 -w-8057 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb5\bcb5re300lv.dll $(XLFLAGS) bcb5\bcb5re300lv\c_regex_traits.obj bcb5\bcb5re300lv\c_regex_traits_common.obj bcb5\bcb5re300lv\cpp_regex_traits.obj bcb5\bcb5re300lv\cregex.obj bcb5\bcb5re300lv\fileiter.obj bcb5\bcb5re300lv\posix_api.obj bcb5\bcb5re300lv\regex.obj bcb5\bcb5re300lv\regex_debug.obj bcb5\bcb5re300lv\regex_synch.obj bcb5\bcb5re300lv\w32_regex_traits.obj bcb5\bcb5re300lv\wide_posix_api.obj $(LIBS)
|
||||
|
|
||||
implib -c bcb5\bcb5re300lv.lib bcb5\bcb5re300lv.dll
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb5re300lm.lib
|
||||
#
|
||||
########################################################
|
||||
bcb5\bcb5re300lm\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300lm\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300lm :
|
||||
-mkdir bcb5\bcb5re300lm
|
||||
|
||||
bcb5re300lm_clean :
|
||||
del bcb5\bcb5re300lm\*.obj
|
||||
del bcb5\bcb5re300lm\*.il?
|
||||
del bcb5\bcb5re300lm\*.csm
|
||||
del bcb5\bcb5re300lm\*.tds
|
||||
del bcb5\*.tds
|
||||
|
||||
bcb5\bcb5re300lm.lib : bcb5\bcb5re300lm\c_regex_traits.obj bcb5\bcb5re300lm\c_regex_traits_common.obj bcb5\bcb5re300lm\cpp_regex_traits.obj bcb5\bcb5re300lm\cregex.obj bcb5\bcb5re300lm\fileiter.obj bcb5\bcb5re300lm\posix_api.obj bcb5\bcb5re300lm\regex.obj bcb5\bcb5re300lm\regex_debug.obj bcb5\bcb5re300lm\regex_synch.obj bcb5\bcb5re300lm\w32_regex_traits.obj bcb5\bcb5re300lm\wide_posix_api.obj
|
||||
bcc32 @&&|
|
||||
-DBOOST_RE_BUILD_DLL -tWD -tWM -tWR -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb5\bcb5re300lm.dll $(XLFLAGS) bcb5\bcb5re300lm\c_regex_traits.obj bcb5\bcb5re300lm\c_regex_traits_common.obj bcb5\bcb5re300lm\cpp_regex_traits.obj bcb5\bcb5re300lm\cregex.obj bcb5\bcb5re300lm\fileiter.obj bcb5\bcb5re300lm\posix_api.obj bcb5\bcb5re300lm\regex.obj bcb5\bcb5re300lm\regex_debug.obj bcb5\bcb5re300lm\regex_synch.obj bcb5\bcb5re300lm\w32_regex_traits.obj bcb5\bcb5re300lm\wide_posix_api.obj $(LIBS)
|
||||
|
|
||||
implib -c bcb5\bcb5re300lm.lib bcb5\bcb5re300lm.dll
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for bcb5re300l.lib
|
||||
#
|
||||
########################################################
|
||||
bcb5\bcb5re300l\c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\c_regex_traits.obj ../src/c_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\c_regex_traits_common.obj ../src/c_regex_traits_common.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\cpp_regex_traits.obj ../src/cpp_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\cregex.obj ../src/cregex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\fileiter.obj ../src/fileiter.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\posix_api.obj ../src/posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\regex.obj ../src/regex.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\regex_debug.obj ../src/regex_debug.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\regex_synch.obj ../src/regex_synch.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\w32_regex_traits.obj ../src/w32_regex_traits.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l\wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
bcc32 @&&|
|
||||
-c $(INCLUDES) -DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; $(CXXFLAGS) -obcb5\bcb5re300l\wide_posix_api.obj ../src/wide_posix_api.cpp
|
||||
|
|
||||
|
||||
bcb5\bcb5re300l :
|
||||
-mkdir bcb5\bcb5re300l
|
||||
|
||||
bcb5re300l_clean :
|
||||
del bcb5\bcb5re300l\*.obj
|
||||
del bcb5\bcb5re300l\*.il?
|
||||
del bcb5\bcb5re300l\*.csm
|
||||
del bcb5\bcb5re300l\*.tds
|
||||
del bcb5\*.tds
|
||||
|
||||
bcb5\bcb5re300l.lib : bcb5\bcb5re300l\c_regex_traits.obj bcb5\bcb5re300l\c_regex_traits_common.obj bcb5\bcb5re300l\cpp_regex_traits.obj bcb5\bcb5re300l\cregex.obj bcb5\bcb5re300l\fileiter.obj bcb5\bcb5re300l\posix_api.obj bcb5\bcb5re300l\regex.obj bcb5\bcb5re300l\regex_debug.obj bcb5\bcb5re300l\regex_synch.obj bcb5\bcb5re300l\w32_regex_traits.obj bcb5\bcb5re300l\wide_posix_api.obj
|
||||
bcc32 @&&|
|
||||
-DBOOST_RE_BUILD_DLL -tWD -tWR -tWM- -D_NO_VCL -D_RTLDLL -O2 -w-inl -w-aus -w-rch -w-8012 -w-8057 -w-8037 -DSTRICT; -I$(BCROOT)\include;../../../ -L$(BCROOT)\lib;$(BCROOT)\lib\release; -ebcb5\bcb5re300l.dll $(XLFLAGS) bcb5\bcb5re300l\c_regex_traits.obj bcb5\bcb5re300l\c_regex_traits_common.obj bcb5\bcb5re300l\cpp_regex_traits.obj bcb5\bcb5re300l\cregex.obj bcb5\bcb5re300l\fileiter.obj bcb5\bcb5re300l\posix_api.obj bcb5\bcb5re300l\regex.obj bcb5\bcb5re300l\regex_debug.obj bcb5\bcb5re300l\regex_synch.obj bcb5\bcb5re300l\w32_regex_traits.obj bcb5\bcb5re300l\wide_posix_api.obj $(LIBS)
|
||||
|
|
||||
implib -c bcb5\bcb5re300l.lib bcb5\bcb5re300l.dll
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
#
|
||||
# auto generated makefile for gcc compiler
|
||||
#
|
||||
# usage:
|
||||
# make
|
||||
# brings libraries up to date
|
||||
# make clean
|
||||
# deletes temporary object files (but not archives).
|
||||
#
|
||||
|
||||
#
|
||||
# the following environment variables are recognised:
|
||||
# CXXFLAGS= extra compiler options - note applies to all build variants
|
||||
# INCLUDES= additional include directories
|
||||
# LDFLAGS= additional linker options
|
||||
# LIBS= additional library files
|
||||
|
||||
# compiler:
|
||||
CXX=g++
|
||||
LINKER=g++ -shared
|
||||
|
||||
#
|
||||
# compiler options for release build:
|
||||
#
|
||||
C1=-c -O2 -I../../../ -fPIC
|
||||
#
|
||||
# compiler options for debug build:
|
||||
#
|
||||
C2=-c -g -I../../../ -fPIC
|
||||
|
||||
|
||||
ALL_HEADER=../../../boost/cregex.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_config.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_options.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 : gcc gcc gcc/boost_regex_shared ./gcc/libboost_regex.so gcc gcc/boost_regex_debug_shared ./gcc/libboost_regex_debug.so
|
||||
|
||||
gcc :
|
||||
mkdir -p gcc
|
||||
|
||||
clean : boost_regex_clean boost_regex_debug_clean
|
||||
|
||||
install : all
|
||||
|
||||
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for libboost_regex.a
|
||||
#
|
||||
########################################################
|
||||
gcc/boost_regex_shared/c_regex_traits.o: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_shared/c_regex_traits.o $(C1) $(CXXFLAGS) ../src/c_regex_traits.cpp
|
||||
|
||||
gcc/boost_regex_shared/c_regex_traits_common.o: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_shared/c_regex_traits_common.o $(C1) $(CXXFLAGS) ../src/c_regex_traits_common.cpp
|
||||
|
||||
gcc/boost_regex_shared/cpp_regex_traits.o: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_shared/cpp_regex_traits.o $(C1) $(CXXFLAGS) ../src/cpp_regex_traits.cpp
|
||||
|
||||
gcc/boost_regex_shared/cregex.o: ../src/cregex.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_shared/cregex.o $(C1) $(CXXFLAGS) ../src/cregex.cpp
|
||||
|
||||
gcc/boost_regex_shared/fileiter.o: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_shared/fileiter.o $(C1) $(CXXFLAGS) ../src/fileiter.cpp
|
||||
|
||||
gcc/boost_regex_shared/posix_api.o: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_shared/posix_api.o $(C1) $(CXXFLAGS) ../src/posix_api.cpp
|
||||
|
||||
gcc/boost_regex_shared/regex.o: ../src/regex.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_shared/regex.o $(C1) $(CXXFLAGS) ../src/regex.cpp
|
||||
|
||||
gcc/boost_regex_shared/regex_debug.o: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_shared/regex_debug.o $(C1) $(CXXFLAGS) ../src/regex_debug.cpp
|
||||
|
||||
gcc/boost_regex_shared/regex_synch.o: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_shared/regex_synch.o $(C1) $(CXXFLAGS) ../src/regex_synch.cpp
|
||||
|
||||
gcc/boost_regex_shared/w32_regex_traits.o: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_shared/w32_regex_traits.o $(C1) $(CXXFLAGS) ../src/w32_regex_traits.cpp
|
||||
|
||||
gcc/boost_regex_shared/wide_posix_api.o: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_shared/wide_posix_api.o $(C1) $(CXXFLAGS) ../src/wide_posix_api.cpp
|
||||
|
||||
gcc/boost_regex_shared :
|
||||
mkdir -p gcc/boost_regex_shared
|
||||
|
||||
boost_regex_clean :
|
||||
rm -f gcc/boost_regex_shared/*.o
|
||||
|
||||
./gcc/libboost_regex.so : gcc/boost_regex_shared/c_regex_traits.o gcc/boost_regex_shared/c_regex_traits_common.o gcc/boost_regex_shared/cpp_regex_traits.o gcc/boost_regex_shared/cregex.o gcc/boost_regex_shared/fileiter.o gcc/boost_regex_shared/posix_api.o gcc/boost_regex_shared/regex.o gcc/boost_regex_shared/regex_debug.o gcc/boost_regex_shared/regex_synch.o gcc/boost_regex_shared/w32_regex_traits.o gcc/boost_regex_shared/wide_posix_api.o
|
||||
$(LINKER) -o gcc/libboost_regex.so $(LDFLAGS) gcc/boost_regex_shared/c_regex_traits.o gcc/boost_regex_shared/c_regex_traits_common.o gcc/boost_regex_shared/cpp_regex_traits.o gcc/boost_regex_shared/cregex.o gcc/boost_regex_shared/fileiter.o gcc/boost_regex_shared/posix_api.o gcc/boost_regex_shared/regex.o gcc/boost_regex_shared/regex_debug.o gcc/boost_regex_shared/regex_synch.o gcc/boost_regex_shared/w32_regex_traits.o gcc/boost_regex_shared/wide_posix_api.o $(LIBS)
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for libboost_regex_debug.a
|
||||
#
|
||||
########################################################
|
||||
gcc/boost_regex_debug_shared/c_regex_traits.o: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug_shared/c_regex_traits.o $(C2) $(CXXFLAGS) ../src/c_regex_traits.cpp
|
||||
|
||||
gcc/boost_regex_debug_shared/c_regex_traits_common.o: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug_shared/c_regex_traits_common.o $(C2) $(CXXFLAGS) ../src/c_regex_traits_common.cpp
|
||||
|
||||
gcc/boost_regex_debug_shared/cpp_regex_traits.o: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug_shared/cpp_regex_traits.o $(C2) $(CXXFLAGS) ../src/cpp_regex_traits.cpp
|
||||
|
||||
gcc/boost_regex_debug_shared/cregex.o: ../src/cregex.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug_shared/cregex.o $(C2) $(CXXFLAGS) ../src/cregex.cpp
|
||||
|
||||
gcc/boost_regex_debug_shared/fileiter.o: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug_shared/fileiter.o $(C2) $(CXXFLAGS) ../src/fileiter.cpp
|
||||
|
||||
gcc/boost_regex_debug_shared/posix_api.o: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug_shared/posix_api.o $(C2) $(CXXFLAGS) ../src/posix_api.cpp
|
||||
|
||||
gcc/boost_regex_debug_shared/regex.o: ../src/regex.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug_shared/regex.o $(C2) $(CXXFLAGS) ../src/regex.cpp
|
||||
|
||||
gcc/boost_regex_debug_shared/regex_debug.o: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug_shared/regex_debug.o $(C2) $(CXXFLAGS) ../src/regex_debug.cpp
|
||||
|
||||
gcc/boost_regex_debug_shared/regex_synch.o: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug_shared/regex_synch.o $(C2) $(CXXFLAGS) ../src/regex_synch.cpp
|
||||
|
||||
gcc/boost_regex_debug_shared/w32_regex_traits.o: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug_shared/w32_regex_traits.o $(C2) $(CXXFLAGS) ../src/w32_regex_traits.cpp
|
||||
|
||||
gcc/boost_regex_debug_shared/wide_posix_api.o: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug_shared/wide_posix_api.o $(C2) $(CXXFLAGS) ../src/wide_posix_api.cpp
|
||||
|
||||
gcc/boost_regex_debug_shared :
|
||||
mkdir -p gcc/boost_regex_debug_shared
|
||||
|
||||
boost_regex_debug_clean :
|
||||
rm -f gcc/boost_regex_debug_shared/*.o
|
||||
|
||||
./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/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
|
||||
$(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/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 $(LIBS)
|
||||
|
||||
-139
@@ -1,139 +0,0 @@
|
||||
#
|
||||
# auto generated makefile for gcc compiler
|
||||
#
|
||||
# usage:
|
||||
# make
|
||||
# brings libraries up to date
|
||||
# make clean
|
||||
# deletes temporary object files (but not archives).
|
||||
#
|
||||
|
||||
#
|
||||
# the following environment variables are recognised:
|
||||
# CXXFLAGS= extra compiler options - note applies to all build variants
|
||||
# INCLUDES= additional include directories
|
||||
# LDFLAGS= additional linker options
|
||||
# LIBS= additional library files
|
||||
|
||||
# compiler:
|
||||
CXX=g++
|
||||
LINKER=g++ -shared
|
||||
|
||||
#
|
||||
# compiler options for release build:
|
||||
#
|
||||
C1=-c -O2 -I../../../
|
||||
#
|
||||
# compiler options for debug build:
|
||||
#
|
||||
C2=-c -g -I../../../
|
||||
|
||||
|
||||
|
||||
ALL_HEADER=../../../boost/cregex.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_config.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_options.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 : gcc gcc gcc/boost_regex ./gcc/libboost_regex.a gcc gcc/boost_regex_debug ./gcc/libboost_regex_debug.a
|
||||
|
||||
gcc :
|
||||
mkdir -p gcc
|
||||
|
||||
clean : boost_regex_clean boost_regex_debug_clean
|
||||
|
||||
install : all
|
||||
|
||||
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for libboost_regex.a
|
||||
#
|
||||
########################################################
|
||||
gcc/boost_regex/c_regex_traits.o: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex/c_regex_traits.o $(C1) $(CXXFLAGS) ../src/c_regex_traits.cpp
|
||||
|
||||
gcc/boost_regex/c_regex_traits_common.o: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex/c_regex_traits_common.o $(C1) $(CXXFLAGS) ../src/c_regex_traits_common.cpp
|
||||
|
||||
gcc/boost_regex/cpp_regex_traits.o: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex/cpp_regex_traits.o $(C1) $(CXXFLAGS) ../src/cpp_regex_traits.cpp
|
||||
|
||||
gcc/boost_regex/cregex.o: ../src/cregex.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex/cregex.o $(C1) $(CXXFLAGS) ../src/cregex.cpp
|
||||
|
||||
gcc/boost_regex/fileiter.o: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex/fileiter.o $(C1) $(CXXFLAGS) ../src/fileiter.cpp
|
||||
|
||||
gcc/boost_regex/posix_api.o: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex/posix_api.o $(C1) $(CXXFLAGS) ../src/posix_api.cpp
|
||||
|
||||
gcc/boost_regex/regex.o: ../src/regex.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex/regex.o $(C1) $(CXXFLAGS) ../src/regex.cpp
|
||||
|
||||
gcc/boost_regex/regex_debug.o: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex/regex_debug.o $(C1) $(CXXFLAGS) ../src/regex_debug.cpp
|
||||
|
||||
gcc/boost_regex/regex_synch.o: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex/regex_synch.o $(C1) $(CXXFLAGS) ../src/regex_synch.cpp
|
||||
|
||||
gcc/boost_regex/w32_regex_traits.o: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex/w32_regex_traits.o $(C1) $(CXXFLAGS) ../src/w32_regex_traits.cpp
|
||||
|
||||
gcc/boost_regex/wide_posix_api.o: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex/wide_posix_api.o $(C1) $(CXXFLAGS) ../src/wide_posix_api.cpp
|
||||
|
||||
gcc/boost_regex :
|
||||
mkdir -p gcc/boost_regex
|
||||
|
||||
boost_regex_clean :
|
||||
rm -f gcc/boost_regex/*.o
|
||||
|
||||
./gcc/libboost_regex.a : gcc/boost_regex/c_regex_traits.o gcc/boost_regex/c_regex_traits_common.o gcc/boost_regex/cpp_regex_traits.o gcc/boost_regex/cregex.o gcc/boost_regex/fileiter.o gcc/boost_regex/posix_api.o gcc/boost_regex/regex.o gcc/boost_regex/regex_debug.o gcc/boost_regex/regex_synch.o gcc/boost_regex/w32_regex_traits.o gcc/boost_regex/wide_posix_api.o
|
||||
ar -r gcc/libboost_regex.a gcc/boost_regex/c_regex_traits.o gcc/boost_regex/c_regex_traits_common.o gcc/boost_regex/cpp_regex_traits.o gcc/boost_regex/cregex.o gcc/boost_regex/fileiter.o gcc/boost_regex/posix_api.o gcc/boost_regex/regex.o gcc/boost_regex/regex_debug.o gcc/boost_regex/regex_synch.o gcc/boost_regex/w32_regex_traits.o gcc/boost_regex/wide_posix_api.o
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for libboost_regex_debug.a
|
||||
#
|
||||
########################################################
|
||||
gcc/boost_regex_debug/c_regex_traits.o: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug/c_regex_traits.o $(C2) $(CXXFLAGS) ../src/c_regex_traits.cpp
|
||||
|
||||
gcc/boost_regex_debug/c_regex_traits_common.o: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug/c_regex_traits_common.o $(C2) $(CXXFLAGS) ../src/c_regex_traits_common.cpp
|
||||
|
||||
gcc/boost_regex_debug/cpp_regex_traits.o: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug/cpp_regex_traits.o $(C2) $(CXXFLAGS) ../src/cpp_regex_traits.cpp
|
||||
|
||||
gcc/boost_regex_debug/cregex.o: ../src/cregex.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug/cregex.o $(C2) $(CXXFLAGS) ../src/cregex.cpp
|
||||
|
||||
gcc/boost_regex_debug/fileiter.o: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug/fileiter.o $(C2) $(CXXFLAGS) ../src/fileiter.cpp
|
||||
|
||||
gcc/boost_regex_debug/posix_api.o: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug/posix_api.o $(C2) $(CXXFLAGS) ../src/posix_api.cpp
|
||||
|
||||
gcc/boost_regex_debug/regex.o: ../src/regex.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug/regex.o $(C2) $(CXXFLAGS) ../src/regex.cpp
|
||||
|
||||
gcc/boost_regex_debug/regex_debug.o: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug/regex_debug.o $(C2) $(CXXFLAGS) ../src/regex_debug.cpp
|
||||
|
||||
gcc/boost_regex_debug/regex_synch.o: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug/regex_synch.o $(C2) $(CXXFLAGS) ../src/regex_synch.cpp
|
||||
|
||||
gcc/boost_regex_debug/w32_regex_traits.o: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug/w32_regex_traits.o $(C2) $(CXXFLAGS) ../src/w32_regex_traits.cpp
|
||||
|
||||
gcc/boost_regex_debug/wide_posix_api.o: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o gcc/boost_regex_debug/wide_posix_api.o $(C2) $(CXXFLAGS) ../src/wide_posix_api.cpp
|
||||
|
||||
gcc/boost_regex_debug :
|
||||
mkdir -p gcc/boost_regex_debug
|
||||
|
||||
boost_regex_debug_clean :
|
||||
rm -f gcc/boost_regex_debug/*.o
|
||||
|
||||
./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/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
|
||||
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/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
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
#
|
||||
# auto generated makefile for generic compiler
|
||||
#
|
||||
# usage:
|
||||
# make
|
||||
# brings libraries up to date
|
||||
# make clean
|
||||
# deletes temporary object files (but not archives).
|
||||
#
|
||||
|
||||
#
|
||||
# the following environment variables are recognised:
|
||||
# CXXFLAGS= extra compiler options - note applies to all build variants
|
||||
# INCLUDES= additional include directories
|
||||
# LDFLAGS= additional linker options
|
||||
# LIBS= additional library files
|
||||
# CXX= compiler to use
|
||||
# LINKER= linker/archiver to use
|
||||
# name of subdirectory to use for object/archive files:
|
||||
DIRNAME=generic
|
||||
|
||||
#
|
||||
# default compiler options for release build:
|
||||
#
|
||||
C1=-c -O2 -I../../../
|
||||
|
||||
|
||||
|
||||
ALL_HEADER=../../../boost/cregex.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_config.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_options.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 : $(DIRNAME) $(DIRNAME) $(DIRNAME)/boost_regex ./$(DIRNAME)/libboost_regex.so
|
||||
|
||||
$(DIRNAME) :
|
||||
mkdir -p $(DIRNAME)
|
||||
|
||||
clean : boost_regex_clean
|
||||
|
||||
install : all
|
||||
|
||||
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for libboost_regex.so
|
||||
#
|
||||
########################################################
|
||||
$(DIRNAME)/boost_regex/c_regex_traits.o: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o $(DIRNAME)/boost_regex/c_regex_traits.o $(C1) $(CXXFLAGS) ../src/c_regex_traits.cpp
|
||||
|
||||
$(DIRNAME)/boost_regex/c_regex_traits_common.o: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o $(DIRNAME)/boost_regex/c_regex_traits_common.o $(C1) $(CXXFLAGS) ../src/c_regex_traits_common.cpp
|
||||
|
||||
$(DIRNAME)/boost_regex/cpp_regex_traits.o: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o $(DIRNAME)/boost_regex/cpp_regex_traits.o $(C1) $(CXXFLAGS) ../src/cpp_regex_traits.cpp
|
||||
|
||||
$(DIRNAME)/boost_regex/cregex.o: ../src/cregex.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o $(DIRNAME)/boost_regex/cregex.o $(C1) $(CXXFLAGS) ../src/cregex.cpp
|
||||
|
||||
$(DIRNAME)/boost_regex/fileiter.o: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o $(DIRNAME)/boost_regex/fileiter.o $(C1) $(CXXFLAGS) ../src/fileiter.cpp
|
||||
|
||||
$(DIRNAME)/boost_regex/posix_api.o: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o $(DIRNAME)/boost_regex/posix_api.o $(C1) $(CXXFLAGS) ../src/posix_api.cpp
|
||||
|
||||
$(DIRNAME)/boost_regex/regex.o: ../src/regex.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o $(DIRNAME)/boost_regex/regex.o $(C1) $(CXXFLAGS) ../src/regex.cpp
|
||||
|
||||
$(DIRNAME)/boost_regex/regex_debug.o: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o $(DIRNAME)/boost_regex/regex_debug.o $(C1) $(CXXFLAGS) ../src/regex_debug.cpp
|
||||
|
||||
$(DIRNAME)/boost_regex/regex_synch.o: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o $(DIRNAME)/boost_regex/regex_synch.o $(C1) $(CXXFLAGS) ../src/regex_synch.cpp
|
||||
|
||||
$(DIRNAME)/boost_regex/w32_regex_traits.o: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o $(DIRNAME)/boost_regex/w32_regex_traits.o $(C1) $(CXXFLAGS) ../src/w32_regex_traits.cpp
|
||||
|
||||
$(DIRNAME)/boost_regex/wide_posix_api.o: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
$(CXX) $(INCLUDES) -o $(DIRNAME)/boost_regex/wide_posix_api.o $(C1) $(CXXFLAGS) ../src/wide_posix_api.cpp
|
||||
|
||||
$(DIRNAME)/boost_regex :
|
||||
mkdir -p $(DIRNAME)/boost_regex
|
||||
|
||||
boost_regex_clean :
|
||||
rm -f $(DIRNAME)/boost_regex/*.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/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
|
||||
$(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/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 $(LIBS)
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
|
||||
LIBNAME=boost_regex
|
||||
|
||||
CPP=@CXX@
|
||||
AR=ar
|
||||
|
||||
CPP_PROJ=@CXXFLAGS@ -I../../../ -c
|
||||
|
||||
ALL_O=@ac_all_o@
|
||||
ALL_H=@ac_all_h@
|
||||
|
||||
lib$(LIBNAME).a : $(ALL_O)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
c_regex_traits.o: $(ALL_H) ../src/c_regex_traits.cpp
|
||||
$(CPP) $(CPP_PROJ) ../src/c_regex_traits.cpp
|
||||
$(AR) -rc lib$(LIBNAME).a c_regex_traits.o
|
||||
|
||||
|
||||
c_regex_traits_common.o: $(ALL_H) ../src/c_regex_traits_common.cpp
|
||||
$(CPP) $(CPP_PROJ) ../src/c_regex_traits_common.cpp
|
||||
$(AR) -rc lib$(LIBNAME).a c_regex_traits_common.o
|
||||
|
||||
|
||||
cpp_regex_traits.o: $(ALL_H) ../src/cpp_regex_traits.cpp
|
||||
$(CPP) $(CPP_PROJ) ../src/cpp_regex_traits.cpp
|
||||
$(AR) -rc lib$(LIBNAME).a cpp_regex_traits.o
|
||||
|
||||
|
||||
cregex.o: $(ALL_H) ../src/cregex.cpp
|
||||
$(CPP) $(CPP_PROJ) ../src/cregex.cpp
|
||||
$(AR) -rc lib$(LIBNAME).a cregex.o
|
||||
|
||||
|
||||
fileiter.o: $(ALL_H) ../src/fileiter.cpp
|
||||
$(CPP) $(CPP_PROJ) ../src/fileiter.cpp
|
||||
$(AR) -rc lib$(LIBNAME).a fileiter.o
|
||||
|
||||
|
||||
posix_api.o: $(ALL_H) ../src/posix_api.cpp
|
||||
$(CPP) $(CPP_PROJ) ../src/posix_api.cpp
|
||||
$(AR) -rc lib$(LIBNAME).a posix_api.o
|
||||
|
||||
|
||||
regex.o: $(ALL_H) ../src/regex.cpp
|
||||
$(CPP) $(CPP_PROJ) ../src/regex.cpp
|
||||
$(AR) -rc lib$(LIBNAME).a regex.o
|
||||
|
||||
|
||||
regex_debug.o: $(ALL_H) ../src/regex_debug.cpp
|
||||
$(CPP) $(CPP_PROJ) ../src/regex_debug.cpp
|
||||
$(AR) -rc lib$(LIBNAME).a regex_debug.o
|
||||
|
||||
|
||||
regex_synch.o: $(ALL_H) ../src/regex_synch.cpp
|
||||
$(CPP) $(CPP_PROJ) ../src/regex_synch.cpp
|
||||
$(AR) -rc lib$(LIBNAME).a regex_synch.o
|
||||
|
||||
|
||||
w32_regex_traits.o: $(ALL_H) ../src/w32_regex_traits.cpp
|
||||
$(CPP) $(CPP_PROJ) ../src/w32_regex_traits.cpp
|
||||
$(AR) -rc lib$(LIBNAME).a w32_regex_traits.o
|
||||
|
||||
|
||||
wide_posix_api.o: $(ALL_H) ../src/wide_posix_api.cpp
|
||||
$(CPP) $(CPP_PROJ) ../src/wide_posix_api.cpp
|
||||
$(AR) -rc lib$(LIBNAME).a wide_posix_api.o
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
|
||||
LIBNAME=boost_regex
|
||||
|
||||
CPP=@CXX@
|
||||
AR=ar
|
||||
|
||||
CPP_PROJ=@CXXFLAGS@ -I../../../ -c
|
||||
|
||||
ALL_O=@ac_all_o@
|
||||
ALL_H=@ac_all_h@
|
||||
|
||||
lib$(LIBNAME).a : $(ALL_O)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,240 +0,0 @@
|
||||
#
|
||||
# auto generated makefile for Sun Forte 6.1
|
||||
#
|
||||
# usage:
|
||||
# make
|
||||
# brings libraries up to date
|
||||
# make clean
|
||||
# removes all temporary files.
|
||||
|
||||
#
|
||||
# Add additional compiler options here:
|
||||
#
|
||||
CXXFLAGS=
|
||||
#
|
||||
# Add additional include directories here:
|
||||
#
|
||||
INCLUDES=
|
||||
#
|
||||
# add additional linker flags here:
|
||||
#
|
||||
LDFLAGS=
|
||||
#
|
||||
# add additional libraries to link to here:
|
||||
#
|
||||
LIBS=
|
||||
#
|
||||
# lib suffix string:
|
||||
#
|
||||
LIBSUFFIX=
|
||||
#
|
||||
# template cache path:
|
||||
#
|
||||
SUNWS_CACHE_NAME=SunWS_cache
|
||||
|
||||
|
||||
|
||||
ALL_HEADER=../../../boost/cregex.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_config.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_options.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 : 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
|
||||
|
||||
clean : libboost_regex$(LIBSUFFIX)_clean libboost_regex_mt$(LIBSUFFIX)_clean libboost_regex$(LIBSUFFIX)_clean_shared libboost_regex_mt$(LIBSUFFIX)_clean_shared
|
||||
|
||||
install : all
|
||||
|
||||
sunpro :
|
||||
mkdir -p sunpro
|
||||
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for libboost_regex$(LIBSUFFIX).a
|
||||
#
|
||||
########################################################
|
||||
sunpro/libboost_regex$(LIBSUFFIX)/c_regex_traits.o: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex$(LIBSUFFIX)/c_regex_traits.o ../src/c_regex_traits.cpp
|
||||
|
||||
sunpro/libboost_regex$(LIBSUFFIX)/c_regex_traits_common.o: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex$(LIBSUFFIX)/c_regex_traits_common.o ../src/c_regex_traits_common.cpp
|
||||
|
||||
sunpro/libboost_regex$(LIBSUFFIX)/cpp_regex_traits.o: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex$(LIBSUFFIX)/cpp_regex_traits.o ../src/cpp_regex_traits.cpp
|
||||
|
||||
sunpro/libboost_regex$(LIBSUFFIX)/cregex.o: ../src/cregex.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex$(LIBSUFFIX)/cregex.o ../src/cregex.cpp
|
||||
|
||||
sunpro/libboost_regex$(LIBSUFFIX)/fileiter.o: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex$(LIBSUFFIX)/fileiter.o ../src/fileiter.cpp
|
||||
|
||||
sunpro/libboost_regex$(LIBSUFFIX)/posix_api.o: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex$(LIBSUFFIX)/posix_api.o ../src/posix_api.cpp
|
||||
|
||||
sunpro/libboost_regex$(LIBSUFFIX)/regex.o: ../src/regex.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex$(LIBSUFFIX)/regex.o ../src/regex.cpp
|
||||
|
||||
sunpro/libboost_regex$(LIBSUFFIX)/regex_debug.o: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex$(LIBSUFFIX)/regex_debug.o ../src/regex_debug.cpp
|
||||
|
||||
sunpro/libboost_regex$(LIBSUFFIX)/regex_synch.o: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex$(LIBSUFFIX)/regex_synch.o ../src/regex_synch.cpp
|
||||
|
||||
sunpro/libboost_regex$(LIBSUFFIX)/w32_regex_traits.o: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex$(LIBSUFFIX)/w32_regex_traits.o ../src/w32_regex_traits.cpp
|
||||
|
||||
sunpro/libboost_regex$(LIBSUFFIX)/wide_posix_api.o: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex$(LIBSUFFIX)/wide_posix_api.o ../src/wide_posix_api.cpp
|
||||
|
||||
sunpro/libboost_regex$(LIBSUFFIX) :
|
||||
mkdir -p sunpro/libboost_regex$(LIBSUFFIX)
|
||||
|
||||
libboost_regex$(LIBSUFFIX)_clean :
|
||||
rm -f sunpro/libboost_regex$(LIBSUFFIX)/*.o
|
||||
rm -fr sunpro/libboost_regex$(LIBSUFFIX)/$(SUNWS_CACHE_NAME)
|
||||
|
||||
sunpro/libboost_regex$(LIBSUFFIX).a : sunpro/libboost_regex$(LIBSUFFIX)/c_regex_traits.o sunpro/libboost_regex$(LIBSUFFIX)/c_regex_traits_common.o sunpro/libboost_regex$(LIBSUFFIX)/cpp_regex_traits.o sunpro/libboost_regex$(LIBSUFFIX)/cregex.o sunpro/libboost_regex$(LIBSUFFIX)/fileiter.o sunpro/libboost_regex$(LIBSUFFIX)/posix_api.o sunpro/libboost_regex$(LIBSUFFIX)/regex.o sunpro/libboost_regex$(LIBSUFFIX)/regex_debug.o sunpro/libboost_regex$(LIBSUFFIX)/regex_synch.o sunpro/libboost_regex$(LIBSUFFIX)/w32_regex_traits.o sunpro/libboost_regex$(LIBSUFFIX)/wide_posix_api.o
|
||||
CC -xar $(CXXFLAGS) $(LDFLAGS) -o sunpro/libboost_regex$(LIBSUFFIX).a sunpro/libboost_regex$(LIBSUFFIX)/c_regex_traits.o sunpro/libboost_regex$(LIBSUFFIX)/c_regex_traits_common.o sunpro/libboost_regex$(LIBSUFFIX)/cpp_regex_traits.o sunpro/libboost_regex$(LIBSUFFIX)/cregex.o sunpro/libboost_regex$(LIBSUFFIX)/fileiter.o sunpro/libboost_regex$(LIBSUFFIX)/posix_api.o sunpro/libboost_regex$(LIBSUFFIX)/regex.o sunpro/libboost_regex$(LIBSUFFIX)/regex_debug.o sunpro/libboost_regex$(LIBSUFFIX)/regex_synch.o sunpro/libboost_regex$(LIBSUFFIX)/w32_regex_traits.o sunpro/libboost_regex$(LIBSUFFIX)/wide_posix_api.o
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for libboost_regex_mt$(LIBSUFFIX).a
|
||||
#
|
||||
########################################################
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX)/c_regex_traits.o: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex_mt$(LIBSUFFIX)/c_regex_traits.o ../src/c_regex_traits.cpp
|
||||
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX)/c_regex_traits_common.o: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex_mt$(LIBSUFFIX)/c_regex_traits_common.o ../src/c_regex_traits_common.cpp
|
||||
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX)/cpp_regex_traits.o: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex_mt$(LIBSUFFIX)/cpp_regex_traits.o ../src/cpp_regex_traits.cpp
|
||||
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX)/cregex.o: ../src/cregex.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex_mt$(LIBSUFFIX)/cregex.o ../src/cregex.cpp
|
||||
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX)/fileiter.o: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex_mt$(LIBSUFFIX)/fileiter.o ../src/fileiter.cpp
|
||||
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX)/posix_api.o: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex_mt$(LIBSUFFIX)/posix_api.o ../src/posix_api.cpp
|
||||
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX)/regex.o: ../src/regex.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex_mt$(LIBSUFFIX)/regex.o ../src/regex.cpp
|
||||
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX)/regex_debug.o: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex_mt$(LIBSUFFIX)/regex_debug.o ../src/regex_debug.cpp
|
||||
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX)/regex_synch.o: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex_mt$(LIBSUFFIX)/regex_synch.o ../src/regex_synch.cpp
|
||||
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX)/w32_regex_traits.o: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex_mt$(LIBSUFFIX)/w32_regex_traits.o ../src/w32_regex_traits.cpp
|
||||
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX)/wide_posix_api.o: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/libboost_regex_mt$(LIBSUFFIX)/wide_posix_api.o ../src/wide_posix_api.cpp
|
||||
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX) :
|
||||
mkdir -p sunpro/libboost_regex_mt$(LIBSUFFIX)
|
||||
|
||||
libboost_regex_mt$(LIBSUFFIX)_clean :
|
||||
rm -f sunpro/libboost_regex_mt$(LIBSUFFIX)/*.o
|
||||
rm -fr sunpro/libboost_regex_mt$(LIBSUFFIX)/$(SUNWS_CACHE_NAME)
|
||||
|
||||
sunpro/libboost_regex_mt$(LIBSUFFIX).a : sunpro/libboost_regex_mt$(LIBSUFFIX)/c_regex_traits.o sunpro/libboost_regex_mt$(LIBSUFFIX)/c_regex_traits_common.o sunpro/libboost_regex_mt$(LIBSUFFIX)/cpp_regex_traits.o sunpro/libboost_regex_mt$(LIBSUFFIX)/cregex.o sunpro/libboost_regex_mt$(LIBSUFFIX)/fileiter.o sunpro/libboost_regex_mt$(LIBSUFFIX)/posix_api.o sunpro/libboost_regex_mt$(LIBSUFFIX)/regex.o sunpro/libboost_regex_mt$(LIBSUFFIX)/regex_debug.o sunpro/libboost_regex_mt$(LIBSUFFIX)/regex_synch.o sunpro/libboost_regex_mt$(LIBSUFFIX)/w32_regex_traits.o sunpro/libboost_regex_mt$(LIBSUFFIX)/wide_posix_api.o
|
||||
CC -xar $(CXXFLAGS) $(LDFLAGS) -o sunpro/libboost_regex_mt$(LIBSUFFIX).a sunpro/libboost_regex_mt$(LIBSUFFIX)/c_regex_traits.o sunpro/libboost_regex_mt$(LIBSUFFIX)/c_regex_traits_common.o sunpro/libboost_regex_mt$(LIBSUFFIX)/cpp_regex_traits.o sunpro/libboost_regex_mt$(LIBSUFFIX)/cregex.o sunpro/libboost_regex_mt$(LIBSUFFIX)/fileiter.o sunpro/libboost_regex_mt$(LIBSUFFIX)/posix_api.o sunpro/libboost_regex_mt$(LIBSUFFIX)/regex.o sunpro/libboost_regex_mt$(LIBSUFFIX)/regex_debug.o sunpro/libboost_regex_mt$(LIBSUFFIX)/regex_synch.o sunpro/libboost_regex_mt$(LIBSUFFIX)/w32_regex_traits.o sunpro/libboost_regex_mt$(LIBSUFFIX)/wide_posix_api.o
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for libboost_regex$(LIBSUFFIX).so
|
||||
#
|
||||
########################################################
|
||||
sunpro/shared_libboost_regex$(LIBSUFFIX)/c_regex_traits.o: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex$(LIBSUFFIX)/c_regex_traits.o ../src/c_regex_traits.cpp
|
||||
|
||||
sunpro/shared_libboost_regex$(LIBSUFFIX)/c_regex_traits_common.o: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex$(LIBSUFFIX)/c_regex_traits_common.o ../src/c_regex_traits_common.cpp
|
||||
|
||||
sunpro/shared_libboost_regex$(LIBSUFFIX)/cpp_regex_traits.o: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex$(LIBSUFFIX)/cpp_regex_traits.o ../src/cpp_regex_traits.cpp
|
||||
|
||||
sunpro/shared_libboost_regex$(LIBSUFFIX)/cregex.o: ../src/cregex.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex$(LIBSUFFIX)/cregex.o ../src/cregex.cpp
|
||||
|
||||
sunpro/shared_libboost_regex$(LIBSUFFIX)/fileiter.o: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex$(LIBSUFFIX)/fileiter.o ../src/fileiter.cpp
|
||||
|
||||
sunpro/shared_libboost_regex$(LIBSUFFIX)/posix_api.o: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex$(LIBSUFFIX)/posix_api.o ../src/posix_api.cpp
|
||||
|
||||
sunpro/shared_libboost_regex$(LIBSUFFIX)/regex.o: ../src/regex.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex$(LIBSUFFIX)/regex.o ../src/regex.cpp
|
||||
|
||||
sunpro/shared_libboost_regex$(LIBSUFFIX)/regex_debug.o: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex$(LIBSUFFIX)/regex_debug.o ../src/regex_debug.cpp
|
||||
|
||||
sunpro/shared_libboost_regex$(LIBSUFFIX)/regex_synch.o: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex$(LIBSUFFIX)/regex_synch.o ../src/regex_synch.cpp
|
||||
|
||||
sunpro/shared_libboost_regex$(LIBSUFFIX)/w32_regex_traits.o: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex$(LIBSUFFIX)/w32_regex_traits.o ../src/w32_regex_traits.cpp
|
||||
|
||||
sunpro/shared_libboost_regex$(LIBSUFFIX)/wide_posix_api.o: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex$(LIBSUFFIX)/wide_posix_api.o ../src/wide_posix_api.cpp
|
||||
|
||||
sunpro/shared_libboost_regex$(LIBSUFFIX) :
|
||||
mkdir -p sunpro/shared_libboost_regex$(LIBSUFFIX)
|
||||
|
||||
libboost_regex$(LIBSUFFIX)_clean_shared :
|
||||
rm -f sunpro/shared_libboost_regex$(LIBSUFFIX)/*.o
|
||||
rm -fr sunpro/shared_libboost_regex$(LIBSUFFIX)/$(SUNWS_CACHE_NAME)
|
||||
|
||||
sunpro/libboost_regex$(LIBSUFFIX).so : sunpro/shared_libboost_regex$(LIBSUFFIX)/c_regex_traits.o sunpro/shared_libboost_regex$(LIBSUFFIX)/c_regex_traits_common.o sunpro/shared_libboost_regex$(LIBSUFFIX)/cpp_regex_traits.o sunpro/shared_libboost_regex$(LIBSUFFIX)/cregex.o sunpro/shared_libboost_regex$(LIBSUFFIX)/fileiter.o sunpro/shared_libboost_regex$(LIBSUFFIX)/posix_api.o sunpro/shared_libboost_regex$(LIBSUFFIX)/regex.o sunpro/shared_libboost_regex$(LIBSUFFIX)/regex_debug.o sunpro/shared_libboost_regex$(LIBSUFFIX)/regex_synch.o sunpro/shared_libboost_regex$(LIBSUFFIX)/w32_regex_traits.o sunpro/shared_libboost_regex$(LIBSUFFIX)/wide_posix_api.o
|
||||
CC -KPIC -O2 -I../../../ -G -o sunpro/libboost_regex$(LIBSUFFIX).so $(LDFLAGS) sunpro/shared_libboost_regex$(LIBSUFFIX)/c_regex_traits.o sunpro/shared_libboost_regex$(LIBSUFFIX)/c_regex_traits_common.o sunpro/shared_libboost_regex$(LIBSUFFIX)/cpp_regex_traits.o sunpro/shared_libboost_regex$(LIBSUFFIX)/cregex.o sunpro/shared_libboost_regex$(LIBSUFFIX)/fileiter.o sunpro/shared_libboost_regex$(LIBSUFFIX)/posix_api.o sunpro/shared_libboost_regex$(LIBSUFFIX)/regex.o sunpro/shared_libboost_regex$(LIBSUFFIX)/regex_debug.o sunpro/shared_libboost_regex$(LIBSUFFIX)/regex_synch.o sunpro/shared_libboost_regex$(LIBSUFFIX)/w32_regex_traits.o sunpro/shared_libboost_regex$(LIBSUFFIX)/wide_posix_api.o $(LIBS)
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for libboost_regex_mt$(LIBSUFFIX).so
|
||||
#
|
||||
########################################################
|
||||
sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/c_regex_traits.o: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/c_regex_traits.o ../src/c_regex_traits.cpp
|
||||
|
||||
sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/c_regex_traits_common.o: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/c_regex_traits_common.o ../src/c_regex_traits_common.cpp
|
||||
|
||||
sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/cpp_regex_traits.o: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/cpp_regex_traits.o ../src/cpp_regex_traits.cpp
|
||||
|
||||
sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/cregex.o: ../src/cregex.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/cregex.o ../src/cregex.cpp
|
||||
|
||||
sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/fileiter.o: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/fileiter.o ../src/fileiter.cpp
|
||||
|
||||
sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/posix_api.o: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/posix_api.o ../src/posix_api.cpp
|
||||
|
||||
sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/regex.o: ../src/regex.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/regex.o ../src/regex.cpp
|
||||
|
||||
sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/regex_debug.o: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/regex_debug.o ../src/regex_debug.cpp
|
||||
|
||||
sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/regex_synch.o: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/regex_synch.o ../src/regex_synch.cpp
|
||||
|
||||
sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/w32_regex_traits.o: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/w32_regex_traits.o ../src/w32_regex_traits.cpp
|
||||
|
||||
sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/wide_posix_api.o: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
CC -c $(INCLUDES) -KPIC -O2 -mt -I../../../ $(CXXFLAGS) -o sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/wide_posix_api.o ../src/wide_posix_api.cpp
|
||||
|
||||
sunpro/shared_libboost_regex_mt$(LIBSUFFIX) :
|
||||
mkdir -p sunpro/shared_libboost_regex_mt$(LIBSUFFIX)
|
||||
|
||||
libboost_regex_mt$(LIBSUFFIX)_clean_shared :
|
||||
rm -f sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/*.o
|
||||
rm -fr sunpro/shared_libboost_regex_mt$(LIBSUFFIX)/$(SUNWS_CACHE_NAME)
|
||||
|
||||
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)/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
|
||||
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)/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 $(LIBS)
|
||||
|
||||
@@ -1,414 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
|
||||
ALL_HEADER=../../../boost/cregex.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_config.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_options.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 : main_dir vc6-stlport-re300m_dir ./vc6-stlport/vc6-stlport-re300m.lib vc6-stlport-re300dm_dir ./vc6-stlport/vc6-stlport-re300dm.lib vc6-stlport-re300dl_dir ./vc6-stlport/vc6-stlport-re300dl.lib vc6-stlport-re300l_dir ./vc6-stlport/vc6-stlport-re300l.lib vc6-stlport-re300ls_dir ./vc6-stlport/vc6-stlport-re300ls.lib vc6-stlport-re300ddl_dir ./vc6-stlport/vc6-stlport-re300ddl.lib vc6-stlport-re300ddm_dir ./vc6-stlport/vc6-stlport-re300ddm.lib
|
||||
|
||||
clean : vc6-stlport-re300m_clean vc6-stlport-re300dm_clean vc6-stlport-re300dl_clean vc6-stlport-re300l_clean vc6-stlport-re300ls_clean vc6-stlport-re300ddl_clean vc6-stlport-re300ddm_clean
|
||||
|
||||
install : all
|
||||
copy vc6-stlport\vc6-stlport-re300m.lib "$(MSVCDIR)\lib"
|
||||
copy vc6-stlport\vc6-stlport-re300dm.lib "$(MSVCDIR)\lib"
|
||||
copy vc6-stlport\vc6-stlport-re300dl.lib "$(MSVCDIR)\lib"
|
||||
copy vc6-stlport\vc6-stlport-re300dl.dll "$(MSVCDIR)\bin"
|
||||
copy vc6-stlport\vc6-stlport-re300l.lib "$(MSVCDIR)\lib"
|
||||
copy vc6-stlport\vc6-stlport-re300l.dll "$(MSVCDIR)\bin"
|
||||
copy vc6-stlport\vc6-stlport-re300ls.lib "$(MSVCDIR)\lib"
|
||||
copy vc6-stlport\vc6-stlport-re300ddl.lib "$(MSVCDIR)\lib"
|
||||
copy vc6-stlport\vc6-stlport-re300ddl.dll "$(MSVCDIR)\bin"
|
||||
copy vc6-stlport\vc6-stlport-re300ddl.pdb "$(MSVCDIR)\lib"
|
||||
copy vc6-stlport\vc6-stlport-re300ddm.lib "$(MSVCDIR)\lib"
|
||||
copy vc6-stlport\vc6-stlport-re300ddm.pdb "$(MSVCDIR)\lib"
|
||||
|
||||
main_dir :
|
||||
if not exist "vc6-stlport\$(NULL)" mkdir vc6-stlport
|
||||
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-stlport-re300m.lib
|
||||
#
|
||||
########################################################
|
||||
vc6-stlport/vc6-stlport-re300m/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300m/vc6-stlport-re300m.pch -Fo./vc6-stlport/vc6-stlport-re300m/ -Fdvc6-stlport/vc6-stlport-re300m.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300m/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300m/vc6-stlport-re300m.pch -Fo./vc6-stlport/vc6-stlport-re300m/ -Fdvc6-stlport/vc6-stlport-re300m.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300m/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300m/vc6-stlport-re300m.pch -Fo./vc6-stlport/vc6-stlport-re300m/ -Fdvc6-stlport/vc6-stlport-re300m.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300m/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300m/vc6-stlport-re300m.pch -Fo./vc6-stlport/vc6-stlport-re300m/ -Fdvc6-stlport/vc6-stlport-re300m.pdb ../src/cregex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300m/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300m/vc6-stlport-re300m.pch -Fo./vc6-stlport/vc6-stlport-re300m/ -Fdvc6-stlport/vc6-stlport-re300m.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300m/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300m/vc6-stlport-re300m.pch -Fo./vc6-stlport/vc6-stlport-re300m/ -Fdvc6-stlport/vc6-stlport-re300m.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300m/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300m/vc6-stlport-re300m.pch -Fo./vc6-stlport/vc6-stlport-re300m/ -Fdvc6-stlport/vc6-stlport-re300m.pdb ../src/regex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300m/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300m/vc6-stlport-re300m.pch -Fo./vc6-stlport/vc6-stlport-re300m/ -Fdvc6-stlport/vc6-stlport-re300m.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300m/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300m/vc6-stlport-re300m.pch -Fo./vc6-stlport/vc6-stlport-re300m/ -Fdvc6-stlport/vc6-stlport-re300m.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300m/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300m/vc6-stlport-re300m.pch -Fo./vc6-stlport/vc6-stlport-re300m/ -Fdvc6-stlport/vc6-stlport-re300m.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300m/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300m/vc6-stlport-re300m.pch -Fo./vc6-stlport/vc6-stlport-re300m/ -Fdvc6-stlport/vc6-stlport-re300m.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-stlport-re300m_dir :
|
||||
if not exist "vc6-stlport\vc6-stlport-re300m\$(NULL)" mkdir vc6-stlport\vc6-stlport-re300m
|
||||
|
||||
vc6-stlport-re300m_clean :
|
||||
del vc6-stlport\vc6-stlport-re300m\*.obj
|
||||
del vc6-stlport\vc6-stlport-re300m\*.idb
|
||||
del vc6-stlport\vc6-stlport-re300m\*.exp
|
||||
del vc6-stlport\vc6-stlport-re300m\*.pch
|
||||
|
||||
./vc6-stlport/vc6-stlport-re300m.lib : vc6-stlport/vc6-stlport-re300m/c_regex_traits.obj vc6-stlport/vc6-stlport-re300m/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300m/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300m/cregex.obj vc6-stlport/vc6-stlport-re300m/fileiter.obj vc6-stlport/vc6-stlport-re300m/posix_api.obj vc6-stlport/vc6-stlport-re300m/regex.obj vc6-stlport/vc6-stlport-re300m/regex_debug.obj vc6-stlport/vc6-stlport-re300m/regex_synch.obj vc6-stlport/vc6-stlport-re300m/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300m/wide_posix_api.obj
|
||||
link -lib /nologo /out:vc6-stlport/vc6-stlport-re300m.lib $(XSFLAGS) vc6-stlport/vc6-stlport-re300m/c_regex_traits.obj vc6-stlport/vc6-stlport-re300m/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300m/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300m/cregex.obj vc6-stlport/vc6-stlport-re300m/fileiter.obj vc6-stlport/vc6-stlport-re300m/posix_api.obj vc6-stlport/vc6-stlport-re300m/regex.obj vc6-stlport/vc6-stlport-re300m/regex_debug.obj vc6-stlport/vc6-stlport-re300m/regex_synch.obj vc6-stlport/vc6-stlport-re300m/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300m/wide_posix_api.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-stlport-re300dm.lib
|
||||
#
|
||||
########################################################
|
||||
vc6-stlport/vc6-stlport-re300dm/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) -Fpvc6-stlport/vc6-stlport-re300dm/vc6-stlport-re300dm.pch -Fo./vc6-stlport/vc6-stlport-re300dm/ -Fdvc6-stlport/vc6-stlport-re300dm.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dm/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) -Fpvc6-stlport/vc6-stlport-re300dm/vc6-stlport-re300dm.pch -Fo./vc6-stlport/vc6-stlport-re300dm/ -Fdvc6-stlport/vc6-stlport-re300dm.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dm/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) -Fpvc6-stlport/vc6-stlport-re300dm/vc6-stlport-re300dm.pch -Fo./vc6-stlport/vc6-stlport-re300dm/ -Fdvc6-stlport/vc6-stlport-re300dm.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dm/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) -Fpvc6-stlport/vc6-stlport-re300dm/vc6-stlport-re300dm.pch -Fo./vc6-stlport/vc6-stlport-re300dm/ -Fdvc6-stlport/vc6-stlport-re300dm.pdb ../src/cregex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dm/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) -Fpvc6-stlport/vc6-stlport-re300dm/vc6-stlport-re300dm.pch -Fo./vc6-stlport/vc6-stlport-re300dm/ -Fdvc6-stlport/vc6-stlport-re300dm.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dm/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) -Fpvc6-stlport/vc6-stlport-re300dm/vc6-stlport-re300dm.pch -Fo./vc6-stlport/vc6-stlport-re300dm/ -Fdvc6-stlport/vc6-stlport-re300dm.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dm/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) -Fpvc6-stlport/vc6-stlport-re300dm/vc6-stlport-re300dm.pch -Fo./vc6-stlport/vc6-stlport-re300dm/ -Fdvc6-stlport/vc6-stlport-re300dm.pdb ../src/regex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dm/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) -Fpvc6-stlport/vc6-stlport-re300dm/vc6-stlport-re300dm.pch -Fo./vc6-stlport/vc6-stlport-re300dm/ -Fdvc6-stlport/vc6-stlport-re300dm.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dm/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) -Fpvc6-stlport/vc6-stlport-re300dm/vc6-stlport-re300dm.pch -Fo./vc6-stlport/vc6-stlport-re300dm/ -Fdvc6-stlport/vc6-stlport-re300dm.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dm/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) -Fpvc6-stlport/vc6-stlport-re300dm/vc6-stlport-re300dm.pch -Fo./vc6-stlport/vc6-stlport-re300dm/ -Fdvc6-stlport/vc6-stlport-re300dm.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dm/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) -Fpvc6-stlport/vc6-stlport-re300dm/vc6-stlport-re300dm.pch -Fo./vc6-stlport/vc6-stlport-re300dm/ -Fdvc6-stlport/vc6-stlport-re300dm.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-stlport-re300dm_dir :
|
||||
if not exist "vc6-stlport\vc6-stlport-re300dm\$(NULL)" mkdir vc6-stlport\vc6-stlport-re300dm
|
||||
|
||||
vc6-stlport-re300dm_clean :
|
||||
del vc6-stlport\vc6-stlport-re300dm\*.obj
|
||||
del vc6-stlport\vc6-stlport-re300dm\*.idb
|
||||
del vc6-stlport\vc6-stlport-re300dm\*.exp
|
||||
del vc6-stlport\vc6-stlport-re300dm\*.pch
|
||||
|
||||
./vc6-stlport/vc6-stlport-re300dm.lib : vc6-stlport/vc6-stlport-re300dm/c_regex_traits.obj vc6-stlport/vc6-stlport-re300dm/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300dm/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300dm/cregex.obj vc6-stlport/vc6-stlport-re300dm/fileiter.obj vc6-stlport/vc6-stlport-re300dm/posix_api.obj vc6-stlport/vc6-stlport-re300dm/regex.obj vc6-stlport/vc6-stlport-re300dm/regex_debug.obj vc6-stlport/vc6-stlport-re300dm/regex_synch.obj vc6-stlport/vc6-stlport-re300dm/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300dm/wide_posix_api.obj
|
||||
link -lib /nologo /out:vc6-stlport/vc6-stlport-re300dm.lib $(XSFLAGS) vc6-stlport/vc6-stlport-re300dm/c_regex_traits.obj vc6-stlport/vc6-stlport-re300dm/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300dm/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300dm/cregex.obj vc6-stlport/vc6-stlport-re300dm/fileiter.obj vc6-stlport/vc6-stlport-re300dm/posix_api.obj vc6-stlport/vc6-stlport-re300dm/regex.obj vc6-stlport/vc6-stlport-re300dm/regex_debug.obj vc6-stlport/vc6-stlport-re300dm/regex_synch.obj vc6-stlport/vc6-stlport-re300dm/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300dm/wide_posix_api.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-stlport-re300dl.lib
|
||||
#
|
||||
########################################################
|
||||
vc6-stlport/vc6-stlport-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300dl/vc6-stlport-re300dl.pch -Fo./vc6-stlport/vc6-stlport-re300dl/ -Fdvc6-stlport/vc6-stlport-re300dl.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300dl/vc6-stlport-re300dl.pch -Fo./vc6-stlport/vc6-stlport-re300dl/ -Fdvc6-stlport/vc6-stlport-re300dl.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300dl/vc6-stlport-re300dl.pch -Fo./vc6-stlport/vc6-stlport-re300dl/ -Fdvc6-stlport/vc6-stlport-re300dl.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300dl/vc6-stlport-re300dl.pch -Fo./vc6-stlport/vc6-stlport-re300dl/ -Fdvc6-stlport/vc6-stlport-re300dl.pdb ../src/cregex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300dl/vc6-stlport-re300dl.pch -Fo./vc6-stlport/vc6-stlport-re300dl/ -Fdvc6-stlport/vc6-stlport-re300dl.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300dl/vc6-stlport-re300dl.pch -Fo./vc6-stlport/vc6-stlport-re300dl/ -Fdvc6-stlport/vc6-stlport-re300dl.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300dl/vc6-stlport-re300dl.pch -Fo./vc6-stlport/vc6-stlport-re300dl/ -Fdvc6-stlport/vc6-stlport-re300dl.pdb ../src/regex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300dl/vc6-stlport-re300dl.pch -Fo./vc6-stlport/vc6-stlport-re300dl/ -Fdvc6-stlport/vc6-stlport-re300dl.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300dl/vc6-stlport-re300dl.pch -Fo./vc6-stlport/vc6-stlport-re300dl/ -Fdvc6-stlport/vc6-stlport-re300dl.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300dl/vc6-stlport-re300dl.pch -Fo./vc6-stlport/vc6-stlport-re300dl/ -Fdvc6-stlport/vc6-stlport-re300dl.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300dl/vc6-stlport-re300dl.pch -Fo./vc6-stlport/vc6-stlport-re300dl/ -Fdvc6-stlport/vc6-stlport-re300dl.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-stlport-re300dl_dir :
|
||||
if not exist "vc6-stlport\vc6-stlport-re300dl\$(NULL)" mkdir vc6-stlport\vc6-stlport-re300dl
|
||||
|
||||
vc6-stlport-re300dl_clean :
|
||||
del vc6-stlport\vc6-stlport-re300dl\*.obj
|
||||
del vc6-stlport\vc6-stlport-re300dl\*.idb
|
||||
del vc6-stlport\vc6-stlport-re300dl\*.exp
|
||||
del vc6-stlport\vc6-stlport-re300dl\*.pch
|
||||
|
||||
./vc6-stlport/vc6-stlport-re300dl.lib : vc6-stlport/vc6-stlport-re300dl/c_regex_traits.obj vc6-stlport/vc6-stlport-re300dl/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300dl/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300dl/cregex.obj vc6-stlport/vc6-stlport-re300dl/fileiter.obj vc6-stlport/vc6-stlport-re300dl/posix_api.obj vc6-stlport/vc6-stlport-re300dl/regex.obj vc6-stlport/vc6-stlport-re300dl/regex_debug.obj vc6-stlport/vc6-stlport-re300dl/regex_synch.obj vc6-stlport/vc6-stlport-re300dl/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300dl/wide_posix_api.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:"vc6-stlport/vc6-stlport-re300dl.pdb" /debug /machine:I386 /out:"vc6-stlport/vc6-stlport-re300dl.dll" /implib:"vc6-stlport/vc6-stlport-re300dl.lib" /pdbtype:sept $(XLFLAGS) vc6-stlport/vc6-stlport-re300dl/c_regex_traits.obj vc6-stlport/vc6-stlport-re300dl/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300dl/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300dl/cregex.obj vc6-stlport/vc6-stlport-re300dl/fileiter.obj vc6-stlport/vc6-stlport-re300dl/posix_api.obj vc6-stlport/vc6-stlport-re300dl/regex.obj vc6-stlport/vc6-stlport-re300dl/regex_debug.obj vc6-stlport/vc6-stlport-re300dl/regex_synch.obj vc6-stlport/vc6-stlport-re300dl/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300dl/wide_posix_api.obj
|
||||
<<
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-stlport-re300l.lib
|
||||
#
|
||||
########################################################
|
||||
vc6-stlport/vc6-stlport-re300l/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300l/vc6-stlport-re300l.pch -Fo./vc6-stlport/vc6-stlport-re300l/ -Fdvc6-stlport/vc6-stlport-re300l.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300l/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300l/vc6-stlport-re300l.pch -Fo./vc6-stlport/vc6-stlport-re300l/ -Fdvc6-stlport/vc6-stlport-re300l.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300l/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300l/vc6-stlport-re300l.pch -Fo./vc6-stlport/vc6-stlport-re300l/ -Fdvc6-stlport/vc6-stlport-re300l.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300l/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300l/vc6-stlport-re300l.pch -Fo./vc6-stlport/vc6-stlport-re300l/ -Fdvc6-stlport/vc6-stlport-re300l.pdb ../src/cregex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300l/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300l/vc6-stlport-re300l.pch -Fo./vc6-stlport/vc6-stlport-re300l/ -Fdvc6-stlport/vc6-stlport-re300l.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300l/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300l/vc6-stlport-re300l.pch -Fo./vc6-stlport/vc6-stlport-re300l/ -Fdvc6-stlport/vc6-stlport-re300l.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300l/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300l/vc6-stlport-re300l.pch -Fo./vc6-stlport/vc6-stlport-re300l/ -Fdvc6-stlport/vc6-stlport-re300l.pdb ../src/regex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300l/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300l/vc6-stlport-re300l.pch -Fo./vc6-stlport/vc6-stlport-re300l/ -Fdvc6-stlport/vc6-stlport-re300l.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300l/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300l/vc6-stlport-re300l.pch -Fo./vc6-stlport/vc6-stlport-re300l/ -Fdvc6-stlport/vc6-stlport-re300l.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300l/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300l/vc6-stlport-re300l.pch -Fo./vc6-stlport/vc6-stlport-re300l/ -Fdvc6-stlport/vc6-stlport-re300l.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300l/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300l/vc6-stlport-re300l.pch -Fo./vc6-stlport/vc6-stlport-re300l/ -Fdvc6-stlport/vc6-stlport-re300l.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-stlport-re300l_dir :
|
||||
if not exist "vc6-stlport\vc6-stlport-re300l\$(NULL)" mkdir vc6-stlport\vc6-stlport-re300l
|
||||
|
||||
vc6-stlport-re300l_clean :
|
||||
del vc6-stlport\vc6-stlport-re300l\*.obj
|
||||
del vc6-stlport\vc6-stlport-re300l\*.idb
|
||||
del vc6-stlport\vc6-stlport-re300l\*.exp
|
||||
del vc6-stlport\vc6-stlport-re300l\*.pch
|
||||
|
||||
./vc6-stlport/vc6-stlport-re300l.lib : vc6-stlport/vc6-stlport-re300l/c_regex_traits.obj vc6-stlport/vc6-stlport-re300l/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300l/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300l/cregex.obj vc6-stlport/vc6-stlport-re300l/fileiter.obj vc6-stlport/vc6-stlport-re300l/posix_api.obj vc6-stlport/vc6-stlport-re300l/regex.obj vc6-stlport/vc6-stlport-re300l/regex_debug.obj vc6-stlport/vc6-stlport-re300l/regex_synch.obj vc6-stlport/vc6-stlport-re300l/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300l/wide_posix_api.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:"vc6-stlport/vc6-stlport-re300l.pdb" /debug /machine:I386 /out:"vc6-stlport/vc6-stlport-re300l.dll" /implib:"vc6-stlport/vc6-stlport-re300l.lib" /pdbtype:sept $(XLFLAGS) vc6-stlport/vc6-stlport-re300l/c_regex_traits.obj vc6-stlport/vc6-stlport-re300l/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300l/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300l/cregex.obj vc6-stlport/vc6-stlport-re300l/fileiter.obj vc6-stlport/vc6-stlport-re300l/posix_api.obj vc6-stlport/vc6-stlport-re300l/regex.obj vc6-stlport/vc6-stlport-re300l/regex_debug.obj vc6-stlport/vc6-stlport-re300l/regex_synch.obj vc6-stlport/vc6-stlport-re300l/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300l/wide_posix_api.obj
|
||||
<<
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-stlport-re300ls.lib
|
||||
#
|
||||
########################################################
|
||||
vc6-stlport/vc6-stlport-re300ls/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ls/vc6-stlport-re300ls.pch -Fo./vc6-stlport/vc6-stlport-re300ls/ -Fdvc6-stlport/vc6-stlport-re300ls.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ls/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ls/vc6-stlport-re300ls.pch -Fo./vc6-stlport/vc6-stlport-re300ls/ -Fdvc6-stlport/vc6-stlport-re300ls.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ls/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ls/vc6-stlport-re300ls.pch -Fo./vc6-stlport/vc6-stlport-re300ls/ -Fdvc6-stlport/vc6-stlport-re300ls.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ls/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ls/vc6-stlport-re300ls.pch -Fo./vc6-stlport/vc6-stlport-re300ls/ -Fdvc6-stlport/vc6-stlport-re300ls.pdb ../src/cregex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ls/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ls/vc6-stlport-re300ls.pch -Fo./vc6-stlport/vc6-stlport-re300ls/ -Fdvc6-stlport/vc6-stlport-re300ls.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ls/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ls/vc6-stlport-re300ls.pch -Fo./vc6-stlport/vc6-stlport-re300ls/ -Fdvc6-stlport/vc6-stlport-re300ls.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ls/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ls/vc6-stlport-re300ls.pch -Fo./vc6-stlport/vc6-stlport-re300ls/ -Fdvc6-stlport/vc6-stlport-re300ls.pdb ../src/regex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ls/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ls/vc6-stlport-re300ls.pch -Fo./vc6-stlport/vc6-stlport-re300ls/ -Fdvc6-stlport/vc6-stlport-re300ls.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ls/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ls/vc6-stlport-re300ls.pch -Fo./vc6-stlport/vc6-stlport-re300ls/ -Fdvc6-stlport/vc6-stlport-re300ls.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ls/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ls/vc6-stlport-re300ls.pch -Fo./vc6-stlport/vc6-stlport-re300ls/ -Fdvc6-stlport/vc6-stlport-re300ls.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ls/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ls/vc6-stlport-re300ls.pch -Fo./vc6-stlport/vc6-stlport-re300ls/ -Fdvc6-stlport/vc6-stlport-re300ls.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-stlport-re300ls_dir :
|
||||
if not exist "vc6-stlport\vc6-stlport-re300ls\$(NULL)" mkdir vc6-stlport\vc6-stlport-re300ls
|
||||
|
||||
vc6-stlport-re300ls_clean :
|
||||
del vc6-stlport\vc6-stlport-re300ls\*.obj
|
||||
del vc6-stlport\vc6-stlport-re300ls\*.idb
|
||||
del vc6-stlport\vc6-stlport-re300ls\*.exp
|
||||
del vc6-stlport\vc6-stlport-re300ls\*.pch
|
||||
|
||||
./vc6-stlport/vc6-stlport-re300ls.lib : vc6-stlport/vc6-stlport-re300ls/c_regex_traits.obj vc6-stlport/vc6-stlport-re300ls/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300ls/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300ls/cregex.obj vc6-stlport/vc6-stlport-re300ls/fileiter.obj vc6-stlport/vc6-stlport-re300ls/posix_api.obj vc6-stlport/vc6-stlport-re300ls/regex.obj vc6-stlport/vc6-stlport-re300ls/regex_debug.obj vc6-stlport/vc6-stlport-re300ls/regex_synch.obj vc6-stlport/vc6-stlport-re300ls/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300ls/wide_posix_api.obj
|
||||
link -lib /nologo /out:vc6-stlport/vc6-stlport-re300ls.lib $(XSFLAGS) vc6-stlport/vc6-stlport-re300ls/c_regex_traits.obj vc6-stlport/vc6-stlport-re300ls/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300ls/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300ls/cregex.obj vc6-stlport/vc6-stlport-re300ls/fileiter.obj vc6-stlport/vc6-stlport-re300ls/posix_api.obj vc6-stlport/vc6-stlport-re300ls/regex.obj vc6-stlport/vc6-stlport-re300ls/regex_debug.obj vc6-stlport/vc6-stlport-re300ls/regex_synch.obj vc6-stlport/vc6-stlport-re300ls/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300ls/wide_posix_api.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-stlport-re300ddl.lib
|
||||
#
|
||||
########################################################
|
||||
vc6-stlport/vc6-stlport-re300ddl/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D__STL_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddl/vc6-stlport-re300ddl.pch -Fo./vc6-stlport/vc6-stlport-re300ddl/ -Fdvc6-stlport/vc6-stlport-re300ddl.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddl/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D__STL_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddl/vc6-stlport-re300ddl.pch -Fo./vc6-stlport/vc6-stlport-re300ddl/ -Fdvc6-stlport/vc6-stlport-re300ddl.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddl/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D__STL_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddl/vc6-stlport-re300ddl.pch -Fo./vc6-stlport/vc6-stlport-re300ddl/ -Fdvc6-stlport/vc6-stlport-re300ddl.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddl/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D__STL_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddl/vc6-stlport-re300ddl.pch -Fo./vc6-stlport/vc6-stlport-re300ddl/ -Fdvc6-stlport/vc6-stlport-re300ddl.pdb ../src/cregex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddl/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D__STL_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddl/vc6-stlport-re300ddl.pch -Fo./vc6-stlport/vc6-stlport-re300ddl/ -Fdvc6-stlport/vc6-stlport-re300ddl.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddl/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D__STL_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddl/vc6-stlport-re300ddl.pch -Fo./vc6-stlport/vc6-stlport-re300ddl/ -Fdvc6-stlport/vc6-stlport-re300ddl.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddl/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D__STL_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddl/vc6-stlport-re300ddl.pch -Fo./vc6-stlport/vc6-stlport-re300ddl/ -Fdvc6-stlport/vc6-stlport-re300ddl.pdb ../src/regex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddl/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D__STL_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddl/vc6-stlport-re300ddl.pch -Fo./vc6-stlport/vc6-stlport-re300ddl/ -Fdvc6-stlport/vc6-stlport-re300ddl.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddl/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D__STL_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddl/vc6-stlport-re300ddl.pch -Fo./vc6-stlport/vc6-stlport-re300ddl/ -Fdvc6-stlport/vc6-stlport-re300ddl.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddl/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D__STL_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddl/vc6-stlport-re300ddl.pch -Fo./vc6-stlport/vc6-stlport-re300ddl/ -Fdvc6-stlport/vc6-stlport-re300ddl.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddl/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MDd /W3 /Gm /GX /Zi /Od /I../../../ /D__STL_DEBUG /D_DEBUG /DWIN32 /D_WINDOWS /D_MBCS /DUSRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddl/vc6-stlport-re300ddl.pch -Fo./vc6-stlport/vc6-stlport-re300ddl/ -Fdvc6-stlport/vc6-stlport-re300ddl.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-stlport-re300ddl_dir :
|
||||
if not exist "vc6-stlport\vc6-stlport-re300ddl\$(NULL)" mkdir vc6-stlport\vc6-stlport-re300ddl
|
||||
|
||||
vc6-stlport-re300ddl_clean :
|
||||
del vc6-stlport\vc6-stlport-re300ddl\*.obj
|
||||
del vc6-stlport\vc6-stlport-re300ddl\*.idb
|
||||
del vc6-stlport\vc6-stlport-re300ddl\*.exp
|
||||
del vc6-stlport\vc6-stlport-re300ddl\*.pch
|
||||
|
||||
./vc6-stlport/vc6-stlport-re300ddl.lib : vc6-stlport/vc6-stlport-re300ddl/c_regex_traits.obj vc6-stlport/vc6-stlport-re300ddl/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300ddl/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300ddl/cregex.obj vc6-stlport/vc6-stlport-re300ddl/fileiter.obj vc6-stlport/vc6-stlport-re300ddl/posix_api.obj vc6-stlport/vc6-stlport-re300ddl/regex.obj vc6-stlport/vc6-stlport-re300ddl/regex_debug.obj vc6-stlport/vc6-stlport-re300ddl/regex_synch.obj vc6-stlport/vc6-stlport-re300ddl/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300ddl/wide_posix_api.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:"vc6-stlport/vc6-stlport-re300ddl.pdb" /debug /machine:I386 /out:"vc6-stlport/vc6-stlport-re300ddl.dll" /implib:"vc6-stlport/vc6-stlport-re300ddl.lib" /pdbtype:sept $(XLFLAGS) vc6-stlport/vc6-stlport-re300ddl/c_regex_traits.obj vc6-stlport/vc6-stlport-re300ddl/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300ddl/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300ddl/cregex.obj vc6-stlport/vc6-stlport-re300ddl/fileiter.obj vc6-stlport/vc6-stlport-re300ddl/posix_api.obj vc6-stlport/vc6-stlport-re300ddl/regex.obj vc6-stlport/vc6-stlport-re300ddl/regex_debug.obj vc6-stlport/vc6-stlport-re300ddl/regex_synch.obj vc6-stlport/vc6-stlport-re300ddl/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300ddl/wide_posix_api.obj
|
||||
<<
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-stlport-re300ddm.lib
|
||||
#
|
||||
########################################################
|
||||
vc6-stlport/vc6-stlport-re300ddm/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /D__STL_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddm/vc6-stlport-re300ddm.pch -Fo./vc6-stlport/vc6-stlport-re300ddm/ -Fdvc6-stlport/vc6-stlport-re300ddm.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddm/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /D__STL_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddm/vc6-stlport-re300ddm.pch -Fo./vc6-stlport/vc6-stlport-re300ddm/ -Fdvc6-stlport/vc6-stlport-re300ddm.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddm/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /D__STL_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddm/vc6-stlport-re300ddm.pch -Fo./vc6-stlport/vc6-stlport-re300ddm/ -Fdvc6-stlport/vc6-stlport-re300ddm.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddm/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /D__STL_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddm/vc6-stlport-re300ddm.pch -Fo./vc6-stlport/vc6-stlport-re300ddm/ -Fdvc6-stlport/vc6-stlport-re300ddm.pdb ../src/cregex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddm/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /D__STL_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddm/vc6-stlport-re300ddm.pch -Fo./vc6-stlport/vc6-stlport-re300ddm/ -Fdvc6-stlport/vc6-stlport-re300ddm.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddm/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /D__STL_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddm/vc6-stlport-re300ddm.pch -Fo./vc6-stlport/vc6-stlport-re300ddm/ -Fdvc6-stlport/vc6-stlport-re300ddm.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddm/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /D__STL_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddm/vc6-stlport-re300ddm.pch -Fo./vc6-stlport/vc6-stlport-re300ddm/ -Fdvc6-stlport/vc6-stlport-re300ddm.pdb ../src/regex.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddm/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /D__STL_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddm/vc6-stlport-re300ddm.pch -Fo./vc6-stlport/vc6-stlport-re300ddm/ -Fdvc6-stlport/vc6-stlport-re300ddm.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddm/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /D__STL_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddm/vc6-stlport-re300ddm.pch -Fo./vc6-stlport/vc6-stlport-re300ddm/ -Fdvc6-stlport/vc6-stlport-re300ddm.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddm/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /D__STL_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddm/vc6-stlport-re300ddm.pch -Fo./vc6-stlport/vc6-stlport-re300ddm/ -Fdvc6-stlport/vc6-stlport-re300ddm.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6-stlport/vc6-stlport-re300ddm/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MTd /W3 /Gm /GX /Zi /Od /I..\..\..\ /D__STL_DEBUG /DWIN32 /D_MT /D_DEBUG /D_MBCS /D_LIB /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6-stlport/vc6-stlport-re300ddm/vc6-stlport-re300ddm.pch -Fo./vc6-stlport/vc6-stlport-re300ddm/ -Fdvc6-stlport/vc6-stlport-re300ddm.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-stlport-re300ddm_dir :
|
||||
if not exist "vc6-stlport\vc6-stlport-re300ddm\$(NULL)" mkdir vc6-stlport\vc6-stlport-re300ddm
|
||||
|
||||
vc6-stlport-re300ddm_clean :
|
||||
del vc6-stlport\vc6-stlport-re300ddm\*.obj
|
||||
del vc6-stlport\vc6-stlport-re300ddm\*.idb
|
||||
del vc6-stlport\vc6-stlport-re300ddm\*.exp
|
||||
del vc6-stlport\vc6-stlport-re300ddm\*.pch
|
||||
|
||||
./vc6-stlport/vc6-stlport-re300ddm.lib : vc6-stlport/vc6-stlport-re300ddm/c_regex_traits.obj vc6-stlport/vc6-stlport-re300ddm/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300ddm/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300ddm/cregex.obj vc6-stlport/vc6-stlport-re300ddm/fileiter.obj vc6-stlport/vc6-stlport-re300ddm/posix_api.obj vc6-stlport/vc6-stlport-re300ddm/regex.obj vc6-stlport/vc6-stlport-re300ddm/regex_debug.obj vc6-stlport/vc6-stlport-re300ddm/regex_synch.obj vc6-stlport/vc6-stlport-re300ddm/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300ddm/wide_posix_api.obj
|
||||
link -lib /nologo /out:vc6-stlport/vc6-stlport-re300ddm.lib $(XSFLAGS) vc6-stlport/vc6-stlport-re300ddm/c_regex_traits.obj vc6-stlport/vc6-stlport-re300ddm/c_regex_traits_common.obj vc6-stlport/vc6-stlport-re300ddm/cpp_regex_traits.obj vc6-stlport/vc6-stlport-re300ddm/cregex.obj vc6-stlport/vc6-stlport-re300ddm/fileiter.obj vc6-stlport/vc6-stlport-re300ddm/posix_api.obj vc6-stlport/vc6-stlport-re300ddm/regex.obj vc6-stlport/vc6-stlport-re300ddm/regex_debug.obj vc6-stlport/vc6-stlport-re300ddm/regex_synch.obj vc6-stlport/vc6-stlport-re300ddm/w32_regex_traits.obj vc6-stlport/vc6-stlport-re300ddm/wide_posix_api.obj
|
||||
|
||||
-412
@@ -1,412 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
|
||||
ALL_HEADER=../../../boost/cregex.hpp ../../../boost/regex/pattern_except.hpp ../../../boost/regex.hpp ../../../boost/regex/regex_traits.hpp ../../../boost/regex/detail/fileiter.hpp ../../../boost/regex/detail/regex_compile.hpp ../../../boost/regex/detail/regex_config.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_options.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 : main_dir vc6-re300_dir ./vc6/vc6-re300.lib vc6-re300m_dir ./vc6/vc6-re300m.lib vc6-re300d_dir ./vc6/vc6-re300d.lib vc6-re300dm_dir ./vc6/vc6-re300dm.lib vc6-re300dl_dir ./vc6/vc6-re300dl.lib vc6-re300l_dir ./vc6/vc6-re300l.lib vc6-re300ls_dir ./vc6/vc6-re300ls.lib
|
||||
|
||||
clean : vc6-re300_clean vc6-re300m_clean vc6-re300d_clean vc6-re300dm_clean vc6-re300dl_clean vc6-re300l_clean vc6-re300ls_clean
|
||||
|
||||
install : all
|
||||
copy vc6\vc6-re300.lib "$(MSVCDIR)\lib"
|
||||
copy vc6\vc6-re300m.lib "$(MSVCDIR)\lib"
|
||||
copy vc6\vc6-re300d.lib "$(MSVCDIR)\lib"
|
||||
copy vc6\vc6-re300d.pdb "$(MSVCDIR)\lib"
|
||||
copy vc6\vc6-re300dm.lib "$(MSVCDIR)\lib"
|
||||
copy vc6\vc6-re300dm.pdb "$(MSVCDIR)\lib"
|
||||
copy vc6\vc6-re300dl.lib "$(MSVCDIR)\lib"
|
||||
copy vc6\vc6-re300dl.dll "$(MSVCDIR)\bin"
|
||||
copy vc6\vc6-re300dl.pdb "$(MSVCDIR)\lib"
|
||||
copy vc6\vc6-re300l.lib "$(MSVCDIR)\lib"
|
||||
copy vc6\vc6-re300l.dll "$(MSVCDIR)\bin"
|
||||
copy vc6\vc6-re300ls.lib "$(MSVCDIR)\lib"
|
||||
|
||||
main_dir :
|
||||
if not exist "vc6\$(NULL)" mkdir vc6
|
||||
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-re300.lib
|
||||
#
|
||||
########################################################
|
||||
vc6/vc6-re300/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc6/vc6-re300/vc6-re300.pch -Fo./vc6/vc6-re300/ -Fdvc6/vc6-re300.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc6/vc6-re300/vc6-re300.pch -Fo./vc6/vc6-re300/ -Fdvc6/vc6-re300.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6/vc6-re300/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc6/vc6-re300/vc6-re300.pch -Fo./vc6/vc6-re300/ -Fdvc6/vc6-re300.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc6/vc6-re300/vc6-re300.pch -Fo./vc6/vc6-re300/ -Fdvc6/vc6-re300.pdb ../src/cregex.cpp
|
||||
|
||||
vc6/vc6-re300/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc6/vc6-re300/vc6-re300.pch -Fo./vc6/vc6-re300/ -Fdvc6/vc6-re300.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6/vc6-re300/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc6/vc6-re300/vc6-re300.pch -Fo./vc6/vc6-re300/ -Fdvc6/vc6-re300.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6/vc6-re300/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc6/vc6-re300/vc6-re300.pch -Fo./vc6/vc6-re300/ -Fdvc6/vc6-re300.pdb ../src/regex.cpp
|
||||
|
||||
vc6/vc6-re300/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc6/vc6-re300/vc6-re300.pch -Fo./vc6/vc6-re300/ -Fdvc6/vc6-re300.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6/vc6-re300/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc6/vc6-re300/vc6-re300.pch -Fo./vc6/vc6-re300/ -Fdvc6/vc6-re300.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6/vc6-re300/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc6/vc6-re300/vc6-re300.pch -Fo./vc6/vc6-re300/ -Fdvc6/vc6-re300.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /c /nologo /ML /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD $(CXXFLAGS) -Fpvc6/vc6-re300/vc6-re300.pch -Fo./vc6/vc6-re300/ -Fdvc6/vc6-re300.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-re300_dir :
|
||||
if not exist "vc6\vc6-re300\$(NULL)" mkdir vc6\vc6-re300
|
||||
|
||||
vc6-re300_clean :
|
||||
del vc6\vc6-re300\*.obj
|
||||
del vc6\vc6-re300\*.idb
|
||||
del vc6\vc6-re300\*.exp
|
||||
del vc6\vc6-re300\*.pch
|
||||
|
||||
./vc6/vc6-re300.lib : vc6/vc6-re300/c_regex_traits.obj vc6/vc6-re300/c_regex_traits_common.obj vc6/vc6-re300/cpp_regex_traits.obj vc6/vc6-re300/cregex.obj vc6/vc6-re300/fileiter.obj vc6/vc6-re300/posix_api.obj vc6/vc6-re300/regex.obj vc6/vc6-re300/regex_debug.obj vc6/vc6-re300/regex_synch.obj vc6/vc6-re300/w32_regex_traits.obj vc6/vc6-re300/wide_posix_api.obj
|
||||
link -lib /nologo /out:vc6/vc6-re300.lib $(XSFLAGS) vc6/vc6-re300/c_regex_traits.obj vc6/vc6-re300/c_regex_traits_common.obj vc6/vc6-re300/cpp_regex_traits.obj vc6/vc6-re300/cregex.obj vc6/vc6-re300/fileiter.obj vc6/vc6-re300/posix_api.obj vc6/vc6-re300/regex.obj vc6/vc6-re300/regex_debug.obj vc6/vc6-re300/regex_synch.obj vc6/vc6-re300/w32_regex_traits.obj vc6/vc6-re300/wide_posix_api.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-re300m.lib
|
||||
#
|
||||
########################################################
|
||||
vc6/vc6-re300m/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300m/vc6-re300m.pch -Fo./vc6/vc6-re300m/ -Fdvc6/vc6-re300m.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300m/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300m/vc6-re300m.pch -Fo./vc6/vc6-re300m/ -Fdvc6/vc6-re300m.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6/vc6-re300m/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300m/vc6-re300m.pch -Fo./vc6/vc6-re300m/ -Fdvc6/vc6-re300m.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300m/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300m/vc6-re300m.pch -Fo./vc6/vc6-re300m/ -Fdvc6/vc6-re300m.pdb ../src/cregex.cpp
|
||||
|
||||
vc6/vc6-re300m/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300m/vc6-re300m.pch -Fo./vc6/vc6-re300m/ -Fdvc6/vc6-re300m.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6/vc6-re300m/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300m/vc6-re300m.pch -Fo./vc6/vc6-re300m/ -Fdvc6/vc6-re300m.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6/vc6-re300m/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300m/vc6-re300m.pch -Fo./vc6/vc6-re300m/ -Fdvc6/vc6-re300m.pdb ../src/regex.cpp
|
||||
|
||||
vc6/vc6-re300m/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300m/vc6-re300m.pch -Fo./vc6/vc6-re300m/ -Fdvc6/vc6-re300m.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6/vc6-re300m/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300m/vc6-re300m.pch -Fo./vc6/vc6-re300m/ -Fdvc6/vc6-re300m.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6/vc6-re300m/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300m/vc6-re300m.pch -Fo./vc6/vc6-re300m/ -Fdvc6/vc6-re300m.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300m/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MT /W3 /GX /Oityb1 /GF /Gy /I..\..\..\ /D_MT /DWIN32 /DNDEBUG /D_MBCS /D_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300m/vc6-re300m.pch -Fo./vc6/vc6-re300m/ -Fdvc6/vc6-re300m.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-re300m_dir :
|
||||
if not exist "vc6\vc6-re300m\$(NULL)" mkdir vc6\vc6-re300m
|
||||
|
||||
vc6-re300m_clean :
|
||||
del vc6\vc6-re300m\*.obj
|
||||
del vc6\vc6-re300m\*.idb
|
||||
del vc6\vc6-re300m\*.exp
|
||||
del vc6\vc6-re300m\*.pch
|
||||
|
||||
./vc6/vc6-re300m.lib : vc6/vc6-re300m/c_regex_traits.obj vc6/vc6-re300m/c_regex_traits_common.obj vc6/vc6-re300m/cpp_regex_traits.obj vc6/vc6-re300m/cregex.obj vc6/vc6-re300m/fileiter.obj vc6/vc6-re300m/posix_api.obj vc6/vc6-re300m/regex.obj vc6/vc6-re300m/regex_debug.obj vc6/vc6-re300m/regex_synch.obj vc6/vc6-re300m/w32_regex_traits.obj vc6/vc6-re300m/wide_posix_api.obj
|
||||
link -lib /nologo /out:vc6/vc6-re300m.lib $(XSFLAGS) vc6/vc6-re300m/c_regex_traits.obj vc6/vc6-re300m/c_regex_traits_common.obj vc6/vc6-re300m/cpp_regex_traits.obj vc6/vc6-re300m/cregex.obj vc6/vc6-re300m/fileiter.obj vc6/vc6-re300m/posix_api.obj vc6/vc6-re300m/regex.obj vc6/vc6-re300m/regex_debug.obj vc6/vc6-re300m/regex_synch.obj vc6/vc6-re300m/w32_regex_traits.obj vc6/vc6-re300m/wide_posix_api.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-re300d.lib
|
||||
#
|
||||
########################################################
|
||||
vc6/vc6-re300d/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) -Fpvc6/vc6-re300d/vc6-re300d.pch -Fo./vc6/vc6-re300d/ -Fdvc6/vc6-re300d.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300d/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) -Fpvc6/vc6-re300d/vc6-re300d.pch -Fo./vc6/vc6-re300d/ -Fdvc6/vc6-re300d.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6/vc6-re300d/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) -Fpvc6/vc6-re300d/vc6-re300d.pch -Fo./vc6/vc6-re300d/ -Fdvc6/vc6-re300d.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300d/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) -Fpvc6/vc6-re300d/vc6-re300d.pch -Fo./vc6/vc6-re300d/ -Fdvc6/vc6-re300d.pdb ../src/cregex.cpp
|
||||
|
||||
vc6/vc6-re300d/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) -Fpvc6/vc6-re300d/vc6-re300d.pch -Fo./vc6/vc6-re300d/ -Fdvc6/vc6-re300d.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6/vc6-re300d/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) -Fpvc6/vc6-re300d/vc6-re300d.pch -Fo./vc6/vc6-re300d/ -Fdvc6/vc6-re300d.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6/vc6-re300d/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) -Fpvc6/vc6-re300d/vc6-re300d.pch -Fo./vc6/vc6-re300d/ -Fdvc6/vc6-re300d.pdb ../src/regex.cpp
|
||||
|
||||
vc6/vc6-re300d/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) -Fpvc6/vc6-re300d/vc6-re300d.pch -Fo./vc6/vc6-re300d/ -Fdvc6/vc6-re300d.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6/vc6-re300d/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) -Fpvc6/vc6-re300d/vc6-re300d.pch -Fo./vc6/vc6-re300d/ -Fdvc6/vc6-re300d.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6/vc6-re300d/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) -Fpvc6/vc6-re300d/vc6-re300d.pch -Fo./vc6/vc6-re300d/ -Fdvc6/vc6-re300d.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300d/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) -Fpvc6/vc6-re300d/vc6-re300d.pch -Fo./vc6/vc6-re300d/ -Fdvc6/vc6-re300d.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-re300d_dir :
|
||||
if not exist "vc6\vc6-re300d\$(NULL)" mkdir vc6\vc6-re300d
|
||||
|
||||
vc6-re300d_clean :
|
||||
del vc6\vc6-re300d\*.obj
|
||||
del vc6\vc6-re300d\*.idb
|
||||
del vc6\vc6-re300d\*.exp
|
||||
del vc6\vc6-re300d\*.pch
|
||||
|
||||
./vc6/vc6-re300d.lib : vc6/vc6-re300d/c_regex_traits.obj vc6/vc6-re300d/c_regex_traits_common.obj vc6/vc6-re300d/cpp_regex_traits.obj vc6/vc6-re300d/cregex.obj vc6/vc6-re300d/fileiter.obj vc6/vc6-re300d/posix_api.obj vc6/vc6-re300d/regex.obj vc6/vc6-re300d/regex_debug.obj vc6/vc6-re300d/regex_synch.obj vc6/vc6-re300d/w32_regex_traits.obj vc6/vc6-re300d/wide_posix_api.obj
|
||||
link -lib /nologo /out:vc6/vc6-re300d.lib $(XSFLAGS) vc6/vc6-re300d/c_regex_traits.obj vc6/vc6-re300d/c_regex_traits_common.obj vc6/vc6-re300d/cpp_regex_traits.obj vc6/vc6-re300d/cregex.obj vc6/vc6-re300d/fileiter.obj vc6/vc6-re300d/posix_api.obj vc6/vc6-re300d/regex.obj vc6/vc6-re300d/regex_debug.obj vc6/vc6-re300d/regex_synch.obj vc6/vc6-re300d/w32_regex_traits.obj vc6/vc6-re300d/wide_posix_api.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-re300dm.lib
|
||||
#
|
||||
########################################################
|
||||
vc6/vc6-re300dm/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) -Fpvc6/vc6-re300dm/vc6-re300dm.pch -Fo./vc6/vc6-re300dm/ -Fdvc6/vc6-re300dm.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300dm/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) -Fpvc6/vc6-re300dm/vc6-re300dm.pch -Fo./vc6/vc6-re300dm/ -Fdvc6/vc6-re300dm.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6/vc6-re300dm/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) -Fpvc6/vc6-re300dm/vc6-re300dm.pch -Fo./vc6/vc6-re300dm/ -Fdvc6/vc6-re300dm.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300dm/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) -Fpvc6/vc6-re300dm/vc6-re300dm.pch -Fo./vc6/vc6-re300dm/ -Fdvc6/vc6-re300dm.pdb ../src/cregex.cpp
|
||||
|
||||
vc6/vc6-re300dm/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) -Fpvc6/vc6-re300dm/vc6-re300dm.pch -Fo./vc6/vc6-re300dm/ -Fdvc6/vc6-re300dm.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6/vc6-re300dm/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) -Fpvc6/vc6-re300dm/vc6-re300dm.pch -Fo./vc6/vc6-re300dm/ -Fdvc6/vc6-re300dm.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6/vc6-re300dm/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) -Fpvc6/vc6-re300dm/vc6-re300dm.pch -Fo./vc6/vc6-re300dm/ -Fdvc6/vc6-re300dm.pdb ../src/regex.cpp
|
||||
|
||||
vc6/vc6-re300dm/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) -Fpvc6/vc6-re300dm/vc6-re300dm.pch -Fo./vc6/vc6-re300dm/ -Fdvc6/vc6-re300dm.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6/vc6-re300dm/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) -Fpvc6/vc6-re300dm/vc6-re300dm.pch -Fo./vc6/vc6-re300dm/ -Fdvc6/vc6-re300dm.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6/vc6-re300dm/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) -Fpvc6/vc6-re300dm/vc6-re300dm.pch -Fo./vc6/vc6-re300dm/ -Fdvc6/vc6-re300dm.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300dm/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) -Fpvc6/vc6-re300dm/vc6-re300dm.pch -Fo./vc6/vc6-re300dm/ -Fdvc6/vc6-re300dm.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-re300dm_dir :
|
||||
if not exist "vc6\vc6-re300dm\$(NULL)" mkdir vc6\vc6-re300dm
|
||||
|
||||
vc6-re300dm_clean :
|
||||
del vc6\vc6-re300dm\*.obj
|
||||
del vc6\vc6-re300dm\*.idb
|
||||
del vc6\vc6-re300dm\*.exp
|
||||
del vc6\vc6-re300dm\*.pch
|
||||
|
||||
./vc6/vc6-re300dm.lib : vc6/vc6-re300dm/c_regex_traits.obj vc6/vc6-re300dm/c_regex_traits_common.obj vc6/vc6-re300dm/cpp_regex_traits.obj vc6/vc6-re300dm/cregex.obj vc6/vc6-re300dm/fileiter.obj vc6/vc6-re300dm/posix_api.obj vc6/vc6-re300dm/regex.obj vc6/vc6-re300dm/regex_debug.obj vc6/vc6-re300dm/regex_synch.obj vc6/vc6-re300dm/w32_regex_traits.obj vc6/vc6-re300dm/wide_posix_api.obj
|
||||
link -lib /nologo /out:vc6/vc6-re300dm.lib $(XSFLAGS) vc6/vc6-re300dm/c_regex_traits.obj vc6/vc6-re300dm/c_regex_traits_common.obj vc6/vc6-re300dm/cpp_regex_traits.obj vc6/vc6-re300dm/cregex.obj vc6/vc6-re300dm/fileiter.obj vc6/vc6-re300dm/posix_api.obj vc6/vc6-re300dm/regex.obj vc6/vc6-re300dm/regex_debug.obj vc6/vc6-re300dm/regex_synch.obj vc6/vc6-re300dm/w32_regex_traits.obj vc6/vc6-re300dm/wide_posix_api.obj
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-re300dl.lib
|
||||
#
|
||||
########################################################
|
||||
vc6/vc6-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6/vc6-re300dl/vc6-re300dl.pch -Fo./vc6/vc6-re300dl/ -Fdvc6/vc6-re300dl.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6/vc6-re300dl/vc6-re300dl.pch -Fo./vc6/vc6-re300dl/ -Fdvc6/vc6-re300dl.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6/vc6-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6/vc6-re300dl/vc6-re300dl.pch -Fo./vc6/vc6-re300dl/ -Fdvc6/vc6-re300dl.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6/vc6-re300dl/vc6-re300dl.pch -Fo./vc6/vc6-re300dl/ -Fdvc6/vc6-re300dl.pdb ../src/cregex.cpp
|
||||
|
||||
vc6/vc6-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6/vc6-re300dl/vc6-re300dl.pch -Fo./vc6/vc6-re300dl/ -Fdvc6/vc6-re300dl.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6/vc6-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6/vc6-re300dl/vc6-re300dl.pch -Fo./vc6/vc6-re300dl/ -Fdvc6/vc6-re300dl.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6/vc6-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6/vc6-re300dl/vc6-re300dl.pch -Fo./vc6/vc6-re300dl/ -Fdvc6/vc6-re300dl.pdb ../src/regex.cpp
|
||||
|
||||
vc6/vc6-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6/vc6-re300dl/vc6-re300dl.pch -Fo./vc6/vc6-re300dl/ -Fdvc6/vc6-re300dl.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6/vc6-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6/vc6-re300dl/vc6-re300dl.pch -Fo./vc6/vc6-re300dl/ -Fdvc6/vc6-re300dl.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6/vc6-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6/vc6-re300dl/vc6-re300dl.pch -Fo./vc6/vc6-re300dl/ -Fdvc6/vc6-re300dl.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300dl/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 /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /GZ /c $(CXXFLAGS) -Fpvc6/vc6-re300dl/vc6-re300dl.pch -Fo./vc6/vc6-re300dl/ -Fdvc6/vc6-re300dl.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-re300dl_dir :
|
||||
if not exist "vc6\vc6-re300dl\$(NULL)" mkdir vc6\vc6-re300dl
|
||||
|
||||
vc6-re300dl_clean :
|
||||
del vc6\vc6-re300dl\*.obj
|
||||
del vc6\vc6-re300dl\*.idb
|
||||
del vc6\vc6-re300dl\*.exp
|
||||
del vc6\vc6-re300dl\*.pch
|
||||
|
||||
./vc6/vc6-re300dl.lib : vc6/vc6-re300dl/c_regex_traits.obj vc6/vc6-re300dl/c_regex_traits_common.obj vc6/vc6-re300dl/cpp_regex_traits.obj vc6/vc6-re300dl/cregex.obj vc6/vc6-re300dl/fileiter.obj vc6/vc6-re300dl/posix_api.obj vc6/vc6-re300dl/regex.obj vc6/vc6-re300dl/regex_debug.obj vc6/vc6-re300dl/regex_synch.obj vc6/vc6-re300dl/w32_regex_traits.obj vc6/vc6-re300dl/wide_posix_api.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:"vc6/vc6-re300dl.pdb" /debug /machine:I386 /out:"vc6/vc6-re300dl.dll" /implib:"vc6/vc6-re300dl.lib" /pdbtype:sept $(XLFLAGS) vc6/vc6-re300dl/c_regex_traits.obj vc6/vc6-re300dl/c_regex_traits_common.obj vc6/vc6-re300dl/cpp_regex_traits.obj vc6/vc6-re300dl/cregex.obj vc6/vc6-re300dl/fileiter.obj vc6/vc6-re300dl/posix_api.obj vc6/vc6-re300dl/regex.obj vc6/vc6-re300dl/regex_debug.obj vc6/vc6-re300dl/regex_synch.obj vc6/vc6-re300dl/w32_regex_traits.obj vc6/vc6-re300dl/wide_posix_api.obj
|
||||
<<
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-re300l.lib
|
||||
#
|
||||
########################################################
|
||||
vc6/vc6-re300l/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300l/vc6-re300l.pch -Fo./vc6/vc6-re300l/ -Fdvc6/vc6-re300l.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300l/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300l/vc6-re300l.pch -Fo./vc6/vc6-re300l/ -Fdvc6/vc6-re300l.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6/vc6-re300l/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300l/vc6-re300l.pch -Fo./vc6/vc6-re300l/ -Fdvc6/vc6-re300l.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300l/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300l/vc6-re300l.pch -Fo./vc6/vc6-re300l/ -Fdvc6/vc6-re300l.pdb ../src/cregex.cpp
|
||||
|
||||
vc6/vc6-re300l/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300l/vc6-re300l.pch -Fo./vc6/vc6-re300l/ -Fdvc6/vc6-re300l.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6/vc6-re300l/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300l/vc6-re300l.pch -Fo./vc6/vc6-re300l/ -Fdvc6/vc6-re300l.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6/vc6-re300l/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300l/vc6-re300l.pch -Fo./vc6/vc6-re300l/ -Fdvc6/vc6-re300l.pdb ../src/regex.cpp
|
||||
|
||||
vc6/vc6-re300l/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300l/vc6-re300l.pch -Fo./vc6/vc6-re300l/ -Fdvc6/vc6-re300l.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6/vc6-re300l/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300l/vc6-re300l.pch -Fo./vc6/vc6-re300l/ -Fdvc6/vc6-re300l.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6/vc6-re300l/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300l/vc6-re300l.pch -Fo./vc6/vc6-re300l/ -Fdvc6/vc6-re300l.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300l/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_DLL_EXPORTS /DBOOST_RE_BUILD_DLL /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300l/vc6-re300l.pch -Fo./vc6/vc6-re300l/ -Fdvc6/vc6-re300l.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-re300l_dir :
|
||||
if not exist "vc6\vc6-re300l\$(NULL)" mkdir vc6\vc6-re300l
|
||||
|
||||
vc6-re300l_clean :
|
||||
del vc6\vc6-re300l\*.obj
|
||||
del vc6\vc6-re300l\*.idb
|
||||
del vc6\vc6-re300l\*.exp
|
||||
del vc6\vc6-re300l\*.pch
|
||||
|
||||
./vc6/vc6-re300l.lib : vc6/vc6-re300l/c_regex_traits.obj vc6/vc6-re300l/c_regex_traits_common.obj vc6/vc6-re300l/cpp_regex_traits.obj vc6/vc6-re300l/cregex.obj vc6/vc6-re300l/fileiter.obj vc6/vc6-re300l/posix_api.obj vc6/vc6-re300l/regex.obj vc6/vc6-re300l/regex_debug.obj vc6/vc6-re300l/regex_synch.obj vc6/vc6-re300l/w32_regex_traits.obj vc6/vc6-re300l/wide_posix_api.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:"vc6/vc6-re300l.pdb" /debug /machine:I386 /out:"vc6/vc6-re300l.dll" /implib:"vc6/vc6-re300l.lib" /pdbtype:sept $(XLFLAGS) vc6/vc6-re300l/c_regex_traits.obj vc6/vc6-re300l/c_regex_traits_common.obj vc6/vc6-re300l/cpp_regex_traits.obj vc6/vc6-re300l/cregex.obj vc6/vc6-re300l/fileiter.obj vc6/vc6-re300l/posix_api.obj vc6/vc6-re300l/regex.obj vc6/vc6-re300l/regex_debug.obj vc6/vc6-re300l/regex_synch.obj vc6/vc6-re300l/w32_regex_traits.obj vc6/vc6-re300l/wide_posix_api.obj
|
||||
<<
|
||||
|
||||
########################################################
|
||||
#
|
||||
# section for vc6-re300ls.lib
|
||||
#
|
||||
########################################################
|
||||
vc6/vc6-re300ls/c_regex_traits.obj: ../src/c_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300ls/vc6-re300ls.pch -Fo./vc6/vc6-re300ls/ -Fdvc6/vc6-re300ls.pdb ../src/c_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300ls/c_regex_traits_common.obj: ../src/c_regex_traits_common.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300ls/vc6-re300ls.pch -Fo./vc6/vc6-re300ls/ -Fdvc6/vc6-re300ls.pdb ../src/c_regex_traits_common.cpp
|
||||
|
||||
vc6/vc6-re300ls/cpp_regex_traits.obj: ../src/cpp_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300ls/vc6-re300ls.pch -Fo./vc6/vc6-re300ls/ -Fdvc6/vc6-re300ls.pdb ../src/cpp_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300ls/cregex.obj: ../src/cregex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300ls/vc6-re300ls.pch -Fo./vc6/vc6-re300ls/ -Fdvc6/vc6-re300ls.pdb ../src/cregex.cpp
|
||||
|
||||
vc6/vc6-re300ls/fileiter.obj: ../src/fileiter.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300ls/vc6-re300ls.pch -Fo./vc6/vc6-re300ls/ -Fdvc6/vc6-re300ls.pdb ../src/fileiter.cpp
|
||||
|
||||
vc6/vc6-re300ls/posix_api.obj: ../src/posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300ls/vc6-re300ls.pch -Fo./vc6/vc6-re300ls/ -Fdvc6/vc6-re300ls.pdb ../src/posix_api.cpp
|
||||
|
||||
vc6/vc6-re300ls/regex.obj: ../src/regex.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300ls/vc6-re300ls.pch -Fo./vc6/vc6-re300ls/ -Fdvc6/vc6-re300ls.pdb ../src/regex.cpp
|
||||
|
||||
vc6/vc6-re300ls/regex_debug.obj: ../src/regex_debug.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300ls/vc6-re300ls.pch -Fo./vc6/vc6-re300ls/ -Fdvc6/vc6-re300ls.pdb ../src/regex_debug.cpp
|
||||
|
||||
vc6/vc6-re300ls/regex_synch.obj: ../src/regex_synch.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300ls/vc6-re300ls.pch -Fo./vc6/vc6-re300ls/ -Fdvc6/vc6-re300ls.pdb ../src/regex_synch.cpp
|
||||
|
||||
vc6/vc6-re300ls/w32_regex_traits.obj: ../src/w32_regex_traits.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300ls/vc6-re300ls.pch -Fo./vc6/vc6-re300ls/ -Fdvc6/vc6-re300ls.pdb ../src/w32_regex_traits.cpp
|
||||
|
||||
vc6/vc6-re300ls/wide_posix_api.obj: ../src/wide_posix_api.cpp $(ALL_HEADER)
|
||||
cl $(INCLUDES) /nologo /MD /W3 /GX /Oityb1 /GF /Gy /I../../../ /DNDEBUG /DWIN32 /D_WINDOWS /D_MBCS /D_USRDLL /DBOOST_RE_STATIC_LIB /YX /FD /c $(CXXFLAGS) -Fpvc6/vc6-re300ls/vc6-re300ls.pch -Fo./vc6/vc6-re300ls/ -Fdvc6/vc6-re300ls.pdb ../src/wide_posix_api.cpp
|
||||
|
||||
vc6-re300ls_dir :
|
||||
if not exist "vc6\vc6-re300ls\$(NULL)" mkdir vc6\vc6-re300ls
|
||||
|
||||
vc6-re300ls_clean :
|
||||
del vc6\vc6-re300ls\*.obj
|
||||
del vc6\vc6-re300ls\*.idb
|
||||
del vc6\vc6-re300ls\*.exp
|
||||
del vc6\vc6-re300ls\*.pch
|
||||
|
||||
./vc6/vc6-re300ls.lib : vc6/vc6-re300ls/c_regex_traits.obj vc6/vc6-re300ls/c_regex_traits_common.obj vc6/vc6-re300ls/cpp_regex_traits.obj vc6/vc6-re300ls/cregex.obj vc6/vc6-re300ls/fileiter.obj vc6/vc6-re300ls/posix_api.obj vc6/vc6-re300ls/regex.obj vc6/vc6-re300ls/regex_debug.obj vc6/vc6-re300ls/regex_synch.obj vc6/vc6-re300ls/w32_regex_traits.obj vc6/vc6-re300ls/wide_posix_api.obj
|
||||
link -lib /nologo /out:vc6/vc6-re300ls.lib $(XSFLAGS) vc6/vc6-re300ls/c_regex_traits.obj vc6/vc6-re300ls/c_regex_traits_common.obj vc6/vc6-re300ls/cpp_regex_traits.obj vc6/vc6-re300ls/cregex.obj vc6/vc6-re300ls/fileiter.obj vc6/vc6-re300ls/posix_api.obj vc6/vc6-re300ls/regex.obj vc6/vc6-re300ls/regex_debug.obj vc6/vc6-re300ls/regex_synch.obj vc6/vc6-re300ls/w32_regex_traits.obj vc6/vc6-re300ls/wide_posix_api.obj
|
||||
|
||||
-267
@@ -1,267 +0,0 @@
|
||||
Version 311:
|
||||
FIXED: Support for STLPort 4.1b6.
|
||||
FIXED: Library calling convention for VC6 debug builds.
|
||||
FIXED: Borland compiler support when using non-default calling convention.
|
||||
CHANGED: Reorganised and simplified config setup.
|
||||
ADDED: Support for replacing only the first occurance during a regex_merge
|
||||
using the format_first_only flag.
|
||||
CHANGED: Removed use of deprecated api set_expression in one of the examples.
|
||||
|
||||
Version 310:
|
||||
ADDED: Support for static linking with VC6 + dynamic runtime.
|
||||
CHANGED: Library directory structure.
|
||||
|
||||
Version 305:
|
||||
FIXED: VC6.sp5 fix.
|
||||
ADDED: Support for mixed static/dynamic linking with vc6.
|
||||
ADDED: Sunpro makefiles
|
||||
FIXED: SunPro 6.1 support
|
||||
FIXED: Spurious extra matches at the end of input when grepping with .*
|
||||
|
||||
Version 304:
|
||||
FIXED: Missing this-> prefix to some symbols in cpp_regex_traits.cpp
|
||||
CHANGED: Error reporting for wide character tests.
|
||||
FIXED: Win2K problem with [[:unicode:]]
|
||||
FIXED: Signed/unsigned conversions in regex_compile.hpp and regex_format.hpp
|
||||
ADDED: Forwarder functions to match_results.
|
||||
FIXED: More errors from Como in strict mode.
|
||||
|
||||
Version 303:
|
||||
FIXED: Code glitches for Como compiler in strict mode.
|
||||
FIXED: Missing fixes for cstdio header.
|
||||
FIXED: memory leak in underlying w32 traits classes
|
||||
FIXED: vc6 clean option to remove *.pch files.
|
||||
CHANGED: Build options for VC6 to avoid compiler optimisation bug.
|
||||
FIXED: Missing BOOST_RE_NO_WCSTRING guard around using declaration in regex.h
|
||||
FIXED: Pathological regular expressions in snip4.cpp and in docs.
|
||||
FIXED: Missing std:: prefixes in some headers.
|
||||
|
||||
Version 302:
|
||||
FIXED: STLPort debug problems.
|
||||
FIXED: Compatibility with updated Dinkum libraries and VC6.
|
||||
ADDED: Tentative support for partial matches (not yet documented).
|
||||
|
||||
Version 301:
|
||||
First boost release version,
|
||||
CHANGED: reg_match to match_results
|
||||
CHANGED: Documentation updated to reflect changes, provided links to sources from docs.
|
||||
CHANGED: RegEx(const char*) constructor to explicit.
|
||||
CHANGED: Return type of RegEx::Split to unsigned int.
|
||||
ADDED: Exception documentation for OS errors.
|
||||
REMOVED: BOOST_RE_NO_EXCEPTIONS macro.
|
||||
FIXED: mapfile::open/close to check for OS errors.
|
||||
FIXED: Non-exception safe code in cpp_regex_traits.
|
||||
FIXED: Removed undefined symbol INFINITE from re_thrd.hpp
|
||||
FIXED: Bug in configure script thread detection code.
|
||||
CHANGED: "depreciated" to "deprecated"
|
||||
FIXED: Documentation error for bad_expression.
|
||||
CHANGED: regbase::flag_type to unsigned int
|
||||
ADDED: explicit constructors to reg_expression/match_results
|
||||
ADDED: extra signatures for regex_format/regex_merge for std::string arguments.
|
||||
REMOVED: bad_pattern/bad_expression::what from regex.cpp
|
||||
REMOVED: Implicit conversion operators from sub_match (except for conversion to basic_string).
|
||||
|
||||
Version 300:
|
||||
Candidate release boost version,
|
||||
ADDED: Support for non-greedy repeats.
|
||||
ADDED: Support for non-marking grouping.
|
||||
ADDED: Auto-detection of STLPort STL versions.
|
||||
CHANGED: Re-written and re-organised traits classes.
|
||||
CHANGED: Regression test make files for more rigorous testing of all build versions.
|
||||
|
||||
Version 249:
|
||||
Pre-release boost version,
|
||||
CHANGED: All macro prefixes to BOOST_RE_
|
||||
CHANGED: namespaces to boost
|
||||
CHANGED: Header file extentions to .hpp
|
||||
DEPRECIATED: Old style algorithms, replaced with more consistant naming style.
|
||||
DEPRECIATED: Standard library independant compiles no longer possible, bespoke
|
||||
classes replaced with standard library/boost equivalents where available.
|
||||
|
||||
Version 221:
|
||||
ADDED: C++ Builder 3 workaround in boost/detail/jgrep.hpp
|
||||
|
||||
Version 220:
|
||||
ADDED: Merge functions to class RegEx
|
||||
|
||||
|
||||
Version 218:
|
||||
FIXED: All known bugs prior to this version.
|
||||
FIXED: Added workaround for gcc optimisation bug to jm/regmatch.h
|
||||
ADDED: Cygwin mount point support.
|
||||
|
||||
Version 217:
|
||||
BUG: configure script did not correctly identify template
|
||||
friend support, or template function partial ordering support.
|
||||
|
||||
FIXED: All known bugs prior to this version.
|
||||
|
||||
Version 216:
|
||||
BUG: Some RegEx::Grep variants buggy.
|
||||
BUG: FileIterator leaked memory.
|
||||
BUG: Memory alignment problems with gcc/sparc platform
|
||||
|
||||
CHANGED: RegEx callback declarations to cope with VC6 builds using
|
||||
non-default calling conventions.
|
||||
CHANGED: Some configuration options to try and keep Mingwin32 port
|
||||
of gcc 2.95 happy.
|
||||
FIXED: Bug in RegEx::What introduced in version 214 fix :-(
|
||||
|
||||
Version 215:
|
||||
CHANGED: Added #pragma push/pop to fix C++ Builder 3 problems.
|
||||
CHANGED: Wide to narrow character conversions, to be more conformant with standard.
|
||||
CHANGED: Minor documentation updates.
|
||||
|
||||
Version 214:
|
||||
FIXED All known bugs rpior to this point.
|
||||
CHANGED: Minor changes to keep VC5 and GCC 2.95 happy.
|
||||
|
||||
Version 213:
|
||||
BUG: Far eastern versions of Win32 could not compile
|
||||
re_nlsw.cpp due to string literal - code page
|
||||
interactions.
|
||||
|
||||
ADDED: Convenience conversion operators to sub_match<>.
|
||||
CHANGED: Removed REG_E_MEMORY as it duplicates REG_ESPACE.
|
||||
ADDED: Additional tests to regress.
|
||||
CHANGED: RegEx::GrepFiles and RegEx::FindFiles previously had undefined
|
||||
behaviour if the callback returned false, changed to abort
|
||||
the whole search if the callback returns false.
|
||||
|
||||
FIXED: All known bugs prior to this release.
|
||||
|
||||
Version 212:
|
||||
BUG: Use of catopen in re_mss.cpp causes problems on some systems.
|
||||
BUG: Comparison operators for reg_expression and reg_match should be const.
|
||||
BUG: Missing output iterator increment in regfmt.h.
|
||||
|
||||
ADDED: REG_NOCOLLATE, so that locale dependent collation can be turned off for
|
||||
the POSIX C API's as well as the underlying templates.
|
||||
CHANGED: Misc. documentation updates.
|
||||
FIXED: Linking problem for some egcs ports.
|
||||
CHANGED: Tightened up exception safety.
|
||||
ADDED: Convenience interfaces to query_match, reg_search, reg_grep, reg_format and reg_merge.
|
||||
ADDED: Convenience std::string overloads of reg_expression members.
|
||||
FIXED: All bugs found prior to this release.
|
||||
|
||||
|
||||
Version 211:
|
||||
BUG: RegEx::GrepFiles fails to log sub-expression matches correctly.
|
||||
BUG: file_iterator/directory_iterator fail to find all files when using '*'.
|
||||
|
||||
CHANGED: Changes required to make the code compile with HP's aCC compiler.
|
||||
CHANGED: Using declarations, to hide implimentation details.
|
||||
CHANGED: Behavior of ^ and $ to follow Unicode newline guidelines and account
|
||||
for \r\n sequences.
|
||||
|
||||
Version 210:
|
||||
FIXED: All known bugs prior to this point.
|
||||
ADDED: configure shell script for porting to Unix style systems.
|
||||
CHANGED: jm::reg_match_base::pair to jm::sub_match, for easier porting.
|
||||
|
||||
Version 200:
|
||||
BUG: RegEx::GrepFiles buggy
|
||||
BUG: RegEx::FindFiles buggy
|
||||
BUG: non-portable header file usage in fileiter.h
|
||||
BUG: non-portable enum declarations in headers.
|
||||
BUG: non-portable use of isspace in regfacet.cpp
|
||||
BUG: Missing regfac.obj from bcb makefiles.
|
||||
BUG: non-portable declaration of type jm::reg_match_base::reference.
|
||||
BUG: missing <wchar.h> declaration required by some systems.
|
||||
BUG: Use of JM_NO_WCSTRING incomplete.
|
||||
BUG: Misspelled JM_NO_EXCEPTIONS in places.
|
||||
BUG: regfmt.h has typo on line 538.
|
||||
BUG: reg_format and reg_merge not portable to all output iterator types.
|
||||
BUG: non-portable use of typedefs.
|
||||
BUG: non-portable use of friend declarations.
|
||||
|
||||
CHANGED: Allocator usage, to improve efficiency with instance based allocators.
|
||||
CHANGED: regress.h, various fixes for various Borland C++ versions, allocators cleaned up.
|
||||
ADDED: Win32 specific localisation code.
|
||||
ADDED: C and C++ specific localisation code.
|
||||
ADDED: collating element and equivalence class support.
|
||||
CHANGED: Character class declarations.
|
||||
CHANGED: Behaviour of ranges to deal with locales.
|
||||
ADDED: Support for some perl escape sequences (but not yet (?...) ).
|
||||
CHANGED: regbase::icase flag now turns on case insensitivity,
|
||||
traits class char_regex_traits_i is now deprecated.
|
||||
CHANGED: reg_grep now takes a predicate not an output iterator,
|
||||
allows user code to terminate search midway through,
|
||||
and to use regular callback function with grep.
|
||||
CHANGED: Modified search heuristics to improve certain expression
|
||||
types, especially expressions which start with a literal
|
||||
string, or a single character repeat. The latter are much
|
||||
less likely to become pathological now.
|
||||
ADDED: High level C++ class RegEx.
|
||||
|
||||
Version 111:
|
||||
BUG: Wouldn't compile directly on C++ Builder 4 when it was released
|
||||
(not really a bug - more an incompatibility)
|
||||
|
||||
FIXED: All bugs discovered prior to this version (below).
|
||||
|
||||
Version 110:
|
||||
BUG: reg_match::maybe_assign could lead to pointer
|
||||
overrun in certain (rare) circumstances.
|
||||
|
||||
FIXED: All bugs discovered prior to this version (below).
|
||||
FIXED: Support for VC++, GCC, EGCS.
|
||||
CHANGED: Regress.h to work around various compiler bugs.
|
||||
|
||||
Version 100:
|
||||
BUG: Literal "," not recognised as a literal.
|
||||
|
||||
FIXED: All bugs discovered prior to this version (below).
|
||||
ADDED: Regress.exe, regression test application.
|
||||
|
||||
Version 095
|
||||
BUG: wide character sets that start with ^ not recognised,
|
||||
for example [^[:space:]] will not find anything.
|
||||
BUG: reg_grep fails if match occurs at first character.
|
||||
BUG: If regcomp fails, internal data not freed.
|
||||
BUG: reg_grep fails to reinitialise match after assignment
|
||||
to output iterator. Line start optimised search restarts
|
||||
from the wrong location if the match is longer than one line.
|
||||
BUG: POSIX API functions can propagate C++ exceptions if the
|
||||
default allocator can throw exceptions.
|
||||
BUG: character sets don't function correctly when regbase::char_classes
|
||||
is not set.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-1190
File diff suppressed because it is too large
Load Diff
@@ -1,14 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
if test "$#" != "1"; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$1"
|
||||
|
||||
if eval make; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exit 1
|
||||
|
||||
-147
@@ -1,147 +0,0 @@
|
||||
subproject libs/regex/example ;
|
||||
|
||||
|
||||
exe timer : timer/regex_timer.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
exe jgrep : jgrep/jgrep.cpp jgrep/main.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
exe credit_card_example : snippets/credit_card_example.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
|
||||
exe partial_regex_grep : snippets/partial_regex_grep.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
exe partial_regex_match : snippets/partial_regex_match.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
exe regex_grep_example_1 : snippets/regex_grep_example_1.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
exe regex_grep_example_2 : snippets/regex_grep_example_2.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
exe regex_grep_example_3 : snippets/regex_grep_example_3.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
exe regex_grep_example_4 : snippets/regex_grep_example_4.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
exe regex_match_example : snippets/regex_match_example.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
exe regex_merge_example : snippets/regex_merge_example.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
exe regex_search_example : snippets/regex_search_example.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
exe regex_split_example_1 : snippets/regex_split_example_1.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
exe regex_split_example_2 : snippets/regex_split_example_2.cpp
|
||||
<lib>../build/libboost_regex$(SUFLIB)
|
||||
:
|
||||
<include>$(BOOST_ROOT)
|
||||
<define>BOOST_RE_NO_LIB=1
|
||||
:
|
||||
debug
|
||||
<runtime-link>dynamic
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
|
||||
# very basic makefile for jgrep.exe
|
||||
#
|
||||
# Borland C++ tools
|
||||
#
|
||||
# BCROOT defines the root directory of your bc builder install
|
||||
#
|
||||
!ifndef BCROOT
|
||||
BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
BCC32 = $(BCROOT)\bin\Bcc32.exe
|
||||
LIBPATH=..\..\build\bcb5
|
||||
|
||||
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
|
||||
LINKOPTS= -ap -Tpe -x
|
||||
COMPOPTS= -O2 -tWM- -DSTRICT; -I$(BCROOT)\include;../../../../; -D_NO_VCL
|
||||
|
||||
|
||||
|
||||
jgrep.exe : jgrep.obj main.obj
|
||||
$(BCC32) $(COMPOPTS) -e$@ -L$(LIBPATH) main.obj jgrep.obj
|
||||
|
||||
jgrep.obj : jgrep.cpp
|
||||
$(BCC32) -c @&&|
|
||||
$(COMPOPTS) -o$@ jgrep.cpp
|
||||
|
|
||||
|
||||
main.obj : main.cpp
|
||||
$(BCC32) -c @&&|
|
||||
$(COMPOPTS) -o$@ main.cpp
|
||||
|
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
|
||||
# very basic makefile for jgrep.exe
|
||||
#
|
||||
# Borland C++ tools
|
||||
#
|
||||
# BCROOT defines the root directory of your bc builder install
|
||||
#
|
||||
!ifndef BCROOT
|
||||
BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
BCC32 = $(BCROOT)\bin\Bcc32.exe
|
||||
LIBPATH="..\..\build\bcb4"
|
||||
|
||||
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
|
||||
LINKOPTS= -ap -Tpe -x
|
||||
COMPOPTS= -O2 -tWM- -DSTRICT; -I$(BCROOT)\include;../../../../; -D_NO_VCL
|
||||
|
||||
|
||||
|
||||
jgrep.exe : jgrep.obj main.obj
|
||||
$(BCC32) @&&|
|
||||
$(COMPOPTS) -e$@ -L$(LIBPATH) main.obj jgrep.obj
|
||||
|
|
||||
|
||||
jgrep.obj : jgrep.cpp
|
||||
$(BCC32) -c @&&|
|
||||
$(COMPOPTS) -o$@ jgrep.cpp
|
||||
|
|
||||
|
||||
main.obj : main.cpp
|
||||
$(BCC32) -c @&&|
|
||||
$(COMPOPTS) -o$@ main.cpp
|
||||
|
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
|
||||
# very basic makefile for jgrep.exe
|
||||
#
|
||||
# Borland C++ tools
|
||||
#
|
||||
# BCROOT defines the root directory of your bc builder install
|
||||
#
|
||||
!ifndef BCROOT
|
||||
BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
BCC32 = $(BCROOT)\bin\Bcc32.exe
|
||||
LIBPATH=../../build/bcb5
|
||||
|
||||
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
|
||||
LINKOPTS= -ap -Tpe -x
|
||||
COMPOPTS= -O2 -tWM- -DSTRICT; -I$(BCROOT)\include;../../../../; -D_NO_VCL
|
||||
|
||||
|
||||
|
||||
jgrep.exe : jgrep.obj main.obj
|
||||
$(BCC32) $(COMPOPTS) -e$@ -L..\..\build\bcb5 main.obj jgrep.obj
|
||||
|
||||
jgrep.obj : jgrep.cpp
|
||||
$(BCC32) -c @&&|
|
||||
$(COMPOPTS) -o$@ jgrep.cpp
|
||||
|
|
||||
|
||||
main.obj : main.cpp
|
||||
$(BCC32) -c @&&|
|
||||
$(COMPOPTS) -o$@ main.cpp
|
||||
|
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
|
||||
# very basic makefile for jgrep
|
||||
#
|
||||
# GNU compiler g++
|
||||
#
|
||||
CXX= $(INCLUDES) -O2 -I../../../../ -I./ $(CXXFLAGS) $(LDFLAGS)
|
||||
|
||||
jgrep : jgrep.cpp main.cpp
|
||||
g++ -ojgrep $(CXX) jgrep.cpp main.cpp -L../../build/gcc -lboost_regex $(LIBS)
|
||||
|
||||
debug : jgrep.cpp main.cpp
|
||||
g++ -ojgrep -I../../../../ -I./ -g jgrep.cpp main.cpp -L../../build/gcc -lboost_regex_debug $(LIBS)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* FILE jgrep.cpp
|
||||
* VERSION 3.12
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <boost/regex.hpp>
|
||||
#ifdef JM_OLD_IOSTREAM
|
||||
#include <iostream.h>
|
||||
#else
|
||||
#include <iostream>
|
||||
using std::cout;
|
||||
using std::cin;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
#endif
|
||||
#pragma hrdstop
|
||||
|
||||
#include <boost/regex/detail/fileiter.hpp>
|
||||
|
||||
#include "jgrep.h"
|
||||
|
||||
|
||||
//
|
||||
// class ogrep_predicate
|
||||
// outputs the results of regex_grep to screen:
|
||||
template <class iterator, class Allocator >
|
||||
class ogrep_predicate
|
||||
{
|
||||
unsigned int& lines;
|
||||
const char* filename;
|
||||
unsigned int last_line;
|
||||
iterator end_of_storage;
|
||||
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) {}
|
||||
bool operator () (const boost::match_results<iterator, Allocator>& i);
|
||||
};
|
||||
|
||||
// ideally we'd ignor the allocator type and use a template member function
|
||||
// to deel with the allocator type passed to regex_grep, unfortunately most
|
||||
// compilers don't support this feature yet, so we'll have to be sure that
|
||||
// the allocator passed to instances of this class match that used in our
|
||||
// regular expression classes.
|
||||
|
||||
template <class iterator, class Allocator>
|
||||
bool ogrep_predicate<iterator, Allocator>::operator()(const boost::match_results<iterator, Allocator>& i)
|
||||
{
|
||||
if(last_line == (unsigned int)-1)
|
||||
cout << "File " << filename << ":" << endl;
|
||||
if(last_line != i.line())
|
||||
{
|
||||
++lines;
|
||||
last_line = i.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.put(*pos);
|
||||
++pos;
|
||||
}
|
||||
cout << endl;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void process_grep(const char* file)
|
||||
{
|
||||
using namespace boost;
|
||||
mapfile f(file);
|
||||
unsigned int count = 0;
|
||||
ogrep_predicate<mapfile::iterator, allocator_type> oi(count, file, f.end());
|
||||
if(files_only)
|
||||
{
|
||||
bool ok;
|
||||
boost::match_results<mapfile::iterator, allocator_type> m;
|
||||
ok = regex_search(f.begin(), f.end(), m, e, match_not_dot_newline | match_not_dot_null);
|
||||
if(ok)
|
||||
cout << "File " << file << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
regex_grep(oi, f.begin(), f.end(), e, match_not_dot_newline | match_not_dot_null);
|
||||
if(count)
|
||||
{
|
||||
if(verbose || count_only)
|
||||
{
|
||||
cout << count << " lines match" << endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if(verbose)
|
||||
{
|
||||
cout << "File " << file << "(" << f.size() << "bytes):" << endl << "0 lines match" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* FILE jgrep.h
|
||||
* VERSION 3.12
|
||||
*/
|
||||
|
||||
#ifndef _JGREP_H
|
||||
#define _JGREP_H
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
// case sensitive reg_expression determines our allocator type:
|
||||
typedef boost::reg_expression<char> re_type;
|
||||
typedef re_type::allocator_type allocator_type;
|
||||
|
||||
// now declare static (global) data, including an allocator
|
||||
// instance which we'll pass to all instances that require an allocator.
|
||||
|
||||
extern allocator_type a;
|
||||
|
||||
extern re_type e;
|
||||
|
||||
// flags for output:
|
||||
|
||||
extern bool use_case;
|
||||
extern bool show_lines;
|
||||
extern bool count_only;
|
||||
extern bool files_only;
|
||||
extern bool recurse;
|
||||
extern bool regularexs;
|
||||
extern bool words_only;
|
||||
extern bool verbose;
|
||||
|
||||
void process_grep(const char* file);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1,284 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* FILE main.cpp
|
||||
* VERSION 3.12
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <boost/regex.hpp>
|
||||
#ifdef JM_OLD_IOSTREAM
|
||||
#include <iostream.h>
|
||||
#else
|
||||
#include <iostream>
|
||||
using std::cout;
|
||||
using std::cin;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
#endif
|
||||
#pragma hrdstop
|
||||
|
||||
#include <boost/regex/detail/fileiter.hpp>
|
||||
#include "jgrep.h"
|
||||
|
||||
#ifndef JM_ALGO_INCLUDED
|
||||
// HP and SGI STL's use <algo.h> instead
|
||||
// this will have been pulled in by <jm_cfg.h>
|
||||
// for std::distance
|
||||
#include <algorithm>
|
||||
#endif
|
||||
|
||||
allocator_type a;
|
||||
|
||||
re_type e(a);
|
||||
//rei_type ei(a);
|
||||
|
||||
// flags for output:
|
||||
|
||||
bool use_case = true;
|
||||
bool show_lines = false;
|
||||
bool count_only = false;
|
||||
bool files_only = false;
|
||||
bool recurse = false;
|
||||
bool regularexs = true;
|
||||
bool words_only = false;
|
||||
bool verbose = false;
|
||||
|
||||
|
||||
void usage()
|
||||
{
|
||||
cout <<
|
||||
"jgrep version 0.95\n"
|
||||
"usage: jgrep [-options] expression file [files...]\n"
|
||||
"\n"
|
||||
"options can be one of the following:\n"
|
||||
"\n"
|
||||
"-c prints a count of the number of matching lines only\n"
|
||||
"-d recurses through subdirectories for matching files\n"
|
||||
"-i causes case to be ignored when matching\n"
|
||||
"-l lists the files which contain a match only\n"
|
||||
"-n displays the line numbers of matches\n"
|
||||
"-r- causes the expression to be interpreted as a literal string and not\n"
|
||||
" as a regular expression\n"
|
||||
"-w searches for matches that are whole words only\n"
|
||||
"-z verbose mode\n"
|
||||
"\n"
|
||||
"expression: a regular expression, or a literal string if -r- is specified\n"
|
||||
"\n"
|
||||
"files: one or more files to search, the names can contain the wildcard\n"
|
||||
" characters ? and *\n" << endl;
|
||||
|
||||
}
|
||||
|
||||
void parse_switch(const char* flag)
|
||||
{
|
||||
++flag;
|
||||
while(*flag)
|
||||
{
|
||||
switch(*flag)
|
||||
{
|
||||
case '-':
|
||||
switch(*(flag-1))
|
||||
{
|
||||
case 'c':
|
||||
count_only = false;
|
||||
break;
|
||||
case 'd':
|
||||
recurse = false;
|
||||
break;
|
||||
case 'i':
|
||||
use_case = false;
|
||||
break;
|
||||
case 'l':
|
||||
files_only = false;
|
||||
break;
|
||||
case 'n':
|
||||
show_lines = false;
|
||||
break;
|
||||
case 'r':
|
||||
regularexs = false;
|
||||
break;
|
||||
case 'w':
|
||||
words_only = false;
|
||||
break;
|
||||
case 'z':
|
||||
verbose = false;
|
||||
break;
|
||||
default:
|
||||
cout << "Undefined option -";
|
||||
cout.put(*flag);
|
||||
cout << endl;
|
||||
}
|
||||
// turn off prev character:
|
||||
break;
|
||||
case 'c':
|
||||
count_only = true;
|
||||
break;
|
||||
case 'd':
|
||||
recurse = true;
|
||||
break;
|
||||
case 'i':
|
||||
use_case = false;
|
||||
break;
|
||||
case 'l':
|
||||
files_only = true;
|
||||
break;
|
||||
case 'n':
|
||||
show_lines = true;
|
||||
break;
|
||||
case 'r':
|
||||
regularexs = true;
|
||||
break;
|
||||
case 'w':
|
||||
words_only = true;
|
||||
break;
|
||||
case 'z':
|
||||
verbose = true;
|
||||
break;
|
||||
case '?':
|
||||
usage();
|
||||
exit(0);
|
||||
case '+':
|
||||
break;
|
||||
default:
|
||||
cout << "Undefined option -";
|
||||
cout.put(*flag);
|
||||
cout << endl;
|
||||
}
|
||||
++flag;
|
||||
}
|
||||
}
|
||||
|
||||
void HandleFile(const char* wild)
|
||||
{
|
||||
using namespace boost;
|
||||
jm_trace("Handling file " << wild);
|
||||
file_iterator end;
|
||||
file_iterator start(wild);
|
||||
|
||||
if(recurse)
|
||||
{
|
||||
// go through sub directories:
|
||||
char buf[MAX_PATH];
|
||||
std::strcpy(buf, start.root());
|
||||
int rootlen = strlen(buf);
|
||||
if(*buf == 0)
|
||||
{
|
||||
std::strcpy(buf, ".");
|
||||
std::strcat(buf, directory_iterator::separator());
|
||||
std::strcat(buf, "*");
|
||||
}
|
||||
else
|
||||
{
|
||||
std::strcat(buf, directory_iterator::separator());
|
||||
std::strcat(buf, "*");
|
||||
}
|
||||
jm_trace("Enumerating directories: " << buf);
|
||||
directory_iterator dstart(buf);
|
||||
directory_iterator dend;
|
||||
|
||||
// now get the file mask bit of "wild":
|
||||
const char* ptr = wild + rootlen;
|
||||
if(*ptr) ++ptr;
|
||||
jm_trace("File mask part is: " << ptr);
|
||||
|
||||
while(dstart != dend)
|
||||
{
|
||||
std::sprintf(buf, "%s%s%s", dstart.path(), directory_iterator::separator(), ptr);
|
||||
HandleFile(buf);
|
||||
++dstart;
|
||||
}
|
||||
}
|
||||
std::for_each(start, end, process_grep);
|
||||
}
|
||||
|
||||
int done = 0;
|
||||
|
||||
void HandleArg(const char* arg)
|
||||
{
|
||||
using namespace boost;
|
||||
jm_trace("Handling argument: " << arg);
|
||||
if(*arg == '-')
|
||||
{
|
||||
parse_switch(arg);
|
||||
return;
|
||||
}
|
||||
if(done == 0)
|
||||
{
|
||||
// parse regular expression
|
||||
if(regularexs)
|
||||
{
|
||||
if(words_only == 0)
|
||||
{
|
||||
e.set_expression(arg, use_case ? regbase::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);
|
||||
//ei.set_expression(buf);
|
||||
delete[] buf;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// we need to convert text to literal:
|
||||
int len2 = std::strlen(arg);
|
||||
int len = len2 * 5 + 6;
|
||||
char buf[8];
|
||||
char* buf2 = new char[len];
|
||||
*buf2 = 0;
|
||||
if(words_only)
|
||||
std::strcpy(buf2, "\\<");
|
||||
for(int j = 0; j < len2; ++j)
|
||||
{
|
||||
std::sprintf(buf, "\\0%o", int(arg[j]));
|
||||
std::strcat(buf2, buf);
|
||||
}
|
||||
if(words_only)
|
||||
std::strcat(buf2, "\\>");
|
||||
e.set_expression(buf2, use_case ? regbase::normal : regbase::normal | regbase::icase);
|
||||
//ei.set_expression(buf2);
|
||||
delete[] buf2;
|
||||
}
|
||||
done = 1;
|
||||
return;
|
||||
}
|
||||
// if we get to here we have one or more file names to process:
|
||||
++done;
|
||||
HandleFile(arg);
|
||||
}
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
for(int i = 1; i < argc; ++i)
|
||||
HandleArg(argv[i]);
|
||||
if(done < 2)
|
||||
usage();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
|
||||
# very basic makefile for jgrep
|
||||
#
|
||||
|
||||
CXX=@CXX@
|
||||
CXXFLAGS=@CXXFLAGS@
|
||||
LIBS=@LIBS@
|
||||
EXE=@ac_exe_ext@
|
||||
OBJ=@ac_obj_ext@
|
||||
|
||||
LIBDEP=../../build/libboost_regex.a ../../../../boost/regex/detail/regex_options.hpp ../../../../boost/regex/detail/regex_config.hpp
|
||||
|
||||
jgrep$(EXE) : jgrep$(OBJ) main$(OBJ)
|
||||
$(CXX) -o jgrep$(EXE) jgrep$(OBJ) main$(OBJ) -L../../build -lboost_regex $(LIBS)
|
||||
|
||||
jgrep$(OBJ) : jgrep.cpp jgrep.h $(LIBDEP)
|
||||
$(CXX) -c $(CXXFLAGS) -I../../../../ -I./ jgrep.cpp
|
||||
|
||||
main$(OBJ) : main.cpp jgrep.h $(LIBDEP)
|
||||
$(CXX) -c $(CXXFLAGS) -I../../../../ -I./ main.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
#
|
||||
# very simple makefile for Visual C++ 6 + STLPort 4
|
||||
#
|
||||
|
||||
jgrep.exe: main.cpp jgrep.cpp jgrep.h
|
||||
cl -GX -GR /Oityb1 /GF /Gy -MT -I..\..\..\..\ jgrep.cpp main.cpp /link /LIBPATH:..\..\build\vc6-stlport user32.lib
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
#
|
||||
# very simple makefile for Visual C++ 6
|
||||
#
|
||||
|
||||
jgrep.exe: main.cpp jgrep.cpp jgrep.h
|
||||
cl -GX -GR /Oityb1 /GF /Gy -I..\..\..\..\ jgrep.cpp main.cpp /link /LIBPATH:..\..\build\vc6
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE credit_card_example.cpp
|
||||
* VERSION 3.00
|
||||
* DESCRIPTION: Credit card number formatting code.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
bool validate_card_format(const std::string& s)
|
||||
{
|
||||
static const boost::regex e("(\\d{4}[- ]){3}\\d{4}");
|
||||
return boost::regex_match(s, e);
|
||||
}
|
||||
|
||||
const boost::regex e("\\A(\\d{3,4})[- ]?(\\d{4})[- ]?(\\d{4})[- ]?(\\d{4})\\z");
|
||||
const std::string machine_format("\\1\\2\\3\\4");
|
||||
const std::string human_format("\\1-\\2-\\3-\\4");
|
||||
|
||||
std::string machine_readable_card_number(const std::string& s)
|
||||
{
|
||||
return boost::regex_merge(s, e, machine_format, boost::match_default | boost::format_sed);
|
||||
}
|
||||
|
||||
std::string human_readable_card_number(const std::string& s)
|
||||
{
|
||||
return boost::regex_merge(s, e, human_format, boost::match_default | boost::format_sed);
|
||||
}
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
string s[4] = { "0000111122223333", "0000 1111 2222 3333",
|
||||
"0000-1111-2222-3333", "000-1111-2222-3333", };
|
||||
int i;
|
||||
for(i = 0; i < 4; ++i)
|
||||
{
|
||||
cout << "validate_card_format(\"" << s[i] << "\") returned " << validate_card_format(s[i]) << endl;
|
||||
}
|
||||
for(i = 0; i < 4; ++i)
|
||||
{
|
||||
cout << "machine_readable_card_number(\"" << s[i] << "\") returned " << machine_readable_card_number(s[i]) << endl;
|
||||
}
|
||||
for(i = 0; i < 4; ++i)
|
||||
{
|
||||
cout << "human_readable_card_number(\"" << s[i] << "\") returned " << human_readable_card_number(s[i]) << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
|
||||
#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:
|
||||
memmove(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);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if(argc > 1)
|
||||
{
|
||||
for(unsigned int i = 1; i < argc; ++i)
|
||||
{
|
||||
std::ifstream fs(argv[i]);
|
||||
if(fs.bad()) continue;
|
||||
search(fs);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string one("<META NAME=\"keywords\" CONTENT=\"regex++, regular expressions, regular expression library, C++\">");
|
||||
std::string what;
|
||||
while(what.size() < 10000)
|
||||
{
|
||||
what.append(one);
|
||||
what.append(13, ' ');
|
||||
}
|
||||
std::stringstream ss;
|
||||
ss.str(what);
|
||||
search(ss);
|
||||
}
|
||||
std::cout << "total tag count was " << tags << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#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;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
try{
|
||||
std::string input;
|
||||
std::cin >> input;
|
||||
if(is_possible_card_number(input))
|
||||
{
|
||||
std::cout << "Matched OK..." << std::endl;
|
||||
}
|
||||
else
|
||||
std::cout << "Got a partial match..." << std::endl;
|
||||
}
|
||||
catch(const std::exception& e)
|
||||
{
|
||||
std::cout << e.what() << std::endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_grep_example_1.cpp
|
||||
* VERSION 3.00
|
||||
* DESCRIPTION: regex_grep example 1: searches a cpp file for class definitions.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
// 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
|
||||
|
||||
typedef std::map<std::string, int, std::less<std::string> > map_type;
|
||||
|
||||
boost::regex expression("^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>)?[[:space:]]*(\\{|:[^;\\{()]*\\{)");
|
||||
|
||||
class IndexClassesPred
|
||||
{
|
||||
map_type& m;
|
||||
std::string::const_iterator base;
|
||||
public:
|
||||
IndexClassesPred(map_type& a, std::string::const_iterator b) : m(a), base(b) {}
|
||||
bool operator()(const boost::match_results<std::string::const_iterator, boost::regex::allocator_type>& what)
|
||||
{
|
||||
// what[0] contains the whole string
|
||||
// what[5] contains the class name.
|
||||
// what[6] contains the template specialisation if any.
|
||||
// add class name and position to map:
|
||||
m[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - base;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void IndexClasses(map_type& m, const std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
boost::regex_grep(IndexClassesPred(m, start), start, end, expression);
|
||||
}
|
||||
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
s.reserve(is.rdbuf()->in_avail());
|
||||
char c;
|
||||
while(is.get(c))
|
||||
{
|
||||
if(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * 3);
|
||||
s.append(1, c);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, const char** argv)
|
||||
{
|
||||
std::string text;
|
||||
for(int i = 1; i < argc; ++i)
|
||||
{
|
||||
cout << "Processing file " << argv[i] << endl;
|
||||
map_type m;
|
||||
std::ifstream fs(argv[i]);
|
||||
load_file(text, fs);
|
||||
IndexClasses(m, text);
|
||||
cout << m.size() << " matches found" << endl;
|
||||
map_type::iterator c, d;
|
||||
c = m.begin();
|
||||
d = m.end();
|
||||
while(c != d)
|
||||
{
|
||||
cout << "class \"" << (*c).first << "\" found at index: " << (*c).second << endl;
|
||||
++c;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_grep_example_2.cpp
|
||||
* VERSION 3.00
|
||||
* DESCRIPTION: regex_grep example 2: searches a cpp file for class definitions,
|
||||
* using a global callback function.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
// 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
|
||||
|
||||
typedef std::map<std::string, int, std::less<std::string> > map_type;
|
||||
|
||||
boost::regex expression("^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>)?[[:space:]]*(\\{|:[^;\\{()]*\\{)");
|
||||
map_type class_index;
|
||||
std::string::const_iterator base;
|
||||
|
||||
bool grep_callback(const boost::match_results<std::string::const_iterator, boost::regex::allocator_type>& what)
|
||||
{
|
||||
// what[0] contains the whole string
|
||||
// what[5] contains the class name.
|
||||
// what[6] contains the template specialisation if any.
|
||||
// add class name and position to map:
|
||||
class_index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - base;
|
||||
return true;
|
||||
}
|
||||
|
||||
void IndexClasses(const std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
base = start;
|
||||
boost::regex_grep(grep_callback, start, end, expression);
|
||||
}
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
s.reserve(is.rdbuf()->in_avail());
|
||||
char c;
|
||||
while(is.get(c))
|
||||
{
|
||||
if(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * 3);
|
||||
s.append(1, c);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, const char** argv)
|
||||
{
|
||||
std::string text;
|
||||
for(int i = 1; i < argc; ++i)
|
||||
{
|
||||
cout << "Processing file " << argv[i] << endl;
|
||||
std::ifstream fs(argv[i]);
|
||||
load_file(text, fs);
|
||||
IndexClasses(text);
|
||||
cout << class_index.size() << " matches found" << endl;
|
||||
map_type::iterator c, d;
|
||||
c = class_index.begin();
|
||||
d = class_index.end();
|
||||
while(c != d)
|
||||
{
|
||||
cout << "class \"" << (*c).first << "\" found at index: " << (*c).second << endl;
|
||||
++c;
|
||||
}
|
||||
class_index.erase(class_index.begin(), class_index.end());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_grep_example_3.cpp
|
||||
* VERSION 3.00
|
||||
* DESCRIPTION: regex_grep example 3: searches a cpp file for class definitions,
|
||||
* using a bound member function callback.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
#include <functional>
|
||||
|
||||
// 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
|
||||
|
||||
typedef std::map<std::string, int, std::less<std::string> > map_type;
|
||||
|
||||
class class_index
|
||||
{
|
||||
boost::regex expression;
|
||||
map_type index;
|
||||
std::string::const_iterator base;
|
||||
|
||||
bool grep_callback(boost::match_results<std::string::const_iterator, boost::regex::allocator_type> what);
|
||||
public:
|
||||
map_type& get_map() { return index; }
|
||||
void IndexClasses(const std::string& file);
|
||||
class_index()
|
||||
: index(),
|
||||
expression("^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>)?[[:space:]]*(\\{|:[^;\\{()]*\\{)")
|
||||
{}
|
||||
};
|
||||
|
||||
bool class_index::grep_callback(boost::match_results<std::string::const_iterator, boost::regex::allocator_type> what)
|
||||
{
|
||||
// what[0] contains the whole string
|
||||
// what[5] contains the class name.
|
||||
// what[6] contains the template specialisation if any.
|
||||
// add class name and position to map:
|
||||
index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - base;
|
||||
return true;
|
||||
}
|
||||
|
||||
void class_index::IndexClasses(const std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
base = start;
|
||||
boost::regex_grep(std::bind1st(std::mem_fun(&class_index::grep_callback), this),
|
||||
start,
|
||||
end,
|
||||
expression);
|
||||
}
|
||||
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
s.reserve(is.rdbuf()->in_avail());
|
||||
char c;
|
||||
while(is.get(c))
|
||||
{
|
||||
if(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * 3);
|
||||
s.append(1, c);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, const char** argv)
|
||||
{
|
||||
std::string text;
|
||||
for(int i = 1; i < argc; ++i)
|
||||
{
|
||||
cout << "Processing file " << argv[i] << endl;
|
||||
std::ifstream fs(argv[i]);
|
||||
load_file(text, fs);
|
||||
class_index i;
|
||||
i.IndexClasses(text);
|
||||
cout << i.get_map().size() << " matches found" << endl;
|
||||
map_type::iterator c, d;
|
||||
c = i.get_map().begin();
|
||||
d = i.get_map().end();
|
||||
while(c != d)
|
||||
{
|
||||
cout << "class \"" << (*c).first << "\" found at index: " << (*c).second << endl;
|
||||
++c;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_grep_example_4.cpp
|
||||
* VERSION 3.00
|
||||
* DESCRIPTION: regex_grep example 4: searches a cpp file for class definitions,
|
||||
* using a C++ Builder closure as a callback.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
#include <functional>
|
||||
|
||||
// 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
|
||||
|
||||
typedef std::map<std::string, int, std::less<std::string> > map_type;
|
||||
|
||||
class class_index
|
||||
{
|
||||
boost::regex expression;
|
||||
map_type index;
|
||||
std::string::const_iterator base;
|
||||
typedef boost::match_results<std::string::const_iterator, boost::regex::allocator_type> arg_type;
|
||||
|
||||
bool grep_callback(const boost::match_results<std::string::const_iterator, boost::regex::allocator_type>& what);
|
||||
public:
|
||||
map_type& get_map() { return index; }
|
||||
typedef bool (__closure* grep_callback_type)(const arg_type&);
|
||||
void IndexClasses(const std::string& file);
|
||||
class_index()
|
||||
: index(),
|
||||
expression("^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>)?[[:space:]]*(\\{|:[^;\\{()]*\\{)")
|
||||
{}
|
||||
};
|
||||
|
||||
bool class_index::grep_callback(const boost::match_results<std::string::const_iterator, boost::regex::allocator_type>& what)
|
||||
{
|
||||
// what[0] contains the whole string
|
||||
// what[5] contains the class name.
|
||||
// what[6] contains the template specialisation if any.
|
||||
// add class name and position to map:
|
||||
index[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - base;
|
||||
return true;
|
||||
}
|
||||
|
||||
void class_index::IndexClasses(const std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
base = start;
|
||||
class_index::grep_callback_type cl = &(this->grep_callback);
|
||||
boost::regex_grep(cl,
|
||||
start,
|
||||
end,
|
||||
expression);
|
||||
}
|
||||
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
s.reserve(is.rdbuf()->in_avail());
|
||||
char c;
|
||||
while(is.get(c))
|
||||
{
|
||||
if(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * 3);
|
||||
s.append(1, c);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, const char** argv)
|
||||
{
|
||||
std::string text;
|
||||
for(int i = 1; i < argc; ++i)
|
||||
{
|
||||
cout << "Processing file " << argv[i] << endl;
|
||||
std::ifstream fs(argv[i]);
|
||||
load_file(text, fs);
|
||||
class_index i;
|
||||
i.IndexClasses(text);
|
||||
cout << i.get_map().size() << " matches found" << endl;
|
||||
map_type::iterator c, d;
|
||||
c = i.get_map().begin();
|
||||
d = i.get_map().end();
|
||||
while(c != d)
|
||||
{
|
||||
cout << "class \"" << (*c).first << "\" found at index: " << (*c).second << endl;
|
||||
++c;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_match_example.cpp
|
||||
* VERSION 3.00
|
||||
* DESCRIPTION: ftp based regex_match example.
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
#include <boost/regex.hpp>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
|
||||
regex expression("^([0-9]+)(\\-| |$)(.*)$");
|
||||
|
||||
// process_ftp:
|
||||
// on success returns the ftp response code, and fills
|
||||
// msg with the ftp response message.
|
||||
int process_ftp(const char* response, std::string* msg)
|
||||
{
|
||||
cmatch what;
|
||||
if(regex_match(response, what, expression))
|
||||
{
|
||||
// what[0] contains the whole string
|
||||
// what[1] contains the response code
|
||||
// what[2] contains the separator character
|
||||
// what[3] contains the text message.
|
||||
if(msg)
|
||||
msg->assign(what[3].first, what[3].second);
|
||||
return atoi(what[1].first);
|
||||
}
|
||||
// failure did not match
|
||||
if(msg)
|
||||
msg->erase();
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && (__BORLANDC__ == 0x550))
|
||||
//
|
||||
// problem with std::getline under MSVC6sp3
|
||||
istream& getline(istream& is, std::string& s)
|
||||
{
|
||||
s.erase();
|
||||
char c = is.get();
|
||||
while(c != '\n')
|
||||
{
|
||||
s.append(1, c);
|
||||
c = is.get();
|
||||
}
|
||||
return is;
|
||||
}
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
std::string in, out;
|
||||
while(true)
|
||||
{
|
||||
cout << "enter test string" << endl;
|
||||
getline(cin, in);
|
||||
if(in == "quit")
|
||||
break;
|
||||
int result;
|
||||
result = process_ftp(in.c_str(), &out);
|
||||
if(result != -1)
|
||||
{
|
||||
cout << "Match found:" << endl;
|
||||
cout << "Response code: " << result << endl;
|
||||
cout << "Message text: " << out << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "Match not found" << endl;
|
||||
}
|
||||
cout << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,136 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_merge_example.cpp
|
||||
* VERSION 3.00
|
||||
* DESCRIPTION: regex_merge example:
|
||||
* converts a C++ file to syntax highlighted HTML.
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <iterator>
|
||||
#include <boost/regex.hpp>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
// purpose:
|
||||
// takes the contents of a file and transform to
|
||||
// syntax highlighted code in html format
|
||||
|
||||
boost::regex e1, e2;
|
||||
extern const char* expression_text;
|
||||
extern const char* format_string;
|
||||
extern const char* pre_expression;
|
||||
extern const char* pre_format;
|
||||
extern const char* header_text;
|
||||
extern const char* footer_text;
|
||||
|
||||
void load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
s.reserve(is.rdbuf()->in_avail());
|
||||
char c;
|
||||
while(is.get(c))
|
||||
{
|
||||
if(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * 3);
|
||||
s.append(1, c);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, const char** argv)
|
||||
{
|
||||
try{
|
||||
e1.assign(expression_text);
|
||||
e2.assign(pre_expression);
|
||||
for(int i = 1; i < argc; ++i)
|
||||
{
|
||||
std::cout << "Processing file " << 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(".htm");
|
||||
std::ofstream os(out_name.c_str());
|
||||
os << header_text;
|
||||
// strip '<' and '>' first by outputting to a
|
||||
// temporary string stream
|
||||
std::ostringstream t(std::ios::out | std::ios::binary);
|
||||
std::ostream_iterator<char, char> oi(t);
|
||||
boost::regex_merge(oi, in.begin(), in.end(), e2, pre_format);
|
||||
// then output to final output stream
|
||||
// adding syntax highlighting:
|
||||
std::string s(t.str());
|
||||
std::ostream_iterator<char, char> out(os);
|
||||
boost::regex_merge(out, s.begin(), s.end(), e1, format_string);
|
||||
os << footer_text;
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{ return -1; }
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern const char* pre_expression = "(<)|(>)|\\r";
|
||||
extern const char* pre_format = "(?1<)(?2>)";
|
||||
|
||||
|
||||
const char* expression_text = // preprocessor directives: index 1
|
||||
"(^[[:blank:]]*#(?:[^\\\\\\n]|\\\\[^\\n[:punct:][:word:]]*[\\n[:punct:][:word:]])*)|"
|
||||
// comment: index 2
|
||||
"(//[^\\n]*|/\\*.*?\\*/)|"
|
||||
// literals: index 3
|
||||
"\\<([+-]?(?:(?:0x[[:xdigit:]]+)|(?:(?:[[:digit:]]*\\.)?[[:digit:]]+(?:[eE][+-]?[[:digit:]]+)?))u?(?:(?:int(?:8|16|32|64))|L)?)\\>|"
|
||||
// string literals: index 4
|
||||
"('(?:[^\\\\']|\\\\.)*'|\"(?:[^\\\\\"]|\\\\.)*\")|"
|
||||
// keywords: index 5
|
||||
"\\<(__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)\\>"
|
||||
;
|
||||
|
||||
const char* format_string = "(?1<font color=\"#008040\">$&</font>)"
|
||||
"(?2<I><font color=\"#000080\">$&</font></I>)"
|
||||
"(?3<font color=\"#0000A0\">$&</font>)"
|
||||
"(?4<font color=\"#0000FF\">$&</font>)"
|
||||
"(?5<B>$&</B>)";
|
||||
|
||||
const char* header_text = "<HTML>\n<HEAD>\n"
|
||||
"<TITLE>Auto-generated html formated source</TITLE>\n"
|
||||
"<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=windows-1252\">\n"
|
||||
"</HEAD>\n"
|
||||
"<BODY LINK=\"#0000ff\" VLINK=\"#800080\" BGCOLOR=\"#ffffff\">\n"
|
||||
"<P> </P>\n<PRE>";
|
||||
|
||||
const char* footer_text = "</PRE>\n</BODY>\n\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_search_example.cpp
|
||||
* VERSION 3.00
|
||||
* DESCRIPTION: regex_search example: searches a cpp file for class definitions.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
// 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
|
||||
|
||||
typedef std::map<std::string, int, std::less<std::string> > map_type;
|
||||
|
||||
boost::regex expression("^(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\\<\\w+\\>([[:blank:]]*\\([^)]*\\))?[[:space:]]*)*(\\<\\w*\\>)[[:space:]]*(<[^;:{]+>)?[[:space:]]*(\\{|:[^;\\{()]*\\{)");
|
||||
|
||||
void IndexClasses(map_type& m, const std::string& file)
|
||||
{
|
||||
std::string::const_iterator start, end;
|
||||
start = file.begin();
|
||||
end = file.end();
|
||||
boost::match_results<std::string::const_iterator> what;
|
||||
unsigned int flags = boost::match_default;
|
||||
while(boost::regex_search(start, end, what, expression, flags))
|
||||
{
|
||||
// what[0] contains the whole string
|
||||
// what[5] contains the class name.
|
||||
// what[6] contains the template specialisation if any.
|
||||
// add class name and position to map:
|
||||
m[std::string(what[5].first, what[5].second) + std::string(what[6].first, what[6].second)] =
|
||||
what[5].first - file.begin();
|
||||
// update search position:
|
||||
start = what[0].second;
|
||||
// update flags:
|
||||
flags |= boost::match_prev_avail;
|
||||
flags |= boost::match_not_bob;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
s.reserve(is.rdbuf()->in_avail());
|
||||
char c;
|
||||
while(is.get(c))
|
||||
{
|
||||
if(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * 3);
|
||||
s.append(1, c);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, const char** argv)
|
||||
{
|
||||
std::string text;
|
||||
for(int i = 1; i < argc; ++i)
|
||||
{
|
||||
cout << "Processing file " << argv[i] << endl;
|
||||
map_type m;
|
||||
std::ifstream fs(argv[i]);
|
||||
load_file(text, fs);
|
||||
IndexClasses(m, text);
|
||||
cout << m.size() << " matches found" << endl;
|
||||
map_type::iterator c, d;
|
||||
c = m.begin();
|
||||
d = m.end();
|
||||
while(c != d)
|
||||
{
|
||||
cout << "class \"" << (*c).first << "\" found at index: " << (*c).second << endl;
|
||||
++c;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_split_example_1.cpp
|
||||
* VERSION 3.00
|
||||
* DESCRIPTION: regex_split example: split a string into tokens.
|
||||
*/
|
||||
|
||||
|
||||
#include <list>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
|
||||
unsigned tokenise(std::list<std::string>& l, std::string& s)
|
||||
{
|
||||
return boost::regex_split(std::back_inserter(l), s);
|
||||
}
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
|
||||
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && (__BORLANDC__ == 0x550))
|
||||
//
|
||||
// problem with std::getline under MSVC6sp3
|
||||
istream& getline(istream& is, std::string& s)
|
||||
{
|
||||
s.erase();
|
||||
char c = is.get();
|
||||
while(c != '\n')
|
||||
{
|
||||
s.append(1, c);
|
||||
c = is.get();
|
||||
}
|
||||
return is;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
string s;
|
||||
list<string> l;
|
||||
do{
|
||||
cout << "Enter text to split (or \"quit\" to exit): ";
|
||||
getline(cin, s);
|
||||
if(s == "quit") break;
|
||||
unsigned result = tokenise(l, s);
|
||||
cout << result << " tokens found" << endl;
|
||||
cout << "The remaining text is: \"" << s << "\"" << endl;
|
||||
while(l.size())
|
||||
{
|
||||
s = *(l.begin());
|
||||
l.pop_front();
|
||||
cout << s << endl;
|
||||
}
|
||||
}while(true);
|
||||
return 0;
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_split_example_2.cpp
|
||||
* VERSION 3.00
|
||||
* DESCRIPTION: regex_split example: spit out linked URL's.
|
||||
*/
|
||||
|
||||
|
||||
#include <list>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
boost::regex e("<\\s*A\\s+[^>]*href\\s*=\\s*\"([^\"]*)\"",
|
||||
boost::regbase::normal | boost::regbase::icase);
|
||||
|
||||
void load_file(std::string& s, std::istream& is)
|
||||
{
|
||||
s.erase();
|
||||
//
|
||||
// attempt to grow string buffer to match file size,
|
||||
// this doesn't always work...
|
||||
s.reserve(is.rdbuf()->in_avail());
|
||||
char c;
|
||||
while(is.get(c))
|
||||
{
|
||||
// use logarithmic growth stategy, in case
|
||||
// in_avail (above) returned zero:
|
||||
if(s.capacity() == s.size())
|
||||
s.reserve(s.capacity() * 3);
|
||||
s.append(1, c);
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::string s;
|
||||
std::list<std::string> l;
|
||||
int i;
|
||||
for(i = 1; i < argc; ++i)
|
||||
{
|
||||
std::cout << "Findings URL's in " << argv[i] << ":" << std::endl;
|
||||
s.erase();
|
||||
std::ifstream is(argv[i]);
|
||||
load_file(s, is);
|
||||
boost::regex_split(std::back_inserter(l), s, e);
|
||||
while(l.size())
|
||||
{
|
||||
s = *(l.begin());
|
||||
l.pop_front();
|
||||
std::cout << s << std::endl;
|
||||
}
|
||||
}
|
||||
//
|
||||
// alternative method:
|
||||
// split one match at a time and output direct to
|
||||
// cout via ostream_iterator<std::string>....
|
||||
//
|
||||
for(i = 1; i < argc; ++i)
|
||||
{
|
||||
std::cout << "Findings URL's in " << argv[i] << ":" << std::endl;
|
||||
s.erase();
|
||||
std::ifstream is(argv[i]);
|
||||
load_file(s, is);
|
||||
while(boost::regex_split(std::ostream_iterator<std::string>(std::cout), s, e, boost::match_default, 1)) std::cout << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
|
||||
# very basic makefile for timer.exe
|
||||
#
|
||||
# Borland C++ tools
|
||||
#
|
||||
# BCROOT defines the root directory of your bc builder install
|
||||
#
|
||||
|
||||
!ifndef BCROOT
|
||||
BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
BCC32 = $(BCROOT)\bin\Bcc32.exe
|
||||
|
||||
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
|
||||
COMPOPTS= -O2 -tWC -tWM- -D_NO_VCL; -I../../../../; -L..\..\build\bcb5
|
||||
|
||||
|
||||
timer.exe : regex_timer.cpp
|
||||
$(BCC32) @&&|
|
||||
$(COMPOPTS) -e$@ regex_timer.cpp
|
||||
|
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
|
||||
# very basic makefile for timer.exe
|
||||
#
|
||||
# Borland C++ tools
|
||||
#
|
||||
# BCROOT defines the root directory of your bc builder install
|
||||
#
|
||||
|
||||
!ifndef BCROOT
|
||||
BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
BCC32 = $(BCROOT)\bin\Bcc32.exe
|
||||
|
||||
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
|
||||
COMPOPTS= -O2 -tWC -tWM- -D_NO_VCL; -I../../../../; -L..\..\build\bcb4
|
||||
|
||||
|
||||
timer.exe : regex_timer.cpp
|
||||
$(BCC32) @&&|
|
||||
$(COMPOPTS) -e$@ regex_timer.cpp
|
||||
|
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
|
||||
# very basic makefile for timer.exe
|
||||
#
|
||||
# Borland C++ tools
|
||||
#
|
||||
# BCROOT defines the root directory of your bc builder install
|
||||
#
|
||||
|
||||
!ifndef BCROOT
|
||||
BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
BCC32 = $(BCROOT)\bin\Bcc32.exe
|
||||
|
||||
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
|
||||
COMPOPTS= -O2 -tWC -tWM- -D_NO_VCL; -I../../../../; -L..\..\build\bcb5
|
||||
|
||||
|
||||
timer.exe : regex_timer.cpp
|
||||
$(BCC32) @&&|
|
||||
$(COMPOPTS) -e$@ regex_timer.cpp
|
||||
|
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
|
||||
# very basic makefile for timer.exe
|
||||
#
|
||||
# GNU compiler GCC
|
||||
#
|
||||
CXX= $(INCLUDES) -I../../../../ -I./ $(CXXFLAGS)
|
||||
|
||||
timer : regex_timer.cpp
|
||||
g++ $(CXX) -O2 -o timer regex_timer.cpp -L../../build/gcc $(LDFLAGS) -lboost_regex $(LIBS)
|
||||
|
||||
debug : regex_timer.cpp timer.cpp
|
||||
g++ $(CXX) -g -o timer regex_timer.cpp -L../../build/gcc $(LDFLAGS) -lboost_regex_debug $(LIBS)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
|
||||
# very basic makefile for timer
|
||||
#
|
||||
CXX=@CXX@
|
||||
CXXFLAGS=@CXXFLAGS@
|
||||
LIBS=@LIBS@
|
||||
EXE=@ac_exe_ext@
|
||||
OBJ=@ac_obj_ext@
|
||||
|
||||
LIBDEP=../../build/libboost_regex.a ../../../../boost/regex/detail/regex_options.hpp ../../../../boost/regex/detail/regex_config.hpp
|
||||
|
||||
regex_timer$(EXE) : regex_timer$(OBJ)
|
||||
$(CXX) -o timer$(EXE) regex_timer$(OBJ) -L../../build -lboost_regex $(LIBS)
|
||||
|
||||
regex_timer$(OBJ) : regex_timer.cpp $(LIBDEP)
|
||||
$(CXX) -c $(CXXFLAGS) -DSTRICT -I../../../../ -I./ regex_timer.cpp
|
||||
|
||||
timer$(OBJ) : ../../../timer/timer.cpp $(LIBDEP)
|
||||
$(CXX) -c $(CXXFLAGS) -DSTRICT -I../../../../ -I./ ../../../timer/timer.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,322 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef BOOST_RE_OLD_IOSTREAM
|
||||
#include <iostream.h>
|
||||
#else
|
||||
#include <iostream>
|
||||
using std::cout;
|
||||
using std::cin;
|
||||
using std::cerr;
|
||||
using std::istream;
|
||||
using std::ostream;
|
||||
using std::endl;
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <deque>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/timer.hpp>
|
||||
#include <boost/smart_ptr.hpp>
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
// no Koenig lookup, use using declaration instead:
|
||||
using namespace boost;
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
ostream& operator << (ostream& os, const std::wstring& s)
|
||||
{
|
||||
std::wstring::const_iterator i, j;
|
||||
i = s.begin();
|
||||
j = s.end();
|
||||
while(i != j)
|
||||
{
|
||||
os.put(*i);
|
||||
++i;
|
||||
}
|
||||
return os;
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class S>
|
||||
class string_out_iterator
|
||||
{
|
||||
S* out;
|
||||
public:
|
||||
string_out_iterator(S& s) : out(&s) {}
|
||||
string_out_iterator& operator++() { return *this; }
|
||||
string_out_iterator& operator++(int) { return *this; }
|
||||
string_out_iterator& operator*() { return *this; }
|
||||
string_out_iterator& operator=(typename S::value_type v)
|
||||
{
|
||||
out->append(1, v);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && (__BORLANDC__ == 0x550)) || defined(__SGI_STL_PORT)
|
||||
//
|
||||
// problem with std::getline under MSVC6sp3
|
||||
// and C++ Builder 5.5, is this really that hard?
|
||||
istream& getline(istream& is, std::string& s)
|
||||
{
|
||||
s.erase();
|
||||
char c = is.get();
|
||||
while(c != '\n')
|
||||
{
|
||||
s.append(1, c);
|
||||
c = is.get();
|
||||
}
|
||||
return is;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
boost::regex ex;
|
||||
boost::match_results<std::string::const_iterator> sm;
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
std::wstring ws1, ws2;
|
||||
boost::wregex wex;
|
||||
boost::match_results<std::wstring::const_iterator> wsm;
|
||||
#endif
|
||||
boost::match_results<std::deque<char>::iterator> dm;
|
||||
std::string s1, s2, ts;
|
||||
std::deque<char> ds;
|
||||
boost::regex_t r;
|
||||
boost::scoped_array<boost::regmatch_t> matches;
|
||||
std::size_t nsubs;
|
||||
boost::timer t;
|
||||
double tim;
|
||||
bool result;
|
||||
int iters = 100;
|
||||
|
||||
while(true)
|
||||
{
|
||||
cout << "Enter expression (or \"quit\" to exit): ";
|
||||
getline(cin, s1);
|
||||
if(s1 == "quit")
|
||||
break;
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
ws1.erase();
|
||||
std::copy(s1.begin(), s1.end(), string_out_iterator<std::wstring>(ws1));
|
||||
#endif
|
||||
try{
|
||||
ex.assign(s1);
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
wex.assign(ws1);
|
||||
#endif
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
cout << "Error in expression: \"" << e.what() << "\"" << endl;
|
||||
continue;
|
||||
}
|
||||
int code = regcomp(&r, s1.c_str(), boost::REG_PERL);
|
||||
if(code != 0)
|
||||
{
|
||||
char buf[256];
|
||||
regerror(code, &r, buf, 256);
|
||||
cout << "regcomp error: \"" << buf << "\"" << endl;
|
||||
continue;
|
||||
}
|
||||
nsubs = r.re_nsub + 1;
|
||||
matches.reset(new boost::regmatch_t[nsubs]);
|
||||
|
||||
while(true)
|
||||
{
|
||||
cout << "Enter string to search (or \"quit\" to exit): ";
|
||||
getline(cin, s2);
|
||||
if(s2 == "quit")
|
||||
break;
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
ws2.erase();
|
||||
std::copy(s2.begin(), s2.end(), string_out_iterator<std::wstring>(ws2));
|
||||
#endif
|
||||
ds.erase(ds.begin(), ds.end());
|
||||
std::copy(s2.begin(), s2.end(), std::back_inserter(ds));
|
||||
|
||||
int i;
|
||||
iters = 10;
|
||||
tim = 1.1;
|
||||
|
||||
#if defined(_WIN32) && defined(BOOST_RE_LOCALE_W32)
|
||||
MSG msg;
|
||||
PeekMessage(&msg, 0, 0, 0, 0);
|
||||
Sleep(0);
|
||||
#endif
|
||||
|
||||
// cache load:
|
||||
regex_search(s2, sm, ex);
|
||||
|
||||
// measure time interval for reg_expression<char>
|
||||
do{
|
||||
iters *= (tim > 0.001) ? (1.1/tim) : 100;
|
||||
t.restart();
|
||||
for(i =0; i < iters; ++i)
|
||||
{
|
||||
result = regex_search(s2, sm, ex);
|
||||
}
|
||||
tim = t.elapsed();
|
||||
}while((tim < t.elapsed_min() * 1000) || (tim < 1));
|
||||
|
||||
cout << "regex time: " << (tim * 1000000 / iters) << "us" << endl;
|
||||
if(result)
|
||||
{
|
||||
for(i = 0; i < sm.size(); ++i)
|
||||
{
|
||||
ts = sm[i];
|
||||
cout << "\tmatch " << i << ": \"";
|
||||
cout << ts;
|
||||
cout << "\" (matched=" << sm[i].matched << ")" << endl;
|
||||
}
|
||||
cout << "\tmatch $`: \"";
|
||||
cout << std::string(sm[-1]);
|
||||
cout << "\" (matched=" << sm[-1].matched << ")" << endl;
|
||||
cout << "\tmatch $': \"";
|
||||
cout << std::string(sm[-2]);
|
||||
cout << "\" (matched=" << sm[-2].matched << ")" << endl << endl;
|
||||
}
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
// measure time interval for boost::wregex
|
||||
iters = 10;
|
||||
tim = 1.1;
|
||||
// cache load:
|
||||
regex_search(ws2, wsm, wex);
|
||||
do{
|
||||
iters *= (tim > 0.001) ? (1.1/tim) : 100;
|
||||
t.restart();
|
||||
for(i = 0; i < iters; ++i)
|
||||
{
|
||||
result = regex_search(ws2, wsm, wex);
|
||||
}
|
||||
tim = t.elapsed();
|
||||
}while((tim < t.elapsed_min() * 1000) || (tim < 1));
|
||||
cout << "wregex time: " << (tim * 1000000 / iters) << "us" << endl;
|
||||
if(result)
|
||||
{
|
||||
std::wstring tw;
|
||||
for(i = 0; i < wsm.size(); ++i)
|
||||
{
|
||||
tw.erase();
|
||||
std::copy(wsm[i].first, wsm[i].second, string_out_iterator<std::wstring>(tw));
|
||||
cout << "\tmatch " << i << ": \"" << tw;
|
||||
cout << "\" (matched=" << sm[i].matched << ")" << endl;
|
||||
}
|
||||
cout << "\tmatch $`: \"";
|
||||
tw.erase();
|
||||
std::copy(wsm[-1].first, wsm[-1].second, string_out_iterator<std::wstring>(tw));
|
||||
cout << tw;
|
||||
cout << "\" (matched=" << sm[-1].matched << ")" << endl;
|
||||
cout << "\tmatch $': \"";
|
||||
tw.erase();
|
||||
std::copy(wsm[-2].first, wsm[-2].second, string_out_iterator<std::wstring>(tw));
|
||||
cout << tw;
|
||||
cout << "\" (matched=" << sm[-2].matched << ")" << endl << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
// measure time interval for reg_expression<char> using a deque
|
||||
iters = 10;
|
||||
tim = 1.1;
|
||||
// cache load:
|
||||
regex_search(ds.begin(), ds.end(), dm, ex);
|
||||
do{
|
||||
iters *= (tim > 0.001) ? (1.1/tim) : 100;
|
||||
t.restart();
|
||||
for(i = 0; i < iters; ++i)
|
||||
{
|
||||
result = regex_search(ds.begin(), ds.end(), dm, ex);
|
||||
}
|
||||
tim = t.elapsed();
|
||||
}while((tim < t.elapsed_min() * 1000) || (tim < 1));
|
||||
cout << "regex time (search over std::deque<char>): " << (tim * 1000000 / iters) << "us" << endl;
|
||||
|
||||
if(result)
|
||||
{
|
||||
for(i = 0; i < dm.size(); ++i)
|
||||
{
|
||||
ts.erase();
|
||||
std::copy(dm[i].first, dm[i].second, string_out_iterator<std::string>(ts));
|
||||
cout << "\tmatch " << i << ": \"" << ts;
|
||||
cout << "\" (matched=" << sm[i].matched << ")" << endl;
|
||||
}
|
||||
cout << "\tmatch $`: \"";
|
||||
ts.erase();
|
||||
std::copy(dm[-1].first, dm[-1].second, string_out_iterator<std::string>(ts));
|
||||
cout << ts;
|
||||
cout << "\" (matched=" << sm[-1].matched << ")" << endl;
|
||||
cout << "\tmatch $': \"";
|
||||
ts.erase();
|
||||
std::copy(dm[-2].first, dm[-2].second, string_out_iterator<std::string>(ts));
|
||||
cout << ts;
|
||||
cout << "\" (matched=" << sm[-2].matched << ")" << endl << endl;
|
||||
}
|
||||
|
||||
// measure time interval for POSIX matcher:
|
||||
iters = 10;
|
||||
tim = 1.1;
|
||||
// cache load:
|
||||
regexec(&r, s2.c_str(), nsubs, matches.get(), 0);
|
||||
do{
|
||||
iters *= (tim > 0.001) ? (1.1/tim) : 100;
|
||||
t.restart();
|
||||
for(i = 0; i < iters; ++i)
|
||||
{
|
||||
result = regexec(&r, s2.c_str(), nsubs, matches.get(), 0);
|
||||
}
|
||||
tim = t.elapsed();
|
||||
}while((tim < t.elapsed_min() * 1000) || (tim < 1));
|
||||
cout << "POSIX regexec time: " << (tim * 1000000 / iters) << "us" << endl;
|
||||
|
||||
if(result == 0)
|
||||
{
|
||||
for(i = 0; i < nsubs; ++i)
|
||||
{
|
||||
if(matches[i].rm_so >= 0)
|
||||
{
|
||||
ts.assign(s2.begin() + matches[i].rm_so, s2.begin() + matches[i].rm_eo);
|
||||
cout << "\tmatch " << i << ": \"" << ts << "\" (matched=" << (matches[i].rm_so != -1) << ")"<< endl;
|
||||
}
|
||||
else
|
||||
cout << "\tmatch " << i << ": \"\" (matched=" << (matches[i].rm_so != -1) << ")" << endl; // no match
|
||||
}
|
||||
cout << "\tmatch $`: \"";
|
||||
ts.erase();
|
||||
ts.assign(s2.begin(), s2.begin() + matches[0].rm_so);
|
||||
cout << ts;
|
||||
cout << "\" (matched=" << (matches[0].rm_so != 0) << ")" << endl;
|
||||
cout << "\tmatch $': \"";
|
||||
ts.erase();
|
||||
ts.assign(s2.begin() + matches[0].rm_eo, s2.end());
|
||||
cout << ts;
|
||||
cout << "\" (matched=" << (matches[0].rm_eo != s2.size()) << ")" << endl << endl;
|
||||
}
|
||||
}
|
||||
regfree(&r);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#
|
||||
# very basic VC6 makefile for timer
|
||||
#
|
||||
CXX=cl
|
||||
CXXFLAGS=/Oityb1 /GF /Gy -MT -GX -DSTRICT -I../../../../ -I./
|
||||
LIBS=/link /LIBPATH:..\..\build\vc6-stlport kernel32.lib user32.lib
|
||||
EXE=.exe
|
||||
OBJ=.obj
|
||||
|
||||
LIBDEP= ../../../../boost/regex/detail/regex_options.hpp ../../../../boost/regex/detail/regex_config.hpp
|
||||
|
||||
regex_timer$(EXE) : regex_timer$(OBJ)
|
||||
$(CXX) -o timer$(EXE) regex_timer$(OBJ) $(LIBS)
|
||||
|
||||
regex_timer$(OBJ) : regex_timer.cpp $(LIBDEP)
|
||||
$(CXX) -c $(CXXFLAGS) regex_timer.cpp
|
||||
|
||||
timer$(OBJ) : ../../../timer/timer.cpp $(LIBDEP)
|
||||
$(CXX) -c $(CXXFLAGS) ../../../timer/timer.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#
|
||||
# very basic VC6 makefile for timer
|
||||
#
|
||||
CXX=cl
|
||||
CXXFLAGS=/Oityb1 /GF /Gy -GX -DSTRICT -I../../../../ -I./
|
||||
LIBS=/link /LIBPATH:..\..\build\vc6
|
||||
EXE=.exe
|
||||
OBJ=.obj
|
||||
|
||||
LIBDEP= ../../../../boost/regex/detail/regex_options.hpp ../../../../boost/regex/detail/regex_config.hpp
|
||||
|
||||
regex_timer$(EXE) : regex_timer$(OBJ)
|
||||
$(CXX) -o timer$(EXE) regex_timer$(OBJ) $(LIBS)
|
||||
|
||||
regex_timer$(OBJ) : regex_timer.cpp $(LIBDEP)
|
||||
$(CXX) -c $(CXXFLAGS) regex_timer.cpp
|
||||
|
||||
timer$(OBJ) : ../../../timer/timer.cpp $(LIBDEP)
|
||||
$(CXX) -c $(CXXFLAGS) ../../../timer/timer.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
|
||||
<META NAME="Generator" CONTENT="Microsoft Word 97">
|
||||
<TITLE>Regex++ - FAQ</TITLE>
|
||||
<META NAME="Template" CONTENT="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
|
||||
</HEAD>
|
||||
<BODY LINK="#0000ff" VLINK="#800080" BGCOLOR="#ffffff">
|
||||
|
||||
<P><!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en"> </P>
|
||||
<TABLE CELLSPACING=0 BORDER=0 CELLPADDING=7 WIDTH=624>
|
||||
<TR><TD WIDTH="50%" VALIGN="TOP">
|
||||
<H3><IMG SRC="../../c++boost.gif" WIDTH=276 HEIGHT=86 ALT="C++ Boost"></H3></TD>
|
||||
<TD WIDTH="50%" VALIGN="TOP">
|
||||
<H3 ALIGN="CENTER">Regex++, FAQ.</H3>
|
||||
<I><P ALIGN="CENTER">(version 3.12, 18 April 2000)</I> </P>
|
||||
<I><PRE>Copyright (c) 1998-2000
|
||||
Dr John Maddock
|
||||
|
||||
Permission to use, copy, modify, distribute and sell this software
|
||||
and its documentation for any purpose is hereby granted without fee,
|
||||
provided that the above copyright notice appear in all copies and
|
||||
that both that copyright notice and this permission notice appear
|
||||
in supporting documentation. Dr John Maddock makes no representations
|
||||
about the suitability of this software for any purpose.
|
||||
It is provided "as is" without express or implied warranty.</PRE></I></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<FONT COLOR="#ff0000"><P>Q. Why does using parenthesis in a regular expression change the result of a match?</P>
|
||||
</FONT><P>Parentheses don't only mark; they determine what the best match is as well. regex++ tries to follow 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>
|
||||
<FONT COLOR="#ff0000"><P>Q. Configure says that my compiler is unable to merge template instances, what does this mean?</FONT> </P>
|
||||
<P>A. When you compile template code, you can end up with the same template instances in multiple translation units - this will lead to link time errors unless your compiler/linker is smart enough to merge these template instances into a single record in the executable file. If you see this warning after running configure, then you can still link to libregex++.a if: </P>
|
||||
<OL>
|
||||
|
||||
<LI>You use only the low-level template classes (reg_expression<> match_results<> etc), from a single translation unit, and use no other part of regex++.</LI>
|
||||
<LI>You use only the POSIX API functions (regcomp regexec etc), and no other part of regex++.</LI>
|
||||
<LI>You use only the high level class RegEx, and no other part of regex++. </LI></OL>
|
||||
|
||||
<P>Another option is to create a master include file, which #include's all the regex++ source files, and all the source files in which you use regex++. You then compile and link this master file as a single translation unit. </P>
|
||||
<FONT COLOR="#ff0000"><P>Q. Configure says that my compiler is unable to merge template instances from archive files, what does this mean?</FONT> </P>
|
||||
<P>A. When you compile template code, you can end up with the same template instances in multiple translation units - this will lead to link time errors unless your compiler/linker is smart enough to merge these template instances into a single record in the executable file. Some compilers are able to do this for normal .cpp or .o files, but fail if the object file has been placed in a library archive. If you see this warning after running configure, then you can still link to libregex++.a if: </P>
|
||||
<OL>
|
||||
|
||||
<LI>You use only the low-level template classes (reg_expression<> match_results<> etc), and use no other part of regex++.</LI>
|
||||
<LI>You use only the POSIX API functions (regcomp regexec etc), and no other part of regex++.</LI>
|
||||
<LI>You use only the high level class RegEx, and no other part of regex++. </LI></OL>
|
||||
|
||||
<P>Another option is to add the regex++ source files directly to your project instead of linking to libregex++.a, generally you should do this only if you are getting link time errors with libregex++.a. </P>
|
||||
<FONT COLOR="#ff0000"><P>Q. Configure says that my compiler can't merge templates containing switch statements, what does this mean?</FONT> </P>
|
||||
<P>A. Some compilers can't merge templates that contain static data - this includes switch statements which implicitly generate static data as well as code. Principally this affects the egcs compiler - but note gcc 2.81 also suffers from this problem - the compiler will compile and link the code - but the code will not run because the code and the static data it uses have become separated. The default behaviour of regex++ is to try and fix this problem by declaring "problem" templates inside unnamed namespaces, so that the templates have internal linkage. Note that this can result in a great deal of code bloat. If the compiler doesn't support namespaces, or if code bloat becomes a problem, then follow the guidelines above for placing all the templates used in a single translation unit, and edit jm_opt.h so that BOOST_RE_NO_TEMPLATE_SWITCH_MERGE is no longer defined. </P>
|
||||
<FONT COLOR="#ff0000"><P>Q. I can't get regex++ to work with escape characters, what's going on?</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. </P>
|
||||
<FONT COLOR="#ff0000"><P>Q. Why don't character ranges work properly?</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 regex++ is to turn locale sensitive collation off by setting the regbase::nocollate compile time flag (this is set by regbase::normal). However if you set a non-default compile time flag - for example regbase::extended or regbase::basic, then locale dependent collation will be enabled, this also applies to the POSIX API functions which use either regbase::extended or regbase::basic internally, in the latter case use REG_NOCOLLATE in combination with either REG_BASIC or REG_EXTENDED when invoking regcomp if you don't want locale sensitive collation. <I>[Note - when regbase::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>
|
||||
<FONT COLOR="#ff0000"><P> Q. Why can't I use the "convenience" versions of query_match/reg_search/reg_grep/reg_format/reg_merge?</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. </P>
|
||||
<FONT COLOR="#ff0000"><P>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 reg_expression when compiling a regular expression; boost::bad_pattern can be thrown by the class sub_match's conversion operators; finally std::bad_alloc can be thrown by just about any of the functions in this library. </P>
|
||||
<P><HR></P>
|
||||
<I><P>Copyright </I><A HREF="mailto:John_Maddock@compuserve.com"><I>Dr John Maddock</I></A><I> 1998-2000 all rights reserved.</I> </P></BODY>
|
||||
</HTML>
|
||||
@@ -1,202 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
|
||||
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
|
||||
<META NAME="Template"
|
||||
CONTENT="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
|
||||
<META NAME="GENERATOR" CONTENT="Mozilla/4.5 [en] (Win98; I) [Netscape]">
|
||||
<TITLE>Regex++, Format String Reference</TITLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#800080">
|
||||
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="7" WIDTH="100%">
|
||||
<TR>
|
||||
<TD VALIGN="TOP" WIDTH="50%"> <H3>
|
||||
<IMG SRC="../../c++boost.gif" HEIGHT="86" WIDTH="276" ALT="C++ Boost"></H3>
|
||||
</TD>
|
||||
<TD VALIGN="TOP" WIDTH="50%"> <CENTER>
|
||||
<H3> Regex++, Format String Reference.</H3>
|
||||
</CENTER>
|
||||
<CENTER>
|
||||
<I>(version 3.12, 18 April 2000)</I>
|
||||
</CENTER>
|
||||
<PRE><I>Copyright (c) 1998-2000
|
||||
Dr John Maddock
|
||||
|
||||
Permission to use, copy, modify, distribute and sell this software
|
||||
and its documentation for any purpose is hereby granted without fee,
|
||||
provided that the above copyright notice appear in all copies and
|
||||
that both that copyright notice and this permission notice appear
|
||||
in supporting documentation. Dr John Maddock makes no representations
|
||||
about the suitability of this software for any purpose.
|
||||
It is provided "as is" without express or implied warranty.</I></PRE>
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<HR>
|
||||
<H3> <A NAME="format_string"></A>Format String Syntax</H3>
|
||||
Format strings are used by the algorithms
|
||||
<A HREF="template_class_ref.htm#reg_format">regex_format</A> and
|
||||
<A HREF="template_class_ref.htm#reg_merge">regex_merge</A>, and are used to
|
||||
transform one string into another. <P>There are three kind of format string:
|
||||
sed, perl and extended, the extended syntax is the default 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>
|
||||
</P>
|
||||
<P><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>
|
||||
</P>
|
||||
<P><I>Sub-expression expansions:</I> </P>
|
||||
<P>The following perl like expressions expand to a particular matched
|
||||
sub-expression: <BR>
|
||||
</P>
|
||||
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="7" WIDTH="100%">
|
||||
<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>
|
||||
<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>
|
||||
</P>
|
||||
<P><I>Escape sequences:</I> </P>
|
||||
<P>The following escape sequences are also allowed: <BR>
|
||||
</P>
|
||||
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="7" WIDTH="100%">
|
||||
<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>
|
||||
<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. <BR>
|
||||
</P>
|
||||
<HR>
|
||||
<P><I>Copyright <A HREF="mailto:John_Maddock@compuserve.com">Dr John
|
||||
Maddock</A> 1998-2000 all rights reserved.</I> </P>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
-562
@@ -1,562 +0,0 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type"
|
||||
content="text/html; charset=iso-8859-1">
|
||||
<meta name="Template"
|
||||
content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
|
||||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||||
<title>Regex++, RegEx Class Reference</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" link="#0000FF" vlink="#800080">
|
||||
|
||||
<p> </p>
|
||||
|
||||
<table border="0" cellpadding="7" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td valign="top" width="50%"><h3><img
|
||||
src="../../c++boost.gif" alt="C++ Boost" width="276"
|
||||
height="86"></h3>
|
||||
</td>
|
||||
<td valign="top" width="50%"><h3 align="center">Regex++,
|
||||
RegEx Class Reference. </h3>
|
||||
<p><i>(version 3.12, 18 April 2000)</i> </p>
|
||||
<pre><i>Copyright (c) 1998-2000
|
||||
Dr John Maddock
|
||||
|
||||
Permission to use, copy, modify, distribute and sell this software
|
||||
and its documentation for any purpose is hereby granted without fee,
|
||||
provided that the above copyright notice appear in all copies and
|
||||
that both that copyright notice and this permission notice appear
|
||||
in supporting documentation. Dr John Maddock makes no representations
|
||||
about the suitability of this software for any purpose.
|
||||
It is provided "as is" without express or implied warranty.</i></pre>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3><a name="RegEx"></a><i>Class RegEx</i></h3>
|
||||
|
||||
<p>#include <boost/cregex.hpp> </p>
|
||||
|
||||
<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 standard
|
||||
POSIX extended syntax, but with locale specific collation
|
||||
disabled, and escape characters inside character set declarations
|
||||
are allowed. </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>;
|
||||
<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> ;
|
||||
}; </pre>
|
||||
|
||||
<p>Member functions for class RegEx are defined as follows: <br>
|
||||
</p>
|
||||
|
||||
<table border="0" cellpadding="7" cellspacing="0" width="100%">
|
||||
<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="template_class_ref.htm#match_type">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="template_class_ref.htm#match_type">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="template_class_ref.htm#match_type">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="template_class_ref.htm#match_type">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="template_class_ref.htm#match_type">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="template_class_ref.htm#match_type">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="template_class_ref.htm#match_type">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="template_class_ref.htm#match_type">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="template_class_ref.htm#match_type">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="template_class_ref.htm#match_type">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="template_class_ref.htm#match_type">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="template_class_ref.htm#match_type">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="template_class_ref.htm#match_type">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="template_class_ref.htm#match_type">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_string.htm#format_string">also format string
|
||||
syntax</a>, <a href="template_class_ref.htm#match_type">match
|
||||
flags</a> and <a
|
||||
href="template_class_ref.htm#format_flags">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_string.htm#format_string">also format string
|
||||
syntax</a>, <a href="template_class_ref.htm#match_type">match
|
||||
flags</a> and <a
|
||||
href="template_class_ref.htm#format_flags">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 -1 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 -1 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>
|
||||
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 (unsigned)-1.</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>
|
||||
|
||||
<hr>
|
||||
|
||||
<p><i>Copyright </i><a href="mailto:John_Maddock@compuserve.com"><i>Dr
|
||||
John Maddock</i></a><i> 1998-2000 all rights reserved.</i> </p>
|
||||
</body>
|
||||
</html>
|
||||
+15
-275
@@ -1,22 +1,18 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* LOCATION: see http://www.boost.org/libs/regex for most recent version.
|
||||
* FILE cregex.cpp
|
||||
* VERSION 3.12
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares POSIX API functions
|
||||
* + boost::RegEx high level wrapper.
|
||||
*/
|
||||
@@ -24,273 +20,17 @@
|
||||
#ifndef BOOST_RE_CREGEX_HPP
|
||||
#define BOOST_RE_CREGEX_HPP
|
||||
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
/* include these defs only for POSIX compatablity */
|
||||
#ifdef __cplusplus
|
||||
namespace boost{
|
||||
extern "C" {
|
||||
#endif
|
||||
#include <boost/regex/v4/cregex.hpp>
|
||||
|
||||
#endif /* include guard */
|
||||
|
||||
|
||||
|
||||
|
||||
typedef int regoff_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int re_magic;
|
||||
unsigned int re_nsub; /* number of parenthesized subexpressions */
|
||||
const char* re_endp; /* end pointer for REG_PEND */
|
||||
void* guts; /* none of your business :-) */
|
||||
unsigned int eflags; /* none of your business :-) */
|
||||
} regex_tA;
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
typedef struct
|
||||
{
|
||||
unsigned int re_magic;
|
||||
unsigned int re_nsub; /* number of parenthesized subexpressions */
|
||||
const wchar_t* re_endp; /* end pointer for REG_PEND */
|
||||
void* guts; /* none of your business :-) */
|
||||
unsigned int eflags; /* none of your business :-) */
|
||||
} regex_tW;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
regoff_t rm_so; /* start of match */
|
||||
regoff_t rm_eo; /* end of match */
|
||||
} regmatch_t;
|
||||
|
||||
/* regcomp() flags */
|
||||
typedef enum{
|
||||
REG_BASIC = 0000,
|
||||
REG_EXTENDED = 0001,
|
||||
REG_ICASE = 0002,
|
||||
REG_NOSUB = 0004,
|
||||
REG_NEWLINE = 0010,
|
||||
REG_NOSPEC = 0020,
|
||||
REG_PEND = 0040,
|
||||
REG_DUMP = 0200,
|
||||
REG_NOCOLLATE = 0400,
|
||||
REG_ESCAPE_IN_LISTS = 01000,
|
||||
REG_NEWLINE_ALT = 02000,
|
||||
|
||||
REG_PERL = REG_EXTENDED | REG_NOCOLLATE | REG_ESCAPE_IN_LISTS,
|
||||
REG_AWK = REG_EXTENDED | REG_ESCAPE_IN_LISTS,
|
||||
REG_GREP = REG_BASIC | REG_NEWLINE_ALT,
|
||||
REG_EGREP = REG_EXTENDED | REG_NEWLINE_ALT,
|
||||
|
||||
REG_ASSERT = 15,
|
||||
REG_INVARG = 16,
|
||||
REG_ATOI = 255, /* convert name to number (!) */
|
||||
REG_ITOA = 0400 /* convert number to name (!) */
|
||||
} reg_comp_flags;
|
||||
|
||||
/* regexec() flags */
|
||||
typedef enum{
|
||||
REG_NOTBOL = 00001,
|
||||
REG_NOTEOL = 00002,
|
||||
REG_STARTEND = 00004
|
||||
} reg_exec_flags;
|
||||
|
||||
BOOST_RE_IX_DECL int BOOST_RE_CCALL regcompA(regex_tA*, const char*, int);
|
||||
BOOST_RE_IX_DECL unsigned int BOOST_RE_CCALL regerrorA(int, const regex_tA*, char*, unsigned int);
|
||||
BOOST_RE_IX_DECL int BOOST_RE_CCALL regexecA(const regex_tA*, const char*, unsigned int, regmatch_t*, int);
|
||||
BOOST_RE_IX_DECL void BOOST_RE_CCALL regfreeA(regex_tA*);
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
BOOST_RE_IX_DECL int BOOST_RE_CCALL regcompW(regex_tW*, const wchar_t*, int);
|
||||
BOOST_RE_IX_DECL unsigned int BOOST_RE_CCALL regerrorW(int, const regex_tW*, wchar_t*, unsigned int);
|
||||
BOOST_RE_IX_DECL int BOOST_RE_CCALL regexecW(const regex_tW*, const wchar_t*, unsigned int, regmatch_t*, int);
|
||||
BOOST_RE_IX_DECL void BOOST_RE_CCALL regfreeW(regex_tW*);
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
||||
/* regerror() flags */
|
||||
typedef enum
|
||||
{
|
||||
REG_NOERROR = 0, /* Success. */
|
||||
REG_NOMATCH = 1, /* Didn't find a match (for regexec). */
|
||||
|
||||
/* POSIX regcomp return error codes. (In the order listed in the
|
||||
standard.) */
|
||||
REG_BADPAT = 2, /* Invalid pattern. */
|
||||
REG_ECOLLATE = 3, /* Undefined collating element. */
|
||||
REG_ECTYPE = 4, /* Invalid character class name. */
|
||||
REG_EESCAPE = 5, /* Trailing backslash. */
|
||||
REG_ESUBREG = 6, /* Invalid back reference. */
|
||||
REG_EBRACK = 7, /* Unmatched left bracket. */
|
||||
REG_EPAREN = 8, /* Parenthesis imbalance. */
|
||||
REG_EBRACE = 9, /* Unmatched \{. */
|
||||
REG_BADBR = 10, /* Invalid contents of \{\}. */
|
||||
REG_ERANGE = 11, /* Invalid range end. */
|
||||
REG_ESPACE = 12, /* Ran out of memory. */
|
||||
REG_BADRPT = 13, /* No preceding re for repetition op. */
|
||||
REG_EEND = 14, /* unexpected end of expression */
|
||||
REG_ESIZE = 15, /* expression too big */
|
||||
REG_ERPAREN = 16, /* unmatched right parenthesis */
|
||||
REG_EMPTY = 17, /* empty expression */
|
||||
REG_E_MEMORY = REG_ESIZE, /* out of memory */
|
||||
REG_E_UNKNOWN = 18 /* unknown error */
|
||||
} reg_errcode_t;
|
||||
|
||||
enum match_flags
|
||||
{
|
||||
match_default = 0,
|
||||
match_not_bol = 1, // first is not start of line
|
||||
match_not_eol = match_not_bol << 1, // last is not end of line
|
||||
match_not_bob = match_not_eol << 1, // first is not start of buffer
|
||||
match_not_eob = match_not_bob << 1, // last is not end of buffer
|
||||
match_not_bow = match_not_eob << 1, // first is not start of word
|
||||
match_not_eow = match_not_bow << 1, // last is not end of word
|
||||
match_not_dot_newline = match_not_eow << 1, // \n is not matched by '.'
|
||||
match_not_dot_null = match_not_dot_newline << 1, // '\0' is not matched by '.'
|
||||
match_prev_avail = match_not_dot_null << 1, // *--first is a valid expression
|
||||
match_init = match_prev_avail << 1, // internal use
|
||||
match_any = match_init << 1, // don't care what we match
|
||||
match_not_null = match_any << 1, // string can't be null
|
||||
match_continuous = match_not_null << 1, // each grep match must continue from
|
||||
// uninterupted from the previous one
|
||||
match_partial = match_continuous << 1, // find partial matches
|
||||
|
||||
match_stop = match_partial << 1, // stop after first match (grep)
|
||||
match_all = match_stop << 1, // must find the whole of input even if match_any is set
|
||||
match_max = match_all
|
||||
};
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#if __BORLANDC__ > 0x520
|
||||
#pragma option pop
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// C++ high level wrapper goes here:
|
||||
//
|
||||
#if defined(__cplusplus) && !defined(BOOST_RE_NO_STRING_H)
|
||||
#include <string>
|
||||
#include <vector>
|
||||
namespace boost{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#if __BORLANDC__ == 0x530
|
||||
#pragma option push -a4 -b
|
||||
#elif __BORLANDC__ > 0x530
|
||||
#pragma option push -a8 -b
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class RegEx;
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
class RegExData;
|
||||
struct pred1;
|
||||
struct pred2;
|
||||
struct pred3;
|
||||
struct pred4;
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
#if defined(BOOST_MSVC) || defined(__BORLANDC__)
|
||||
typedef bool (__cdecl *GrepCallback)(const RegEx& expression);
|
||||
typedef bool (__cdecl *GrepFileCallback)(const char* file, const RegEx& expression);
|
||||
typedef bool (__cdecl *FindFilesCallback)(const char* file);
|
||||
#else
|
||||
typedef bool (*GrepCallback)(const RegEx& expression);
|
||||
typedef bool (*GrepFileCallback)(const char* file, const RegEx& expression);
|
||||
typedef bool (*FindFilesCallback)(const char* file);
|
||||
#endif
|
||||
|
||||
class BOOST_RE_IX_DECL RegEx
|
||||
{
|
||||
private:
|
||||
re_detail::RegExData* pdata;
|
||||
public:
|
||||
RegEx();
|
||||
RegEx(const RegEx& o);
|
||||
~RegEx();
|
||||
explicit RegEx(const char* c, bool icase = false);
|
||||
explicit RegEx(const std::string& s, bool icase = false);
|
||||
RegEx& operator=(const RegEx& o);
|
||||
RegEx& operator=(const char* p);
|
||||
RegEx& operator=(const std::string& s){ return this->operator=(s.c_str()); }
|
||||
unsigned int SetExpression(const char* p, bool icase = false);
|
||||
unsigned int SetExpression(const std::string& s, bool icase = false){ return SetExpression(s.c_str(), icase); }
|
||||
std::string Expression()const;
|
||||
//
|
||||
// now matching operators:
|
||||
//
|
||||
bool Match(const char* p, unsigned int flags = match_default);
|
||||
bool Match(const std::string& s, unsigned int flags = match_default) { return Match(s.c_str(), flags); }
|
||||
bool Search(const char* p, unsigned int flags = match_default);
|
||||
bool Search(const std::string& s, unsigned int flags = match_default) { return Search(s.c_str(), flags); }
|
||||
unsigned int Grep(GrepCallback cb, const char* p, unsigned int flags = match_default);
|
||||
unsigned int Grep(GrepCallback cb, const std::string& s, unsigned int flags = match_default) { return Grep(cb, s.c_str(), flags); }
|
||||
unsigned int Grep(std::vector<std::string>& v, const char* p, unsigned int flags = match_default);
|
||||
unsigned int Grep(std::vector<std::string>& v, const std::string& s, unsigned int flags = match_default) { return Grep(v, s.c_str(), flags); }
|
||||
unsigned int Grep(std::vector<unsigned int>& v, const char* p, unsigned int flags = match_default);
|
||||
unsigned int Grep(std::vector<unsigned int>& v, const std::string& s, unsigned int flags = match_default) { return Grep(v, s.c_str(), flags); }
|
||||
unsigned int GrepFiles(GrepFileCallback cb, const char* files, bool recurse = false, unsigned int flags = match_default);
|
||||
unsigned int GrepFiles(GrepFileCallback cb, const std::string& files, bool recurse = false, unsigned int flags = match_default) { return GrepFiles(cb, files.c_str(), recurse, flags); }
|
||||
unsigned int FindFiles(FindFilesCallback cb, const char* files, bool recurse = false, unsigned int flags = match_default);
|
||||
unsigned int FindFiles(FindFilesCallback cb, const std::string& files, bool recurse = false, unsigned int flags = match_default) { return FindFiles(cb, files.c_str(), recurse, flags); }
|
||||
|
||||
std::string Merge(const std::string& in, const std::string& fmt,
|
||||
bool copy = true, unsigned int flags = match_default);
|
||||
std::string Merge(const char* in, const char* fmt,
|
||||
bool copy = true, unsigned int flags = match_default);
|
||||
|
||||
unsigned int Split(std::vector<std::string>& v, std::string& s, unsigned flags = match_default, unsigned max_count = ~0);
|
||||
//
|
||||
// now operators for returning what matched in more detail:
|
||||
//
|
||||
unsigned int Position(int i = 0)const;
|
||||
unsigned int Length(int i = 0)const;
|
||||
unsigned int Line()const;
|
||||
unsigned int Marks()const;
|
||||
std::string What(int i = 0)const;
|
||||
std::string operator[](int i)const { return What(i); }
|
||||
|
||||
friend struct re_detail::pred1;
|
||||
friend struct re_detail::pred2;
|
||||
friend struct re_detail::pred3;
|
||||
friend struct re_detail::pred4;
|
||||
};
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
#endif // include guard
|
||||
|
||||
|
||||
|
||||
|
||||
+13
-15
@@ -3,18 +3,14 @@
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* LOCATION: see http://www.boost.org/libs/regex for documentation.
|
||||
* FILE regex.h
|
||||
* VERSION 3.12
|
||||
* DESCRIPTION: Declares POSIX API functions
|
||||
@@ -25,10 +21,10 @@
|
||||
|
||||
#include <boost/cregex.hpp>
|
||||
|
||||
//
|
||||
// add using declarations to bring POSIX API functions into
|
||||
// global scope, only if this is C++ (and not C).
|
||||
//
|
||||
/*
|
||||
* add using declarations to bring POSIX API functions into
|
||||
* global scope, only if this is C++ (and not C).
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
|
||||
using boost::regoff_t;
|
||||
@@ -65,7 +61,7 @@ using boost::regerrorA;
|
||||
using boost::regexecA;
|
||||
using boost::regfreeA;
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
using boost::regcompW;
|
||||
using boost::regerrorW;
|
||||
using boost::regexecW;
|
||||
@@ -95,8 +91,10 @@ using boost::REG_E_MEMORY;
|
||||
using boost::REG_E_UNKNOWN;
|
||||
using boost::reg_errcode_t;
|
||||
|
||||
#endif // __cplusplus
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* BOOST_RE_REGEX_H */
|
||||
|
||||
|
||||
#endif // BOOST_RE_REGEX_H
|
||||
|
||||
|
||||
|
||||
+11
-1496
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,855 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE concepts.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares regular expression concepts.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_CONCEPTS_HPP_INCLUDED
|
||||
#define BOOST_REGEX_CONCEPTS_HPP_INCLUDED
|
||||
|
||||
#include <boost/concept_archetype.hpp>
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/type_traits/is_enum.hpp>
|
||||
#include <boost/type_traits/is_base_and_derived.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#ifndef BOOST_TEST_TR1_REGEX
|
||||
#include <boost/regex.hpp>
|
||||
#endif
|
||||
#include <bitset>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
namespace boost{
|
||||
|
||||
//
|
||||
// bitmask_archetype:
|
||||
// this can be either an integer type, an enum, or a std::bitset,
|
||||
// we use the latter as the architype as it offers the "strictest"
|
||||
// of the possible interfaces:
|
||||
//
|
||||
typedef std::bitset<512> bitmask_archetype;
|
||||
//
|
||||
// char_architype:
|
||||
// A strict model for the character type interface.
|
||||
//
|
||||
struct char_architype
|
||||
{
|
||||
// default constructable:
|
||||
char_architype();
|
||||
// copy constructable / assignable:
|
||||
char_architype(const char_architype&);
|
||||
char_architype& operator=(const char_architype&);
|
||||
// constructable from an integral value:
|
||||
char_architype(unsigned long val);
|
||||
// comparable:
|
||||
bool operator==(const char_architype&)const;
|
||||
bool operator!=(const char_architype&)const;
|
||||
bool operator<(const char_architype&)const;
|
||||
bool operator<=(const char_architype&)const;
|
||||
bool operator>=(const char_architype&)const;
|
||||
bool operator>(const char_architype&)const;
|
||||
// conversion to integral type:
|
||||
operator long()const;
|
||||
};
|
||||
//
|
||||
// char_architype can not be used with basic_string:
|
||||
//
|
||||
} // namespace boost
|
||||
namespace std{
|
||||
template<> struct char_traits<boost::char_architype>{};
|
||||
}
|
||||
namespace boost{
|
||||
//
|
||||
// regex_traits_architype:
|
||||
// A strict interpretation of the regular expression traits class requirements.
|
||||
//
|
||||
template <class charT>
|
||||
struct regex_traits_architype
|
||||
{
|
||||
public:
|
||||
regex_traits_architype();
|
||||
typedef charT char_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::vector<char_type> string_type;
|
||||
typedef copy_constructible_archetype<assignable_archetype<> > locale_type;
|
||||
typedef bitmask_archetype char_class_type;
|
||||
|
||||
static size_type length(const char_type* ) { return 0; }
|
||||
|
||||
charT translate(charT ) const { return charT(); }
|
||||
charT translate_nocase(charT ) const { return static_object<charT>::get(); }
|
||||
|
||||
template <class ForwardIterator>
|
||||
string_type transform(ForwardIterator , ForwardIterator ) const
|
||||
{ return static_object<string_type>::get(); }
|
||||
template <class ForwardIterator>
|
||||
string_type transform_primary(ForwardIterator , ForwardIterator ) const
|
||||
{ return static_object<string_type>::get(); }
|
||||
|
||||
template <class ForwardIterator>
|
||||
char_class_type lookup_classname(ForwardIterator , ForwardIterator ) const
|
||||
{ return static_object<char_class_type>::get(); }
|
||||
template <class ForwardIterator>
|
||||
string_type lookup_collatename(ForwardIterator , ForwardIterator ) const
|
||||
{ return static_object<string_type>::get(); }
|
||||
|
||||
bool isctype(charT, char_class_type) const
|
||||
{ return false; }
|
||||
int value(charT, int) const
|
||||
{ return 0; }
|
||||
|
||||
locale_type imbue(locale_type l)
|
||||
{ return l; }
|
||||
locale_type getloc()const
|
||||
{ return static_object<locale_type>::get(); }
|
||||
|
||||
private:
|
||||
// this type is not copyable:
|
||||
regex_traits_architype(const regex_traits_architype&);
|
||||
regex_traits_architype& operator=(const regex_traits_architype&);
|
||||
};
|
||||
|
||||
//
|
||||
// alter this to std::tr1, to test a std implementation:
|
||||
//
|
||||
#ifndef BOOST_TEST_TR1_REGEX
|
||||
namespace global_regex_namespace = ::boost;
|
||||
#else
|
||||
namespace global_regex_namespace = ::std::tr1;
|
||||
#endif
|
||||
|
||||
template <class Bitmask>
|
||||
struct BitmaskConcept
|
||||
{
|
||||
void constraints()
|
||||
{
|
||||
function_requires<CopyConstructibleConcept<Bitmask> >();
|
||||
function_requires<AssignableConcept<Bitmask> >();
|
||||
|
||||
m_mask1 = m_mask2 | m_mask3;
|
||||
m_mask1 = m_mask2 & m_mask3;
|
||||
m_mask1 = m_mask2 ^ m_mask3;
|
||||
|
||||
m_mask1 = ~m_mask2;
|
||||
|
||||
m_mask1 |= m_mask2;
|
||||
m_mask1 &= m_mask2;
|
||||
m_mask1 ^= m_mask2;
|
||||
}
|
||||
Bitmask m_mask1, m_mask2, m_mask3;
|
||||
};
|
||||
|
||||
template <class traits>
|
||||
struct RegexTraitsConcept
|
||||
{
|
||||
RegexTraitsConcept();
|
||||
// required typedefs:
|
||||
typedef typename traits::char_type char_type;
|
||||
typedef typename traits::size_type size_type;
|
||||
typedef typename traits::string_type string_type;
|
||||
typedef typename traits::locale_type locale_type;
|
||||
typedef typename traits::char_class_type char_class_type;
|
||||
|
||||
void constraints()
|
||||
{
|
||||
function_requires<UnsignedIntegerConcept<size_type> >();
|
||||
function_requires<RandomAccessContainerConcept<string_type> >();
|
||||
function_requires<DefaultConstructibleConcept<locale_type> >();
|
||||
function_requires<CopyConstructibleConcept<locale_type> >();
|
||||
function_requires<AssignableConcept<locale_type> >();
|
||||
function_requires<BitmaskConcept<char_class_type> >();
|
||||
|
||||
size_type n = traits::length(m_pointer);
|
||||
ignore_unused_variable_warning(n);
|
||||
|
||||
char_type c = m_ctraits.translate(m_char);
|
||||
ignore_unused_variable_warning(c);
|
||||
c = m_ctraits.translate_nocase(m_char);
|
||||
|
||||
//string_type::foobar bar;
|
||||
string_type s1 = m_ctraits.transform(m_pointer, m_pointer);
|
||||
ignore_unused_variable_warning(s1);
|
||||
|
||||
string_type s2 = m_ctraits.transform_primary(m_pointer, m_pointer);
|
||||
ignore_unused_variable_warning(s2);
|
||||
|
||||
char_class_type cc = m_ctraits.lookup_classname(m_pointer, m_pointer);
|
||||
ignore_unused_variable_warning(cc);
|
||||
|
||||
string_type s3 = m_ctraits.lookup_collatename(m_pointer, m_pointer);
|
||||
ignore_unused_variable_warning(s3);
|
||||
|
||||
bool b = m_ctraits.isctype(m_char, cc);
|
||||
ignore_unused_variable_warning(b);
|
||||
|
||||
int v = m_ctraits.value(m_char, 16);
|
||||
ignore_unused_variable_warning(v);
|
||||
|
||||
locale_type l(m_ctraits.getloc());
|
||||
m_traits.imbue(l);
|
||||
ignore_unused_variable_warning(l);
|
||||
}
|
||||
traits m_traits;
|
||||
const traits m_ctraits;
|
||||
const char_type* m_pointer;
|
||||
char_type m_char;
|
||||
};
|
||||
|
||||
//
|
||||
// helper class to compute what traits class a regular expression type is using:
|
||||
//
|
||||
template <class Regex>
|
||||
struct regex_traits_computer;
|
||||
|
||||
template <class charT, class traits>
|
||||
struct regex_traits_computer< global_regex_namespace::basic_regex<charT, traits> >
|
||||
{
|
||||
typedef traits type;
|
||||
};
|
||||
|
||||
//
|
||||
// BaseRegexConcept does not test anything dependent on basic_string,
|
||||
// in case our charT does not have an associated char_traits:
|
||||
//
|
||||
template <class Regex>
|
||||
struct BaseRegexConcept
|
||||
{
|
||||
typedef typename Regex::value_type value_type;
|
||||
typedef typename Regex::size_type size_type;
|
||||
typedef typename Regex::flag_type flag_type;
|
||||
typedef typename Regex::locale_type locale_type;
|
||||
typedef input_iterator_archetype<value_type> input_iterator_type;
|
||||
|
||||
// derived test types:
|
||||
typedef const value_type* pointer_type;
|
||||
typedef bidirectional_iterator_archetype<value_type> BidiIterator;
|
||||
typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type;
|
||||
typedef global_regex_namespace::match_results<BidiIterator> match_results_type;
|
||||
typedef output_iterator_archetype<value_type> OutIterator;
|
||||
typedef typename regex_traits_computer<Regex>::type traits_type;
|
||||
typedef global_regex_namespace::regex_iterator<BidiIterator, value_type, traits_type> regex_iterator_type;
|
||||
typedef global_regex_namespace::regex_token_iterator<BidiIterator, value_type, traits_type> regex_token_iterator_type;
|
||||
|
||||
void global_constraints()
|
||||
{
|
||||
//
|
||||
// test non-template components:
|
||||
//
|
||||
function_requires<BitmaskConcept<global_regex_namespace::regex_constants::syntax_option_type> >();
|
||||
global_regex_namespace::regex_constants::syntax_option_type opts
|
||||
= global_regex_namespace::regex_constants::icase
|
||||
| global_regex_namespace::regex_constants::nosubs
|
||||
| global_regex_namespace::regex_constants::optimize
|
||||
| global_regex_namespace::regex_constants::collate
|
||||
| global_regex_namespace::regex_constants::ECMAScript
|
||||
| global_regex_namespace::regex_constants::basic
|
||||
| global_regex_namespace::regex_constants::extended
|
||||
| global_regex_namespace::regex_constants::awk
|
||||
| global_regex_namespace::regex_constants::grep
|
||||
| global_regex_namespace::regex_constants::egrep;
|
||||
ignore_unused_variable_warning(opts);
|
||||
|
||||
function_requires<BitmaskConcept<global_regex_namespace::regex_constants::match_flag_type> >();
|
||||
global_regex_namespace::regex_constants::match_flag_type mopts
|
||||
= global_regex_namespace::regex_constants::match_default
|
||||
| global_regex_namespace::regex_constants::match_not_bol
|
||||
| global_regex_namespace::regex_constants::match_not_eol
|
||||
| global_regex_namespace::regex_constants::match_not_bow
|
||||
| global_regex_namespace::regex_constants::match_not_eow
|
||||
| global_regex_namespace::regex_constants::match_any
|
||||
| global_regex_namespace::regex_constants::match_not_null
|
||||
| global_regex_namespace::regex_constants::match_continuous
|
||||
| global_regex_namespace::regex_constants::match_prev_avail
|
||||
| global_regex_namespace::regex_constants::format_default
|
||||
| global_regex_namespace::regex_constants::format_sed
|
||||
| global_regex_namespace::regex_constants::format_no_copy
|
||||
| global_regex_namespace::regex_constants::format_first_only;
|
||||
ignore_unused_variable_warning(mopts);
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_enum<global_regex_namespace::regex_constants::error_type>::value));
|
||||
global_regex_namespace::regex_constants::error_type e1 = global_regex_namespace::regex_constants::error_collate;
|
||||
ignore_unused_variable_warning(e1);
|
||||
e1 = global_regex_namespace::regex_constants::error_ctype;
|
||||
ignore_unused_variable_warning(e1);
|
||||
e1 = global_regex_namespace::regex_constants::error_escape;
|
||||
ignore_unused_variable_warning(e1);
|
||||
e1 = global_regex_namespace::regex_constants::error_backref;
|
||||
ignore_unused_variable_warning(e1);
|
||||
e1 = global_regex_namespace::regex_constants::error_brack;
|
||||
ignore_unused_variable_warning(e1);
|
||||
e1 = global_regex_namespace::regex_constants::error_paren;
|
||||
ignore_unused_variable_warning(e1);
|
||||
e1 = global_regex_namespace::regex_constants::error_brace;
|
||||
ignore_unused_variable_warning(e1);
|
||||
e1 = global_regex_namespace::regex_constants::error_badbrace;
|
||||
ignore_unused_variable_warning(e1);
|
||||
e1 = global_regex_namespace::regex_constants::error_range;
|
||||
ignore_unused_variable_warning(e1);
|
||||
e1 = global_regex_namespace::regex_constants::error_space;
|
||||
ignore_unused_variable_warning(e1);
|
||||
e1 = global_regex_namespace::regex_constants::error_badrepeat;
|
||||
ignore_unused_variable_warning(e1);
|
||||
e1 = global_regex_namespace::regex_constants::error_complexity;
|
||||
ignore_unused_variable_warning(e1);
|
||||
e1 = global_regex_namespace::regex_constants::error_stack;
|
||||
ignore_unused_variable_warning(e1);
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_base_and_derived<std::runtime_error, global_regex_namespace::regex_error>::value ));
|
||||
const global_regex_namespace::regex_error except(e1);
|
||||
e1 = except.code();
|
||||
|
||||
typedef typename Regex::value_type value_type;
|
||||
function_requires< RegexTraitsConcept<global_regex_namespace::regex_traits<char> > >();
|
||||
function_requires< BaseRegexConcept<global_regex_namespace::basic_regex<char> > >();
|
||||
}
|
||||
void constraints()
|
||||
{
|
||||
global_constraints();
|
||||
|
||||
BOOST_STATIC_ASSERT((::boost::is_same< flag_type, global_regex_namespace::regex_constants::syntax_option_type>::value));
|
||||
flag_type opts
|
||||
= Regex::icase
|
||||
| Regex::nosubs
|
||||
| Regex::optimize
|
||||
| Regex::collate
|
||||
| Regex::ECMAScript
|
||||
| Regex::basic
|
||||
| Regex::extended
|
||||
| Regex::awk
|
||||
| Regex::grep
|
||||
| Regex::egrep;
|
||||
ignore_unused_variable_warning(opts);
|
||||
|
||||
function_requires<DefaultConstructibleConcept<Regex> >();
|
||||
function_requires<CopyConstructibleConcept<Regex> >();
|
||||
|
||||
// Regex constructors:
|
||||
Regex e1(m_pointer);
|
||||
ignore_unused_variable_warning(e1);
|
||||
Regex e2(m_pointer, m_flags);
|
||||
ignore_unused_variable_warning(e2);
|
||||
Regex e3(m_pointer, m_size, m_flags);
|
||||
ignore_unused_variable_warning(e3);
|
||||
Regex e4(in1, in2);
|
||||
ignore_unused_variable_warning(e4);
|
||||
Regex e5(in1, in2, m_flags);
|
||||
ignore_unused_variable_warning(e5);
|
||||
|
||||
// assign etc:
|
||||
Regex e;
|
||||
e = m_pointer;
|
||||
e = e1;
|
||||
e.assign(e1);
|
||||
e.assign(m_pointer);
|
||||
e.assign(m_pointer, m_flags);
|
||||
e.assign(m_pointer, m_size, m_flags);
|
||||
e.assign(in1, in2);
|
||||
e.assign(in1, in2, m_flags);
|
||||
|
||||
// access:
|
||||
const Regex ce;
|
||||
bool b = ce.empty();
|
||||
ignore_unused_variable_warning(b);
|
||||
size_type i = ce.mark_count();
|
||||
ignore_unused_variable_warning(i);
|
||||
m_flags = ce.flags();
|
||||
e.imbue(ce.getloc());
|
||||
e.swap(e1);
|
||||
|
||||
global_regex_namespace::swap(e, e1);
|
||||
|
||||
// sub_match:
|
||||
BOOST_STATIC_ASSERT((::boost::is_base_and_derived<std::pair<BidiIterator, BidiIterator>, sub_match_type>::value));
|
||||
typedef typename sub_match_type::value_type sub_value_type;
|
||||
typedef typename sub_match_type::difference_type sub_diff_type;
|
||||
typedef typename sub_match_type::iterator sub_iter_type;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<sub_value_type, value_type>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<sub_iter_type, BidiIterator>::value));
|
||||
b = m_sub.matched;
|
||||
ignore_unused_variable_warning(b);
|
||||
BidiIterator bi = m_sub.first;
|
||||
ignore_unused_variable_warning(bi);
|
||||
bi = m_sub.second;
|
||||
ignore_unused_variable_warning(bi);
|
||||
sub_diff_type diff = m_sub.length();
|
||||
ignore_unused_variable_warning(diff);
|
||||
// match_results tests:
|
||||
typedef typename match_results_type::value_type mr_value_type;
|
||||
typedef typename match_results_type::const_reference mr_const_reference;
|
||||
typedef typename match_results_type::reference mr_reference;
|
||||
typedef typename match_results_type::const_iterator mr_const_iterator;
|
||||
typedef typename match_results_type::iterator mr_iterator;
|
||||
typedef typename match_results_type::difference_type mr_difference_type;
|
||||
typedef typename match_results_type::size_type mr_size_type;
|
||||
typedef typename match_results_type::allocator_type mr_allocator_type;
|
||||
typedef typename match_results_type::char_type mr_char_type;
|
||||
typedef typename match_results_type::string_type mr_string_type;
|
||||
|
||||
match_results_type m1;
|
||||
mr_allocator_type at;
|
||||
match_results_type m2(at);
|
||||
match_results_type m3(m1);
|
||||
m1 = m2;
|
||||
|
||||
mr_size_type mrs = m_cresults.size();
|
||||
ignore_unused_variable_warning(mrs);
|
||||
mrs = m_cresults.max_size();
|
||||
ignore_unused_variable_warning(mrs);
|
||||
b = m_cresults.empty();
|
||||
ignore_unused_variable_warning(b);
|
||||
mr_difference_type mrd = m_cresults.length();
|
||||
ignore_unused_variable_warning(mrd);
|
||||
mrd = m_cresults.length(mrs);
|
||||
ignore_unused_variable_warning(mrd);
|
||||
mrd = m_cresults.position();
|
||||
ignore_unused_variable_warning(mrd);
|
||||
mrd = m_cresults.position(mrs);
|
||||
ignore_unused_variable_warning(mrd);
|
||||
|
||||
mr_const_reference mrcr = m_cresults[m_size];
|
||||
ignore_unused_variable_warning(mrcr);
|
||||
mr_const_reference mrcr2 = m_cresults.prefix();
|
||||
ignore_unused_variable_warning(mrcr2);
|
||||
mr_const_reference mrcr3 = m_cresults.suffix();
|
||||
ignore_unused_variable_warning(mrcr3);
|
||||
mr_const_iterator mrci = m_cresults.begin();
|
||||
ignore_unused_variable_warning(mrci);
|
||||
mrci = m_cresults.end();
|
||||
ignore_unused_variable_warning(mrci);
|
||||
|
||||
mr_allocator_type at2 = m_cresults.get_allocator();
|
||||
m_results.swap(m_results);
|
||||
global_regex_namespace::swap(m_results, m_results);
|
||||
|
||||
// regex_match:
|
||||
b = global_regex_namespace::regex_match(m_in, m_in, m_results, e);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_match(m_in, m_in, m_results, e, m_mft);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_match(m_in, m_in, e);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_match(m_in, m_in, e, m_mft);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_match(m_pointer, m_pmatch, e);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_match(m_pointer, m_pmatch, e, m_mft);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_match(m_pointer, e);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_match(m_pointer, e, m_mft);
|
||||
ignore_unused_variable_warning(b);
|
||||
// regex_search:
|
||||
b = global_regex_namespace::regex_search(m_in, m_in, m_results, e);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_search(m_in, m_in, m_results, e, m_mft);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_search(m_in, m_in, e);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_search(m_in, m_in, e, m_mft);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_search(m_pointer, m_pmatch, e);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_search(m_pointer, m_pmatch, e, m_mft);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_search(m_pointer, e);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_search(m_pointer, e, m_mft);
|
||||
ignore_unused_variable_warning(b);
|
||||
|
||||
// regex_iterator:
|
||||
typedef typename regex_iterator_type::regex_type rit_regex_type;
|
||||
typedef typename regex_iterator_type::value_type rit_value_type;
|
||||
typedef typename regex_iterator_type::difference_type rit_difference_type;
|
||||
typedef typename regex_iterator_type::pointer rit_pointer;
|
||||
typedef typename regex_iterator_type::reference rit_reference;
|
||||
typedef typename regex_iterator_type::iterator_category rit_iterator_category;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<rit_regex_type, Regex>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<rit_value_type, match_results_type>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<rit_difference_type, std::ptrdiff_t>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<rit_pointer, const match_results_type*>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<rit_reference, const match_results_type&>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_convertible<rit_iterator_category*, std::forward_iterator_tag*>::value));
|
||||
// this takes care of most of the checks needed:
|
||||
function_requires<ForwardIteratorConcept<regex_iterator_type> >();
|
||||
regex_iterator_type iter1(m_in, m_in, e);
|
||||
ignore_unused_variable_warning(iter1);
|
||||
regex_iterator_type iter2(m_in, m_in, e, m_mft);
|
||||
ignore_unused_variable_warning(iter2);
|
||||
|
||||
// regex_token_iterator:
|
||||
typedef typename regex_token_iterator_type::regex_type rtit_regex_type;
|
||||
typedef typename regex_token_iterator_type::value_type rtit_value_type;
|
||||
typedef typename regex_token_iterator_type::difference_type rtit_difference_type;
|
||||
typedef typename regex_token_iterator_type::pointer rtit_pointer;
|
||||
typedef typename regex_token_iterator_type::reference rtit_reference;
|
||||
typedef typename regex_token_iterator_type::iterator_category rtit_iterator_category;
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<rtit_regex_type, Regex>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<rtit_value_type, sub_match_type>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<rtit_difference_type, std::ptrdiff_t>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<rtit_pointer, const sub_match_type*>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_same<rtit_reference, const sub_match_type&>::value));
|
||||
BOOST_STATIC_ASSERT((::boost::is_convertible<rtit_iterator_category*, std::forward_iterator_tag*>::value));
|
||||
// this takes care of most of the checks needed:
|
||||
function_requires<ForwardIteratorConcept<regex_token_iterator_type> >();
|
||||
regex_token_iterator_type ti1(m_in, m_in, e);
|
||||
ignore_unused_variable_warning(ti1);
|
||||
regex_token_iterator_type ti2(m_in, m_in, e, 0);
|
||||
ignore_unused_variable_warning(ti2);
|
||||
regex_token_iterator_type ti3(m_in, m_in, e, 0, m_mft);
|
||||
ignore_unused_variable_warning(ti3);
|
||||
std::vector<int> subs;
|
||||
regex_token_iterator_type ti4(m_in, m_in, e, subs);
|
||||
ignore_unused_variable_warning(ti4);
|
||||
regex_token_iterator_type ti5(m_in, m_in, e, subs, m_mft);
|
||||
ignore_unused_variable_warning(ti5);
|
||||
static const int i_array[3] = { 1, 2, 3, };
|
||||
regex_token_iterator_type ti6(m_in, m_in, e, i_array);
|
||||
ignore_unused_variable_warning(ti6);
|
||||
regex_token_iterator_type ti7(m_in, m_in, e, i_array, m_mft);
|
||||
ignore_unused_variable_warning(ti7);
|
||||
}
|
||||
|
||||
pointer_type m_pointer;
|
||||
flag_type m_flags;
|
||||
size_type m_size;
|
||||
input_iterator_type in1, in2;
|
||||
const sub_match_type m_sub;
|
||||
const value_type m_char;
|
||||
match_results_type m_results;
|
||||
const match_results_type m_cresults;
|
||||
OutIterator m_out;
|
||||
BidiIterator m_in;
|
||||
global_regex_namespace::regex_constants::match_flag_type m_mft;
|
||||
global_regex_namespace::match_results<pointer_type> m_pmatch;
|
||||
|
||||
BaseRegexConcept();
|
||||
BaseRegexConcept(const BaseRegexConcept&);
|
||||
BaseRegexConcept& operator=(const BaseRegexConcept&);
|
||||
};
|
||||
|
||||
//
|
||||
// RegexConcept:
|
||||
// Test every interface in the std:
|
||||
//
|
||||
template <class Regex>
|
||||
struct RegexConcept
|
||||
{
|
||||
typedef typename Regex::value_type value_type;
|
||||
typedef typename Regex::size_type size_type;
|
||||
typedef typename Regex::flag_type flag_type;
|
||||
typedef typename Regex::locale_type locale_type;
|
||||
|
||||
// derived test types:
|
||||
typedef const value_type* pointer_type;
|
||||
typedef std::basic_string<value_type> string_type;
|
||||
typedef boost::bidirectional_iterator_archetype<value_type> BidiIterator;
|
||||
typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type;
|
||||
typedef global_regex_namespace::match_results<BidiIterator> match_results_type;
|
||||
typedef output_iterator_archetype<value_type> OutIterator;
|
||||
|
||||
|
||||
void constraints()
|
||||
{
|
||||
function_requires<BaseRegexConcept<Regex> >();
|
||||
// string based construct:
|
||||
Regex e1(m_string);
|
||||
ignore_unused_variable_warning(e1);
|
||||
Regex e2(m_string, m_flags);
|
||||
ignore_unused_variable_warning(e2);
|
||||
|
||||
// assign etc:
|
||||
Regex e;
|
||||
e = m_string;
|
||||
e.assign(m_string);
|
||||
e.assign(m_string, m_flags);
|
||||
|
||||
// sub_match:
|
||||
string_type s(m_sub);
|
||||
ignore_unused_variable_warning(s);
|
||||
s = m_sub.str();
|
||||
ignore_unused_variable_warning(s);
|
||||
int i = m_sub.compare(m_string);
|
||||
ignore_unused_variable_warning(i);
|
||||
|
||||
int i2 = m_sub.compare(m_sub);
|
||||
ignore_unused_variable_warning(i2);
|
||||
i2 = m_sub.compare(m_pointer);
|
||||
ignore_unused_variable_warning(i2);
|
||||
|
||||
bool b = m_sub == m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub != m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub <= m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub <= m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub > m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub >= m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
|
||||
b = m_sub == m_pointer;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub != m_pointer;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub <= m_pointer;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub <= m_pointer;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub > m_pointer;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub >= m_pointer;
|
||||
ignore_unused_variable_warning(b);
|
||||
|
||||
b = m_pointer == m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_pointer != m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_pointer <= m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_pointer <= m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_pointer > m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_pointer >= m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
|
||||
b = m_sub == m_char;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub != m_char;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub <= m_char;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub <= m_char;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub > m_char;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub >= m_char;
|
||||
ignore_unused_variable_warning(b);
|
||||
|
||||
b = m_char == m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_char != m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_char <= m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_char <= m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_char > m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_char >= m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
|
||||
b = m_sub == m_string;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub != m_string;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub <= m_string;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub <= m_string;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub > m_string;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_sub >= m_string;
|
||||
ignore_unused_variable_warning(b);
|
||||
|
||||
b = m_string == m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_string != m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_string <= m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_string <= m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_string > m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = m_string >= m_sub;
|
||||
ignore_unused_variable_warning(b);
|
||||
|
||||
// match results:
|
||||
m_string = m_results.str();
|
||||
ignore_unused_variable_warning(m_string);
|
||||
m_string = m_results.str(0);
|
||||
ignore_unused_variable_warning(m_string);
|
||||
m_out = m_cresults.format(m_out, m_string);
|
||||
m_out = m_cresults.format(m_out, m_string, m_mft);
|
||||
m_string = m_cresults.format(m_string);
|
||||
ignore_unused_variable_warning(m_string);
|
||||
m_string = m_cresults.format(m_string, m_mft);
|
||||
ignore_unused_variable_warning(m_string);
|
||||
|
||||
// regex_match:
|
||||
b = global_regex_namespace::regex_match(m_string, m_smatch, e);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_match(m_string, m_smatch, e, m_mft);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_match(m_string, e);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_match(m_string, e, m_mft);
|
||||
ignore_unused_variable_warning(b);
|
||||
|
||||
// regex_search:
|
||||
b = global_regex_namespace::regex_search(m_string, m_smatch, e);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_search(m_string, m_smatch, e, m_mft);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_search(m_string, e);
|
||||
ignore_unused_variable_warning(b);
|
||||
b = global_regex_namespace::regex_search(m_string, e, m_mft);
|
||||
ignore_unused_variable_warning(b);
|
||||
|
||||
// regex_replace:
|
||||
m_out = global_regex_namespace::regex_replace(m_out, m_in, m_in, e, m_string, m_mft);
|
||||
m_out = global_regex_namespace::regex_replace(m_out, m_in, m_in, e, m_string);
|
||||
m_string = global_regex_namespace::regex_replace(m_string, e, m_string, m_mft);
|
||||
ignore_unused_variable_warning(m_string);
|
||||
m_string = global_regex_namespace::regex_replace(m_string, e, m_string);
|
||||
ignore_unused_variable_warning(m_string);
|
||||
|
||||
}
|
||||
|
||||
flag_type m_flags;
|
||||
string_type m_string;
|
||||
const sub_match_type m_sub;
|
||||
match_results_type m_results;
|
||||
pointer_type m_pointer;
|
||||
value_type m_char;
|
||||
const match_results_type m_cresults;
|
||||
OutIterator m_out;
|
||||
BidiIterator m_in;
|
||||
global_regex_namespace::regex_constants::match_flag_type m_mft;
|
||||
global_regex_namespace::match_results<typename string_type::const_iterator> m_smatch;
|
||||
|
||||
RegexConcept();
|
||||
RegexConcept(const RegexConcept&);
|
||||
RegexConcept& operator=(const RegexConcept&);
|
||||
};
|
||||
|
||||
//
|
||||
// BoostRegexConcept:
|
||||
// Test every interface in the Boost implementation:
|
||||
//
|
||||
template <class Regex>
|
||||
struct BoostRegexConcept
|
||||
{
|
||||
typedef typename Regex::value_type value_type;
|
||||
typedef typename Regex::size_type size_type;
|
||||
typedef typename Regex::flag_type flag_type;
|
||||
typedef typename Regex::locale_type locale_type;
|
||||
|
||||
// derived test types:
|
||||
typedef const value_type* pointer_type;
|
||||
typedef std::basic_string<value_type> string_type;
|
||||
typedef typename Regex::const_iterator const_iterator;
|
||||
typedef bidirectional_iterator_archetype<value_type> BidiIterator;
|
||||
typedef global_regex_namespace::sub_match<BidiIterator> sub_match_type;
|
||||
typedef global_regex_namespace::match_results<BidiIterator> match_results_type;
|
||||
|
||||
void constraints()
|
||||
{
|
||||
global_regex_namespace::regex_constants::match_flag_type mopts
|
||||
= global_regex_namespace::regex_constants::match_default
|
||||
| global_regex_namespace::regex_constants::match_not_bol
|
||||
| global_regex_namespace::regex_constants::match_not_eol
|
||||
| global_regex_namespace::regex_constants::match_not_bow
|
||||
| global_regex_namespace::regex_constants::match_not_eow
|
||||
| global_regex_namespace::regex_constants::match_any
|
||||
| global_regex_namespace::regex_constants::match_not_null
|
||||
| global_regex_namespace::regex_constants::match_continuous
|
||||
| global_regex_namespace::regex_constants::match_partial
|
||||
| global_regex_namespace::regex_constants::match_prev_avail
|
||||
| global_regex_namespace::regex_constants::format_default
|
||||
| global_regex_namespace::regex_constants::format_sed
|
||||
| global_regex_namespace::regex_constants::format_perl
|
||||
| global_regex_namespace::regex_constants::format_no_copy
|
||||
| global_regex_namespace::regex_constants::format_first_only;
|
||||
|
||||
function_requires<RegexConcept<Regex> >();
|
||||
const global_regex_namespace::regex_error except(global_regex_namespace::regex_constants::error_collate);
|
||||
std::ptrdiff_t pt = except.position();
|
||||
ignore_unused_variable_warning(pt);
|
||||
const Regex ce, ce2;
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
m_stream << ce;
|
||||
#endif
|
||||
unsigned i = ce.error_code();
|
||||
ignore_unused_variable_warning(i);
|
||||
pointer_type p = ce.expression();
|
||||
ignore_unused_variable_warning(p);
|
||||
int i2 = ce.compare(ce2);
|
||||
ignore_unused_variable_warning(i2);
|
||||
bool b = ce == ce2;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = ce != ce2;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = ce < ce2;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = ce > ce2;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = ce <= ce2;
|
||||
ignore_unused_variable_warning(b);
|
||||
b = ce >= ce2;
|
||||
ignore_unused_variable_warning(b);
|
||||
i = ce.status();
|
||||
ignore_unused_variable_warning(i);
|
||||
size_type s = ce.max_size();
|
||||
ignore_unused_variable_warning(s);
|
||||
s = ce.size();
|
||||
ignore_unused_variable_warning(s);
|
||||
const_iterator pi = ce.begin();
|
||||
ignore_unused_variable_warning(pi);
|
||||
pi = ce.end();
|
||||
ignore_unused_variable_warning(pi);
|
||||
string_type s2 = ce.str();
|
||||
ignore_unused_variable_warning(s2);
|
||||
|
||||
m_string = m_sub + m_sub;
|
||||
ignore_unused_variable_warning(m_string);
|
||||
m_string = m_sub + m_pointer;
|
||||
ignore_unused_variable_warning(m_string);
|
||||
m_string = m_pointer + m_sub;
|
||||
ignore_unused_variable_warning(m_string);
|
||||
m_string = m_sub + m_string;
|
||||
ignore_unused_variable_warning(m_string);
|
||||
m_string = m_string + m_sub;
|
||||
ignore_unused_variable_warning(m_string);
|
||||
m_string = m_sub + m_char;
|
||||
ignore_unused_variable_warning(m_string);
|
||||
m_string = m_char + m_sub;
|
||||
ignore_unused_variable_warning(m_string);
|
||||
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
m_stream << m_sub;
|
||||
m_stream << m_cresults;
|
||||
#endif
|
||||
}
|
||||
|
||||
std::basic_ostream<value_type> m_stream;
|
||||
sub_match_type m_sub;
|
||||
pointer_type m_pointer;
|
||||
string_type m_string;
|
||||
const value_type m_char;
|
||||
match_results_type m_results;
|
||||
const match_results_type m_cresults;
|
||||
|
||||
BoostRegexConcept();
|
||||
BoostRegexConcept(const BoostRegexConcept&);
|
||||
BoostRegexConcept& operator=(const BoostRegexConcept&);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,411 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE config.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: regex extended config setup.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#define BOOST_REGEX_CONFIG_HPP
|
||||
/*
|
||||
* Borland C++ Fix/error check
|
||||
* this has to go *before* we include any std lib headers:
|
||||
*/
|
||||
#if defined(__BORLANDC__)
|
||||
# include <boost/regex/config/borland.hpp>
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Include all the headers we need here:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
# ifndef BOOST_REGEX_USER_CONFIG
|
||||
# define BOOST_REGEX_USER_CONFIG <boost/regex/user.hpp>
|
||||
# endif
|
||||
|
||||
# include BOOST_REGEX_USER_CONFIG
|
||||
|
||||
# include <boost/config.hpp>
|
||||
|
||||
#else
|
||||
/*
|
||||
* C build,
|
||||
* don't include <boost/config.hpp> because that may
|
||||
* do C++ specific things in future...
|
||||
*/
|
||||
# include <stdlib.h>
|
||||
# include <stddef.h>
|
||||
# ifdef _MSC_VER
|
||||
# define BOOST_MSVC _MSC_VER
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Boilerplate regex config options:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Obsolete macro, use BOOST_VERSION instead: */
|
||||
#define BOOST_RE_VERSION 320
|
||||
|
||||
/* fix: */
|
||||
#if defined(_UNICODE) && !defined(UNICODE)
|
||||
#define UNICODE
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Fix for gcc prior to 3.4: std::ctype<wchar_t> doesn't allow
|
||||
* masks to be combined, for example:
|
||||
* std::use_facet<std::ctype<wchar_t> >.is(std::ctype_base::lower|std::ctype_base::upper, L'a');
|
||||
* returns *false*.
|
||||
*/
|
||||
#ifdef __GLIBCPP__
|
||||
# define BOOST_REGEX_BUGGY_CTYPE_FACET
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Intel C++ before 8.0 ends up with unresolved externals unless we turn off
|
||||
* extern template support:
|
||||
*/
|
||||
#if defined(BOOST_INTEL) && defined(__cplusplus) && (BOOST_INTEL <= 800)
|
||||
# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If there isn't good enough wide character support then there will
|
||||
* be no wide character regular expressions:
|
||||
*/
|
||||
#if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING))
|
||||
# if !defined(BOOST_NO_WREGEX)
|
||||
# define BOOST_NO_WREGEX
|
||||
# endif
|
||||
#else
|
||||
# if defined(__sgi) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||
/* STLPort on IRIX is misconfigured: <cwctype> does not compile
|
||||
* as a temporary fix include <wctype.h> instead and prevent inclusion
|
||||
* of STLPort version of <cwctype> */
|
||||
# include <wctype.h>
|
||||
# define __STLPORT_CWCTYPE
|
||||
# define _STLP_CWCTYPE
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
# include <boost/regex/config/cwchar.hpp>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If Win32 support has been disabled for boost in general, then
|
||||
* it is for regex in particular:
|
||||
*/
|
||||
#if defined(BOOST_DISABLE_WIN32) && !defined(BOOST_REGEX_NO_W32)
|
||||
# define BOOST_REGEX_NO_W32
|
||||
#endif
|
||||
|
||||
/* disable our own file-iterators and mapfiles if we can't
|
||||
* support them: */
|
||||
#if !defined(BOOST_HAS_DIRENT_H) && !(defined(_WIN32) && !defined(BOOST_REGEX_NO_W32))
|
||||
# define BOOST_REGEX_NO_FILEITER
|
||||
#endif
|
||||
|
||||
/* backwards compatibitity: */
|
||||
#if defined(BOOST_RE_NO_LIB)
|
||||
# define BOOST_REGEX_NO_LIB
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (defined(_WIN32) || defined(__CYGWIN__))
|
||||
/* gcc on win32 has problems if you include <windows.h>
|
||||
(sporadically generates bad code). */
|
||||
# define BOOST_REGEX_NO_W32
|
||||
#endif
|
||||
#if defined(__COMO__) && !defined(BOOST_REGEX_NO_W32) && !defined(_MSC_EXTENSIONS)
|
||||
# define BOOST_REGEX_NO_W32
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Wide character workarounds:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/*
|
||||
* define BOOST_REGEX_HAS_OTHER_WCHAR_T when wchar_t is a native type, but the users
|
||||
* code may be built with wchar_t as unsigned short: basically when we're building
|
||||
* with MSVC and the /Zc:wchar_t option we place some extra unsigned short versions
|
||||
* of the non-inline functions in the library, so that users can still link to the lib,
|
||||
* irrespective of whether their own code is built with /Zc:wchar_t.
|
||||
*/
|
||||
#if defined(__cplusplus) && (defined(BOOST_MSVC) || defined(__ICL)) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) && defined(BOOST_WINDOWS) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
||||
# define BOOST_REGEX_HAS_OTHER_WCHAR_T
|
||||
# ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4251 4231 4660)
|
||||
# endif
|
||||
# ifdef _DLL
|
||||
# include <string>
|
||||
extern template class __declspec(dllimport) std::basic_string<unsigned short>;
|
||||
# endif
|
||||
# ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Set up dll import/export options:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(BOOST_HAS_DECLSPEC) && (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK)
|
||||
# if defined(BOOST_REGEX_SOURCE)
|
||||
# define BOOST_REGEX_DECL __declspec(dllexport)
|
||||
# define BOOST_REGEX_BUILD_DLL
|
||||
# else
|
||||
# define BOOST_REGEX_DECL __declspec(dllimport)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_REGEX_DECL
|
||||
# define BOOST_REGEX_DECL
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_REGEX_NO_LIB) && !defined(BOOST_REGEX_SOURCE) && !defined(BOOST_ALL_NO_LIB) && defined(__cplusplus)
|
||||
# define BOOST_LIB_NAME boost_regex
|
||||
# if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
|
||||
# define BOOST_DYN_LINK
|
||||
# endif
|
||||
# ifdef BOOST_REGEX_DIAG
|
||||
# define BOOST_LIB_DIAGNOSTIC
|
||||
# endif
|
||||
# include <boost/config/auto_link.hpp>
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Set up function call type:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1200) && defined(_MSC_EXTENSIONS)
|
||||
#if defined(_DEBUG) || defined(__MSVC_RUNTIME_CHECKS)
|
||||
# define BOOST_REGEX_CALL __cdecl
|
||||
#else
|
||||
# define BOOST_REGEX_CALL __fastcall
|
||||
#endif
|
||||
# define BOOST_REGEX_CCALL __cdecl
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)
|
||||
# define BOOST_REGEX_CALL __fastcall
|
||||
# define BOOST_REGEX_CCALL __stdcall
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_REGEX_CALL
|
||||
# define BOOST_REGEX_CALL
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_CCALL
|
||||
#define BOOST_REGEX_CCALL
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Set up localisation model:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* backwards compatibility: */
|
||||
#ifdef BOOST_RE_LOCALE_C
|
||||
# define BOOST_REGEX_USE_C_LOCALE
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_RE_LOCALE_CPP
|
||||
# define BOOST_REGEX_USE_CPP_LOCALE
|
||||
#endif
|
||||
|
||||
/* Win32 defaults to native Win32 locale: */
|
||||
#if defined(_WIN32) && !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_REGEX_NO_W32)
|
||||
# define BOOST_REGEX_USE_WIN32_LOCALE
|
||||
#endif
|
||||
/* otherwise use C++ locale if supported: */
|
||||
#if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_NO_STD_LOCALE)
|
||||
# define BOOST_REGEX_USE_CPP_LOCALE
|
||||
#endif
|
||||
/* otherwise use C+ locale: */
|
||||
#if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE)
|
||||
# define BOOST_REGEX_USE_C_LOCALE
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_REGEX_MAX_STATE_COUNT
|
||||
# define BOOST_REGEX_MAX_STATE_COUNT 100000000
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Error Handling for exception free compilers:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef BOOST_NO_EXCEPTIONS
|
||||
/*
|
||||
* If there are no exceptions then we must report critical-errors
|
||||
* the only way we know how; by terminating.
|
||||
*/
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <boost/throw_exception.hpp>
|
||||
|
||||
# define BOOST_REGEX_NOEH_ASSERT(x)\
|
||||
if(0 == (x))\
|
||||
{\
|
||||
std::string s("Error: critical regex++ failure in: ");\
|
||||
s.append(#x);\
|
||||
std::runtime_error e(s);\
|
||||
boost::throw_exception(e);\
|
||||
}
|
||||
#else
|
||||
/*
|
||||
* With exceptions then error handling is taken care of and
|
||||
* there is no need for these checks:
|
||||
*/
|
||||
# define BOOST_REGEX_NOEH_ASSERT(x)
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Stack protection under MS Windows:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(BOOST_REGEX_NO_W32) && !defined(BOOST_REGEX_V3)
|
||||
# if(defined(_WIN32) || defined(_WIN64) || defined(_WINCE)) \
|
||||
&& !defined(__GNUC__) \
|
||||
&& !(defined(__BORLANDC__) && (__BORLANDC__ >= 0x600)) \
|
||||
&& !(defined(__MWERKS__) && (__MWERKS__ <= 0x3003))
|
||||
# define BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
# endif
|
||||
#elif defined(BOOST_REGEX_HAS_MS_STACK_GUARD)
|
||||
# undef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && defined(BOOST_REGEX_HAS_MS_STACK_GUARD)
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL reset_stack_guard_page();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Algorithm selection and configuration:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(BOOST_REGEX_RECURSIVE) && !defined(BOOST_REGEX_NON_RECURSIVE)
|
||||
# if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && !defined(_STLP_DEBUG) && !defined(__STL_DEBUG) && !(defined(BOOST_MSVC) && (BOOST_MSVC >= 1400))
|
||||
# define BOOST_REGEX_RECURSIVE
|
||||
# else
|
||||
# define BOOST_REGEX_NON_RECURSIVE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_REGEX_NON_RECURSIVE
|
||||
# ifdef BOOST_REGEX_RECURSIVE
|
||||
# error "Can't set both BOOST_REGEX_RECURSIVE and BOOST_REGEX_NON_RECURSIVE"
|
||||
# endif
|
||||
# ifndef BOOST_REGEX_BLOCKSIZE
|
||||
# define BOOST_REGEX_BLOCKSIZE 4096
|
||||
# endif
|
||||
# if BOOST_REGEX_BLOCKSIZE < 512
|
||||
# error "BOOST_REGEX_BLOCKSIZE must be at least 512"
|
||||
# endif
|
||||
# ifndef BOOST_REGEX_MAX_BLOCKS
|
||||
# define BOOST_REGEX_MAX_BLOCKS 1024
|
||||
# endif
|
||||
# ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
# undef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
# endif
|
||||
# ifndef BOOST_REGEX_MAX_CACHE_BLOCKS
|
||||
# define BOOST_REGEX_MAX_CACHE_BLOCKS 16
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* helper memory allocation functions:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(__cplusplus) && defined(BOOST_REGEX_NON_RECURSIVE)
|
||||
namespace boost{ namespace re_detail{
|
||||
|
||||
BOOST_REGEX_DECL void* BOOST_REGEX_CALL get_mem_block();
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void*);
|
||||
|
||||
}} /* namespaces */
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Diagnostics:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef BOOST_REGEX_CONFIG_INFO
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL print_regex_library_info();
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_REGEX_DIAG)
|
||||
# pragma message ("BOOST_REGEX_DECL" BOOST_STRINGIZE(=BOOST_REGEX_DECL))
|
||||
# pragma message ("BOOST_REGEX_CALL" BOOST_STRINGIZE(=BOOST_REGEX_CALL))
|
||||
# pragma message ("BOOST_REGEX_CCALL" BOOST_STRINGIZE(=BOOST_REGEX_CCALL))
|
||||
#ifdef BOOST_REGEX_USE_C_LOCALE
|
||||
# pragma message ("Using C locale in regex traits class")
|
||||
#elif BOOST_REGEX_USE_CPP_LOCALE
|
||||
# pragma message ("Using C++ locale in regex traits class")
|
||||
#else
|
||||
# pragma message ("Using Win32 locale in regex traits class")
|
||||
#endif
|
||||
#if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
|
||||
# pragma message ("Dynamic linking enabled")
|
||||
#endif
|
||||
#if defined(BOOST_REGEX_NO_LIB) || defined(BOOST_ALL_NO_LIB)
|
||||
# pragma message ("Auto-linking disabled")
|
||||
#endif
|
||||
#ifdef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
# pragma message ("Extern templates disabled")
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE boost/regex/config/borland.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: regex borland-specific config setup.
|
||||
*/
|
||||
|
||||
|
||||
#if defined(__BORLANDC__)
|
||||
# if (__BORLANDC__ == 0x550) || (__BORLANDC__ == 0x551)
|
||||
// problems with std::basic_string and dll RTL:
|
||||
# if defined(_RTLDLL) && defined(_RWSTD_COMPILE_INSTANTIATE)
|
||||
# ifdef BOOST_REGEX_BUILD_DLL
|
||||
# error _RWSTD_COMPILE_INSTANTIATE must not be defined when building regex++ as a DLL
|
||||
# else
|
||||
# pragma message("Defining _RWSTD_COMPILE_INSTANTIATE when linking to the DLL version of the RTL may produce memory corruption problems in std::basic_string, as a result of separate versions of basic_string's static data in the RTL and you're exe/dll: be warned!!")
|
||||
# endif
|
||||
# endif
|
||||
# ifndef _RTLDLL
|
||||
// this is harmless for a staic link:
|
||||
# define _RWSTD_COMPILE_INSTANTIATE
|
||||
# endif
|
||||
// external templates cause problems for some reason:
|
||||
# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
# endif
|
||||
# if (__BORLANDC__ <= 0x540) && !defined(BOOST_REGEX_NO_LIB) && !defined(_NO_VCL)
|
||||
// C++ Builder 4 and earlier, we can't tell whether we should be using
|
||||
// the VCL runtime or not, do a static link instead:
|
||||
# define BOOST_REGEX_STATIC_LINK
|
||||
# endif
|
||||
//
|
||||
// VCL support:
|
||||
// if we're building a console app then there can't be any VCL (can there?)
|
||||
# if !defined(__CONSOLE__) && !defined(_NO_VCL)
|
||||
# define BOOST_REGEX_USE_VCL
|
||||
# endif
|
||||
//
|
||||
// if this isn't Win32 then don't automatically select link
|
||||
// libraries:
|
||||
//
|
||||
# ifndef _Windows
|
||||
# ifndef BOOST_REGEX_NO_LIB
|
||||
# define BOOST_REGEX_NO_LIB
|
||||
# endif
|
||||
# ifndef BOOST_REGEX_STATIC_LINK
|
||||
# define BOOST_REGEX_STATIC_LINK
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#if __BORLANDC__ < 0x600
|
||||
//
|
||||
// string workarounds:
|
||||
//
|
||||
#include <cstring>
|
||||
#undef strcmp
|
||||
#undef strcpy
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE boost/regex/config/cwchar.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: regex wide character string fixes.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_CWCHAR_HPP
|
||||
#define BOOST_REGEX_CONFIG_CWCHAR_HPP
|
||||
|
||||
#include <cwchar>
|
||||
#include <cwctype>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
|
||||
// apparently this is required for the RW STL on Linux:
|
||||
#undef iswalnum
|
||||
#undef iswalpha
|
||||
#undef iswblank
|
||||
#undef iswcntrl
|
||||
#undef iswdigit
|
||||
#undef iswgraph
|
||||
#undef iswlower
|
||||
#undef iswprint
|
||||
#undef iswprint
|
||||
#undef iswpunct
|
||||
#undef iswspace
|
||||
#undef iswupper
|
||||
#undef iswxdigit
|
||||
#undef iswctype
|
||||
#undef towlower
|
||||
#undef towupper
|
||||
#undef towctrans
|
||||
#undef wctrans
|
||||
#undef wctype
|
||||
#endif
|
||||
|
||||
namespace std{
|
||||
|
||||
#ifndef BOOST_NO_STDC_NAMESPACE
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
#ifdef iswalnum
|
||||
inline int (iswalnum)(wint_t i)
|
||||
{ return iswalnum(i); }
|
||||
#undef iswalnum
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswalnum;
|
||||
#endif
|
||||
|
||||
#ifdef iswalpha
|
||||
inline int (iswalpha)(wint_t i)
|
||||
{ return iswalpha(i); }
|
||||
#undef iswalpha
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswalpha;
|
||||
#endif
|
||||
|
||||
#ifdef iswcntrl
|
||||
inline int (iswcntrl)(wint_t i)
|
||||
{ return iswcntrl(i); }
|
||||
#undef iswcntrl
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswcntrl;
|
||||
#endif
|
||||
|
||||
#ifdef iswdigit
|
||||
inline int (iswdigit)(wint_t i)
|
||||
{ return iswdigit(i); }
|
||||
#undef iswdigit
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswdigit;
|
||||
#endif
|
||||
|
||||
#ifdef iswgraph
|
||||
inline int (iswgraph)(wint_t i)
|
||||
{ return iswgraph(i); }
|
||||
#undef iswgraph
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswgraph;
|
||||
#endif
|
||||
|
||||
#ifdef iswlower
|
||||
inline int (iswlower)(wint_t i)
|
||||
{ return iswlower(i); }
|
||||
#undef iswlower
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswlower;
|
||||
#endif
|
||||
|
||||
#ifdef iswprint
|
||||
inline int (iswprint)(wint_t i)
|
||||
{ return iswprint(i); }
|
||||
#undef iswprint
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswprint;
|
||||
#endif
|
||||
|
||||
#ifdef iswpunct
|
||||
inline int (iswpunct)(wint_t i)
|
||||
{ return iswpunct(i); }
|
||||
#undef iswpunct
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswpunct;
|
||||
#endif
|
||||
|
||||
#ifdef iswspace
|
||||
inline int (iswspace)(wint_t i)
|
||||
{ return iswspace(i); }
|
||||
#undef iswspace
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswspace;
|
||||
#endif
|
||||
|
||||
#ifdef iswupper
|
||||
inline int (iswupper)(wint_t i)
|
||||
{ return iswupper(i); }
|
||||
#undef iswupper
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswupper;
|
||||
#endif
|
||||
|
||||
#ifdef iswxdigit
|
||||
inline int (iswxdigit)(wint_t i)
|
||||
{ return iswxdigit(i); }
|
||||
#undef iswxdigit
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswxdigit;
|
||||
#endif
|
||||
|
||||
#ifdef towlower
|
||||
inline wint_t (towlower)(wint_t i)
|
||||
{ return towlower(i); }
|
||||
#undef towlower
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::towlower;
|
||||
#endif
|
||||
|
||||
#ifdef towupper
|
||||
inline wint_t (towupper)(wint_t i)
|
||||
{ return towupper(i); }
|
||||
#undef towupper
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using :: towupper;
|
||||
#endif
|
||||
|
||||
#ifdef wcscmp
|
||||
inline int (wcscmp)(const wchar_t *p1, const wchar_t *p2)
|
||||
{ return wcscmp(p1,p2); }
|
||||
#undef wcscmp
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::wcscmp;
|
||||
#endif
|
||||
|
||||
#ifdef wcscoll
|
||||
inline int (wcscoll)(const wchar_t *p1, const wchar_t *p2)
|
||||
{ return wcscoll(p1,p2); }
|
||||
#undef wcscoll
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::wcscoll;
|
||||
#endif
|
||||
|
||||
#ifdef wcscpy
|
||||
inline wchar_t *(wcscpy)(wchar_t *p1, const wchar_t *p2)
|
||||
{ return wcscpy(p1,p2); }
|
||||
#undef wcscpy
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::wcscpy;
|
||||
#endif
|
||||
|
||||
#ifdef wcslen
|
||||
inline size_t (wcslen)(const wchar_t *p)
|
||||
{ return wcslen(p); }
|
||||
#undef wcslen
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::wcslen;
|
||||
#endif
|
||||
|
||||
#ifdef wcsxfrm
|
||||
size_t wcsxfrm(wchar_t *p1, const wchar_t *p2, size_t s)
|
||||
{ return wcsxfrm(p1,p2,s); }
|
||||
#undef wcsxfrm
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::wcsxfrm;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef BOOST_NO_STDC_NAMESPACE
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,133 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_cstring.hpp
|
||||
* VERSION 3.12
|
||||
* DESCRIPTION: This is an internal header file, do not include directly.
|
||||
* String support and helper functions, for regular
|
||||
* expression library.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_CSTRING_HPP
|
||||
#define BOOST_REGEX_CSTRING_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#endif
|
||||
|
||||
//
|
||||
// start by defining some template function aliases for C API functions:
|
||||
//
|
||||
|
||||
template <class charT>
|
||||
std::size_t BOOST_RE_CALL re_strlen(const charT *s)
|
||||
{
|
||||
std::size_t len = 0;
|
||||
while(*s)
|
||||
{
|
||||
++s;
|
||||
++len;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
inline std::size_t BOOST_RE_CALL re_strlen(const char *s)
|
||||
{
|
||||
return std::strlen(s);
|
||||
}
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
|
||||
inline std::size_t BOOST_RE_CALL re_strlen(const wchar_t *s)
|
||||
{
|
||||
return std::wcslen(s);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
BOOST_RE_IX_DECL void BOOST_RE_CALL re_transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
#endif
|
||||
BOOST_RE_IX_DECL void BOOST_RE_CALL re_transform(std::string& out, const std::string& in);
|
||||
|
||||
template <class charT>
|
||||
void BOOST_RE_CALL re_trunc_primary(std::basic_string<charT>& s)
|
||||
{
|
||||
for(unsigned int i = 0; i < s.size(); ++i)
|
||||
{
|
||||
if(s[i] <= 1)
|
||||
{
|
||||
s.erase(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline char* BOOST_RE_CALL re_strcpy(char *s1, const char *s2)
|
||||
{
|
||||
#if defined(__BORLANDC__) && defined(strcpy)
|
||||
return ::strcpy(s1, s2);
|
||||
#else
|
||||
return std::strcpy(s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
|
||||
inline wchar_t* BOOST_RE_CALL re_strcpy(wchar_t *s1, const wchar_t *s2)
|
||||
{
|
||||
return std::wcscpy(s1, s2);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
template <class charT>
|
||||
charT* BOOST_RE_CALL re_strdup(const charT* p)
|
||||
{
|
||||
charT* buf = new charT[re_strlen(p) + 1];
|
||||
re_strcpy(buf, p);
|
||||
return buf;
|
||||
}
|
||||
|
||||
template <class charT>
|
||||
inline void BOOST_RE_CALL re_strfree(charT* p)
|
||||
{
|
||||
delete[] p;
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_CSTRING_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,578 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_format.hpp
|
||||
* VERSION 3.12
|
||||
* DESCRIPTION: Provides formatting output routines for search and replace
|
||||
* operations. Note this is an internal header file included
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_FORMAT_HPP
|
||||
#define BOOST_REGEX_FORMAT_HPP
|
||||
|
||||
|
||||
namespace boost{
|
||||
|
||||
enum format_flags_t{
|
||||
format_all = 0, // enable all extentions to sytax
|
||||
format_sed = match_max << 1, // sed style replacement.
|
||||
format_perl = format_sed << 1, // perl style replacement.
|
||||
format_no_copy = format_perl << 1, // don't copy non-matching segments.
|
||||
format_first_only = format_no_copy << 1, // Only replace first occurance.
|
||||
format_is_if = format_first_only << 1 // internal use only.
|
||||
};
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#endif
|
||||
|
||||
template <class O, class I>
|
||||
O BOOST_RE_CALL re_copy_out(O out, I first, I last)
|
||||
{
|
||||
while(first != last)
|
||||
{
|
||||
*out = *first;
|
||||
++out;
|
||||
++first;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
template <class charT, class traits_type>
|
||||
void BOOST_RE_CALL re_skip_format(const charT*& fmt, const traits_type& traits_inst)
|
||||
{
|
||||
// dwa 9/13/00 - suppress incorrect unused parameter warning for MSVC
|
||||
(void)traits_inst;
|
||||
|
||||
typedef typename traits_type::size_type traits_size_type;
|
||||
typedef typename traits_type::uchar_type traits_uchar_type;
|
||||
typedef typename traits_type::string_type traits_string_type;
|
||||
|
||||
unsigned int parens = 0;
|
||||
unsigned int c;
|
||||
while(*fmt)
|
||||
{
|
||||
c = traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt));
|
||||
if((c == traits_type::syntax_colon) && (parens == 0))
|
||||
{
|
||||
++fmt;
|
||||
return;
|
||||
}
|
||||
else if(c == traits_type::syntax_close_bracket)
|
||||
{
|
||||
if(parens == 0)
|
||||
{
|
||||
++fmt;
|
||||
return;
|
||||
}
|
||||
--parens;
|
||||
}
|
||||
else if(c == traits_type::syntax_open_bracket)
|
||||
++parens;
|
||||
else if(c == traits_type::syntax_slash)
|
||||
{
|
||||
++fmt;
|
||||
if(*fmt == 0)
|
||||
return;
|
||||
}
|
||||
++fmt;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOOST_RE_NO_OI_ASSIGN
|
||||
|
||||
//
|
||||
// ugly hack for buggy output iterators
|
||||
|
||||
template <class T>
|
||||
inline void oi_assign(T* p, T v)
|
||||
{
|
||||
jm_destroy(p);
|
||||
jm_construct(p, v);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
template <class T>
|
||||
inline void oi_assign(T* p, T v)
|
||||
{
|
||||
//
|
||||
// if you get a compile time error in here then you either
|
||||
// need to rewrite your output iterator to make it assignable
|
||||
// (as is required by the standard), or define BOOST_RE_NO_OI_ASSIGN
|
||||
// to use the ugly hack above
|
||||
*p = v;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(BOOST_RE_NO_TEMPLATE_SWITCH_MERGE) && !defined(BOOST_RE_NO_NAMESPACES)
|
||||
//
|
||||
// Ugly ugly hack,
|
||||
// template don't merge if they contain switch statements so declare these
|
||||
// templates in unnamed namespace (ie with internal linkage), each translation
|
||||
// unit then gets its own local copy, it works seemlessly but bloats the app.
|
||||
namespace{
|
||||
#endif
|
||||
|
||||
//
|
||||
// algorithm reg_format:
|
||||
// takes the result of a match and a format string
|
||||
// and merges them to produce a new string which
|
||||
// is sent to an OutputIterator,
|
||||
// _reg_format_aux does the actual work:
|
||||
//
|
||||
template <class OutputIterator, class iterator, class Allocator, class charT, class traits_type>
|
||||
OutputIterator BOOST_RE_CALL _reg_format_aux(OutputIterator out,
|
||||
const match_results<iterator, Allocator>& m,
|
||||
const charT*& fmt,
|
||||
unsigned flags, const traits_type& traits_inst)
|
||||
{
|
||||
const charT* fmt_end = fmt;
|
||||
while(*fmt_end) ++ fmt_end;
|
||||
|
||||
typedef typename traits_type::size_type traits_size_type;
|
||||
typedef typename traits_type::uchar_type traits_uchar_type;
|
||||
typedef typename traits_type::string_type traits_string_type;
|
||||
|
||||
while(*fmt)
|
||||
{
|
||||
switch(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)))
|
||||
{
|
||||
case traits_type::syntax_dollar:
|
||||
if(flags & format_sed)
|
||||
{
|
||||
// no perl style replacement,
|
||||
// $ is an ordinary character:
|
||||
goto default_opt;
|
||||
}
|
||||
++fmt;
|
||||
if(*fmt == 0) // oops trailing $
|
||||
{
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
return out;
|
||||
}
|
||||
switch(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)))
|
||||
{
|
||||
case traits_type::syntax_start_buffer:
|
||||
oi_assign(&out, re_copy_out(out, iterator(m[-1].first), iterator(m[-1].second)));
|
||||
++fmt;
|
||||
continue;
|
||||
case traits_type::syntax_end_buffer:
|
||||
oi_assign(&out, re_copy_out(out, iterator(m[-2].first), iterator(m[-2].second)));
|
||||
++fmt;
|
||||
continue;
|
||||
case traits_type::syntax_digit:
|
||||
{
|
||||
expand_sub:
|
||||
unsigned int index = traits_inst.toi(fmt, fmt_end, 10);
|
||||
oi_assign(&out, re_copy_out(out, iterator(m[index].first), iterator(m[index].second)));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// anything else:
|
||||
if(*fmt == '&')
|
||||
{
|
||||
oi_assign(&out, re_copy_out(out, iterator(m[0].first), iterator(m[0].second)));
|
||||
++fmt;
|
||||
}
|
||||
else
|
||||
{
|
||||
// probably an error, treat as a literal '$'
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
}
|
||||
continue;
|
||||
case traits_type::syntax_slash:
|
||||
{
|
||||
// escape sequence:
|
||||
++fmt;
|
||||
charT c(*fmt);
|
||||
if(*fmt == 0)
|
||||
{
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
return out;
|
||||
}
|
||||
switch(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)))
|
||||
{
|
||||
case traits_type::syntax_a:
|
||||
c = '\a';
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_f:
|
||||
c = '\f';
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_n:
|
||||
c = '\n';
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_r:
|
||||
c = '\r';
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_t:
|
||||
c = '\t';
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_v:
|
||||
c = '\v';
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_x:
|
||||
++fmt;
|
||||
if(fmt == fmt_end)
|
||||
{
|
||||
*out = *--fmt;
|
||||
++out;
|
||||
return out;
|
||||
}
|
||||
// maybe have \x{ddd}
|
||||
if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)) == traits_type::syntax_open_brace)
|
||||
{
|
||||
++fmt;
|
||||
if(fmt == fmt_end)
|
||||
{
|
||||
fmt -= 2;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
if(traits_inst.is_class(*fmt, traits_type::char_class_xdigit) == false)
|
||||
{
|
||||
fmt -= 2;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
c = (charT)traits_inst.toi(fmt, fmt_end, -16);
|
||||
if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)) != traits_type::syntax_close_brace)
|
||||
{
|
||||
while(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)) != traits_type::syntax_slash)
|
||||
--fmt;
|
||||
++fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
++fmt;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(traits_inst.is_class(*fmt, traits_type::char_class_xdigit) == false)
|
||||
{
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
c = (charT)traits_inst.toi(fmt, fmt_end, -16);
|
||||
}
|
||||
break;
|
||||
case traits_type::syntax_c:
|
||||
++fmt;
|
||||
if(fmt == fmt_end)
|
||||
{
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
return out;
|
||||
}
|
||||
if(((typename traits_type::uchar_type)(*fmt) < (typename traits_type::uchar_type)'@')
|
||||
|| ((typename traits_type::uchar_type)(*fmt) > (typename traits_type::uchar_type)127) )
|
||||
{
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
break;
|
||||
}
|
||||
c = (charT)((typename traits_type::uchar_type)(*fmt) - (typename traits_type::uchar_type)'@');
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_e:
|
||||
c = (charT)27;
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_digit:
|
||||
if(flags & format_sed)
|
||||
goto expand_sub;
|
||||
else
|
||||
c = (charT)traits_inst.toi(fmt, fmt_end, -8);
|
||||
break;
|
||||
default:
|
||||
//c = *fmt;
|
||||
++fmt;
|
||||
}
|
||||
*out = c;
|
||||
++out;
|
||||
continue;
|
||||
}
|
||||
case traits_type::syntax_open_bracket:
|
||||
if(flags & (format_sed|format_perl))
|
||||
{
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
++fmt; // recurse
|
||||
oi_assign(&out, _reg_format_aux(out, m, fmt, flags, traits_inst));
|
||||
continue;
|
||||
}
|
||||
case traits_type::syntax_close_bracket:
|
||||
if(flags & (format_sed|format_perl))
|
||||
{
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
++fmt; // return from recursion
|
||||
return out;
|
||||
}
|
||||
case traits_type::syntax_colon:
|
||||
if(flags & format_is_if)
|
||||
{
|
||||
++fmt;
|
||||
return out;
|
||||
}
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
case traits_type::syntax_question:
|
||||
{
|
||||
if(flags & (format_sed|format_perl))
|
||||
{
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
++fmt;
|
||||
if(*fmt == 0)
|
||||
{
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
return out;
|
||||
}
|
||||
unsigned int id = traits_inst.toi(fmt, fmt_end, 10);
|
||||
if(m[id].matched)
|
||||
{
|
||||
oi_assign(&out, _reg_format_aux(out, m, fmt, flags | format_is_if, traits_inst));
|
||||
if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*(fmt-1))) == traits_type::syntax_colon)
|
||||
re_skip_format(fmt, traits_inst);
|
||||
}
|
||||
else
|
||||
{
|
||||
re_skip_format(fmt, traits_inst);
|
||||
if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*(fmt-1))) == traits_type::syntax_colon)
|
||||
oi_assign(&out, _reg_format_aux(out, m, fmt, flags | format_is_if, traits_inst));
|
||||
}
|
||||
return out;
|
||||
}
|
||||
}
|
||||
default:
|
||||
default_opt:
|
||||
if((flags & format_sed) && (*fmt == '&'))
|
||||
{
|
||||
oi_assign(&out, re_copy_out(out, iterator(m[0].first), iterator(m[0].second)));
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
#if defined(BOOST_RE_NO_TEMPLATE_SWITCH_MERGE) && !defined(BOOST_RE_NO_NAMESPACES)
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
template <class S>
|
||||
class string_out_iterator
|
||||
{
|
||||
S* out;
|
||||
public:
|
||||
string_out_iterator(S& s) : out(&s) {}
|
||||
string_out_iterator& operator++() { return *this; }
|
||||
string_out_iterator& operator++(int) { return *this; }
|
||||
string_out_iterator& operator*() { return *this; }
|
||||
string_out_iterator& operator=(typename S::value_type v)
|
||||
{
|
||||
out->append(1, v);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
template <class OutputIterator, class iterator, class charT, class Allocator, class traits_type>
|
||||
class merge_out_predicate
|
||||
{
|
||||
OutputIterator* out;
|
||||
iterator* last;
|
||||
const charT* fmt;
|
||||
unsigned flags;
|
||||
const traits_type* pt;
|
||||
|
||||
public:
|
||||
merge_out_predicate(OutputIterator& o, iterator& pi, const charT* f, unsigned format_flags, const traits_type& p)
|
||||
: out(&o), last(&pi), fmt(f), flags(format_flags), pt(&p){}
|
||||
|
||||
~merge_out_predicate() {}
|
||||
bool BOOST_RE_CALL operator()(const boost::match_results<iterator, Allocator>& m)
|
||||
{
|
||||
const charT* f = fmt;
|
||||
if(0 == (flags & format_no_copy))
|
||||
oi_assign(out, re_copy_out(*out, iterator(m[-1].first), iterator(m[-1].second)));
|
||||
oi_assign(out, _reg_format_aux(*out, m, f, flags, *pt));
|
||||
*last = m[-2].first;
|
||||
return flags & format_first_only ? false : true;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
template <class OutputIterator, class iterator, class Allocator, class charT>
|
||||
OutputIterator regex_format(OutputIterator out,
|
||||
const match_results<iterator, Allocator>& m,
|
||||
const charT* fmt,
|
||||
unsigned flags = 0
|
||||
)
|
||||
{
|
||||
regex_traits<charT> t;
|
||||
return re_detail::_reg_format_aux(out, m, fmt, flags, t);
|
||||
}
|
||||
|
||||
template <class OutputIterator, class iterator, class Allocator, class charT>
|
||||
OutputIterator regex_format(OutputIterator out,
|
||||
const match_results<iterator, Allocator>& m,
|
||||
const std::basic_string<charT>& fmt,
|
||||
unsigned flags = 0
|
||||
)
|
||||
{
|
||||
regex_traits<charT> t;
|
||||
const charT* start = fmt.c_str();
|
||||
return re_detail::_reg_format_aux(out, m, start, flags, t);
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator, class charT>
|
||||
std::basic_string<charT> regex_format(const match_results<iterator, Allocator>& m, const charT* fmt, unsigned flags = 0)
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
|
||||
regex_format(i, m, fmt, flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class iterator, class Allocator, class charT>
|
||||
std::basic_string<charT> regex_format(const match_results<iterator, Allocator>& m, const std::basic_string<charT>& fmt, unsigned flags = 0)
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
|
||||
regex_format(i, m, fmt.c_str(), flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class OutputIterator, class iterator, class traits, class Allocator, class charT>
|
||||
OutputIterator regex_merge(OutputIterator out,
|
||||
iterator first,
|
||||
iterator last,
|
||||
const reg_expression<charT, traits, Allocator>& e,
|
||||
const charT* fmt,
|
||||
unsigned int flags = match_default)
|
||||
{
|
||||
iterator l = first;
|
||||
re_detail::merge_out_predicate<OutputIterator, iterator, charT, Allocator, traits> oi(out, l, fmt, flags, e.get_traits());
|
||||
regex_grep(oi, first, last, e, flags);
|
||||
return (flags & format_no_copy) ? out : re_detail::re_copy_out(out, l, last);
|
||||
}
|
||||
|
||||
template <class OutputIterator, class iterator, class traits, class Allocator, class charT>
|
||||
inline OutputIterator regex_merge(OutputIterator out,
|
||||
iterator first,
|
||||
iterator last,
|
||||
const reg_expression<charT, traits, Allocator>& e,
|
||||
const std::basic_string<charT>& fmt,
|
||||
unsigned int flags = match_default)
|
||||
{
|
||||
return regex_merge(out, first, last, e, fmt.c_str(), flags);
|
||||
}
|
||||
|
||||
template <class traits, class Allocator, class charT>
|
||||
std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
|
||||
const reg_expression<charT, traits, Allocator>& e,
|
||||
const charT* fmt,
|
||||
unsigned int flags = match_default)
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
|
||||
regex_merge(i, s.begin(), s.end(), e, fmt, flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class traits, class Allocator, class charT>
|
||||
std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
|
||||
const reg_expression<charT, traits, Allocator>& e,
|
||||
const std::basic_string<charT>& fmt,
|
||||
unsigned int flags = match_default)
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
|
||||
regex_merge(i, s.begin(), s.end(), e, fmt.c_str(), flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_FORMAT_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,156 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_libary_include.hpp
|
||||
* VERSION 3.12
|
||||
* DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
|
||||
* Note this is an internal header file included
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_REGEX_LIBRARY_INCLUDE_HPP
|
||||
#define BOOST_REGEX_LIBRARY_INCLUDE_HPP
|
||||
#ifndef BOOST_RE_NO_LIB
|
||||
|
||||
#if defined(BOOST_MSVC) && !defined(BOOST_RE_BUILD_DLL)
|
||||
#ifdef __SGI_STL_PORT
|
||||
#ifdef _DLL
|
||||
// All these are multithreaded:
|
||||
#if defined(_DEBUG) && defined(__STL_DEBUG)
|
||||
#pragma comment(lib, "vc6-stlport-re300ddl.lib")
|
||||
#elif defined(_DEBUG)
|
||||
#pragma comment(lib, "vc6-stlport-re300dl.lib")
|
||||
#elif defined(BOOST_RE_STATIC_LIB)
|
||||
// static regex lib, dll runtime
|
||||
#pragma comment(lib, "vc6-stlport-re300ls.lib")
|
||||
#else // DEBUG
|
||||
#pragma comment(lib, "vc6-stlport-re300l.lib")
|
||||
#endif // _DEBUG
|
||||
#else // _DLL
|
||||
#ifdef _MT
|
||||
#if defined(_DEBUG) && defined(__STL_DEBUG)
|
||||
#pragma comment(lib, "vc6-stlport-re300ddm.lib")
|
||||
#elif defined(_DEBUG)
|
||||
#pragma comment(lib, "vc6-stlport-re300dm.lib")
|
||||
#else //_DEBUG
|
||||
#pragma comment(lib, "vc6-stlport-re300m.lib")
|
||||
#endif //_DEBUG
|
||||
#else //_MT
|
||||
// STLPort does not support single threaded builds:
|
||||
#error STLPort does not support single threaded builds
|
||||
#endif //_MT
|
||||
#endif //_DLL
|
||||
#else
|
||||
#ifdef _DLL
|
||||
// All these are multithreaded:
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "vc6-re300dl.lib")
|
||||
#elif defined(BOOST_RE_STATIC_LIB)
|
||||
// static regex lib, dll runtime
|
||||
#pragma comment(lib, "vc6-re300ls.lib")
|
||||
#else // DEBUG
|
||||
#pragma comment(lib, "vc6-re300l.lib")
|
||||
#endif // _DEBUG
|
||||
#else // _DLL
|
||||
#ifdef _MT
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "vc6-re300dm.lib")
|
||||
#else //_DEBUG
|
||||
#pragma comment(lib, "vc6-re300m.lib")
|
||||
#endif //_DEBUG
|
||||
#else //_MT
|
||||
#ifdef _DEBUG
|
||||
#pragma comment(lib, "vc6-re300d.lib")
|
||||
#else //_DEBUG
|
||||
#pragma comment(lib, "vc6-re300.lib")
|
||||
#endif //_DEBUG
|
||||
#endif //_MT
|
||||
#endif //_DLL
|
||||
#endif // __SGI_STL_PORT
|
||||
#endif //BOOST_MSVC
|
||||
|
||||
|
||||
#if defined(__BORLANDC__) && !defined(BOOST_RE_BUILD_DLL)
|
||||
|
||||
#if __BORLANDC__ < 0x550
|
||||
|
||||
#ifdef BOOST_RE_USE_VCL
|
||||
|
||||
#ifdef _RTLDLL
|
||||
#pragma comment(lib, "bcb4re300lv.lib")
|
||||
#else
|
||||
#pragma comment(lib, "bcb4re300v.lib")
|
||||
#endif
|
||||
|
||||
#else // VCL
|
||||
|
||||
#ifdef _RTLDLL
|
||||
#ifdef __MT__
|
||||
#pragma comment(lib, "bcb4re300lm.lib")
|
||||
#else // __MT__
|
||||
#pragma comment(lib, "bcb4re300l.lib")
|
||||
#endif // __MT__
|
||||
#else //_RTLDLL
|
||||
#ifdef __MT__
|
||||
#pragma comment(lib, "bcb4re300m.lib")
|
||||
#else // __MT__
|
||||
#pragma comment(lib, "bcb4re300.lib")
|
||||
#endif // __MT__
|
||||
#endif // _RTLDLL
|
||||
|
||||
#endif // VCL
|
||||
|
||||
#else // C++ Builder 5:
|
||||
|
||||
#ifdef BOOST_RE_USE_VCL
|
||||
|
||||
#ifdef _RTLDLL
|
||||
#pragma comment(lib, "bcb5re300lv.lib")
|
||||
#else
|
||||
#pragma comment(lib, "bcb5re300v.lib")
|
||||
#endif
|
||||
|
||||
#else // VCL
|
||||
|
||||
#ifdef _RTLDLL
|
||||
#ifdef __MT__
|
||||
#pragma comment(lib, "bcb5re300lm.lib")
|
||||
#else // __MT__
|
||||
#pragma comment(lib, "bcb5re300l.lib")
|
||||
#endif // __MT__
|
||||
#else //_RTLDLL
|
||||
#ifdef __MT__
|
||||
#pragma comment(lib, "bcb5re300m.lib")
|
||||
#else // __MT__
|
||||
#pragma comment(lib, "bcb5re300.lib")
|
||||
#endif // __MT__
|
||||
#endif // _RTLDLL
|
||||
|
||||
#endif // VCL
|
||||
|
||||
#endif
|
||||
|
||||
#endif //__BORLANDC__
|
||||
|
||||
#endif //BOOST_RE_NO_LIB
|
||||
|
||||
#endif // BOOST_REGEX_LIBRARY_INCLUDE_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,146 +0,0 @@
|
||||
|
||||
#ifndef BOOST_RE_OPT_H
|
||||
#define BOOST_RE_OPT_H
|
||||
|
||||
/* #define BOOST_RE_AUTO_CONFIGURE */
|
||||
#ifdef BOOST_RE_AUTO_CONFIGURE
|
||||
|
||||
/* Compiler options: */
|
||||
|
||||
/* BOOST_NO_STDC_NAMESPACE C library not in namespace std */
|
||||
/* #define BOOST_NO_STDC_NAMESPACE */
|
||||
|
||||
/* BOOST_RE_PLATFORM_W32 Platform is MS Win32 */
|
||||
/* #define BOOST_RE_PLATFORM_W32 */
|
||||
|
||||
/* BOOST_RE_NO_W32 Disable Win32 support even when present */
|
||||
/* #define BOOST_RE_NO_W32 */
|
||||
|
||||
/* BOOST_RE_NO_BOOL If bool is not a distict type. */
|
||||
/* #define BOOST_RE_NO_BOOL */
|
||||
|
||||
/* BOOST_RE_NO_WCHAR_H If there is no <wchar.h> */
|
||||
/* #define BOOST_RE_NO_WCHAR_H */
|
||||
|
||||
/* BOOST_RE_NO_WCTYPE_H If there is no <wctype.h> */
|
||||
/* #define BOOST_RE_NO_WCTYPE_H */
|
||||
|
||||
/* BOOST_RE_NO_WCSTRING If there are no wcslen and wcsncmp functions available. */
|
||||
/* #define BOOST_RE_NO_WCSTRING */
|
||||
|
||||
/* BOOST_RE_NO_SWPRINTF If there is no swprintf available. */
|
||||
/* #define BOOST_RE_NO_SWPRINTF */
|
||||
|
||||
/* BOOST_RE_NO_WSPRINTF If there is no wsprintf available. */
|
||||
/* #define BOOST_RE_NO_WSPRINTF */
|
||||
|
||||
/* BOOST_NO_MEMBER_TEMPLATES If member function templates or nested template classes are not allowed. */
|
||||
/* #define BOOST_NO_MEMBER_TEMPLATES */
|
||||
|
||||
/* BOOST_RE_NO_TEMPLATE_RETURNS If template functions based on return type are not supported. */
|
||||
/* #define BOOST_RE_NO_TEMPLATE_RETURNS */
|
||||
|
||||
/* BOOST_RE_NO_PARTIAL_FUNC_SPEC If partial template function specialisation is not supported */
|
||||
/* #define BOOST_RE_NO_PARTIAL_FUNC_SPEC */
|
||||
|
||||
/* BOOST_RE_NO_CAT Define if the compiler does not support POSIX style
|
||||
message categories (catopen catgets catclose). */
|
||||
/* #define BOOST_RE_NO_CAT */
|
||||
|
||||
/* BOOST_RE_THREADS Define if the compiler supports multiple threads in
|
||||
the current translation mode. */
|
||||
/* #define BOOST_RE_THREADS */
|
||||
|
||||
/* BOOST_RE_NO_TEMPLATE_MERGE If template in separate translation units don't merge at link time */
|
||||
/* #define BOOST_RE_NO_TEMPLATE_MERGE */
|
||||
|
||||
/* BOOST_RE_NO_TEMPLATE_MERGE_A If template merging from library archives is not supported */
|
||||
/* #define BOOST_RE_NO_TEMPLATE_MERGE_A */
|
||||
|
||||
/* BOOST_RE_NO_TEMPLATE_SWITCH_MERGE If merging of templates containing switch statements is not supported */
|
||||
/* #define BOOST_RE_NO_TEMPLATE_SWITCH_MERGE */
|
||||
|
||||
/* BOOST_RE_CALL Optionally define a calling convention for C++ functions */
|
||||
/* #define BOOST_RE_CALL */
|
||||
|
||||
/* BOOST_RE_CCALL Optionally define a calling convention for C functions */
|
||||
/* #define BOOST_RE_CCALL */
|
||||
|
||||
/* BOOST_RE_SIZEOF_SHORT sizeof(short) */
|
||||
/* #define BOOST_RE_SIZEOF_SHORT */
|
||||
|
||||
/* BOOST_RE_SIZEOF_INT sizeof(int) */
|
||||
/* #define BOOST_RE_SIZEOF_INT */
|
||||
|
||||
/* BOOST_RE_SIZEOF_LONG sizeof(long) */
|
||||
/* #define BOOST_RE_SIZEOF_LONG */
|
||||
|
||||
/* BOOST_RE_SIZEOF_WCHAR_T sizeof(wchar_t) */
|
||||
/* #define BOOST_RE_SIZEOF_WCHAR_T */
|
||||
|
||||
|
||||
/* STL options: */
|
||||
|
||||
/* BOOST_RE_NO_ITERATOR_H Define if you do not have a version of <iterator>. */
|
||||
/* #define BOOST_RE_NO_ITERATOR_H */
|
||||
|
||||
/* BOOST_NO_STD_ALLOCATOR Define if <memory> does not fully comply with the
|
||||
latest standard, and is not auto-recognised,
|
||||
that means nested template classes
|
||||
which hardly any compilers support at present. */
|
||||
/* #define BOOST_NO_STD_ALLOCATOR */
|
||||
|
||||
/* BOOST_RE_NO_LOCALE_H Define if there is no verion of the standard
|
||||
<locale> header available. */
|
||||
/* #define BOOST_RE_NO_LOCALE_H */
|
||||
|
||||
/* BOOST_RE_NO_STL Disables the use of any supporting STL code. */
|
||||
/* #define BOOST_RE_NO_STL */
|
||||
|
||||
/* BOOST_RE_NO_NOT_EQUAL Disables the generation of operator!= if this
|
||||
clashes with the STL version. */
|
||||
|
||||
/* BOOST_RE_NO_STRING_DEF_ARGS Define if std::basic_string<charT> not allowed - in
|
||||
other words if the template is missing its required
|
||||
default arguments. */
|
||||
/* #define BOOST_RE_NO_STRING_DEF_ARGS */
|
||||
|
||||
/* BOOST_RE_USE_ALGO If <algo.h> not <algorithm> is present */
|
||||
/* #define BOOST_RE_USE_ALGO */
|
||||
|
||||
/* BOOST_RE_OLD_IOSTREAM If the new iostreamm classes are not available */
|
||||
/* #define BOOST_RE_OLD_IOSTREAM */
|
||||
|
||||
/* BOOST_NO_STD_DISTANCE If there is no std::distance. */
|
||||
/* #define BOOST_NO_STD_DISTANCE */
|
||||
|
||||
/* BOOST_RE_NO_OI_ASSIGN If output iterators ostream_iterator<>, back_insert_iterator<> and
|
||||
front_insert_iterator<> do not have assignment operators */
|
||||
/* #define BOOST_RE_NO_OI_ASSIGN */
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#ifndef BOOST_RE_NO_ITERATOR_H
|
||||
#include <iterator>
|
||||
#ifdef BOOST_RE_USE_ALGO
|
||||
#include <algo.h>
|
||||
#else
|
||||
#include <algorithm>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // BOOST_RE_AUTO_CONFIGURE
|
||||
|
||||
|
||||
#endif /* BOOST_RE_OPT_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,245 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_raw_buffer.hpp
|
||||
* VERSION 3.12
|
||||
* DESCRIPTION: Raw character buffer for regex code.
|
||||
* Note this is an internal header file included
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_RAW_BUFFER_HPP
|
||||
#define BOOST_REGEX_RAW_BUFFER_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#endif
|
||||
|
||||
struct empty_padding{};
|
||||
|
||||
union padding
|
||||
{
|
||||
void* p;
|
||||
unsigned int i;
|
||||
};
|
||||
|
||||
template <int N>
|
||||
struct padding3
|
||||
{
|
||||
enum{
|
||||
padding_size = 8,
|
||||
padding_mask = 7
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct padding3<2>
|
||||
{
|
||||
enum{
|
||||
padding_size = 2,
|
||||
padding_mask = 1
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct padding3<4>
|
||||
{
|
||||
enum{
|
||||
padding_size = 4,
|
||||
padding_mask = 3
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct padding3<8>
|
||||
{
|
||||
enum{
|
||||
padding_size = 8,
|
||||
padding_mask = 7
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct padding3<16>
|
||||
{
|
||||
enum{
|
||||
padding_size = 16,
|
||||
padding_mask = 15
|
||||
};
|
||||
};
|
||||
|
||||
enum{
|
||||
padding_size = padding3<sizeof(padding)>::padding_size,
|
||||
padding_mask = padding3<sizeof(padding)>::padding_mask
|
||||
};
|
||||
|
||||
//
|
||||
// class raw_storage
|
||||
// basically this is a simplified vector<unsigned char>
|
||||
// this is used by reg_expression for expression storage
|
||||
//
|
||||
|
||||
template <class Allocator>
|
||||
class raw_storage
|
||||
{
|
||||
public:
|
||||
typedef Allocator allocator_type;
|
||||
typedef typename boost::re_detail::rebind_allocator<unsigned char, allocator_type>::type alloc_inst_type;
|
||||
typedef typename alloc_inst_type::size_type size_type;
|
||||
typedef typename alloc_inst_type::pointer pointer;
|
||||
private:
|
||||
//
|
||||
// empty member optimisation:
|
||||
struct alloc_data : public alloc_inst_type
|
||||
{
|
||||
typename alloc_inst_type::pointer last;
|
||||
alloc_data(const Allocator& a) : alloc_inst_type(a){}
|
||||
} alloc_inst;
|
||||
pointer start, end;
|
||||
public:
|
||||
|
||||
raw_storage(const Allocator& a = Allocator());
|
||||
raw_storage(size_type n, const Allocator& a = Allocator());
|
||||
|
||||
~raw_storage()
|
||||
{
|
||||
alloc_inst.deallocate(start, (alloc_inst.last - start));
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL resize(size_type n);
|
||||
|
||||
void* BOOST_RE_CALL extend(size_type n)
|
||||
{
|
||||
if(size_type(alloc_inst.last - end) < n)
|
||||
resize(n + (end - start));
|
||||
register void* result = end;
|
||||
end += n;
|
||||
return result;
|
||||
}
|
||||
|
||||
void* BOOST_RE_CALL insert(size_type pos, size_type n);
|
||||
|
||||
size_type BOOST_RE_CALL size()
|
||||
{
|
||||
return end - start;
|
||||
}
|
||||
|
||||
size_type BOOST_RE_CALL capacity()
|
||||
{
|
||||
return alloc_inst.last - start;
|
||||
}
|
||||
|
||||
void* BOOST_RE_CALL data()const
|
||||
{
|
||||
return start;
|
||||
}
|
||||
|
||||
size_type BOOST_RE_CALL index(void* ptr)
|
||||
{
|
||||
return (unsigned char*)ptr - (unsigned char*)data();
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL clear()
|
||||
{
|
||||
end = start;
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL align()
|
||||
{
|
||||
// move end up to a boundary:
|
||||
end = (unsigned char*)start + ((((unsigned char*)end - (unsigned char*)start) + padding_mask) & ~padding_mask);
|
||||
}
|
||||
|
||||
Allocator BOOST_RE_CALL allocator()const;
|
||||
};
|
||||
|
||||
template <class Allocator>
|
||||
CONSTRUCTOR_INLINE raw_storage<Allocator>::raw_storage(const Allocator& a)
|
||||
: alloc_inst(a)
|
||||
{
|
||||
start = end = alloc_inst.allocate(1024);
|
||||
alloc_inst.last = start + 1024;
|
||||
}
|
||||
|
||||
template <class Allocator>
|
||||
CONSTRUCTOR_INLINE raw_storage<Allocator>::raw_storage(size_type n, const Allocator& a)
|
||||
: alloc_inst(a)
|
||||
{
|
||||
start = end = alloc_inst.allocate(n);
|
||||
alloc_inst.last = start + n;
|
||||
}
|
||||
|
||||
template <class Allocator>
|
||||
Allocator BOOST_RE_CALL raw_storage<Allocator>::allocator()const
|
||||
{
|
||||
return alloc_inst;
|
||||
}
|
||||
|
||||
template <class Allocator>
|
||||
void BOOST_RE_CALL raw_storage<Allocator>::resize(size_type n)
|
||||
{
|
||||
register size_type newsize = (alloc_inst.last - start) * 2;
|
||||
register size_type datasize = end - start;
|
||||
if(newsize < n)
|
||||
newsize = n;
|
||||
// extend newsize to WORD/DWORD boundary:
|
||||
newsize = (newsize + padding_mask) & ~(padding_mask);
|
||||
|
||||
// allocate and copy data:
|
||||
register unsigned char* ptr = alloc_inst.allocate(newsize);
|
||||
std::memcpy(ptr, start, datasize);
|
||||
|
||||
// get rid of old buffer:
|
||||
alloc_inst.deallocate(start, (alloc_inst.last - start));
|
||||
|
||||
// and set up pointers:
|
||||
start = ptr;
|
||||
end = ptr + datasize;
|
||||
alloc_inst.last = ptr + newsize;
|
||||
}
|
||||
|
||||
template <class Allocator>
|
||||
void* BOOST_RE_CALL raw_storage<Allocator>::insert(size_type pos, size_type n)
|
||||
{
|
||||
jm_assert(pos <= size_type(end - start));
|
||||
if(size_type(alloc_inst.last - end) < n)
|
||||
resize(n + (end - start));
|
||||
register void* result = start + pos;
|
||||
std::memmove(start + pos + n, start + pos, (end - start) - pos);
|
||||
end += n;
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,211 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_synch.hpp
|
||||
* VERSION 3.12
|
||||
* DESCRIPTION: Thread synchronisation for regex code.
|
||||
* Note this is an internal header file included
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_SYNCH_HPP
|
||||
#define BOOST_REGEX_SYNCH_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_RE_PLATFORM_W32) && defined(BOOST_RE_THREADS)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_RE_PLATFORM_W32) && defined(BOOST_RE_THREADS)
|
||||
#if defined(__BEOS__)
|
||||
#include <OS.h>
|
||||
#include <cassert>
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#endif
|
||||
|
||||
void BOOST_RE_CALL re_init_threads();
|
||||
void BOOST_RE_CALL re_free_threads();
|
||||
|
||||
#ifdef BOOST_RE_THREADS
|
||||
|
||||
#ifndef BOOST_RE_PLATFORM_W32
|
||||
#ifdef __BEOS__
|
||||
|
||||
typedef sem_id CRITICAL_SECTION;
|
||||
|
||||
inline void BOOST_RE_CALL InitializeCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
*ps = create_sem(1, "regex++");
|
||||
assert(*ps > 0);
|
||||
}
|
||||
|
||||
inline void BOOST_RE_CALL DeleteCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
int t = delete_sem(*ps);
|
||||
assert(t == B_NO_ERROR);
|
||||
}
|
||||
|
||||
inline void BOOST_RE_CALL EnterCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
status_t t = acquire_sem(*ps);
|
||||
assert(t == B_NO_ERROR);
|
||||
}
|
||||
|
||||
inline void BOOST_RE_CALL LeaveCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
status_t t = release_sem(*ps);
|
||||
assert(t == B_NO_ERROR);
|
||||
}
|
||||
|
||||
#else // __BEOS__
|
||||
|
||||
typedef pthread_mutex_t CRITICAL_SECTION;
|
||||
|
||||
inline void BOOST_RE_CALL InitializeCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
pthread_mutex_init(ps, 0);
|
||||
}
|
||||
|
||||
inline void BOOST_RE_CALL DeleteCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
pthread_mutex_destroy(ps);
|
||||
}
|
||||
|
||||
inline void BOOST_RE_CALL EnterCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
pthread_mutex_lock(ps);
|
||||
}
|
||||
|
||||
inline void BOOST_RE_CALL LeaveCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
pthread_mutex_unlock(ps);
|
||||
}
|
||||
#endif // __BEOS__
|
||||
#endif
|
||||
|
||||
template <class Lock>
|
||||
class lock_guard
|
||||
{
|
||||
typedef Lock lock_type;
|
||||
public:
|
||||
lock_guard(lock_type& m, bool aq = true)
|
||||
: mut(m), owned(false){ acquire(aq); }
|
||||
|
||||
~lock_guard()
|
||||
{ acquire(false); }
|
||||
|
||||
void BOOST_RE_CALL acquire(bool aq = true)
|
||||
{
|
||||
if(aq && !owned)
|
||||
{
|
||||
mut.acquire(true);
|
||||
owned = true;
|
||||
}
|
||||
else if(!aq && owned)
|
||||
{
|
||||
mut.acquire(false);
|
||||
owned = false;
|
||||
}
|
||||
}
|
||||
private:
|
||||
lock_type& mut;
|
||||
bool owned;
|
||||
// VC6 warning suppression:
|
||||
lock_guard& operator=(const lock_guard&);
|
||||
};
|
||||
|
||||
|
||||
class critical_section
|
||||
{
|
||||
public:
|
||||
critical_section()
|
||||
{ InitializeCriticalSection(&hmutex);}
|
||||
|
||||
critical_section(const critical_section&)
|
||||
{ InitializeCriticalSection(&hmutex);}
|
||||
|
||||
const critical_section& BOOST_RE_CALL operator=(const critical_section&)
|
||||
{return *this;}
|
||||
|
||||
~critical_section()
|
||||
{DeleteCriticalSection(&hmutex);}
|
||||
|
||||
private:
|
||||
|
||||
void BOOST_RE_CALL acquire(bool aq)
|
||||
{ if(aq) EnterCriticalSection(&hmutex);
|
||||
else LeaveCriticalSection(&hmutex);
|
||||
}
|
||||
|
||||
CRITICAL_SECTION hmutex;
|
||||
|
||||
public:
|
||||
typedef lock_guard<critical_section> ro_guard;
|
||||
typedef lock_guard<critical_section> rw_guard;
|
||||
|
||||
friend class lock_guard<critical_section>;
|
||||
};
|
||||
|
||||
inline bool BOOST_RE_CALL operator==(const critical_section&, const critical_section&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool BOOST_RE_CALL operator<(const critical_section&, const critical_section&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef lock_guard<critical_section> cs_guard;
|
||||
|
||||
BOOST_RE_IX_DECL extern critical_section* p_re_lock;
|
||||
BOOST_RE_IX_DECL extern unsigned int re_lock_count;
|
||||
|
||||
#define BOOST_RE_GUARD(inst) boost::re_detail::critical_section::rw_guard g(inst);
|
||||
|
||||
#else // BOOST_RE_THREADS
|
||||
|
||||
#define BOOST_RE_GUARD(inst)
|
||||
|
||||
#endif // BOOST_RE_THREADS
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // sentry
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,974 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE icu.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Unicode regular expressions on top of the ICU Library.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_ICU_HPP
|
||||
#define BOOST_REGEX_ICU_HPP
|
||||
|
||||
#include <unicode/utypes.h>
|
||||
#include <unicode/uchar.h>
|
||||
#include <unicode/coll.h>
|
||||
#include <boost/regex.hpp>
|
||||
#include <boost/regex/pending/unicode_iterator.hpp>
|
||||
#include <boost/mpl/int_fwd.hpp>
|
||||
#include <bitset>
|
||||
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
//
|
||||
// Implementation details:
|
||||
//
|
||||
class BOOST_REGEX_DECL icu_regex_traits_implementation
|
||||
{
|
||||
typedef UChar32 char_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::vector<char_type> string_type;
|
||||
typedef U_NAMESPACE_QUALIFIER Locale locale_type;
|
||||
typedef boost::uint_least32_t char_class_type;
|
||||
public:
|
||||
icu_regex_traits_implementation(const U_NAMESPACE_QUALIFIER Locale& l)
|
||||
: m_locale(l)
|
||||
{
|
||||
UErrorCode success = U_ZERO_ERROR;
|
||||
m_collator.reset(U_NAMESPACE_QUALIFIER Collator::createInstance(l, success));
|
||||
if(U_SUCCESS(success) == 0)
|
||||
init_error();
|
||||
m_collator->setStrength(U_NAMESPACE_QUALIFIER Collator::IDENTICAL);
|
||||
success = U_ZERO_ERROR;
|
||||
m_primary_collator.reset(U_NAMESPACE_QUALIFIER Collator::createInstance(l, success));
|
||||
if(U_SUCCESS(success) == 0)
|
||||
init_error();
|
||||
m_primary_collator->setStrength(U_NAMESPACE_QUALIFIER Collator::PRIMARY);
|
||||
}
|
||||
U_NAMESPACE_QUALIFIER Locale getloc()const
|
||||
{
|
||||
return m_locale;
|
||||
}
|
||||
string_type do_transform(const char_type* p1, const char_type* p2, const U_NAMESPACE_QUALIFIER Collator* pcoll) const;
|
||||
string_type transform(const char_type* p1, const char_type* p2) const
|
||||
{
|
||||
return do_transform(p1, p2, m_collator.get());
|
||||
}
|
||||
string_type transform_primary(const char_type* p1, const char_type* p2) const
|
||||
{
|
||||
return do_transform(p1, p2, m_primary_collator.get());
|
||||
}
|
||||
private:
|
||||
void init_error()
|
||||
{
|
||||
std::runtime_error e("Could not initialize ICU resources");
|
||||
boost::throw_exception(e);
|
||||
}
|
||||
U_NAMESPACE_QUALIFIER Locale m_locale; // The ICU locale that we're using
|
||||
boost::scoped_ptr< U_NAMESPACE_QUALIFIER Collator> m_collator; // The full collation object
|
||||
boost::scoped_ptr< U_NAMESPACE_QUALIFIER Collator> m_primary_collator; // The primary collation object
|
||||
};
|
||||
|
||||
inline boost::shared_ptr<icu_regex_traits_implementation> get_icu_regex_traits_implementation(const U_NAMESPACE_QUALIFIER Locale& loc)
|
||||
{
|
||||
return boost::shared_ptr<icu_regex_traits_implementation>(new icu_regex_traits_implementation(loc));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class BOOST_REGEX_DECL icu_regex_traits
|
||||
{
|
||||
public:
|
||||
typedef UChar32 char_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::vector<char_type> string_type;
|
||||
typedef U_NAMESPACE_QUALIFIER Locale locale_type;
|
||||
#ifdef BOOST_NO_INT64_T
|
||||
typedef std::bitset<64> char_class_type;
|
||||
#else
|
||||
typedef boost::uint64_t char_class_type;
|
||||
#endif
|
||||
|
||||
struct boost_extensions_tag{};
|
||||
|
||||
icu_regex_traits()
|
||||
: m_pimpl(re_detail::get_icu_regex_traits_implementation(U_NAMESPACE_QUALIFIER Locale()))
|
||||
{
|
||||
}
|
||||
static size_type length(const char_type* p);
|
||||
|
||||
::boost::regex_constants::syntax_type syntax_type(char_type c)const
|
||||
{
|
||||
return ((c < 0x7f) && (c > 0)) ? re_detail::get_default_syntax_type(static_cast<char>(c)) : regex_constants::syntax_char;
|
||||
}
|
||||
::boost::regex_constants::escape_syntax_type escape_syntax_type(char_type c) const
|
||||
{
|
||||
return ((c < 0x7f) && (c > 0)) ? re_detail::get_default_escape_syntax_type(static_cast<char>(c)) : regex_constants::syntax_char;
|
||||
}
|
||||
char_type translate(char_type c) const
|
||||
{
|
||||
return c;
|
||||
}
|
||||
char_type translate_nocase(char_type c) const
|
||||
{
|
||||
return ::u_tolower(c);
|
||||
}
|
||||
char_type translate(char_type c, bool icase) const
|
||||
{
|
||||
return icase ? translate_nocase(c) : translate(c);
|
||||
}
|
||||
char_type tolower(char_type c) const
|
||||
{
|
||||
return ::u_tolower(c);
|
||||
}
|
||||
char_type toupper(char_type c) const
|
||||
{
|
||||
return ::u_toupper(c);
|
||||
}
|
||||
string_type transform(const char_type* p1, const char_type* p2) const
|
||||
{
|
||||
return m_pimpl->transform(p1, p2);
|
||||
}
|
||||
string_type transform_primary(const char_type* p1, const char_type* p2) const
|
||||
{
|
||||
return m_pimpl->transform_primary(p1, p2);
|
||||
}
|
||||
char_class_type lookup_classname(const char_type* p1, const char_type* p2) const;
|
||||
string_type lookup_collatename(const char_type* p1, const char_type* p2) const;
|
||||
bool isctype(char_type c, char_class_type f) const;
|
||||
int toi(const char_type*& p1, const char_type* p2, int radix)const
|
||||
{
|
||||
return re_detail::global_toi(p1, p2, radix, *this);
|
||||
}
|
||||
int value(char_type c, int radix)const
|
||||
{
|
||||
return u_digit(c, static_cast< ::int8_t>(radix));
|
||||
}
|
||||
locale_type imbue(locale_type l)
|
||||
{
|
||||
locale_type result(m_pimpl->getloc());
|
||||
m_pimpl = re_detail::get_icu_regex_traits_implementation(l);
|
||||
return result;
|
||||
}
|
||||
locale_type getloc()const
|
||||
{
|
||||
return locale_type();
|
||||
}
|
||||
std::string error_string(::boost::regex_constants::error_type n) const
|
||||
{
|
||||
return re_detail::get_default_error_string(n);
|
||||
}
|
||||
private:
|
||||
icu_regex_traits(const icu_regex_traits&);
|
||||
icu_regex_traits& operator=(const icu_regex_traits&);
|
||||
|
||||
//
|
||||
// define the bitmasks offsets we need for additional character properties:
|
||||
//
|
||||
enum{
|
||||
offset_blank = U_CHAR_CATEGORY_COUNT,
|
||||
offset_space = U_CHAR_CATEGORY_COUNT+1,
|
||||
offset_xdigit = U_CHAR_CATEGORY_COUNT+2,
|
||||
offset_underscore = U_CHAR_CATEGORY_COUNT+3,
|
||||
offset_unicode = U_CHAR_CATEGORY_COUNT+4,
|
||||
offset_any = U_CHAR_CATEGORY_COUNT+5,
|
||||
offset_ascii = U_CHAR_CATEGORY_COUNT+6
|
||||
};
|
||||
|
||||
//
|
||||
// and now the masks:
|
||||
//
|
||||
static const char_class_type mask_blank;
|
||||
static const char_class_type mask_space;
|
||||
static const char_class_type mask_xdigit;
|
||||
static const char_class_type mask_underscore;
|
||||
static const char_class_type mask_unicode;
|
||||
static const char_class_type mask_any;
|
||||
static const char_class_type mask_ascii;
|
||||
|
||||
static char_class_type lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2);
|
||||
|
||||
boost::shared_ptr< ::boost::re_detail::icu_regex_traits_implementation> m_pimpl;
|
||||
};
|
||||
|
||||
// types:
|
||||
typedef basic_regex< ::UChar32, icu_regex_traits> u32regex;
|
||||
typedef match_results<const ::UChar32*> u32match;
|
||||
typedef match_results<const ::UChar*> u16match;
|
||||
|
||||
//
|
||||
// Construction of 32-bit regex types from UTF-8 and UTF-16 primitives:
|
||||
//
|
||||
namespace re_detail{
|
||||
|
||||
#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__IBMCPP__)
|
||||
template <class InputIterator>
|
||||
inline u32regex do_make_u32regex(InputIterator i,
|
||||
InputIterator j,
|
||||
boost::regex_constants::syntax_option_type opt,
|
||||
const boost::mpl::int_<1>*)
|
||||
{
|
||||
typedef boost::u8_to_u32_iterator<InputIterator, UChar32> conv_type;
|
||||
return u32regex(conv_type(i), conv_type(j), opt);
|
||||
}
|
||||
|
||||
template <class InputIterator>
|
||||
inline u32regex do_make_u32regex(InputIterator i,
|
||||
InputIterator j,
|
||||
boost::regex_constants::syntax_option_type opt,
|
||||
const boost::mpl::int_<2>*)
|
||||
{
|
||||
typedef boost::u16_to_u32_iterator<InputIterator, UChar32> conv_type;
|
||||
return u32regex(conv_type(i), conv_type(j), opt);
|
||||
}
|
||||
|
||||
template <class InputIterator>
|
||||
inline u32regex do_make_u32regex(InputIterator i,
|
||||
InputIterator j,
|
||||
boost::regex_constants::syntax_option_type opt,
|
||||
const boost::mpl::int_<4>*)
|
||||
{
|
||||
return u32regex(i, j, opt);
|
||||
}
|
||||
#else
|
||||
template <class InputIterator>
|
||||
inline u32regex do_make_u32regex(InputIterator i,
|
||||
InputIterator j,
|
||||
boost::regex_constants::syntax_option_type opt,
|
||||
const boost::mpl::int_<1>*)
|
||||
{
|
||||
typedef boost::u8_to_u32_iterator<InputIterator, UChar32> conv_type;
|
||||
typedef std::vector<UChar32> vector_type;
|
||||
vector_type v;
|
||||
conv_type a(i), b(j);
|
||||
while(a != b)
|
||||
{
|
||||
v.push_back(*a);
|
||||
++a;
|
||||
}
|
||||
return u32regex(&*v.begin(), v.size(), opt);
|
||||
}
|
||||
|
||||
template <class InputIterator>
|
||||
inline u32regex do_make_u32regex(InputIterator i,
|
||||
InputIterator j,
|
||||
boost::regex_constants::syntax_option_type opt,
|
||||
const boost::mpl::int_<2>*)
|
||||
{
|
||||
typedef boost::u16_to_u32_iterator<InputIterator, UChar32> conv_type;
|
||||
typedef std::vector<UChar32> vector_type;
|
||||
vector_type v;
|
||||
conv_type a(i), b(j);
|
||||
while(a != b)
|
||||
{
|
||||
v.push_back(*a);
|
||||
++a;
|
||||
}
|
||||
return u32regex(&*v.begin(), v.size(), opt);
|
||||
}
|
||||
|
||||
template <class InputIterator>
|
||||
inline u32regex do_make_u32regex(InputIterator i,
|
||||
InputIterator j,
|
||||
boost::regex_constants::syntax_option_type opt,
|
||||
const boost::mpl::int_<4>*)
|
||||
{
|
||||
typedef std::vector<UCHAR32> vector_type;
|
||||
vector_type v;
|
||||
while(i != j)
|
||||
{
|
||||
v.push_back((UCHAR32)(*i));
|
||||
++a;
|
||||
}
|
||||
return u32regex(&*v.begin(), v.size(), opt);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
//
|
||||
// Construction from an iterator pair:
|
||||
//
|
||||
template <class InputIterator>
|
||||
inline u32regex make_u32regex(InputIterator i,
|
||||
InputIterator j,
|
||||
boost::regex_constants::syntax_option_type opt)
|
||||
{
|
||||
return re_detail::do_make_u32regex(i, j, opt, static_cast<boost::mpl::int_<sizeof(*i)> const*>(0));
|
||||
}
|
||||
//
|
||||
// construction from UTF-8 nul-terminated strings:
|
||||
//
|
||||
inline u32regex make_u32regex(const char* p, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
|
||||
{
|
||||
return re_detail::do_make_u32regex(p, p + std::strlen(p), opt, static_cast<boost::mpl::int_<1> const*>(0));
|
||||
}
|
||||
inline u32regex make_u32regex(const unsigned char* p, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
|
||||
{
|
||||
return re_detail::do_make_u32regex(p, p + std::strlen(reinterpret_cast<const char*>(p)), opt, static_cast<boost::mpl::int_<1> const*>(0));
|
||||
}
|
||||
//
|
||||
// construction from UTF-16 nul-terminated strings:
|
||||
//
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
inline u32regex make_u32regex(const wchar_t* p, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
|
||||
{
|
||||
return re_detail::do_make_u32regex(p, p + std::wcslen(p), opt, static_cast<boost::mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
#endif
|
||||
#ifndef U_WCHAR_IS_UTF16
|
||||
inline u32regex make_u32regex(const UChar* p, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
|
||||
{
|
||||
return re_detail::do_make_u32regex(p, p + u_strlen(p), opt, static_cast<boost::mpl::int_<2> const*>(0));
|
||||
}
|
||||
#endif
|
||||
//
|
||||
// construction from basic_string class-template:
|
||||
//
|
||||
template<class C, class T, class A>
|
||||
inline u32regex make_u32regex(const std::basic_string<C, T, A>& s, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
|
||||
{
|
||||
return re_detail::do_make_u32regex(s.begin(), s.end(), opt, static_cast<boost::mpl::int_<sizeof(C)> const*>(0));
|
||||
}
|
||||
//
|
||||
// Construction from ICU string type:
|
||||
//
|
||||
inline u32regex make_u32regex(const UnicodeString& s, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
|
||||
{
|
||||
return re_detail::do_make_u32regex(s.getBuffer(), s.getBuffer() + s.length(), opt, static_cast<boost::mpl::int_<2> const*>(0));
|
||||
}
|
||||
|
||||
//
|
||||
// regex_match overloads that widen the character type as appropriate:
|
||||
//
|
||||
namespace re_detail{
|
||||
template<class MR1, class MR2>
|
||||
void copy_results(MR1& out, MR2 const& in)
|
||||
{
|
||||
// copy results from an adapted MR2 match_results:
|
||||
out.set_size(in.size(), in.prefix().first.base(), in.suffix().second.base());
|
||||
out.set_base(in.base().base());
|
||||
for(int i = 0; i < (int)in.size(); ++i)
|
||||
{
|
||||
if(in[i].matched)
|
||||
{
|
||||
out.set_first(in[i].first.base(), i);
|
||||
out.set_second(in[i].second.base(), i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator>
|
||||
inline bool do_regex_match(BidiIterator first, BidiIterator last,
|
||||
match_results<BidiIterator, Allocator>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags,
|
||||
boost::mpl::int_<4> const*)
|
||||
{
|
||||
return ::boost::regex_match(first, last, m, e, flags);
|
||||
}
|
||||
template <class BidiIterator, class Allocator>
|
||||
bool do_regex_match(BidiIterator first, BidiIterator last,
|
||||
match_results<BidiIterator, Allocator>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags,
|
||||
boost::mpl::int_<2> const*)
|
||||
{
|
||||
typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;
|
||||
typedef match_results<conv_type> match_type;
|
||||
typedef typename match_type::allocator_type alloc_type;
|
||||
match_type what;
|
||||
bool result = ::boost::regex_match(conv_type(first), conv_type(last), what, e, flags);
|
||||
// copy results across to m:
|
||||
if(result) copy_results(m, what);
|
||||
return result;
|
||||
}
|
||||
template <class BidiIterator, class Allocator>
|
||||
bool do_regex_match(BidiIterator first, BidiIterator last,
|
||||
match_results<BidiIterator, Allocator>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags,
|
||||
boost::mpl::int_<1> const*)
|
||||
{
|
||||
typedef u8_to_u32_iterator<BidiIterator, UChar32> conv_type;
|
||||
typedef match_results<conv_type> match_type;
|
||||
typedef typename match_type::allocator_type alloc_type;
|
||||
match_type what;
|
||||
bool result = ::boost::regex_match(conv_type(first), conv_type(last), what, e, flags);
|
||||
// copy results across to m:
|
||||
if(result) copy_results(m, what);
|
||||
return result;
|
||||
}
|
||||
} // namespace re_detail
|
||||
|
||||
template <class BidiIterator, class Allocator>
|
||||
inline bool u32regex_match(BidiIterator first, BidiIterator last,
|
||||
match_results<BidiIterator, Allocator>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_match(first, last, m, e, flags, static_cast<mpl::int_<sizeof(*first)> const*>(0));
|
||||
}
|
||||
inline bool u32regex_match(const UChar* p,
|
||||
match_results<const UChar*>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0));
|
||||
}
|
||||
#if !defined(U_WCHAR_IS_UTF16) && !defined(BOOST_NO_WREGEX)
|
||||
inline bool u32regex_match(const wchar_t* p,
|
||||
match_results<const wchar_t*>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
#endif
|
||||
inline bool u32regex_match(const char* p,
|
||||
match_results<const char*>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
|
||||
}
|
||||
inline bool u32regex_match(const unsigned char* p,
|
||||
match_results<const unsigned char*>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
|
||||
}
|
||||
inline bool u32regex_match(const std::string& s,
|
||||
match_results<std::string::const_iterator>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<1> const*>(0));
|
||||
}
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
inline bool u32regex_match(const std::wstring& s,
|
||||
match_results<std::wstring::const_iterator>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
#endif
|
||||
inline bool u32regex_match(const UnicodeString& s,
|
||||
match_results<const UChar*>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_match(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
//
|
||||
// regex_match overloads that do not return what matched:
|
||||
//
|
||||
template <class BidiIterator>
|
||||
inline bool u32regex_match(BidiIterator first, BidiIterator last,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<BidiIterator> m;
|
||||
return re_detail::do_regex_match(first, last, m, e, flags, static_cast<mpl::int_<sizeof(*first)> const*>(0));
|
||||
}
|
||||
inline bool u32regex_match(const UChar* p,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<const UChar*> m;
|
||||
return re_detail::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0));
|
||||
}
|
||||
#if !defined(U_WCHAR_IS_UTF16) && !defined(BOOST_NO_WREGEX)
|
||||
inline bool u32regex_match(const wchar_t* p,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<const wchar_t*> m;
|
||||
return re_detail::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
#endif
|
||||
inline bool u32regex_match(const char* p,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<const char*> m;
|
||||
return re_detail::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
|
||||
}
|
||||
inline bool u32regex_match(const unsigned char* p,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<const unsigned char*> m;
|
||||
return re_detail::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
|
||||
}
|
||||
inline bool u32regex_match(const std::string& s,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<std::string::const_iterator> m;
|
||||
return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<1> const*>(0));
|
||||
}
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
inline bool u32regex_match(const std::wstring& s,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<std::wstring::const_iterator> m;
|
||||
return re_detail::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
#endif
|
||||
inline bool u32regex_match(const UnicodeString& s,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<const UChar*> m;
|
||||
return re_detail::do_regex_match(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
|
||||
//
|
||||
// regex_search overloads that widen the character type as appropriate:
|
||||
//
|
||||
namespace re_detail{
|
||||
template <class BidiIterator, class Allocator>
|
||||
inline bool do_regex_search(BidiIterator first, BidiIterator last,
|
||||
match_results<BidiIterator, Allocator>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags,
|
||||
boost::mpl::int_<4> const*)
|
||||
{
|
||||
return ::boost::regex_search(first, last, m, e, flags);
|
||||
}
|
||||
template <class BidiIterator, class Allocator>
|
||||
bool do_regex_search(BidiIterator first, BidiIterator last,
|
||||
match_results<BidiIterator, Allocator>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags,
|
||||
boost::mpl::int_<2> const*)
|
||||
{
|
||||
typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;
|
||||
typedef match_results<conv_type> match_type;
|
||||
typedef typename match_type::allocator_type alloc_type;
|
||||
match_type what;
|
||||
bool result = ::boost::regex_search(conv_type(first), conv_type(last), what, e, flags);
|
||||
// copy results across to m:
|
||||
if(result) copy_results(m, what);
|
||||
return result;
|
||||
}
|
||||
template <class BidiIterator, class Allocator>
|
||||
bool do_regex_search(BidiIterator first, BidiIterator last,
|
||||
match_results<BidiIterator, Allocator>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags,
|
||||
boost::mpl::int_<1> const*)
|
||||
{
|
||||
typedef u8_to_u32_iterator<BidiIterator, UChar32> conv_type;
|
||||
typedef match_results<conv_type> match_type;
|
||||
typedef typename match_type::allocator_type alloc_type;
|
||||
match_type what;
|
||||
bool result = ::boost::regex_search(conv_type(first), conv_type(last), what, e, flags);
|
||||
// copy results across to m:
|
||||
if(result) copy_results(m, what);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator>
|
||||
inline bool u32regex_search(BidiIterator first, BidiIterator last,
|
||||
match_results<BidiIterator, Allocator>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_search(first, last, m, e, flags, static_cast<mpl::int_<sizeof(*first)> const*>(0));
|
||||
}
|
||||
inline bool u32regex_search(const UChar* p,
|
||||
match_results<const UChar*>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_search(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0));
|
||||
}
|
||||
#if !defined(U_WCHAR_IS_UTF16) && !defined(BOOST_NO_WREGEX)
|
||||
inline bool u32regex_search(const wchar_t* p,
|
||||
match_results<const wchar_t*>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_search(p, p+std::wcslen(p), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
#endif
|
||||
inline bool u32regex_search(const char* p,
|
||||
match_results<const char*>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_search(p, p+std::strlen(p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
|
||||
}
|
||||
inline bool u32regex_search(const unsigned char* p,
|
||||
match_results<const unsigned char*>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
|
||||
}
|
||||
inline bool u32regex_search(const std::string& s,
|
||||
match_results<std::string::const_iterator>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<1> const*>(0));
|
||||
}
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
inline bool u32regex_search(const std::wstring& s,
|
||||
match_results<std::wstring::const_iterator>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
#endif
|
||||
inline bool u32regex_search(const UnicodeString& s,
|
||||
match_results<const UChar*>& m,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::do_regex_search(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
template <class BidiIterator>
|
||||
inline bool u32regex_search(BidiIterator first, BidiIterator last,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<BidiIterator> m;
|
||||
return re_detail::do_regex_search(first, last, m, e, flags, static_cast<mpl::int_<sizeof(*first)> const*>(0));
|
||||
}
|
||||
inline bool u32regex_search(const UChar* p,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<const UChar*> m;
|
||||
return re_detail::do_regex_search(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0));
|
||||
}
|
||||
#if !defined(U_WCHAR_IS_UTF16) && !defined(BOOST_NO_WREGEX)
|
||||
inline bool u32regex_search(const wchar_t* p,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<const wchar_t*> m;
|
||||
return re_detail::do_regex_search(p, p+std::wcslen(p), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
#endif
|
||||
inline bool u32regex_search(const char* p,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<const char*> m;
|
||||
return re_detail::do_regex_search(p, p+std::strlen(p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
|
||||
}
|
||||
inline bool u32regex_search(const unsigned char* p,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<const unsigned char*> m;
|
||||
return re_detail::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
|
||||
}
|
||||
inline bool u32regex_search(const std::string& s,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<std::string::const_iterator> m;
|
||||
return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<1> const*>(0));
|
||||
}
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
inline bool u32regex_search(const std::wstring& s,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<std::wstring::const_iterator> m;
|
||||
return re_detail::do_regex_search(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
#endif
|
||||
inline bool u32regex_search(const UnicodeString& s,
|
||||
const u32regex& e,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
match_results<const UChar*> m;
|
||||
return re_detail::do_regex_search(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
|
||||
}
|
||||
|
||||
//
|
||||
// overloads for regex_replace with utf-8 and utf-16 data types:
|
||||
//
|
||||
namespace re_detail{
|
||||
template <class I>
|
||||
inline std::pair< boost::u8_to_u32_iterator<I>, boost::u8_to_u32_iterator<I> >
|
||||
make_utf32_seq(I i, I j, mpl::int_<1> const*)
|
||||
{
|
||||
return std::pair< boost::u8_to_u32_iterator<I>, boost::u8_to_u32_iterator<I> >(boost::u8_to_u32_iterator<I>(i), boost::u8_to_u32_iterator<I>(j));
|
||||
}
|
||||
template <class I>
|
||||
inline std::pair< boost::u16_to_u32_iterator<I>, boost::u16_to_u32_iterator<I> >
|
||||
make_utf32_seq(I i, I j, mpl::int_<2> const*)
|
||||
{
|
||||
return std::pair< boost::u16_to_u32_iterator<I>, boost::u16_to_u32_iterator<I> >(boost::u16_to_u32_iterator<I>(i), boost::u16_to_u32_iterator<I>(j));
|
||||
}
|
||||
template <class I>
|
||||
inline std::pair< I, I >
|
||||
make_utf32_seq(I i, I j, mpl::int_<4> const*)
|
||||
{
|
||||
return std::pair< I, I >(i, j);
|
||||
}
|
||||
template <class charT>
|
||||
inline std::pair< boost::u8_to_u32_iterator<const charT*>, boost::u8_to_u32_iterator<const charT*> >
|
||||
make_utf32_seq(const charT* p, mpl::int_<1> const*)
|
||||
{
|
||||
return std::pair< boost::u8_to_u32_iterator<const charT*>, boost::u8_to_u32_iterator<const charT*> >(boost::u8_to_u32_iterator<const charT*>(p), boost::u8_to_u32_iterator<const charT*>(p+std::strlen((const char*)p)));
|
||||
}
|
||||
template <class charT>
|
||||
inline std::pair< boost::u16_to_u32_iterator<const charT*>, boost::u16_to_u32_iterator<const charT*> >
|
||||
make_utf32_seq(const charT* p, mpl::int_<2> const*)
|
||||
{
|
||||
return std::pair< boost::u16_to_u32_iterator<const charT*>, boost::u16_to_u32_iterator<const charT*> >(boost::u16_to_u32_iterator<const charT*>(p), boost::u16_to_u32_iterator<const charT*>(p+u_strlen((const UChar*)p)));
|
||||
}
|
||||
template <class charT>
|
||||
inline std::pair< const charT*, const charT* >
|
||||
make_utf32_seq(const charT* p, mpl::int_<4> const*)
|
||||
{
|
||||
return std::pair< const charT*, const charT* >(p, p+icu_regex_traits::length((UChar32 const*)p));
|
||||
}
|
||||
template <class OutputIterator>
|
||||
inline OutputIterator make_utf32_out(OutputIterator o, mpl::int_<4> const*)
|
||||
{
|
||||
return o;
|
||||
}
|
||||
template <class OutputIterator>
|
||||
inline utf16_output_iterator<OutputIterator> make_utf32_out(OutputIterator o, mpl::int_<2> const*)
|
||||
{
|
||||
return o;
|
||||
}
|
||||
template <class OutputIterator>
|
||||
inline utf8_output_iterator<OutputIterator> make_utf32_out(OutputIterator o, mpl::int_<1> const*)
|
||||
{
|
||||
return o;
|
||||
}
|
||||
|
||||
template <class OutputIterator, class I1, class I2>
|
||||
OutputIterator do_regex_replace(OutputIterator out,
|
||||
std::pair<I1, I1> const& in,
|
||||
const u32regex& e,
|
||||
const std::pair<I2, I2>& fmt,
|
||||
match_flag_type flags
|
||||
)
|
||||
{
|
||||
// unfortunately we have to copy the format string in order to pass in onward:
|
||||
std::vector<UChar32> f;
|
||||
#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
f.assign(fmt.first, fmt.second);
|
||||
#else
|
||||
f.clear();
|
||||
I2 pos = fmt.first;
|
||||
while(pos != fmt.second)
|
||||
f.push_back(*pos++);
|
||||
#endif
|
||||
|
||||
regex_iterator<I1, UChar32, icu_regex_traits> i(in.first, in.second, e, flags);
|
||||
regex_iterator<I1, UChar32, icu_regex_traits> j;
|
||||
if(i == j)
|
||||
{
|
||||
if(!(flags & regex_constants::format_no_copy))
|
||||
out = re_detail::copy(in.first, in.second, out);
|
||||
}
|
||||
else
|
||||
{
|
||||
I1 last_m = in.first;
|
||||
while(i != j)
|
||||
{
|
||||
if(!(flags & regex_constants::format_no_copy))
|
||||
out = re_detail::copy(i->prefix().first, i->prefix().second, out);
|
||||
out = ::boost::re_detail::regex_format_imp(out, *i, &*f.begin(), &*f.end(), flags, e.get_traits());
|
||||
last_m = (*i)[0].second;
|
||||
if(flags & regex_constants::format_first_only)
|
||||
break;
|
||||
++i;
|
||||
}
|
||||
if(!(flags & regex_constants::format_no_copy))
|
||||
out = re_detail::copy(last_m, in.second, out);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
template <class BaseIterator>
|
||||
inline const BaseIterator& extract_output_base(const BaseIterator& b)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
template <class BaseIterator>
|
||||
inline BaseIterator extract_output_base(const utf8_output_iterator<BaseIterator>& b)
|
||||
{
|
||||
return b.base();
|
||||
}
|
||||
template <class BaseIterator>
|
||||
inline BaseIterator extract_output_base(const utf16_output_iterator<BaseIterator>& b)
|
||||
{
|
||||
return b.base();
|
||||
}
|
||||
} // re_detail
|
||||
|
||||
template <class OutputIterator, class BidirectionalIterator, class charT>
|
||||
inline OutputIterator u32regex_replace(OutputIterator out,
|
||||
BidirectionalIterator first,
|
||||
BidirectionalIterator last,
|
||||
const u32regex& e,
|
||||
const charT* fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::extract_output_base
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
<OutputIterator>
|
||||
#endif
|
||||
(
|
||||
re_detail::do_regex_replace(
|
||||
re_detail::make_utf32_out(out, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
|
||||
re_detail::make_utf32_seq(first, last, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
|
||||
e,
|
||||
re_detail::make_utf32_seq(fmt, static_cast<mpl::int_<sizeof(*fmt)> const*>(0)),
|
||||
flags)
|
||||
);
|
||||
}
|
||||
|
||||
template <class OutputIterator, class Iterator, class charT>
|
||||
inline OutputIterator u32regex_replace(OutputIterator out,
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
const u32regex& e,
|
||||
const std::basic_string<charT>& fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::extract_output_base
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
<OutputIterator>
|
||||
#endif
|
||||
(
|
||||
re_detail::do_regex_replace(
|
||||
re_detail::make_utf32_out(out, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
|
||||
re_detail::make_utf32_seq(first, last, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
|
||||
e,
|
||||
re_detail::make_utf32_seq(fmt.begin(), fmt.end(), static_cast<mpl::int_<sizeof(charT)> const*>(0)),
|
||||
flags)
|
||||
);
|
||||
}
|
||||
|
||||
template <class OutputIterator, class Iterator>
|
||||
inline OutputIterator u32regex_replace(OutputIterator out,
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
const u32regex& e,
|
||||
const UnicodeString& fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return re_detail::extract_output_base
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
<OutputIterator>
|
||||
#endif
|
||||
(
|
||||
re_detail::do_regex_replace(
|
||||
re_detail::make_utf32_out(out, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
|
||||
re_detail::make_utf32_seq(first, last, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
|
||||
e,
|
||||
re_detail::make_utf32_seq(fmt.getBuffer(), fmt.getBuffer() + fmt.length(), static_cast<mpl::int_<2> const*>(0)),
|
||||
flags)
|
||||
);
|
||||
}
|
||||
|
||||
template <class charT>
|
||||
std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s,
|
||||
const u32regex& e,
|
||||
const charT* fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
|
||||
u32regex_replace(i, s.begin(), s.end(), e, fmt, flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class charT>
|
||||
std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s,
|
||||
const u32regex& e,
|
||||
const std::basic_string<charT>& fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
|
||||
u32regex_replace(i, s.begin(), s.end(), e, fmt.c_str(), flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
class unicode_string_out_iterator
|
||||
{
|
||||
UnicodeString* out;
|
||||
public:
|
||||
unicode_string_out_iterator(UnicodeString& s) : out(&s) {}
|
||||
unicode_string_out_iterator& operator++() { return *this; }
|
||||
unicode_string_out_iterator& operator++(int) { return *this; }
|
||||
unicode_string_out_iterator& operator*() { return *this; }
|
||||
unicode_string_out_iterator& operator=(UChar v)
|
||||
{
|
||||
*out += v;
|
||||
return *this;
|
||||
}
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef UChar value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
typedef std::output_iterator_tag iterator_category;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
inline UnicodeString u32regex_replace(const UnicodeString& s,
|
||||
const u32regex& e,
|
||||
const UChar* fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
UnicodeString result;
|
||||
re_detail::unicode_string_out_iterator i(result);
|
||||
u32regex_replace(i, s.getBuffer(), s.getBuffer()+s.length(), e, fmt, flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
inline UnicodeString u32regex_replace(const UnicodeString& s,
|
||||
const u32regex& e,
|
||||
const UnicodeString& fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
UnicodeString result;
|
||||
re_detail::unicode_string_out_iterator i(result);
|
||||
re_detail::do_regex_replace(
|
||||
re_detail::make_utf32_out(i, static_cast<mpl::int_<2> const*>(0)),
|
||||
re_detail::make_utf32_seq(s.getBuffer(), s.getBuffer()+s.length(), static_cast<mpl::int_<2> const*>(0)),
|
||||
e,
|
||||
re_detail::make_utf32_seq(fmt.getBuffer(), fmt.getBuffer() + fmt.length(), static_cast<mpl::int_<2> const*>(0)),
|
||||
flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace boost.
|
||||
|
||||
#include <boost/regex/v4/u32regex_iterator.hpp>
|
||||
#include <boost/regex/v4/u32regex_token_iterator.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,190 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE mfc.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Overloads and helpers for using MFC/ATL string types with Boost.Regex.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_MFC_HPP
|
||||
#define BOOST_REGEX_MFC_HPP
|
||||
|
||||
#include <atlsimpstr.h>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
//
|
||||
// define the types used for TCHAR's:
|
||||
typedef basic_regex<TCHAR> tregex;
|
||||
typedef match_results<TCHAR const*> tmatch;
|
||||
typedef regex_iterator<TCHAR const*> tregex_iterator;
|
||||
typedef regex_token_iterator<TCHAR const*> tregex_token_iterator;
|
||||
|
||||
#if _MSC_VER >= 1310
|
||||
#define SIMPLE_STRING_PARAM class B, bool b
|
||||
#define SIMPLE_STRING_ARG_LIST B, b
|
||||
#else
|
||||
#define SIMPLE_STRING_PARAM class B
|
||||
#define SIMPLE_STRING_ARG_LIST B
|
||||
#endif
|
||||
|
||||
//
|
||||
// define regex creation functions:
|
||||
//
|
||||
template <SIMPLE_STRING_PARAM>
|
||||
inline basic_regex<B>
|
||||
make_regex(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s, ::boost::regex_constants::syntax_option_type f = boost::regex_constants::normal)
|
||||
{
|
||||
basic_regex<B> result(s.GetString(), s.GetString() + s.GetLength(), f);
|
||||
return result;
|
||||
}
|
||||
//
|
||||
// regex_match overloads:
|
||||
//
|
||||
template <SIMPLE_STRING_PARAM, class A, class T>
|
||||
inline bool regex_match(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s,
|
||||
match_results<const B*, A>& what,
|
||||
const basic_regex<B, T>& e,
|
||||
boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
|
||||
{
|
||||
return ::boost::regex_match(s.GetString(),
|
||||
s.GetString() + s.GetLength(),
|
||||
what,
|
||||
e,
|
||||
f);
|
||||
}
|
||||
|
||||
template <SIMPLE_STRING_PARAM, class T>
|
||||
inline bool regex_match(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s,
|
||||
const basic_regex<B, T>& e,
|
||||
boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
|
||||
{
|
||||
return ::boost::regex_match(s.GetString(),
|
||||
s.GetString() + s.GetLength(),
|
||||
e,
|
||||
f);
|
||||
}
|
||||
//
|
||||
// regex_search overloads:
|
||||
//
|
||||
template <SIMPLE_STRING_PARAM, class A, class T>
|
||||
inline bool regex_search(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s,
|
||||
match_results<const B*, A>& what,
|
||||
const basic_regex<B, T>& e,
|
||||
boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
|
||||
{
|
||||
return ::boost::regex_search(s.GetString(),
|
||||
s.GetString() + s.GetLength(),
|
||||
what,
|
||||
e,
|
||||
f);
|
||||
}
|
||||
|
||||
template <SIMPLE_STRING_PARAM, class T>
|
||||
inline bool regex_search(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s,
|
||||
const basic_regex<B, T>& e,
|
||||
boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
|
||||
{
|
||||
return ::boost::regex_search(s.GetString(),
|
||||
s.GetString() + s.GetLength(),
|
||||
e,
|
||||
f);
|
||||
}
|
||||
//
|
||||
// regex_iterator creation:
|
||||
//
|
||||
template <SIMPLE_STRING_PARAM>
|
||||
inline regex_iterator<B const*>
|
||||
make_regex_iterator(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s, const basic_regex<B>& e, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
|
||||
{
|
||||
regex_iterator<B const*> result(s.GetString(), s.GetString() + s.GetLength(), e, f);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <SIMPLE_STRING_PARAM>
|
||||
inline regex_token_iterator<B const*>
|
||||
make_regex_token_iterator(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s, const basic_regex<B>& e, int sub = 0, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
|
||||
{
|
||||
regex_token_iterator<B const*> result(s.GetString(), s.GetString() + s.GetLength(), e, sub, f);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <SIMPLE_STRING_PARAM>
|
||||
inline regex_token_iterator<B const*>
|
||||
make_regex_token_iterator(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s, const basic_regex<B>& e, const std::vector<int>& subs, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
|
||||
{
|
||||
regex_token_iterator<B const*> result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <SIMPLE_STRING_PARAM, std::size_t N>
|
||||
inline regex_token_iterator<B const*>
|
||||
make_regex_token_iterator(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s, const basic_regex<B>& e, const int (& subs)[N], ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default)
|
||||
{
|
||||
regex_token_iterator<B const*> result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class OutputIterator, class BidirectionalIterator, class traits,
|
||||
SIMPLE_STRING_PARAM>
|
||||
OutputIterator regex_replace(OutputIterator out,
|
||||
BidirectionalIterator first,
|
||||
BidirectionalIterator last,
|
||||
const basic_regex<B, traits>& e,
|
||||
const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
return ::boost::regex_replace(out, first, last, e, fmt.GetString(), flags);
|
||||
}
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
template <SIMPLE_STRING_PARAM>
|
||||
class mfc_string_out_iterator
|
||||
{
|
||||
ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>* out;
|
||||
public:
|
||||
mfc_string_out_iterator(ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s) : out(&s) {}
|
||||
mfc_string_out_iterator& operator++() { return *this; }
|
||||
mfc_string_out_iterator& operator++(int) { return *this; }
|
||||
mfc_string_out_iterator& operator*() { return *this; }
|
||||
mfc_string_out_iterator& operator=(B v)
|
||||
{
|
||||
out->AppendChar(v);
|
||||
return *this;
|
||||
}
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef B value_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
typedef std::output_iterator_tag iterator_category;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template <class traits, SIMPLE_STRING_PARAM>
|
||||
ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST> regex_replace(const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& s,
|
||||
const basic_regex<B, traits>& e,
|
||||
const ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST>& fmt,
|
||||
match_flag_type flags = match_default)
|
||||
{
|
||||
ATL::CSimpleStringT<SIMPLE_STRING_ARG_LIST> result(s.GetManager());
|
||||
re_detail::mfc_string_out_iterator<SIMPLE_STRING_ARG_LIST> i(result);
|
||||
regex_replace(i, s.GetString(), s.GetString() + s.GetLength(), e, fmt.GetString(), flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace boost.
|
||||
|
||||
#endif
|
||||
@@ -1,55 +1,83 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE pattern_except.cpp
|
||||
* VERSION 3.12
|
||||
* FILE pattern_except.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares pattern-matching exception classes.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RE_PAT_EXCEPT_HPP
|
||||
#define BOOST_RE_PAT_EXCEPT_HPP
|
||||
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
#include <stdexcept>
|
||||
#include <cstddef>
|
||||
#include <boost/regex/v4/error_type.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
class BOOST_RE_IX_DECL bad_pattern : public std::runtime_error
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4275)
|
||||
#endif
|
||||
class BOOST_REGEX_DECL regex_error : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
explicit bad_pattern(const std::string& s) : std::runtime_error(s){};
|
||||
~bad_pattern() throw();
|
||||
explicit regex_error(const std::string& s, regex_constants::error_type err = regex_constants::error_unknown, std::ptrdiff_t pos = 0);
|
||||
explicit regex_error(regex_constants::error_type err);
|
||||
~regex_error() throw();
|
||||
regex_constants::error_type code()const
|
||||
{ return m_error_code; }
|
||||
std::ptrdiff_t position()const
|
||||
{ return m_position; }
|
||||
void raise()const;
|
||||
private:
|
||||
regex_constants::error_type m_error_code;
|
||||
std::ptrdiff_t m_position;
|
||||
};
|
||||
|
||||
class BOOST_RE_IX_DECL bad_expression : public bad_pattern
|
||||
typedef regex_error bad_pattern;
|
||||
typedef regex_error bad_expression;
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL raise_runtime_error(const std::runtime_error& ex);
|
||||
|
||||
template <class traits>
|
||||
void raise_error(const traits& t, regex_constants::error_type code)
|
||||
{
|
||||
public:
|
||||
explicit bad_expression(const std::string& s) : bad_pattern(s) {}
|
||||
~bad_expression() throw();
|
||||
};
|
||||
(void)t; // warning suppression
|
||||
std::runtime_error e(t.error_string(code));
|
||||
::boost::re_detail::raise_runtime_error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE object_cache.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Implements a generic object cache.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_OBJECT_CACHE_HPP
|
||||
#define BOOST_REGEX_OBJECT_CACHE_HPP
|
||||
|
||||
#include <map>
|
||||
#include <list>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
#include <boost/regex/pending/static_mutex.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
|
||||
template <class Key, class Object>
|
||||
class object_cache
|
||||
{
|
||||
public:
|
||||
typedef std::pair< ::boost::shared_ptr<Object>, Key const*> value_type;
|
||||
typedef std::list<value_type> list_type;
|
||||
typedef typename list_type::iterator list_iterator;
|
||||
typedef std::map<Key, list_iterator> map_type;
|
||||
typedef typename map_type::iterator map_iterator;
|
||||
typedef typename list_type::size_type size_type;
|
||||
static boost::shared_ptr<Object> get(const Key& k, size_type max_cache_size);
|
||||
|
||||
private:
|
||||
static boost::shared_ptr<Object> do_get(const Key& k, size_type max_cache_size);
|
||||
|
||||
struct data
|
||||
{
|
||||
list_type cont;
|
||||
map_type index;
|
||||
};
|
||||
|
||||
// Needed by compilers not implementing the resolution to DR45. For reference,
|
||||
// see http://www.open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#45.
|
||||
friend struct data;
|
||||
};
|
||||
|
||||
template <class Key, class Object>
|
||||
boost::shared_ptr<Object> object_cache<Key, Object>::get(const Key& k, size_type max_cache_size)
|
||||
{
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
static boost::static_mutex mut = BOOST_STATIC_MUTEX_INIT;
|
||||
|
||||
boost::static_mutex::scoped_lock l(mut);
|
||||
if(l)
|
||||
{
|
||||
return do_get(k, max_cache_size);
|
||||
}
|
||||
//
|
||||
// what do we do if the lock fails?
|
||||
// for now just throw, but we should never really get here...
|
||||
//
|
||||
::boost::throw_exception(std::runtime_error("Error in thread safety code: could not acquire a lock"));
|
||||
return boost::shared_ptr<Object>();
|
||||
#else
|
||||
return do_get(k, max_cache_size);
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class Key, class Object>
|
||||
boost::shared_ptr<Object> object_cache<Key, Object>::do_get(const Key& k, size_type max_cache_size)
|
||||
{
|
||||
typedef typename object_cache<Key, Object>::data object_data;
|
||||
typedef typename list_type::size_type list_size_type;
|
||||
static object_data s_data;
|
||||
|
||||
//
|
||||
// see if the object is already in the cache:
|
||||
//
|
||||
map_iterator mpos = s_data.index.find(k);
|
||||
if(mpos != s_data.index.end())
|
||||
{
|
||||
//
|
||||
// Eureka!
|
||||
// We have a cached item, bump it up the list and return it:
|
||||
//
|
||||
if(--(s_data.cont.end()) != mpos->second)
|
||||
{
|
||||
// splice out the item we want to move:
|
||||
list_type temp;
|
||||
temp.splice(temp.end(), s_data.cont, mpos->second);
|
||||
// and now place it at the end of the list:
|
||||
s_data.cont.splice(s_data.cont.end(), temp, temp.begin());
|
||||
BOOST_ASSERT(*(s_data.cont.back().second) == k);
|
||||
// update index with new position:
|
||||
mpos->second = --(s_data.cont.end());
|
||||
BOOST_ASSERT(&(mpos->first) == mpos->second->second);
|
||||
BOOST_ASSERT(&(mpos->first) == s_data.cont.back().second);
|
||||
}
|
||||
return s_data.cont.back().first;
|
||||
}
|
||||
//
|
||||
// if we get here then the item is not in the cache,
|
||||
// so create it:
|
||||
//
|
||||
boost::shared_ptr<Object> result(new Object(k));
|
||||
//
|
||||
// Add it to the list, and index it:
|
||||
//
|
||||
s_data.cont.push_back(value_type(result, 0));
|
||||
s_data.index.insert(std::make_pair(k, --(s_data.cont.end())));
|
||||
s_data.cont.back().second = &(s_data.index.find(k)->first);
|
||||
list_size_type s = s_data.cont.size();
|
||||
BOOST_ASSERT(s_data.index[k]->first.get() == result.get());
|
||||
BOOST_ASSERT(&(s_data.index.find(k)->first) == s_data.cont.back().second);
|
||||
BOOST_ASSERT(s_data.index.find(k)->first == k);
|
||||
if(s > max_cache_size)
|
||||
{
|
||||
//
|
||||
// We have too many items in the list, so we need to start
|
||||
// popping them off the back of the list, but only if they're
|
||||
// being held uniquely by us:
|
||||
//
|
||||
list_iterator pos = s_data.cont.begin();
|
||||
list_iterator last = s_data.cont.end();
|
||||
while((pos != last) && (s > max_cache_size))
|
||||
{
|
||||
if(pos->first.unique())
|
||||
{
|
||||
list_iterator condemmed(pos);
|
||||
++pos;
|
||||
// now remove the items from our containers,
|
||||
// then order has to be as follows:
|
||||
BOOST_ASSERT(s_data.index.find(*(condemmed->second)) != s_data.index.end());
|
||||
s_data.index.erase(*(condemmed->second));
|
||||
s_data.cont.erase(condemmed);
|
||||
--s;
|
||||
}
|
||||
else
|
||||
--pos;
|
||||
}
|
||||
BOOST_ASSERT(s_data.index[k]->first.get() == result.get());
|
||||
BOOST_ASSERT(&(s_data.index.find(k)->first) == s_data.cont.back().second);
|
||||
BOOST_ASSERT(s_data.index.find(k)->first == k);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,177 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE static_mutex.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares static_mutex lock type, there are three different
|
||||
* implementations: POSIX pthreads, WIN32 threads, and portable,
|
||||
* these are described in more detail below.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_STATIC_MUTEX_HPP
|
||||
#define BOOST_REGEX_STATIC_MUTEX_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/regex/config.hpp> // dll import/export options.
|
||||
|
||||
#ifdef BOOST_HAS_PTHREADS
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PTHREADS) && defined(PTHREAD_MUTEX_INITIALIZER)
|
||||
//
|
||||
// pthreads version:
|
||||
// simple wrap around a pthread_mutex_t initialized with
|
||||
// PTHREAD_MUTEX_INITIALIZER.
|
||||
//
|
||||
namespace boost{
|
||||
|
||||
class BOOST_REGEX_DECL scoped_static_mutex_lock;
|
||||
|
||||
class static_mutex
|
||||
{
|
||||
public:
|
||||
typedef scoped_static_mutex_lock scoped_lock;
|
||||
pthread_mutex_t m_mutex;
|
||||
};
|
||||
|
||||
#define BOOST_STATIC_MUTEX_INIT { PTHREAD_MUTEX_INITIALIZER, }
|
||||
|
||||
class BOOST_REGEX_DECL scoped_static_mutex_lock
|
||||
{
|
||||
public:
|
||||
scoped_static_mutex_lock(static_mutex& mut, bool lk = true);
|
||||
~scoped_static_mutex_lock();
|
||||
inline bool locked()const
|
||||
{
|
||||
return m_have_lock;
|
||||
}
|
||||
inline operator void const*()const
|
||||
{
|
||||
return locked() ? this : 0;
|
||||
}
|
||||
void lock();
|
||||
void unlock();
|
||||
private:
|
||||
static_mutex& m_mutex;
|
||||
bool m_have_lock;
|
||||
};
|
||||
|
||||
|
||||
} // namespace boost
|
||||
#elif defined(BOOST_HAS_WINTHREADS)
|
||||
//
|
||||
// Win32 version:
|
||||
// Use a 32-bit int as a lock, along with a test-and-set
|
||||
// implementation using InterlockedCompareExchange.
|
||||
//
|
||||
|
||||
#include <boost/cstdint.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
class BOOST_REGEX_DECL scoped_static_mutex_lock;
|
||||
|
||||
class static_mutex
|
||||
{
|
||||
public:
|
||||
typedef scoped_static_mutex_lock scoped_lock;
|
||||
boost::int32_t m_mutex;
|
||||
};
|
||||
|
||||
#define BOOST_STATIC_MUTEX_INIT { 0, }
|
||||
|
||||
class BOOST_REGEX_DECL scoped_static_mutex_lock
|
||||
{
|
||||
public:
|
||||
scoped_static_mutex_lock(static_mutex& mut, bool lk = true);
|
||||
~scoped_static_mutex_lock();
|
||||
operator void const*()const;
|
||||
bool locked()const;
|
||||
void lock();
|
||||
void unlock();
|
||||
private:
|
||||
static_mutex& m_mutex;
|
||||
bool m_have_lock;
|
||||
scoped_static_mutex_lock(const scoped_static_mutex_lock&);
|
||||
scoped_static_mutex_lock& operator=(const scoped_static_mutex_lock&);
|
||||
};
|
||||
|
||||
inline scoped_static_mutex_lock::operator void const*()const
|
||||
{
|
||||
return locked() ? this : 0;
|
||||
}
|
||||
|
||||
inline bool scoped_static_mutex_lock::locked()const
|
||||
{
|
||||
return m_have_lock;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
#else
|
||||
//
|
||||
// Portable version of a static mutex based on Boost.Thread library:
|
||||
// This has to use a single mutex shared by all instances of static_mutex
|
||||
// because boost::call_once doesn't alow us to pass instance information
|
||||
// down to the initialisation proceedure. In fact the initialisation routine
|
||||
// may need to be called more than once - but only once per instance.
|
||||
//
|
||||
#include <boost/thread/once.hpp>
|
||||
#include <boost/thread/recursive_mutex.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
class BOOST_REGEX_DECL scoped_static_mutex_lock;
|
||||
extern "C" BOOST_REGEX_DECL void free_static_mutex();
|
||||
|
||||
class BOOST_REGEX_DECL static_mutex
|
||||
{
|
||||
public:
|
||||
typedef scoped_static_mutex_lock scoped_lock;
|
||||
static void init();
|
||||
static boost::recursive_mutex* m_pmutex;
|
||||
static boost::once_flag m_once;
|
||||
};
|
||||
|
||||
#define BOOST_STATIC_MUTEX_INIT { }
|
||||
|
||||
class BOOST_REGEX_DECL scoped_static_mutex_lock
|
||||
{
|
||||
public:
|
||||
scoped_static_mutex_lock(static_mutex& mut, bool lk = true);
|
||||
~scoped_static_mutex_lock();
|
||||
operator void const*()const;
|
||||
bool locked()const;
|
||||
void lock();
|
||||
void unlock();
|
||||
private:
|
||||
boost::recursive_mutex::scoped_lock* m_plock;
|
||||
bool m_have_lock;
|
||||
};
|
||||
|
||||
inline scoped_static_mutex_lock::operator void const*()const
|
||||
{
|
||||
return locked() ? this : 0;
|
||||
}
|
||||
|
||||
inline bool scoped_static_mutex_lock::locked()const
|
||||
{
|
||||
return m_have_lock;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,689 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE unicode_iterator.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Iterator adapters for converting between different Unicode encodings.
|
||||
*/
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Contents:
|
||||
~~~~~~~~~
|
||||
|
||||
1) Read Only, Input Adapters:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
template <class BaseIterator, class U8Type = ::boost::uint8_t>
|
||||
class u32_to_u8_iterator;
|
||||
|
||||
Adapts sequence of UTF-32 code points to "look like" a sequence of UTF-8.
|
||||
|
||||
template <class BaseIterator, class U32Type = ::boost::uint32_t>
|
||||
class u8_to_u32_iterator;
|
||||
|
||||
Adapts sequence of UTF-8 code points to "look like" a sequence of UTF-32.
|
||||
|
||||
template <class BaseIterator, class U16Type = ::boost::uint16_t>
|
||||
class u32_to_u16_iterator;
|
||||
|
||||
Adapts sequence of UTF-32 code points to "look like" a sequence of UTF-16.
|
||||
|
||||
template <class BaseIterator, class U32Type = ::boost::uint32_t>
|
||||
class u16_to_u32_iterator;
|
||||
|
||||
Adapts sequence of UTF-16 code points to "look like" a sequence of UTF-32.
|
||||
|
||||
2) Single pass output iterator adapters:
|
||||
|
||||
template <class BaseIterator>
|
||||
class utf8_output_iterator;
|
||||
|
||||
Accepts UTF-32 code points and forwards them on as UTF-8 code points.
|
||||
|
||||
template <class BaseIterator>
|
||||
class utf16_output_iterator;
|
||||
|
||||
Accepts UTF-32 code points and forwards them on as UTF-16 code points.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef BOOST_REGEX_UNICODE_ITERATOR_HPP
|
||||
#define BOOST_REGEX_UNICODE_ITERATOR_HPP
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <stdexcept>
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
#include <sstream>
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace detail{
|
||||
|
||||
static const ::boost::uint16_t high_surrogate_base = 0xD7C0u;
|
||||
static const ::boost::uint16_t low_surrogate_base = 0xDC00u;
|
||||
static const ::boost::uint32_t ten_bit_mask = 0x3FFu;
|
||||
|
||||
inline bool is_high_surrogate(::boost::uint16_t v)
|
||||
{
|
||||
return (v & 0xFC00u) == 0xd800u;
|
||||
}
|
||||
inline bool is_low_surrogate(::boost::uint16_t v)
|
||||
{
|
||||
return (v & 0xFC00u) == 0xdc00u;
|
||||
}
|
||||
template <class T>
|
||||
inline bool is_surrogate(T v)
|
||||
{
|
||||
return (v & 0xF800u) == 0xd800;
|
||||
}
|
||||
|
||||
inline unsigned utf8_byte_count(boost::uint8_t c)
|
||||
{
|
||||
// if the most significant bit with a zero in it is in position
|
||||
// 8-N then there are N bytes in this UTF-8 sequence:
|
||||
boost::uint8_t mask = 0x80u;
|
||||
unsigned result = 0;
|
||||
while(c & mask)
|
||||
{
|
||||
++result;
|
||||
mask >>= 1;
|
||||
}
|
||||
return (result == 0) ? 1 : ((result > 4) ? 4 : result);
|
||||
}
|
||||
|
||||
inline unsigned utf8_trailing_byte_count(boost::uint8_t c)
|
||||
{
|
||||
return utf8_byte_count(c) - 1;
|
||||
}
|
||||
|
||||
inline void invalid_utf32_code_point(::boost::uint32_t val)
|
||||
{
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
std::stringstream ss;
|
||||
ss << "Invalid UTF-32 code point U+" << std::showbase << std::hex << val << " encountered while trying to encode UTF-16 sequence";
|
||||
std::out_of_range e(ss.str());
|
||||
#else
|
||||
std::out_of_range e("Invalid UTF-32 code point encountered while trying to encode UTF-16 sequence");
|
||||
#endif
|
||||
boost::throw_exception(e);
|
||||
}
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <class BaseIterator, class U16Type = ::boost::uint16_t>
|
||||
class u32_to_u16_iterator
|
||||
: public boost::iterator_facade<u32_to_u16_iterator<BaseIterator, U16Type>, U16Type, std::bidirectional_iterator_tag, const U16Type>
|
||||
{
|
||||
typedef boost::iterator_facade<u32_to_u16_iterator<BaseIterator, U16Type>, U16Type, std::bidirectional_iterator_tag, const U16Type> base_type;
|
||||
|
||||
#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
typedef typename std::iterator_traits<BaseIterator>::value_type base_value_type;
|
||||
|
||||
BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 32);
|
||||
BOOST_STATIC_ASSERT(sizeof(U16Type)*CHAR_BIT == 16);
|
||||
#endif
|
||||
|
||||
public:
|
||||
typename base_type::reference
|
||||
dereference()const
|
||||
{
|
||||
if(m_current == 2)
|
||||
extract_current();
|
||||
return m_values[m_current];
|
||||
}
|
||||
bool equal(const u32_to_u16_iterator& that)const
|
||||
{
|
||||
if(m_position == that.m_position)
|
||||
{
|
||||
// Both m_currents must be equal, or both even
|
||||
// this is the same as saying their sum must be even:
|
||||
return (m_current + that.m_current) & 1u ? false : true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
void increment()
|
||||
{
|
||||
// if we have a pending read then read now, so that we know whether
|
||||
// to skip a position, or move to a low-surrogate:
|
||||
if(m_current == 2)
|
||||
{
|
||||
// pending read:
|
||||
extract_current();
|
||||
}
|
||||
// move to the next surrogate position:
|
||||
++m_current;
|
||||
// if we've reached the end skip a position:
|
||||
if(m_values[m_current] == 0)
|
||||
{
|
||||
m_current = 2;
|
||||
++m_position;
|
||||
}
|
||||
}
|
||||
void decrement()
|
||||
{
|
||||
if(m_current != 1)
|
||||
{
|
||||
// decrementing an iterator always leads to a valid position:
|
||||
--m_position;
|
||||
extract_current();
|
||||
m_current = m_values[1] ? 1 : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_current = 0;
|
||||
}
|
||||
}
|
||||
BaseIterator base()const
|
||||
{
|
||||
return m_position;
|
||||
}
|
||||
// construct:
|
||||
u32_to_u16_iterator() : m_position(), m_current(0)
|
||||
{
|
||||
m_values[0] = 0;
|
||||
m_values[1] = 0;
|
||||
m_values[2] = 0;
|
||||
}
|
||||
u32_to_u16_iterator(BaseIterator b) : m_position(b), m_current(2)
|
||||
{
|
||||
m_values[0] = 0;
|
||||
m_values[1] = 0;
|
||||
m_values[2] = 0;
|
||||
}
|
||||
private:
|
||||
|
||||
void extract_current()const
|
||||
{
|
||||
// begin by checking for a code point out of range:
|
||||
::boost::uint32_t v = *m_position;
|
||||
if(v >= 0x10000u)
|
||||
{
|
||||
if(v > 0x10FFFFu)
|
||||
detail::invalid_utf32_code_point(*m_position);
|
||||
// split into two surrogates:
|
||||
m_values[0] = static_cast<U16Type>(v >> 10) + detail::high_surrogate_base;
|
||||
m_values[1] = static_cast<U16Type>(v & detail::ten_bit_mask) + detail::low_surrogate_base;
|
||||
m_current = 0;
|
||||
BOOST_ASSERT(detail::is_high_surrogate(m_values[0]));
|
||||
BOOST_ASSERT(detail::is_low_surrogate(m_values[1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
// 16-bit code point:
|
||||
m_values[0] = static_cast<U16Type>(*m_position);
|
||||
m_values[1] = 0;
|
||||
m_current = 0;
|
||||
// value must not be a surrogate:
|
||||
if(detail::is_surrogate(m_values[0]))
|
||||
detail::invalid_utf32_code_point(*m_position);
|
||||
}
|
||||
}
|
||||
BaseIterator m_position;
|
||||
mutable U16Type m_values[3];
|
||||
mutable unsigned m_current;
|
||||
};
|
||||
|
||||
template <class BaseIterator, class U32Type = ::boost::uint32_t>
|
||||
class u16_to_u32_iterator
|
||||
: public boost::iterator_facade<u16_to_u32_iterator<BaseIterator, U32Type>, U32Type, std::bidirectional_iterator_tag, const U32Type>
|
||||
{
|
||||
typedef boost::iterator_facade<u16_to_u32_iterator<BaseIterator, U32Type>, U32Type, std::bidirectional_iterator_tag, const U32Type> base_type;
|
||||
// special values for pending iterator reads:
|
||||
BOOST_STATIC_CONSTANT(U32Type, pending_read = 0xffffffffu);
|
||||
|
||||
#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
typedef typename std::iterator_traits<BaseIterator>::value_type base_value_type;
|
||||
|
||||
BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 16);
|
||||
BOOST_STATIC_ASSERT(sizeof(U32Type)*CHAR_BIT == 32);
|
||||
#endif
|
||||
|
||||
public:
|
||||
typename base_type::reference
|
||||
dereference()const
|
||||
{
|
||||
if(m_value == pending_read)
|
||||
extract_current();
|
||||
return m_value;
|
||||
}
|
||||
bool equal(const u16_to_u32_iterator& that)const
|
||||
{
|
||||
return m_position == that.m_position;
|
||||
}
|
||||
void increment()
|
||||
{
|
||||
// skip high surrogate first if there is one:
|
||||
if(detail::is_high_surrogate(*m_position)) ++m_position;
|
||||
++m_position;
|
||||
m_value = pending_read;
|
||||
}
|
||||
void decrement()
|
||||
{
|
||||
--m_position;
|
||||
// if we have a low surrogate then go back one more:
|
||||
if(detail::is_low_surrogate(*m_position))
|
||||
--m_position;
|
||||
m_value = pending_read;
|
||||
}
|
||||
BaseIterator base()const
|
||||
{
|
||||
return m_position;
|
||||
}
|
||||
// construct:
|
||||
u16_to_u32_iterator() : m_position()
|
||||
{
|
||||
m_value = pending_read;
|
||||
}
|
||||
u16_to_u32_iterator(BaseIterator b) : m_position(b)
|
||||
{
|
||||
m_value = pending_read;
|
||||
}
|
||||
private:
|
||||
static void invalid_code_point(::boost::uint16_t val)
|
||||
{
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
std::stringstream ss;
|
||||
ss << "Misplaced UTF-16 surrogate U+" << std::showbase << std::hex << val << " encountered while trying to encode UTF-32 sequence";
|
||||
std::out_of_range e(ss.str());
|
||||
#else
|
||||
std::out_of_range e("Misplaced UTF-16 surrogate encountered while trying to encode UTF-32 sequence");
|
||||
#endif
|
||||
boost::throw_exception(e);
|
||||
}
|
||||
void extract_current()const
|
||||
{
|
||||
m_value = static_cast<U32Type>(static_cast< ::boost::uint16_t>(*m_position));
|
||||
// if the last value is a high surrogate then adjust m_position and m_value as needed:
|
||||
if(detail::is_high_surrogate(*m_position))
|
||||
{
|
||||
// precondition; next value must have be a low-surrogate:
|
||||
BaseIterator next(m_position);
|
||||
::boost::uint16_t t = *++next;
|
||||
if((t & 0xFC00u) != 0xDC00u)
|
||||
invalid_code_point(t);
|
||||
m_value = (m_value - detail::high_surrogate_base) << 10;
|
||||
m_value |= (static_cast<U32Type>(static_cast< ::boost::uint16_t>(t)) & detail::ten_bit_mask);
|
||||
}
|
||||
// postcondition; result must not be a surrogate:
|
||||
if(detail::is_surrogate(m_value))
|
||||
invalid_code_point(static_cast< ::boost::uint16_t>(m_value));
|
||||
}
|
||||
BaseIterator m_position;
|
||||
mutable U32Type m_value;
|
||||
};
|
||||
|
||||
template <class BaseIterator, class U8Type = ::boost::uint8_t>
|
||||
class u32_to_u8_iterator
|
||||
: public boost::iterator_facade<u32_to_u8_iterator<BaseIterator, U8Type>, U8Type, std::bidirectional_iterator_tag, const U8Type>
|
||||
{
|
||||
typedef boost::iterator_facade<u32_to_u8_iterator<BaseIterator, U8Type>, U8Type, std::bidirectional_iterator_tag, const U8Type> base_type;
|
||||
|
||||
#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
typedef typename std::iterator_traits<BaseIterator>::value_type base_value_type;
|
||||
|
||||
BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 32);
|
||||
BOOST_STATIC_ASSERT(sizeof(U8Type)*CHAR_BIT == 8);
|
||||
#endif
|
||||
|
||||
public:
|
||||
typename base_type::reference
|
||||
dereference()const
|
||||
{
|
||||
if(m_current == 4)
|
||||
extract_current();
|
||||
return m_values[m_current];
|
||||
}
|
||||
bool equal(const u32_to_u8_iterator& that)const
|
||||
{
|
||||
if(m_position == that.m_position)
|
||||
{
|
||||
// either the m_current's must be equal, or one must be 0 and
|
||||
// the other 4: which means neither must have bits 1 or 2 set:
|
||||
return (m_current == that.m_current)
|
||||
|| (((m_current | that.m_current) & 3) == 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
void increment()
|
||||
{
|
||||
// if we have a pending read then read now, so that we know whether
|
||||
// to skip a position, or move to a low-surrogate:
|
||||
if(m_current == 4)
|
||||
{
|
||||
// pending read:
|
||||
extract_current();
|
||||
}
|
||||
// move to the next surrogate position:
|
||||
++m_current;
|
||||
// if we've reached the end skip a position:
|
||||
if(m_values[m_current] == 0)
|
||||
{
|
||||
m_current = 4;
|
||||
++m_position;
|
||||
}
|
||||
}
|
||||
void decrement()
|
||||
{
|
||||
if((m_current & 3) == 0)
|
||||
{
|
||||
--m_position;
|
||||
extract_current();
|
||||
m_current = 3;
|
||||
while(m_current && (m_values[m_current] == 0))
|
||||
--m_current;
|
||||
}
|
||||
else
|
||||
--m_current;
|
||||
}
|
||||
BaseIterator base()const
|
||||
{
|
||||
return m_position;
|
||||
}
|
||||
// construct:
|
||||
u32_to_u8_iterator() : m_position(), m_current(0)
|
||||
{
|
||||
m_values[0] = 0;
|
||||
m_values[1] = 0;
|
||||
m_values[2] = 0;
|
||||
m_values[3] = 0;
|
||||
m_values[4] = 0;
|
||||
}
|
||||
u32_to_u8_iterator(BaseIterator b) : m_position(b), m_current(4)
|
||||
{
|
||||
m_values[0] = 0;
|
||||
m_values[1] = 0;
|
||||
m_values[2] = 0;
|
||||
m_values[3] = 0;
|
||||
m_values[4] = 0;
|
||||
}
|
||||
private:
|
||||
|
||||
void extract_current()const
|
||||
{
|
||||
boost::uint32_t c = *m_position;
|
||||
if(c > 0x10FFFFu)
|
||||
detail::invalid_utf32_code_point(c);
|
||||
if(c < 0x80u)
|
||||
{
|
||||
m_values[0] = static_cast<unsigned char>(c);
|
||||
m_values[1] = static_cast<unsigned char>(0u);
|
||||
m_values[2] = static_cast<unsigned char>(0u);
|
||||
m_values[3] = static_cast<unsigned char>(0u);
|
||||
}
|
||||
else if(c < 0x800u)
|
||||
{
|
||||
m_values[0] = static_cast<unsigned char>(0xC0u + (c >> 6));
|
||||
m_values[1] = static_cast<unsigned char>(0x80u + (c & 0x3Fu));
|
||||
m_values[2] = static_cast<unsigned char>(0u);
|
||||
m_values[3] = static_cast<unsigned char>(0u);
|
||||
}
|
||||
else if(c < 0x10000u)
|
||||
{
|
||||
m_values[0] = static_cast<unsigned char>(0xE0u + (c >> 12));
|
||||
m_values[1] = static_cast<unsigned char>(0x80u + ((c >> 6) & 0x3Fu));
|
||||
m_values[2] = static_cast<unsigned char>(0x80u + (c & 0x3Fu));
|
||||
m_values[3] = static_cast<unsigned char>(0u);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_values[0] = static_cast<unsigned char>(0xF0u + (c >> 18));
|
||||
m_values[1] = static_cast<unsigned char>(0x80u + ((c >> 12) & 0x3Fu));
|
||||
m_values[2] = static_cast<unsigned char>(0x80u + ((c >> 6) & 0x3Fu));
|
||||
m_values[3] = static_cast<unsigned char>(0x80u + (c & 0x3Fu));
|
||||
}
|
||||
m_current= 0;
|
||||
}
|
||||
BaseIterator m_position;
|
||||
mutable U8Type m_values[5];
|
||||
mutable unsigned m_current;
|
||||
};
|
||||
|
||||
template <class BaseIterator, class U32Type = ::boost::uint32_t>
|
||||
class u8_to_u32_iterator
|
||||
: public boost::iterator_facade<u8_to_u32_iterator<BaseIterator, U32Type>, U32Type, std::bidirectional_iterator_tag, const U32Type>
|
||||
{
|
||||
typedef boost::iterator_facade<u8_to_u32_iterator<BaseIterator, U32Type>, U32Type, std::bidirectional_iterator_tag, const U32Type> base_type;
|
||||
// special values for pending iterator reads:
|
||||
BOOST_STATIC_CONSTANT(U32Type, pending_read = 0xffffffffu);
|
||||
|
||||
#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
typedef typename std::iterator_traits<BaseIterator>::value_type base_value_type;
|
||||
|
||||
BOOST_STATIC_ASSERT(sizeof(base_value_type)*CHAR_BIT == 8);
|
||||
BOOST_STATIC_ASSERT(sizeof(U32Type)*CHAR_BIT == 32);
|
||||
#endif
|
||||
|
||||
public:
|
||||
typename base_type::reference
|
||||
dereference()const
|
||||
{
|
||||
if(m_value == pending_read)
|
||||
extract_current();
|
||||
return m_value;
|
||||
}
|
||||
bool equal(const u8_to_u32_iterator& that)const
|
||||
{
|
||||
return m_position == that.m_position;
|
||||
}
|
||||
void increment()
|
||||
{
|
||||
// skip high surrogate first if there is one:
|
||||
unsigned c = detail::utf8_byte_count(*m_position);
|
||||
std::advance(m_position, c);
|
||||
m_value = pending_read;
|
||||
}
|
||||
void decrement()
|
||||
{
|
||||
// Keep backtracking until we don't have a trailing character:
|
||||
unsigned count = 0;
|
||||
while((*--m_position & 0xC0u) == 0x80u) ++count;
|
||||
// now check that the sequence was valid:
|
||||
if(count != detail::utf8_trailing_byte_count(*m_position))
|
||||
invalid_sequnce();
|
||||
m_value = pending_read;
|
||||
}
|
||||
BaseIterator base()const
|
||||
{
|
||||
return m_position;
|
||||
}
|
||||
// construct:
|
||||
u8_to_u32_iterator() : m_position()
|
||||
{
|
||||
m_value = pending_read;
|
||||
}
|
||||
u8_to_u32_iterator(BaseIterator b) : m_position(b)
|
||||
{
|
||||
m_value = pending_read;
|
||||
}
|
||||
private:
|
||||
static void invalid_sequnce()
|
||||
{
|
||||
std::out_of_range e("Invalid UTF-8 sequence encountered while trying to encode UTF-32 character");
|
||||
boost::throw_exception(e);
|
||||
}
|
||||
void extract_current()const
|
||||
{
|
||||
m_value = static_cast<U32Type>(static_cast< ::boost::uint8_t>(*m_position));
|
||||
// we must not have a continuation character:
|
||||
if((m_value & 0xC0u) == 0x80u)
|
||||
invalid_sequnce();
|
||||
// see how many extra byts we have:
|
||||
unsigned extra = detail::utf8_trailing_byte_count(*m_position);
|
||||
// extract the extra bits, 6 from each extra byte:
|
||||
BaseIterator next(m_position);
|
||||
for(unsigned c = 0; c < extra; ++c)
|
||||
{
|
||||
++next;
|
||||
m_value <<= 6;
|
||||
m_value += static_cast<boost::uint8_t>(*next) & 0x3Fu;
|
||||
}
|
||||
// we now need to remove a few of the leftmost bits, but how many depends
|
||||
// upon how many extra bytes we've extracted:
|
||||
static const boost::uint32_t masks[4] =
|
||||
{
|
||||
0x7Fu,
|
||||
0x7FFu,
|
||||
0xFFFFu,
|
||||
0x1FFFFFu,
|
||||
};
|
||||
m_value &= masks[extra];
|
||||
// check the result:
|
||||
if(m_value > static_cast<U32Type>(0x10FFFFu))
|
||||
invalid_sequnce();
|
||||
}
|
||||
BaseIterator m_position;
|
||||
mutable U32Type m_value;
|
||||
};
|
||||
|
||||
template <class BaseIterator>
|
||||
class utf16_output_iterator
|
||||
{
|
||||
public:
|
||||
typedef void difference_type;
|
||||
typedef void value_type;
|
||||
typedef boost::uint32_t* pointer;
|
||||
typedef boost::uint32_t& reference;
|
||||
typedef std::output_iterator_tag iterator_category;
|
||||
|
||||
utf16_output_iterator(const BaseIterator& b)
|
||||
: m_position(b){}
|
||||
utf16_output_iterator(const utf16_output_iterator& that)
|
||||
: m_position(that.m_position){}
|
||||
utf16_output_iterator& operator=(const utf16_output_iterator& that)
|
||||
{
|
||||
m_position = that.m_position;
|
||||
return *this;
|
||||
}
|
||||
const utf16_output_iterator& operator*()const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
void operator=(boost::uint32_t val)const
|
||||
{
|
||||
push(val);
|
||||
}
|
||||
utf16_output_iterator& operator++()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
utf16_output_iterator& operator++(int)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
BaseIterator base()const
|
||||
{
|
||||
return m_position;
|
||||
}
|
||||
private:
|
||||
void push(boost::uint32_t v)const
|
||||
{
|
||||
if(v >= 0x10000u)
|
||||
{
|
||||
// begin by checking for a code point out of range:
|
||||
if(v > 0x10FFFFu)
|
||||
detail::invalid_utf32_code_point(v);
|
||||
// split into two surrogates:
|
||||
*m_position++ = static_cast<boost::uint16_t>(v >> 10) + detail::high_surrogate_base;
|
||||
*m_position++ = static_cast<boost::uint16_t>(v & detail::ten_bit_mask) + detail::low_surrogate_base;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 16-bit code point:
|
||||
// value must not be a surrogate:
|
||||
if(detail::is_surrogate(v))
|
||||
detail::invalid_utf32_code_point(v);
|
||||
*m_position++ = static_cast<boost::uint16_t>(v);
|
||||
}
|
||||
}
|
||||
mutable BaseIterator m_position;
|
||||
};
|
||||
|
||||
template <class BaseIterator>
|
||||
class utf8_output_iterator
|
||||
{
|
||||
public:
|
||||
typedef void difference_type;
|
||||
typedef void value_type;
|
||||
typedef boost::uint32_t* pointer;
|
||||
typedef boost::uint32_t& reference;
|
||||
typedef std::output_iterator_tag iterator_category;
|
||||
|
||||
utf8_output_iterator(const BaseIterator& b)
|
||||
: m_position(b){}
|
||||
utf8_output_iterator(const utf8_output_iterator& that)
|
||||
: m_position(that.m_position){}
|
||||
utf8_output_iterator& operator=(const utf8_output_iterator& that)
|
||||
{
|
||||
m_position = that.m_position;
|
||||
return *this;
|
||||
}
|
||||
const utf8_output_iterator& operator*()const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
void operator=(boost::uint32_t val)const
|
||||
{
|
||||
push(val);
|
||||
}
|
||||
utf8_output_iterator& operator++()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
utf8_output_iterator& operator++(int)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
BaseIterator base()const
|
||||
{
|
||||
return m_position;
|
||||
}
|
||||
private:
|
||||
void push(boost::uint32_t c)const
|
||||
{
|
||||
if(c > 0x10FFFFu)
|
||||
detail::invalid_utf32_code_point(c);
|
||||
if(c < 0x80u)
|
||||
{
|
||||
*m_position++ = static_cast<unsigned char>(c);
|
||||
}
|
||||
else if(c < 0x800u)
|
||||
{
|
||||
*m_position++ = static_cast<unsigned char>(0xC0u + (c >> 6));
|
||||
*m_position++ = static_cast<unsigned char>(0x80u + (c & 0x3Fu));
|
||||
}
|
||||
else if(c < 0x10000u)
|
||||
{
|
||||
*m_position++ = static_cast<unsigned char>(0xE0u + (c >> 12));
|
||||
*m_position++ = static_cast<unsigned char>(0x80u + ((c >> 6) & 0x3Fu));
|
||||
*m_position++ = static_cast<unsigned char>(0x80u + (c & 0x3Fu));
|
||||
}
|
||||
else
|
||||
{
|
||||
*m_position++ = static_cast<unsigned char>(0xF0u + (c >> 18));
|
||||
*m_position++ = static_cast<unsigned char>(0x80u + ((c >> 12) & 0x3Fu));
|
||||
*m_position++ = static_cast<unsigned char>(0x80u + ((c >> 6) & 0x3Fu));
|
||||
*m_position++ = static_cast<unsigned char>(0x80u + (c & 0x3Fu));
|
||||
}
|
||||
}
|
||||
mutable BaseIterator m_position;
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_UNICODE_ITERATOR_HPP
|
||||
@@ -1,792 +1,41 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex.cpp
|
||||
* VERSION 3.12
|
||||
* FILE regex_traits.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares regular expression traits classes.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_TRAITS_HPP
|
||||
#define BOOST_REGEX_TRAITS_HPP
|
||||
|
||||
#include <boost/cregex.hpp>
|
||||
#include <boost/regex/detail/regex_cstring.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
# include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
template <class charT>
|
||||
class c_regex_traits;
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
struct mss
|
||||
{
|
||||
unsigned int id;
|
||||
const char* what;
|
||||
};
|
||||
|
||||
BOOST_RE_IX_DECL bool BOOST_RE_CALL re_lookup_def_collate_name(std::string& buf, const char* name);
|
||||
BOOST_RE_IX_DECL unsigned int BOOST_RE_CALL re_get_default_message(char* buf, unsigned int len, unsigned int id);
|
||||
extern BOOST_RE_IX_DECL const char *re_default_error_messages[];
|
||||
BOOST_RE_IX_DECL bool BOOST_RE_CALL re_lookup_def_collate_name(std::string& buf, const char* name);
|
||||
BOOST_RE_IX_DECL bool BOOST_RE_CALL is_combining(wchar_t c);
|
||||
//extern BOOST_RE_IX_DECL const wchar_t combining_ranges[];
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
extern BOOST_RE_IX_DECL wchar_t wide_lower_case_map[];
|
||||
extern BOOST_RE_IX_DECL unsigned short wide_unicode_classes[];
|
||||
#endif
|
||||
|
||||
|
||||
struct BOOST_RE_IX_DECL regex_traits_base
|
||||
{
|
||||
enum char_syntax_type
|
||||
{
|
||||
syntax_char = 0,
|
||||
syntax_open_bracket = 1, // (
|
||||
syntax_close_bracket = 2, // )
|
||||
syntax_dollar = 3, // $
|
||||
syntax_caret = 4, // ^
|
||||
syntax_dot = 5, // .
|
||||
syntax_star = 6, // *
|
||||
syntax_plus = 7, // +
|
||||
syntax_question = 8, // ?
|
||||
syntax_open_set = 9, // [
|
||||
syntax_close_set = 10, // ]
|
||||
syntax_or = 11, // |
|
||||
syntax_slash = 12, //
|
||||
syntax_hash = 13, // #
|
||||
syntax_dash = 14, // -
|
||||
syntax_open_brace = 15, // {
|
||||
syntax_close_brace = 16, // }
|
||||
syntax_digit = 17, // 0-9
|
||||
syntax_b = 18, // for \b
|
||||
syntax_B = 19, // for \B
|
||||
syntax_left_word = 20, // for \<
|
||||
syntax_right_word = 21, // for \>
|
||||
syntax_w = 22, // for \w
|
||||
syntax_W = 23, // for \W
|
||||
syntax_start_buffer = 24, // for \`
|
||||
syntax_end_buffer = 25, // for \'
|
||||
syntax_newline = 26, // for newline alt
|
||||
syntax_comma = 27, // for {x,y}
|
||||
|
||||
syntax_a = 28, // for \a
|
||||
syntax_f = 29, // for \f
|
||||
syntax_n = 30, // for \n
|
||||
syntax_r = 31, // for \r
|
||||
syntax_t = 32, // for \t
|
||||
syntax_v = 33, // for \v
|
||||
syntax_x = 34, // for \xdd
|
||||
syntax_c = 35, // for \cx
|
||||
syntax_colon = 36, // for [:...:]
|
||||
syntax_equal = 37, // for [=...=]
|
||||
|
||||
// perl ops:
|
||||
syntax_e = 38, // for \e
|
||||
syntax_l = 39, // for \l
|
||||
syntax_L = 40, // for \L
|
||||
syntax_u = 41, // for \u
|
||||
syntax_U = 42, // for \U
|
||||
syntax_s = 43, // for \s
|
||||
syntax_S = 44, // for \S
|
||||
syntax_d = 45, // for \d
|
||||
syntax_D = 46, // for \D
|
||||
syntax_E = 47, // for \Q\E
|
||||
syntax_Q = 48, // for \Q\E
|
||||
syntax_X = 49, // for \X
|
||||
syntax_C = 50, // for \C
|
||||
syntax_Z = 51, // for \Z
|
||||
syntax_G = 52, // for \G
|
||||
|
||||
syntax_max = 53
|
||||
};
|
||||
};
|
||||
|
||||
struct BOOST_RE_IX_DECL c_traits_base : public regex_traits_base
|
||||
{
|
||||
public:
|
||||
enum{
|
||||
char_class_none = 0,
|
||||
char_class_alpha = 1,
|
||||
char_class_cntrl = char_class_alpha << 1,
|
||||
char_class_digit = char_class_cntrl << 1,
|
||||
char_class_lower = char_class_digit << 1,
|
||||
char_class_punct = char_class_lower << 1,
|
||||
char_class_space = char_class_punct << 1,
|
||||
char_class_upper = char_class_space << 1,
|
||||
char_class_xdigit = char_class_upper << 1,
|
||||
char_class_blank = char_class_xdigit << 1,
|
||||
char_class_unicode = char_class_blank << 1,
|
||||
char_class_underscore = char_class_unicode << 1,
|
||||
|
||||
char_class_alnum = char_class_alpha | char_class_digit,
|
||||
char_class_graph = char_class_alpha | char_class_digit | char_class_punct | char_class_underscore,
|
||||
char_class_print = char_class_alpha | char_class_digit | char_class_punct | char_class_underscore | char_class_blank,
|
||||
char_class_word = char_class_alpha | char_class_digit | char_class_underscore
|
||||
};
|
||||
static std::string BOOST_RE_CALL set_message_catalogue(const std::string& s);
|
||||
protected:
|
||||
#if defined(__MWERKS__) && __MWERKS__ <= 0x6000
|
||||
friend class c_regex_traits<char>;
|
||||
friend class c_regex_traits<wchar_t>;
|
||||
#endif
|
||||
|
||||
static char regex_message_catalogue[200];
|
||||
enum syntax_map_size
|
||||
{
|
||||
map_size = UCHAR_MAX + 1
|
||||
};
|
||||
|
||||
static unsigned char syntax_map[map_size];
|
||||
static unsigned short class_map[map_size];
|
||||
static char lower_case_map[map_size];
|
||||
|
||||
static boost::uint_fast32_t BOOST_RE_CALL do_lookup_class(const char* p);
|
||||
static bool BOOST_RE_CALL do_lookup_collate(std::string& buf, const char* p);
|
||||
static void BOOST_RE_CALL do_update_ctype();
|
||||
static void BOOST_RE_CALL do_update_collate();
|
||||
public:
|
||||
static std::string BOOST_RE_CALL error_string(unsigned id);
|
||||
static char* BOOST_RE_CALL get_catalogue() { return regex_message_catalogue; }
|
||||
};
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
|
||||
template<>
|
||||
class BOOST_RE_IX_DECL c_regex_traits<char> : public re_detail::c_traits_base
|
||||
{
|
||||
typedef re_detail::c_traits_base base_type;
|
||||
public:
|
||||
typedef char char_type;
|
||||
typedef unsigned char uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef std::string string_type;
|
||||
typedef int locale_type;
|
||||
|
||||
static std::size_t BOOST_RE_CALL length(const char_type* p)
|
||||
{
|
||||
return std::strlen(p);
|
||||
}
|
||||
static unsigned int BOOST_RE_CALL syntax_type(size_type c)
|
||||
{
|
||||
return syntax_map[c];
|
||||
}
|
||||
static char BOOST_RE_CALL translate(char c, bool icase)
|
||||
{
|
||||
return icase ? lower_case_map[(size_type)(uchar_type)c] : c;
|
||||
}
|
||||
static void BOOST_RE_CALL transform(std::string& out, const std::string& in);
|
||||
|
||||
static void BOOST_RE_CALL transform_primary(std::string& out, const std::string& in);
|
||||
|
||||
static bool BOOST_RE_CALL is_separator(char c)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL((c == '\n') || (c == '\r'));
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_combining(char)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_class(char c, boost::uint_fast32_t f)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
|
||||
}
|
||||
|
||||
static int BOOST_RE_CALL toi(char c);
|
||||
static int BOOST_RE_CALL toi(const char*& first, const char* last, int radix);
|
||||
|
||||
static boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const char* first, const char* last)
|
||||
{
|
||||
std::string s(first, last);
|
||||
return do_lookup_class(s.c_str());
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL lookup_collatename(std::string& buf, const char* first, const char* last)
|
||||
{
|
||||
std::string s(first, last);
|
||||
return do_lookup_collate(buf, s.c_str());
|
||||
}
|
||||
|
||||
static locale_type BOOST_RE_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_RE_CALL getloc()const{ return locale_type(); }
|
||||
|
||||
c_regex_traits()
|
||||
{
|
||||
init();
|
||||
}
|
||||
~c_regex_traits()
|
||||
{
|
||||
free();
|
||||
}
|
||||
struct sentry
|
||||
{
|
||||
sentry(const c_regex_traits<char>&)
|
||||
{ c_regex_traits<char>::update(); }
|
||||
operator void*() { return this; }
|
||||
};
|
||||
static void BOOST_RE_CALL update();
|
||||
private:
|
||||
static void BOOST_RE_CALL init();
|
||||
static void BOOST_RE_CALL free();
|
||||
static c_regex_traits<char> i;
|
||||
|
||||
static unsigned sort_type;
|
||||
static char sort_delim;
|
||||
};
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
template<>
|
||||
class BOOST_RE_IX_DECL c_regex_traits<wchar_t> : public re_detail::c_traits_base
|
||||
{
|
||||
typedef re_detail::c_traits_base base_type;
|
||||
public:
|
||||
typedef wchar_t char_type;
|
||||
typedef unsigned short uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef std::basic_string<wchar_t> string_type;
|
||||
typedef int locale_type;
|
||||
static std::size_t BOOST_RE_CALL length(const char_type* p)
|
||||
{
|
||||
return std::wcslen(p);
|
||||
}
|
||||
static unsigned int BOOST_RE_CALL syntax_type(size_type c);
|
||||
static wchar_t BOOST_RE_CALL translate(wchar_t c, bool icase)
|
||||
{
|
||||
return icase ? ((c < 256) ? re_detail::wide_lower_case_map[(uchar_type)c] : std::towlower(c)) : c;
|
||||
}
|
||||
|
||||
static void BOOST_RE_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
|
||||
static void BOOST_RE_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
|
||||
static bool BOOST_RE_CALL is_separator(wchar_t c)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_combining(wchar_t c)
|
||||
{ return re_detail::is_combining(c); }
|
||||
|
||||
static bool BOOST_RE_CALL is_class(wchar_t c, boost::uint_fast32_t f)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL(((uchar_type)c < 256) ? (re_detail::wide_unicode_classes[(size_type)(uchar_type)c] & f) : do_iswclass(c, f));
|
||||
}
|
||||
|
||||
static int BOOST_RE_CALL toi(wchar_t c);
|
||||
static int BOOST_RE_CALL toi(const wchar_t*& first, const wchar_t* last, int radix);
|
||||
|
||||
static boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
|
||||
|
||||
static bool BOOST_RE_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last);
|
||||
|
||||
static locale_type BOOST_RE_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_RE_CALL getloc()const{ return locale_type(); }
|
||||
c_regex_traits<wchar_t>()
|
||||
{ init(); }
|
||||
~c_regex_traits<wchar_t>()
|
||||
{ free(); }
|
||||
struct sentry
|
||||
{
|
||||
sentry(const c_regex_traits<wchar_t>&)
|
||||
{ c_regex_traits<wchar_t>::update(); }
|
||||
operator void*() { return this; }
|
||||
};
|
||||
static void BOOST_RE_CALL update();
|
||||
static unsigned int BOOST_RE_CALL strnarrow(char *s1, unsigned int len, const wchar_t *s2);
|
||||
static unsigned int BOOST_RE_CALL strwiden(wchar_t *s1, unsigned int len, const char *s2);
|
||||
private:
|
||||
static bool BOOST_RE_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f);
|
||||
static void BOOST_RE_CALL free();
|
||||
static void BOOST_RE_CALL init();
|
||||
static bool BOOST_RE_CALL do_lookup_collate(std::basic_string<wchar_t>& out, const wchar_t* first, const wchar_t* last);
|
||||
static c_regex_traits<wchar_t> init_;
|
||||
|
||||
static unsigned sort_type;
|
||||
static wchar_t sort_delim;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(BOOST_RE_NO_W32)
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
struct BOOST_RE_IX_DECL w32_traits_base : public regex_traits_base
|
||||
{
|
||||
enum{
|
||||
char_class_none = 0,
|
||||
char_class_alnum = C1_ALPHA | C1_DIGIT,
|
||||
char_class_alpha = C1_ALPHA,
|
||||
char_class_cntrl = C1_CNTRL,
|
||||
char_class_digit = C1_DIGIT,
|
||||
char_class_graph = C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_ALPHA,
|
||||
char_class_lower = C1_LOWER,
|
||||
char_class_print = C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_BLANK | C1_ALPHA,
|
||||
char_class_punct = C1_PUNCT,
|
||||
char_class_space = C1_SPACE,
|
||||
char_class_upper = C1_UPPER,
|
||||
char_class_xdigit = C1_XDIGIT,
|
||||
char_class_blank = C1_BLANK,
|
||||
char_class_underscore = 0x0400,
|
||||
char_class_word = C1_ALPHA | C1_DIGIT | char_class_underscore,
|
||||
char_class_unicode = 0x0800,
|
||||
char_class_win = C1_ALPHA | C1_CNTRL | C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_BLANK | C1_SPACE | C1_XDIGIT | C1_BLANK
|
||||
};
|
||||
public:
|
||||
static std::string BOOST_RE_CALL set_message_catalogue(const std::string& s);
|
||||
protected:
|
||||
static char regex_message_catalogue[200];
|
||||
enum syntax_map_size
|
||||
{
|
||||
map_size = UCHAR_MAX + 1
|
||||
};
|
||||
|
||||
static unsigned char syntax_map[map_size];
|
||||
static unsigned short class_map[map_size];
|
||||
static char lower_case_map[map_size];
|
||||
|
||||
static boost::uint_fast32_t BOOST_RE_CALL do_lookup_class(const char* p);
|
||||
static bool BOOST_RE_CALL do_lookup_collate(std::string& buf, const char* p);
|
||||
static void BOOST_RE_CALL do_free();
|
||||
static void BOOST_RE_CALL do_init();
|
||||
public:
|
||||
static std::string BOOST_RE_CALL error_string(unsigned id);
|
||||
static char* BOOST_RE_CALL get_catalogue() { return regex_message_catalogue; }
|
||||
};
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
template<class charT>
|
||||
class w32_regex_traits;
|
||||
|
||||
template<>
|
||||
class BOOST_RE_IX_DECL w32_regex_traits<char> : public re_detail::w32_traits_base
|
||||
{
|
||||
typedef re_detail::w32_traits_base base_type;
|
||||
public:
|
||||
typedef char char_type;
|
||||
typedef unsigned char uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef std::string string_type;
|
||||
typedef int locale_type;
|
||||
|
||||
static std::size_t BOOST_RE_CALL length(const char_type* p)
|
||||
{
|
||||
return std::strlen(p);
|
||||
}
|
||||
static unsigned int BOOST_RE_CALL syntax_type(size_type c)
|
||||
{
|
||||
return syntax_map[c];
|
||||
}
|
||||
static char BOOST_RE_CALL translate(char c, bool icase)
|
||||
{
|
||||
return icase ? lower_case_map[(size_type)(uchar_type)c] : c;
|
||||
}
|
||||
static void BOOST_RE_CALL transform(std::string& out, const std::string& in);
|
||||
|
||||
static void BOOST_RE_CALL transform_primary(std::string& out, const std::string& in);
|
||||
|
||||
static bool BOOST_RE_CALL is_separator(char c)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL((c == '\n') || (c == '\r'));
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_combining(char)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_class(char c, boost::uint_fast32_t f)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
|
||||
}
|
||||
|
||||
static int BOOST_RE_CALL toi(char c);
|
||||
static int BOOST_RE_CALL toi(const char*& first, const char* last, int radix);
|
||||
|
||||
static boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const char* first, const char* last)
|
||||
{
|
||||
std::string s(first, last);
|
||||
return do_lookup_class(s.c_str());
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL lookup_collatename(std::string& buf, const char* first, const char* last)
|
||||
{
|
||||
std::string s(first, last);
|
||||
return do_lookup_collate(buf, s.c_str());
|
||||
}
|
||||
|
||||
static locale_type BOOST_RE_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_RE_CALL getloc()const{ return locale_type(); }
|
||||
|
||||
struct sentry
|
||||
{
|
||||
sentry(const w32_regex_traits<char>&)
|
||||
{ w32_regex_traits<char>::update(); }
|
||||
~sentry(){}
|
||||
operator void*() { return this; }
|
||||
};
|
||||
static void BOOST_RE_CALL update();
|
||||
w32_regex_traits();
|
||||
~w32_regex_traits();
|
||||
private:
|
||||
static w32_regex_traits<char> i;
|
||||
};
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
template<>
|
||||
class BOOST_RE_IX_DECL w32_regex_traits<wchar_t> : public re_detail::w32_traits_base
|
||||
{
|
||||
typedef re_detail::w32_traits_base base_type;
|
||||
public:
|
||||
typedef wchar_t char_type;
|
||||
typedef unsigned short uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef std::basic_string<wchar_t> string_type;
|
||||
typedef int locale_type;
|
||||
static std::size_t BOOST_RE_CALL length(const char_type* p)
|
||||
{
|
||||
return std::wcslen(p);
|
||||
}
|
||||
static unsigned int BOOST_RE_CALL syntax_type(size_type c);
|
||||
static wchar_t BOOST_RE_CALL translate(wchar_t c, bool icase)
|
||||
{
|
||||
return icase ? ((c < 256) ? re_detail::wide_lower_case_map[(uchar_type)c] : wtolower(c)) : c;
|
||||
}
|
||||
|
||||
static void BOOST_RE_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
|
||||
static void BOOST_RE_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
|
||||
static bool BOOST_RE_CALL is_separator(wchar_t c)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_combining(wchar_t c)
|
||||
{ return re_detail::is_combining(c); }
|
||||
|
||||
static bool BOOST_RE_CALL is_class(wchar_t c, boost::uint_fast32_t f)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL(((uchar_type)c < 256) ? (wide_unicode_classes[(size_type)(uchar_type)c] & f) : do_iswclass(c, f));
|
||||
}
|
||||
|
||||
static int BOOST_RE_CALL toi(wchar_t c);
|
||||
static int BOOST_RE_CALL toi(const wchar_t*& first, const wchar_t* last, int radix);
|
||||
|
||||
static boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
|
||||
|
||||
static bool BOOST_RE_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last);
|
||||
|
||||
static locale_type BOOST_RE_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_RE_CALL getloc()const{ return locale_type(); }
|
||||
|
||||
struct sentry
|
||||
{
|
||||
sentry(const w32_regex_traits<wchar_t>&)
|
||||
{ w32_regex_traits<wchar_t>::update(); }
|
||||
~sentry(){}
|
||||
operator void*() { return this; }
|
||||
};
|
||||
static void BOOST_RE_CALL update();
|
||||
w32_regex_traits();
|
||||
~w32_regex_traits();
|
||||
static unsigned int BOOST_RE_CALL strnarrow(char *s1, unsigned int len, const wchar_t *s2);
|
||||
static unsigned int BOOST_RE_CALL strwiden(wchar_t *s1, unsigned int len, const char *s2);
|
||||
|
||||
private:
|
||||
static bool BOOST_RE_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f);
|
||||
static bool BOOST_RE_CALL do_lookup_collate(std::basic_string<wchar_t>& out, const wchar_t* first, const wchar_t* last);
|
||||
static w32_regex_traits<wchar_t> init_;
|
||||
static wchar_t BOOST_RE_CALL wtolower(wchar_t c);
|
||||
static unsigned short wide_unicode_classes[];
|
||||
};
|
||||
#endif // Wide strings
|
||||
#endif // Win32
|
||||
|
||||
#ifndef BOOST_RE_NO_LOCALE_H
|
||||
|
||||
} // namspace boost
|
||||
|
||||
#include <locale>
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace re_detail
|
||||
{
|
||||
|
||||
template <class charT>
|
||||
struct message_data;
|
||||
|
||||
template <>
|
||||
struct message_data<char>;
|
||||
|
||||
template <>
|
||||
struct message_data<wchar_t>;
|
||||
|
||||
struct BOOST_RE_IX_DECL cpp_regex_traits_base : public regex_traits_base
|
||||
{
|
||||
enum char_class_type
|
||||
{
|
||||
char_class_none = 0,
|
||||
char_class_alnum = std::ctype_base::alnum,
|
||||
char_class_alpha = std::ctype_base::alpha,
|
||||
char_class_cntrl = std::ctype_base::cntrl,
|
||||
char_class_digit = std::ctype_base::digit,
|
||||
char_class_graph = std::ctype_base::graph,
|
||||
char_class_lower = std::ctype_base::lower,
|
||||
char_class_print = std::ctype_base::print,
|
||||
char_class_punct = std::ctype_base::punct,
|
||||
char_class_space = std::ctype_base::space,
|
||||
char_class_upper = std::ctype_base::upper,
|
||||
char_class_xdigit = std::ctype_base::xdigit,
|
||||
char_class_blank = 1<<12,
|
||||
char_class_underscore = 1<<13,
|
||||
char_class_word = std::ctype_base::alnum | char_class_underscore,
|
||||
char_class_unicode = 1<<14,
|
||||
char_class_all_base = char_class_alnum | char_class_alpha | char_class_cntrl
|
||||
| char_class_digit | char_class_graph | char_class_lower
|
||||
| char_class_print | char_class_punct | char_class_space
|
||||
| char_class_upper | char_class_xdigit
|
||||
};
|
||||
|
||||
static std::string BOOST_RE_CALL set_message_catalogue(const std::string& s);
|
||||
protected:
|
||||
static char regex_message_cat[200];
|
||||
};
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
template <class charT>
|
||||
class cpp_regex_traits;
|
||||
|
||||
template<>
|
||||
class BOOST_RE_IX_DECL cpp_regex_traits<char> : public re_detail::cpp_regex_traits_base
|
||||
{
|
||||
typedef re_detail::cpp_regex_traits_base base_type;
|
||||
private:
|
||||
re_detail::message_data<char>* pmd;
|
||||
const unsigned char* psyntax;
|
||||
char* lower_map;
|
||||
const std::ctype<char>* pctype;
|
||||
const std::collate<char>* pcollate;
|
||||
std::locale locale_inst;
|
||||
unsigned sort_type;
|
||||
char sort_delim;
|
||||
|
||||
cpp_regex_traits(const cpp_regex_traits&);
|
||||
cpp_regex_traits& operator=(const cpp_regex_traits&);
|
||||
|
||||
public:
|
||||
typedef char char_type;
|
||||
typedef unsigned char uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef std::string string_type;
|
||||
typedef std::locale locale_type;
|
||||
|
||||
cpp_regex_traits();
|
||||
~cpp_regex_traits();
|
||||
|
||||
static std::size_t BOOST_RE_CALL length(const char_type* p)
|
||||
{
|
||||
return std::strlen(p);
|
||||
}
|
||||
unsigned int BOOST_RE_CALL syntax_type(size_type c)const
|
||||
{
|
||||
return psyntax[c];
|
||||
}
|
||||
char BOOST_RE_CALL translate(char c, bool icase)const
|
||||
{
|
||||
return icase ? lower_map[(size_type)(uchar_type)c] : c;
|
||||
}
|
||||
void BOOST_RE_CALL transform(std::string& out, const std::string& in)const
|
||||
{
|
||||
out = pcollate->transform(in.c_str(), in.c_str() + in.size()).c_str();
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL transform_primary(std::string& out, const std::string& in)const;
|
||||
|
||||
static bool BOOST_RE_CALL is_separator(char c)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL((c == '\n') || (c == '\r'));
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_combining(char)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BOOST_RE_CALL is_class(char c, boost::uint_fast32_t f)const
|
||||
{
|
||||
if(pctype->is((std::ctype<char>::mask)(f & char_class_all_base), c))
|
||||
return true;
|
||||
if((f & char_class_underscore) && (c == '_'))
|
||||
return true;
|
||||
if((f & char_class_blank) && ((c == ' ') || (c == '\t')))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int BOOST_RE_CALL toi(char c)const;
|
||||
int BOOST_RE_CALL toi(const char*& first, const char* last, int radix)const;
|
||||
|
||||
boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const char* first, const char* last)const;
|
||||
bool BOOST_RE_CALL lookup_collatename(std::string& s, const char* first, const char* last)const;
|
||||
|
||||
std::string BOOST_RE_CALL error_string(unsigned id)const;
|
||||
locale_type BOOST_RE_CALL imbue(locale_type l);
|
||||
locale_type BOOST_RE_CALL BOOST_RE_CALL getloc()const{ return locale_inst; }
|
||||
|
||||
struct sentry
|
||||
{
|
||||
sentry(const cpp_regex_traits<char>&){}
|
||||
operator void*() { return this; }
|
||||
};
|
||||
};
|
||||
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
template<>
|
||||
class BOOST_RE_IX_DECL cpp_regex_traits<wchar_t> : public re_detail::cpp_regex_traits_base
|
||||
{
|
||||
typedef re_detail::cpp_regex_traits_base base_type;
|
||||
public:
|
||||
typedef wchar_t char_type;
|
||||
typedef unsigned short uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef std::basic_string<wchar_t> string_type;
|
||||
typedef std::locale locale_type;
|
||||
|
||||
private:
|
||||
re_detail::message_data<wchar_t>* pmd;
|
||||
const unsigned char* psyntax;
|
||||
wchar_t* lower_map;
|
||||
const std::ctype<wchar_t>* pctype;
|
||||
const std::collate<wchar_t>* pcollate;
|
||||
const std::codecvt<wchar_t, char, std::mbstate_t>* pcdv;
|
||||
std::locale locale_inst;
|
||||
unsigned int BOOST_RE_CALL do_syntax_type(size_type c)const;
|
||||
unsigned sort_type;
|
||||
wchar_t sort_delim;
|
||||
|
||||
cpp_regex_traits(const cpp_regex_traits&);
|
||||
cpp_regex_traits& operator=(const cpp_regex_traits&);
|
||||
|
||||
public:
|
||||
|
||||
static std::size_t BOOST_RE_CALL length(const char_type* p)
|
||||
{
|
||||
return std::wcslen(p);
|
||||
}
|
||||
unsigned int BOOST_RE_CALL syntax_type(size_type c)const
|
||||
{
|
||||
return (c < UCHAR_MAX) ? psyntax[c] : do_syntax_type(c);
|
||||
}
|
||||
wchar_t BOOST_RE_CALL translate(wchar_t c, bool icase)const
|
||||
{
|
||||
return icase ? (((uchar_type)c) <= UCHAR_MAX) ? lower_map[c] : pctype->tolower(c) : c;
|
||||
}
|
||||
void BOOST_RE_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in)const
|
||||
{
|
||||
out = pcollate->transform(in.c_str(), in.c_str() + in.size());
|
||||
}
|
||||
|
||||
void BOOST_RE_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in)const;
|
||||
|
||||
static bool BOOST_RE_CALL is_separator(wchar_t c)
|
||||
{
|
||||
return BOOST_RE_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
|
||||
}
|
||||
|
||||
static bool BOOST_RE_CALL is_combining(wchar_t c)
|
||||
{ return re_detail::is_combining(c); }
|
||||
|
||||
bool BOOST_RE_CALL is_class(wchar_t c, boost::uint_fast32_t f)const
|
||||
{
|
||||
if(pctype->is((std::ctype<wchar_t>::mask)(f & char_class_all_base), c))
|
||||
return true;
|
||||
if((f & char_class_underscore) && (c == '_'))
|
||||
return true;
|
||||
if((f & char_class_blank) && ((c == ' ') || (c == '\t')))
|
||||
return true;
|
||||
if((f & char_class_unicode) && (c > (size_type)(uchar_type)255))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int BOOST_RE_CALL toi(wchar_t c)const;
|
||||
int BOOST_RE_CALL toi(const wchar_t*& first, const wchar_t* last, int radix)const;
|
||||
|
||||
boost::uint_fast32_t BOOST_RE_CALL lookup_classname(const wchar_t* first, const wchar_t* last)const;
|
||||
bool BOOST_RE_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last)const;
|
||||
|
||||
std::string BOOST_RE_CALL error_string(unsigned id)const;
|
||||
cpp_regex_traits();
|
||||
~cpp_regex_traits();
|
||||
locale_type BOOST_RE_CALL imbue(locale_type l);
|
||||
locale_type BOOST_RE_CALL getloc()const{ return locale_inst; }
|
||||
unsigned int BOOST_RE_CALL strwiden(wchar_t *s1, unsigned int len, const char *s2)const;
|
||||
|
||||
struct sentry
|
||||
{
|
||||
sentry(const cpp_regex_traits<wchar_t>&){}
|
||||
operator void*() { return this; }
|
||||
};
|
||||
};
|
||||
#endif // BOOST_RE_NO_WCSTRING
|
||||
|
||||
#endif // BOOST_RE_NO_LOCALE_H
|
||||
|
||||
#ifdef BOOST_RE_LOCALE_W32
|
||||
|
||||
template <class charT>
|
||||
class regex_traits : public w32_regex_traits<charT>
|
||||
{
|
||||
};
|
||||
|
||||
#elif defined(BOOST_RE_LOCALE_C)
|
||||
|
||||
template <class charT>
|
||||
class regex_traits : public c_regex_traits<charT>
|
||||
{
|
||||
};
|
||||
|
||||
#elif defined(BOOST_RE_LOCALE_CPP)
|
||||
|
||||
template <class charT>
|
||||
class regex_traits : public cpp_regex_traits<charT>
|
||||
{
|
||||
};
|
||||
|
||||
#ifdef BOOST_REGEX_V3
|
||||
# ifndef BOOST_REGEX_TRAITS_HPP_INCLUDED
|
||||
# include <boost/regex/v3/regex_traits.hpp>
|
||||
# endif
|
||||
#else
|
||||
#error No default localisation model defined
|
||||
# ifndef BOOST_REGEX_TRAITS_HPP_INCLUDED
|
||||
# include <boost/regex/v4/regex_traits.hpp>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // include
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE src.cpp
|
||||
* VERSION 3.11
|
||||
* DESCRIPTION: Includes all the regex source files, include this
|
||||
* file only if you need to build the regex library
|
||||
* as a single file. Before including this file you
|
||||
* must define BOOST_RE_NO_LIB, or include this file
|
||||
* before any other regex header.
|
||||
*/
|
||||
|
||||
#if !defined(BOOST_RE_NO_LIB) && defined(BOOST_REGEX_CONFIG_HPP)
|
||||
#error too late you have already included a regex header - try defining BOOST_RE_NO_LIB when you build
|
||||
#endif
|
||||
|
||||
//
|
||||
// include library source files:
|
||||
//
|
||||
#ifdef BOOST_RE_LOCALE_W32
|
||||
#include "libs/regex/src/w32_regex_traits.cpp"
|
||||
#elif defined(BOOST_RE_LOCALE_C)
|
||||
#include "libs/regex/src/c_regex_traits.cpp"
|
||||
#else
|
||||
#include "libs/regex/src/cpp_regex_traits.cpp"
|
||||
#endif
|
||||
#include "libs/regex/src/c_regex_traits_common.cpp"
|
||||
#include "libs/regex/src/cregex.cpp"
|
||||
#include "libs/regex/src/fileiter.cpp"
|
||||
#include "libs/regex/src/posix_api.cpp"
|
||||
#include "libs/regex/src/wide_posix_api.cpp"
|
||||
#include "libs/regex/src/regex.cpp"
|
||||
#include "libs/regex/src/regex_debug.cpp"
|
||||
#include "libs/regex/src/regex_synch.cpp"
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE user.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: User settable options.
|
||||
*/
|
||||
|
||||
// define if you want the regex library to use the C locale
|
||||
// even on Win32:
|
||||
// #define BOOST_REGEX_USE_C_LOCALE
|
||||
|
||||
// define this is you want the regex library to use the C++
|
||||
// locale:
|
||||
// #define BOOST_REGEX_USE_CPP_LOCALE
|
||||
|
||||
// define this if the runtime library is a dll, and you
|
||||
// want BOOST_REGEX_DYN_LINK to set up dll exports/imports
|
||||
// with __declspec(dllexport)/__declspec(dllimport.)
|
||||
// #define BOOST_REGEX_HAS_DLL_RUNTIME
|
||||
|
||||
// define this if you want to dynamically link to regex,
|
||||
// if the runtime library is also a dll (Probably Win32 specific,
|
||||
// and has no effect unless BOOST_REGEX_HAS_DLL_RUNTIME is set):
|
||||
// #define BOOST_REGEX_DYN_LINK
|
||||
|
||||
// define this if you don't want the lib to automatically
|
||||
// select its link libraries:
|
||||
// #define BOOST_REGEX_NO_LIB
|
||||
|
||||
// define this if templates with switch statements cause problems:
|
||||
// #define BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE
|
||||
|
||||
// define this to disable Win32 support when available:
|
||||
// #define BOOST_REGEX_NO_W32
|
||||
|
||||
// define this if bool is not a real type:
|
||||
// #define BOOST_REGEX_NO_BOOL
|
||||
|
||||
// define this if no template instances are to be placed in
|
||||
// the library rather than users object files:
|
||||
// #define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
|
||||
// define this if the forward declarations in regex_fwd.hpp
|
||||
// cause more problems than they are worth:
|
||||
// #define BOOST_REGEX_NO_FWD
|
||||
|
||||
// define this if your compiler supports MS Windows structured
|
||||
// exception handling.
|
||||
// #define BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
|
||||
// define this if you want to use the recursive algorithm
|
||||
// even if BOOST_REGEX_HAS_MS_STACK_GUARD is not defined.
|
||||
// #define BOOST_REGEX_RECURSIVE
|
||||
|
||||
// define this if you want to use the non-recursive
|
||||
// algorithm, even if the recursive version would be the default.
|
||||
// #define BOOST_REGEX_NON_RECURSIVE
|
||||
|
||||
// define this if you want to set the size of the memory blocks
|
||||
// used by the non-recursive algorithm.
|
||||
// #define BOOST_REGEX_BLOCKSIZE 4096
|
||||
|
||||
// define this if you want to set the maximum number of memory blocks
|
||||
// used by the non-recursive algorithm.
|
||||
// #define BOOST_REGEX_MAX_BLOCKS 1024
|
||||
|
||||
// define this if you want to set the maximum number of memory blocks
|
||||
// cached by the non-recursive algorithm: Normally this is 16, but can be
|
||||
// higher if you have multiple threads all using boost.regex, or lower
|
||||
// if you don't want boost.regex to cache memory.
|
||||
// #define BOOST_REGEX_MAX_CACHE_BLOCKS 16
|
||||
|
||||
// define this if you want to be able to access extended capture
|
||||
// information in your sub_match's (caution this will slow things
|
||||
// down quite a bit).
|
||||
// #define BOOST_REGEX_MATCH_EXTRA
|
||||
|
||||
// define this if you want to enable support for Unicode via ICU.
|
||||
// #define BOOST_HAS_ICU
|
||||
@@ -0,0 +1,630 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2004
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE basic_regex.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares template class basic_regex.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_BASIC_REGEX_HPP
|
||||
#define BOOST_REGEX_V4_BASIC_REGEX_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4251 4231 4660)
|
||||
#endif
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
//
|
||||
// forward declaration, we will need this one later:
|
||||
//
|
||||
template <class charT, class traits>
|
||||
class basic_regex_parser;
|
||||
|
||||
//
|
||||
// class regex_data:
|
||||
// represents the data we wish to expose to the matching algorithms.
|
||||
//
|
||||
template <class charT, class traits>
|
||||
struct regex_data
|
||||
{
|
||||
typedef regex_constants::syntax_option_type flag_type;
|
||||
typedef std::size_t size_type;
|
||||
|
||||
regex_data(const ::boost::shared_ptr<
|
||||
::boost::regex_traits_wrapper<traits> >& t)
|
||||
: m_ptraits(t), m_expression(0), m_expression_len(0) {}
|
||||
regex_data()
|
||||
: m_ptraits(new ::boost::regex_traits_wrapper<traits>()), m_expression(0), m_expression_len(0) {}
|
||||
|
||||
::boost::shared_ptr<
|
||||
::boost::regex_traits_wrapper<traits>
|
||||
> m_ptraits; // traits class instance
|
||||
flag_type m_flags; // flags with which we were compiled
|
||||
int m_status; // error code (0 implies OK).
|
||||
const charT* m_expression; // the original expression
|
||||
std::ptrdiff_t m_expression_len; // the length of the original expression
|
||||
size_type m_mark_count; // the number of marked sub-expressions
|
||||
re_detail::re_syntax_base* m_first_state; // the first state of the machine
|
||||
unsigned m_restart_type; // search optimisation type
|
||||
unsigned char m_startmap[1 << CHAR_BIT]; // which characters can start a match
|
||||
unsigned int m_can_be_null; // whether we can match a null string
|
||||
re_detail::raw_storage m_data; // the buffer in which our states are constructed
|
||||
};
|
||||
//
|
||||
// class basic_regex_implementation
|
||||
// pimpl implementation class for basic_regex.
|
||||
//
|
||||
template <class charT, class traits>
|
||||
class basic_regex_implementation
|
||||
: public regex_data<charT, traits>
|
||||
{
|
||||
public:
|
||||
typedef regex_constants::syntax_option_type flag_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef typename traits::locale_type locale_type;
|
||||
typedef const charT* const_iterator;
|
||||
|
||||
basic_regex_implementation(){}
|
||||
basic_regex_implementation(const ::boost::shared_ptr<
|
||||
::boost::regex_traits_wrapper<traits> >& t)
|
||||
: regex_data<charT, traits>(t) {}
|
||||
void assign(const charT* arg_first,
|
||||
const charT* arg_last,
|
||||
flag_type f)
|
||||
{
|
||||
regex_data<charT, traits>* pdat = this;
|
||||
basic_regex_parser<charT, traits> parser(pdat);
|
||||
parser.parse(arg_first, arg_last, f);
|
||||
}
|
||||
|
||||
locale_type BOOST_REGEX_CALL imbue(locale_type l)
|
||||
{
|
||||
return this->m_ptraits->imbue(l);
|
||||
}
|
||||
locale_type BOOST_REGEX_CALL getloc()const
|
||||
{
|
||||
return this->m_ptraits->getloc();
|
||||
}
|
||||
std::basic_string<charT> BOOST_REGEX_CALL str()const
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
if(this->m_status == 0)
|
||||
result = std::basic_string<charT>(this->m_expression, this->m_expression_len);
|
||||
return result;
|
||||
}
|
||||
const_iterator BOOST_REGEX_CALL expression()const
|
||||
{
|
||||
return this->m_expression;
|
||||
}
|
||||
//
|
||||
// begin, end:
|
||||
const_iterator BOOST_REGEX_CALL begin()const
|
||||
{
|
||||
return (!this->m_status ? 0 : this->m_expression);
|
||||
}
|
||||
const_iterator BOOST_REGEX_CALL end()const
|
||||
{
|
||||
return (!this->m_status ? 0 : this->m_expression + this->m_expression_len);
|
||||
}
|
||||
flag_type BOOST_REGEX_CALL flags()const
|
||||
{
|
||||
return this->m_flags;
|
||||
}
|
||||
size_type BOOST_REGEX_CALL size()const
|
||||
{
|
||||
return this->m_expression_len;
|
||||
}
|
||||
int BOOST_REGEX_CALL status()const
|
||||
{
|
||||
return this->m_status;
|
||||
}
|
||||
size_type BOOST_REGEX_CALL mark_count()const
|
||||
{
|
||||
return this->m_mark_count;
|
||||
}
|
||||
const re_detail::re_syntax_base* get_first_state()const
|
||||
{
|
||||
return this->m_first_state;
|
||||
}
|
||||
unsigned get_restart_type()const
|
||||
{
|
||||
return this->m_restart_type;
|
||||
}
|
||||
const unsigned char* get_map()const
|
||||
{
|
||||
return this->m_startmap;
|
||||
}
|
||||
const ::boost::regex_traits_wrapper<traits>& get_traits()const
|
||||
{
|
||||
return *(this->m_ptraits);
|
||||
}
|
||||
bool can_be_null()const
|
||||
{
|
||||
return this->m_can_be_null;
|
||||
}
|
||||
const regex_data<charT, traits>& get_data()const
|
||||
{
|
||||
basic_regex_implementation<charT, traits> const* p = this;
|
||||
return *static_cast<const regex_data<charT, traits>*>(p);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace re_detail
|
||||
//
|
||||
// class basic_regex:
|
||||
// represents the compiled
|
||||
// regular expression:
|
||||
//
|
||||
|
||||
#ifdef BOOST_REGEX_NO_FWD
|
||||
template <class charT, class traits = regex_traits<charT> >
|
||||
#else
|
||||
template <class charT, class traits >
|
||||
#endif
|
||||
class basic_regex : public regbase
|
||||
{
|
||||
public:
|
||||
// typedefs:
|
||||
typedef typename traits::size_type traits_size_type;
|
||||
typedef typename traits::string_type traits_string_type;
|
||||
typedef charT char_type;
|
||||
typedef traits traits_type;
|
||||
|
||||
typedef charT value_type;
|
||||
typedef charT& reference;
|
||||
typedef const charT& const_reference;
|
||||
typedef const charT* const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef regex_constants::syntax_option_type flag_type;
|
||||
// locale_type
|
||||
// placeholder for actual locale type used by the
|
||||
// traits class to localise *this.
|
||||
typedef typename traits::locale_type locale_type;
|
||||
|
||||
public:
|
||||
explicit basic_regex(){}
|
||||
explicit basic_regex(const charT* p, flag_type f = regex_constants::normal)
|
||||
{
|
||||
assign(p, f);
|
||||
}
|
||||
basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal)
|
||||
{
|
||||
assign(p1, p2, f);
|
||||
}
|
||||
basic_regex(const charT* p, size_type len, flag_type f)
|
||||
{
|
||||
assign(p, len, f);
|
||||
}
|
||||
basic_regex(const basic_regex& that)
|
||||
: m_pimpl(that.m_pimpl) {}
|
||||
~basic_regex(){}
|
||||
basic_regex& BOOST_REGEX_CALL operator=(const basic_regex& that)
|
||||
{
|
||||
return assign(that);
|
||||
}
|
||||
basic_regex& BOOST_REGEX_CALL operator=(const charT* ptr)
|
||||
{
|
||||
return assign(ptr);
|
||||
}
|
||||
|
||||
//
|
||||
// assign:
|
||||
basic_regex& assign(const basic_regex& that)
|
||||
{
|
||||
m_pimpl = that.m_pimpl;
|
||||
return *this;
|
||||
}
|
||||
basic_regex& assign(const charT* p, flag_type f = regex_constants::normal)
|
||||
{
|
||||
return assign(p, p + traits::length(p), f);
|
||||
}
|
||||
basic_regex& assign(const charT* p, size_type len, flag_type f)
|
||||
{
|
||||
return assign(p, p + len, f);
|
||||
}
|
||||
private:
|
||||
basic_regex& do_assign(const charT* p1,
|
||||
const charT* p2,
|
||||
flag_type f);
|
||||
public:
|
||||
basic_regex& assign(const charT* p1,
|
||||
const charT* p2,
|
||||
flag_type f = regex_constants::normal)
|
||||
{
|
||||
return do_assign(p1, p2, f);
|
||||
}
|
||||
#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__IBMCPP__)
|
||||
|
||||
template <class ST, class SA>
|
||||
unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
|
||||
{
|
||||
return set_expression(p.data(), p.data() + p.size(), f);
|
||||
}
|
||||
|
||||
template <class ST, class SA>
|
||||
explicit basic_regex(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
|
||||
{
|
||||
assign(p, f);
|
||||
}
|
||||
|
||||
template <class InputIterator>
|
||||
basic_regex(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal)
|
||||
{
|
||||
typedef typename traits::string_type seq_type;
|
||||
seq_type a(arg_first, arg_last);
|
||||
assign(&*a.begin(), &*a.begin() + a.size(), f);
|
||||
}
|
||||
|
||||
template <class ST, class SA>
|
||||
basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
|
||||
{
|
||||
return assign(p.data(), p.data() + p.size(), regex_constants::normal);
|
||||
}
|
||||
|
||||
template <class string_traits, class A>
|
||||
basic_regex& BOOST_REGEX_CALL assign(
|
||||
const std::basic_string<charT, string_traits, A>& s,
|
||||
flag_type f = regex_constants::normal)
|
||||
{
|
||||
return assign(s.data(), s.data() + s.size(), f);
|
||||
}
|
||||
|
||||
template <class InputIterator>
|
||||
basic_regex& BOOST_REGEX_CALL assign(InputIterator arg_first,
|
||||
InputIterator arg_last,
|
||||
flag_type f = regex_constants::normal)
|
||||
{
|
||||
typedef typename traits::string_type seq_type;
|
||||
seq_type a(arg_first, arg_last);
|
||||
const charT* p1 = &*a.begin();
|
||||
const charT* p2 = &*a.begin() + a.size();
|
||||
return assign(p1, p2, f);
|
||||
}
|
||||
#else
|
||||
unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
|
||||
{
|
||||
return set_expression(p.data(), p.data() + p.size(), f);
|
||||
}
|
||||
|
||||
basic_regex(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
|
||||
{
|
||||
assign(p, f);
|
||||
}
|
||||
|
||||
basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
|
||||
{
|
||||
return assign(p.data(), p.data() + p.size(), regex_constants::normal);
|
||||
}
|
||||
|
||||
basic_regex& BOOST_REGEX_CALL assign(
|
||||
const std::basic_string<charT>& s,
|
||||
flag_type f = regex_constants::normal)
|
||||
{
|
||||
return assign(s.data(), s.data() + s.size(), f);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// locale:
|
||||
locale_type BOOST_REGEX_CALL imbue(locale_type l);
|
||||
locale_type BOOST_REGEX_CALL getloc()const
|
||||
{
|
||||
return m_pimpl.get() ? m_pimpl->getloc() : locale_type();
|
||||
}
|
||||
//
|
||||
// getflags:
|
||||
// retained for backwards compatibility only, "flags"
|
||||
// is now the prefered name:
|
||||
flag_type BOOST_REGEX_CALL getflags()const
|
||||
{
|
||||
return flags();
|
||||
}
|
||||
flag_type BOOST_REGEX_CALL flags()const
|
||||
{
|
||||
return m_pimpl.get() ? m_pimpl->flags() : 0;
|
||||
}
|
||||
//
|
||||
// str:
|
||||
std::basic_string<charT> BOOST_REGEX_CALL str()const
|
||||
{
|
||||
return m_pimpl.get() ? m_pimpl->str() : std::basic_string<charT>();
|
||||
}
|
||||
//
|
||||
// begin, end:
|
||||
const_iterator BOOST_REGEX_CALL begin()const
|
||||
{
|
||||
return (m_pimpl.get() ? m_pimpl->begin() : 0);
|
||||
}
|
||||
const_iterator BOOST_REGEX_CALL end()const
|
||||
{
|
||||
return (m_pimpl.get() ? m_pimpl->end() : 0);
|
||||
}
|
||||
//
|
||||
// swap:
|
||||
void BOOST_REGEX_CALL swap(basic_regex& that)throw()
|
||||
{
|
||||
m_pimpl.swap(that.m_pimpl);
|
||||
}
|
||||
//
|
||||
// size:
|
||||
size_type BOOST_REGEX_CALL size()const
|
||||
{
|
||||
return (m_pimpl.get() ? m_pimpl->size() : 0);
|
||||
}
|
||||
//
|
||||
// max_size:
|
||||
size_type BOOST_REGEX_CALL max_size()const
|
||||
{
|
||||
return UINT_MAX;
|
||||
}
|
||||
//
|
||||
// empty:
|
||||
bool BOOST_REGEX_CALL empty()const
|
||||
{
|
||||
return (m_pimpl.get() ? 0 != m_pimpl->status() : true);
|
||||
}
|
||||
|
||||
size_type BOOST_REGEX_CALL mark_count()const
|
||||
{
|
||||
return (m_pimpl.get() ? m_pimpl->mark_count() : 0);
|
||||
}
|
||||
|
||||
int status()const
|
||||
{
|
||||
return (m_pimpl.get() ? m_pimpl->status() : regex_constants::error_empty);
|
||||
}
|
||||
|
||||
int BOOST_REGEX_CALL compare(const basic_regex& that) const
|
||||
{
|
||||
if(m_pimpl.get() == that.m_pimpl.get())
|
||||
return 0;
|
||||
if(!m_pimpl.get())
|
||||
return -1;
|
||||
if(!that.m_pimpl.get())
|
||||
return 1;
|
||||
if(status() != that.status())
|
||||
return status() - that.status();
|
||||
if(flags() != that.flags())
|
||||
return flags() - that.flags();
|
||||
return str().compare(that.str());
|
||||
}
|
||||
bool BOOST_REGEX_CALL operator==(const basic_regex& e)const
|
||||
{
|
||||
return compare(e) == 0;
|
||||
}
|
||||
bool BOOST_REGEX_CALL operator != (const basic_regex& e)const
|
||||
{
|
||||
return compare(e) != 0;
|
||||
}
|
||||
bool BOOST_REGEX_CALL operator<(const basic_regex& e)const
|
||||
{
|
||||
return compare(e) < 0;
|
||||
}
|
||||
bool BOOST_REGEX_CALL operator>(const basic_regex& e)const
|
||||
{
|
||||
return compare(e) > 0;
|
||||
}
|
||||
bool BOOST_REGEX_CALL operator<=(const basic_regex& e)const
|
||||
{
|
||||
return compare(e) <= 0;
|
||||
}
|
||||
bool BOOST_REGEX_CALL operator>=(const basic_regex& e)const
|
||||
{
|
||||
return compare(e) >= 0;
|
||||
}
|
||||
|
||||
//
|
||||
// The following are deprecated as public interfaces
|
||||
// but are available for compatibility with earlier versions.
|
||||
const charT* BOOST_REGEX_CALL expression()const
|
||||
{
|
||||
return (m_pimpl.get() && !m_pimpl->status() ? m_pimpl->expression() : 0);
|
||||
}
|
||||
unsigned int BOOST_REGEX_CALL set_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal)
|
||||
{
|
||||
assign(p1, p2, f | regex_constants::no_except);
|
||||
return status();
|
||||
}
|
||||
unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regex_constants::normal)
|
||||
{
|
||||
assign(p, f | regex_constants::no_except);
|
||||
return status();
|
||||
}
|
||||
unsigned int BOOST_REGEX_CALL error_code()const
|
||||
{
|
||||
return status();
|
||||
}
|
||||
//
|
||||
// private access methods:
|
||||
//
|
||||
const re_detail::re_syntax_base* get_first_state()const
|
||||
{
|
||||
BOOST_ASSERT(0 != m_pimpl.get());
|
||||
return m_pimpl->get_first_state();
|
||||
}
|
||||
unsigned get_restart_type()const
|
||||
{
|
||||
BOOST_ASSERT(0 != m_pimpl.get());
|
||||
return m_pimpl->get_restart_type();
|
||||
}
|
||||
const unsigned char* get_map()const
|
||||
{
|
||||
BOOST_ASSERT(0 != m_pimpl.get());
|
||||
return m_pimpl->get_map();
|
||||
}
|
||||
const ::boost::regex_traits_wrapper<traits>& get_traits()const
|
||||
{
|
||||
BOOST_ASSERT(0 != m_pimpl.get());
|
||||
return m_pimpl->get_traits();
|
||||
}
|
||||
bool can_be_null()const
|
||||
{
|
||||
BOOST_ASSERT(0 != m_pimpl.get());
|
||||
return m_pimpl->can_be_null();
|
||||
}
|
||||
const re_detail::regex_data<charT, traits>& get_data()const
|
||||
{
|
||||
BOOST_ASSERT(0 != m_pimpl.get());
|
||||
return m_pimpl->get_data();
|
||||
}
|
||||
|
||||
private:
|
||||
shared_ptr<re_detail::basic_regex_implementation<charT, traits> > m_pimpl;
|
||||
};
|
||||
|
||||
//
|
||||
// out of line members;
|
||||
// these are the only members that mutate the basic_regex object,
|
||||
// and are designed to provide the strong exception guarentee
|
||||
// (in the event of a throw, the state of the object remains unchanged).
|
||||
//
|
||||
template <class charT, class traits>
|
||||
basic_regex<charT, traits>& basic_regex<charT, traits>::do_assign(const charT* p1,
|
||||
const charT* p2,
|
||||
flag_type f)
|
||||
{
|
||||
shared_ptr<re_detail::basic_regex_implementation<charT, traits> > temp;
|
||||
if(!m_pimpl.get())
|
||||
{
|
||||
temp = shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>());
|
||||
}
|
||||
else
|
||||
{
|
||||
temp = shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>(m_pimpl->m_ptraits));
|
||||
}
|
||||
temp->assign(p1, p2, f);
|
||||
temp.swap(m_pimpl);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class charT, class traits>
|
||||
typename basic_regex<charT, traits>::locale_type BOOST_REGEX_CALL basic_regex<charT, traits>::imbue(locale_type l)
|
||||
{
|
||||
shared_ptr<re_detail::basic_regex_implementation<charT, traits> > temp(new re_detail::basic_regex_implementation<charT, traits>());
|
||||
locale_type result = temp->imbue(l);
|
||||
temp.swap(m_pimpl);
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// non-members:
|
||||
//
|
||||
template <class charT, class traits>
|
||||
void swap(basic_regex<charT, traits>& e1, basic_regex<charT, traits>& e2)
|
||||
{
|
||||
e1.swap(e2);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
template <class charT, class traits, class traits2>
|
||||
std::basic_ostream<charT, traits>&
|
||||
operator << (std::basic_ostream<charT, traits>& os,
|
||||
const basic_regex<charT, traits2>& e)
|
||||
{
|
||||
return (os << e.str());
|
||||
}
|
||||
#else
|
||||
template <class traits>
|
||||
std::ostream& operator << (std::ostream& os, const basic_regex<char, traits>& e)
|
||||
{
|
||||
return (os << e.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// class reg_expression:
|
||||
// this is provided for backwards compatibility only,
|
||||
// it is deprecated, no not use!
|
||||
//
|
||||
#ifdef BOOST_REGEX_NO_FWD
|
||||
template <class charT, class traits = regex_traits<charT> >
|
||||
#else
|
||||
template <class charT, class traits >
|
||||
#endif
|
||||
class reg_expression : public basic_regex<charT, traits>
|
||||
{
|
||||
public:
|
||||
typedef typename basic_regex<charT, traits>::flag_type flag_type;
|
||||
typedef typename basic_regex<charT, traits>::size_type size_type;
|
||||
explicit reg_expression(){}
|
||||
explicit reg_expression(const charT* p, flag_type f = regex_constants::normal)
|
||||
: basic_regex<charT, traits>(p, f){}
|
||||
reg_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal)
|
||||
: basic_regex<charT, traits>(p1, p2, f){}
|
||||
reg_expression(const charT* p, size_type len, flag_type f)
|
||||
: basic_regex<charT, traits>(p, len, f){}
|
||||
reg_expression(const reg_expression& that)
|
||||
: basic_regex<charT, traits>(that) {}
|
||||
~reg_expression(){}
|
||||
reg_expression& BOOST_REGEX_CALL operator=(const reg_expression& that)
|
||||
{
|
||||
return this->assign(that);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__IBMCPP__)
|
||||
template <class ST, class SA>
|
||||
explicit reg_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
|
||||
: basic_regex<charT, traits>(p, f)
|
||||
{
|
||||
}
|
||||
|
||||
template <class InputIterator>
|
||||
reg_expression(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal)
|
||||
: basic_regex<charT, traits>(arg_first, arg_last, f)
|
||||
{
|
||||
}
|
||||
|
||||
template <class ST, class SA>
|
||||
reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
|
||||
{
|
||||
this->assign(p);
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
explicit reg_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
|
||||
: basic_regex<charT, traits>(p, f)
|
||||
{
|
||||
}
|
||||
|
||||
reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
|
||||
{
|
||||
this->assign(p);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE c_regex_traits.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares regular expression traits class that wraps the global C locale.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_C_REGEX_TRAITS_HPP_INCLUDED
|
||||
#define BOOST_C_REGEX_TRAITS_HPP_INCLUDED
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_WORKAROUND_HPP
|
||||
#include <boost/regex/v4/regex_workaround.hpp>
|
||||
#endif
|
||||
|
||||
#include <cctype>
|
||||
|
||||
#ifdef BOOST_NO_STDC_NAMESPACE
|
||||
namespace std{
|
||||
using ::strlen; using ::tolower;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
|
||||
template <class charT>
|
||||
struct c_regex_traits;
|
||||
|
||||
template<>
|
||||
struct BOOST_REGEX_DECL c_regex_traits<char>
|
||||
{
|
||||
c_regex_traits(){}
|
||||
typedef char char_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::string string_type;
|
||||
struct locale_type{};
|
||||
typedef boost::uint32_t char_class_type;
|
||||
|
||||
static size_type length(const char_type* p)
|
||||
{
|
||||
return (std::strlen)(p);
|
||||
}
|
||||
|
||||
char translate(char c) const
|
||||
{
|
||||
return c;
|
||||
}
|
||||
char translate_nocase(char c) const
|
||||
{
|
||||
return static_cast<char>((std::tolower)(static_cast<unsigned char>(c)));
|
||||
}
|
||||
|
||||
static string_type BOOST_REGEX_CALL transform(const char* p1, const char* p2);
|
||||
static string_type BOOST_REGEX_CALL transform_primary(const char* p1, const char* p2);
|
||||
|
||||
static char_class_type BOOST_REGEX_CALL lookup_classname(const char* p1, const char* p2);
|
||||
static string_type BOOST_REGEX_CALL lookup_collatename(const char* p1, const char* p2);
|
||||
|
||||
static bool BOOST_REGEX_CALL isctype(char, char_class_type);
|
||||
static int BOOST_REGEX_CALL value(char, int);
|
||||
|
||||
locale_type imbue(locale_type l)
|
||||
{ return l; }
|
||||
locale_type getloc()const
|
||||
{ return locale_type(); }
|
||||
|
||||
private:
|
||||
// this type is not copyable:
|
||||
c_regex_traits(const c_regex_traits&);
|
||||
c_regex_traits& operator=(const c_regex_traits&);
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
template<>
|
||||
struct BOOST_REGEX_DECL c_regex_traits<wchar_t>
|
||||
{
|
||||
c_regex_traits(){}
|
||||
typedef wchar_t char_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::wstring string_type;
|
||||
struct locale_type{};
|
||||
typedef boost::uint32_t char_class_type;
|
||||
|
||||
static size_type length(const char_type* p)
|
||||
{
|
||||
return (std::wcslen)(p);
|
||||
}
|
||||
|
||||
wchar_t translate(wchar_t c) const
|
||||
{
|
||||
return c;
|
||||
}
|
||||
wchar_t translate_nocase(wchar_t c) const
|
||||
{
|
||||
return (std::towlower)(c);
|
||||
}
|
||||
|
||||
static string_type BOOST_REGEX_CALL transform(const wchar_t* p1, const wchar_t* p2);
|
||||
static string_type BOOST_REGEX_CALL transform_primary(const wchar_t* p1, const wchar_t* p2);
|
||||
|
||||
static char_class_type BOOST_REGEX_CALL lookup_classname(const wchar_t* p1, const wchar_t* p2);
|
||||
static string_type BOOST_REGEX_CALL lookup_collatename(const wchar_t* p1, const wchar_t* p2);
|
||||
|
||||
static bool BOOST_REGEX_CALL isctype(wchar_t, char_class_type);
|
||||
static int BOOST_REGEX_CALL value(wchar_t, int);
|
||||
|
||||
locale_type imbue(locale_type l)
|
||||
{ return l; }
|
||||
locale_type getloc()const
|
||||
{ return locale_type(); }
|
||||
|
||||
private:
|
||||
// this type is not copyable:
|
||||
c_regex_traits(const c_regex_traits&);
|
||||
c_regex_traits& operator=(const c_regex_traits&);
|
||||
};
|
||||
|
||||
#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
|
||||
//
|
||||
// Provide an unsigned short version as well, so the user can link to this
|
||||
// no matter whether they build with /Zc:wchar_t or not (MSVC specific).
|
||||
//
|
||||
template<>
|
||||
struct BOOST_REGEX_DECL c_regex_traits<unsigned short>
|
||||
{
|
||||
c_regex_traits(){}
|
||||
typedef unsigned short char_type;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::basic_string<unsigned short> string_type;
|
||||
struct locale_type{};
|
||||
typedef boost::uint32_t char_class_type;
|
||||
|
||||
static size_type length(const char_type* p)
|
||||
{
|
||||
return (std::wcslen)((const wchar_t*)p);
|
||||
}
|
||||
|
||||
unsigned short translate(unsigned short c) const
|
||||
{
|
||||
return c;
|
||||
}
|
||||
unsigned short translate_nocase(unsigned short c) const
|
||||
{
|
||||
return (std::towlower)((wchar_t)c);
|
||||
}
|
||||
|
||||
static string_type BOOST_REGEX_CALL transform(const unsigned short* p1, const unsigned short* p2);
|
||||
static string_type BOOST_REGEX_CALL transform_primary(const unsigned short* p1, const unsigned short* p2);
|
||||
|
||||
static char_class_type BOOST_REGEX_CALL lookup_classname(const unsigned short* p1, const unsigned short* p2);
|
||||
static string_type BOOST_REGEX_CALL lookup_collatename(const unsigned short* p1, const unsigned short* p2);
|
||||
|
||||
static bool BOOST_REGEX_CALL isctype(unsigned short, char_class_type);
|
||||
static int BOOST_REGEX_CALL value(unsigned short, int);
|
||||
|
||||
locale_type imbue(locale_type l)
|
||||
{ return l; }
|
||||
locale_type getloc()const
|
||||
{ return locale_type(); }
|
||||
|
||||
private:
|
||||
// this type is not copyable:
|
||||
c_regex_traits(const c_regex_traits&);
|
||||
c_regex_traits& operator=(const c_regex_traits&);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_NO_WREGEX
|
||||
|
||||
}
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE char_regex_traits.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares deprecated traits classes char_regex_traits<>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_REGEX_V4_CHAR_REGEX_TRAITS_HPP
|
||||
#define BOOST_REGEX_V4_CHAR_REGEX_TRAITS_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace deprecated{
|
||||
//
|
||||
// class char_regex_traits_i
|
||||
// provides case insensitive traits classes (deprecated):
|
||||
template <class charT>
|
||||
class char_regex_traits_i : public regex_traits<charT> {};
|
||||
|
||||
template<>
|
||||
class char_regex_traits_i<char> : public regex_traits<char>
|
||||
{
|
||||
public:
|
||||
typedef char char_type;
|
||||
typedef unsigned char uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef regex_traits<char> base_type;
|
||||
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
template<>
|
||||
class char_regex_traits_i<wchar_t> : public regex_traits<wchar_t>
|
||||
{
|
||||
public:
|
||||
typedef wchar_t char_type;
|
||||
typedef unsigned short uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef regex_traits<wchar_t> base_type;
|
||||
|
||||
};
|
||||
#endif
|
||||
} // namespace deprecated
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif // include
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,301 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE cregex.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares POSIX API functions
|
||||
* + boost::RegEx high level wrapper.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RE_CREGEX_HPP_INCLUDED
|
||||
#define BOOST_RE_CREGEX_HPP_INCLUDED
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
#include <boost/regex/v4/match_flags.hpp>
|
||||
#include <boost/regex/v4/error_type.hpp>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <cstddef>
|
||||
#else
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
/* include these defs only for POSIX compatablity */
|
||||
#ifdef __cplusplus
|
||||
namespace boost{
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && !defined(BOOST_NO_STDC_NAMESPACE)
|
||||
typedef std::ptrdiff_t regoff_t;
|
||||
typedef std::size_t regsize_t;
|
||||
#else
|
||||
typedef ptrdiff_t regoff_t;
|
||||
typedef size_t regsize_t;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int re_magic;
|
||||
#ifdef __cplusplus
|
||||
std::size_t re_nsub; /* number of parenthesized subexpressions */
|
||||
#else
|
||||
size_t re_nsub;
|
||||
#endif
|
||||
const char* re_endp; /* end pointer for REG_PEND */
|
||||
void* guts; /* none of your business :-) */
|
||||
match_flag_type eflags; /* none of your business :-) */
|
||||
} regex_tA;
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
typedef struct
|
||||
{
|
||||
unsigned int re_magic;
|
||||
#ifdef __cplusplus
|
||||
std::size_t re_nsub; /* number of parenthesized subexpressions */
|
||||
#else
|
||||
size_t re_nsub;
|
||||
#endif
|
||||
const wchar_t* re_endp; /* end pointer for REG_PEND */
|
||||
void* guts; /* none of your business :-) */
|
||||
match_flag_type eflags; /* none of your business :-) */
|
||||
} regex_tW;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
regoff_t rm_so; /* start of match */
|
||||
regoff_t rm_eo; /* end of match */
|
||||
} regmatch_t;
|
||||
|
||||
/* regcomp() flags */
|
||||
typedef enum{
|
||||
REG_BASIC = 0000,
|
||||
REG_EXTENDED = 0001,
|
||||
REG_ICASE = 0002,
|
||||
REG_NOSUB = 0004,
|
||||
REG_NEWLINE = 0010,
|
||||
REG_NOSPEC = 0020,
|
||||
REG_PEND = 0040,
|
||||
REG_DUMP = 0200,
|
||||
REG_NOCOLLATE = 0400,
|
||||
REG_ESCAPE_IN_LISTS = 01000,
|
||||
REG_NEWLINE_ALT = 02000,
|
||||
REG_PERLEX = 04000,
|
||||
|
||||
REG_PERL = REG_EXTENDED | REG_NOCOLLATE | REG_ESCAPE_IN_LISTS | REG_PERLEX,
|
||||
REG_AWK = REG_EXTENDED | REG_ESCAPE_IN_LISTS,
|
||||
REG_GREP = REG_BASIC | REG_NEWLINE_ALT,
|
||||
REG_EGREP = REG_EXTENDED | REG_NEWLINE_ALT,
|
||||
|
||||
REG_ASSERT = 15,
|
||||
REG_INVARG = 16,
|
||||
REG_ATOI = 255, /* convert name to number (!) */
|
||||
REG_ITOA = 0400 /* convert number to name (!) */
|
||||
} reg_comp_flags;
|
||||
|
||||
/* regexec() flags */
|
||||
typedef enum{
|
||||
REG_NOTBOL = 00001,
|
||||
REG_NOTEOL = 00002,
|
||||
REG_STARTEND = 00004
|
||||
} reg_exec_flags;
|
||||
|
||||
//
|
||||
// POSIX error codes:
|
||||
//
|
||||
typedef unsigned reg_error_t;
|
||||
typedef reg_error_t reg_errcode_t; // backwards compatibility
|
||||
|
||||
static const reg_error_t REG_NOERROR = 0; /* Success. */
|
||||
static const reg_error_t REG_NOMATCH = 1; /* Didn't find a match (for regexec). */
|
||||
|
||||
/* POSIX regcomp return error codes. (In the order listed in the
|
||||
standard.) */
|
||||
static const reg_error_t REG_BADPAT = 2; /* Invalid pattern. */
|
||||
static const reg_error_t REG_ECOLLATE = 3; /* Undefined collating element. */
|
||||
static const reg_error_t REG_ECTYPE = 4; /* Invalid character class name. */
|
||||
static const reg_error_t REG_EESCAPE = 5; /* Trailing backslash. */
|
||||
static const reg_error_t REG_ESUBREG = 6; /* Invalid back reference. */
|
||||
static const reg_error_t REG_EBRACK = 7; /* Unmatched left bracket. */
|
||||
static const reg_error_t REG_EPAREN = 8; /* Parenthesis imbalance. */
|
||||
static const reg_error_t REG_EBRACE = 9; /* Unmatched \{. */
|
||||
static const reg_error_t REG_BADBR = 10; /* Invalid contents of \{\}. */
|
||||
static const reg_error_t REG_ERANGE = 11; /* Invalid range end. */
|
||||
static const reg_error_t REG_ESPACE = 12; /* Ran out of memory. */
|
||||
static const reg_error_t REG_BADRPT = 13; /* No preceding re for repetition op. */
|
||||
static const reg_error_t REG_EEND = 14; /* unexpected end of expression */
|
||||
static const reg_error_t REG_ESIZE = 15; /* expression too big */
|
||||
static const reg_error_t REG_ERPAREN = 8; /* = REG_EPAREN : unmatched right parenthesis */
|
||||
static const reg_error_t REG_EMPTY = 17; /* empty expression */
|
||||
static const reg_error_t REG_E_MEMORY = 15; /* = REG_ESIZE : out of memory */
|
||||
static const reg_error_t REG_ECOMPLEXITY = 18; /* complexity too high */
|
||||
static const reg_error_t REG_ESTACK = 19; /* out of stack space */
|
||||
static const reg_error_t REG_E_UNKNOWN = 20; /* unknown error */
|
||||
static const reg_error_t REG_ENOSYS = 20; /* = REG_E_UNKNOWN : Reserved. */
|
||||
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA*, const char*, int);
|
||||
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int, const regex_tA*, char*, regsize_t);
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecA(const regex_tA*, const char*, regsize_t, regmatch_t*, int);
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeA(regex_tA*);
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW*, const wchar_t*, int);
|
||||
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int, const regex_tW*, wchar_t*, regsize_t);
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecW(const regex_tW*, const wchar_t*, regsize_t, regmatch_t*, int);
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeW(regex_tW*);
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
//
|
||||
// C++ high level wrapper goes here:
|
||||
//
|
||||
#if defined(__cplusplus)
|
||||
#include <string>
|
||||
#include <vector>
|
||||
namespace boost{
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
class RegEx;
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
class RegExData;
|
||||
struct pred1;
|
||||
struct pred2;
|
||||
struct pred3;
|
||||
struct pred4;
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
#if (defined(BOOST_MSVC) || defined(__BORLANDC__)) && !defined(BOOST_DISABLE_WIN32)
|
||||
typedef bool (__cdecl *GrepCallback)(const RegEx& expression);
|
||||
typedef bool (__cdecl *GrepFileCallback)(const char* file, const RegEx& expression);
|
||||
typedef bool (__cdecl *FindFilesCallback)(const char* file);
|
||||
#else
|
||||
typedef bool (*GrepCallback)(const RegEx& expression);
|
||||
typedef bool (*GrepFileCallback)(const char* file, const RegEx& expression);
|
||||
typedef bool (*FindFilesCallback)(const char* file);
|
||||
#endif
|
||||
|
||||
class BOOST_REGEX_DECL RegEx
|
||||
{
|
||||
private:
|
||||
re_detail::RegExData* pdata;
|
||||
public:
|
||||
RegEx();
|
||||
RegEx(const RegEx& o);
|
||||
~RegEx();
|
||||
explicit RegEx(const char* c, bool icase = false);
|
||||
explicit RegEx(const std::string& s, bool icase = false);
|
||||
RegEx& operator=(const RegEx& o);
|
||||
RegEx& operator=(const char* p);
|
||||
RegEx& operator=(const std::string& s){ return this->operator=(s.c_str()); }
|
||||
unsigned int SetExpression(const char* p, bool icase = false);
|
||||
unsigned int SetExpression(const std::string& s, bool icase = false){ return SetExpression(s.c_str(), icase); }
|
||||
std::string Expression()const;
|
||||
unsigned int error_code()const;
|
||||
//
|
||||
// now matching operators:
|
||||
//
|
||||
bool Match(const char* p, match_flag_type flags = match_default);
|
||||
bool Match(const std::string& s, match_flag_type flags = match_default) { return Match(s.c_str(), flags); }
|
||||
bool Search(const char* p, match_flag_type flags = match_default);
|
||||
bool Search(const std::string& s, match_flag_type flags = match_default) { return Search(s.c_str(), flags); }
|
||||
unsigned int Grep(GrepCallback cb, const char* p, match_flag_type flags = match_default);
|
||||
unsigned int Grep(GrepCallback cb, const std::string& s, match_flag_type flags = match_default) { return Grep(cb, s.c_str(), flags); }
|
||||
unsigned int Grep(std::vector<std::string>& v, const char* p, match_flag_type flags = match_default);
|
||||
unsigned int Grep(std::vector<std::string>& v, const std::string& s, match_flag_type flags = match_default) { return Grep(v, s.c_str(), flags); }
|
||||
unsigned int Grep(std::vector<std::size_t>& v, const char* p, match_flag_type flags = match_default);
|
||||
unsigned int Grep(std::vector<std::size_t>& v, const std::string& s, match_flag_type flags = match_default) { return Grep(v, s.c_str(), flags); }
|
||||
#ifndef BOOST_REGEX_NO_FILEITER
|
||||
unsigned int GrepFiles(GrepFileCallback cb, const char* files, bool recurse = false, match_flag_type flags = match_default);
|
||||
unsigned int GrepFiles(GrepFileCallback cb, const std::string& files, bool recurse = false, match_flag_type flags = match_default) { return GrepFiles(cb, files.c_str(), recurse, flags); }
|
||||
unsigned int FindFiles(FindFilesCallback cb, const char* files, bool recurse = false, match_flag_type flags = match_default);
|
||||
unsigned int FindFiles(FindFilesCallback cb, const std::string& files, bool recurse = false, match_flag_type flags = match_default) { return FindFiles(cb, files.c_str(), recurse, flags); }
|
||||
#endif
|
||||
|
||||
std::string Merge(const std::string& in, const std::string& fmt,
|
||||
bool copy = true, match_flag_type flags = match_default);
|
||||
std::string Merge(const char* in, const char* fmt,
|
||||
bool copy = true, match_flag_type flags = match_default);
|
||||
|
||||
std::size_t Split(std::vector<std::string>& v, std::string& s, match_flag_type flags = match_default, unsigned max_count = ~0);
|
||||
//
|
||||
// now operators for returning what matched in more detail:
|
||||
//
|
||||
std::size_t Position(int i = 0)const;
|
||||
std::size_t Length(int i = 0)const;
|
||||
bool Matched(int i = 0)const;
|
||||
std::size_t Marks()const;
|
||||
std::string What(int i = 0)const;
|
||||
std::string operator[](int i)const { return What(i); }
|
||||
|
||||
static const std::size_t npos;
|
||||
|
||||
friend struct re_detail::pred1;
|
||||
friend struct re_detail::pred2;
|
||||
friend struct re_detail::pred3;
|
||||
friend struct re_detail::pred4;
|
||||
};
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
#endif // include guard
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2003-2005
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE error_type.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares regular expression error type enumerator.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_ERROR_TYPE_HPP
|
||||
#define BOOST_REGEX_ERROR_TYPE_HPP
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace boost{
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace regex_constants{
|
||||
|
||||
enum error_type{
|
||||
|
||||
error_ok = 0, // not used
|
||||
error_no_match = 1, // not used
|
||||
error_bad_pattern = 2,
|
||||
error_collate = 3,
|
||||
error_ctype = 4,
|
||||
error_escape = 5,
|
||||
error_backref = 6,
|
||||
error_brack = 7,
|
||||
error_paren = 8,
|
||||
error_brace = 9,
|
||||
error_badbrace = 10,
|
||||
error_range = 11,
|
||||
error_space = 12,
|
||||
error_badrepeat = 13,
|
||||
error_end = 14, // not used
|
||||
error_size = 15,
|
||||
error_right_paren = 16, // not used
|
||||
error_empty = 17,
|
||||
error_complexity = 18,
|
||||
error_stack = 19,
|
||||
error_unknown = 20
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif
|
||||
@@ -1,54 +1,55 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE fileiter.hpp
|
||||
* VERSION 3.12
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares various platform independent file and
|
||||
* directory iterators, plus binary file input in
|
||||
* the form of class map_file.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RE_FILEITER_HPP
|
||||
#define BOOST_RE_FILEITER_HPP
|
||||
#ifndef BOOST_RE_FILEITER_HPP_INCLUDED
|
||||
#define BOOST_RE_FILEITER_HPP_INCLUDED
|
||||
|
||||
#include <boost/regex/detail/regex_config.hpp>
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_RE_NO_W32)
|
||||
#ifndef BOOST_REGEX_NO_FILEITER
|
||||
|
||||
#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_REGEX_NO_W32)
|
||||
#error "Sorry, can't mix <windows.h> with STL code and gcc compiler: if you ran configure, try again with configure --disable-ms-windows"
|
||||
#define FI_WIN32_MAP
|
||||
#define FI_POSIX_DIR
|
||||
#elif (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_RE_NO_W32)
|
||||
#define FI_WIN32_MAP
|
||||
#define FI_WIN32_DIR
|
||||
#define BOOST_REGEX_FI_WIN32_MAP
|
||||
#define BOOST_REGEX_FI_POSIX_DIR
|
||||
#elif (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_REGEX_NO_W32)
|
||||
#define BOOST_REGEX_FI_WIN32_MAP
|
||||
#define BOOST_REGEX_FI_WIN32_DIR
|
||||
#else
|
||||
#define FI_POSIX_MAP
|
||||
#define FI_POSIX_DIR
|
||||
#define BOOST_REGEX_FI_POSIX_MAP
|
||||
#define BOOST_REGEX_FI_POSIX_DIR
|
||||
#endif
|
||||
|
||||
#if defined(FI_WIN32_MAP)||defined(FI_WIN32_DIR)
|
||||
#if defined(BOOST_REGEX_FI_WIN32_MAP)||defined(BOOST_REGEX_FI_WIN32_DIR)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(FI_WIN32_DIR)
|
||||
#if defined(BOOST_REGEX_FI_WIN32_DIR)
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
typedef WIN32_FIND_DATA _fi_find_data;
|
||||
typedef WIN32_FIND_DATAA _fi_find_data;
|
||||
typedef HANDLE _fi_find_handle;
|
||||
|
||||
} // namespace re_detail
|
||||
@@ -58,8 +59,9 @@ typedef HANDLE _fi_find_handle;
|
||||
#define _fi_invalid_handle INVALID_HANDLE_VALUE
|
||||
#define _fi_dir FILE_ATTRIBUTE_DIRECTORY
|
||||
|
||||
#elif defined(FI_POSIX_DIR)
|
||||
#elif defined(BOOST_REGEX_FI_POSIX_DIR)
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <cctype>
|
||||
#include <iterator>
|
||||
@@ -78,8 +80,8 @@ using std::list;
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
struct _fi_find_data
|
||||
@@ -98,10 +100,8 @@ _fi_find_handle _fi_FindFirstFile(const char* lpFileName, _fi_find_data* lpFindF
|
||||
bool _fi_FindNextFile(_fi_find_handle hFindFile, _fi_find_data* lpFindFileData);
|
||||
bool _fi_FindClose(_fi_find_handle hFindFile);
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#if __BORLANDC__ > 0x520
|
||||
#pragma option pop
|
||||
#endif
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
} // namespace re_detail
|
||||
@@ -117,8 +117,8 @@ bool _fi_FindClose(_fi_find_handle hFindFile);
|
||||
#undef FindClose
|
||||
#endif
|
||||
|
||||
#define FindFirstFile _fi_FindFirstFile
|
||||
#define FindNextFile _fi_FindNextFile
|
||||
#define FindFirstFileA _fi_FindFirstFile
|
||||
#define FindNextFileA _fi_FindNextFile
|
||||
#define FindClose _fi_FindClose
|
||||
|
||||
#endif
|
||||
@@ -126,17 +126,13 @@ bool _fi_FindClose(_fi_find_handle hFindFile);
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#if __BORLANDC__ == 0x530
|
||||
#pragma option push -a4 -b
|
||||
#elif __BORLANDC__ > 0x530
|
||||
#pragma option push -a8 -b
|
||||
#endif
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
#ifdef FI_WIN32_MAP // win32 mapfile
|
||||
#ifdef BOOST_REGEX_FI_WIN32_MAP // win32 mapfile
|
||||
|
||||
class BOOST_RE_IX_DECL mapfile
|
||||
class BOOST_REGEX_DECL mapfile
|
||||
{
|
||||
HANDLE hfile;
|
||||
HANDLE hmap;
|
||||
@@ -158,11 +154,11 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#elif !defined(BOOST_RE_NO_STL) // use C API to emulate the memory map:
|
||||
#else
|
||||
|
||||
class BOOST_RE_IX_DECL mapfile_iterator;
|
||||
class BOOST_REGEX_DECL mapfile_iterator;
|
||||
|
||||
class BOOST_RE_IX_DECL mapfile
|
||||
class BOOST_REGEX_DECL mapfile
|
||||
{
|
||||
typedef char* pointer;
|
||||
std::FILE* hfile;
|
||||
@@ -192,7 +188,10 @@ public:
|
||||
friend class mapfile_iterator;
|
||||
};
|
||||
|
||||
class BOOST_RE_IX_DECL mapfile_iterator
|
||||
class BOOST_REGEX_DECL mapfile_iterator
|
||||
#if !defined(BOOST_NO_STD_ITERATOR) || defined(BOOST_MSVC_STD_ITERATOR)
|
||||
: public std::iterator<std::random_access_iterator_tag, char>
|
||||
#endif
|
||||
{
|
||||
typedef mapfile::pointer internal_pointer;
|
||||
internal_pointer* node;
|
||||
@@ -218,11 +217,11 @@ public:
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
|
||||
mapfile_iterator() { node = 0; file = 0; offset = 0; }
|
||||
mapfile_iterator(const mapfile* f, long position)
|
||||
mapfile_iterator(const mapfile* f, long arg_position)
|
||||
{
|
||||
file = f;
|
||||
node = f->_first + position / mapfile::buf_size;
|
||||
offset = position % mapfile::buf_size;
|
||||
node = f->_first + arg_position / mapfile::buf_size;
|
||||
offset = arg_position % mapfile::buf_size;
|
||||
if(file)
|
||||
file->lock(node);
|
||||
}
|
||||
@@ -242,8 +241,8 @@ public:
|
||||
mapfile_iterator& operator = (const mapfile_iterator& i);
|
||||
char operator* ()const
|
||||
{
|
||||
assert(node >= file->_first);
|
||||
assert(node < file->_last);
|
||||
BOOST_ASSERT(node >= file->_first);
|
||||
BOOST_ASSERT(node < file->_last);
|
||||
return file ? *(*node + sizeof(int) + offset) : char(0);
|
||||
}
|
||||
char operator[] (long off)const
|
||||
@@ -272,12 +271,12 @@ public:
|
||||
{
|
||||
return (i.file == j.file) && (i.node == j.node) && (i.offset == j.offset);
|
||||
}
|
||||
#ifndef BOOST_RE_NO_NOT_EQUAL
|
||||
|
||||
friend inline bool operator!=(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return !(i == j);
|
||||
}
|
||||
#endif
|
||||
|
||||
friend inline bool operator<(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return i.position() < j.position();
|
||||
@@ -311,7 +310,7 @@ public:
|
||||
#endif
|
||||
|
||||
// _fi_sep determines the directory separator, either '\\' or '/'
|
||||
BOOST_RE_IX_DECL extern const char* _fi_sep;
|
||||
BOOST_REGEX_DECL extern const char* _fi_sep;
|
||||
|
||||
struct file_iterator_ref
|
||||
{
|
||||
@@ -321,7 +320,7 @@ struct file_iterator_ref
|
||||
};
|
||||
|
||||
|
||||
class BOOST_RE_IX_DECL file_iterator
|
||||
class BOOST_REGEX_DECL file_iterator
|
||||
{
|
||||
char* _root;
|
||||
char* _path;
|
||||
@@ -353,12 +352,12 @@ public:
|
||||
{
|
||||
return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
|
||||
}
|
||||
#ifndef BOOST_RE_NO_NOT_EQUAL
|
||||
|
||||
friend inline bool operator != (const file_iterator& f1, const file_iterator& f2)
|
||||
{
|
||||
return !(f1 == f2);
|
||||
}
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
// dwa 9/13/00 - suppress unused parameter warning
|
||||
@@ -368,7 +367,7 @@ inline bool operator < (const file_iterator&, const file_iterator&)
|
||||
}
|
||||
|
||||
|
||||
class BOOST_RE_IX_DECL directory_iterator
|
||||
class BOOST_REGEX_DECL directory_iterator
|
||||
{
|
||||
char* _root;
|
||||
char* _path;
|
||||
@@ -404,21 +403,21 @@ public:
|
||||
return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
|
||||
}
|
||||
|
||||
#ifndef BOOST_RE_NO_NOT_EQUAL
|
||||
|
||||
friend inline bool operator != (const directory_iterator& f1, const directory_iterator& f2)
|
||||
{
|
||||
return !(f1 == f2);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
inline bool operator < (const directory_iterator&, const directory_iterator&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
|
||||
@@ -428,7 +427,11 @@ using boost::re_detail::file_iterator;
|
||||
using boost::re_detail::mapfile;
|
||||
} // namespace boost
|
||||
|
||||
#endif // _FILEITER_H
|
||||
#endif // BOOST_REGEX_NO_FILEITER
|
||||
#endif // BOOST_RE_FILEITER_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE instances.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Defines those template instances that are placed in the
|
||||
* library rather than in the users object files.
|
||||
*/
|
||||
|
||||
//
|
||||
// note no include guard, we may include this multiple times:
|
||||
//
|
||||
#ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
|
||||
namespace boost{
|
||||
|
||||
//
|
||||
// this header can be included multiple times, each time with
|
||||
// a different character type, BOOST_REGEX_CHAR_T must be defined
|
||||
// first:
|
||||
//
|
||||
#ifndef BOOST_REGEX_CHAR_T
|
||||
# error "BOOST_REGEX_CHAR_T not defined"
|
||||
#endif
|
||||
|
||||
//
|
||||
// what follows is compiler specific:
|
||||
//
|
||||
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# pragma option push -Jgx
|
||||
# endif
|
||||
|
||||
template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T >;
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# pragma option pop
|
||||
# endif
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#elif defined(BOOST_MSVC) || defined(__ICL)
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# ifdef __GNUC__
|
||||
# define template __extension__ extern template
|
||||
# else
|
||||
# define template extern template
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4251 4231 4660)
|
||||
# endif
|
||||
|
||||
template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T >;
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
template class BOOST_REGEX_DECL match_results< const BOOST_REGEX_CHAR_T* >;
|
||||
#endif
|
||||
#ifndef BOOST_NO_STD_ALLOCATOR
|
||||
template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >;
|
||||
#endif
|
||||
#if !(defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB <= 1))\
|
||||
&& !(defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800))\
|
||||
&& !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
template class BOOST_REGEX_DECL match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >;
|
||||
#endif
|
||||
#ifndef BOOST_NO_STD_ALLOCATOR
|
||||
template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
# ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
# endif
|
||||
|
||||
# ifdef template
|
||||
# undef template
|
||||
# endif
|
||||
|
||||
#elif (defined(__GNUC__) && (__GNUC__ >= 3))
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# define template __extension__ extern template
|
||||
# endif
|
||||
|
||||
template BOOST_REGEX_DECL basic_regex<BOOST_REGEX_CHAR_T>&
|
||||
basic_regex<BOOST_REGEX_CHAR_T>::do_assign(
|
||||
const BOOST_REGEX_CHAR_T* p1,
|
||||
const BOOST_REGEX_CHAR_T* p2,
|
||||
flag_type f);
|
||||
template BOOST_REGEX_DECL basic_regex<BOOST_REGEX_CHAR_T>::locale_type BOOST_REGEX_CALL
|
||||
basic_regex<BOOST_REGEX_CHAR_T>::imbue(locale_type l);
|
||||
|
||||
template BOOST_REGEX_DECL void BOOST_REGEX_CALL
|
||||
match_results<const BOOST_REGEX_CHAR_T*>::maybe_assign(
|
||||
const match_results<const BOOST_REGEX_CHAR_T*>& m);
|
||||
|
||||
|
||||
template BOOST_REGEX_DECL void ::boost::re_detail::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::construct_init(
|
||||
BOOST_REGEX_CHAR_T const * first, BOOST_REGEX_CHAR_T const * end,
|
||||
match_results<BOOST_REGEX_CHAR_T const *>& what,
|
||||
const basic_regex<BOOST_REGEX_CHAR_T>& e,
|
||||
match_flag_type f);
|
||||
template BOOST_REGEX_DECL bool ::boost::re_detail::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::match();
|
||||
template BOOST_REGEX_DECL bool ::boost::re_detail::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::find();
|
||||
|
||||
#if defined(__GLIBCPP__) || defined(__GLIBCXX__)
|
||||
// std:basic_string<>::const_iterator instances as well:
|
||||
template BOOST_REGEX_DECL void BOOST_REGEX_CALL
|
||||
match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::maybe_assign(
|
||||
const match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>& m);
|
||||
|
||||
template BOOST_REGEX_DECL void ::boost::re_detail::perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::construct_init(
|
||||
std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator first, std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator end,
|
||||
match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>& what,
|
||||
const basic_regex<BOOST_REGEX_CHAR_T>& e,
|
||||
match_flag_type f);
|
||||
template BOOST_REGEX_DECL bool ::boost::re_detail::perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::match();
|
||||
template BOOST_REGEX_DECL bool ::boost::re_detail::perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::find();
|
||||
#endif
|
||||
|
||||
# ifdef template
|
||||
# undef template
|
||||
# endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_match.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Iterator traits for selecting an iterator type as
|
||||
* an integral constant expression.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_REGEX_ITERATOR_CATEGORY_HPP
|
||||
#define BOOST_REGEX_ITERATOR_CATEGORY_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
|
||||
namespace boost{
|
||||
namespace detail{
|
||||
|
||||
template <class I>
|
||||
struct is_random_imp
|
||||
{
|
||||
private:
|
||||
typedef typename std::iterator_traits<I>::iterator_category cat;
|
||||
public:
|
||||
BOOST_STATIC_CONSTANT(bool, value = (::boost::is_convertible<cat*, std::random_access_iterator_tag*>::value));
|
||||
};
|
||||
|
||||
template <class I>
|
||||
struct is_random_pointer_imp
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
template <bool is_pointer_type>
|
||||
struct is_random_imp_selector
|
||||
{
|
||||
template <class I>
|
||||
struct rebind
|
||||
{
|
||||
typedef is_random_imp<I> type;
|
||||
};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct is_random_imp_selector<true>
|
||||
{
|
||||
template <class I>
|
||||
struct rebind
|
||||
{
|
||||
typedef is_random_pointer_imp<I> type;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template <class I>
|
||||
struct is_random_access_iterator
|
||||
{
|
||||
private:
|
||||
typedef detail::is_random_imp_selector< ::boost::is_pointer<I>::value> selector;
|
||||
typedef typename selector::template rebind<I> bound_type;
|
||||
typedef typename bound_type::type answer;
|
||||
public:
|
||||
BOOST_STATIC_CONSTANT(bool, value = answer::value);
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
template <class I>
|
||||
const bool is_random_access_iterator<I>::value;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE iterator_traits.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares iterator traits workarounds.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_ITERATOR_TRAITS_HPP
|
||||
#define BOOST_REGEX_V4_ITERATOR_TRAITS_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
||||
template <class T>
|
||||
struct regex_iterator_traits
|
||||
{
|
||||
typedef typename T::iterator_category iterator_category;
|
||||
typedef typename T::value_type value_type;
|
||||
#if !defined(BOOST_NO_STD_ITERATOR)
|
||||
typedef typename T::difference_type difference_type;
|
||||
typedef typename T::pointer pointer;
|
||||
typedef typename T::reference reference;
|
||||
#else
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
#endif
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct pointer_iterator_traits
|
||||
{
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef T value_type;
|
||||
typedef T* pointer;
|
||||
typedef T& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
};
|
||||
template <class T>
|
||||
struct const_pointer_iterator_traits
|
||||
{
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef T value_type;
|
||||
typedef const T* pointer;
|
||||
typedef const T& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct regex_iterator_traits<char*> : pointer_iterator_traits<char>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<const char*> : const_pointer_iterator_traits<char>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<wchar_t*> : pointer_iterator_traits<wchar_t>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<const wchar_t*> : const_pointer_iterator_traits<wchar_t>{};
|
||||
//
|
||||
// the follwoing are needed for ICU support:
|
||||
//
|
||||
template<>
|
||||
struct regex_iterator_traits<unsigned char*> : pointer_iterator_traits<char>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<const unsigned char*> : const_pointer_iterator_traits<char>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<int*> : pointer_iterator_traits<int>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<const int*> : const_pointer_iterator_traits<int>{};
|
||||
|
||||
#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
|
||||
template<>
|
||||
struct regex_iterator_traits<unsigned short*> : pointer_iterator_traits<unsigned short>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<const unsigned short*> : const_pointer_iterator_traits<unsigned short>{};
|
||||
#endif
|
||||
|
||||
#if defined(__SGI_STL_PORT) && defined(__STL_DEBUG)
|
||||
template<>
|
||||
struct regex_iterator_traits<std::string::iterator> : pointer_iterator_traits<char>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<std::string::const_iterator> : const_pointer_iterator_traits<char>{};
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
template<>
|
||||
struct regex_iterator_traits<std::wstring::iterator> : pointer_iterator_traits<wchar_t>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<std::wstring::const_iterator> : const_pointer_iterator_traits<wchar_t>{};
|
||||
#endif // BOOST_NO_WSTRING
|
||||
#endif // stport
|
||||
|
||||
#else
|
||||
|
||||
template <class T>
|
||||
struct regex_iterator_traits : public std::iterator_traits<T> {};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE match_flags.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares match_flags type.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_MATCH_FLAGS
|
||||
#define BOOST_REGEX_V4_MATCH_FLAGS
|
||||
|
||||
#ifdef __cplusplus
|
||||
# include <boost/cstdint.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace boost{
|
||||
namespace regex_constants{
|
||||
#endif
|
||||
|
||||
typedef enum _match_flags
|
||||
{
|
||||
match_default = 0,
|
||||
match_not_bol = 1, // first is not start of line
|
||||
match_not_eol = match_not_bol << 1, // last is not end of line
|
||||
match_not_bob = match_not_eol << 1, // first is not start of buffer
|
||||
match_not_eob = match_not_bob << 1, // last is not end of buffer
|
||||
match_not_bow = match_not_eob << 1, // first is not start of word
|
||||
match_not_eow = match_not_bow << 1, // last is not end of word
|
||||
match_not_dot_newline = match_not_eow << 1, // \n is not matched by '.'
|
||||
match_not_dot_null = match_not_dot_newline << 1, // '\0' is not matched by '.'
|
||||
match_prev_avail = match_not_dot_null << 1, // *--first is a valid expression
|
||||
match_init = match_prev_avail << 1, // internal use
|
||||
match_any = match_init << 1, // don't care what we match
|
||||
match_not_null = match_any << 1, // string can't be null
|
||||
match_continuous = match_not_null << 1, // each grep match must continue from
|
||||
// uninterupted from the previous one
|
||||
match_partial = match_continuous << 1, // find partial matches
|
||||
|
||||
match_stop = match_partial << 1, // stop after first match (grep) V3 only
|
||||
match_not_initial_null = match_stop, // don't match initial null, V4 only
|
||||
match_all = match_stop << 1, // must find the whole of input even if match_any is set
|
||||
match_perl = match_all << 1, // Use perl matching rules
|
||||
match_posix = match_perl << 1, // Use POSIX matching rules
|
||||
match_nosubs = match_posix << 1, // don't trap marked subs
|
||||
match_extra = match_nosubs << 1, // include full capture information for repeated captures
|
||||
match_single_line = match_extra << 1, // treat text as single line and ignor any \n's when matching ^ and $.
|
||||
match_unused1 = match_single_line << 1, // unused
|
||||
match_unused2 = match_unused1 << 1, // unused
|
||||
match_unused3 = match_unused2 << 1, // unused
|
||||
match_max = match_unused3,
|
||||
|
||||
format_perl = 0, // perl style replacement
|
||||
format_default = 0, // ditto.
|
||||
format_sed = match_max << 1, // sed style replacement.
|
||||
format_all = format_sed << 1, // enable all extentions to sytax.
|
||||
format_no_copy = format_all << 1, // don't copy non-matching segments.
|
||||
format_first_only = format_no_copy << 1, // Only replace first occurance.
|
||||
format_is_if = format_first_only << 1, // internal use only.
|
||||
format_literal = format_is_if << 1 // treat string as a literal
|
||||
|
||||
} match_flags;
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
typedef unsigned long match_flag_type;
|
||||
#else
|
||||
typedef match_flags match_flag_type;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
inline match_flags operator&(match_flags m1, match_flags m2)
|
||||
{ return static_cast<match_flags>(static_cast<boost::int32_t>(m1) & static_cast<boost::int32_t>(m2)); }
|
||||
inline match_flags operator|(match_flags m1, match_flags m2)
|
||||
{ return static_cast<match_flags>(static_cast<boost::int32_t>(m1) | static_cast<boost::int32_t>(m2)); }
|
||||
inline match_flags operator^(match_flags m1, match_flags m2)
|
||||
{ return static_cast<match_flags>(static_cast<boost::int32_t>(m1) ^ static_cast<boost::int32_t>(m2)); }
|
||||
inline match_flags operator~(match_flags m1)
|
||||
{ return static_cast<match_flags>(~static_cast<boost::int32_t>(m1)); }
|
||||
inline match_flags& operator&=(match_flags& m1, match_flags m2)
|
||||
{ m1 = m1&m2; return m1; }
|
||||
inline match_flags& operator|=(match_flags& m1, match_flags m2)
|
||||
{ m1 = m1|m2; return m1; }
|
||||
inline match_flags& operator^=(match_flags& m1, match_flags m2)
|
||||
{ m1 = m1^m2; return m1; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // namespace regex_constants
|
||||
//
|
||||
// import names into boost for backwards compatiblity:
|
||||
//
|
||||
using regex_constants::match_flag_type;
|
||||
using regex_constants::match_default;
|
||||
using regex_constants::match_not_bol;
|
||||
using regex_constants::match_not_eol;
|
||||
using regex_constants::match_not_bob;
|
||||
using regex_constants::match_not_eob;
|
||||
using regex_constants::match_not_bow;
|
||||
using regex_constants::match_not_eow;
|
||||
using regex_constants::match_not_dot_newline;
|
||||
using regex_constants::match_not_dot_null;
|
||||
using regex_constants::match_prev_avail;
|
||||
//using regex_constants::match_init;
|
||||
using regex_constants::match_any;
|
||||
using regex_constants::match_not_null;
|
||||
using regex_constants::match_continuous;
|
||||
using regex_constants::match_partial;
|
||||
//using regex_constants::match_stop;
|
||||
using regex_constants::match_all;
|
||||
using regex_constants::match_perl;
|
||||
using regex_constants::match_posix;
|
||||
using regex_constants::match_nosubs;
|
||||
using regex_constants::match_extra;
|
||||
using regex_constants::match_single_line;
|
||||
//using regex_constants::match_max;
|
||||
using regex_constants::format_all;
|
||||
using regex_constants::format_sed;
|
||||
using regex_constants::format_perl;
|
||||
using regex_constants::format_default;
|
||||
using regex_constants::format_no_copy;
|
||||
using regex_constants::format_first_only;
|
||||
//using regex_constants::format_is_if;
|
||||
|
||||
} // namespace boost
|
||||
#endif // __cplusplus
|
||||
#endif // include guard
|
||||
|
||||
@@ -0,0 +1,412 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE match_results.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares template class match_results.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_MATCH_RESULTS_HPP
|
||||
#define BOOST_REGEX_V4_MATCH_RESULTS_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4251 4231 4660)
|
||||
#endif
|
||||
|
||||
template <class BidiIterator, class Allocator>
|
||||
class match_results
|
||||
{
|
||||
private:
|
||||
#ifndef BOOST_NO_STD_ALLOCATOR
|
||||
typedef std::vector<sub_match<BidiIterator>, Allocator> vector_type;
|
||||
#else
|
||||
typedef std::vector<sub_match<BidiIterator> > vector_type;
|
||||
#endif
|
||||
public:
|
||||
typedef sub_match<BidiIterator> value_type;
|
||||
#if !defined(BOOST_NO_STD_ALLOCATOR) && !(defined(BOOST_MSVC) && defined(_STLPORT_VERSION))
|
||||
typedef typename Allocator::const_reference const_reference;
|
||||
#else
|
||||
typedef const value_type& const_reference;
|
||||
#endif
|
||||
typedef const_reference reference;
|
||||
typedef typename vector_type::const_iterator const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
typedef typename re_detail::regex_iterator_traits<
|
||||
BidiIterator>::difference_type difference_type;
|
||||
typedef typename Allocator::size_type size_type;
|
||||
typedef Allocator allocator_type;
|
||||
typedef typename re_detail::regex_iterator_traits<
|
||||
BidiIterator>::value_type char_type;
|
||||
typedef std::basic_string<char_type> string_type;
|
||||
|
||||
// construct/copy/destroy:
|
||||
explicit match_results(const Allocator& a = Allocator())
|
||||
#ifndef BOOST_NO_STD_ALLOCATOR
|
||||
: m_subs(a), m_base() {}
|
||||
#else
|
||||
: m_subs(), m_base() { (void)a; }
|
||||
#endif
|
||||
match_results(const match_results& m)
|
||||
: m_subs(m.m_subs), m_base(m.m_base) {}
|
||||
match_results& operator=(const match_results& m)
|
||||
{
|
||||
m_subs = m.m_subs;
|
||||
m_base = m.m_base;
|
||||
return *this;
|
||||
}
|
||||
~match_results(){}
|
||||
|
||||
// size:
|
||||
size_type size() const
|
||||
{ return empty() ? 0 : m_subs.size() - 2; }
|
||||
size_type max_size() const
|
||||
{ return m_subs.max_size(); }
|
||||
bool empty() const
|
||||
{ return m_subs.size() < 2; }
|
||||
// element access:
|
||||
difference_type length(int sub = 0) const
|
||||
{
|
||||
sub += 2;
|
||||
if((sub < (int)m_subs.size()) && (sub > 0))
|
||||
return m_subs[sub].length();
|
||||
return 0;
|
||||
}
|
||||
difference_type position(unsigned int sub = 0) const
|
||||
{
|
||||
sub += 2;
|
||||
if(sub < m_subs.size())
|
||||
{
|
||||
const sub_match<BidiIterator>& s = m_subs[sub];
|
||||
if(s.matched)
|
||||
{
|
||||
return ::boost::re_detail::distance((BidiIterator)(m_base), (BidiIterator)(s.first));
|
||||
}
|
||||
}
|
||||
return ~static_cast<difference_type>(0);
|
||||
}
|
||||
string_type str(int sub = 0) const
|
||||
{
|
||||
sub += 2;
|
||||
string_type result;
|
||||
if(sub < (int)m_subs.size() && (sub > 0))
|
||||
{
|
||||
const sub_match<BidiIterator>& s = m_subs[sub];
|
||||
if(s.matched)
|
||||
{
|
||||
result = s.str();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
const_reference operator[](int sub) const
|
||||
{
|
||||
sub += 2;
|
||||
if(sub < (int)m_subs.size() && (sub >= 0))
|
||||
{
|
||||
return m_subs[sub];
|
||||
}
|
||||
return m_null;
|
||||
}
|
||||
|
||||
const_reference prefix() const
|
||||
{
|
||||
return (*this)[-1];
|
||||
}
|
||||
|
||||
const_reference suffix() const
|
||||
{
|
||||
return (*this)[-2];
|
||||
}
|
||||
const_iterator begin() const
|
||||
{
|
||||
return (m_subs.size() > 2) ? (m_subs.begin() + 2) : m_subs.end();
|
||||
}
|
||||
const_iterator end() const
|
||||
{
|
||||
return m_subs.end();
|
||||
}
|
||||
// format:
|
||||
template <class OutputIterator>
|
||||
OutputIterator format(OutputIterator out,
|
||||
const string_type& fmt,
|
||||
match_flag_type flags = format_default) const
|
||||
{
|
||||
re_detail::trivial_format_traits<char_type> traits;
|
||||
return re_detail::regex_format_imp(out, *this, fmt.data(), fmt.data() + fmt.size(), flags, traits);
|
||||
}
|
||||
string_type format(const string_type& fmt,
|
||||
match_flag_type flags = format_default) const
|
||||
{
|
||||
string_type result;
|
||||
re_detail::string_out_iterator<string_type> i(result);
|
||||
re_detail::trivial_format_traits<char_type> traits;
|
||||
re_detail::regex_format_imp(i, *this, fmt.data(), fmt.data() + fmt.size(), flags, traits);
|
||||
return result;
|
||||
}
|
||||
// format with locale:
|
||||
template <class OutputIterator, class RegexT>
|
||||
OutputIterator format(OutputIterator out,
|
||||
const string_type& fmt,
|
||||
match_flag_type flags,
|
||||
const RegexT& re) const
|
||||
{
|
||||
return ::boost::re_detail::regex_format_imp(out, *this, fmt.data(), fmt.data() + fmt.size(), flags, re.get_traits());
|
||||
}
|
||||
template <class RegexT>
|
||||
string_type format(const string_type& fmt,
|
||||
match_flag_type flags,
|
||||
const RegexT& re) const
|
||||
{
|
||||
string_type result;
|
||||
re_detail::string_out_iterator<string_type> i(result);
|
||||
::boost::re_detail::regex_format_imp(i, *this, fmt.data(), fmt.data() + fmt.size(), flags, re.get_traits());
|
||||
return result;
|
||||
}
|
||||
|
||||
allocator_type get_allocator() const
|
||||
{
|
||||
#ifndef BOOST_NO_STD_ALLOCATOR
|
||||
return m_subs.get_allocator();
|
||||
#else
|
||||
return allocator_type();
|
||||
#endif
|
||||
}
|
||||
void swap(match_results& that)
|
||||
{
|
||||
std::swap(m_subs, that.m_subs);
|
||||
std::swap(m_base, that.m_base);
|
||||
}
|
||||
bool operator==(const match_results& that)const
|
||||
{
|
||||
return (m_subs == that.m_subs) && (m_base == that.m_base);
|
||||
}
|
||||
bool operator!=(const match_results& that)const
|
||||
{ return !(*this == that); }
|
||||
|
||||
#ifdef BOOST_REGEX_MATCH_EXTRA
|
||||
typedef typename sub_match<BidiIterator>::capture_sequence_type capture_sequence_type;
|
||||
|
||||
const capture_sequence_type& captures(int i)const
|
||||
{
|
||||
return (*this)[i].captures();
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// private access functions:
|
||||
void BOOST_REGEX_CALL set_second(BidiIterator i)
|
||||
{
|
||||
BOOST_ASSERT(m_subs.size() > 2);
|
||||
m_subs[2].second = i;
|
||||
m_subs[2].matched = true;
|
||||
m_subs[0].first = i;
|
||||
m_subs[0].matched = (m_subs[0].first != m_subs[0].second);
|
||||
m_null.first = i;
|
||||
m_null.second = i;
|
||||
m_null.matched = false;
|
||||
}
|
||||
|
||||
void BOOST_REGEX_CALL set_second(BidiIterator i, size_type pos, bool m = true)
|
||||
{
|
||||
pos += 2;
|
||||
BOOST_ASSERT(m_subs.size() > pos);
|
||||
m_subs[pos].second = i;
|
||||
m_subs[pos].matched = m;
|
||||
if(pos == 2)
|
||||
{
|
||||
m_subs[0].first = i;
|
||||
m_subs[0].matched = (m_subs[0].first != m_subs[0].second);
|
||||
m_null.first = i;
|
||||
m_null.second = i;
|
||||
m_null.matched = false;
|
||||
}
|
||||
}
|
||||
void BOOST_REGEX_CALL set_size(size_type n, BidiIterator i, BidiIterator j)
|
||||
{
|
||||
value_type v(j);
|
||||
size_type len = m_subs.size();
|
||||
if(len > n + 2)
|
||||
{
|
||||
m_subs.erase(m_subs.begin()+n+2, m_subs.end());
|
||||
std::fill(m_subs.begin(), m_subs.end(), v);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::fill(m_subs.begin(), m_subs.end(), v);
|
||||
if(n+2 != len)
|
||||
m_subs.insert(m_subs.end(), n+2-len, v);
|
||||
}
|
||||
m_subs[1].first = i;
|
||||
}
|
||||
void BOOST_REGEX_CALL set_base(BidiIterator pos)
|
||||
{
|
||||
m_base = pos;
|
||||
}
|
||||
BidiIterator base()const
|
||||
{
|
||||
return m_base;
|
||||
}
|
||||
void BOOST_REGEX_CALL set_first(BidiIterator i)
|
||||
{
|
||||
// set up prefix:
|
||||
m_subs[1].second = i;
|
||||
m_subs[1].matched = (m_subs[1].first != i);
|
||||
// set up $0:
|
||||
m_subs[2].first = i;
|
||||
// zero out everything else:
|
||||
for(size_type n = 3; n < m_subs.size(); ++n)
|
||||
{
|
||||
m_subs[n].first = m_subs[n].second = m_subs[0].second;
|
||||
m_subs[n].matched = false;
|
||||
}
|
||||
}
|
||||
void BOOST_REGEX_CALL set_first(BidiIterator i, size_type pos)
|
||||
{
|
||||
BOOST_ASSERT(pos+2 < m_subs.size());
|
||||
if(pos)
|
||||
m_subs[pos+2].first = i;
|
||||
else
|
||||
set_first(i);
|
||||
}
|
||||
void BOOST_REGEX_CALL maybe_assign(const match_results<BidiIterator, Allocator>& m);
|
||||
|
||||
|
||||
private:
|
||||
vector_type m_subs; // subexpressions
|
||||
BidiIterator m_base; // where the search started from
|
||||
sub_match<BidiIterator> m_null; // a null match
|
||||
};
|
||||
|
||||
template <class BidiIterator, class Allocator>
|
||||
void BOOST_REGEX_CALL match_results<BidiIterator, Allocator>::maybe_assign(const match_results<BidiIterator, Allocator>& m)
|
||||
{
|
||||
const_iterator p1, p2;
|
||||
p1 = begin();
|
||||
p2 = m.begin();
|
||||
//
|
||||
// Distances are measured from the start of *this* match, unless this isn't
|
||||
// a valid match in which case we use the start of the whole sequence. Note that
|
||||
// no subsequent match-candidate can ever be to the left of the first match found.
|
||||
// This ensures that when we are using bidirectional iterators, that distances
|
||||
// measured are as short as possible, and therefore as efficient as possible
|
||||
// to compute. Finally note that we don't use the "matched" data member to test
|
||||
// whether a sub-expression is a valid match, because partial matches set this
|
||||
// to false for sub-expression 0.
|
||||
//
|
||||
BidiIterator end = this->suffix().second;
|
||||
BidiIterator base = (p1->first == end) ? this->prefix().first : (*this)[0].first;
|
||||
difference_type len1 = 0;
|
||||
difference_type len2 = 0;
|
||||
difference_type base1 = 0;
|
||||
difference_type base2 = 0;
|
||||
std::size_t i;
|
||||
for(i = 0; i < size(); ++i, ++p1, ++p2)
|
||||
{
|
||||
//
|
||||
// Leftmost takes priority over longest; handle special cases
|
||||
// where distances need not be computed first (an optimisation
|
||||
// for bidirectional iterators: ensure that we don't accidently
|
||||
// compute the length of the whole sequence, as this can be really
|
||||
// expensive).
|
||||
//
|
||||
if(p1->first == end)
|
||||
{
|
||||
if(p2->first != end)
|
||||
{
|
||||
// p2 must be better than p1, and no need to calculate
|
||||
// actual distances:
|
||||
base1 = 1;
|
||||
base2 = 0;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// *p1 and *p2 are either unmatched or match end-of sequence,
|
||||
// either way no need to calculate distances:
|
||||
if((p1->matched == false) && (p2->matched == true))
|
||||
break;
|
||||
if((p1->matched == true) && (p2->matched == false))
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if(p2->first == end)
|
||||
{
|
||||
// p1 better than p2, and no need to calculate distances:
|
||||
return;
|
||||
}
|
||||
base1 = ::boost::re_detail::distance(base, p1->first);
|
||||
base2 = ::boost::re_detail::distance(base, p2->first);
|
||||
BOOST_ASSERT(base1 >= 0);
|
||||
BOOST_ASSERT(base2 >= 0);
|
||||
if(base1 < base2) return;
|
||||
if(base2 < base1) break;
|
||||
|
||||
len1 = ::boost::re_detail::distance((BidiIterator)p1->first, (BidiIterator)p1->second);
|
||||
len2 = ::boost::re_detail::distance((BidiIterator)p2->first, (BidiIterator)p2->second);
|
||||
BOOST_ASSERT(len1 >= 0);
|
||||
BOOST_ASSERT(len2 >= 0);
|
||||
if((len1 != len2) || ((p1->matched == false) && (p2->matched == true)))
|
||||
break;
|
||||
if((p1->matched == true) && (p2->matched == false))
|
||||
return;
|
||||
}
|
||||
if(i == size())
|
||||
return;
|
||||
if(base2 < base1)
|
||||
*this = m;
|
||||
else if((len2 > len1) || ((p1->matched == false) && (p2->matched == true)) )
|
||||
*this = m;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator>
|
||||
void swap(match_results<BidiIterator, Allocator>& a, match_results<BidiIterator, Allocator>& b)
|
||||
{
|
||||
a.swap(b);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
template <class charT, class traits, class BidiIterator, class Allocator>
|
||||
std::basic_ostream<charT, traits>&
|
||||
operator << (std::basic_ostream<charT, traits>& os,
|
||||
const match_results<BidiIterator, Allocator>& s)
|
||||
{
|
||||
return (os << s.str());
|
||||
}
|
||||
#else
|
||||
template <class BidiIterator, class Allocator>
|
||||
std::ostream& operator << (std::ostream& os,
|
||||
const match_results<BidiIterator, Allocator>& s)
|
||||
{
|
||||
return (os << s.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright (c) 2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE mem_block_cache.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: memory block cache used by the non-recursive matcher.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_MEM_BLOCK_CACHE_HPP
|
||||
#define BOOST_REGEX_V4_MEM_BLOCK_CACHE_HPP
|
||||
|
||||
#include <new>
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
#include <boost/regex/pending/static_mutex.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
struct mem_block_node
|
||||
{
|
||||
mem_block_node* next;
|
||||
};
|
||||
|
||||
struct mem_block_cache
|
||||
{
|
||||
// this member has to be statically initialsed:
|
||||
mem_block_node* next;
|
||||
unsigned cached_blocks;
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
boost::static_mutex mut;
|
||||
#endif
|
||||
|
||||
~mem_block_cache()
|
||||
{
|
||||
while(next)
|
||||
{
|
||||
mem_block_node* old = next;
|
||||
next = next->next;
|
||||
::operator delete(old);
|
||||
}
|
||||
}
|
||||
void* get()
|
||||
{
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
boost::static_mutex::scoped_lock g(mut);
|
||||
#endif
|
||||
if(next)
|
||||
{
|
||||
mem_block_node* result = next;
|
||||
next = next->next;
|
||||
--cached_blocks;
|
||||
return result;
|
||||
}
|
||||
return ::operator new(BOOST_REGEX_BLOCKSIZE);
|
||||
}
|
||||
void put(void* p)
|
||||
{
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
boost::static_mutex::scoped_lock g(mut);
|
||||
#endif
|
||||
if(cached_blocks >= BOOST_REGEX_MAX_CACHE_BLOCKS)
|
||||
{
|
||||
::operator delete(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
mem_block_node* old = static_cast<mem_block_node*>(p);
|
||||
old->next = next;
|
||||
next = old;
|
||||
++cached_blocks;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
extern mem_block_cache block_cache;
|
||||
|
||||
}
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,518 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_MATCHER_HPP
|
||||
#define BOOST_REGEX_MATCHER_HPP
|
||||
|
||||
#include <boost/regex/v4/iterator_category.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
//
|
||||
// error checking API:
|
||||
//
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL verify_options(boost::regex_constants::syntax_option_type ef, match_flag_type mf);
|
||||
//
|
||||
// function can_start:
|
||||
//
|
||||
template <class charT>
|
||||
bool can_start(charT c, const unsigned char* map, unsigned char mask)
|
||||
{
|
||||
return ((c < static_cast<charT>(0)) ? true : ((c >= static_cast<charT>(1 << CHAR_BIT)) ? true : map[c] & mask));
|
||||
}
|
||||
inline bool can_start(char c, const unsigned char* map, unsigned char mask)
|
||||
{
|
||||
return map[(unsigned char)c] & mask;
|
||||
}
|
||||
inline bool can_start(signed char c, const unsigned char* map, unsigned char mask)
|
||||
{
|
||||
return map[(unsigned char)c] & mask;
|
||||
}
|
||||
inline bool can_start(unsigned char c, const unsigned char* map, unsigned char mask)
|
||||
{
|
||||
return map[c] & mask;
|
||||
}
|
||||
inline bool can_start(unsigned short c, const unsigned char* map, unsigned char mask)
|
||||
{
|
||||
return ((c >= (1 << CHAR_BIT)) ? true : map[c] & mask);
|
||||
}
|
||||
#if !defined(__HP_aCC)
|
||||
#if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
|
||||
inline bool can_start(wchar_t c, const unsigned char* map, unsigned char mask)
|
||||
{
|
||||
return ((c >= (1 << CHAR_BIT)) ? true : map[c] & mask);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Unfortunately Rogue Waves standard library appears to have a bug
|
||||
// in std::basic_string::compare that results in eroneous answers
|
||||
// in some cases (tested with Borland C++ 5.1, Rogue Wave lib version
|
||||
// 0x020101) the test case was:
|
||||
// {39135,0} < {0xff,0}
|
||||
// which succeeds when it should not.
|
||||
//
|
||||
#ifndef _RWSTD_VER
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
|
||||
template <class C, class T, class A>
|
||||
inline int string_compare(const std::basic_string<C,T,A>& s, const C* p)
|
||||
{
|
||||
if(0 == *p)
|
||||
{
|
||||
if(s.empty() || ((s.size() == 1) && (s[0] == 0)))
|
||||
return 0;
|
||||
}
|
||||
return s.compare(p);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)
|
||||
template <class C, class T, class A>
|
||||
inline int string_compare(const std::basic_string<C,T,A>& s, const C* p)
|
||||
{
|
||||
if(0 == *p)
|
||||
{
|
||||
if(s.empty() || ((s.size() == 1) && (s[0] == 0)))
|
||||
return 0;
|
||||
}
|
||||
return s.compare(p);
|
||||
}
|
||||
#endif
|
||||
inline int string_compare(const std::string& s, const char* p)
|
||||
{ return std::strcmp(s.c_str(), p); }
|
||||
# ifndef BOOST_NO_WREGEX
|
||||
inline int string_compare(const std::wstring& s, const wchar_t* p)
|
||||
{ return std::wcscmp(s.c_str(), p); }
|
||||
#endif
|
||||
#endif
|
||||
template <class Seq, class C>
|
||||
inline int string_compare(const Seq& s, const C* p)
|
||||
{
|
||||
std::size_t i = 0;
|
||||
while((i < s.size()) && (p[i] == s[i]))
|
||||
{
|
||||
++i;
|
||||
}
|
||||
return (i == s.size()) ? -p[i] : s[i] - p[i];
|
||||
}
|
||||
# define STR_COMP(s,p) string_compare(s,p)
|
||||
|
||||
template<class charT>
|
||||
inline const charT* re_skip_past_null(const charT* p)
|
||||
{
|
||||
while (*p != static_cast<charT>(0)) ++p;
|
||||
return ++p;
|
||||
}
|
||||
|
||||
template <class iterator, class charT, class traits_type, class char_classT>
|
||||
iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
|
||||
iterator last,
|
||||
const re_set_long<char_classT>* set_,
|
||||
const regex_data<charT, traits_type>& e, bool icase)
|
||||
{
|
||||
const charT* p = reinterpret_cast<const charT*>(set_+1);
|
||||
iterator ptr;
|
||||
unsigned int i;
|
||||
//bool icase = e.m_flags & regex_constants::icase;
|
||||
|
||||
if(next == last) return next;
|
||||
|
||||
typedef typename traits_type::string_type traits_string_type;
|
||||
const ::boost::regex_traits_wrapper<traits_type>& traits_inst = *(e.m_ptraits);
|
||||
|
||||
// dwa 9/13/00 suppress incorrect MSVC warning - it claims this is never
|
||||
// referenced
|
||||
(void)traits_inst;
|
||||
|
||||
// try and match a single character, could be a multi-character
|
||||
// collating element...
|
||||
for(i = 0; i < set_->csingles; ++i)
|
||||
{
|
||||
ptr = next;
|
||||
if(*p == static_cast<charT>(0))
|
||||
{
|
||||
// treat null string as special case:
|
||||
if(traits_inst.translate(*ptr, icase) != *p)
|
||||
{
|
||||
while(*p == static_cast<charT>(0))++p;
|
||||
continue;
|
||||
}
|
||||
return set_->isnot ? next : (ptr == next) ? ++next : ptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
while(*p && (ptr != last))
|
||||
{
|
||||
if(traits_inst.translate(*ptr, icase) != *p)
|
||||
break;
|
||||
++p;
|
||||
++ptr;
|
||||
}
|
||||
|
||||
if(*p == static_cast<charT>(0)) // if null we've matched
|
||||
return set_->isnot ? next : (ptr == next) ? ++next : ptr;
|
||||
|
||||
p = re_skip_past_null(p); // skip null
|
||||
}
|
||||
}
|
||||
|
||||
charT col = traits_inst.translate(*next, icase);
|
||||
|
||||
|
||||
if(set_->cranges || set_->cequivalents)
|
||||
{
|
||||
traits_string_type s1;
|
||||
//
|
||||
// try and match a range, NB only a single character can match
|
||||
if(set_->cranges)
|
||||
{
|
||||
if((e.m_flags & regex_constants::collate) == 0)
|
||||
s1.assign(1, col);
|
||||
else
|
||||
{
|
||||
charT a[2] = { col, charT(0), };
|
||||
s1 = traits_inst.transform(a, a + 1);
|
||||
}
|
||||
for(i = 0; i < set_->cranges; ++i)
|
||||
{
|
||||
if(STR_COMP(s1, p) >= 0)
|
||||
{
|
||||
do{ ++p; }while(*p);
|
||||
++p;
|
||||
if(STR_COMP(s1, p) <= 0)
|
||||
return set_->isnot ? next : ++next;
|
||||
}
|
||||
else
|
||||
{
|
||||
// skip first string
|
||||
do{ ++p; }while(*p);
|
||||
++p;
|
||||
}
|
||||
// skip second string
|
||||
do{ ++p; }while(*p);
|
||||
++p;
|
||||
}
|
||||
}
|
||||
//
|
||||
// try and match an equivalence class, NB only a single character can match
|
||||
if(set_->cequivalents)
|
||||
{
|
||||
charT a[2] = { col, charT(0), };
|
||||
s1 = traits_inst.transform_primary(a, a +1);
|
||||
for(i = 0; i < set_->cequivalents; ++i)
|
||||
{
|
||||
if(STR_COMP(s1, p) == 0)
|
||||
return set_->isnot ? next : ++next;
|
||||
// skip string
|
||||
do{ ++p; }while(*p);
|
||||
++p;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(traits_inst.isctype(col, set_->cclasses) == true)
|
||||
return set_->isnot ? next : ++next;
|
||||
return set_->isnot ? ++next : next;
|
||||
}
|
||||
|
||||
template <class BidiIterator>
|
||||
class repeater_count
|
||||
{
|
||||
repeater_count** stack;
|
||||
repeater_count* next;
|
||||
int id;
|
||||
std::size_t count; // the number of iterations so far
|
||||
BidiIterator start_pos; // where the last repeat started
|
||||
public:
|
||||
repeater_count(repeater_count** s)
|
||||
{
|
||||
stack = s;
|
||||
next = 0;
|
||||
id = -1;
|
||||
count = 0;
|
||||
}
|
||||
repeater_count(int i, repeater_count** s, BidiIterator start)
|
||||
: start_pos(start)
|
||||
{
|
||||
id = i;
|
||||
stack = s;
|
||||
next = *stack;
|
||||
*stack = this;
|
||||
if(id > next->id)
|
||||
count = 0;
|
||||
else
|
||||
{
|
||||
repeater_count* p = next;
|
||||
while(p->id != id)
|
||||
p = p->next;
|
||||
count = p->count;
|
||||
start_pos = p->start_pos;
|
||||
}
|
||||
}
|
||||
~repeater_count()
|
||||
{
|
||||
*stack = next;
|
||||
}
|
||||
std::size_t get_count() { return count; }
|
||||
int get_id() { return id; }
|
||||
std::size_t operator++() { return ++count; }
|
||||
bool check_null_repeat(const BidiIterator& pos, std::size_t max)
|
||||
{
|
||||
// this is called when we are about to start a new repeat,
|
||||
// if the last one was NULL move our count to max,
|
||||
// otherwise save the current position.
|
||||
bool result = (count == 0) ? false : (pos == start_pos);
|
||||
if(result)
|
||||
count = max;
|
||||
else
|
||||
start_pos = pos;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
struct saved_state;
|
||||
|
||||
enum saved_state_type
|
||||
{
|
||||
saved_type_end = 0,
|
||||
saved_type_paren = 1,
|
||||
saved_type_recurse = 2,
|
||||
saved_type_assertion = 3,
|
||||
saved_state_alt = 4,
|
||||
saved_state_repeater_count = 5,
|
||||
saved_state_extra_block = 6,
|
||||
saved_state_greedy_single_repeat = 7,
|
||||
saved_state_rep_slow_dot = 8,
|
||||
saved_state_rep_fast_dot = 9,
|
||||
saved_state_rep_char = 10,
|
||||
saved_state_rep_short_set = 11,
|
||||
saved_state_rep_long_set = 12,
|
||||
saved_state_non_greedy_long_repeat = 13,
|
||||
saved_state_count = 14
|
||||
};
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4251 4231 4660)
|
||||
#endif
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
class perl_matcher
|
||||
{
|
||||
public:
|
||||
typedef typename traits::char_type char_type;
|
||||
typedef perl_matcher<BidiIterator, Allocator, traits> self_type;
|
||||
typedef bool (self_type::*matcher_proc_type)(void);
|
||||
typedef typename traits::size_type traits_size_type;
|
||||
typedef typename is_byte<char_type>::width_type width_type;
|
||||
typedef typename regex_iterator_traits<BidiIterator>::difference_type difference_type;
|
||||
|
||||
perl_matcher(BidiIterator first, BidiIterator end,
|
||||
match_results<BidiIterator, Allocator>& what,
|
||||
const basic_regex<char_type, traits>& e,
|
||||
match_flag_type f);
|
||||
|
||||
bool match();
|
||||
bool find();
|
||||
|
||||
void setf(match_flag_type f)
|
||||
{ m_match_flags |= f; }
|
||||
void unsetf(match_flag_type f)
|
||||
{ m_match_flags &= ~f; }
|
||||
|
||||
private:
|
||||
void construct_init(BidiIterator first, BidiIterator end,
|
||||
match_results<BidiIterator, Allocator>& what,
|
||||
const basic_regex<char_type, traits>& e,
|
||||
match_flag_type f);
|
||||
bool find_imp();
|
||||
bool match_imp();
|
||||
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
typedef bool (perl_matcher::*protected_proc_type)();
|
||||
bool protected_call(protected_proc_type);
|
||||
#endif
|
||||
void estimate_max_state_count(std::random_access_iterator_tag*);
|
||||
void estimate_max_state_count(void*);
|
||||
bool match_prefix();
|
||||
bool match_all_states();
|
||||
|
||||
// match procs, stored in s_match_vtable:
|
||||
bool match_startmark();
|
||||
bool match_endmark();
|
||||
bool match_literal();
|
||||
bool match_start_line();
|
||||
bool match_end_line();
|
||||
bool match_wild();
|
||||
bool match_match();
|
||||
bool match_word_boundary();
|
||||
bool match_within_word();
|
||||
bool match_word_start();
|
||||
bool match_word_end();
|
||||
bool match_buffer_start();
|
||||
bool match_buffer_end();
|
||||
bool match_backref();
|
||||
bool match_long_set();
|
||||
bool match_set();
|
||||
bool match_jump();
|
||||
bool match_alt();
|
||||
bool match_rep();
|
||||
bool match_combining();
|
||||
bool match_soft_buffer_end();
|
||||
bool match_restart_continue();
|
||||
bool match_long_set_repeat();
|
||||
bool match_set_repeat();
|
||||
bool match_char_repeat();
|
||||
bool match_dot_repeat_fast();
|
||||
bool match_dot_repeat_slow();
|
||||
bool match_backstep();
|
||||
bool match_assert_backref();
|
||||
bool match_toggle_case();
|
||||
#ifdef BOOST_REGEX_RECURSIVE
|
||||
bool backtrack_till_match(std::size_t count);
|
||||
#endif
|
||||
|
||||
// find procs stored in s_find_vtable:
|
||||
bool find_restart_any();
|
||||
bool find_restart_word();
|
||||
bool find_restart_line();
|
||||
bool find_restart_buf();
|
||||
bool find_restart_lit();
|
||||
|
||||
private:
|
||||
// final result structure to be filled in:
|
||||
match_results<BidiIterator, Allocator>& m_result;
|
||||
// temporary result for POSIX matches:
|
||||
scoped_ptr<match_results<BidiIterator, Allocator> > m_temp_match;
|
||||
// pointer to actual result structure to fill in:
|
||||
match_results<BidiIterator, Allocator>* m_presult;
|
||||
// start of sequence being searched:
|
||||
BidiIterator base;
|
||||
// end of sequence being searched:
|
||||
BidiIterator last;
|
||||
// current character being examined:
|
||||
BidiIterator position;
|
||||
// where to restart next search after failed match attempt:
|
||||
BidiIterator restart;
|
||||
// where the current search started from, acts as base for $` during grep:
|
||||
BidiIterator search_base;
|
||||
// the expression being examined:
|
||||
const basic_regex<char_type, traits>& re;
|
||||
// the expression's traits class:
|
||||
const ::boost::regex_traits_wrapper<traits>& traits_inst;
|
||||
// the next state in the machine being matched:
|
||||
const re_syntax_base* pstate;
|
||||
// matching flags in use:
|
||||
match_flag_type m_match_flags;
|
||||
// how many states we have examined so far:
|
||||
difference_type state_count;
|
||||
// max number of states to examine before giving up:
|
||||
difference_type max_state_count;
|
||||
// whether we should ignore case or not:
|
||||
bool icase;
|
||||
// set to true when (position == last), indicates that we may have a partial match:
|
||||
bool m_has_partial_match;
|
||||
// set to true whenever we get a match:
|
||||
bool m_has_found_match;
|
||||
// set to true whenever we're inside an independent sub-expression:
|
||||
bool m_independent;
|
||||
// the current repeat being examined:
|
||||
repeater_count<BidiIterator>* next_count;
|
||||
// the first repeat being examined (top of linked list):
|
||||
repeater_count<BidiIterator> rep_obj;
|
||||
// the mask to pass when matching word boundaries:
|
||||
typename traits::char_class_type m_word_mask;
|
||||
// the bitmask to use when determining whether a match_any matches a newline or not:
|
||||
unsigned char match_any_mask;
|
||||
|
||||
#ifdef BOOST_REGEX_NON_RECURSIVE
|
||||
//
|
||||
// additional members for non-recursive version:
|
||||
//
|
||||
typedef bool (self_type::*unwind_proc_type)(bool);
|
||||
|
||||
void extend_stack();
|
||||
bool unwind(bool);
|
||||
bool unwind_end(bool);
|
||||
bool unwind_paren(bool);
|
||||
bool unwind_recursion_stopper(bool);
|
||||
bool unwind_assertion(bool);
|
||||
bool unwind_alt(bool);
|
||||
bool unwind_repeater_counter(bool);
|
||||
bool unwind_extra_block(bool);
|
||||
bool unwind_greedy_single_repeat(bool);
|
||||
bool unwind_slow_dot_repeat(bool);
|
||||
bool unwind_fast_dot_repeat(bool);
|
||||
bool unwind_char_repeat(bool);
|
||||
bool unwind_short_set_repeat(bool);
|
||||
bool unwind_long_set_repeat(bool);
|
||||
bool unwind_non_greedy_repeat(bool);
|
||||
void destroy_single_repeat();
|
||||
void push_matched_paren(int index, const sub_match<BidiIterator>& sub);
|
||||
void push_recursion_stopper();
|
||||
void push_assertion(const re_syntax_base* ps, bool positive);
|
||||
void push_alt(const re_syntax_base* ps);
|
||||
void push_repeater_count(int i, repeater_count<BidiIterator>** s);
|
||||
void push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int id);
|
||||
void push_non_greedy_repeat(const re_syntax_base* ps);
|
||||
|
||||
|
||||
// pointer to base of stack:
|
||||
saved_state* m_stack_base;
|
||||
// pointer to current stack position:
|
||||
saved_state* m_backup_state;
|
||||
// determines what value to return when unwinding from recursion,
|
||||
// allows for mixed recursive/non-recursive algorithm:
|
||||
bool m_recursive_result;
|
||||
// how many memory blocks have we used up?:
|
||||
unsigned used_block_count;
|
||||
#endif
|
||||
|
||||
// these operations aren't allowed, so are declared private,
|
||||
// bodies are provided to keep explicit-instantiation requests happy:
|
||||
perl_matcher& operator=(const perl_matcher&)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
perl_matcher(const perl_matcher& that)
|
||||
: m_result(that.m_result), re(that.re), traits_inst(that.traits_inst), rep_obj(0) {}
|
||||
};
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
//
|
||||
// include the implementation of perl_matcher:
|
||||
//
|
||||
#ifdef BOOST_REGEX_RECURSIVE
|
||||
#include <boost/regex/v4/perl_matcher_recursive.hpp>
|
||||
#else
|
||||
#include <boost/regex/v4/perl_matcher_non_recursive.hpp>
|
||||
#endif
|
||||
// this one has to be last:
|
||||
#include <boost/regex/v4/perl_matcher_common.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,899 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE perl_matcher_common.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Definitions of perl_matcher member functions that are
|
||||
* common to both the recursive and non-recursive versions.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_PERL_MATCHER_COMMON_HPP
|
||||
#define BOOST_REGEX_V4_PERL_MATCHER_COMMON_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
# pragma option push -w-8008 -w-8066
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
perl_matcher<BidiIterator, Allocator, traits>::perl_matcher(BidiIterator first, BidiIterator end,
|
||||
match_results<BidiIterator, Allocator>& what,
|
||||
const basic_regex<char_type, traits>& e,
|
||||
match_flag_type f)
|
||||
: m_result(what), base(first), last(end),
|
||||
position(first), re(e), traits_inst(e.get_traits()),
|
||||
m_independent(false), next_count(&rep_obj), rep_obj(&next_count)
|
||||
{
|
||||
construct_init(first, last, what, e, f);
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
void perl_matcher<BidiIterator, Allocator, traits>::construct_init(BidiIterator first, BidiIterator end,
|
||||
match_results<BidiIterator, Allocator>& what,
|
||||
const basic_regex<char_type, traits>& e,
|
||||
match_flag_type f)
|
||||
{
|
||||
typedef typename regex_iterator_traits<BidiIterator>::iterator_category category;
|
||||
|
||||
if(e.empty())
|
||||
{
|
||||
// precondition failure: e is not a valid regex.
|
||||
std::invalid_argument ex("Invalid regular expression object");
|
||||
boost::throw_exception(ex);
|
||||
}
|
||||
pstate = 0;
|
||||
m_match_flags = f;
|
||||
icase = re.flags() & regex_constants::icase;
|
||||
estimate_max_state_count(static_cast<category*>(0));
|
||||
if(!(m_match_flags & (match_perl|match_posix)))
|
||||
{
|
||||
if((re.flags() & (regbase::main_option_type|regbase::no_perl_ex)) == 0)
|
||||
m_match_flags |= match_perl;
|
||||
else if((re.flags() & (regbase::main_option_type|regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex))
|
||||
m_match_flags |= match_perl;
|
||||
else
|
||||
m_match_flags |= match_posix;
|
||||
}
|
||||
if(m_match_flags & match_posix)
|
||||
{
|
||||
m_temp_match.reset(new match_results<BidiIterator, Allocator>());
|
||||
m_presult = m_temp_match.get();
|
||||
}
|
||||
else
|
||||
m_presult = &m_result;
|
||||
#ifdef BOOST_REGEX_NON_RECURSIVE
|
||||
m_stack_base = 0;
|
||||
m_backup_state = 0;
|
||||
#endif
|
||||
// find the value to use for matching word boundaries:
|
||||
const char_type w = static_cast<char_type>('w');
|
||||
m_word_mask = traits_inst.lookup_classname(&w, &w+1);
|
||||
// find bitmask to use for matching '.':
|
||||
match_any_mask = static_cast<unsigned char>((f & match_not_dot_newline) ? re_detail::test_not_newline : re_detail::test_newline);
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
void perl_matcher<BidiIterator, Allocator, traits>::estimate_max_state_count(std::random_access_iterator_tag*)
|
||||
{
|
||||
static const difference_type k = 100000;
|
||||
difference_type dist = boost::re_detail::distance(base, last);
|
||||
traits_size_type states = static_cast<traits_size_type>(re.size());
|
||||
states *= states;
|
||||
difference_type lim = ((std::numeric_limits<difference_type>::max)() - k) / states;
|
||||
if(dist >= lim)
|
||||
max_state_count = (std::numeric_limits<difference_type>::max)();
|
||||
else
|
||||
max_state_count = k + states * dist;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
void perl_matcher<BidiIterator, Allocator, traits>::estimate_max_state_count(void*)
|
||||
{
|
||||
// we don't know how long the sequence is:
|
||||
max_state_count = BOOST_REGEX_MAX_STATE_COUNT;
|
||||
}
|
||||
|
||||
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::protected_call(
|
||||
protected_proc_type proc)
|
||||
{
|
||||
/*
|
||||
__try{
|
||||
return (this->*proc)();
|
||||
}__except(EXCEPTION_STACK_OVERFLOW == GetExceptionCode())
|
||||
{
|
||||
reset_stack_guard_page();
|
||||
}
|
||||
// we only get here after a stack overflow:
|
||||
raise_error<traits>(traits_inst, regex_constants::error_size);
|
||||
// and we never really get here at all:
|
||||
return false;
|
||||
*/
|
||||
::boost::re_detail::concrete_protected_call
|
||||
<perl_matcher<BidiIterator, Allocator, traits> >
|
||||
obj(this, proc);
|
||||
return obj.execute();
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match()
|
||||
{
|
||||
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
return protected_call(&perl_matcher<BidiIterator, Allocator, traits>::match_imp);
|
||||
#else
|
||||
return match_imp();
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_imp()
|
||||
{
|
||||
// initialise our stack if we are non-recursive:
|
||||
#ifdef BOOST_REGEX_NON_RECURSIVE
|
||||
save_state_init init(&m_stack_base, &m_backup_state);
|
||||
used_block_count = BOOST_REGEX_MAX_BLOCKS;
|
||||
#if !defined(BOOST_NO_EXCEPTIONS)
|
||||
try{
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// reset our state machine:
|
||||
position = base;
|
||||
search_base = base;
|
||||
state_count = 0;
|
||||
m_match_flags |= regex_constants::match_all;
|
||||
m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), base, last);
|
||||
m_presult->set_base(base);
|
||||
if(m_match_flags & match_posix)
|
||||
m_result = *m_presult;
|
||||
verify_options(re.flags(), m_match_flags);
|
||||
if(0 == match_prefix())
|
||||
return false;
|
||||
return m_result[0].second == last;
|
||||
|
||||
#if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
// unwind all pushed states, apart from anything else this
|
||||
// ensures that all the states are correctly destructed
|
||||
// not just the memory freed.
|
||||
while(unwind(true)){}
|
||||
throw;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::find()
|
||||
{
|
||||
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
return protected_call(&perl_matcher<BidiIterator, Allocator, traits>::find_imp);
|
||||
#else
|
||||
return find_imp();
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::find_imp()
|
||||
{
|
||||
static matcher_proc_type const s_find_vtable[7] =
|
||||
{
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::find_restart_any,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::find_restart_word,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::find_restart_line,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::find_restart_buf,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_prefix,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::find_restart_lit,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::find_restart_lit,
|
||||
};
|
||||
|
||||
// initialise our stack if we are non-recursive:
|
||||
#ifdef BOOST_REGEX_NON_RECURSIVE
|
||||
save_state_init init(&m_stack_base, &m_backup_state);
|
||||
used_block_count = BOOST_REGEX_MAX_BLOCKS;
|
||||
#if !defined(BOOST_NO_EXCEPTIONS)
|
||||
try{
|
||||
#endif
|
||||
#endif
|
||||
|
||||
state_count = 0;
|
||||
if((m_match_flags & regex_constants::match_init) == 0)
|
||||
{
|
||||
// reset our state machine:
|
||||
position = base;
|
||||
search_base = base;
|
||||
pstate = re.get_first_state();
|
||||
m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), base, last);
|
||||
m_presult->set_base(base);
|
||||
m_match_flags |= regex_constants::match_init;
|
||||
}
|
||||
else
|
||||
{
|
||||
// start again:
|
||||
search_base = position = m_result[0].second;
|
||||
// If last match was null and match_not_null was not set then increment
|
||||
// our start position, otherwise we go into an infinite loop:
|
||||
if(((m_match_flags & match_not_null) == 0) && (m_result.length() == 0))
|
||||
{
|
||||
if(position == last)
|
||||
return false;
|
||||
else
|
||||
++position;
|
||||
}
|
||||
// reset $` start:
|
||||
m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), search_base, last);
|
||||
if(base != search_base)
|
||||
m_match_flags |= match_prev_avail;
|
||||
}
|
||||
if(m_match_flags & match_posix)
|
||||
{
|
||||
m_result.set_size(re.mark_count(), base, last);
|
||||
m_result.set_base(base);
|
||||
}
|
||||
|
||||
verify_options(re.flags(), m_match_flags);
|
||||
// find out what kind of expression we have:
|
||||
unsigned type = (m_match_flags & match_continuous) ?
|
||||
static_cast<unsigned int>(regbase::restart_continue)
|
||||
: static_cast<unsigned int>(re.get_restart_type());
|
||||
|
||||
// call the appropriate search routine:
|
||||
matcher_proc_type proc = s_find_vtable[type];
|
||||
return (this->*proc)();
|
||||
|
||||
#if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
// unwind all pushed states, apart from anything else this
|
||||
// ensures that all the states are correctly destructed
|
||||
// not just the memory freed.
|
||||
while(unwind(true)){}
|
||||
throw;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_prefix()
|
||||
{
|
||||
m_has_partial_match = false;
|
||||
m_has_found_match = false;
|
||||
pstate = re.get_first_state();
|
||||
m_presult->set_first(position);
|
||||
restart = position;
|
||||
match_all_states();
|
||||
if(!m_has_found_match && m_has_partial_match && (m_match_flags & match_partial))
|
||||
{
|
||||
m_has_found_match = true;
|
||||
m_presult->set_second(last, 0, false);
|
||||
position = last;
|
||||
}
|
||||
#ifdef BOOST_REGEX_MATCH_EXTRA
|
||||
if(m_has_found_match && (match_extra & m_match_flags))
|
||||
{
|
||||
//
|
||||
// we have a match, reverse the capture information:
|
||||
//
|
||||
for(unsigned i = 0; i < m_presult->size(); ++i)
|
||||
{
|
||||
typename sub_match<BidiIterator>::capture_sequence_type & seq = ((*m_presult)[i]).get_captures();
|
||||
std::reverse(seq.begin(), seq.end());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(!m_has_found_match)
|
||||
position = restart; // reset search postion
|
||||
return m_has_found_match;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
|
||||
{
|
||||
int index = static_cast<const re_brace*>(pstate)->index;
|
||||
if(index > 0)
|
||||
{
|
||||
if((m_match_flags & match_nosubs) == 0)
|
||||
m_presult->set_second(position, index);
|
||||
}
|
||||
else if((index < 0) && (index != -4))
|
||||
{
|
||||
// matched forward lookahead:
|
||||
pstate = 0;
|
||||
return true;
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_literal()
|
||||
{
|
||||
unsigned int len = static_cast<const re_literal*>(pstate)->length;
|
||||
const char_type* what = reinterpret_cast<const char_type*>(static_cast<const re_literal*>(pstate) + 1);
|
||||
//
|
||||
// compare string with what we stored in
|
||||
// our records:
|
||||
for(unsigned int i = 0; i < len; ++i, ++position)
|
||||
{
|
||||
if((position == last) || (traits_inst.translate(*position, icase) != what[i]))
|
||||
return false;
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_start_line()
|
||||
{
|
||||
if(position == base)
|
||||
{
|
||||
if((m_match_flags & match_prev_avail) == 0)
|
||||
{
|
||||
if((m_match_flags & match_not_bol) == 0)
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if(m_match_flags & match_single_line)
|
||||
return false;
|
||||
|
||||
// check the previous value character:
|
||||
BidiIterator t(position);
|
||||
--t;
|
||||
if(position != last)
|
||||
{
|
||||
if(is_separator(*t) && !((*t == static_cast<char_type>('\r')) && (*position == static_cast<char_type>('\n'))) )
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if(is_separator(*t))
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_end_line()
|
||||
{
|
||||
if(position != last)
|
||||
{
|
||||
if(m_match_flags & match_single_line)
|
||||
return false;
|
||||
// we're not yet at the end so *first is always valid:
|
||||
if(is_separator(*position))
|
||||
{
|
||||
if((position != base) || (m_match_flags & match_prev_avail))
|
||||
{
|
||||
// check that we're not in the middle of \r\n sequence
|
||||
BidiIterator t(position);
|
||||
--t;
|
||||
if((*t == static_cast<char_type>('\r')) && (*position == static_cast<char_type>('\n')))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if((m_match_flags & match_not_eol) == 0)
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_wild()
|
||||
{
|
||||
if(position == last)
|
||||
return false;
|
||||
if(is_separator(*position) && ((match_any_mask & static_cast<const re_dot*>(pstate)->mask) == 0))
|
||||
return false;
|
||||
if((*position == char_type(0)) && (m_match_flags & match_not_dot_null))
|
||||
return false;
|
||||
pstate = pstate->next.p;
|
||||
++position;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_match()
|
||||
{
|
||||
if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first))
|
||||
return false;
|
||||
if((m_match_flags & match_all) && (position != last))
|
||||
return false;
|
||||
if((m_match_flags & regex_constants::match_not_initial_null) && (position == search_base))
|
||||
return false;
|
||||
m_presult->set_second(position);
|
||||
pstate = 0;
|
||||
m_has_found_match = true;
|
||||
if((m_match_flags & match_posix) == match_posix)
|
||||
{
|
||||
m_result.maybe_assign(*m_presult);
|
||||
if((m_match_flags & match_any) == 0)
|
||||
return false;
|
||||
}
|
||||
#ifdef BOOST_REGEX_MATCH_EXTRA
|
||||
if(match_extra & m_match_flags)
|
||||
{
|
||||
for(unsigned i = 0; i < m_presult->size(); ++i)
|
||||
if((*m_presult)[i].matched)
|
||||
((*m_presult)[i]).get_captures().push_back((*m_presult)[i]);
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary()
|
||||
{
|
||||
bool b; // indcates whether next character is a word character
|
||||
if(position != last)
|
||||
{
|
||||
// prev and this character must be opposites:
|
||||
#if defined(BOOST_REGEX_USE_C_LOCALE) && defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 95)
|
||||
b = traits::isctype(*position, m_word_mask);
|
||||
#else
|
||||
b = traits_inst.isctype(*position, m_word_mask);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
b = (m_match_flags & match_not_eow) ? true : false;
|
||||
}
|
||||
if((position == base) && ((m_match_flags & match_prev_avail) == 0))
|
||||
{
|
||||
if(m_match_flags & match_not_bow)
|
||||
b ^= true;
|
||||
else
|
||||
b ^= false;
|
||||
}
|
||||
else
|
||||
{
|
||||
--position;
|
||||
b ^= traits_inst.isctype(*position, m_word_mask);
|
||||
++position;
|
||||
}
|
||||
if(b)
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
return false; // no match if we get to here...
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_within_word()
|
||||
{
|
||||
if(position == last)
|
||||
return false;
|
||||
// both prev and this character must be m_word_mask:
|
||||
if(traits_inst.isctype(*position, m_word_mask))
|
||||
{
|
||||
bool b;
|
||||
if((position == base) && ((m_match_flags & match_prev_avail) == 0))
|
||||
return false;
|
||||
else
|
||||
{
|
||||
--position;
|
||||
b = traits_inst.isctype(*position, m_word_mask);
|
||||
++position;
|
||||
}
|
||||
if(b)
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_word_start()
|
||||
{
|
||||
if(position == last)
|
||||
return false; // can't be starting a word if we're already at the end of input
|
||||
if(!traits_inst.isctype(*position, m_word_mask))
|
||||
return false; // next character isn't a word character
|
||||
if((position == base) && ((m_match_flags & match_prev_avail) == 0))
|
||||
{
|
||||
if(m_match_flags & match_not_bow)
|
||||
return false; // no previous input
|
||||
}
|
||||
else
|
||||
{
|
||||
// otherwise inside buffer:
|
||||
BidiIterator t(position);
|
||||
--t;
|
||||
if(traits_inst.isctype(*t, m_word_mask))
|
||||
return false; // previous character not non-word
|
||||
}
|
||||
// OK we have a match:
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_word_end()
|
||||
{
|
||||
if((position == base) && ((m_match_flags & match_prev_avail) == 0))
|
||||
return false; // start of buffer can't be end of word
|
||||
BidiIterator t(position);
|
||||
--t;
|
||||
if(traits_inst.isctype(*t, m_word_mask) == false)
|
||||
return false; // previous character wasn't a word character
|
||||
|
||||
if(position == last)
|
||||
{
|
||||
if(m_match_flags & match_not_eow)
|
||||
return false; // end of buffer but not end of word
|
||||
}
|
||||
else
|
||||
{
|
||||
// otherwise inside buffer:
|
||||
if(traits_inst.isctype(*position, m_word_mask))
|
||||
return false; // next character is a word character
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true; // if we fall through to here then we've succeeded
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_buffer_start()
|
||||
{
|
||||
if((position != base) || (m_match_flags & match_not_bob))
|
||||
return false;
|
||||
// OK match:
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_buffer_end()
|
||||
{
|
||||
if((position != last) || (m_match_flags & match_not_eob))
|
||||
return false;
|
||||
// OK match:
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_backref()
|
||||
{
|
||||
// compare with what we previously matched:
|
||||
BidiIterator i = (*m_presult)[static_cast<const re_brace*>(pstate)->index].first;
|
||||
BidiIterator j = (*m_presult)[static_cast<const re_brace*>(pstate)->index].second;
|
||||
while(i != j)
|
||||
{
|
||||
if((position == last) || (traits_inst.translate(*position, icase) != traits_inst.translate(*i, icase)))
|
||||
return false;
|
||||
++i;
|
||||
++position;
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set()
|
||||
{
|
||||
typedef typename traits::char_class_type char_class_type;
|
||||
// let the traits class do the work:
|
||||
if(position == last)
|
||||
return false;
|
||||
BidiIterator t = re_is_set_member(position, last, static_cast<const re_set_long<char_class_type>*>(pstate), re.get_data(), icase);
|
||||
if(t != position)
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
position = t;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_set()
|
||||
{
|
||||
if(position == last)
|
||||
return false;
|
||||
if(static_cast<const re_set*>(pstate)->_map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
++position;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_jump()
|
||||
{
|
||||
pstate = static_cast<const re_jump*>(pstate)->alt.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_combining()
|
||||
{
|
||||
if(position == last)
|
||||
return false;
|
||||
if(is_combining(traits_inst.translate(*position, icase)))
|
||||
return false;
|
||||
++position;
|
||||
while((position != last) && is_combining(traits_inst.translate(*position, icase)))
|
||||
++position;
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end()
|
||||
{
|
||||
if(m_match_flags & match_not_eob)
|
||||
return false;
|
||||
BidiIterator p(position);
|
||||
while((p != last) && is_separator(traits_inst.translate(*p, icase)))++p;
|
||||
if(p != last)
|
||||
return false;
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue()
|
||||
{
|
||||
if(position == search_base)
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_backstep()
|
||||
{
|
||||
std::ptrdiff_t maxlen = ::boost::re_detail::distance(search_base, position);
|
||||
if(maxlen < static_cast<const re_brace*>(pstate)->index)
|
||||
return false;
|
||||
std::advance(position, -static_cast<const re_brace*>(pstate)->index);
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
inline bool perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref()
|
||||
{
|
||||
// return true if marked sub-expression N has been matched:
|
||||
bool result = (*m_presult)[static_cast<const re_brace*>(pstate)->index].matched;
|
||||
pstate = pstate->next.p;
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case()
|
||||
{
|
||||
// change our case sensitivity:
|
||||
this->icase = static_cast<const re_case*>(pstate)->icase;
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_any()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
const unsigned char* _map = re.get_map();
|
||||
while(true)
|
||||
{
|
||||
// skip everything we can't match:
|
||||
while((position != last) && !can_start(*position, _map, (unsigned char)mask_any) )
|
||||
++position;
|
||||
if(position == last)
|
||||
{
|
||||
// run out of characters, try a null match if possible:
|
||||
if(re.can_be_null())
|
||||
return match_prefix();
|
||||
break;
|
||||
}
|
||||
// now try and obtain a match:
|
||||
if(match_prefix())
|
||||
return true;
|
||||
if(position == last)
|
||||
return false;
|
||||
++position;
|
||||
}
|
||||
return false;
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_word()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
// do search optimised for word starts:
|
||||
const unsigned char* _map = re.get_map();
|
||||
if((m_match_flags & match_prev_avail) || (position != base))
|
||||
--position;
|
||||
else if(match_prefix())
|
||||
return true;
|
||||
do
|
||||
{
|
||||
while((position != last) && traits_inst.isctype(*position, m_word_mask))
|
||||
++position;
|
||||
while((position != last) && !traits_inst.isctype(*position, m_word_mask))
|
||||
++position;
|
||||
if(position == last)
|
||||
break;
|
||||
|
||||
if(can_start(*position, _map, (unsigned char)mask_any) )
|
||||
{
|
||||
if(match_prefix())
|
||||
return true;
|
||||
}
|
||||
if(position == last)
|
||||
break;
|
||||
} while(true);
|
||||
return false;
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_line()
|
||||
{
|
||||
// do search optimised for line starts:
|
||||
const unsigned char* _map = re.get_map();
|
||||
if(match_prefix())
|
||||
return true;
|
||||
while(position != last)
|
||||
{
|
||||
while((position != last) && !is_separator(*position))
|
||||
++position;
|
||||
if(position == last)
|
||||
return false;
|
||||
++position;
|
||||
if(position == last)
|
||||
{
|
||||
if(re.can_be_null() && match_prefix())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( can_start(*position, _map, (unsigned char)mask_any) )
|
||||
{
|
||||
if(match_prefix())
|
||||
return true;
|
||||
}
|
||||
if(position == last)
|
||||
return false;
|
||||
//++position;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_buf()
|
||||
{
|
||||
if((position == base) && ((m_match_flags & match_not_bob) == 0))
|
||||
return match_prefix();
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_lit()
|
||||
{
|
||||
#if 0
|
||||
if(position == last)
|
||||
return false; // can't possibly match if we're at the end already
|
||||
|
||||
unsigned type = (m_match_flags & match_continuous) ?
|
||||
static_cast<unsigned int>(regbase::restart_continue)
|
||||
: static_cast<unsigned int>(re.get_restart_type());
|
||||
|
||||
const kmp_info<char_type>* info = access::get_kmp(re);
|
||||
int len = info->len;
|
||||
const char_type* x = info->pstr;
|
||||
int j = 0;
|
||||
while (position != last)
|
||||
{
|
||||
while((j > -1) && (x[j] != traits_inst.translate(*position, icase)))
|
||||
j = info->kmp_next[j];
|
||||
++position;
|
||||
++j;
|
||||
if(j >= len)
|
||||
{
|
||||
if(type == regbase::restart_fixed_lit)
|
||||
{
|
||||
std::advance(position, -j);
|
||||
restart = position;
|
||||
std::advance(restart, len);
|
||||
m_result.set_first(position);
|
||||
m_result.set_second(restart);
|
||||
position = restart;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
restart = position;
|
||||
std::advance(position, -j);
|
||||
if(match_prefix())
|
||||
return true;
|
||||
else
|
||||
{
|
||||
for(int k = 0; (restart != position) && (k < j); ++k, --restart)
|
||||
{} // dwa 10/20/2000 - warning suppression for MWCW
|
||||
if(restart != last)
|
||||
++restart;
|
||||
position = restart;
|
||||
j = 0; //we could do better than this...
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if((m_match_flags & match_partial) && (position == last) && j)
|
||||
{
|
||||
// we need to check for a partial match:
|
||||
restart = position;
|
||||
std::advance(position, -j);
|
||||
return match_prefix();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
# pragma option pop
|
||||
#endif
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,819 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE perl_matcher_common.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Definitions of perl_matcher member functions that are
|
||||
* specific to the recursive implementation.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_PERL_MATCHER_RECURSIVE_HPP
|
||||
#define BOOST_REGEX_V4_PERL_MATCHER_RECURSIVE_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
template <class BidiIterator>
|
||||
class backup_subex
|
||||
{
|
||||
int index;
|
||||
sub_match<BidiIterator> sub;
|
||||
public:
|
||||
template <class A>
|
||||
backup_subex(const match_results<BidiIterator, A>& w, int i)
|
||||
: index(i), sub(w[i], false) {}
|
||||
template <class A>
|
||||
void restore(match_results<BidiIterator, A>& w)
|
||||
{
|
||||
w.set_first(sub.first, index);
|
||||
w.set_second(sub.second, index, sub.matched);
|
||||
}
|
||||
const sub_match<BidiIterator>& get() { return sub; }
|
||||
};
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
|
||||
{
|
||||
static matcher_proc_type const s_match_vtable[29] =
|
||||
{
|
||||
(&perl_matcher<BidiIterator, Allocator, traits>::match_startmark),
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_endmark,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_literal,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_start_line,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_end_line,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_wild,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_match,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_within_word,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_word_start,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_word_end,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_buffer_start,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_buffer_end,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_backref,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_long_set,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_set,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_jump,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_alt,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_rep,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_combining,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue,
|
||||
(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_backstep,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref,
|
||||
&perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case,
|
||||
};
|
||||
|
||||
if(state_count > max_state_count)
|
||||
raise_error(traits_inst, regex_constants::error_space);
|
||||
while(pstate)
|
||||
{
|
||||
matcher_proc_type proc = s_match_vtable[pstate->type];
|
||||
++state_count;
|
||||
if(!(this->*proc)())
|
||||
{
|
||||
if((m_match_flags & match_partial) && (position == last) && (position != search_base))
|
||||
m_has_partial_match = true;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
|
||||
{
|
||||
int index = static_cast<const re_brace*>(pstate)->index;
|
||||
bool r = true;
|
||||
switch(index)
|
||||
{
|
||||
case 0:
|
||||
pstate = pstate->next.p;
|
||||
break;
|
||||
case -1:
|
||||
case -2:
|
||||
{
|
||||
// forward lookahead assert:
|
||||
BidiIterator old_position(position);
|
||||
const re_syntax_base* next_pstate = static_cast<const re_jump*>(pstate->next.p)->alt.p->next.p;
|
||||
pstate = pstate->next.p->next.p;
|
||||
r = match_all_states();
|
||||
pstate = next_pstate;
|
||||
position = old_position;
|
||||
if((r && (index != -1)) || (!r && (index != -2)))
|
||||
r = false;
|
||||
else
|
||||
r = true;
|
||||
break;
|
||||
}
|
||||
case -3:
|
||||
{
|
||||
// independent sub-expression:
|
||||
bool old_independent = m_independent;
|
||||
m_independent = true;
|
||||
const re_syntax_base* next_pstate = static_cast<const re_jump*>(pstate->next.p)->alt.p->next.p;
|
||||
pstate = pstate->next.p->next.p;
|
||||
r = match_all_states();
|
||||
pstate = next_pstate;
|
||||
m_independent = old_independent;
|
||||
#ifdef BOOST_REGEX_MATCH_EXTRA
|
||||
if(r && (m_match_flags & match_extra))
|
||||
{
|
||||
//
|
||||
// our captures have been stored in *m_presult
|
||||
// we need to unpack them, and insert them
|
||||
// back in the right order when we unwind the stack:
|
||||
//
|
||||
unsigned i;
|
||||
match_results<BidiIterator, Allocator> tm(*m_presult);
|
||||
for(i = 0; i < tm.size(); ++i)
|
||||
(*m_presult)[i].get_captures().clear();
|
||||
// match everything else:
|
||||
r = match_all_states();
|
||||
// now place the stored captures back:
|
||||
for(i = 0; i < tm.size(); ++i)
|
||||
{
|
||||
typedef typename sub_match<BidiIterator>::capture_sequence_type seq;
|
||||
seq& s1 = (*m_presult)[i].get_captures();
|
||||
const seq& s2 = tm[i].captures();
|
||||
s1.insert(
|
||||
s1.end(),
|
||||
s2.begin(),
|
||||
s2.end());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case -4:
|
||||
{
|
||||
// conditional expression:
|
||||
const re_alt* alt = static_cast<const re_alt*>(pstate->next.p);
|
||||
BOOST_ASSERT(alt->type == syntax_element_alt);
|
||||
pstate = alt->next.p;
|
||||
if(pstate->type == syntax_element_assert_backref)
|
||||
{
|
||||
if(!match_assert_backref())
|
||||
pstate = alt->alt.p;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// zero width assertion, have to match this recursively:
|
||||
BOOST_ASSERT(pstate->type == syntax_element_startmark);
|
||||
bool negated = static_cast<const re_brace*>(pstate)->index == -2;
|
||||
BidiIterator saved_position = position;
|
||||
const re_syntax_base* next_pstate = static_cast<const re_jump*>(pstate->next.p)->alt.p->next.p;
|
||||
pstate = pstate->next.p->next.p;
|
||||
bool r = match_all_states();
|
||||
position = saved_position;
|
||||
if(negated)
|
||||
r = !r;
|
||||
if(r)
|
||||
pstate = next_pstate;
|
||||
else
|
||||
pstate = alt->alt.p;
|
||||
break;
|
||||
}
|
||||
}
|
||||
default:
|
||||
{
|
||||
BOOST_ASSERT(index > 0);
|
||||
if((m_match_flags & match_nosubs) == 0)
|
||||
{
|
||||
backup_subex<BidiIterator> sub(*m_presult, index);
|
||||
m_presult->set_first(position, index);
|
||||
pstate = pstate->next.p;
|
||||
r = match_all_states();
|
||||
if(r == false)
|
||||
sub.restore(*m_presult);
|
||||
#ifdef BOOST_REGEX_MATCH_EXTRA
|
||||
//
|
||||
// we have a match, push the capture information onto the stack:
|
||||
//
|
||||
else if(sub.get().matched && (match_extra & m_match_flags))
|
||||
((*m_presult)[index]).get_captures().push_back(sub.get());
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_alt()
|
||||
{
|
||||
bool take_first, take_second;
|
||||
const re_alt* jmp = static_cast<const re_alt*>(pstate);
|
||||
|
||||
// find out which of these two alternatives we need to take:
|
||||
if(position == last)
|
||||
{
|
||||
take_first = jmp->can_be_null & mask_take;
|
||||
take_second = jmp->can_be_null & mask_skip;
|
||||
}
|
||||
else
|
||||
{
|
||||
take_first = can_start(*position, jmp->_map, (unsigned char)mask_take);
|
||||
take_second = can_start(*position, jmp->_map, (unsigned char)mask_skip);
|
||||
}
|
||||
|
||||
if(take_first)
|
||||
{
|
||||
// we can take the first alternative,
|
||||
// see if we need to push next alternative:
|
||||
if(take_second)
|
||||
{
|
||||
BidiIterator oldposition(position);
|
||||
const re_syntax_base* old_pstate = jmp->alt.p;
|
||||
pstate = pstate->next.p;
|
||||
if(!match_all_states())
|
||||
{
|
||||
pstate = old_pstate;
|
||||
position = oldposition;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
if(take_second)
|
||||
{
|
||||
pstate = jmp->alt.p;
|
||||
return true;
|
||||
}
|
||||
return false; // neither option is possible
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_rep()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127 4244)
|
||||
#endif
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
if(next_count->get_id() != rep->id)
|
||||
{
|
||||
// we're moving to a different repeat from the last
|
||||
// one, so set up a counter object and recurse:
|
||||
repeater_count<BidiIterator> r(rep->id, &next_count, position);
|
||||
return match_rep();
|
||||
}
|
||||
//
|
||||
// If we've had at least one repeat already, and the last one
|
||||
// matched the NULL string then set the repeat count to
|
||||
// maximum:
|
||||
//
|
||||
next_count->check_null_repeat(position, rep->max);
|
||||
|
||||
// find out which of these two alternatives we need to take:
|
||||
bool take_first, take_second;
|
||||
if(position == last)
|
||||
{
|
||||
take_first = rep->can_be_null & mask_take;
|
||||
take_second = rep->can_be_null & mask_skip;
|
||||
}
|
||||
else
|
||||
{
|
||||
take_first = can_start(*position, rep->_map, (unsigned char)mask_take);
|
||||
take_second = can_start(*position, rep->_map, (unsigned char)mask_skip);
|
||||
}
|
||||
|
||||
if(next_count->get_count() < rep->min)
|
||||
{
|
||||
// we must take the repeat:
|
||||
if(take_first)
|
||||
{
|
||||
// increase the counter:
|
||||
++(*next_count);
|
||||
pstate = rep->next.p;
|
||||
return match_all_states();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
|
||||
if(greedy)
|
||||
{
|
||||
// try and take the repeat if we can:
|
||||
if((next_count->get_count() < rep->max) && take_first)
|
||||
{
|
||||
// store position in case we fail:
|
||||
BidiIterator pos = position;
|
||||
// increase the counter:
|
||||
++(*next_count);
|
||||
pstate = rep->next.p;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
// failed repeat, reset posistion and fall through for alternative:
|
||||
position = pos;
|
||||
}
|
||||
if(take_second)
|
||||
{
|
||||
pstate = rep->alt.p;
|
||||
return true;
|
||||
}
|
||||
return false; // can't take anything, fail...
|
||||
}
|
||||
else // non-greedy
|
||||
{
|
||||
// try and skip the repeat if we can:
|
||||
if(take_second)
|
||||
{
|
||||
// store position in case we fail:
|
||||
BidiIterator pos = position;
|
||||
pstate = rep->alt.p;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
// failed alternative, reset posistion and fall through for repeat:
|
||||
position = pos;
|
||||
}
|
||||
if((next_count->get_count() < rep->max) && take_first)
|
||||
{
|
||||
// increase the counter:
|
||||
++(*next_count);
|
||||
pstate = rep->next.p;
|
||||
return match_all_states();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
unsigned count = 0;
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
re_syntax_base* psingle = rep->next.p;
|
||||
// match compulsary repeats first:
|
||||
while(count < rep->min)
|
||||
{
|
||||
pstate = psingle;
|
||||
if(!match_wild())
|
||||
return false;
|
||||
++count;
|
||||
}
|
||||
bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
|
||||
if(greedy)
|
||||
{
|
||||
// normal repeat:
|
||||
while(count < rep->max)
|
||||
{
|
||||
pstate = psingle;
|
||||
if(!match_wild())
|
||||
break;
|
||||
++count;
|
||||
}
|
||||
if((rep->leading) && (count < rep->max))
|
||||
restart = position;
|
||||
pstate = rep;
|
||||
return backtrack_till_match(count - rep->min);
|
||||
}
|
||||
else
|
||||
{
|
||||
// non-greedy, keep trying till we get a match:
|
||||
BidiIterator save_pos;
|
||||
do
|
||||
{
|
||||
if((rep->leading) && (rep->max == UINT_MAX))
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
return false;
|
||||
++count;
|
||||
pstate = psingle;
|
||||
position = save_pos;
|
||||
if(!match_wild())
|
||||
return false;
|
||||
}while(true);
|
||||
}
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
if(m_match_flags & match_not_dot_null)
|
||||
return match_dot_repeat_slow();
|
||||
if((static_cast<const re_dot*>(pstate->next.p)->mask & match_any_mask) == 0)
|
||||
return match_dot_repeat_slow();
|
||||
//
|
||||
// start by working out how much we can skip:
|
||||
//
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4267)
|
||||
#endif
|
||||
bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
|
||||
std::size_t count = (std::min)(static_cast<std::size_t>(::boost::re_detail::distance(position, last)), static_cast<std::size_t>(greedy ? rep->max : rep->min));
|
||||
if(rep->min > count)
|
||||
{
|
||||
position = last;
|
||||
return false; // not enough text left to match
|
||||
}
|
||||
std::advance(position, count);
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
if((rep->leading) && (count < rep->max) && greedy)
|
||||
restart = position;
|
||||
if(greedy)
|
||||
return backtrack_till_match(count - rep->min);
|
||||
|
||||
// non-greedy, keep trying till we get a match:
|
||||
BidiIterator save_pos;
|
||||
do
|
||||
{
|
||||
while((position != last) && (count < rep->max) && !can_start(*position, rep->_map, mask_skip))
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
if((rep->leading) && (rep->max == UINT_MAX))
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
return false;
|
||||
if(position == last)
|
||||
return false;
|
||||
position = ++save_pos;
|
||||
++count;
|
||||
}while(true);
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -w-8008 -w-8066 -w-8004
|
||||
#endif
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
BOOST_ASSERT(1 == static_cast<const re_literal*>(rep->next.p)->length);
|
||||
const char_type what = *reinterpret_cast<const char_type*>(static_cast<const re_literal*>(rep->next.p) + 1);
|
||||
unsigned count = 0;
|
||||
//
|
||||
// start by working out how much we can skip:
|
||||
//
|
||||
bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
|
||||
std::size_t desired = greedy ? rep->max : rep->min;
|
||||
if(::boost::is_random_access_iterator<BidiIterator>::value)
|
||||
{
|
||||
BidiIterator end = position;
|
||||
std::advance(end, (std::min)((unsigned)::boost::re_detail::distance(position, last), desired));
|
||||
BidiIterator origin(position);
|
||||
while((position != end) && (traits_inst.translate(*position, icase) == what))
|
||||
{
|
||||
++position;
|
||||
}
|
||||
count = (unsigned)::boost::re_detail::distance(origin, position);
|
||||
}
|
||||
else
|
||||
{
|
||||
while((count < desired) && (position != last) && (traits_inst.translate(*position, icase) == what))
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
}
|
||||
if((rep->leading) && (count < rep->max) && greedy)
|
||||
restart = position;
|
||||
if(count < rep->min)
|
||||
return false;
|
||||
|
||||
if(greedy)
|
||||
return backtrack_till_match(count - rep->min);
|
||||
|
||||
// non-greedy, keep trying till we get a match:
|
||||
BidiIterator save_pos;
|
||||
do
|
||||
{
|
||||
while((position != last) && (count < rep->max) && !can_start(*position, rep->_map, mask_skip))
|
||||
{
|
||||
if((traits_inst.translate(*position, icase) == what))
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
else
|
||||
return false; // counldn't repeat even though it was the only option
|
||||
}
|
||||
if((rep->leading) && (rep->max == UINT_MAX))
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
return false;
|
||||
if(position == last)
|
||||
return false;
|
||||
position = save_pos;
|
||||
if(traits_inst.translate(*position, icase) == what)
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}while(true);
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -w-8008 -w-8066 -w-8004
|
||||
#endif
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
const unsigned char* map = static_cast<const re_set*>(rep->next.p)->_map;
|
||||
unsigned count = 0;
|
||||
//
|
||||
// start by working out how much we can skip:
|
||||
//
|
||||
bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
|
||||
std::size_t desired = greedy ? rep->max : rep->min;
|
||||
if(::boost::is_random_access_iterator<BidiIterator>::value)
|
||||
{
|
||||
BidiIterator end = position;
|
||||
std::advance(end, (std::min)((unsigned)::boost::re_detail::distance(position, last), desired));
|
||||
BidiIterator origin(position);
|
||||
while((position != end) && map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
|
||||
{
|
||||
++position;
|
||||
}
|
||||
count = (unsigned)::boost::re_detail::distance(origin, position);
|
||||
}
|
||||
else
|
||||
{
|
||||
while((count < desired) && (position != last) && map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
}
|
||||
if((rep->leading) && (count < rep->max) && greedy)
|
||||
restart = position;
|
||||
if(count < rep->min)
|
||||
return false;
|
||||
|
||||
if(greedy)
|
||||
return backtrack_till_match(count - rep->min);
|
||||
|
||||
// non-greedy, keep trying till we get a match:
|
||||
BidiIterator save_pos;
|
||||
do
|
||||
{
|
||||
while((position != last) && (count < rep->max) && !can_start(*position, rep->_map, mask_skip))
|
||||
{
|
||||
if(map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
else
|
||||
return false; // counldn't repeat even though it was the only option
|
||||
}
|
||||
if((rep->leading) && (rep->max == UINT_MAX))
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
return false;
|
||||
if(position == last)
|
||||
return false;
|
||||
position = save_pos;
|
||||
if(map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}while(true);
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -w-8008 -w-8066 -w-8004
|
||||
#endif
|
||||
typedef typename traits::char_class_type char_class_type;
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
const re_set_long<char_class_type>* set = static_cast<const re_set_long<char_class_type>*>(pstate->next.p);
|
||||
unsigned count = 0;
|
||||
//
|
||||
// start by working out how much we can skip:
|
||||
//
|
||||
bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
|
||||
std::size_t desired = greedy ? rep->max : rep->min;
|
||||
if(::boost::is_random_access_iterator<BidiIterator>::value)
|
||||
{
|
||||
BidiIterator end = position;
|
||||
std::advance(end, (std::min)((unsigned)::boost::re_detail::distance(position, last), desired));
|
||||
BidiIterator origin(position);
|
||||
while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase)))
|
||||
{
|
||||
++position;
|
||||
}
|
||||
count = (unsigned)::boost::re_detail::distance(origin, position);
|
||||
}
|
||||
else
|
||||
{
|
||||
while((count < desired) && (position != last) && (position != re_is_set_member(position, last, set, re.get_data(), icase)))
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
}
|
||||
if((rep->leading) && (count < rep->max) && greedy)
|
||||
restart = position;
|
||||
if(count < rep->min)
|
||||
return false;
|
||||
|
||||
if(greedy)
|
||||
return backtrack_till_match(count - rep->min);
|
||||
|
||||
// non-greedy, keep trying till we get a match:
|
||||
BidiIterator save_pos;
|
||||
do
|
||||
{
|
||||
while((position != last) && (count < rep->max) && !can_start(*position, rep->_map, mask_skip))
|
||||
{
|
||||
if(position != re_is_set_member(position, last, set, re.get_data(), icase))
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
else
|
||||
return false; // counldn't repeat even though it was the only option
|
||||
}
|
||||
if((rep->leading) && (rep->max == UINT_MAX))
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
return false;
|
||||
if(position == last)
|
||||
return false;
|
||||
position = save_pos;
|
||||
if(position != re_is_set_member(position, last, set, re.get_data(), icase))
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}while(true);
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits>::backtrack_till_match(std::size_t count)
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
if((m_match_flags & match_partial) && (position == last))
|
||||
m_has_partial_match = true;
|
||||
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
BidiIterator backtrack = position;
|
||||
if(position == last)
|
||||
{
|
||||
if(rep->can_be_null & mask_skip)
|
||||
{
|
||||
pstate = rep->alt.p;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
}
|
||||
if(count)
|
||||
{
|
||||
position = --backtrack;
|
||||
--count;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
do
|
||||
{
|
||||
while(count && !can_start(*position, rep->_map, mask_skip))
|
||||
{
|
||||
--position;
|
||||
--count;
|
||||
++state_count;
|
||||
}
|
||||
pstate = rep->alt.p;
|
||||
backtrack = position;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count == 0)
|
||||
return false;
|
||||
position = --backtrack;
|
||||
++state_count;
|
||||
--count;
|
||||
}while(true);
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,26 +1,29 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Permission to use, copy, modify, distribute and sell this software
|
||||
* and its documentation for any purpose is hereby granted without fee,
|
||||
* provided that the above copyright notice appear in all copies and
|
||||
* that both that copyright notice and this permission notice appear
|
||||
* in supporting documentation. Dr John Maddock makes no representations
|
||||
* about the suitability of this software for any purpose.
|
||||
* It is provided "as is" without express or implied warranty.
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE: primary_transform.hpp
|
||||
* VERSION: 3.12
|
||||
* VERSION: see <boost/version.hpp>
|
||||
* DESCRIPTION: Heuristically determines the sort string format in use
|
||||
* by the current locale.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_PRIMARY_TRANSFORM
|
||||
#define BOOST_REGEX_PRIMARY_TRANSFORM
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
@@ -35,6 +38,12 @@ enum{
|
||||
template <class S, class charT>
|
||||
unsigned count_chars(const S& s, charT c)
|
||||
{
|
||||
//
|
||||
// Count how many occurances of character c occur
|
||||
// in string s: if c is a delimeter between collation
|
||||
// fields, then this should be the same value for all
|
||||
// sort keys:
|
||||
//
|
||||
unsigned int count = 0;
|
||||
for(unsigned pos = 0; pos < s.size(); ++pos)
|
||||
{
|
||||
@@ -57,20 +66,17 @@ unsigned find_sort_syntax(const traits* pt, charT* delim)
|
||||
// Suppress incorrect warning for MSVC
|
||||
(void)pt;
|
||||
|
||||
string_type a(1, (char_type)'a');
|
||||
string_type sa;
|
||||
pt->transform(sa, a);
|
||||
char_type a[2] = {'a', '\0', };
|
||||
string_type sa(pt->transform(a, a+1));
|
||||
if(sa == a)
|
||||
{
|
||||
*delim = 0;
|
||||
return sort_C;
|
||||
}
|
||||
string_type A(1, (char_type)'A');
|
||||
string_type sA;
|
||||
pt->transform(sA, A);
|
||||
string_type c(1, (char_type)';');
|
||||
string_type sc;
|
||||
pt->transform(sc, c);
|
||||
char_type A[2] = { 'A', '\0', };
|
||||
string_type sA(pt->transform(A, A+1));
|
||||
char_type c[2] = { ';', '\0', };
|
||||
string_type sc(pt->transform(c, c+1));
|
||||
|
||||
int pos = 0;
|
||||
while((pos <= static_cast<int>(sa.size())) && (pos <= static_cast<int>(sA.size())) && (sa[pos] == sA[pos])) ++pos;
|
||||
@@ -81,11 +87,11 @@ unsigned find_sort_syntax(const traits* pt, charT* delim)
|
||||
return sort_unknown;
|
||||
}
|
||||
//
|
||||
// at this point sa[pos] is either the end of a fixed with field
|
||||
// at this point sa[pos] is either the end of a fixed width field
|
||||
// or the character that acts as a delimiter:
|
||||
//
|
||||
charT maybe_delim = sa[pos];
|
||||
if((pos != 0) && (count_chars(sa, maybe_delim) == count_chars(sA, maybe_delim)) && (count_chars(sa, maybe_delim) == count_chars(c, maybe_delim)))
|
||||
if((pos != 0) && (count_chars(sa, maybe_delim) == count_chars(sA, maybe_delim)) && (count_chars(sa, maybe_delim) == count_chars(sc, maybe_delim)))
|
||||
{
|
||||
*delim = maybe_delim;
|
||||
return sort_delim;
|
||||
@@ -93,10 +99,10 @@ unsigned find_sort_syntax(const traits* pt, charT* delim)
|
||||
//
|
||||
// OK doen't look like a delimiter, try for fixed width field:
|
||||
//
|
||||
if((sa.size() == sA.size()) && (sa.size() == c.size()))
|
||||
if((sa.size() == sA.size()) && (sa.size() == sc.size()))
|
||||
{
|
||||
// note assumes that the fixed width field is less than
|
||||
// numeric_limits<charT>::max(), should be true for all types
|
||||
// (numeric_limits<charT>::max)(), should be true for all types
|
||||
// I can't imagine 127 character fields...
|
||||
*delim = static_cast<charT>(++pos);
|
||||
return sort_fixed;
|
||||
@@ -112,6 +118,13 @@ unsigned find_sort_syntax(const traits* pt, charT* delim)
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2004
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE basic_regex_creator.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares template class basic_regex_creator which fills in
|
||||
* the data members of a regex_data object.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_PROTECTED_CALL_HPP
|
||||
#define BOOST_REGEX_V4_PROTECTED_CALL_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
class BOOST_REGEX_DECL abstract_protected_call
|
||||
{
|
||||
public:
|
||||
bool BOOST_REGEX_CALL execute()const;
|
||||
// this stops gcc-4 from complaining:
|
||||
virtual ~abstract_protected_call(){}
|
||||
private:
|
||||
virtual bool call()const = 0;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class concrete_protected_call
|
||||
: public abstract_protected_call
|
||||
{
|
||||
public:
|
||||
typedef bool (T::*proc_type)();
|
||||
concrete_protected_call(T* o, proc_type p)
|
||||
: obj(o), proc(p) {}
|
||||
private:
|
||||
virtual bool call()const;
|
||||
T* obj;
|
||||
proc_type proc;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
bool concrete_protected_call<T>::call()const
|
||||
{
|
||||
return (obj->*proc)();
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,162 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regbase.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares class regbase.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_REGBASE_HPP
|
||||
#define BOOST_REGEX_V4_REGBASE_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
//
|
||||
// class regbase
|
||||
// handles error codes and flags
|
||||
//
|
||||
class BOOST_REGEX_DECL regbase
|
||||
{
|
||||
public:
|
||||
enum flag_type_
|
||||
{
|
||||
//
|
||||
// Divide the flags up into logical groups:
|
||||
// bits 0-7 indicate main synatx type.
|
||||
// bits 8-15 indicate syntax subtype.
|
||||
// bits 16-31 indicate options that are common to all
|
||||
// regex syntaxes.
|
||||
// In all cases the default is 0.
|
||||
//
|
||||
// Main synatx group:
|
||||
//
|
||||
perl_syntax_group = 0, // default
|
||||
basic_syntax_group = 1, // POSIX basic
|
||||
literal = 2, // all characters are literals
|
||||
main_option_type = literal | basic_syntax_group | perl_syntax_group, // everything!
|
||||
//
|
||||
// options specific to perl group:
|
||||
//
|
||||
no_bk_refs = 1 << 8, // \d not allowed
|
||||
no_perl_ex = 1 << 9, // disable perl extensions
|
||||
no_mod_m = 1 << 10, // disable Perl m modifier
|
||||
mod_x = 1 << 11, // Perl x modifier
|
||||
mod_s = 1 << 12, // force s modifier on (overrides match_not_dot_newline)
|
||||
no_mod_s = 1 << 13, // force s modifier off (overrides match_not_dot_newline)
|
||||
|
||||
//
|
||||
// options specific to basic group:
|
||||
//
|
||||
no_char_classes = 1 << 8, // [[:CLASS:]] not allowed
|
||||
no_intervals = 1 << 9, // {x,y} not allowed
|
||||
bk_plus_qm = 1 << 10, // uses \+ and \?
|
||||
bk_vbar = 1 << 11, // use \| for alternatives
|
||||
emacs_ex = 1 << 12, // enables emacs extensions
|
||||
|
||||
//
|
||||
// options common to all groups:
|
||||
//
|
||||
no_escape_in_lists = 1 << 16, // '\' not special inside [...]
|
||||
newline_alt = 1 << 17, // \n is the same as |
|
||||
no_except = 1 << 18, // no exception on error
|
||||
failbit = 1 << 19, // error flag
|
||||
icase = 1 << 20, // characters are matched regardless of case
|
||||
nocollate = 0, // don't use locale specific collation (deprecated)
|
||||
collate = 1 << 21, // use locale specific collation
|
||||
nosubs = 1 << 22, // don't mark sub-expressions
|
||||
optimize = 0, // not really supported
|
||||
|
||||
|
||||
|
||||
basic = basic_syntax_group | collate | no_escape_in_lists,
|
||||
extended = no_bk_refs | collate | no_perl_ex | no_escape_in_lists,
|
||||
normal = 0,
|
||||
emacs = basic_syntax_group | collate | emacs_ex | bk_vbar,
|
||||
awk = no_bk_refs | collate | no_perl_ex,
|
||||
grep = basic | newline_alt,
|
||||
egrep = extended | newline_alt,
|
||||
sed = basic,
|
||||
perl = normal,
|
||||
ECMAScript = normal,
|
||||
JavaScript = normal,
|
||||
JScript = normal
|
||||
};
|
||||
typedef unsigned int flag_type;
|
||||
|
||||
enum restart_info
|
||||
{
|
||||
restart_any = 0,
|
||||
restart_word = 1,
|
||||
restart_line = 2,
|
||||
restart_buf = 3,
|
||||
restart_continue = 4,
|
||||
restart_lit = 5,
|
||||
restart_fixed_lit = 6,
|
||||
restart_count = 7
|
||||
};
|
||||
};
|
||||
|
||||
//
|
||||
// provide std lib proposal compatible constants:
|
||||
//
|
||||
namespace regex_constants{
|
||||
|
||||
enum flag_type_
|
||||
{
|
||||
|
||||
no_except = ::boost::regbase::no_except,
|
||||
failbit = ::boost::regbase::failbit,
|
||||
literal = ::boost::regbase::literal,
|
||||
icase = ::boost::regbase::icase,
|
||||
nocollate = ::boost::regbase::nocollate,
|
||||
collate = ::boost::regbase::collate,
|
||||
nosubs = ::boost::regbase::nosubs,
|
||||
optimize = ::boost::regbase::optimize,
|
||||
bk_plus_qm = ::boost::regbase::bk_plus_qm,
|
||||
bk_vbar = ::boost::regbase::bk_vbar,
|
||||
no_intervals = ::boost::regbase::no_intervals,
|
||||
no_char_classes = ::boost::regbase::no_char_classes,
|
||||
no_escape_in_lists = ::boost::regbase::no_escape_in_lists,
|
||||
no_mod_m = ::boost::regbase::no_mod_m,
|
||||
mod_x = ::boost::regbase::mod_x,
|
||||
mod_s = ::boost::regbase::mod_s,
|
||||
no_mod_s = ::boost::regbase::no_mod_s,
|
||||
|
||||
basic = ::boost::regbase::basic,
|
||||
extended = ::boost::regbase::extended,
|
||||
normal = ::boost::regbase::normal,
|
||||
emacs = ::boost::regbase::emacs,
|
||||
awk = ::boost::regbase::awk,
|
||||
grep = ::boost::regbase::grep,
|
||||
egrep = ::boost::regbase::egrep,
|
||||
sed = basic,
|
||||
perl = normal,
|
||||
ECMAScript = normal,
|
||||
JavaScript = normal,
|
||||
JScript = normal
|
||||
};
|
||||
typedef ::boost::regbase::flag_type syntax_option_type;
|
||||
|
||||
} // namespace regex_constants
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares boost::basic_regex<> and associated
|
||||
* functions and classes. This header is the main
|
||||
* entry point for the template regex code.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RE_REGEX_HPP_INCLUDED
|
||||
#define BOOST_RE_REGEX_HPP_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
// what follows is all C++ don't include in C builds!!
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_WORKAROUND_HPP
|
||||
#include <boost/regex/v4/regex_workaround.hpp>
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_REGEX_FWD_HPP
|
||||
#include <boost/regex_fwd.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_TRAITS_HPP
|
||||
#include <boost/regex/regex_traits.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_RAW_BUFFER_HPP
|
||||
#include <boost/regex/v4/error_type.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_MATCH_FLAGS
|
||||
#include <boost/regex/v4/match_flags.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_RAW_BUFFER_HPP
|
||||
#include <boost/regex/v4/regex_raw_buffer.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_RE_PAT_EXCEPT_HPP
|
||||
#include <boost/regex/pattern_except.hpp>
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_REGEX_V4_CHAR_REGEX_TRAITS_HPP
|
||||
#include <boost/regex/v4/char_regex_traits.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_STATES_HPP
|
||||
#include <boost/regex/v4/states.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_REGBASE_HPP
|
||||
#include <boost/regex/v4/regbase.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_ITERATOR_TRAITS_HPP
|
||||
#include <boost/regex/v4/iterator_traits.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_BASIC_REGEX_HPP
|
||||
#include <boost/regex/v4/basic_regex.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_BASIC_REGEX_CREATOR_HPP
|
||||
#include <boost/regex/v4/basic_regex_creator.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_BASIC_REGEX_PARSER_HPP
|
||||
#include <boost/regex/v4/basic_regex_parser.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_SUB_MATCH_HPP
|
||||
#include <boost/regex/v4/sub_match.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_FORMAT_HPP
|
||||
#include <boost/regex/v4/regex_format.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_MATCH_RESULTS_HPP
|
||||
#include <boost/regex/v4/match_results.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_PROTECTED_CALL_HPP
|
||||
#include <boost/regex/v4/protected_call.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_MATCHER_HPP
|
||||
#include <boost/regex/v4/perl_matcher.hpp>
|
||||
#endif
|
||||
//
|
||||
// template instances:
|
||||
//
|
||||
#define BOOST_REGEX_CHAR_T char
|
||||
#ifdef BOOST_REGEX_NARROW_INSTANTIATE
|
||||
# define BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
#include <boost/regex/v4/instances.hpp>
|
||||
#undef BOOST_REGEX_CHAR_T
|
||||
#ifdef BOOST_REGEX_INSTANTIATE
|
||||
# undef BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
#define BOOST_REGEX_CHAR_T wchar_t
|
||||
#ifdef BOOST_REGEX_WIDE_INSTANTIATE
|
||||
# define BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
#include <boost/regex/v4/instances.hpp>
|
||||
#undef BOOST_REGEX_CHAR_T
|
||||
#ifdef BOOST_REGEX_INSTANTIATE
|
||||
# undef BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_WREGEX) && defined(BOOST_REGEX_HAS_OTHER_WCHAR_T)
|
||||
#define BOOST_REGEX_CHAR_T unsigned short
|
||||
#ifdef BOOST_REGEX_US_INSTANTIATE
|
||||
# define BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
#include <boost/regex/v4/instances.hpp>
|
||||
#undef BOOST_REGEX_CHAR_T
|
||||
#ifdef BOOST_REGEX_INSTANTIATE
|
||||
# undef BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost{
|
||||
#ifdef BOOST_REGEX_NO_FWD
|
||||
typedef basic_regex<char, regex_traits<char> > regex;
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
typedef basic_regex<wchar_t, regex_traits<wchar_t> > wregex;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef match_results<const char*> cmatch;
|
||||
typedef match_results<std::string::const_iterator> smatch;
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
typedef match_results<const wchar_t*> wcmatch;
|
||||
typedef match_results<std::wstring::const_iterator> wsmatch;
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
#ifndef BOOST_REGEX_MATCH_HPP
|
||||
#include <boost/regex/v4/regex_match.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_REGEX_SEARCH_HPP
|
||||
#include <boost/regex/v4/regex_search.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_ITERATOR_HPP
|
||||
#include <boost/regex/v4/regex_iterator.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_TOKEN_ITERATOR_HPP
|
||||
#include <boost/regex/v4/regex_token_iterator.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_REGEX_GREP_HPP
|
||||
#include <boost/regex/v4/regex_grep.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_REGEX_REPLACE_HPP
|
||||
#include <boost/regex/v4/regex_replace.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_REGEX_MERGE_HPP
|
||||
#include <boost/regex/v4/regex_merge.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_SPLIT_HPP
|
||||
#include <boost/regex/v4/regex_split.hpp>
|
||||
#endif
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // include
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_cstring.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: This is an internal header file, do not include directly.
|
||||
* String support and helper functions, for regular
|
||||
* expression library.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_CSTRING_HPP
|
||||
#define BOOST_REGEX_CSTRING_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
//
|
||||
// start by defining some template function aliases for C API functions:
|
||||
//
|
||||
|
||||
template <class charT>
|
||||
std::size_t BOOST_REGEX_CALL re_strlen(const charT *s)
|
||||
{
|
||||
std::size_t len = 0;
|
||||
while(*s)
|
||||
{
|
||||
++s;
|
||||
++len;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
inline std::size_t BOOST_REGEX_CALL re_strlen(const char *s)
|
||||
{
|
||||
return std::strlen(s);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
|
||||
inline std::size_t BOOST_REGEX_CALL re_strlen(const wchar_t *s)
|
||||
{
|
||||
return std::wcslen(s);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL re_transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
#endif
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL re_transform(std::string& out, const std::string& in);
|
||||
|
||||
template <class charT>
|
||||
void BOOST_REGEX_CALL re_trunc_primary(std::basic_string<charT>& s)
|
||||
{
|
||||
for(unsigned int i = 0; i < s.size(); ++i)
|
||||
{
|
||||
if(s[i] <= 1)
|
||||
{
|
||||
s.erase(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline char* BOOST_REGEX_CALL re_strcpy(char *s1, const char *s2)
|
||||
{
|
||||
#if defined(__BORLANDC__) && defined(strcpy)
|
||||
return ::strcpy(s1, s2);
|
||||
#else
|
||||
return std::strcpy(s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
|
||||
inline wchar_t* BOOST_REGEX_CALL re_strcpy(wchar_t *s1, const wchar_t *s2)
|
||||
{
|
||||
return std::wcscpy(s1, s2);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
template <class charT>
|
||||
charT* BOOST_REGEX_CALL re_strdup(const charT* p)
|
||||
{
|
||||
charT* buf = new charT[re_strlen(p) + 1];
|
||||
re_strcpy(buf, p);
|
||||
return buf;
|
||||
}
|
||||
|
||||
template <class charT>
|
||||
inline void BOOST_REGEX_CALL re_strfree(charT* p)
|
||||
{
|
||||
delete[] p;
|
||||
}
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_CSTRING_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user