reworked regex directory structure to match boost requirements.

[SVN r9752]
This commit is contained in:
John Maddock
2001-04-10 11:44:47 +00:00
parent dcb64d5db7
commit ed21a5183b
69 changed files with 155 additions and 111 deletions

View File

@ -1067,7 +1067,7 @@ syntax messages replace the default ones. <br>
<hr>
<h3><a name="demos"></a>Appendix 4: Demo Applications</h3>
<h3><a name="demos"></a>Appendix 4: Example Applications</h3>
<p>There are three demo applications that ship with this library,
they all come with makefiles for Borland, Microsoft and gcc
@ -1081,9 +1081,9 @@ guarantee that the library will behave as claimed - at least as
far as those items tested are concerned - if anyone spots
anything that isn't being tested I'd be glad to hear about it. </p>
<p>Files: <a href="demo/regress/parse.cpp">parse.cpp</a>, <a
href="demo/regress/regress.cpp">regress.cpp</a>, <a
href="demo/regress/tests.cpp">tests.cpp</a>. </p>
<p>Files: <a href="test/regress/parse.cpp">parse.cpp</a>, <a
href="test/regress/regress.cpp">regress.cpp</a>, <a
href="test/regress/tests.cpp">tests.cpp</a>. </p>
<h5>jgrep.exe </h5>
@ -1093,8 +1093,8 @@ and the mapfile class to see an example of a &quot;smart&quot;
bidirectional iterator that can be used with regex++ or any other
STL algorithm. </p>
<p>Files: <a href="demo/jgrep/jgrep.cpp">jgrep.cpp</a>, <a
href="demo/jgrep/main.cpp">main.cpp</a>. </p>
<p>Files: <a href="example/jgrep/jgrep.cpp">jgrep.cpp</a>, <a
href="example/jgrep/main.cpp">main.cpp</a>. </p>
<h5>timer.exe </h5>
@ -1103,41 +1103,41 @@ results of all matches are timed, allowing the programmer to
optimize their regular expressions where performance is critical.
</p>
<p>Files: <a href="demo/timer/regex_timer.cpp">regex_timer.cpp</a>.
<p>Files: <a href="example/timer/regex_timer.cpp">regex_timer.cpp</a>.
<br>
</p>
<p>The snippets demos contain the code examples used in the
<p>The snippets examples contain the code examples used in the
documentation:</p>
<p><a href="demo/snippets/snip1.cpp">snip1.cpp</a>: ftp based
<p><a href="example/snippets/regex_match_example.cpp">regex_match_example.cpp</a>: ftp based
regex_match example.</p>
<p><a href="demo/snippets/snip2.cpp">snip2.cpp</a>: regex_search
<p><a href="example/snippets/regex_search_example.cpp">regex_search_example.cpp</a>: regex_search
example: searches a cpp file for class definitions.</p>
<p><a href="demo/snippets/snip3.cpp">snip3.cpp</a>: regex_grep
<p><a href="example/snippets/regex_grep_example_1.cpp">regex_grep_example_1.cpp</a>: regex_grep
example 1: searches a cpp file for class definitions.</p>
<p><a href="demo/snippets/snip4.cpp">snip4.cpp</a>: regex_merge
<p><a href="example/snippets/regex_merge_example.cpp">regex_merge_example.cpp</a>: regex_merge
example: converts a C++ file to syntax highlighted HTML.</p>
<p><a href="demo/snippets/snip5.cpp">snip5.cpp</a>: regex_grep
<p><a href="example/snippets/regex_grep_example_2.cpp">regex_grep_example_2.cpp</a>: regex_grep
example 2: searches a cpp file for class definitions, using a
global callback function. </p>
<p><a href="demo/snippets/snip6.cpp">snip6.cpp</a>: regex_grep
<p><a href="example/snippets/regex_grep_example_3.cpp">regex_grep_example_3.cpp</a>: regex_grep
example 2: searches a cpp file for class definitions, using a
bound member function callback.</p>
<p><a href="demo/snippets/snip7.cpp">snip7.cpp</a>: regex_grep
<p><a href="example/snippets/regex_grep_example_4.cpp">regex_grep_example_4.cpp</a>: regex_grep
example 2: searches a cpp file for class definitions, using a C++
Builder closure as a callback.</p>
<p><a href="demo/snippets/snip8.cpp">snip8.cpp</a>: regex_split
<p><a href="example/snippets/regex_split_example_1.cpp">regex_split_example_1.cpp</a>: regex_split
example: split a string into tokens.</p>
<p><a href="demo/snippets/snip9.cpp">snip9.cpp</a>: regex_split
<p><a href="example/snippets/regex_split_example_2.cpp">regex_split_example_2.cpp</a>: regex_split
example: spit out linked URL's.</p>
<hr>

18
configure vendored
View File

