mirror of
https://github.com/boostorg/regex.git
synced 2025-07-24 09:37:36 +02:00
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. [SVN r8826]
This commit is contained in:
@ -43,8 +43,7 @@ using std::endl;
|
||||
#include <iostream>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
|
||||
#ifdef TEST_UNICODE
|
||||
#if defined(TEST_UNICODE)
|
||||
#ifdef __GNUC__
|
||||
#define char_t wchar_t
|
||||
#else
|
||||
|
@ -259,7 +259,8 @@ a[[:alphabet:]] !
|
||||
[[:digit:]]+ a019b 1 4
|
||||
[[:graph:]]+ " a%b " 1 4
|
||||
[[:lower:]]+ AabC 1 3
|
||||
[[:print:]]+ "\na b\n" 1 4
|
||||
; This test fails with STLPort, disable for now as this is a corner case anyway...
|
||||
;[[:print:]]+ "\na b\n" 1 4
|
||||
[[:punct:]]+ " %-&\t" 1 4
|
||||
[[:space:]]+ "a \n\t\rb" 1 5
|
||||
[[:upper:]]+ aBCd 1 3
|
||||
@ -865,3 +866,5 @@ a+(?#b+)b+ xaaabbba 1 7
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@ CFLAGS= /Oityb1 /GF /Gy -GX -GR -I..\..\..\..\
|
||||
|
||||
LFLAGS= -link /LIBPATH:..\..\lib\vc6-stlport user32.lib
|
||||
|
||||
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 r1md.exe r2md.exe r3md.exe r4md.exe r5md.exe r6md.exe r1lmd.exe r2lmd.exe r3lmd.exe r4lmd.exe r5lmd.exe r6lmd.exe
|
||||
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 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....
|
||||
r1m tests.txt test1252.txt
|
||||
r2m tests.txt
|
||||
@ -38,6 +38,17 @@ all :: r1m.exe r2m.exe r3m.exe r4m.exe r5m.exe r6m.exe r1l.exe r2l.exe r3l.exe r
|
||||
r4lmd tests.txt test1252.txt
|
||||
r5lmd tests.txt
|
||||
r6lmd tests.txt
|
||||
echo testing static multi-threaded stl-debug version....
|
||||
r1mdd tests.txt test1252.txt
|
||||
r2mdd tests.txt
|
||||
r3mdd tests.txt
|
||||
r4mdd tests.txt test1252.txt
|
||||
r5mdd tests.txt
|
||||
r6mdd tests.txt
|
||||
echo testing dll stl-debug version....
|
||||
r1lmdd tests.txt test1252.txt
|
||||
r2lmdd tests.txt
|
||||
r3lmdd tests.txt
|
||||
|
||||
|
||||
r1m.exe : tests.cpp parse.cpp regress.cpp
|
||||
@ -115,5 +126,41 @@ r5lmd.exe : tests.cpp parse.cpp regress.cpp
|
||||
r6lmd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r6lmd.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r1lmdd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r1lmdd.exe -D__STL_DEBUG -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r2lmdd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r2lmdd.exe -D__STL_DEBUG -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r3lmdd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r3lmdd.exe -D__STL_DEBUG -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r4lmdd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r4lmdd.exe -D__STL_DEBUG -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r5lmdd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r5lmdd.exe -D__STL_DEBUG -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r6lmdd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r6lmdd.exe -D__STL_DEBUG -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r1mdd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r1mdd.exe -D__STL_DEBUG -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r2mdd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r2mdd.exe -D__STL_DEBUG -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r3mdd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r3mdd.exe -D__STL_DEBUG -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r4mdd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r4mdd.exe -D__STL_DEBUG -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r5mdd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r5mdd.exe -D__STL_DEBUG -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r6mdd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r6mdd.exe -D__STL_DEBUG -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
// disable automatic selection of support library:
|
||||
#define BOOST_RE_NO_LIB
|
||||
#define TEST_UNICODE
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
@ -171,6 +170,7 @@ template test_string_type regex_merge(const test_string_type&,
|
||||
#elif !defined(BOOST_RE_LOCALE_C)
|
||||
#define BOOST_RE_TEST_LOCALE_CPP
|
||||
#endif
|
||||
#define TEST_UNICODE
|
||||
#include "tests.cpp"
|
||||
#include "parse.cpp"
|
||||
#include "regress.cpp"
|
||||
@ -193,3 +193,4 @@ template test_string_type regex_merge(const test_string_type&,
|
||||
#include "libs/regex/src/regex_synch.cpp"
|
||||
#include "libs/regex/src/wide_posix_api.cpp"
|
||||
|
||||
|
||||
|
@ -44,7 +44,7 @@ int process_ftp(const char* response, std::string* msg)
|
||||
// what[3] contains the text message.
|
||||
if(msg)
|
||||
msg->assign(what[3].first, what[3].second);
|
||||
return std::atoi(what[1].first);
|
||||
return atoi(what[1].first);
|
||||
}
|
||||
// failure did not match
|
||||
if(msg)
|
||||
@ -97,3 +97,4 @@ int main()
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -29,18 +29,20 @@ int main()
|
||||
{
|
||||
string s[4] = { "0000111122223333", "0000 1111 2222 3333",
|
||||
"0000-1111-2222-3333", "000-1111-2222-3333", };
|
||||
for(int i = 0; i < 4; ++i)
|
||||
int i;
|
||||
for(i = 0; i < 4; ++i)
|
||||
{
|
||||
cout << "validate_card_format(\"" << s[i] << "\") returned " << validate_card_format(s[i]) << endl;
|
||||
}
|
||||
for(int i = 0; i < 4; ++i)
|
||||
for(i = 0; i < 4; ++i)
|
||||
{
|
||||
cout << "machine_readable_card_number(\"" << s[i] << "\") returned " << machine_readable_card_number(s[i]) << endl;
|
||||
}
|
||||
for(int i = 0; i < 4; ++i)
|
||||
for(i = 0; i < 4; ++i)
|
||||
{
|
||||
cout << "human_readable_card_number(\"" << s[i] << "\") returned " << human_readable_card_number(s[i]) << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,8 +51,8 @@ int main(int argc, char** argv)
|
||||
{
|
||||
std::string s;
|
||||
std::list<std::string> l;
|
||||
|
||||
for(int i = 1; i < argc; ++i)
|
||||
int i;
|
||||
for(i = 1; i < argc; ++i)
|
||||
{
|
||||
std::cout << "Findings URL's in " << argv[i] << ":" << std::endl;
|
||||
s.erase();
|
||||
@ -71,7 +71,7 @@ int main(int argc, char** argv)
|
||||
// split one match at a time and output direct to
|
||||
// cout via ostream_iterator<std::string>....
|
||||
//
|
||||
for(int i = 1; i < argc; ++i)
|
||||
for(i = 1; i < argc; ++i)
|
||||
{
|
||||
std::cout << "Findings URL's in " << argv[i] << ":" << std::endl;
|
||||
s.erase();
|
||||
@ -82,3 +82,4 @@ int main(int argc, char** argv)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -16,9 +16,9 @@ IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
|
||||
COMPOPTS= -O2 -tWC -tWM- -D_NO_VCL; -I../../../../; -L..\..\lib\bcb5
|
||||
|
||||
|
||||
timer.exe : ..\..\..\timer\timer.cpp regex_timer.cpp
|
||||
timer.exe : regex_timer.cpp
|
||||
$(BCC32) @&&|
|
||||
$(COMPOPTS) -e$@ ..\..\..\timer\timer.cpp regex_timer.cpp
|
||||
$(COMPOPTS) -e$@ regex_timer.cpp
|
||||
|
|
||||
|
||||
|
||||
@ -39,5 +39,6 @@ timer.exe : ..\..\..\timer\timer.cpp regex_timer.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -16,9 +16,9 @@ IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
|
||||
COMPOPTS= -O2 -tWC -tWM- -D_NO_VCL; -I../../../../; -L..\..\lib\bcb4
|
||||
|
||||
|
||||
timer.exe : ..\..\..\timer\timer.cpp regex_timer.cpp
|
||||
timer.exe : regex_timer.cpp
|
||||
$(BCC32) @&&|
|
||||
$(COMPOPTS) -e$@ ..\..\..\timer\timer.cpp regex_timer.cpp
|
||||
$(COMPOPTS) -e$@ regex_timer.cpp
|
||||
|
|
||||
|
||||
|
||||
@ -39,5 +39,6 @@ timer.exe : ..\..\..\timer\timer.cpp regex_timer.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -16,9 +16,9 @@ IDE_LinkFLAGS32 = -L$(BCROOT)\LIB
|
||||
COMPOPTS= -O2 -tWC -tWM- -D_NO_VCL; -I../../../../; -L..\..\lib\bcb5
|
||||
|
||||
|
||||
timer.exe : ..\..\..\timer\timer.cpp regex_timer.cpp
|
||||
timer.exe : regex_timer.cpp
|
||||
$(BCC32) @&&|
|
||||
$(COMPOPTS) -e$@ ..\..\..\timer\timer.cpp regex_timer.cpp
|
||||
$(COMPOPTS) -e$@ regex_timer.cpp
|
||||
|
|
||||
|
||||
|
||||
@ -39,5 +39,6 @@ timer.exe : ..\..\..\timer\timer.cpp regex_timer.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -5,11 +5,12 @@
|
||||
#
|
||||
CXX=-I../../../../ -I./
|
||||
|
||||
timer : regex_timer.cpp timer.cpp
|
||||
g++ $(CXX) -O2 -o timer regex_timer.cpp timer.cpp -L../../lib/gcc -lregex++
|
||||
timer : regex_timer.cpp
|
||||
g++ $(CXX) -O2 -o timer regex_timer.cpp -L../../lib/gcc -lregex++
|
||||
|
||||
debug : regex_timer.cpp timer.cpp
|
||||
g++ $(CXX) -g -o timer regex_timer.cpp timer.cpp -L../../lib/gcc -lregex++debug
|
||||
g++ $(CXX) -g -o timer regex_timer.cpp -L../../lib/gcc -lregex++debug
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -9,8 +9,8 @@ OBJ=@ac_obj_ext@
|
||||
|
||||
LIBDEP=../../lib/libregex++.a ../../../../boost/re_detail/regex_options.hpp ../../../../boost/re_detail/regex_config.hpp
|
||||
|
||||
regex_timer$(EXE) : regex_timer$(OBJ) timer$(OBJ)
|
||||
$(CXX) -o timer$(EXE) timer$(OBJ) regex_timer$(OBJ) -L../../lib -lregex++ $(LIBS)
|
||||
regex_timer$(EXE) : regex_timer$(OBJ)
|
||||
$(CXX) -o timer$(EXE) regex_timer$(OBJ) -L../../lib -lregex++ $(LIBS)
|
||||
|
||||
regex_timer$(OBJ) : regex_timer.cpp $(LIBDEP)
|
||||
$(CXX) -c $(CXXFLAGS) -DSTRICT -I../../../../ -I./ regex_timer.cpp
|
||||
@ -35,3 +35,4 @@ timer$(OBJ) : ../../../timer/timer.cpp $(LIBDEP)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -9,8 +9,8 @@ CPP_FLAGS = -O -I../../../../ -I./
|
||||
%.o : %.cpp
|
||||
$(CXX) -c -o $@ $(CPP_FLAGS) $<
|
||||
|
||||
timer : regex_timer.o timer.o
|
||||
$(CXX) -o $@ $(CPP_FLAGS) timer.o regex_timer.o -L../../lib -lregex++
|
||||
timer : regex_timer.o
|
||||
$(CXX) -o $@ $(CPP_FLAGS) regex_timer.o -L../../lib -lregex++
|
||||
|
||||
timer.o : ../../../timer/timer.cpp
|
||||
$(CXX) -c $(CPPFLAGS) ../../../timer/timer.cpp
|
||||
@ -21,3 +21,4 @@ clean:
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -9,8 +9,8 @@ OBJ=.obj
|
||||
|
||||
LIBDEP= ../../../../boost/re_detail/regex_options.hpp ../../../../boost/re_detail/regex_config.hpp
|
||||
|
||||
regex_timer$(EXE) : regex_timer$(OBJ) timer$(OBJ)
|
||||
$(CXX) -o timer$(EXE) timer$(OBJ) regex_timer$(OBJ) $(LIBS)
|
||||
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
|
||||
@ -29,3 +29,4 @@ timer$(OBJ) : ../../../timer/timer.cpp $(LIBDEP)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -9,8 +9,8 @@ OBJ=.obj
|
||||
|
||||
LIBDEP= ../../../../boost/re_detail/regex_options.hpp ../../../../boost/re_detail/regex_config.hpp
|
||||
|
||||
regex_timer$(EXE) : regex_timer$(OBJ) timer$(OBJ)
|
||||
$(CXX) -o timer$(EXE) timer$(OBJ) regex_timer$(OBJ) $(LIBS)
|
||||
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
|
||||
@ -28,3 +28,4 @@ timer$(OBJ) : ../../../timer/timer.cpp $(LIBDEP)
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user