@ -3390,7 +3390,7 @@ done
ac_all_o=""
ac_rules=""
ac_all_cpp=""
cat ./lib/makefile.org > ./lib/makefile.in
cat ./build/makefile.org > ./build/makefile.in
for file in src/*.cpp src/*.c
do
if test "$file" != 'src/*.cpp' && test "$file" != 'src/*.c'; then
@ -3398,15 +3398,15 @@ do
ac_all_cpp="$ac_all_cpp $file"
root=`echo "$file" | sed 's/src\/\(.*\)\..*/\1/g'`
ac_all_o="$ac_all_o $root$ac_obj_ext"
echo >> ./lib/makefile.in
echo >> ./lib/makefile.in
echo "$root$ac_obj_ext"': $(ALL_H) '"../$file" >> ./lib/makefile.in
echo ' $(CPP) $(CPP_PROJ)'" ../$file" >> ./lib/makefile.in
echo ' $(AR) -rc lib$(LIBNAME).a'" $root$ac_obj_ext" >> ./lib/makefile.in
echo >> ./build/makefile.in
echo >> ./build/makefile.in
echo "$root$ac_obj_ext"': $(ALL_H) '"../$file" >> ./build/makefile.in
echo ' $(CPP) $(CPP_PROJ)'" ../$file" >> ./build/makefile.in
echo ' $(AR) -rc lib$(LIBNAME).a'" $root$ac_obj_ext" >> ./build/makefile.in
fi
done
echo "$ac_rules" >> ./lib/makefile.in
echo "$ac_rules" >> ./build/makefile.in
@ -3773,7 +3773,7 @@ done
ac_given_srcdir=$srcdir
trap 'rm -fr `echo "lib/makefile demo/jgrep/makefile demo/timer/makefile demo/regress/makefile makefile ../../boost/re_detail/regex_options.hpp:jm_opt.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
trap 'rm -fr `echo "lib/makefile example/jgrep/makefile example/timer/makefile test/regress/makefile makefile ../../boost/re_detail/regex_options.hpp:jm_opt.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@ -3852,7 +3852,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"lib/makefile demo/jgrep/makefile demo/timer/makefile demo/regress/makefile makefile"}
CONFIG_FILES=\${CONFIG_FILES-"lib/makefile example/jgrep/makefile example/timer/makefile test/regress/makefile makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then

View File

@ -1383,7 +1383,7 @@ done
ac_all_o=""
ac_rules=""
ac_all_cpp=""
cat ./lib/makefile.org > ./lib/makefile.in
cat ./build/makefile.org > ./build/makefile.in
for file in src/*.cpp src/*.c
do
if test "$file" != 'src/*.cpp' && test "$file" != 'src/*.c'; then
@ -1393,15 +1393,15 @@ do
root=`echo "$file" | sed 's/src\/\(.*\)\..*/\1/g'`
dnl echo root file name is "$root"
ac_all_o="$ac_all_o $root$ac_obj_ext"
echo >> ./lib/makefile.in
echo >> ./lib/makefile.in
echo "$root$ac_obj_ext"': $(ALL_H) '"../$file" >> ./lib/makefile.in
echo ' $(CPP) $(CPP_PROJ)'" ../$file" >> ./lib/makefile.in
echo ' $(AR) -rc lib$(LIBNAME).a'" $root$ac_obj_ext" >> ./lib/makefile.in
echo >> ./build/makefile.in
echo >> ./build/makefile.in
echo "$root$ac_obj_ext"': $(ALL_H) '"../$file" >> ./build/makefile.in
echo ' $(CPP) $(CPP_PROJ)'" ../$file" >> ./build/makefile.in
echo ' $(AR) -rc lib$(LIBNAME).a'" $root$ac_obj_ext" >> ./build/makefile.in
fi
done
echo "$ac_rules" >> ./lib/makefile.in
echo "$ac_rules" >> ./build/makefile.in
AC_SUBST(ac_all_o)
AC_SUBST(ac_all_h)
@ -1657,7 +1657,7 @@ AC_DEFINE(BOOST_RE_AUTO_CONF)
AC_MSG_RESULT(***)
AC_MSG_RESULT($0: setting up headers...)
AC_MSG_RESULT(***)
AC_OUTPUT(lib/makefile demo/jgrep/makefile demo/timer/makefile demo/regress/makefile makefile)
AC_OUTPUT(lib/makefile example/jgrep/makefile example/timer/makefile test/regress/makefile makefile)
AC_MSG_RESULT(***)
AC_MSG_RESULT($0: regex++ package tuned for use with \"${CXX}\" compiler.)
AC_MSG_RESULT($0: To restore original settings - copy jm_opt.in to ../../boost/re_detail/regex_options.hpp)

View File

@ -10,7 +10,7 @@ BCROOT=$(MAKEDIR)\..
!endif
BCC32 = $(BCROOT)\bin\Bcc32.exe
LIBPATH=..\..\lib\bcb5
LIBPATH=..\..\build\bcb5
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
LINKOPTS= -ap -Tpe -x
@ -47,3 +47,4 @@ main.obj : main.cpp

View File

@ -10,7 +10,7 @@ BCROOT=$(MAKEDIR)\..
!endif
BCC32 = $(BCROOT)\bin\Bcc32.exe
LIBPATH="..\..\lib\bcb4"
LIBPATH="..\..\build\bcb4"
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
LINKOPTS= -ap -Tpe -x
@ -47,3 +47,4 @@ main.obj : main.cpp

View File

@ -10,7 +10,7 @@ BCROOT=$(MAKEDIR)\..
!endif
BCC32 = $(BCROOT)\bin\Bcc32.exe
LIBPATH=../../lib/bcb5
LIBPATH=../../build/bcb5
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
LINKOPTS= -ap -Tpe -x
@ -19,7 +19,7 @@ COMPOPTS= -O2 -tWM- -DSTRICT; -I$(BCROOT)\include;../../../../; -D_NO_VCL
jgrep.exe : jgrep.obj main.obj
$(BCC32) $(COMPOPTS) -e$@ -L..\..\lib\bcb5 main.obj jgrep.obj
$(BCC32) $(COMPOPTS) -e$@ -L..\..\build\bcb5 main.obj jgrep.obj
jgrep.obj : jgrep.cpp
$(BCC32) -c @&&|
@ -45,3 +45,5 @@ main.obj : main.cpp

View File

@ -6,10 +6,11 @@
CXX= $(INCLUDES) -O2 -I../../../../ -I./ $(CXXFLAGS) $(LDFLAGS)
jgrep : jgrep.cpp main.cpp
g++ -ojgrep $(CXX) jgrep.cpp main.cpp -L../../lib/gcc -lboost_regex $(LIBS)
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../../lib/gcc -lboost_regex_debug $(LIBS)
g++ -ojgrep -I../../../../ -I./ -g jgrep.cpp main.cpp -L../../build/gcc -lboost_regex_debug $(LIBS)

View File

@ -8,10 +8,10 @@ LIBS=@LIBS@
EXE=@ac_exe_ext@
OBJ=@ac_obj_ext@
LIBDEP=../../lib/libboost_regex.a ../../../../boost/re_detail/regex_options.hpp ../../../../boost/re_detail/regex_config.hpp
LIBDEP=../../build/libboost_regex.a ../../../../boost/re_detail/regex_options.hpp ../../../../boost/re_detail/regex_config.hpp
jgrep$(EXE) : jgrep$(OBJ) main$(OBJ)
$(CXX) -o jgrep$(EXE) jgrep$(OBJ) main$(OBJ) -L../../lib -lboost_regex $(LIBS)
$(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
@ -37,5 +37,6 @@ main$(OBJ) : main.cpp jgrep.h $(LIBDEP)

View File

@ -4,7 +4,8 @@
#
jgrep.exe: main.cpp jgrep.cpp jgrep.h
cl -GX -GR /Oityb1 /GF /Gy -MT -I..\..\..\..\ jgrep.cpp main.cpp /link /LIBPATH:..\..\lib\vc6-stlport user32.lib
cl -GX -GR /Oityb1 /GF /Gy -MT -I..\..\..\..\ jgrep.cpp main.cpp /link /LIBPATH:..\..\build\vc6-stlport user32.lib

View File

@ -4,7 +4,8 @@
#
jgrep.exe: main.cpp jgrep.cpp jgrep.h
cl -GX -GR /Oityb1 /GF /Gy -I..\..\..\..\ jgrep.cpp main.cpp /link /LIBPATH:..\..\lib\vc6 user32.lib
cl -GX -GR /Oityb1 /GF /Gy -I..\..\..\..\ jgrep.cpp main.cpp /link /LIBPATH:..\..\build\vc6 user32.lib

View File

@ -1,3 +1,24 @@
/*
*
* 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>

View File

@ -15,7 +15,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE snip3.cpp
* FILE regex_grep_example_1.cpp
* VERSION 3.00
* DESCRIPTION: regex_grep example 1: searches a cpp file for class definitions.
*/

View File

@ -15,7 +15,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE snip5.cpp
* 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.

View File

@ -15,9 +15,9 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE snip6.cpp
* FILE regex_grep_example_3.cpp
* VERSION 3.00
* DESCRIPTION: regex_grep example 2: searches a cpp file for class definitions,
* DESCRIPTION: regex_grep example 3: searches a cpp file for class definitions,
* using a bound member function callback.
*/

View File

@ -15,9 +15,9 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE snip7.cpp
* FILE regex_grep_example_4.cpp
* VERSION 3.00
* DESCRIPTION: regex_grep example 2: searches a cpp file for class definitions,
* DESCRIPTION: regex_grep example 4: searches a cpp file for class definitions,
* using a C++ Builder closure as a callback.
*/

View File

@ -15,7 +15,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE snip1.cpp
* FILE regex_match_example.cpp
* VERSION 3.00
* DESCRIPTION: ftp based regex_match example.
*/

View File

@ -15,7 +15,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE snip4.cpp
* FILE regex_merge_example.cpp
* VERSION 3.00
* DESCRIPTION: regex_merge example:
* converts a C++ file to syntax highlighted HTML.

View File

@ -15,7 +15,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE snip2.cpp
* FILE regex_search_example.cpp
* VERSION 3.00
* DESCRIPTION: regex_search example: searches a cpp file for class definitions.
*/

View File

@ -15,7 +15,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE snip8.cpp
* FILE regex_split_example_1.cpp
* VERSION 3.00
* DESCRIPTION: regex_split example: split a string into tokens.
*/

View File

@ -15,7 +15,7 @@
/*
* LOCATION: see http://www.boost.org for most recent version.
* FILE snip9.cpp
* FILE regex_split_example_2.cpp
* VERSION 3.00
* DESCRIPTION: regex_split example: spit out linked URL's.
*/

View File

@ -13,7 +13,7 @@ BCROOT=$(MAKEDIR)\..
BCC32 = $(BCROOT)\bin\Bcc32.exe
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
COMPOPTS= -O2 -tWC -tWM- -D_NO_VCL; -I../../../../; -L..\..\lib\bcb5
COMPOPTS= -O2 -tWC -tWM- -D_NO_VCL; -I../../../../; -L..\..\build\bcb5
timer.exe : regex_timer.cpp
@ -40,5 +40,6 @@ timer.exe : regex_timer.cpp

View File

@ -13,7 +13,7 @@ BCROOT=$(MAKEDIR)\..
BCC32 = $(BCROOT)\bin\Bcc32.exe
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
COMPOPTS= -O2 -tWC -tWM- -D_NO_VCL; -I../../../../; -L..\..\lib\bcb4
COMPOPTS= -O2 -tWC -tWM- -D_NO_VCL; -I../../../../; -L..\..\build\bcb4
timer.exe : regex_timer.cpp
@ -40,5 +40,6 @@ timer.exe : regex_timer.cpp

View File

@ -13,7 +13,7 @@ BCROOT=$(MAKEDIR)\..
BCC32 = $(BCROOT)\bin\Bcc32.exe
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
COMPOPTS= -O2 -tWC -tWM- -D_NO_VCL; -I../../../../; -L..\..\lib\bcb5
COMPOPTS= -O2 -tWC -tWM- -D_NO_VCL; -I../../../../; -L..\..\build\bcb5
timer.exe : regex_timer.cpp
@ -40,5 +40,6 @@ timer.exe : regex_timer.cpp

View File

@ -6,10 +6,11 @@
CXX= $(INCLUDES) -I../../../../ -I./ $(CXXFLAGS)
timer : regex_timer.cpp
g++ $(CXX) -O2 -o timer regex_timer.cpp -L../../lib/gcc $(LDFLAGS) -lboost_regex $(LIBS)
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../../lib/gcc $(LDFLAGS) -lboost_regex_debug $(LIBS)
g++ $(CXX) -g -o timer regex_timer.cpp -L../../build/gcc $(LDFLAGS) -lboost_regex_debug $(LIBS)

View File

@ -7,10 +7,10 @@ LIBS=@LIBS@
EXE=@ac_exe_ext@
OBJ=@ac_obj_ext@
LIBDEP=../../lib/libboost_regex.a ../../../../boost/re_detail/regex_options.hpp ../../../../boost/re_detail/regex_config.hpp
LIBDEP=../../build/libboost_regex.a ../../../../boost/re_detail/regex_options.hpp ../../../../boost/re_detail/regex_config.hpp
regex_timer$(EXE) : regex_timer$(OBJ)
$(CXX) -o timer$(EXE) regex_timer$(OBJ) -L../../lib -lboost_regex $(LIBS)
$(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
@ -36,3 +36,4 @@ timer$(OBJ) : ../../../timer/timer.cpp $(LIBDEP)

View File

@ -3,7 +3,7 @@
#
CXX=cl
CXXFLAGS=/Oityb1 /GF /Gy -MT -GX -DSTRICT -I../../../../ -I./
LIBS=/link /LIBPATH:..\..\lib\vc6-stlport kernel32.lib user32.lib
LIBS=/link /LIBPATH:..\..\build\vc6-stlport kernel32.lib user32.lib
EXE=.exe
OBJ=.obj
@ -30,3 +30,4 @@ timer$(OBJ) : ../../../timer/timer.cpp $(LIBDEP)

View File

@ -3,7 +3,7 @@
#
CXX=cl
CXXFLAGS=/Oityb1 /GF /Gy -GX -DSTRICT -I../../../../ -I./
LIBS=/link /LIBPATH:..\..\lib\vc6 kernel32.lib user32.lib
LIBS=/link /LIBPATH:..\..\build\vc6 kernel32.lib user32.lib
EXE=.exe
OBJ=.obj
@ -29,3 +29,4 @@ timer$(OBJ) : ../../../timer/timer.cpp $(LIBDEP)

View File

@ -90,35 +90,35 @@ It is provided &quot;as is&quot; without express or implied warranty.</i></pre>
notes</a></li>
<li><a href="appendix.htm#threads">Thread safety</a></li>
<li><a href="appendix.htm#localisation">Localization</a></li>
<li><a href="appendix.htm#demos">Demo Applications</a>
<li><a href="appendix.htm#demos">Example Applications</a>
<ul>
<li><a href="demo/snippets/snip1.cpp">snip1.cpp</a>:
<li><a href="example/snippets/regex_match_example.cpp">regex_match_example.cpp</a>:
ftp based regex_match example.</li>
<li><a href="demo/snippets/snip2.cpp">snip2.cpp</a>:
<li><a href="example/snippets/regex_search_example.cpp">regex_search_example.cpp</a>:
regex_search example: searches a cpp file
for class definitions.</li>
<li><a href="demo/snippets/snip3.cpp">snip3.cpp</a>:
<li><a href="example/snippets/regex_grep_example_1.cpp">regex_grep_example_1.cpp</a>:
regex_grep example 1: searches a cpp file
for class definitions.</li>
<li><a href="demo/snippets/snip4.cpp">snip4.cpp</a>:
<li><a href="example/snippets/regex_merge_example.cpp">regex_merge_example.cpp</a>:
regex_merge example: converts a C++ file
to syntax highlighted HTML.</li>
<li><a href="demo/snippets/snip5.cpp">snip5.cpp</a>:
<li><a href="example/snippets/regex_grep_example_2.cpp">regex_grep_example_2.cpp</a>:
regex_grep example 2: searches a cpp file
for class definitions, using a global
callback function. </li>
<li><a href="demo/snippets/snip6.cpp">snip6.cpp</a>:
<li><a href="example/snippets/regex_grep_example_3.cpp">regex_grep_example_3.cpp</a>:
regex_grep example 2: searches a cpp file
for class definitions, using a bound
member function callback.</li>
<li><a href="demo/snippets/snip7.cpp">snip7.cpp</a>:
<li><a href="example/snippets/regex_grep_example_4.cpp">regex_grep_example_4.cpp</a>:
regex_grep example 2: searches a cpp file
for class definitions, using a C++
Builder closure as a callback.</li>
<li><a href="demo/snippets/snip8.cpp">snip8.cpp</a>:
<li><a href="example/snippets/regex_split_example_1.cpp">regex_split_example_1.cpp</a>:
regex_split example: split a string into
tokens.</li>
<li><a href="demo/snippets/snip9.cpp">snip9.cpp</a>:
<li><a href="example/snippets/regex_split_example_2.cpp">regex_split_example_2.cpp</a>:
regex_split example: spit out linked
URL's.</li>
</ul>

View File

@ -370,7 +370,7 @@ single-thread static builds). <br>
<p><b>GCC(2.95)</b> </p>
<p>There is a conservative makefile for the g++ compiler. From
the command prompt change to the &lt;boost&gt;/libs/regex/lib
the command prompt change to the &lt;boost&gt;/libs/regex/build
directory and type: </p>
<p>make -fgcc.mak </p>
@ -379,7 +379,7 @@ directory and type: </p>
containing release and debug versions of the library (libboost_regex.a
and libboost_regex_debug.a). When you build projects that use
regex++, you will need to add the boost install directory to your
list of include paths and add &lt;boost&gt;/libs/gcc/libboost_regex.a
list of include paths and add &lt;boost&gt;/libs/regex/build/gcc/libboost_regex.a
to your list of library files. </p>
<p>There is also a makefile to build the library as a shared
@ -426,7 +426,7 @@ make</tt></pre>
<p>Note that the configure generated makefiles produce only a
static library, if you would prefer to build a shared library,
then there is a generic.mak makefile in the &lt;boost&gt;/libs/regex/lib
then there is a generic.mak makefile in the &lt;boost&gt;/libs/regex/build
directory. To use this you will need to set up a number of
environment variables first (see the makefile for more details).
Finally if you use one of the following compilers: Kai C++, SGI

View File

@ -1,23 +1,23 @@
ALL_DEP=@ac_all_dep@
base: ./lib/libboost_regex.a
base: ./build/libboost_regex.a
./lib/libboost_regex.a: $(ALL_DEP)
./build/libboost_regex.a: $(ALL_DEP)
sh dmi.sh lib
jgrep : base
sh dmi.sh demo/jgrep
sh dmi.sh example/jgrep
test : base
sh dmi.sh demo/regress
sh dmi.sh test/regress
regress : test
timer : base
sh dmi.sh demo/timer
sh dmi.sh example/timer
install : base
echo no install option available

View File

@ -302,7 +302,7 @@ EOF
function gcc_gen()
{
out="lib/gcc.mak"
out="build/gcc.mak"
tout="temp"
iout="temp_install"
subdir="gcc"
@ -371,7 +371,7 @@ EOF
function gcc_gen_shared()
{
out="lib/gcc-shared.mak"
out="build/gcc-shared.mak"
tout="temp"
iout="temp_install"
subdir="gcc"
@ -696,7 +696,7 @@ EOF
function gen_gen()
{
out="lib/generic.mak"
out="build/generic.mak"
tout="temp"
iout="temp_install"
subdir="\$(DIRNAME)"
@ -969,13 +969,13 @@ done
#
# generate vc6 makefile:
out="lib/vc6.mak"
out="build/vc6.mak"
subdir="vc6"
vc6_gen
#
# generate vc6-stlport makefile:
is_stlport="yes"
out="lib/vc6-stlport.mak"
out="build/vc6-stlport.mak"
no_single="yes"
subdir="vc6-stlport"
vc6_gen
@ -986,18 +986,18 @@ gcc_shared="yes"
gcc_gen_shared
#
# generate C++ Builder 4 files:
out="lib/bcb4.mak"
out="build/bcb4.mak"
subdir="bcb4"
bcb_gen
#
# generate C++ Builder 5 files:
out="lib/bcb5.mak"
out="build/bcb5.mak"
subdir="bcb5"
bcb_gen
#
# generate C++ Builder 5 command line tools files:
use_vcl="no"
out="lib/bc55.mak"
out="build/bc55.mak"
subdir="bcb5"
bcb_gen
#
@ -1005,7 +1005,7 @@ bcb_gen
gen_gen
#
# generate Sun 6.1 makefile:
out="lib/sunpro.mak"
out="build/sunpro.mak"
subdir="sunpro"
sun_gen

View File

@ -1064,7 +1064,7 @@ template &lt;class charT&gt; class regex_traits : public base_type { /*detailts*
</TR>
</TABLE>
<FONT SIZE=2><P>regex_match returns false if no match occurs or true if it does. A match only occurs if it starts at <B>first</B> and finishes at <B>last</B>. Example: the following </FONT><A HREF="demo/snippets/snip1.cpp"><FONT SIZE=2>example</FONT></A><FONT SIZE=2> processes an ftp response: </P>
<FONT SIZE=2><P>regex_match returns false if no match occurs or true if it does. A match only occurs if it starts at <B>first</B> and finishes at <B>last</B>. Example: the following </FONT><A HREF="example/snippets/regex_match_example.cpp"><FONT SIZE=2>example</FONT></A><FONT SIZE=2> processes an ftp response: </P>
</FONT><FONT COLOR="#008000"><PRE>#include &lt;stdlib.h&gt;
#include &lt;boost/regex.hpp&gt;
#include &lt;string&gt;
@ -1299,7 +1299,7 @@ regex expression(<FONT COLOR="#000080">"([0-9]+)(\\-| |$)(.*)"</FONT>);
<FONT SIZE=2><P><BR>
&nbsp; </P>
<P>Example: the following </FONT><A HREF="demo/snippets/snip2.cpp"><FONT SIZE=2>example</FONT></A><FONT SIZE=2>, takes the contents of a file in the form of a string, and searches for all the C++ class declarations in the file. The code will work regardless of the way that std::string is implemented, for example it could easily be modified to work with the SGI rope class, which uses a non-contiguous storage strategy. </P>
<P>Example: the following </FONT><A HREF="example/snippets/regex_search_example.cpp"><FONT SIZE=2>example</FONT></A><FONT SIZE=2>, takes the contents of a file in the form of a string, and searches for all the C++ class declarations in the file. The code will work regardless of the way that std::string is implemented, for example it could easily be modified to work with the SGI rope class, which uses a non-contiguous storage strategy. </P>
</FONT><FONT COLOR="#008000"><PRE>#include &lt;string&gt;
#include &lt;map&gt;
#include &lt;boost/regex.hpp&gt;
@ -1415,7 +1415,7 @@ void</B> IndexClasses(map_type&amp; m, <B>const</B> std::string&amp; file)
};</PRE>
<FONT SIZE=2><P>For example the regular expression "a*b" would find one match in the string "aaaaab" and two in the string "aaabb". </P>
<P>Remember this algorithm can be used for a lot more than implementing a version of grep, the predicate can be and do anything that you want, grep utilities would output the results to the screen, another program could index a file based on a regular expression and store a set of bookmarks in a list, or a text file conversion utility would output to file. The results of one regex_grep can even be chained into another regex_grep to create recursive parsers. </P>
</FONT><P><A HREF="demo/snippets/snip3.cpp"><FONT SIZE=2>Example</FONT></A><FONT SIZE=2>: convert the example from <I>regex_search</I> to use <I>regex_grep</I> instead: </P>
</FONT><P><A HREF="example/snippets/regex_grep_example_1.cpp"><FONT SIZE=2>Example</FONT></A><FONT SIZE=2>: convert the example from <I>regex_search</I> to use <I>regex_grep</I> instead: </P>
</FONT><FONT COLOR="#008000"><PRE>#include &lt;string&gt;
#include &lt;map&gt;
#include &lt;boost/regex.hpp&gt;
@ -1456,7 +1456,7 @@ void</B> IndexClasses(map_type&amp; m, <B>const</B> std::string&amp; file)
&nbsp;&nbsp; end = file.end();
&nbsp;&nbsp; regex_grep(IndexClassesPred(m, start), start, end, expression);
} </PRE>
<P><A HREF="demo/snippets/snip5.cpp"><FONT SIZE=2>Example</FONT></A><FONT SIZE=2>: Use regex_grep to call a global callback function: </P>
<P><A HREF="example/snippets/regex_grep_example_2.cpp"><FONT SIZE=2>Example</FONT></A><FONT SIZE=2>: Use regex_grep to call a global callback function: </P>
</FONT><FONT COLOR="#008000"><PRE>#include &lt;string&gt;
#include &lt;map&gt;
#include &lt;boost/regex.hpp&gt;
@ -1493,7 +1493,7 @@ void</B> IndexClasses(<B>const</B> std::string&amp; file)
&nbsp;&nbsp; regex_grep(grep_callback, start, end, expression, match_default);
}
&nbsp; </PRE>
<P><A HREF="demo/snippets/snip6.cpp"><FONT SIZE=2>Example</FONT></A><FONT SIZE=2>: use regex_grep to call a class member function, use the standard library adapters <I>std::mem_fun</I> and <I>std::bind1st</I> to convert the member function into a predicate: </P>
<P><A HREF="example/snippets/regex_grep_example_3.cpp"><FONT SIZE=2>Example</FONT></A><FONT SIZE=2>: use regex_grep to call a class member function, use the standard library adapters <I>std::mem_fun</I> and <I>std::bind1st</I> to convert the member function into a predicate: </P>
</FONT><FONT COLOR="#008000"><PRE>#include &lt;string&gt;
#include &lt;map&gt;
#include &lt;boost/regex.hpp&gt;
@ -1546,7 +1546,7 @@ bool</B> class_index::grep_callback(boost::match_results&lt;std::string::const_i
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expression);
}
&nbsp; </PRE>
<P><A HREF="demo/snippets/snip7.cpp"><FONT SIZE=2>Finally</FONT></A><FONT SIZE=2>, C++ Builder users can use C++ Builder's closure type as a callback argument: </P>
<P><A HREF="example/snippets/regex_grep_example_4.cpp"><FONT SIZE=2>Finally</FONT></A><FONT SIZE=2>, C++ Builder users can use C++ Builder's closure type as a callback argument: </P>
</FONT><FONT COLOR="#008000"><PRE>#include &lt;string&gt;
#include &lt;map&gt;
#include &lt;boost/regex.hpp&gt;
@ -1802,7 +1802,7 @@ std::basic_string&lt;charT&gt; regex_merge(<B>const</B> std::basic_string&lt;cha
</TR>
</TABLE>
<FONT SIZE=2><P>Example: the following </FONT><A HREF="demo/snippets/snip4.cpp"><FONT SIZE=2>example</FONT></A><FONT SIZE=2> takes C/C++ source code as input, and outputs syntax highlighted HTML code. </P>
<FONT SIZE=2><P>Example: the following </FONT><A HREF="example/snippets/regex_merge_example.cpp"><FONT SIZE=2>example</FONT></A><FONT SIZE=2> takes C/C++ source code as input, and outputs syntax highlighted HTML code. </P>
</FONT><PRE>
<FONT COLOR="#008080">#include &lt;fstream&gt;
#include &lt;sstream&gt;
@ -1924,12 +1924,12 @@ std::size_t regex_split(OutputIterator out,&nbsp;
std::size_t regex_split(OutputIterator out,
std::basic_string&lt;charT, Traits1, Alloc1&gt;&amp; s);</PRE>
<FONT SIZE=2><P>Each version takes an output-iterator for output, and a string for input. If the expression contains no marked sub-expressions, then the algorithm writes one string onto the output-iterator for each section of input that does not match the expression. If the expression does contain marked sub-expressions, then each time a match is found, one string for each marked sub-expression will be written to the output-iterator. No more than <I>max_split </I>strings will be written to the output-iterator. Before returning, all the input processed will be deleted from the string <I>s</I> (if <I>max_split </I>is not reached then all of <I>s</I> will be deleted). Returns the number of strings written to the output-iterator. If the parameter <I>max_split</I> is not specified then it defaults to UINT_MAX. If no expression is specified, then it defaults to "\s+", and splitting occurs on whitespace. </P>
</FONT><P><A HREF="demo/snippets/snip8.cpp"><FONT SIZE=2>Example</FONT></A><FONT SIZE=2>: the following function will split the input string into a series of tokens, and remove each token from the string <I>s</I>: </P>
</FONT><P><A HREF="example/snippets/regex_split_example_1.cpp"><FONT SIZE=2>Example</FONT></A><FONT SIZE=2>: the following function will split the input string into a series of tokens, and remove each token from the string <I>s</I>: </P>
</FONT><B><PRE>unsigned</B> tokenise(std::list&lt;std::string&gt;&amp; l, std::string&amp; s)
{
<B>&nbsp;&nbsp; return</B> boost::regex_split(std::back_inserter(l), s);
}</PRE>
<P><A HREF="demo/snippets/snip9.cpp"><FONT SIZE=2>Example</FONT></A><FONT SIZE=2>: the following short program will extract all of the URL's from a html file, and print them out to <I>cout</I>: </P>
<P><A HREF="example/snippets/regex_split_example_2.cpp"><FONT SIZE=2>Example</FONT></A><FONT SIZE=2>: the following short program will extract all of the URL's from a html file, and print them out to <I>cout</I>: </P>
</FONT><FONT COLOR="#008000"><PRE>#include &lt;list&gt;
#include &lt;fstream&gt;
#include &lt;iostream&gt;
@ -2028,7 +2028,7 @@ boost::regex e(<FONT COLOR="#000080">"&lt;\\s*A\\s+[^&gt;]*href\\s*=\\s*\"([^\"]
</TR>
</TABLE>
<P>The following <A HREF="demo/snippets/partial_regex_match.cpp">example</A> tests to see whether the text could be a valid credit card number, as the user presses a key, the character entered would be added to the string being built up, and passed to <CODE>is_possible_card_number</CODE>. If this returns true then the text could be a valid card number, so the user interface's OK button would be enabled. If it returns false, then this is not yet a valid card number, but could be with more input, so the user interface would disable the OK button. Finally, if the procedure throws an exception the input could never become a valid number, and the inputted character must be discarded, and a suitable error indication displayed to the user.</P>
<P>The following <A HREF="example/snippets/partial_regex_match.cpp">example</A> tests to see whether the text could be a valid credit card number, as the user presses a key, the character entered would be added to the string being built up, and passed to <CODE>is_possible_card_number</CODE>. If this returns true then the text could be a valid card number, so the user interface's OK button would be enabled. If it returns false, then this is not yet a valid card number, but could be with more input, so the user interface would disable the OK button. Finally, if the procedure throws an exception the input could never become a valid number, and the inputted character must be discarded, and a suitable error indication displayed to the user.</P>
<PRE>#include &lt;string&gt;
#include &lt;iostream&gt;
#include &lt;boost/regex.hpp&gt;
@ -2055,7 +2055,7 @@ bool is_possible_card_number(const std::string&amp; input)
// what we have so far is only a partial match...
return false;
}</PRE>
<P>In the following <A HREF="demo/snippets/partial_regex_match.cpp">example</A>, text input is taken from a stream containing an unknown amount of text; this example simply counts the number of html tags encountered in the stream. The text is loaded into a buffer and searched a part at a time, if a partial match was encountered, then the partial match gets searched a second time as the start of the next batch of text:</P>
<P>In the following <A HREF="example/snippets/partial_regex_match.cpp">example</A>, text input is taken from a stream containing an unknown amount of text; this example simply counts the number of html tags encountered in the stream. The text is loaded into a buffer and searched a part at a time, if a partial match was encountered, then the partial match gets searched a second time as the start of the next batch of text:</P>
<PRE>#include &lt;iostream&gt;
#include &lt;fstream&gt;
#include &lt;sstream&gt;

View File

@ -14,7 +14,7 @@ TLINK32 = $(BCROOT)\bin\ILink32.exe
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
LINKOPTS= -ap -Tpe -x
CFLAGS= -O2 -tWC -DSTRICT; -w-inl -w-aus -w-csu -w-eff -w-rch -I$(BCROOT)\include;..\..\..\..\; -L..\..\lib\bcb5
CFLAGS= -O2 -tWC -DSTRICT; -w-inl -w-aus -w-csu -w-eff -w-rch -I$(BCROOT)\include;..\..\..\..\; -L..\..\build\bcb5
all :: r1.exe r2.exe r3.exe r4.exe r5.exe r6.exe r1m.exe r2m.exe r3m.exe r4m.exe r5m.exe r6m.exe r1l.exe r2l.exe r3l.exe r4l.exe r5l.exe r6l.exe r1lm.exe r2lm.exe r3lm.exe r4lm.exe r5lm.exe r6lm.exe
echo testing static single threaded version....
@ -132,3 +132,4 @@ r6lm.exe : tests.cpp parse.cpp regress.cpp

View File

@ -14,7 +14,7 @@ TLINK32 = $(BCROOT)\bin\ILink32.exe
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
LINKOPTS= -ap -Tpe -x
CFLAGS= -O2 -tWC -DSTRICT; -w-inl -w-aus -w-csu -w-eff -w-rch -I$(BCROOT)\include;..\..\..\..\; -L..\..\lib\bcb4
CFLAGS= -O2 -tWC -DSTRICT; -w-inl -w-aus -w-csu -w-eff -w-rch -I$(BCROOT)\include;..\..\..\..\; -L..\..\build\bcb4
all :: r1.exe r2.exe r3.exe r4.exe r5.exe r6.exe r1m.exe r2m.exe r3m.exe r4m.exe r5m.exe r6m.exe r1v.exe r2v.exe r3v.exe r4v.exe r5v.exe r6v.exe r1l.exe r2l.exe r3l.exe r4l.exe r5l.exe r6l.exe r1lm.exe r2lm.exe r3lm.exe r4lm.exe r5lm.exe r6lm.exe r1lv.exe r2lv.exe r3lv.exe r4lv.exe r5lv.exe r6lv.exe
echo testing static single threaded version....
@ -184,3 +184,4 @@ r6lv.exe : tests.cpp parse.cpp regress.cpp

View File

@ -14,7 +14,7 @@ TLINK32 = $(BCROOT)\bin\ILink32.exe
IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
LINKOPTS= -ap -Tpe -x
CFLAGS= -O2 -tWC -DSTRICT; -w-inl -w-aus -w-csu -w-eff -w-rch -I$(BCROOT)\include;..\..\..\..\; -L..\..\lib\bcb5
CFLAGS= -O2 -tWC -DSTRICT; -w-inl -w-aus -w-csu -w-eff -w-rch -I$(BCROOT)\include;..\..\..\..\; -L..\..\build\bcb5
all :: r1.exe r2.exe r3.exe r4.exe r5.exe r6.exe r1m.exe r2m.exe r3m.exe r4m.exe r5m.exe r6m.exe r1v.exe r2v.exe r3v.exe r4v.exe r5v.exe r6v.exe r1l.exe r2l.exe r3l.exe r4l.exe r5l.exe r6l.exe r1lm.exe r2lm.exe r3lm.exe r4lm.exe r5lm.exe r6lm.exe r1lv.exe r2lv.exe r3lv.exe r4lv.exe r5lv.exe r6lv.exe
echo testing static single threaded version....
@ -184,3 +184,4 @@ r6lv.exe : tests.cpp parse.cpp regress.cpp

View File

@ -3,7 +3,7 @@
#
# g++ 2.95 and greater
#
CXX= g++ $(INCLUDES) -pedantic -Wall -I../../../../ -I./ $(CXXFLAGS) -L../../lib/gcc $(LDFLAGS)
CXX= g++ $(INCLUDES) -pedantic -Wall -I../../../../ -I./ $(CXXFLAGS) -L../../build/gcc $(LDFLAGS)
total : r2
./r2 tests.txt
@ -51,5 +51,6 @@ debug : tests.cpp parse.cpp regress.cpp

View File

@ -3,13 +3,13 @@
#
CXX=@CXX@
CXXFLAGS=@CXXFLAGS@ -I../../../../
LIBS=@LIBS@ -L../../lib -lboost_regex
LIBS=@LIBS@ -L../../build -lboost_regex
EXE=@ac_exe_ext@
OBJ=@ac_obj_ext@
total : @ac_regress@
LIBDEP=../../lib/libboost_regex.a ../../../../boost/re_detail/regex_options.hpp ../../../../boost/re_detail/regex_config.hpp
LIBDEP=../../build/libboost_regex.a ../../../../boost/re_detail/regex_options.hpp ../../../../boost/re_detail/regex_config.hpp
r1$(EXE) :: tests.cpp parse.cpp regress.cpp
$(CXX) -o r1$(EXE) $(CXXFLAGS) tests.cpp parse.cpp regress.cpp $(LIBS)
@ -42,5 +42,6 @@ r2$(EXE) :: tests.cpp parse.cpp regress.cpp

View File

@ -4,7 +4,7 @@
#
# Sun Workshop 6 and greater:
#
CXX= CC $(INCLUDES) -I../../../../ -I./ $(CXXFLAGS) -L../../lib/sunpro $(LDFLAGS)
CXX= CC $(INCLUDES) -I../../../../ -I./ $(CXXFLAGS) -L../../build/sunpro $(LDFLAGS)
total : r rm r/regress rm/regress rs rms rs/regress rms/regress rw rmw rw/regress rmw/regress rsw rmsw rsw/regress rmsw/regress
echo testsing narrow character versions:
@ -126,5 +126,6 @@ clean:

View File

@ -20,7 +20,7 @@ XLFLAGS=
CFLAGS= $(INCLUDES) /Oityb1 /GF /Gy -GX -GR -I..\..\..\..\ $(CXXFLAGS)
LFLAGS= -link /LIBPATH:..\..\lib\vc6-stlport user32.lib $(XLFLAGS)
LFLAGS= -link /LIBPATH:..\..\build\vc6-stlport user32.lib $(XLFLAGS)
all :: r1m.exe r2m.exe r3m.exe r4m.exe r5m.exe r6m.exe r1l.exe r2l.exe r3l.exe r4l.exe r5l.exe r6l.exe r1ls.exe r2ls.exe r3ls.exe r4ls.exe r5ls.exe r6ls.exe r1md.exe r2md.exe r3md.exe r4md.exe r5md.exe r6md.exe r1lmd.exe r2lmd.exe r3lmd.exe r4lmd.exe r5lmd.exe r6lmd.exe r1mdd.exe r2mdd.exe r3mdd.exe r4mdd.exe r5mdd.exe r6mdd.exe r1lmdd.exe r2lmdd.exe r3lmdd.exe
echo testing static multi-threaded version....
@ -204,3 +204,4 @@ r6mdd.exe : tests.cpp parse.cpp regress.cpp

View File

@ -18,7 +18,7 @@ XLFLAGS=
CFLAGS= $(INCLUDES) /Oityb1 /GF /Gy -GX -GR -I..\..\..\..\ $(CXXFLAGS)
LFLAGS= -link /LIBPATH:..\..\lib\vc6 user32.lib $(XLFLAGS)
LFLAGS= -link /LIBPATH:..\..\build\vc6 user32.lib $(XLFLAGS)
all :: r1.exe r2.exe r3.exe r4.exe r5.exe r6.exe r1m.exe r2m.exe r3m.exe r4m.exe r5m.exe r6m.exe r1l.exe r2l.exe r3l.exe r4l.exe r5l.exe r6l.exe r1ls.exe r2ls.exe r3ls.exe r4ls.exe r5ls.exe r6ls.exe r1d.exe r2d.exe r3d.exe r4d.exe r5d.exe r6d.exe r1md.exe r2md.exe r3md.exe r4md.exe r5md.exe r6md.exe r1lmd.exe r2lmd.exe r3lmd.exe r4lmd.exe r5lmd.exe r6lmd.exe
echo testing static single threaded version....
@ -219,3 +219,4 @@ r6lmd.exe : tests.cpp parse.cpp regress.cpp