forked from boostorg/regex
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b033d8b088 |
@@ -1,96 +0,0 @@
|
||||
* text=auto !eol svneol=native#text/plain
|
||||
*.gitattributes text svneol=native#text/plain
|
||||
|
||||
# Scriptish formats
|
||||
*.bat text svneol=native#text/plain
|
||||
*.bsh text svneol=native#text/x-beanshell
|
||||
*.cgi text svneol=native#text/plain
|
||||
*.cmd text svneol=native#text/plain
|
||||
*.js text svneol=native#text/javascript
|
||||
*.php text svneol=native#text/x-php
|
||||
*.pl text svneol=native#text/x-perl
|
||||
*.pm text svneol=native#text/x-perl
|
||||
*.py text svneol=native#text/x-python
|
||||
*.sh eol=lf svneol=LF#text/x-sh
|
||||
configure eol=lf svneol=LF#text/x-sh
|
||||
|
||||
# Image formats
|
||||
*.bmp binary svneol=unset#image/bmp
|
||||
*.gif binary svneol=unset#image/gif
|
||||
*.ico binary svneol=unset#image/ico
|
||||
*.jpeg binary svneol=unset#image/jpeg
|
||||
*.jpg binary svneol=unset#image/jpeg
|
||||
*.png binary svneol=unset#image/png
|
||||
*.tif binary svneol=unset#image/tiff
|
||||
*.tiff binary svneol=unset#image/tiff
|
||||
*.svg text svneol=native#image/svg%2Bxml
|
||||
|
||||
# Data formats
|
||||
*.pdf binary svneol=unset#application/pdf
|
||||
*.avi binary svneol=unset#video/avi
|
||||
*.doc binary svneol=unset#application/msword
|
||||
*.dsp text svneol=crlf#text/plain
|
||||
*.dsw text svneol=crlf#text/plain
|
||||
*.eps binary svneol=unset#application/postscript
|
||||
*.gz binary svneol=unset#application/gzip
|
||||
*.mov binary svneol=unset#video/quicktime
|
||||
*.mp3 binary svneol=unset#audio/mpeg
|
||||
*.ppt binary svneol=unset#application/vnd.ms-powerpoint
|
||||
*.ps binary svneol=unset#application/postscript
|
||||
*.psd binary svneol=unset#application/photoshop
|
||||
*.rdf binary svneol=unset#text/rdf
|
||||
*.rss text svneol=unset#text/xml
|
||||
*.rtf binary svneol=unset#text/rtf
|
||||
*.sln text svneol=native#text/plain
|
||||
*.swf binary svneol=unset#application/x-shockwave-flash
|
||||
*.tgz binary svneol=unset#application/gzip
|
||||
*.vcproj text svneol=native#text/xml
|
||||
*.vcxproj text svneol=native#text/xml
|
||||
*.vsprops text svneol=native#text/xml
|
||||
*.wav binary svneol=unset#audio/wav
|
||||
*.xls binary svneol=unset#application/vnd.ms-excel
|
||||
*.zip binary svneol=unset#application/zip
|
||||
|
||||
# Text formats
|
||||
.htaccess text svneol=native#text/plain
|
||||
*.bbk text svneol=native#text/xml
|
||||
*.cmake text svneol=native#text/plain
|
||||
*.css text svneol=native#text/css
|
||||
*.dtd text svneol=native#text/xml
|
||||
*.htm text svneol=native#text/html
|
||||
*.html text svneol=native#text/html
|
||||
*.ini text svneol=native#text/plain
|
||||
*.log text svneol=native#text/plain
|
||||
*.mak text svneol=native#text/plain
|
||||
*.qbk text svneol=native#text/plain
|
||||
*.rst text svneol=native#text/plain
|
||||
*.sql text svneol=native#text/x-sql
|
||||
*.txt text svneol=native#text/plain
|
||||
*.xhtml text svneol=native#text/xhtml%2Bxml
|
||||
*.xml text svneol=native#text/xml
|
||||
*.xsd text svneol=native#text/xml
|
||||
*.xsl text svneol=native#text/xml
|
||||
*.xslt text svneol=native#text/xml
|
||||
*.xul text svneol=native#text/xul
|
||||
*.yml text svneol=native#text/plain
|
||||
boost-no-inspect text svneol=native#text/plain
|
||||
CHANGES text svneol=native#text/plain
|
||||
COPYING text svneol=native#text/plain
|
||||
INSTALL text svneol=native#text/plain
|
||||
Jamfile text svneol=native#text/plain
|
||||
Jamroot text svneol=native#text/plain
|
||||
Jamfile.v2 text svneol=native#text/plain
|
||||
Jamrules text svneol=native#text/plain
|
||||
Makefile* text svneol=native#text/plain
|
||||
README text svneol=native#text/plain
|
||||
TODO text svneol=native#text/plain
|
||||
|
||||
# Code formats
|
||||
*.c text svneol=native#text/plain
|
||||
*.cpp text svneol=native#text/plain
|
||||
*.h text svneol=native#text/plain
|
||||
*.hpp text svneol=native#text/plain
|
||||
*.ipp text svneol=native#text/plain
|
||||
*.tpp text svneol=native#text/plain
|
||||
*.jam text svneol=native#text/plain
|
||||
*.java text svneol=native#text/plain
|
||||
-1339
File diff suppressed because it is too large
Load Diff
-236
@@ -1,236 +0,0 @@
|
||||
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 incompatability)
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-1712
File diff suppressed because it is too large
Load Diff
@@ -1,64 +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 posix_api_compiler_check.c
|
||||
* VERSION 3.01
|
||||
* DESCRIPTION: Verify that POSIX API calls compile: note this is a compile
|
||||
* time check only.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <boost/regex.h>
|
||||
|
||||
const char* expression = "^";
|
||||
const char* text = "\n ";
|
||||
regmatch_t matches[1];
|
||||
int flags = REG_EXTENDED | REG_BASIC | REG_NOSPEC | REG_ICASE | REG_NOSUB |
|
||||
REG_NEWLINE | REG_PEND | REG_NOCOLLATE | REG_ESCAPE_IN_LISTS |
|
||||
REG_NEWLINE_ALT | REG_PERL | REG_AWK | REG_GREP | REG_EGREP;
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
regex_t re;
|
||||
int result;
|
||||
result = regcomp(&re, expression, REG_AWK);
|
||||
if(result > REG_NOERROR)
|
||||
{
|
||||
char buf[256];
|
||||
regerror(result, &re, buf, sizeof(buf));
|
||||
printf(buf);
|
||||
return result;
|
||||
}
|
||||
assert(re.re_nsub == 0);
|
||||
matches[0].rm_so = 0;
|
||||
matches[0].rm_eo = strlen(text);
|
||||
result = regexec(&re, text, 1, matches, REG_NOTBOL | REG_NOTEOL | REG_STARTEND);
|
||||
if(result > REG_NOERROR)
|
||||
{
|
||||
char buf[256];
|
||||
regerror(result, &re, buf, sizeof(buf));
|
||||
printf(buf);
|
||||
regfree(&re);
|
||||
return result;
|
||||
}
|
||||
assert(matches[0].rm_so == matches[0].rm_eo == 1);
|
||||
regfree(&re);
|
||||
return 0;
|
||||
}
|
||||
@@ -1,64 +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 posix_api_compiler_check.c
|
||||
* VERSION 3.01
|
||||
* DESCRIPTION: Verify that POSIX API calls compile: note this is a compile
|
||||
* time check only.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <boost/regex.h>
|
||||
|
||||
const char* expression = "^";
|
||||
const char* text = "\n ";
|
||||
regmatch_t matches[1];
|
||||
int flags = REG_EXTENDED | REG_BASIC | REG_NOSPEC | REG_ICASE | REG_NOSUB |
|
||||
REG_NEWLINE | REG_PEND | REG_NOCOLLATE | REG_ESCAPE_IN_LISTS |
|
||||
REG_NEWLINE_ALT | REG_PERL | REG_AWK | REG_GREP | REG_EGREP;
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
regex_t re;
|
||||
int result;
|
||||
result = regcomp(&re, expression, REG_AWK);
|
||||
if(result > REG_NOERROR)
|
||||
{
|
||||
char buf[256];
|
||||
regerror(result, &re, buf, sizeof(buf));
|
||||
printf(buf);
|
||||
return result;
|
||||
}
|
||||
assert(re.re_nsub == 0);
|
||||
matches[0].rm_so = 0;
|
||||
matches[0].rm_eo = strlen(text);
|
||||
result = regexec(&re, text, 1, matches, REG_NOTBOL | REG_NOTEOL | REG_STARTEND);
|
||||
if(result > REG_NOERROR)
|
||||
{
|
||||
char buf[256];
|
||||
regerror(result, &re, buf, sizeof(buf));
|
||||
printf(buf);
|
||||
regfree(&re);
|
||||
return result;
|
||||
}
|
||||
assert(matches[0].rm_so == matches[0].rm_eo == 1);
|
||||
regfree(&re);
|
||||
return 0;
|
||||
}
|
||||
@@ -1,67 +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 wide_posix_api_compiler_check.c
|
||||
* VERSION 3.01
|
||||
* DESCRIPTION: Verify that POSIX API calls compile: note this is a compile
|
||||
* time check only.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <wchar.h>
|
||||
#define UNICODE
|
||||
#include <boost/regex.h>
|
||||
|
||||
const wchar_t* expression = L"^";
|
||||
const wchar_t* text = L"\n ";
|
||||
regmatch_t matches[1];
|
||||
int flags = REG_EXTENDED | REG_BASIC | REG_NOSPEC | REG_ICASE | REG_NOSUB |
|
||||
REG_NEWLINE | REG_PEND | REG_NOCOLLATE | REG_ESCAPE_IN_LISTS |
|
||||
REG_NEWLINE_ALT | REG_PERL | REG_AWK | REG_GREP | REG_EGREP;
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
regex_t re;
|
||||
int result;
|
||||
result = regcomp(&re, expression, REG_AWK);
|
||||
if(result > REG_NOERROR)
|
||||
{
|
||||
wchar_t buf[256];
|
||||
regerror(result, &re, buf, sizeof(buf));
|
||||
wprintf(buf);
|
||||
return result;
|
||||
}
|
||||
assert(re.re_nsub == 0);
|
||||
matches[0].rm_so = 0;
|
||||
matches[0].rm_eo = wcslen(text);
|
||||
result = regexec(&re, text, 1, matches, REG_NOTBOL | REG_NOTEOL | REG_STARTEND);
|
||||
if(result > REG_NOERROR)
|
||||
{
|
||||
wchar_t buf[256];
|
||||
regerror(result, &re, buf, sizeof(buf));
|
||||
wprintf(buf);
|
||||
regfree(&re);
|
||||
return result;
|
||||
}
|
||||
assert(matches[0].rm_so == matches[0].rm_eo == 1);
|
||||
regfree(&re);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,67 +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 wide_posix_api_compiler_check.c
|
||||
* VERSION 3.01
|
||||
* DESCRIPTION: Verify that POSIX API calls compile: note this is a compile
|
||||
* time check only.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <wchar.h>
|
||||
#define UNICODE
|
||||
#include <boost/regex.h>
|
||||
|
||||
const wchar_t* expression = L"^";
|
||||
const wchar_t* text = L"\n ";
|
||||
regmatch_t matches[1];
|
||||
int flags = REG_EXTENDED | REG_BASIC | REG_NOSPEC | REG_ICASE | REG_NOSUB |
|
||||
REG_NEWLINE | REG_PEND | REG_NOCOLLATE | REG_ESCAPE_IN_LISTS |
|
||||
REG_NEWLINE_ALT | REG_PERL | REG_AWK | REG_GREP | REG_EGREP;
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
regex_t re;
|
||||
int result;
|
||||
result = regcomp(&re, expression, REG_AWK);
|
||||
if(result > REG_NOERROR)
|
||||
{
|
||||
wchar_t buf[256];
|
||||
regerror(result, &re, buf, sizeof(buf));
|
||||
wprintf(buf);
|
||||
return result;
|
||||
}
|
||||
assert(re.re_nsub == 0);
|
||||
matches[0].rm_so = 0;
|
||||
matches[0].rm_eo = wcslen(text);
|
||||
result = regexec(&re, text, 1, matches, REG_NOTBOL | REG_NOTEOL | REG_STARTEND);
|
||||
if(result > REG_NOERROR)
|
||||
{
|
||||
wchar_t buf[256];
|
||||
regerror(result, &re, buf, sizeof(buf));
|
||||
wprintf(buf);
|
||||
regfree(&re);
|
||||
return result;
|
||||
}
|
||||
assert(matches[0].rm_so == matches[0].rm_eo == 1);
|
||||
regfree(&re);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -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=..\..\lib\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,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="..\..\lib\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,47 +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=../../lib/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..\..\lib\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,30 +0,0 @@
|
||||
|
||||
# very basic makefile for jgrep
|
||||
#
|
||||
# GNU compiler g++
|
||||
#
|
||||
CXX= -O2 -I../../../../ -I./
|
||||
|
||||
jgrep : jgrep.cpp main.cpp
|
||||
g++ -ojgrep $(CXX) jgrep.cpp main.cpp -L../../lib/gcc -lregex++
|
||||
|
||||
debug : jgrep.cpp main.cpp
|
||||
g++ -ojgrep -I../../../../ -I./ -g jgrep.cpp main.cpp -L../../lib/gcc -lregex++debug
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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.03
|
||||
*/
|
||||
|
||||
#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/re_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.03
|
||||
*/
|
||||
|
||||
#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.03
|
||||
*/
|
||||
|
||||
|
||||
#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/re_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,41 +0,0 @@
|
||||
|
||||
# very basic makefile for jgrep
|
||||
#
|
||||
|
||||
CXX=@CXX@
|
||||
CXXFLAGS=@CXXFLAGS@
|
||||
LIBS=@LIBS@
|
||||
EXE=@ac_exe_ext@
|
||||
OBJ=@ac_obj_ext@
|
||||
|
||||
LIBDEP=../../lib/libregex++.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 -lregex++ $(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,20 +0,0 @@
|
||||
# Makefile for timer application
|
||||
#
|
||||
# for SUN workshop 5.0 C++ compiler
|
||||
#
|
||||
|
||||
CXX=CC
|
||||
CPP_FLAGS = -O -I../../../../ -I./
|
||||
|
||||
%.o : %.cpp
|
||||
$(CXX) -c -o $@ $(CPP_FLAGS) $<
|
||||
|
||||
jgrep : jgrep.o main.o
|
||||
$(CXX) -o $@ $(CPP_FLAGS) jgrep.o main.o -L../../lib -lregex++
|
||||
|
||||
clean:
|
||||
rm -rf SunWS_cache
|
||||
rm -f jgrep.o jgrep main.o
|
||||
|
||||
|
||||
|
||||
@@ -1,17 +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:..\..\lib\vc6-stlport user32.lib
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +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:..\..\lib\vc6 user32.lib
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,134 +0,0 @@
|
||||
|
||||
# very basic makefile for regress
|
||||
#
|
||||
# Borland C++ tools
|
||||
#
|
||||
# BCROOT defines the root directory of your bcb install
|
||||
#
|
||||
!ifndef BCROOT
|
||||
BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
BCC32 = $(BCROOT)\bin\Bcc32.exe
|
||||
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
|
||||
|
||||
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....
|
||||
r1 tests.txt test1252.txt
|
||||
r2 tests.txt
|
||||
r3 tests.txt
|
||||
r4 tests.txt test1252.txt
|
||||
r5 tests.txt
|
||||
r6 tests.txt
|
||||
echo testing static multi-threaded version....
|
||||
r1m tests.txt test1252.txt
|
||||
r2m tests.txt
|
||||
r3m tests.txt
|
||||
r4m tests.txt test1252.txt
|
||||
r5m tests.txt
|
||||
r6m tests.txt
|
||||
echo testing dll single threaded version....
|
||||
r1l tests.txt test1252.txt
|
||||
r2l tests.txt
|
||||
r3l tests.txt
|
||||
r4l tests.txt test1252.txt
|
||||
r5l tests.txt
|
||||
r6l tests.txt
|
||||
echo testing dll multi-threaded version....
|
||||
r1lm tests.txt test1252.txt
|
||||
r2lm tests.txt
|
||||
r3lm tests.txt
|
||||
r4lm tests.txt test1252.txt
|
||||
r5lm tests.txt
|
||||
r6lm tests.txt
|
||||
|
||||
|
||||
r1.exe : tests.cpp regress.cpp parse.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er1.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp
|
||||
|
||||
r2.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er2.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er3.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er4.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er5.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er6.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
r1m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er1m.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r2m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er2m.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er3m.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er4m.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er5m.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er6m.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
r1l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er1l.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r2l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er2l.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er3l.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er4l.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er5l.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er6l.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
r1lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er1lm.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r2lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er2lm.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er3lm.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er4lm.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er5lm.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er6lm.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,186 +0,0 @@
|
||||
|
||||
# very basic makefile for regress
|
||||
#
|
||||
# Borland C++ tools
|
||||
#
|
||||
# BCROOT defines the root directory of your bcb install
|
||||
#
|
||||
!ifndef BCROOT
|
||||
BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
BCC32 = $(BCROOT)\bin\Bcc32.exe
|
||||
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
|
||||
|
||||
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....
|
||||
r1 tests.txt test1252.txt
|
||||
r2 tests.txt
|
||||
r3 tests.txt
|
||||
r4 tests.txt test1252.txt
|
||||
r5 tests.txt
|
||||
r6 tests.txt
|
||||
echo testing static multi-threaded version....
|
||||
r1m tests.txt test1252.txt
|
||||
r2m tests.txt
|
||||
r3m tests.txt
|
||||
r4m tests.txt test1252.txt
|
||||
r5m tests.txt
|
||||
r6m tests.txt
|
||||
echo testing static VCL version....
|
||||
r1v tests.txt test1252.txt
|
||||
r2v tests.txt
|
||||
r3v tests.txt
|
||||
r4v tests.txt test1252.txt
|
||||
r5v tests.txt
|
||||
r6v tests.txt
|
||||
echo testing dll single threaded version....
|
||||
r1l tests.txt test1252.txt
|
||||
r2l tests.txt
|
||||
r3l tests.txt
|
||||
r4l tests.txt test1252.txt
|
||||
r5l tests.txt
|
||||
r6l tests.txt
|
||||
echo testing dll multi-threaded version....
|
||||
r1lm tests.txt test1252.txt
|
||||
r2lm tests.txt
|
||||
r3lm tests.txt
|
||||
r4lm tests.txt test1252.txt
|
||||
r5lm tests.txt
|
||||
r6lm tests.txt
|
||||
echo testing dll VCL version....
|
||||
r1lv tests.txt test1252.txt
|
||||
r2lv tests.txt
|
||||
r3lv tests.txt
|
||||
r4lv tests.txt test1252.txt
|
||||
r5lv tests.txt
|
||||
r6lv tests.txt
|
||||
|
||||
|
||||
r1.exe : tests.cpp regress.cpp parse.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er1.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp
|
||||
|
||||
r2.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er2.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er3.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er4.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er5.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er6.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
r1m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er1m.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r2m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er2m.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er3m.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er4m.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er5m.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er6m.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
r1v.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWV $(CFLAGS) -er1v.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r2v.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWV $(CFLAGS) -er2v.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3v.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWV $(CFLAGS) -er3v.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4v.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWV $(CFLAGS) -er4v.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5v.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWV $(CFLAGS) -er5v.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6v.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWV $(CFLAGS) -er6v.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
r1l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er1l.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r2l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er2l.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er3l.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er4l.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er5l.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er6l.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
r1lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er1lm.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r2lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er2lm.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er3lm.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er4lm.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er5lm.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er6lm.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
r1lv.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er1lv.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r2lv.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er2lv.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3lv.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er3lv.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4lv.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er4lv.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5lv.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er5lv.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6lv.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er6lv.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,186 +0,0 @@
|
||||
|
||||
# very basic makefile for regress
|
||||
#
|
||||
# Borland C++ tools
|
||||
#
|
||||
# BCROOT defines the root directory of your bcb install
|
||||
#
|
||||
!ifndef BCROOT
|
||||
BCROOT=$(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
BCC32 = $(BCROOT)\bin\Bcc32.exe
|
||||
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
|
||||
|
||||
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....
|
||||
r1 tests.txt test1252.txt
|
||||
r2 tests.txt
|
||||
r3 tests.txt
|
||||
r4 tests.txt test1252.txt
|
||||
r5 tests.txt
|
||||
r6 tests.txt
|
||||
echo testing static multi-threaded version....
|
||||
r1m tests.txt test1252.txt
|
||||
r2m tests.txt
|
||||
r3m tests.txt
|
||||
r4m tests.txt test1252.txt
|
||||
r5m tests.txt
|
||||
r6m tests.txt
|
||||
echo testing static VCL version....
|
||||
r1v tests.txt test1252.txt
|
||||
r2v tests.txt
|
||||
r3v tests.txt
|
||||
r4v tests.txt test1252.txt
|
||||
r5v tests.txt
|
||||
r6v tests.txt
|
||||
echo testing dll single threaded version....
|
||||
r1l tests.txt test1252.txt
|
||||
r2l tests.txt
|
||||
r3l tests.txt
|
||||
r4l tests.txt test1252.txt
|
||||
r5l tests.txt
|
||||
r6l tests.txt
|
||||
echo testing dll multi-threaded version....
|
||||
r1lm tests.txt test1252.txt
|
||||
r2lm tests.txt
|
||||
r3lm tests.txt
|
||||
r4lm tests.txt test1252.txt
|
||||
r5lm tests.txt
|
||||
r6lm tests.txt
|
||||
echo testing dll VCL version....
|
||||
r1lv tests.txt test1252.txt
|
||||
r2lv tests.txt
|
||||
r3lv tests.txt
|
||||
r4lv tests.txt test1252.txt
|
||||
r5lv tests.txt
|
||||
r6lv tests.txt
|
||||
|
||||
|
||||
r1.exe : tests.cpp regress.cpp parse.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er1.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp
|
||||
|
||||
r2.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er2.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er3.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er4.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er5.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -D_NO_VCL $(CFLAGS) -er6.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
r1m.exe : tests.cpp regress.cpp parse.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er1m.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp
|
||||
|
||||
r2m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er2m.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er3m.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er4m.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er5m.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6m.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -D_NO_VCL $(CFLAGS) -er6m.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
r1v.exe : tests.cpp regress.cpp parse.cpp
|
||||
$(BCC32) -tWM -tWV $(CFLAGS) -er1v.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp
|
||||
|
||||
r2v.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWV $(CFLAGS) -er2v.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3v.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWV $(CFLAGS) -er3v.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4v.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWV $(CFLAGS) -er4v.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5v.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWV $(CFLAGS) -er5v.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6v.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWV $(CFLAGS) -er6v.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
r1l.exe : tests.cpp regress.cpp parse.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er1l.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp
|
||||
|
||||
r2l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er2l.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er3l.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er4l.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er5l.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6l.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM- -tWR -D_NO_VCL $(CFLAGS) -er6l.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
r1lm.exe : tests.cpp regress.cpp parse.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er1lm.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp
|
||||
|
||||
r2lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er2lm.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er3lm.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er4lm.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er5lm.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6lm.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -D_NO_VCL $(CFLAGS) -er6lm.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
r1lv.exe : tests.cpp regress.cpp parse.cpp
|
||||
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er1lv.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp regress.cpp parse.cpp
|
||||
|
||||
r2lv.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er2lv.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r3lv.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er3lv.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r4lv.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er4lv.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r5lv.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er5lv.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
r6lv.exe : tests.cpp parse.cpp regress.cpp
|
||||
$(BCC32) -tWM -tWR -tWV -tWC $(CFLAGS) -er6lv.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
|
||||
# very basic makefile for regression tests
|
||||
#
|
||||
# g++ 2.95 and greater
|
||||
#
|
||||
CXX= g++ -pedantic -Wall -I../../../../ -I./ -L../../lib/gcc
|
||||
|
||||
total : r2
|
||||
./r2 tests.txt
|
||||
|
||||
r2 : tests.cpp parse.cpp regress.cpp
|
||||
$(CXX) -O2 -o r2 tests.cpp parse.cpp regress.cpp -lregex++
|
||||
|
||||
debug : tests.cpp parse.cpp regress.cpp
|
||||
$(CXX) -g -o r2 tests.cpp parse.cpp regress.cpp -lregex++debug
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
|
||||
# very basic makefile for regression tests
|
||||
#
|
||||
CXX=@CXX@
|
||||
CXXFLAGS=@CXXFLAGS@ -I../../../../
|
||||
LIBS=@LIBS@ -L../../lib -lregex++
|
||||
EXE=@ac_exe_ext@
|
||||
OBJ=@ac_obj_ext@
|
||||
|
||||
total : @ac_regress@
|
||||
|
||||
LIBDEP=../../lib/libregex++.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)
|
||||
./r1 tests.txt
|
||||
|
||||
r2$(EXE) :: tests.cpp parse.cpp regress.cpp
|
||||
$(CXX) -o r2$(EXE) $(CXXFLAGS) -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LIBS)
|
||||
./r2 tests.txt
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,327 +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 parse.cpp
|
||||
* VERSION 3.03
|
||||
*
|
||||
* Input parsing functions for regress.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
#include "regress.h"
|
||||
|
||||
#ifndef BOOST_RE_ALGO_INCLUDED
|
||||
#include <algorithm>
|
||||
#endif
|
||||
|
||||
using namespace boost;
|
||||
|
||||
//
|
||||
// start by defining all our flag types:
|
||||
|
||||
flag_info flag_data[] = {
|
||||
{ BOOST_RE_STR("REG_BASIC"), 9, REG_BASIC, 0 },
|
||||
{ BOOST_RE_STR("REG_EXTENDED"), 12, REG_EXTENDED, 0 },
|
||||
{ BOOST_RE_STR("REG_ICASE"), 9, REG_ICASE, 0 },
|
||||
{ BOOST_RE_STR("REG_NOSUB"), 9, REG_NOSUB, 0 },
|
||||
{ BOOST_RE_STR("REG_NEWLINE"), 11, REG_NEWLINE, 0 },
|
||||
{ BOOST_RE_STR("REG_NEWLINE"), 11, REG_NEWLINE, 0 },
|
||||
{ BOOST_RE_STR("REG_NOSPEC"), 10, REG_NOSPEC, 0 },
|
||||
|
||||
{ BOOST_RE_STR("REG_NOTBOL"), 10, REG_NOTBOL, 1 },
|
||||
{ BOOST_RE_STR("REG_NOTEOL"), 10, REG_NOTEOL, 1 },
|
||||
{ BOOST_RE_STR("REG_STARTEND"), 12, REG_STARTEND, 1 },
|
||||
|
||||
{ BOOST_RE_STR("basic"), 5, regbase::basic, 2 },
|
||||
{ BOOST_RE_STR("escape_in_lists"), 15, regbase::escape_in_lists, 2 },
|
||||
{ BOOST_RE_STR("char_classes"), 12, regbase::char_classes, 2 },
|
||||
{ BOOST_RE_STR("intervals"), 9, regbase::intervals, 2 },
|
||||
{ BOOST_RE_STR("limited_ops"), 11, regbase::limited_ops, 2 },
|
||||
{ BOOST_RE_STR("newline_alt"), 11, regbase::newline_alt, 2 },
|
||||
{ BOOST_RE_STR("bk_plus_qm"), 10, regbase::bk_plus_qm, 2 },
|
||||
{ BOOST_RE_STR("bk_braces"), 9, regbase::bk_braces, 2 },
|
||||
{ BOOST_RE_STR("bk_parens"), 9, regbase::bk_parens, 2 },
|
||||
{ BOOST_RE_STR("bk_refs"), 7, regbase::bk_refs, 2 },
|
||||
{ BOOST_RE_STR("bk_vbar"), 7, regbase::bk_vbar, 2 },
|
||||
{ BOOST_RE_STR("use_except"), 10, regbase::use_except, 2 },
|
||||
{ BOOST_RE_STR("literal"), 7, regbase::literal, 2 },
|
||||
{ BOOST_RE_STR("normal"), 6, regbase::normal, 2 },
|
||||
{ BOOST_RE_STR("basic"), 5, regbase::basic, 2 },
|
||||
{ BOOST_RE_STR("extended"), 8, regbase::extended, 2 },
|
||||
|
||||
{ BOOST_RE_STR("match_default"), 13, match_default, 3 },
|
||||
{ BOOST_RE_STR("match_not_bol"), 13, match_not_bol, 3 },
|
||||
{ BOOST_RE_STR("match_not_eol"), 13, match_not_eol, 3 },
|
||||
{ BOOST_RE_STR("match_not_bob"), 13, match_not_bob, 3 },
|
||||
{ BOOST_RE_STR("match_not_eob"), 13, match_not_eob, 3 },
|
||||
{ BOOST_RE_STR("match_not_bow"), 13, match_not_bow, 3 },
|
||||
{ BOOST_RE_STR("match_not_eow"), 13, match_not_eow, 3 },
|
||||
{ BOOST_RE_STR("match_not_dot_newline"), 21, match_not_dot_newline, 3 },
|
||||
{ BOOST_RE_STR("match_not_dot_null"), 18, match_not_dot_null, 3 },
|
||||
{ BOOST_RE_STR("match_prev_avail"), 16, match_prev_avail, 3 },
|
||||
{ BOOST_RE_STR("match_any"), 9, match_any, 3 },
|
||||
{ BOOST_RE_STR("match_not_null"), 14, match_not_null, 3 },
|
||||
{ BOOST_RE_STR("match_continuous"), 16, match_continuous, 3 },
|
||||
{ BOOST_RE_STR("match_partial"), 13, match_partial, 3 },
|
||||
|
||||
{ BOOST_RE_STR("format_sed"), 10, format_sed, 3 },
|
||||
{ BOOST_RE_STR("format_perl"), 11, format_perl, 3 },
|
||||
{ BOOST_RE_STR("format_no_copy"), 14, format_no_copy, 3 },
|
||||
|
||||
{ BOOST_RE_STR("REG_NO_POSIX_TEST"), 17, REG_NO_POSIX_TEST, 4 },
|
||||
{ BOOST_RE_STR("REG_UNICODE_ONLY"), 16, REG_UNICODE_ONLY, 4 },
|
||||
{ BOOST_RE_STR("REG_GREP"), 8, REG_GREP, 4 },
|
||||
{ BOOST_RE_STR("REG_MERGE"), 9, REG_MERGE, 4 },
|
||||
{ BOOST_RE_STR("REG_MERGE_COPY"), 14, REG_MERGE_COPY, 4 },
|
||||
|
||||
{ BOOST_RE_STR(""), 0, 0, 0 },
|
||||
};
|
||||
|
||||
// basically we create a simple token parser
|
||||
// using regular expressions
|
||||
|
||||
const char_t* expression_text = BOOST_RE_STR("(;.*)|") // comment
|
||||
BOOST_RE_STR("(^[[:blank:]]*-)|") // -
|
||||
BOOST_RE_STR("([^\"[:space:]][^[:space:]]*)|") // token
|
||||
BOOST_RE_STR("(\"(([^\"]|\\\\\")*)\")") // "token"
|
||||
;
|
||||
|
||||
typedef reg_expression<char_t> re_parse_t;
|
||||
typedef re_parse_t::allocator_type parse_alloc;
|
||||
typedef match_results<string_type::const_iterator, parse_alloc> parse_grep;
|
||||
typedef string_type::const_iterator parse_iterator;
|
||||
|
||||
re_parse_t parse_expression(expression_text, regbase::normal);
|
||||
|
||||
//
|
||||
// now define our grep predicate function object:
|
||||
class parse_function
|
||||
{
|
||||
int mode;
|
||||
public:
|
||||
parse_function() : mode(0) {}
|
||||
parse_function(const parse_function& o) : mode(o.mode) {}
|
||||
bool operator()(const parse_grep& i);
|
||||
};
|
||||
|
||||
bool parse_function::operator()(const parse_grep& g)
|
||||
{
|
||||
parse_iterator i, j;
|
||||
// determine what caused the match:
|
||||
if(g[1].matched)
|
||||
{
|
||||
// we have a comment:
|
||||
return true;
|
||||
}
|
||||
else if(g[2].matched)
|
||||
{
|
||||
// we have the start of a line of flags
|
||||
mode = -1;
|
||||
for(int i = 0; i < 5; ++i)
|
||||
flags[i] = 0;
|
||||
return true;
|
||||
}
|
||||
else if(g[3].matched)
|
||||
{
|
||||
// token:
|
||||
i = g[3].first;
|
||||
j = g[3].second;
|
||||
}
|
||||
else
|
||||
{
|
||||
// token delimited by ""
|
||||
i = g[5].first;
|
||||
j = g[5].second;
|
||||
}
|
||||
|
||||
// now we need to switch depending upon what mode we are in:
|
||||
switch(mode)
|
||||
{
|
||||
case -1:
|
||||
{
|
||||
// parse the flag:
|
||||
unsigned int id = 0;
|
||||
while(flag_data[id].len != 0)
|
||||
{
|
||||
if(static_cast<unsigned int>(j - i) != flag_data[id].len)
|
||||
{
|
||||
++id;
|
||||
continue;
|
||||
}
|
||||
if(std::equal(i, j, flag_data[id].name) == true)
|
||||
{
|
||||
flags[flag_data[id].id] |= flag_data[id].value;
|
||||
return true;
|
||||
}
|
||||
++id;
|
||||
}
|
||||
cout << "Warning: Unknown flag: ";
|
||||
string_type t(i, j);
|
||||
cout << t.c_str();
|
||||
cout << endl;
|
||||
return true;
|
||||
}
|
||||
case 0:
|
||||
// set the expression text:
|
||||
expression = string_type(i, j);
|
||||
do_test = true;
|
||||
break;
|
||||
case 1:
|
||||
// set the text to match:
|
||||
search_text = string_type(i, j);
|
||||
jm_trace("Initial search text: " << search_text);
|
||||
expand_escapes(search_text);
|
||||
jm_trace("Search text after escapes expanded: " << search_text);
|
||||
break;
|
||||
case 2:
|
||||
// maybe set format string:
|
||||
if(flags[4] & REG_MERGE)
|
||||
{
|
||||
format_string = string_type(i, j);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
matches[mode - 2] = to_int(i, j);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
// maybe set format result:
|
||||
if(flags[4] & REG_MERGE)
|
||||
{
|
||||
merge_string = string_type(i, j);
|
||||
expand_escapes(merge_string);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
matches[mode - 2] = to_int(i, j);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
jm_assert(mode >= 2);
|
||||
// set the relevent int value:
|
||||
matches[mode - 2] = to_int(i, j);
|
||||
}
|
||||
++mode;
|
||||
return true;
|
||||
}
|
||||
|
||||
void parse_input_line(const string_type& s)
|
||||
{
|
||||
// set matches back to starting values:
|
||||
for(int i = 0; i < MAX_MATCHES; ++i)
|
||||
{
|
||||
matches[i] = -2;
|
||||
}
|
||||
parse_function op;
|
||||
do_test = false;
|
||||
regex_grep(op, s.begin(), s.end(), parse_expression);
|
||||
jm_trace("expression: " << expression);
|
||||
jm_trace("search string: " << search_text);
|
||||
}
|
||||
|
||||
int to_int(string_type::const_iterator i, string_type::const_iterator j)
|
||||
{
|
||||
int val = 0;
|
||||
bool neg = false;
|
||||
if((i != j) && (*i == BOOST_RE_STR('-')))
|
||||
{
|
||||
neg = true;
|
||||
++i;
|
||||
}
|
||||
while (i != j)
|
||||
{
|
||||
val *= 10;
|
||||
val += *i - BOOST_RE_STR('0');
|
||||
++i;
|
||||
}
|
||||
if(neg)
|
||||
val *= -1;
|
||||
return val;
|
||||
}
|
||||
|
||||
void expand_escapes(string_type& s)
|
||||
{
|
||||
for(unsigned int i = 0; i < s.size(); ++i)
|
||||
{
|
||||
if(s[i] == BOOST_RE_STR('\\'))
|
||||
{
|
||||
switch(s[i+1])
|
||||
{
|
||||
case BOOST_RE_STR('a'):
|
||||
s.erase(s.begin() + i);
|
||||
s[i] = BOOST_RE_STR('\a');
|
||||
break;
|
||||
case BOOST_RE_STR('b'):
|
||||
s.erase(s.begin() + i);
|
||||
s[i] = BOOST_RE_STR('\b');
|
||||
break;
|
||||
case BOOST_RE_STR('f'):
|
||||
s.erase(s.begin() + i);
|
||||
s[i] = BOOST_RE_STR('\f');
|
||||
break;
|
||||
case BOOST_RE_STR('n'):
|
||||
s.erase(s.begin() + i);
|
||||
s[i] = BOOST_RE_STR('\n');
|
||||
break;
|
||||
case BOOST_RE_STR('r'):
|
||||
s.erase(s.begin() + i);
|
||||
s[i] = BOOST_RE_STR('\r');
|
||||
break;
|
||||
case BOOST_RE_STR('t'):
|
||||
s.erase(s.begin() + i);
|
||||
s[i] = BOOST_RE_STR('\t');
|
||||
break;
|
||||
case BOOST_RE_STR('v'):
|
||||
s.erase(s.begin() + i);
|
||||
s[i] = BOOST_RE_STR('\v');
|
||||
break;
|
||||
default:
|
||||
if( (s[i + 1] >= BOOST_RE_STR('0')) && (s[i + 1] <= BOOST_RE_STR('9')) )
|
||||
{
|
||||
int val = 0;
|
||||
unsigned int pos = i;
|
||||
++i;
|
||||
while((i < s.size()) && (s[i] >= BOOST_RE_STR('0')) && (s[i] <= BOOST_RE_STR('9')))
|
||||
{
|
||||
val *= 10;
|
||||
val += s[i] - BOOST_RE_STR('0');
|
||||
++i;
|
||||
}
|
||||
s.erase(s.begin() + pos, s.begin() + i);
|
||||
if(0 == val)
|
||||
{
|
||||
s.insert(s.begin()+pos, ' ');
|
||||
s[pos] = 0;
|
||||
}
|
||||
else
|
||||
s.insert(s.begin() + pos, (string_type::value_type)val);
|
||||
i = pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
s.erase(s.begin() + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,200 +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_test.cpp
|
||||
* VERSION 3.03
|
||||
* DESCRIPTION: Builds regression test program with default
|
||||
* locale and narrow character tests. Also
|
||||
* instantiates all the templates in the library
|
||||
* as a sanity check.
|
||||
*/
|
||||
|
||||
// disable automatic selection of support library:
|
||||
#define BOOST_RE_NO_LIB
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
//
|
||||
// instantiate templates used:
|
||||
//
|
||||
namespace boost{
|
||||
|
||||
#if defined(__GNUC__) && defined(__BEOS__)
|
||||
#define ra_it const char*
|
||||
#define test_char_type char
|
||||
#else
|
||||
typedef const char* ra_it;
|
||||
typedef char test_char_type;
|
||||
#endif
|
||||
typedef std::basic_string<test_char_type> test_string_type;
|
||||
|
||||
bool pred1(const match_results<ra_it>&)
|
||||
{ return true; }
|
||||
|
||||
typedef bool (*pred1_type)(const match_results<ra_it>&);
|
||||
typedef bool (*pred2_type)(const match_results<test_string_type::const_iterator>&);
|
||||
|
||||
//check that all the defined flags are available:
|
||||
regbase::flag_type f = regbase::escape_in_lists | regbase::char_classes | regbase::intervals | regbase::limited_ops
|
||||
| regbase::newline_alt | regbase::bk_plus_qm | regbase::bk_braces
|
||||
| regbase::bk_parens | regbase::bk_refs | regbase::bk_vbar | regbase::use_except
|
||||
| regbase::failbit | regbase::literal | regbase::icase | regbase::nocollate | regbase::basic
|
||||
| regbase::extended | regbase::normal | regbase::emacs | regbase::awk | regbase::grep | regbase::egrep | regbase::sed;
|
||||
|
||||
template class reg_expression<test_char_type>;
|
||||
template struct sub_match<ra_it>;
|
||||
template class match_results<ra_it>;
|
||||
|
||||
template bool regex_match(ra_it,
|
||||
ra_it,
|
||||
match_results<ra_it>& m,
|
||||
const reg_expression<test_char_type>& e,
|
||||
unsigned flags);
|
||||
template bool regex_match(ra_it,
|
||||
ra_it,
|
||||
const reg_expression<test_char_type>& e,
|
||||
unsigned flags);
|
||||
template bool regex_search(ra_it,
|
||||
ra_it,
|
||||
match_results<ra_it>& m,
|
||||
const reg_expression<test_char_type>& e,
|
||||
unsigned flags);
|
||||
template unsigned int regex_grep(pred1_type,
|
||||
ra_it,
|
||||
ra_it,
|
||||
const reg_expression<test_char_type>& e,
|
||||
unsigned flags);
|
||||
template test_char_type* regex_format(test_char_type*,
|
||||
const match_results<ra_it>& m,
|
||||
const test_char_type* fmt,
|
||||
unsigned flags);
|
||||
template test_char_type* regex_format(test_char_type*,
|
||||
const match_results<ra_it>& m,
|
||||
const test_string_type& fmt,
|
||||
unsigned flags);
|
||||
template test_char_type* regex_merge(test_char_type*,
|
||||
ra_it,
|
||||
ra_it,
|
||||
const reg_expression<test_char_type>&,
|
||||
const test_char_type*,
|
||||
unsigned int flags);
|
||||
template test_char_type* regex_merge(test_char_type*,
|
||||
ra_it,
|
||||
ra_it,
|
||||
const reg_expression<test_char_type>& e,
|
||||
const test_string_type&,
|
||||
unsigned int flags);
|
||||
template std::size_t regex_split(test_string_type*,
|
||||
test_string_type&,
|
||||
const reg_expression<test_char_type>&,
|
||||
unsigned flags,
|
||||
std::size_t);
|
||||
template std::size_t regex_split(test_string_type*,
|
||||
test_string_type& s,
|
||||
const reg_expression<test_char_type>& e,
|
||||
unsigned flags);
|
||||
|
||||
template std::size_t regex_split(test_string_type*, test_string_type&);
|
||||
|
||||
#ifndef BOOST_RE_NO_PARTIAL_FUNC_SPEC
|
||||
//
|
||||
// the following prototypes are only available if partial ordering
|
||||
// of template functions is supported:
|
||||
//
|
||||
template bool regex_match(const test_char_type*,
|
||||
match_results<const test_char_type*>& m,
|
||||
const reg_expression<test_char_type>& e,
|
||||
unsigned flags);
|
||||
template bool regex_match(const test_string_type&,
|
||||
match_results<test_string_type::const_iterator>&,
|
||||
const reg_expression<test_char_type>&,
|
||||
unsigned flags);
|
||||
template bool regex_match(const test_char_type*,
|
||||
const reg_expression<test_char_type>&,
|
||||
unsigned flags);
|
||||
template bool regex_match(const test_string_type&,
|
||||
const reg_expression<test_char_type>&,
|
||||
unsigned flags);
|
||||
template bool regex_search(const test_char_type*,
|
||||
match_results<const test_char_type*>&,
|
||||
const reg_expression<test_char_type>&,
|
||||
unsigned flags);
|
||||
template bool regex_search(const test_string_type&,
|
||||
match_results<test_string_type::const_iterator>&,
|
||||
const reg_expression<test_char_type>&,
|
||||
unsigned flags);
|
||||
template unsigned int regex_grep(pred1_type,
|
||||
const test_char_type*,
|
||||
const reg_expression<test_char_type>&,
|
||||
unsigned flags);
|
||||
template unsigned int regex_grep(pred2_type,
|
||||
const test_string_type&,
|
||||
const reg_expression<test_char_type>&,
|
||||
unsigned flags);
|
||||
template test_string_type regex_format
|
||||
(const match_results<test_string_type::const_iterator>& m,
|
||||
const test_char_type*,
|
||||
unsigned flags);
|
||||
template test_string_type regex_format
|
||||
(const match_results<test_string_type::const_iterator>&,
|
||||
const test_string_type&,
|
||||
unsigned flags);
|
||||
template test_string_type regex_merge(const test_string_type&,
|
||||
const reg_expression<test_char_type>&,
|
||||
const test_char_type*,
|
||||
unsigned int flags);
|
||||
template test_string_type regex_merge(const test_string_type&,
|
||||
const reg_expression<test_char_type>&,
|
||||
const test_string_type&,
|
||||
unsigned int flags);
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
//
|
||||
// include regression test source files:
|
||||
//
|
||||
#ifdef BOOST_RE_LOCALE_W32
|
||||
#define BOOST_RE_TEST_LOCALE_W32
|
||||
#elif !defined(BOOST_RE_LOCALE_C)
|
||||
#define BOOST_RE_TEST_LOCALE_CPP
|
||||
#endif
|
||||
|
||||
#include "tests.cpp"
|
||||
#include "parse.cpp"
|
||||
#include "regress.cpp"
|
||||
|
||||
//
|
||||
// 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/regex.cpp"
|
||||
#include "libs/regex/src/regex_debug.cpp"
|
||||
#include "libs/regex/src/regex_synch.cpp"
|
||||
|
||||
|
||||
@@ -1,259 +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 regress.cpp
|
||||
* VERSION 3.03
|
||||
*
|
||||
* main() and associated code for regress.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <cstdlib>
|
||||
#include <boost/regex.hpp>
|
||||
#ifdef BOOST_RE_OLD_IOSTREAM
|
||||
#include <fstream.h>
|
||||
#else
|
||||
#include <fstream>
|
||||
using std::ifstream;
|
||||
using std::ofstream;
|
||||
//using std::cin;
|
||||
//using std::cout;
|
||||
using std::endl;
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hrdstop
|
||||
#endif
|
||||
|
||||
#include "regress.h"
|
||||
|
||||
#if defined(BOOST_MSVC) && defined(_DEBUG)
|
||||
#include <CRTDBG.H>
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// declare all our globals here:
|
||||
//
|
||||
|
||||
string_type expression;
|
||||
string_type search_text;
|
||||
string_type format_string;
|
||||
string_type merge_string;
|
||||
int matches[MAX_MATCHES];
|
||||
|
||||
char file[MAX_PATH];
|
||||
int line;
|
||||
bool do_test = false;
|
||||
unsigned int flags[5];
|
||||
unsigned error_count = 0;
|
||||
|
||||
void usage()
|
||||
{
|
||||
cout <<
|
||||
|
||||
"Usage: regress filename [filename2...]\n"
|
||||
"see tests.txt for an example test script\n"
|
||||
"and the script format.\n";
|
||||
|
||||
}
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
#if defined(BOOST_MSVC) && defined(_DEBUG)
|
||||
// turn on heap reporting at program exit:
|
||||
int tmpFlag = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG );
|
||||
tmpFlag |= _CRTDBG_LEAK_CHECK_DF;
|
||||
tmpFlag &= ~_CRTDBG_CHECK_CRT_DF;
|
||||
_CrtSetDbgFlag( tmpFlag );
|
||||
#endif
|
||||
if(argc < 2)
|
||||
usage();
|
||||
int i;
|
||||
for(i = 1; i < argc; ++i)
|
||||
{
|
||||
reset_error();
|
||||
ifstream is(argv[i]);
|
||||
if(is.good() == false)
|
||||
{
|
||||
cout << "Error unable to open file: " << argv[i] << endl << endl;
|
||||
return -1;
|
||||
}
|
||||
std::strcpy(file, argv[i]);
|
||||
line = 0;
|
||||
unsigned int tests = 0;
|
||||
while(is.good())
|
||||
{
|
||||
string_type s;
|
||||
get_line(is, s);
|
||||
++line;
|
||||
jm_trace("Reading test script line " << line << " " << s);
|
||||
parse_input_line(s);
|
||||
if(do_test)
|
||||
{
|
||||
run_tests();
|
||||
++tests;
|
||||
}
|
||||
}
|
||||
cout << line << " lines, " << tests << " tests completed in file " << argv[i] << endl;
|
||||
}
|
||||
|
||||
return error_count;
|
||||
}
|
||||
|
||||
#ifdef TEST_UNICODE
|
||||
|
||||
ostream& operator << (ostream& os, const wchar_t* s)
|
||||
{
|
||||
while(*s)
|
||||
{
|
||||
os.put((char)*s);
|
||||
++s;
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
ostream& operator << (ostream& os, const std::wstring& s)
|
||||
{
|
||||
os << s.c_str();
|
||||
return os;
|
||||
}
|
||||
|
||||
istream& get_line(istream& is, nstring_type& s, char delim)
|
||||
{
|
||||
char c = (char)is.get();
|
||||
s.erase(s.begin(), s.end());
|
||||
while((c != delim) && is.good())
|
||||
{
|
||||
s.append(1, c);
|
||||
c = (char)is.get();
|
||||
}
|
||||
return is;
|
||||
}
|
||||
|
||||
istream& get_line(istream& is, string_type& s, char delim)
|
||||
{
|
||||
nstring_type t;
|
||||
get_line(is, t, delim);
|
||||
s.erase(s.begin(), s.end());
|
||||
const char* i, *j;
|
||||
i = t.c_str();
|
||||
j = t.c_str() + t.size();
|
||||
wchar_t* buf = new wchar_t[MB_CUR_MAX + 1];
|
||||
int cchars;
|
||||
while(i != j)
|
||||
{
|
||||
cchars = mbtowc(buf, i, j - i);
|
||||
if(cchars == -1)
|
||||
break;
|
||||
if(cchars == 0)
|
||||
break;
|
||||
s.insert(s.end(), buf, buf + cchars);
|
||||
i += cchars;
|
||||
}
|
||||
delete[] buf;
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
istream& get_line(istream& is, string_type& s, char delim)
|
||||
{
|
||||
char c = (char)is.get();
|
||||
s.erase(s.begin(), s.end());
|
||||
while((c != delim) && is.good())
|
||||
{
|
||||
s.append(1, c);
|
||||
c = (char)is.get();
|
||||
}
|
||||
return is;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
jm_debug_alloc::jm_debug_alloc()
|
||||
{
|
||||
blocks = new int;
|
||||
count = new int;
|
||||
*blocks = 0;
|
||||
*count = 1;
|
||||
guard = this;
|
||||
}
|
||||
|
||||
jm_debug_alloc::jm_debug_alloc(const jm_debug_alloc& d)
|
||||
{
|
||||
blocks = d.blocks;
|
||||
count = d.count;
|
||||
++(*count);
|
||||
guard = this;
|
||||
}
|
||||
jm_debug_alloc& jm_debug_alloc::operator=(const jm_debug_alloc& d)
|
||||
{
|
||||
free_();
|
||||
blocks = d.blocks;
|
||||
count = d.count;
|
||||
++(*count);
|
||||
return *this;
|
||||
}
|
||||
|
||||
jm_debug_alloc::~jm_debug_alloc()
|
||||
{
|
||||
if(guard != this)
|
||||
{
|
||||
cout << "Error: attempt to destroy object already destroyed" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
free_();
|
||||
guard = 0;
|
||||
}
|
||||
}
|
||||
void jm_debug_alloc::free_()
|
||||
{
|
||||
if(--(*count) == 0)
|
||||
{
|
||||
if(*blocks)
|
||||
{
|
||||
begin_error();
|
||||
cout << "Error: " << *blocks << " blocks not freed by allocator" << endl;
|
||||
}
|
||||
delete count;
|
||||
delete blocks;
|
||||
}
|
||||
}
|
||||
|
||||
jm_debug_alloc::pointer jm_debug_alloc::allocate(size_type n, void*)
|
||||
{
|
||||
pointer p = new char[n + maxi(sizeof(size_type), boost::re_detail::padding_size)];
|
||||
*(size_type*)p = n;
|
||||
++(*blocks);
|
||||
return p + maxi(sizeof(size_type), boost::re_detail::padding_size);
|
||||
}
|
||||
void jm_debug_alloc::deallocate(pointer p, size_type n)
|
||||
{
|
||||
p -= maxi(sizeof(size_type), boost::re_detail::padding_size);
|
||||
if(*(size_type*)p != n)
|
||||
{
|
||||
begin_error();
|
||||
cout << "Error: size mismatch in allocate/deallocate calls" << endl;
|
||||
}
|
||||
--(*blocks);
|
||||
delete[] p;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,336 +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 regress.h
|
||||
* VERSION 3.03
|
||||
*
|
||||
* Function and data declarations for regress.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _REGRESS_H
|
||||
#define _REGRESS_H
|
||||
|
||||
#include <boost/re_detail/regex_config.hpp>
|
||||
|
||||
#ifdef BOOST_RE_OLD_IOSTREAM
|
||||
#include <iostream.h>
|
||||
#else
|
||||
#include <iostream>
|
||||
using std::cout;
|
||||
using std::cerr;
|
||||
using std::cin;
|
||||
using std::istream;
|
||||
using std::ostream;
|
||||
using std::endl;
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#if defined(TEST_UNICODE)
|
||||
#ifdef __GNUC__
|
||||
#define char_t wchar_t
|
||||
#else
|
||||
typedef wchar_t char_t;
|
||||
#endif
|
||||
#define NO_POSIX_TEST
|
||||
typedef std::basic_string<char_t> string_type;
|
||||
typedef std::basic_string<char> nstring_type;
|
||||
inline istream& get_line(istream& is, nstring_type& s, char delim = '\n');
|
||||
istream& get_line(istream& is, string_type& s, char delim = L'\n');
|
||||
#define BOOST_RE_STR(x) L##x
|
||||
ostream& operator << (ostream& os, const string_type& s);
|
||||
|
||||
#else
|
||||
#ifdef __GNUC__
|
||||
#define char_t char
|
||||
#else
|
||||
typedef char char_t;
|
||||
#endif
|
||||
typedef std::basic_string<char_t> string_type;
|
||||
inline istream& get_line(istream& is, string_type& s, char delim = '\n');
|
||||
#define BOOST_RE_STR(x) x
|
||||
|
||||
#endif
|
||||
|
||||
ostream& operator << (ostream& os, const wchar_t* s);
|
||||
void parse_input_line(const string_type& s);
|
||||
void expand_escapes(string_type& s);
|
||||
void run_tests();
|
||||
void begin_error();
|
||||
void reset_error();
|
||||
int to_int(string_type::const_iterator i, string_type::const_iterator j);
|
||||
|
||||
#define MAX_MATCHES 30
|
||||
extern string_type expression;
|
||||
extern string_type search_text;
|
||||
extern string_type format_string;
|
||||
extern string_type merge_string;
|
||||
extern int matches[MAX_MATCHES];
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 260
|
||||
#endif
|
||||
|
||||
extern char file[MAX_PATH];
|
||||
extern int line;
|
||||
extern bool do_test;
|
||||
extern unsigned int flags[5];
|
||||
extern unsigned error_count;
|
||||
|
||||
struct flag_info
|
||||
{
|
||||
const char_t* name; // printable flag name
|
||||
unsigned int len; // length of name
|
||||
unsigned int value; // value of the flag
|
||||
unsigned int id; // index to assign value to
|
||||
};
|
||||
|
||||
extern flag_info flag_data[];
|
||||
|
||||
//
|
||||
// class jm_debug_alloc
|
||||
// NB this is a byte based allocator
|
||||
//
|
||||
class jm_debug_alloc
|
||||
{
|
||||
private:
|
||||
int* blocks, *count;
|
||||
jm_debug_alloc* guard;
|
||||
public:
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef char* pointer;
|
||||
typedef const char* const_pointer;
|
||||
typedef char& reference;
|
||||
typedef const char& const_reference;
|
||||
typedef char value_type;
|
||||
|
||||
|
||||
#ifndef BOOST_RE_NO_MEMBER_TEMPLATES
|
||||
template <class U>
|
||||
struct rebind
|
||||
{
|
||||
typedef boost::re_detail::re_alloc_binder<U, jm_debug_alloc> other;
|
||||
};
|
||||
#endif
|
||||
|
||||
jm_debug_alloc();
|
||||
|
||||
jm_debug_alloc(const jm_debug_alloc& d);
|
||||
jm_debug_alloc& operator=(const jm_debug_alloc& d);
|
||||
|
||||
~jm_debug_alloc();
|
||||
void free_();
|
||||
static pointer address(reference x)
|
||||
{
|
||||
return &x;
|
||||
}
|
||||
static const_pointer address(const_reference x)
|
||||
{
|
||||
return &x;
|
||||
}
|
||||
unsigned maxi(unsigned i, unsigned j)
|
||||
{
|
||||
return i < j ? j : i;
|
||||
}
|
||||
pointer allocate(size_type n, void* hint = 0);
|
||||
void deallocate(pointer p, size_type n);
|
||||
|
||||
static size_type max_size()
|
||||
{
|
||||
return UINT_MAX;
|
||||
}
|
||||
|
||||
static void construct(pointer , const char& )
|
||||
{
|
||||
}
|
||||
|
||||
static void destroy(pointer )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#if __BORLANDC__ < 0x520
|
||||
|
||||
#define BOOST_RE_BORLAND_FIX
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//
|
||||
// class debug_iterator
|
||||
//
|
||||
template <class T>
|
||||
struct debug_iterator : public BOOST_RE_RA_ITERATOR(T, std::ptrdiff_t)
|
||||
{
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef char_t value_type;
|
||||
typedef char_t* pointer;
|
||||
typedef char_t& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
typedef debug_iterator self;
|
||||
typedef std::size_t size_type;
|
||||
|
||||
T cur;
|
||||
T first;
|
||||
T last;
|
||||
|
||||
debug_iterator(T c, T f, T l)
|
||||
: cur(c), first(f), last(l) {}
|
||||
debug_iterator() : cur(), first(), last() {}
|
||||
debug_iterator(const debug_iterator& x)
|
||||
: cur(x.cur), first(x.first), last(x.last) {}
|
||||
debug_iterator& operator=(const debug_iterator& x)
|
||||
{
|
||||
cur = x.cur;
|
||||
first = x.first;
|
||||
last = x.last;
|
||||
return *this;
|
||||
}
|
||||
|
||||
reference operator*() const
|
||||
{
|
||||
if(cur == last)
|
||||
{
|
||||
begin_error();
|
||||
cout << "Error: attempt to dereference iterator past range" << endl;
|
||||
}
|
||||
return *cur;
|
||||
}
|
||||
|
||||
operator T()const { return cur; }
|
||||
|
||||
difference_type operator-(const self& x) const {
|
||||
return (difference_type)(cur - x.cur);
|
||||
}
|
||||
|
||||
self& operator++()
|
||||
{
|
||||
if(cur == last)
|
||||
{
|
||||
begin_error();
|
||||
cout << "Error: attempt to increment iterator past range" << endl;
|
||||
return *this;
|
||||
}
|
||||
++cur;
|
||||
return *this;
|
||||
}
|
||||
self operator++(int)
|
||||
{
|
||||
self tmp = *this;
|
||||
++*this;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
self& operator--()
|
||||
{
|
||||
if(cur == first)
|
||||
{
|
||||
begin_error();
|
||||
cout << "Error: attempt to decrement iterator past range" << endl;
|
||||
return *this;
|
||||
}
|
||||
--cur;
|
||||
return *this;
|
||||
}
|
||||
self operator--(int)
|
||||
{
|
||||
self tmp = *this;
|
||||
--*this;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
self& operator+=(difference_type n)
|
||||
{
|
||||
if((last - cur) < n)
|
||||
{
|
||||
begin_error();
|
||||
cout << "Error: attempt to increment iterator past range" << endl;
|
||||
return *this;
|
||||
}
|
||||
cur += n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
self operator+(difference_type n) const
|
||||
{
|
||||
self tmp = *this;
|
||||
return tmp += n;
|
||||
}
|
||||
|
||||
self& operator-=(difference_type n) { return *this += -n; }
|
||||
|
||||
self operator-(difference_type n) const
|
||||
{
|
||||
self tmp = *this;
|
||||
return tmp -= n;
|
||||
}
|
||||
|
||||
reference operator[](difference_type n) const { return *(cur + n); }
|
||||
|
||||
bool operator==(const self& x) const { return cur == x.cur; }
|
||||
bool operator!=(const self& x) const { return !(*this == x); }
|
||||
bool operator<(const self& x) const {
|
||||
return (cur < x.cur);
|
||||
}
|
||||
friend self operator+(difference_type n, const self& i)
|
||||
{
|
||||
self tmp = i;
|
||||
return tmp += n;
|
||||
}
|
||||
};
|
||||
|
||||
#if defined(__SGI_STL_PORT) && (__SGI_STL_PORT >= 0x400)
|
||||
namespace std{
|
||||
template <class T>
|
||||
inline random_access_iterator_tag __STL_CALL
|
||||
__iterator_category(const debug_iterator<T>&) {
|
||||
return random_access_iterator_tag();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_RE_TEST_LOCALE_W32
|
||||
typedef boost::reg_expression<char_t, boost::w32_regex_traits<char_t>, jm_debug_alloc> re_type;
|
||||
#elif defined(BOOST_RE_TEST_LOCALE_CPP)
|
||||
typedef boost::reg_expression<char_t, boost::cpp_regex_traits<char_t>, jm_debug_alloc> re_type;
|
||||
#else
|
||||
typedef boost::reg_expression<char_t, boost::c_regex_traits<char_t>, jm_debug_alloc> re_type;
|
||||
#endif
|
||||
|
||||
#define REG_NO_POSIX_TEST 1
|
||||
#define REG_UNICODE_ONLY 2
|
||||
#define REG_GREP 4
|
||||
#define REG_MERGE 8
|
||||
#define REG_MERGE_COPY 16
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
# Makefile for timer application
|
||||
#
|
||||
# for SUN workshop 5.0 C++ compiler
|
||||
#
|
||||
|
||||
CXX=CC
|
||||
CPP_FLAGS = -O -I../../../../ -I./
|
||||
|
||||
all: r2 r5
|
||||
r2 tests.txt
|
||||
r5 tests.txt
|
||||
|
||||
%.o : %.cpp
|
||||
$(CXX) -c -o $@ $(CPP_FLAGS) $<
|
||||
|
||||
r2 : tests.cpp parse.cpp regress.cpp
|
||||
$(CXX) -o $@ $(CPP_FLAGS) tests.cpp parse.cpp regress.cpp -L../../lib -lregex++
|
||||
|
||||
r5 : tests.cpp parse.cpp regress.cpp
|
||||
$(CXX) -o $@ $(CPP_FLAGS) -DTEST_UNICODE tests.cpp parse.cpp regress.cpp -L../../lib -lregex++
|
||||
|
||||
clean:
|
||||
rm -rf SunWS_cache
|
||||
rm -f r2.o r2 r5 r5.o
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
;
|
||||
; This file tests code page 1252 - US / Western European code page.
|
||||
;
|
||||
; See tests.txt for a desciption of the scipt format.
|
||||
;
|
||||
|
||||
- match_default extended REG_EXTENDED
|
||||
|
||||
; start by testing character classes:
|
||||
[[:lower:]]+ 渤珀矣粤肄蓍裨跋鈿韵鴦��巐鄕�� 1 32
|
||||
[[:upper:]]+ 神疎団兎波品北洋椀冫嘖孛慵无槿渤 1 31
|
||||
[[:punct:]]+ 、�ウЖ��⑭�渦慨偽係杭纂従神 0 31
|
||||
[[:print:]]+ 、�ウЖ��⑭�渦慨偽係杭纂従神疎団兎波品北洋椀冫嘖孛忤掣桀毳烙痰邃繙艾蜉謖邇關髓齡��巐鄕� 0 94
|
||||
[[:graph:]]+ 、�ウЖ��⑭�渦慨偽係杭纂従神疎団兎波品北洋椀冫嘖孛忤掣桀毳烙痰邃繙艾蜉謖邇關髓齡��巐鄕� 0 94
|
||||
[a-z]+ 烙痰邃繙艾蜉謖邇關髓齡��凞'� 0 31
|
||||
[a-z]+ 神疎団兎波品北洋椀冫嘖孛慵无槿� 1 31
|
||||
[[:word:]]+ 請唾津毒班碧麺力佰厶壞嶷掣桀毳烙痰邃繙艾蜉謖邇關髓齡��凞'� 0 61
|
||||
;and equivalence classes:
|
||||
[[=a=]]+ aA珀矣粤請唾津 0 14
|
||||
|
||||
; and then test case mapping:
|
||||
- match_default extended REG_EXTENDED REG_ICASE
|
||||
;[A-Z]+ 烙痰邃繙艾蜉謖邇關髓齡��凞'� 0 31
|
||||
;[a-z]+ 神疎団兎波品北洋椀冫嘖孛慵无槿� 1 31
|
||||
請唾津毒班碧麺力佰厶壞嶷掣桀� 烙痰邃繙艾蜉謖邇關髓齡��凞'� 1 30
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,750 +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 tests.cpp
|
||||
* VERSION 3.03
|
||||
*
|
||||
* the actual tests conducted by regress.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
#include "regress.h"
|
||||
|
||||
using namespace boost;
|
||||
|
||||
template <class M1, class M2>
|
||||
bool compare_result(const M1& sm, const M2& m)
|
||||
{
|
||||
if(sm.size() != m.size())
|
||||
return false;
|
||||
if(sm.line() != m.line())
|
||||
return false;
|
||||
for(unsigned int i = 0; i < sm.size(); ++i)
|
||||
{
|
||||
if(sm.position(i) != m.position(i))
|
||||
return false;
|
||||
if(sm.length(i) != m.length(i))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class M1>
|
||||
bool compare_result(const M1& sm, const M1& m)
|
||||
{
|
||||
return sm == m;
|
||||
}
|
||||
|
||||
|
||||
template <class C, class T, class A>
|
||||
void cpp_eh_tests(const reg_expression<C, T, A>& )
|
||||
{
|
||||
#ifndef __GNUC__
|
||||
bool thrown = false;
|
||||
// try set_expression form first:
|
||||
try
|
||||
{
|
||||
A a;
|
||||
reg_expression<C, T, A> e(a);
|
||||
e.set_expression(expression.c_str(), flags[2] | regbase::use_except);
|
||||
}
|
||||
catch(const boost::bad_expression&)
|
||||
{
|
||||
thrown = true;
|
||||
}
|
||||
catch(...){}
|
||||
if(!thrown)
|
||||
{
|
||||
begin_error();
|
||||
cout << "Error: expected exception not thrown" << endl;
|
||||
}
|
||||
|
||||
// now try constructor form:
|
||||
thrown = false;
|
||||
try
|
||||
{
|
||||
A a;
|
||||
reg_expression<C, T, A> e(expression.c_str(), flags[2] | regbase::use_except, a);
|
||||
}
|
||||
catch(const boost::bad_expression&)
|
||||
{
|
||||
thrown = true;
|
||||
}
|
||||
catch(...){}
|
||||
if(!thrown)
|
||||
{
|
||||
begin_error();
|
||||
cout << "Error: expected exception not thrown" << endl;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class iterator>
|
||||
iterator find_last_line(iterator start, iterator end)
|
||||
{
|
||||
iterator result = start;
|
||||
while(start != end)
|
||||
{
|
||||
if(*start == '\n')
|
||||
{
|
||||
++start;
|
||||
result = start;
|
||||
}
|
||||
else
|
||||
++start;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class iterator>
|
||||
unsigned int count_lines(iterator start, iterator end)
|
||||
{
|
||||
unsigned int result = 0;
|
||||
while(start != end)
|
||||
{
|
||||
if(*start == '\n')
|
||||
++result;
|
||||
++start;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class iterator, class Alloc>
|
||||
class grep_test_predicate
|
||||
{
|
||||
int match_id;
|
||||
iterator base, term;
|
||||
public:
|
||||
grep_test_predicate(iterator i, iterator j) : base(i), term(j) { match_id = 0; }
|
||||
~grep_test_predicate(){}
|
||||
bool operator()(const boost::match_results< iterator, Alloc >& m);
|
||||
};
|
||||
|
||||
template <class iterator, class Alloc>
|
||||
bool grep_test_predicate<iterator, Alloc>::operator()(const boost::match_results< iterator, Alloc >& m)
|
||||
{
|
||||
int start, end;
|
||||
start = m[0].first - base;
|
||||
end = m[0].second - base;
|
||||
if((matches[match_id] != start) || (matches[match_id + 1] != end))
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ grep match error: found [" << start << "," << end << "] expected [" << matches[match_id] << "," << matches[match_id+1] << "]" << endl;
|
||||
}
|
||||
|
||||
//
|
||||
// check $`:
|
||||
start = m[-1].first - base;
|
||||
end = m[-1].second - base;
|
||||
if(match_id &&
|
||||
( (end != matches[match_id]) || (start != matches[match_id - 1]) )
|
||||
)
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ grep error in $`: found [" << start << "," << end << "] expected [" << matches[match_id-1] << "," << matches[match_id] << "]" << endl;
|
||||
}
|
||||
else if((!match_id) && ((start != 0) || (end != matches[0])))
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ grep error in $`: found [" << start << "," << end << "] expected [" << 0 << "," << matches[0] << "]" << endl;
|
||||
}
|
||||
|
||||
//
|
||||
// check $':
|
||||
start = m[-2].first - base;
|
||||
end = m[-2].second - base;
|
||||
if((start != matches[match_id + 1]) || (end != (term-base)))
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ grep error in $': found [" << start << "," << end << "] expected [" << matches[match_id + 1] << "," << (term-base) << "]" << endl;
|
||||
}
|
||||
|
||||
//
|
||||
// now check line()
|
||||
start = m.line();
|
||||
end = count_lines(base, iterator(m[0].first)) + 1;
|
||||
if(start != end)
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ grep error in line(): found " << start << " expected " << end << endl;
|
||||
}
|
||||
|
||||
//
|
||||
// now check line_start()
|
||||
start = m.line_start() - base;
|
||||
end = find_last_line(base, iterator(m[0].first)) - base;
|
||||
if(start != end)
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ grep error in line_start(): found " << start << " expected " << end << endl;
|
||||
}
|
||||
|
||||
match_id += 2;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class C, class T, class A>
|
||||
void cpp_tests(const reg_expression<C, T, A>& e, bool recurse = true)
|
||||
{
|
||||
typedef typename reg_expression<C, T, A>::allocator_type allocator_type;
|
||||
if(flags[4] & REG_MERGE)
|
||||
{
|
||||
//
|
||||
// test merge code:
|
||||
//
|
||||
string_type s;
|
||||
s = regex_merge(search_text, e, format_string.c_str(), flags[3]);
|
||||
if(s != merge_string)
|
||||
{
|
||||
begin_error();
|
||||
cout << "merge result mismatch: found \"" << s.c_str() << "\" expected \"" << merge_string.c_str() << "\"" << endl;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(recurse)
|
||||
{
|
||||
// copy and assign test:
|
||||
reg_expression<C, T, A> e2(e);
|
||||
cpp_tests(e2, false);
|
||||
e2 = e;
|
||||
cpp_tests(e2, false);
|
||||
}
|
||||
|
||||
if(e.error_code())
|
||||
{
|
||||
// verify that we don't expect expression to compile
|
||||
if(search_text != BOOST_RE_STR("!"))
|
||||
{
|
||||
begin_error();
|
||||
cout << "Expression did not compile using regex++ API" << endl;
|
||||
}
|
||||
else if((recurse) && ((flags[3] & match_partial) == 0))
|
||||
cpp_eh_tests(e);
|
||||
}
|
||||
else if(flags[4] & REG_GREP)
|
||||
{
|
||||
// try to do grep:
|
||||
debug_iterator<string_type::iterator> x(search_text.begin(), search_text.begin(), search_text.end());
|
||||
debug_iterator<string_type::iterator> y(search_text.end(), search_text.begin(), search_text.end());
|
||||
grep_test_predicate<debug_iterator<string_type::iterator>, allocator_type> oi(x, y);
|
||||
regex_grep(oi, x, y, e, flags[3]);
|
||||
#if !defined(BOOST_RE_NO_PARTIAL_FUNC_SPEC) && !defined(BOOST_RE_NO_STRING_H) && !defined(BOOST_RE_NO_STRING_DEF_ARGS)
|
||||
if(!recurse)
|
||||
{
|
||||
std::basic_string<char_t> s(search_text.begin(), search_text.end());
|
||||
grep_test_predicate<std::basic_string<char_t>::const_iterator, allocator_type> oi2(s.begin(), s.end());
|
||||
regex_grep(oi2, s, e, flags[3]);
|
||||
grep_test_predicate<const char_t*, allocator_type> oi3(s.c_str(), s.c_str()+s.size());
|
||||
regex_grep(oi3, s.c_str(), e, flags[3]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
// try to find match
|
||||
match_results< debug_iterator<string_type::iterator>, allocator_type> m;
|
||||
debug_iterator<string_type::iterator> x(search_text.begin(), search_text.begin(), search_text.end());
|
||||
debug_iterator<string_type::iterator> y(search_text.end(), search_text.begin(), search_text.end());
|
||||
if(regex_search(x, y, m, e, flags[3]))
|
||||
{
|
||||
// match found compare what matched with what we expect:
|
||||
int j = 0;
|
||||
for(unsigned int i = 0; i < m.size(); ++i, j += 2)
|
||||
{
|
||||
if(m[i].matched == false)
|
||||
{
|
||||
if(matches[j] != -1)
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in sub-expression " << i <<
|
||||
", found (" << (m[i].first - x) << "," <<
|
||||
(m[i].second - x) << ") expected (" <<
|
||||
matches[j] << "," << matches[j+1] << ")" << endl;
|
||||
}
|
||||
}
|
||||
else if(((m[i].first - x) != matches[j]) || ((m[i].second - x) != matches[j+1]))
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in sub-expression " << i <<
|
||||
", found (" << (m[i].first - x) << "," <<
|
||||
(m[i].second - x) << ") expected (" <<
|
||||
matches[j] << "," << matches[j+1] << ")" << endl;
|
||||
}
|
||||
}
|
||||
//
|
||||
// now check $` and $':
|
||||
//
|
||||
if((m[-1].first != x) || (m[-1].second != m[0].first))
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in $` (match -1), found (" <<
|
||||
(m[-1].first - x) << "," << (m[-1].second - x) << ") expected (0" <<
|
||||
"," << matches[0] << ")" << endl;
|
||||
}
|
||||
if(((flags[3] & match_partial) == 0) && ((m[-2].first != m[0].second) || (m[-2].second != y)))
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in $' (match -2), found (" <<
|
||||
(m[-2].first - x) << "," << (m[-2].second - x) << ") expected (" <<
|
||||
matches[1] << "," << (y-x) << ")" << endl;
|
||||
}
|
||||
|
||||
//
|
||||
// now try alternative forms of regex_search if available:
|
||||
#if !defined(BOOST_RE_NO_PARTIAL_FUNC_SPEC) && !defined(BOOST_RE_NO_STRING_H) && !defined(BOOST_RE_NO_STRING_DEF_ARGS)
|
||||
if(!recurse)
|
||||
{
|
||||
std::basic_string<char_t> s(search_text.begin(), search_text.end());
|
||||
match_results<std::basic_string<char_t>::const_iterator> sm;
|
||||
if(regex_search(s, sm, e, flags[3]))
|
||||
{
|
||||
if(compare_result(sm, m) == false)
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in regex_search(const std::string&, match_results&, const reg_expression&, int)" << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in regex_search(const std::string&, match_results&, const reg_expression&, int)" << endl;
|
||||
}
|
||||
//
|
||||
// partial match should give same result as full match
|
||||
// provided a full match is expected:
|
||||
//
|
||||
if(matches[0] > 0)
|
||||
{
|
||||
if(regex_search(x, y, m, e, flags[3] | boost::match_partial))
|
||||
{
|
||||
if(compare_result(sm, m) == false)
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in regex_search when enabling match_partial" << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result: match not found when match_partial specified" << endl;
|
||||
}
|
||||
}
|
||||
if(s.find(char_t(0)) == std::basic_string<char_t>::npos)
|
||||
{
|
||||
match_results<const char_t*> ssm;
|
||||
if(regex_search(search_text.c_str(), ssm, e, flags[3]))
|
||||
{
|
||||
if(compare_result(ssm, m) == false)
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in regex_search(const char_t*, match_results&, const reg_expression&, int)" << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in regex_search(const char_t*, match_results&, const reg_expression&, int)" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
if((false == recurse) && (matches[0] == 0) && (matches[1] == search_text.size()))
|
||||
{
|
||||
//
|
||||
// match expected on whole string, so all versions
|
||||
// of regex_match should also succeed:
|
||||
//
|
||||
match_results< debug_iterator<string_type::iterator>, allocator_type> m1;
|
||||
debug_iterator<string_type::iterator> x1(search_text.begin(), search_text.begin(), search_text.end());
|
||||
debug_iterator<string_type::iterator> y1(search_text.end(), search_text.begin(), search_text.end());
|
||||
if(regex_match(x1, y1, m1, e, flags[3]))
|
||||
{
|
||||
if(compare_result(m1, m) == false)
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in regex_match(iterator, iterator, match_results&, const reg_expression&, int)" << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in regex_match(iterator, iterator, match_results&, const reg_expression&, int)" << endl;
|
||||
}
|
||||
std::basic_string<char_t> s(search_text.begin(), search_text.end());
|
||||
match_results<std::basic_string<char_t>::const_iterator> sm;
|
||||
if(regex_match(s, sm, e, flags[3]))
|
||||
{
|
||||
if(compare_result(sm, m) == false)
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in regex_match(const std::string&, match_results&, const reg_expression&, int)" << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in regex_match(const std::string&, match_results&, const reg_expression&, int)" << endl;
|
||||
}
|
||||
if(s.find(char_t(0)) == std::basic_string<char_t>::npos)
|
||||
{
|
||||
match_results<const char_t*> ssm;
|
||||
if(regex_match(search_text.c_str(), ssm, e, flags[3]))
|
||||
{
|
||||
if(compare_result(ssm, m) == false)
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in regex_match(const char_t*, match_results&, const reg_expression&, int)" << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
begin_error();
|
||||
cout << "regex++ API result mismatch in regex_match(const char_t*, match_results&, const reg_expression&, int)" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
// match not found
|
||||
if(matches[0] != -1)
|
||||
{
|
||||
begin_error();
|
||||
cout << "Match expected but not found using regex++ API" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(TEST_UNICODE)
|
||||
|
||||
unsigned int hl_match_id;
|
||||
|
||||
bool hl_grep_test_proc(const RegEx& e)
|
||||
{
|
||||
int start, end;
|
||||
start = e.Position(0);
|
||||
end = start + e.Length();
|
||||
if((matches[hl_match_id] != start) || (matches[hl_match_id + 1] != end))
|
||||
{
|
||||
begin_error();
|
||||
cout << "class RegEx grep match error: found [" << start << "," << end << "] expected [" << matches[hl_match_id] << "," << matches[hl_match_id+1] << "]" << endl;
|
||||
}
|
||||
|
||||
//
|
||||
// check $`:
|
||||
start = e.Position(-1);
|
||||
end = start + e.Length(-1);
|
||||
if(start == -1)
|
||||
{
|
||||
if(hl_match_id &&
|
||||
( matches[hl_match_id] != matches[hl_match_id - 1] )
|
||||
)
|
||||
{
|
||||
begin_error();
|
||||
cout << "class RegEx grep error in $`: found [" << start << "," << end << "] expected [" << matches[hl_match_id-1] << "," << matches[hl_match_id] << "]" << endl;
|
||||
}
|
||||
else if((!hl_match_id) && (0 != matches[0]))
|
||||
{
|
||||
begin_error();
|
||||
cout << "class RegEx grep error in $`: found [" << start << "," << end << "] expected [" << 0 << "," << matches[0] << "]" << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(hl_match_id &&
|
||||
( (end != matches[hl_match_id]) || (start != matches[hl_match_id - 1]) )
|
||||
)
|
||||
{
|
||||
begin_error();
|
||||
cout << "class RegEx grep error in $`: found [" << start << "," << end << "] expected [" << matches[hl_match_id-1] << "," << matches[hl_match_id] << "]" << endl;
|
||||
}
|
||||
else if((!hl_match_id) && ((start != 0) || (end != matches[0])))
|
||||
{
|
||||
begin_error();
|
||||
cout << "class RegEx grep error in $`: found [" << start << "," << end << "] expected [" << 0 << "," << matches[0] << "]" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// check $':
|
||||
start = e.Position(-2);
|
||||
end = start + e.Length(-2);
|
||||
if(start == -1)
|
||||
{
|
||||
if(matches[hl_match_id + 1] != (int)search_text.size())
|
||||
{
|
||||
begin_error();
|
||||
cout << "class RegEx grep error in $': found [" << start << "," << end << "] expected [" << matches[hl_match_id + 1] << "," << (search_text.size()) << "]" << endl;
|
||||
}
|
||||
}
|
||||
else if((start != matches[hl_match_id + 1]) || (end != (int)search_text.size()))
|
||||
{
|
||||
begin_error();
|
||||
cout << "class RegEx grep error in $': found [" << start << "," << end << "] expected [" << matches[hl_match_id + 1] << "," << (search_text.size()) << "]" << endl;
|
||||
}
|
||||
|
||||
hl_match_id += 2;
|
||||
return true;
|
||||
}
|
||||
|
||||
void cpp_hl_tests(RegEx& e, bool recurse = true)
|
||||
{
|
||||
if(flags[4] & REG_MERGE)
|
||||
return;
|
||||
|
||||
if(recurse)
|
||||
{
|
||||
// copy and assign test:
|
||||
RegEx e2(e);
|
||||
cpp_hl_tests(e2, false);
|
||||
e2 = e;
|
||||
cpp_hl_tests(e2, false);
|
||||
}
|
||||
|
||||
if(flags[4] & REG_GREP)
|
||||
{
|
||||
// try to do grep:
|
||||
hl_match_id = 0;
|
||||
GrepCallback cb = hl_grep_test_proc;
|
||||
e.Grep(cb, search_text.c_str(), flags[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(e.Search(search_text.c_str(), flags[3]))
|
||||
{
|
||||
unsigned int i = 0;
|
||||
unsigned int j = 0;
|
||||
while(matches[j] != -2)
|
||||
{
|
||||
if( (matches[j] != (int)e.Position(i)) || (matches[j+1] - matches[j] != (int)e.Length(i)) )
|
||||
{
|
||||
begin_error();
|
||||
cout << "RegEx::Search error in subexpression " << i << ": found [" << e.Position(i) << "," << (e.Position(i) + e.Length(i)) << "] expected [" << matches[j] << "," << matches[j+1] << "]" << endl;
|
||||
}
|
||||
++i;
|
||||
j += 2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(matches[0] != -1)
|
||||
{
|
||||
begin_error();
|
||||
cout << "match expected but not found with RexEx::Search" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
if((matches[0] == 0) && (e.Match(search_text.c_str(), flags[3])))
|
||||
{
|
||||
unsigned int i = 0;
|
||||
unsigned int j = 0;
|
||||
while(matches[j] != -2)
|
||||
{
|
||||
if( (matches[j] != (int)e.Position(i)) || (matches[j+1] - matches[j] != (int)e.Length(i)) )
|
||||
{
|
||||
begin_error();
|
||||
cout << "RegEx::Match error in subexpression " << i << ": found [" << e.Position(i) << "," << (e.Position(i) + e.Length(i)) << "] expected [" << matches[j] << "," << matches[j+1] << "]" << endl;
|
||||
}
|
||||
++i;
|
||||
j += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class iterator>
|
||||
bool has_nulls(iterator i, iterator j)
|
||||
{
|
||||
while(i != j)
|
||||
{
|
||||
if(*i == 0)
|
||||
return true;
|
||||
++i;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef TEST_UNICODE
|
||||
#undef regcomp
|
||||
#undef regerror
|
||||
#undef regexec
|
||||
#undef regfree
|
||||
#undef regex_t
|
||||
#define regcomp regcompW
|
||||
#define regerror regerrorW
|
||||
#define regexec regexecW
|
||||
#define regfree regfreeW
|
||||
#define regex_t regex_tW
|
||||
#endif
|
||||
|
||||
|
||||
void run_tests()
|
||||
{
|
||||
#ifndef TEST_UNICODE
|
||||
if(flags[4] & REG_UNICODE_ONLY)
|
||||
return;
|
||||
#endif
|
||||
#ifndef NO_CPP_TEST
|
||||
try
|
||||
{
|
||||
unsigned int f = flags[2] & ~regbase::use_except;
|
||||
if(flags[0] & REG_ICASE)
|
||||
f |= regbase::icase;
|
||||
re_type e(expression.c_str(), f);
|
||||
cpp_tests(e, true);
|
||||
}
|
||||
#ifndef BOOST_RE_NO_EXCEPTION_H
|
||||
catch(const std::exception& e)
|
||||
{
|
||||
//
|
||||
// this is only an error if the expression is expected to be valid:
|
||||
if(search_text != BOOST_RE_STR("!"))
|
||||
{
|
||||
begin_error();
|
||||
cout << "Unexpected exception thrown from C++ library: " << e.what() << endl;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
catch(...)
|
||||
{
|
||||
begin_error();
|
||||
cout << "Unexpected exception thrown from C++ library" << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(TEST_UNICODE)
|
||||
try
|
||||
{
|
||||
if(((flags[3] & match_partial) == 0) && (flags[2] == regbase::normal) && (has_nulls(search_text.begin(), search_text.end()) == false))
|
||||
{
|
||||
RegEx e;
|
||||
e.SetExpression(expression.c_str(), flags[0] & REG_ICASE);
|
||||
cpp_hl_tests(e, true);
|
||||
}
|
||||
}
|
||||
catch(const std::exception& )
|
||||
{
|
||||
if(search_text != BOOST_RE_STR("!"))
|
||||
{
|
||||
begin_error();
|
||||
cout << "Expression did not compile with class RegEx" << endl;
|
||||
}
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
begin_error();
|
||||
cout << "Unexpected exception thrown from RegEx::SetExpression" << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(flags[4] & (REG_NO_POSIX_TEST | REG_GREP | REG_MERGE | REG_MERGE_COPY))
|
||||
return;
|
||||
regex_t posix_expression;
|
||||
regmatch_t m[MAX_MATCHES];
|
||||
if(regcomp(&posix_expression, expression.c_str(), flags[0]) == 0)
|
||||
{
|
||||
if(flags[1] & REG_STARTEND)
|
||||
{
|
||||
m[0].rm_so = 0;
|
||||
m[0].rm_eo = search_text.size();
|
||||
}
|
||||
if(regexec(&posix_expression, search_text.c_str(), MAX_MATCHES, m, flags[1]))
|
||||
{
|
||||
// match not found
|
||||
if(matches[0] != -1)
|
||||
{
|
||||
begin_error();
|
||||
cout << "Match expected but not found using POSIX API" << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// match found compare what matched with what we expect:
|
||||
int j = 0;
|
||||
for(unsigned int i = 0; i <= posix_expression.re_nsub; ++i, j += 2)
|
||||
{
|
||||
if((m[i].rm_so != matches[j]) || (m[i].rm_eo != matches[j+1]))
|
||||
{
|
||||
begin_error();
|
||||
cout << "POSIX API result mismatch in sub-expression " << i << ", found (" << m[i].rm_so << "," << m[i].rm_eo <<
|
||||
") expected (" << matches[j] << "," << matches[j+1] << ")" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
regfree(&posix_expression);
|
||||
}
|
||||
else
|
||||
{
|
||||
// expression did not compile
|
||||
if(search_text != BOOST_RE_STR("!"))
|
||||
{
|
||||
begin_error();
|
||||
cout << "Expression did not compile using POSIX API" << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// error reporting:
|
||||
int last_line = 0;
|
||||
|
||||
void begin_error()
|
||||
{
|
||||
if(line != last_line)
|
||||
{
|
||||
cout << "Error in line " << line << " of file " << file << endl;
|
||||
cout << "Expression: " << expression.c_str() << endl;
|
||||
cout << "Search text: " << search_text.c_str() << endl;
|
||||
cout << "Flags: ";
|
||||
bool started = false;
|
||||
unsigned int id = 0;
|
||||
while(flag_data[id].len != 0)
|
||||
{
|
||||
if(flags[flag_data[id].id] & flag_data[id].value)
|
||||
{
|
||||
if(started)
|
||||
cout << " | ";
|
||||
cout << flag_data[id].name;
|
||||
started = true;
|
||||
}
|
||||
++id;
|
||||
}
|
||||
cout << endl;
|
||||
last_line = line;
|
||||
++error_count;
|
||||
}
|
||||
}
|
||||
|
||||
void reset_error()
|
||||
{
|
||||
last_line = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,870 +0,0 @@
|
||||
;
|
||||
;
|
||||
; this file contains a script of tests to run through regress.exe
|
||||
;
|
||||
; comments start with a semicolon and proceed to the end of the line
|
||||
;
|
||||
; changes to regular expression compile flags start with a "-" as the first
|
||||
; non-whitespace character and consist of a list of the printable names
|
||||
; of the flags, for example "match_default"
|
||||
;
|
||||
; Other lines contain a test to perform using the current flag status
|
||||
; the first token contains the expression to compile, the second the string
|
||||
; to match it against. If the second string is "!" then the expression should
|
||||
; not compile, that is the first string is an invalid regular expression.
|
||||
; This is then followed by a list of integers that specify what should match,
|
||||
; each pair represents the starting and ending positions of a subexpression
|
||||
; starting with the zeroth subexpression (the whole match).
|
||||
; A value of -1 indicates that the subexpression should not take part in the
|
||||
; match at all, if the first value is -1 then no part of the expression should
|
||||
; match the string.
|
||||
;
|
||||
|
||||
- match_default normal REG_EXTENDED
|
||||
|
||||
;
|
||||
; try some really simple literals:
|
||||
a a 0 1
|
||||
Z Z 0 1
|
||||
Z aaa -1 -1
|
||||
Z xxxxZZxxx 4 5
|
||||
|
||||
; and some simple brackets:
|
||||
(a) zzzaazz 3 4 3 4
|
||||
() zzz 0 0 0 0
|
||||
() "" 0 0 0 0
|
||||
( !
|
||||
) !
|
||||
(aa !
|
||||
aa) !
|
||||
a b -1 -1
|
||||
\(\) () 0 2
|
||||
\(a\) (a) 0 3
|
||||
\() !
|
||||
(\) !
|
||||
p(a)rameter ABCparameterXYZ 3 12 4 5
|
||||
[pq](a)rameter ABCparameterXYZ 3 12 4 5
|
||||
|
||||
; now try escaped brackets:
|
||||
- match_default bk_parens REG_BASIC
|
||||
\(a\) zzzaazz 3 4 3 4
|
||||
\(\) zzz 0 0 0 0
|
||||
\(\) "" 0 0 0 0
|
||||
\( !
|
||||
\) !
|
||||
\(aa !
|
||||
aa\) !
|
||||
() () 0 2
|
||||
(a) (a) 0 3
|
||||
(\) !
|
||||
\() !
|
||||
|
||||
; now move on to "." wildcards
|
||||
- match_default normal REG_EXTENDED REG_STARTEND
|
||||
. a 0 1
|
||||
. \n 0 1
|
||||
. \r 0 1
|
||||
. \0 0 1
|
||||
- match_default normal match_not_dot_newline REG_EXTENDED REG_STARTEND REG_NEWLINE
|
||||
. a 0 1
|
||||
. \n -1 -1
|
||||
. \r -1 -1
|
||||
. \0 0 1
|
||||
- match_default normal match_not_dot_null match_not_dot_newline REG_EXTENDED REG_STARTEND REG_NEWLINE
|
||||
. \n -1 -1
|
||||
. \r -1 -1
|
||||
; this *WILL* produce an error from the POSIX API functions:
|
||||
- match_default normal match_not_dot_null match_not_dot_newline REG_EXTENDED REG_STARTEND REG_NEWLINE REG_NO_POSIX_TEST
|
||||
. \0 -1 -1
|
||||
|
||||
|
||||
;
|
||||
; now move on to the repetion ops,
|
||||
; starting with operator *
|
||||
- match_default normal REG_EXTENDED
|
||||
a* b 0 0
|
||||
ab* a 0 1
|
||||
ab* ab 0 2
|
||||
ab* sssabbbbbbsss 3 10
|
||||
ab*c* a 0 1
|
||||
ab*c* abbb 0 4
|
||||
ab*c* accc 0 4
|
||||
ab*c* abbcc 0 5
|
||||
*a !
|
||||
\<* !
|
||||
\>* !
|
||||
\n* \n\n 0 2
|
||||
\** ** 0 2
|
||||
\* * 0 1
|
||||
|
||||
; now try operator +
|
||||
ab+ a -1 -1
|
||||
ab+ ab 0 2
|
||||
ab+ sssabbbbbbsss 3 10
|
||||
ab+c+ a -1 -1
|
||||
ab+c+ abbb -1 -1
|
||||
ab+c+ accc -1 -1
|
||||
ab+c+ abbcc 0 5
|
||||
+a !
|
||||
\<+ !
|
||||
\>+ !
|
||||
\n+ \n\n 0 2
|
||||
\+ + 0 1
|
||||
\+ ++ 0 1
|
||||
\++ ++ 0 2
|
||||
- match_default normal bk_plus_qm REG_EXTENDED REG_NO_POSIX_TEST
|
||||
+ + 0 1
|
||||
\+ !
|
||||
a\+ aa 0 2
|
||||
|
||||
; now try operator ?
|
||||
- match_default normal REG_EXTENDED
|
||||
a? b 0 0
|
||||
ab? a 0 1
|
||||
ab? ab 0 2
|
||||
ab? sssabbbbbbsss 3 5
|
||||
ab?c? a 0 1
|
||||
ab?c? abbb 0 2
|
||||
ab?c? accc 0 2
|
||||
ab?c? abcc 0 3
|
||||
?a !
|
||||
\<? !
|
||||
\>? !
|
||||
\n? \n\n 0 1
|
||||
\? ? 0 1
|
||||
\? ?? 0 1
|
||||
\?? ?? 0 1
|
||||
- match_default normal bk_plus_qm REG_EXTENDED REG_NO_POSIX_TEST
|
||||
? ? 0 1
|
||||
\? !
|
||||
a\? aa 0 1
|
||||
a\? b 0 0
|
||||
|
||||
- match_default normal limited_ops
|
||||
a? a? 0 2
|
||||
a+ a+ 0 2
|
||||
a\? a? 0 2
|
||||
a\+ a+ 0 2
|
||||
|
||||
; now try operator {}
|
||||
- match_default normal REG_EXTENDED
|
||||
a{2} a -1 -1
|
||||
a{2} aa 0 2
|
||||
a{2} aaa 0 2
|
||||
a{2,} a -1 -1
|
||||
a{2,} aa 0 2
|
||||
a{2,} aaaaa 0 5
|
||||
a{2,4} a -1 -1
|
||||
a{2,4} aa 0 2
|
||||
a{2,4} aaa 0 3
|
||||
a{2,4} aaaa 0 4
|
||||
a{2,4} aaaaa 0 4
|
||||
; spaces are now allowed inside {}
|
||||
"a{ 2 , 4 }" aaaaa 0 4
|
||||
a{} !
|
||||
"a{ }" !
|
||||
a{2 !
|
||||
a} !
|
||||
\{\} {} 0 2
|
||||
|
||||
- match_default normal bk_braces
|
||||
a\{2\} a -1 -1
|
||||
a\{2\} aa 0 2
|
||||
a\{2\} aaa 0 2
|
||||
a\{2,\} a -1 -1
|
||||
a\{2,\} aa 0 2
|
||||
a\{2,\} aaaaa 0 5
|
||||
a\{2,4\} a -1 -1
|
||||
a\{2,4\} aa 0 2
|
||||
a\{2,4\} aaa 0 3
|
||||
a\{2,4\} aaaa 0 4
|
||||
a\{2,4\} aaaaa 0 4
|
||||
"a\{ 2 , 4 \}" aaaaa 0 4
|
||||
{} {} 0 2
|
||||
|
||||
; now test the alternation operator |
|
||||
- match_default normal REG_EXTENDED
|
||||
a|b a 0 1
|
||||
a|b b 0 1
|
||||
a(b|c) ab 0 2 1 2
|
||||
a(b|c) ac 0 2 1 2
|
||||
a(b|c) ad -1 -1 -1 -1
|
||||
|c !
|
||||
c| !
|
||||
(|) !
|
||||
(a|) !
|
||||
(|a) !
|
||||
a\| a| 0 2
|
||||
- match_default normal limited_ops
|
||||
a| a| 0 2
|
||||
a\| a| 0 2
|
||||
| | 0 1
|
||||
- match_default normal bk_vbar REG_NO_POSIX_TEST
|
||||
a| a| 0 2
|
||||
a\|b a 0 1
|
||||
a\|b b 0 1
|
||||
|
||||
; now test the set operator []
|
||||
- match_default normal REG_EXTENDED
|
||||
; try some literals first
|
||||
[abc] a 0 1
|
||||
[abc] b 0 1
|
||||
[abc] c 0 1
|
||||
[abc] d -1 -1
|
||||
[^bcd] a 0 1
|
||||
[^bcd] b -1 -1
|
||||
[^bcd] d -1 -1
|
||||
[^bcd] e 0 1
|
||||
a[b]c abc 0 3
|
||||
a[ab]c abc 0 3
|
||||
a[^ab]c adc 0 3
|
||||
a[]b]c a]c 0 3
|
||||
a[[b]c a[c 0 3
|
||||
a[-b]c a-c 0 3
|
||||
a[^]b]c adc 0 3
|
||||
a[^-b]c adc 0 3
|
||||
a[b-]c a-c 0 3
|
||||
a[b !
|
||||
a[] !
|
||||
|
||||
; then some ranges
|
||||
[b-e] a -1 -1
|
||||
[b-e] b 0 1
|
||||
[b-e] e 0 1
|
||||
[b-e] f -1 -1
|
||||
[^b-e] a 0 1
|
||||
[^b-e] b -1 -1
|
||||
[^b-e] e -1 -1
|
||||
[^b-e] f 0 1
|
||||
a[1-3]c a2c 0 3
|
||||
a[3-1]c !
|
||||
a[1-3-5]c !
|
||||
a[1- !
|
||||
|
||||
; and some classes
|
||||
a[[:alpha:]]c abc 0 3
|
||||
a[[:unknown:]]c !
|
||||
a[[: !
|
||||
a[[:alpha !
|
||||
a[[:alpha:] !
|
||||
a[[:alpha,:] !
|
||||
a[[:]:]]b !
|
||||
a[[:-:]]b !
|
||||
a[[:alph:]] !
|
||||
a[[:alphabet:]] !
|
||||
[[:alnum:]]+ -%@a0X- 3 6
|
||||
[[:alpha:]]+ -%@aX0- 3 5
|
||||
[[:blank:]]+ "a \tb" 1 4
|
||||
[[:cntrl:]]+ a\n\tb 1 3
|
||||
[[:digit:]]+ a019b 1 4
|
||||
[[:graph:]]+ " a%b " 1 4
|
||||
[[:lower:]]+ AabC 1 3
|
||||
; 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
|
||||
[[:xdigit:]]+ p0f3Cx 1 5
|
||||
|
||||
; now test flag settings:
|
||||
- escape_in_lists REG_NO_POSIX_TEST
|
||||
[\n] \n 0 1
|
||||
- REG_NO_POSIX_TEST
|
||||
[\n] \n -1 -1
|
||||
[\n] \\ 0 1
|
||||
[[:class:] : 0 1
|
||||
[[:class:] [ 0 1
|
||||
[[:class:] c 0 1
|
||||
|
||||
; line anchors
|
||||
- match_default normal REG_EXTENDED
|
||||
^ab ab 0 2
|
||||
^ab xxabxx -1 -1
|
||||
^ab xx\nabzz 3 5
|
||||
ab$ ab 0 2
|
||||
ab$ abxx -1 -1
|
||||
ab$ ab\nzz 0 2
|
||||
- match_default match_not_bol match_not_eol normal REG_EXTENDED REG_NOTBOL REG_NOTEOL
|
||||
^ab ab -1 -1
|
||||
^ab xxabxx -1 -1
|
||||
^ab xx\nabzz 3 5
|
||||
ab$ ab -1 -1
|
||||
ab$ abxx -1 -1
|
||||
ab$ ab\nzz 0 2
|
||||
|
||||
; back references
|
||||
- match_default normal REG_EXTENDED
|
||||
a(b)\2c !
|
||||
a(b\1)c !
|
||||
a(b*)c\1d abbcbbd 0 7 1 3
|
||||
a(b*)c\1d abbcbd -1 -1
|
||||
a(b*)c\1d abbcbbbd -1 -1
|
||||
^(.)\1 abc -1 -1
|
||||
a([bc])\1d abcdabbd 4 8 5 6
|
||||
; strictly speaking this is at best ambiguous, at worst wrong, this is what most
|
||||
; re implimentations will match though.
|
||||
a(([bc])\2)*d abbccd 0 6 3 5 3 4
|
||||
|
||||
a(([bc])\2)*d abbcbd -1 -1
|
||||
a((b)*\2)*d abbbd 0 5 1 4 2 3
|
||||
(ab*)[ab]*\1 ababaaa 0 7 0 1
|
||||
(a)\1bcd aabcd 0 5 0 1
|
||||
(a)\1bc*d aabcd 0 5 0 1
|
||||
(a)\1bc*d aabd 0 4 0 1
|
||||
(a)\1bc*d aabcccd 0 7 0 1
|
||||
(a)\1bc*[ce]d aabcccd 0 7 0 1
|
||||
^(a)\1b(c)*cd$ aabcccd 0 7 0 1 4 5
|
||||
|
||||
;
|
||||
; characters by code:
|
||||
- match_default normal REG_EXTENDED REG_STARTEND
|
||||
\0101 A 0 1
|
||||
\00 \0 0 1
|
||||
\0 \0 0 1
|
||||
\0172 z 0 1
|
||||
|
||||
;
|
||||
; word operators:
|
||||
\w a 0 1
|
||||
\w z 0 1
|
||||
\w A 0 1
|
||||
\w Z 0 1
|
||||
\w _ 0 1
|
||||
\w } -1 -1
|
||||
\w ` -1 -1
|
||||
\w [ -1 -1
|
||||
\w @ -1 -1
|
||||
; non-word:
|
||||
\W a -1 -1
|
||||
\W z -1 -1
|
||||
\W A -1 -1
|
||||
\W Z -1 -1
|
||||
\W _ -1 -1
|
||||
\W } 0 1
|
||||
\W ` 0 1
|
||||
\W [ 0 1
|
||||
\W @ 0 1
|
||||
; word start:
|
||||
\<abcd " abcd" 2 6
|
||||
\<ab cab -1 -1
|
||||
\<ab "\nab" 1 3
|
||||
\<tag ::tag 2 5
|
||||
;word end:
|
||||
abc\> abc 0 3
|
||||
abc\> abcd -1 -1
|
||||
abc\> abc\n 0 3
|
||||
abc\> abc:: 0 3
|
||||
; word boundary:
|
||||
\babcd " abcd" 2 6
|
||||
\bab cab -1 -1
|
||||
\bab "\nab" 1 3
|
||||
\btag ::tag 2 5
|
||||
abc\b abc 0 3
|
||||
abc\b abcd -1 -1
|
||||
abc\b abc\n 0 3
|
||||
abc\b abc:: 0 3
|
||||
; within word:
|
||||
\B ab 1 1
|
||||
a\Bb ab 0 2
|
||||
a\B ab 0 1
|
||||
a\B a -1 -1
|
||||
a\B "a " -1 -1
|
||||
|
||||
;
|
||||
; buffer operators:
|
||||
\`abc abc 0 3
|
||||
\`abc \nabc -1 -1
|
||||
\`abc " abc" -1 -1
|
||||
abc\' abc 0 3
|
||||
abc\' abc\n -1 -1
|
||||
abc\' "abc " -1 -1
|
||||
|
||||
;
|
||||
; extra escape sequences:
|
||||
\a \a 0 1
|
||||
\f \f 0 1
|
||||
\n \n 0 1
|
||||
\r \r 0 1
|
||||
\t \t 0 1
|
||||
\v \v 0 1
|
||||
|
||||
|
||||
;
|
||||
; now follows various complex expressions designed to try and bust the matcher:
|
||||
a(((b)))c abc 0 3 1 2 1 2 1 2
|
||||
a(b|(c))d abd 0 3 1 2 -1 -1
|
||||
a(b|(c))d acd 0 3 1 2 1 2
|
||||
a(b*|c)d abbd 0 4 1 3
|
||||
; just gotta have one DFA-buster, of course
|
||||
a[ab]{20} aaaaabaaaabaaaabaaaab 0 21
|
||||
; and an inline expansion in case somebody gets tricky
|
||||
a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab] aaaaabaaaabaaaabaaaab 0 21
|
||||
; and in case somebody just slips in an NFA...
|
||||
a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab](wee|week)(knights|night) aaaaabaaaabaaaabaaaabweeknights 0 31 21 24 24 31
|
||||
; one really big one
|
||||
1234567890123456789012345678901234567890123456789012345678901234567890 a1234567890123456789012345678901234567890123456789012345678901234567890b 1 71
|
||||
; fish for problems as brackets go past 8
|
||||
[ab][cd][ef][gh][ij][kl][mn] xacegikmoq 1 8
|
||||
[ab][cd][ef][gh][ij][kl][mn][op] xacegikmoq 1 9
|
||||
[ab][cd][ef][gh][ij][kl][mn][op][qr] xacegikmoqy 1 10
|
||||
[ab][cd][ef][gh][ij][kl][mn][op][q] xacegikmoqy 1 10
|
||||
; and as parenthesis go past 9:
|
||||
(a)(b)(c)(d)(e)(f)(g)(h) zabcdefghi 1 9 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9
|
||||
(a)(b)(c)(d)(e)(f)(g)(h)(i) zabcdefghij 1 10 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10
|
||||
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j) zabcdefghijk 1 11 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11
|
||||
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k) zabcdefghijkl 1 12 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12
|
||||
(a)d|(b)c abc 1 3 -1 -1 1 2
|
||||
"_+((www)|(ftp)|(mailto)):_*" "_wwwnocolon _mailto:" 12 20 13 19 -1 -1 -1 -1 13 19
|
||||
|
||||
; subtleties of matching
|
||||
a(b)?c\1d acd 0 3 -1 -1
|
||||
a(b?c)+d accd 0 4 2 3
|
||||
(wee|week)(knights|night) weeknights 0 10 0 3 3 10
|
||||
.* abc 0 3
|
||||
a(b|(c))d abd 0 3 1 2 -1 -1
|
||||
a(b|(c))d acd 0 3 1 2 1 2
|
||||
a(b*|c|e)d abbd 0 4 1 3
|
||||
a(b*|c|e)d acd 0 3 1 2
|
||||
a(b*|c|e)d ad 0 2 1 1
|
||||
a(b?)c abc 0 3 1 2
|
||||
a(b?)c ac 0 2 1 1
|
||||
a(b+)c abc 0 3 1 2
|
||||
a(b+)c abbbc 0 5 1 4
|
||||
a(b*)c ac 0 2 1 1
|
||||
(a|ab)(bc([de]+)f|cde) abcdef 0 6 0 1 1 6 3 5
|
||||
a([bc]?)c abc 0 3 1 2
|
||||
a([bc]?)c ac 0 2 1 1
|
||||
a([bc]+)c abc 0 3 1 2
|
||||
a([bc]+)c abcc 0 4 1 3
|
||||
a([bc]+)bc abcbc 0 5 1 3
|
||||
a(bb+|b)b abb 0 3 1 2
|
||||
a(bbb+|bb+|b)b abb 0 3 1 2
|
||||
a(bbb+|bb+|b)b abbb 0 4 1 3
|
||||
a(bbb+|bb+|b)bb abbb 0 4 1 2
|
||||
(.*).* abcdef 0 6 0 6
|
||||
(a*)* bc 0 0 0 0
|
||||
|
||||
; do we get the right subexpression when it is used more than once?
|
||||
a(b|c)*d ad 0 2 -1 -1
|
||||
a(b|c)*d abcd 0 4 2 3
|
||||
a(b|c)+d abd 0 3 1 2
|
||||
a(b|c)+d abcd 0 4 2 3
|
||||
a(b|c?)+d ad 0 2 1 1
|
||||
a(b|c?)+d abcd 0 4 2 3
|
||||
a(b|c){0,0}d ad 0 2 -1 -1
|
||||
a(b|c){0,1}d ad 0 2 -1 -1
|
||||
a(b|c){0,1}d abd 0 3 1 2
|
||||
a(b|c){0,2}d ad 0 2 -1 -1
|
||||
a(b|c){0,2}d abcd 0 4 2 3
|
||||
a(b|c){0,}d ad 0 2 -1 -1
|
||||
a(b|c){0,}d abcd 0 4 2 3
|
||||
a(b|c){1,1}d abd 0 3 1 2
|
||||
a(b|c){1,2}d abd 0 3 1 2
|
||||
a(b|c){1,2}d abcd 0 4 2 3
|
||||
a(b|c){1,}d abd 0 3 1 2
|
||||
a(b|c){1,}d abcd 0 4 2 3
|
||||
a(b|c){2,2}d acbd 0 4 2 3
|
||||
a(b|c){2,2}d abcd 0 4 2 3
|
||||
a(b|c){2,4}d abcd 0 4 2 3
|
||||
a(b|c){2,4}d abcbd 0 5 3 4
|
||||
a(b|c){2,4}d abcbcd 0 6 4 5
|
||||
a(b|c){2,}d abcd 0 4 2 3
|
||||
a(b|c){2,}d abcbd 0 5 3 4
|
||||
a(b+|((c)*))+d abd 0 3 1 2 -1 -1 -1 -1
|
||||
a(b+|((c)*))+d abcd 0 4 2 3 2 3 2 3
|
||||
|
||||
- match_default normal REG_EXTENDED REG_STARTEND REG_NOSPEC literal
|
||||
\**?/{} \\**?/{} 0 7
|
||||
|
||||
- match_default normal REG_EXTENDED REG_NO_POSIX_TEST ; we disable POSIX testing because it can't handle escapes in sets
|
||||
; try to match C++ syntax elements:
|
||||
; line comment:
|
||||
//[^\n]* "++i //here is a line comment\n" 4 28
|
||||
; block comment:
|
||||
/\*([^*]|\*+[^*/])*\*+/ "/* here is a block comment */" 0 29 26 27
|
||||
/\*([^*]|\*+[^*/])*\*+/ "/**/" 0 4 -1 -1
|
||||
/\*([^*]|\*+[^*/])*\*+/ "/***/" 0 5 -1 -1
|
||||
/\*([^*]|\*+[^*/])*\*+/ "/****/" 0 6 -1 -1
|
||||
/\*([^*]|\*+[^*/])*\*+/ "/*****/" 0 7 -1 -1
|
||||
/\*([^*]|\*+[^*/])*\*+/ "/*****/*/" 0 7 -1 -1
|
||||
; preprossor directives:
|
||||
^[[:blank:]]*#([^\n]*\\[[:space:]]+)*[^\n]* "#define some_symbol" 0 19 -1 -1
|
||||
^[[:blank:]]*#([^\n]*\\[[:space:]]+)*[^\n]* "#define some_symbol(x) #x" 0 25 -1 -1
|
||||
^[[:blank:]]*#([^\n]*\\[[:space:]]+)*[^\n]* "#define some_symbol(x) \\ \r\n foo();\\\r\n printf(#x);" 0 53 28 42
|
||||
; literals:
|
||||
((0x[[:xdigit:]]+)|([[:digit:]]+))u?((int(8|16|32|64))|L)? 0xFF 0 4 0 4 0 4 -1 -1 -1 -1 -1 -1 -1 -1
|
||||
((0x[[:xdigit:]]+)|([[:digit:]]+))u?((int(8|16|32|64))|L)? 35 0 2 0 2 -1 -1 0 2 -1 -1 -1 -1 -1 -1
|
||||
((0x[[:xdigit:]]+)|([[:digit:]]+))u?((int(8|16|32|64))|L)? 0xFFu 0 5 0 4 0 4 -1 -1 -1 -1 -1 -1 -1 -1
|
||||
((0x[[:xdigit:]]+)|([[:digit:]]+))u?((int(8|16|32|64))|L)? 0xFFL 0 5 0 4 0 4 -1 -1 4 5 -1 -1 -1 -1
|
||||
((0x[[:xdigit:]]+)|([[:digit:]]+))u?((int(8|16|32|64))|L)? 0xFFFFFFFFFFFFFFFFuint64 0 24 0 18 0 18 -1 -1 19 24 19 24 22 24
|
||||
; strings:
|
||||
'([^\\']|\\.)*' '\\x3A' 0 6 4 5
|
||||
'([^\\']|\\.)*' '\\'' 0 4 1 3
|
||||
'([^\\']|\\.)*' '\\n' 0 4 1 3
|
||||
|
||||
; now try and test some unicode specific characters:
|
||||
- match_default normal REG_EXTENDED REG_UNICODE_ONLY
|
||||
[[:unicode:]]+ a\0300\0400z 1 3
|
||||
|
||||
; finally try some case insensitive matches:
|
||||
- match_default normal REG_EXTENDED REG_ICASE
|
||||
; upper and lower have no meaning here so they fail, however these
|
||||
; may compile with other libraries...
|
||||
;[[:lower:]] !
|
||||
;[[:upper:]] !
|
||||
0123456789@abcdefghijklmnopqrstuvwxyz\[\\\]\^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ\{\|\} 0123456789@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]\^_`abcdefghijklmnopqrstuvwxyz\{\|\} 0 72
|
||||
|
||||
; known and suspected bugs:
|
||||
- match_default normal REG_EXTENDED
|
||||
\( ( 0 1
|
||||
\) ) 0 1
|
||||
\$ $ 0 1
|
||||
\^ ^ 0 1
|
||||
\. . 0 1
|
||||
\* * 0 1
|
||||
\+ + 0 1
|
||||
\? ? 0 1
|
||||
\[ [ 0 1
|
||||
\] ] 0 1
|
||||
\| | 0 1
|
||||
\\ \\ 0 1
|
||||
# # 0 1
|
||||
\# # 0 1
|
||||
a- a- 0 2
|
||||
\- - 0 1
|
||||
\{ { 0 1
|
||||
\} } 0 1
|
||||
0 0 0 1
|
||||
1 1 0 1
|
||||
9 9 0 1
|
||||
b b 0 1
|
||||
B B 0 1
|
||||
< < 0 1
|
||||
> > 0 1
|
||||
w w 0 1
|
||||
W W 0 1
|
||||
` ` 0 1
|
||||
' ' 0 1
|
||||
\n \n 0 1
|
||||
, , 0 1
|
||||
a a 0 1
|
||||
f f 0 1
|
||||
n n 0 1
|
||||
r r 0 1
|
||||
t t 0 1
|
||||
v v 0 1
|
||||
c c 0 1
|
||||
x x 0 1
|
||||
: : 0 1
|
||||
(\.[[:alnum:]]+){2} "w.a.b " 1 5 3 5
|
||||
|
||||
- match_default normal REG_EXTENDED REG_ICASE
|
||||
a A 0 1
|
||||
A a 0 1
|
||||
[abc]+ abcABC 0 6
|
||||
[ABC]+ abcABC 0 6
|
||||
[a-z]+ abcABC 0 6
|
||||
[A-Z]+ abzANZ 0 6
|
||||
[a-Z]+ abzABZ 0 6
|
||||
[A-z]+ abzABZ 0 6
|
||||
[[:lower:]]+ abyzABYZ 0 8
|
||||
[[:upper:]]+ abzABZ 0 6
|
||||
[[:word:]]+ abcZZZ 0 6
|
||||
[[:alpha:]]+ abyzABYZ 0 8
|
||||
[[:alnum:]]+ 09abyzABYZ 0 10
|
||||
|
||||
; updated tests for version 2:
|
||||
- match_default normal REG_EXTENDED
|
||||
\x41 A 0 1
|
||||
\xff \255 0 1
|
||||
\xFF \255 0 1
|
||||
- match_default normal REG_EXTENDED REG_NO_POSIX_TEST
|
||||
\c@ \0 0 1
|
||||
- match_default normal REG_EXTENDED
|
||||
\cA \1 0 1
|
||||
\cz \58 0 1
|
||||
\c= !
|
||||
\c? !
|
||||
=: =: 0 2
|
||||
|
||||
; word start:
|
||||
[[:<:]]abcd " abcd" 2 6
|
||||
[[:<:]]ab cab -1 -1
|
||||
[[:<:]]ab "\nab" 1 3
|
||||
[[:<:]]tag ::tag 2 5
|
||||
;word end:
|
||||
abc[[:>:]] abc 0 3
|
||||
abc[[:>:]] abcd -1 -1
|
||||
abc[[:>:]] abc\n 0 3
|
||||
abc[[:>:]] abc:: 0 3
|
||||
|
||||
; collating elements and rewritten set code:
|
||||
- match_default normal REG_EXTENDED REG_STARTEND
|
||||
[[.zero.]] 0 0 1
|
||||
[[.one.]] 1 0 1
|
||||
[[.two.]] 2 0 1
|
||||
[[.three.]] 3 0 1
|
||||
[[.a.]] baa 1 2
|
||||
[[.right-curly-bracket.]] } 0 1
|
||||
[[.NUL.]] \0 0 1
|
||||
[[:<:]z] !
|
||||
[a[:>:]] !
|
||||
[[=a=]] a 0 1
|
||||
[[=right-curly-bracket=]] } 0 1
|
||||
- match_default normal REG_EXTENDED REG_STARTEND REG_ICASE
|
||||
[[.A.]] A 0 1
|
||||
[[.A.]] a 0 1
|
||||
[[.A.]-b]+ AaBb 0 4
|
||||
[A-[.b.]]+ AaBb 0 4
|
||||
[[.a.]-B]+ AaBb 0 4
|
||||
[a-[.B.]]+ AaBb 0 4
|
||||
- match_default normal REG_EXTENDED REG_NO_POSIX_TEST
|
||||
[\x61] a 0 1
|
||||
[\x61-c]+ abcd 0 3
|
||||
[a-\x63]+ abcd 0 3
|
||||
- match_default normal REG_EXTENDED REG_STARTEND
|
||||
[[.a.]-c]+ abcd 0 3
|
||||
[a-[.c.]]+ abcd 0 3
|
||||
[[:alpha:]-a] !
|
||||
[a-[:alpha:]] !
|
||||
|
||||
; try mutli-character ligatures:
|
||||
[[.ae.]] ae 0 2
|
||||
[[.ae.]] aE -1 -1
|
||||
[[.AE.]] AE 0 2
|
||||
[[.Ae.]] Ae 0 2
|
||||
[[.ae.]-b] a -1 -1
|
||||
[[.ae.]-b] b 0 1
|
||||
[[.ae.]-b] ae 0 2
|
||||
[a-[.ae.]] a 0 1
|
||||
[a-[.ae.]] b -1 -1
|
||||
[a-[.ae.]] ae 0 2
|
||||
- match_default normal REG_EXTENDED REG_STARTEND REG_ICASE
|
||||
[[.ae.]] AE 0 2
|
||||
[[.ae.]] Ae 0 2
|
||||
[[.AE.]] Ae 0 2
|
||||
[[.Ae.]] aE 0 2
|
||||
[[.AE.]-B] a -1 -1
|
||||
[[.Ae.]-b] b 0 1
|
||||
[[.Ae.]-b] B 0 1
|
||||
[[.ae.]-b] AE 0 2
|
||||
|
||||
- match_default normal REG_EXTENDED REG_STARTEND
|
||||
;extended perl style escape sequences:
|
||||
\e \27 0 1
|
||||
\x1b \27 0 1
|
||||
\x{1b} \27 0 1
|
||||
\x{} !
|
||||
\x{ !
|
||||
\x} !
|
||||
\x !
|
||||
\x{yy !
|
||||
\x{1b !
|
||||
|
||||
- match_default normal REG_EXTENDED REG_STARTEND REG_NO_POSIX_TEST
|
||||
\l+ ABabcAB 2 5
|
||||
[\l]+ ABabcAB 2 5
|
||||
[a-\l] !
|
||||
[\l-a] !
|
||||
[\L] !
|
||||
\L+ abABCab 2 5
|
||||
\u+ abABCab 2 5
|
||||
[\u]+ abABCab 2 5
|
||||
[\U] !
|
||||
\U+ ABabcAB 2 5
|
||||
\d+ ab012ab 2 5
|
||||
[\d]+ ab012ab 2 5
|
||||
[\D] !
|
||||
\D+ 01abc01 2 5
|
||||
\s+ "ab ab" 2 5
|
||||
[\s]+ "ab ab" 2 5
|
||||
[\S] !
|
||||
\S+ " abc " 2 5
|
||||
- match_default normal REG_EXTENDED REG_STARTEND
|
||||
\Qabc !
|
||||
\Qabc\E abcd 0 3
|
||||
\Qabc\Ed abcde 0 4
|
||||
\Q+*?\\E +*?\\ 0 4
|
||||
|
||||
\C+ abcde 0 5
|
||||
\X+ abcde 0 5
|
||||
|
||||
- match_default normal REG_EXTENDED REG_STARTEND REG_UNICODE_ONLY
|
||||
\X+ a\768\769 0 3
|
||||
\X+ \2309\2307 0 2 ;DEVANAGARI script
|
||||
\X+ \2489\2494 0 2 ;BENGALI script
|
||||
|
||||
- match_default normal REG_EXTENDED REG_STARTEND
|
||||
\Aabc abc 0 3
|
||||
\Aabc aabc -1 -1
|
||||
abc\z abc 0 3
|
||||
abc\z abcd -1 -1
|
||||
abc\Z abc\n\n 0 3
|
||||
abc\Z abc 0 3
|
||||
|
||||
|
||||
\Gabc abc 0 3
|
||||
\Gabc dabcd -1 -1
|
||||
a\Gbc abc -1 -1
|
||||
a\Aab abc -1 -1
|
||||
|
||||
;
|
||||
; now test grep,
|
||||
; basically check all our restart types - line, word, etc
|
||||
; checking each one for null and non-null matches.
|
||||
;
|
||||
- match_default normal REG_EXTENDED REG_STARTEND REG_GREP
|
||||
a " a a a aa" 1 2 3 4 5 6 7 8 8 9
|
||||
a+b+ "aabaabbb ab" 0 3 3 8 9 11
|
||||
a(b*|c|e)d adabbdacd 0 2 2 6 6 9
|
||||
a "\na\na\na\naa" 1 2 3 4 5 6 7 8 8 9
|
||||
|
||||
^ " \n\n \n\n\n" 0 0 4 4 5 5 8 8 9 9 10 10
|
||||
^ab "ab \nab ab\n" 0 2 5 7
|
||||
^[^\n]*\n " \n \n\n \n" 0 4 4 7 7 8 8 11
|
||||
\<abc "abcabc abc\n\nabc" 0 3 7 10 12 15
|
||||
\< " ab a aaa " 2 2 5 5 7 7
|
||||
\<\w+\W+ " aa aa a " 1 5 5 9 9 11
|
||||
|
||||
\Aabc "abc abc" 0 3
|
||||
\G\w+\W+ "abc abc a cbbb " 0 5 5 9 9 11 11 18
|
||||
\Ga+b+ "aaababb abb" 0 4 4 7
|
||||
|
||||
abc abc 0 3
|
||||
abc " abc abcabc " 1 4 5 8 8 11
|
||||
\n\n " \n\n\n \n \n\n\n\n " 1 3 18 20 20 22
|
||||
|
||||
$ " \n\n \n\n\n" 3 3 4 4 7 7 8 8 9 9 10 10
|
||||
\b " abb a abbb " 2 2 5 5 6 6 7 7 8 8 12 12
|
||||
|
||||
- match_default normal REG_EXTENDED REG_STARTEND REG_GREP REG_ICASE
|
||||
A " a a a aa" 1 2 3 4 5 6 7 8 8 9
|
||||
A+B+ "aabaabbb ab" 0 3 3 8 9 11
|
||||
A(B*|c|e)D adabbdacd 0 2 2 6 6 9
|
||||
A "\na\na\na\naa" 1 2 3 4 5 6 7 8 8 9
|
||||
|
||||
^aB "Ab \nab Ab\n" 0 2 5 7
|
||||
\<abc "Abcabc aBc\n\nabc" 0 3 7 10 12 15
|
||||
|
||||
ABC abc 0 3
|
||||
abc " ABC ABCABC " 1 4 5 8 8 11
|
||||
|
||||
|
||||
;
|
||||
; now test merge,
|
||||
;
|
||||
- match_default normal REG_EXTENDED REG_STARTEND REG_MERGE format_no_copy
|
||||
; start by testing subs:
|
||||
a+ "...aaa,,," $` "..."
|
||||
a+ "...aaa,,," $' ",,,"
|
||||
a+ "...aaa,,," $& "aaa"
|
||||
a+ "...aaa,,," $0 aaa
|
||||
a+ "...aaa,,," $1 ""
|
||||
a+ "...aaa,,," $15 ""
|
||||
(a+)b+ "...aaabbb,,," $1 aaa
|
||||
|
||||
; and now escapes:
|
||||
a+ "...aaa,,," $x "$x"
|
||||
a+ "...aaa,,," \a "\a"
|
||||
a+ "...aaa,,," \f "\f"
|
||||
a+ "...aaa,,," \n "\n"
|
||||
a+ "...aaa,,," \r "\r"
|
||||
a+ "...aaa,,," \t "\t"
|
||||
a+ "...aaa,,," \v "\v"
|
||||
|
||||
a+ "...aaa,,," \x21 "!"
|
||||
a+ "...aaa,,," \x{21} "!"
|
||||
a+ "...aaa,,," \c@ \0
|
||||
a+ "...aaa,,," \e \27
|
||||
a+ "...aaa,,," \0101 A
|
||||
a+ "...aaa,,," (\0101) A
|
||||
|
||||
- match_default normal REG_EXTENDED REG_STARTEND REG_MERGE format_sed format_no_copy
|
||||
(a+)(b+) ...aabb,, \0 aabb
|
||||
(a+)(b+) ...aabb,, \1 aa
|
||||
(a+)(b+) ...aabb,, \2 bb
|
||||
(a+)(b+) ...aabb,, & aabb
|
||||
(a+)(b+) ...aabb,, $ $
|
||||
(a+)(b+) ...aabb,, $1 $1
|
||||
(a+)(b+) ...aabb,, ()?: ()?:
|
||||
(a+)(b+) ...aabb,, \\ \\
|
||||
(a+)(b+) ...aabb,, \& &
|
||||
|
||||
|
||||
- match_default normal REG_EXTENDED REG_STARTEND REG_MERGE format_perl format_no_copy
|
||||
(a+)(b+) ...aabb,, $0 aabb
|
||||
(a+)(b+) ...aabb,, $1 aa
|
||||
(a+)(b+) ...aabb,, $2 bb
|
||||
(a+)(b+) ...aabb,, $& aabb
|
||||
(a+)(b+) ...aabb,, & &
|
||||
(a+)(b+) ...aabb,, \0 \0
|
||||
(a+)(b+) ...aabb,, ()?: ()?:
|
||||
|
||||
- match_default normal REG_EXTENDED REG_STARTEND REG_MERGE
|
||||
; move to copying unmatched data:
|
||||
a+ "...aaa,,," bbb "...bbb,,,"
|
||||
a+(b+) "...aaabb,,," $1 "...bb,,,"
|
||||
a+(b+) "...aaabb,,,ab*abbb?" $1 "...bb,,,b*bbb?"
|
||||
|
||||
(a+)|(b+) "...aaabb,,,ab*abbb?" (?1A)(?2B) "...AB,,,AB*AB?"
|
||||
(a+)|(b+) "...aaabb,,,ab*abbb?" ?1A:B "...AB,,,AB*AB?"
|
||||
(a+)|(b+) "...aaabb,,,ab*abbb?" (?1A:B)C "...ACBC,,,ACBC*ACBC?"
|
||||
(a+)|(b+) "...aaabb,,,ab*abbb?" ?1:B "...B,,,B*B?"
|
||||
|
||||
;
|
||||
; changes to newline handling with 2.11:
|
||||
;
|
||||
|
||||
- match_default normal REG_EXTENDED REG_STARTEND REG_GREP
|
||||
|
||||
^. " \n \r\n " 0 1 3 4 7 8
|
||||
.$ " \n \r\n " 1 2 4 5 8 9
|
||||
|
||||
- match_default normal REG_EXTENDED REG_STARTEND REG_GREP REG_UNICODE_ONLY
|
||||
^. " \8232 \8233 " 0 1 3 4 5 6
|
||||
.$ " \8232 \8233 " 1 2 3 4 6 7
|
||||
|
||||
;
|
||||
; non-greedy repeats added 21/04/00
|
||||
- match_default normal REG_EXTENDED
|
||||
a** !
|
||||
a*? aa 0 0
|
||||
a?? aa 0 0
|
||||
a++ !
|
||||
a+? aa 0 1
|
||||
a{1,3}{1} !
|
||||
a{1,3}? aaa 0 1
|
||||
\w+?w ...ccccccwcccccw 3 10
|
||||
\W+\w+?w ...ccccccwcccccw 0 10
|
||||
abc|\w+? abd 0 1
|
||||
abc|\w+? abcd 0 3
|
||||
<\s*tag[^>]*>(.*?)<\s*/tag\s*> " <tag>here is some text</tag> <tag></tag>" 1 29 6 23
|
||||
<\s*tag[^>]*>(.*?)<\s*/tag\s*> " < tag attr=\"something\">here is some text< /tag > <tag></tag>" 1 49 24 41
|
||||
|
||||
;
|
||||
; non-marking parenthesis added 25/04/00
|
||||
- match_default normal REG_EXTENDED
|
||||
(?:abc)+ xxabcabcxx 2 8
|
||||
(?:a+)(b+) xaaabbbx 1 7 4 7
|
||||
(a+)(?:b+) xaaabbba 1 7 1 4
|
||||
(?:(a+)b+) xaaabbba 1 7 1 4
|
||||
(?:a+(b+)) xaaabbba 1 7 4 7
|
||||
a+(?#b+)b+ xaaabbba 1 7
|
||||
|
||||
;
|
||||
; try some partial matches:
|
||||
- match_partial match_default normal REG_EXTENDED REG_NO_POSIX_TEST
|
||||
(xyz)(.*)abc xyzaaab -1 -1 0 3 3 7
|
||||
(xyz)(.*)abc xyz -1 -1 0 3 3 3
|
||||
(xyz)(.*)abc xy -1 -1 -1 -1 -1 -1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
|
||||
# very basic makefile for regression tests
|
||||
#
|
||||
# Visual C++ 6 + full stlport 4.x
|
||||
#
|
||||
# we don't test single threaded builds as stlport doesn't support these...
|
||||
#
|
||||
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 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
|
||||
r3m tests.txt
|
||||
r4m tests.txt test1252.txt
|
||||
r5m tests.txt
|
||||
r6m tests.txt
|
||||
echo testing DLL version....
|
||||
r1l tests.txt test1252.txt
|
||||
r2l tests.txt
|
||||
r3l tests.txt
|
||||
r4l tests.txt test1252.txt
|
||||
r5l tests.txt
|
||||
r6l tests.txt
|
||||
echo testing static multi-threaded debug version....
|
||||
r1md tests.txt test1252.txt
|
||||
r2md tests.txt
|
||||
r3md tests.txt
|
||||
r4md tests.txt test1252.txt
|
||||
r5md tests.txt
|
||||
r6md tests.txt
|
||||
echo testing dll debug version....
|
||||
r1lmd tests.txt test1252.txt
|
||||
r2lmd tests.txt
|
||||
r3lmd tests.txt
|
||||
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
|
||||
cl /MT /D_MT -o r1m.exe $(CFLAGS) -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r2m.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MT /D_MT $(CFLAGS) -o r2m.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r3m.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MT /D_MT $(CFLAGS) -o r3m.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r4m.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MT /D_MT $(CFLAGS) -o r4m.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r5m.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MT /D_MT $(CFLAGS) -o r5m.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r6m.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MT /D_MT $(CFLAGS) -o r6m.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
|
||||
r1l.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MD /D_MT /D_DLL $(CFLAGS) -o r1l.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r2l.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MD /D_MT /D_DLL $(CFLAGS) -o r2l.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r3l.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MD /D_MT /D_DLL $(CFLAGS) -o r3l.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r4l.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MD /D_MT /D_DLL $(CFLAGS) -o r4l.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r5l.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MD /D_MT /D_DLL $(CFLAGS) -o r5l.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r6l.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MD /D_MT /D_DLL $(CFLAGS) -o r6l.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
|
||||
r1md.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r1md.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r2md.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r2md.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r3md.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r3md.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r4md.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r4md.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r5md.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r5md.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r6md.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r6md.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
|
||||
r1lmd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r1lmd.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r2lmd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r2lmd.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r3lmd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r3lmd.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r4lmd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r4lmd.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r5lmd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r5lmd.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
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)
|
||||
|
||||
|
||||
|
||||
@@ -1,181 +0,0 @@
|
||||
|
||||
# very basic makefile for regression tests
|
||||
#
|
||||
# Visual C++ 6
|
||||
#
|
||||
CFLAGS= /Oityb1 /GF /Gy -GX -GR -I..\..\..\..\
|
||||
|
||||
LFLAGS= -link /LIBPATH:..\..\lib\vc6 user32.lib
|
||||
|
||||
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 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....
|
||||
r1 tests.txt test1252.txt
|
||||
r2 tests.txt
|
||||
r3 tests.txt
|
||||
r4 tests.txt test1252.txt
|
||||
r5 tests.txt
|
||||
r6 tests.txt
|
||||
echo testing static multi-threaded version....
|
||||
r1m tests.txt test1252.txt
|
||||
r2m tests.txt
|
||||
r3m tests.txt
|
||||
r4m tests.txt test1252.txt
|
||||
r5m tests.txt
|
||||
r6m tests.txt
|
||||
echo testing DLL version....
|
||||
r1l tests.txt test1252.txt
|
||||
r2l tests.txt
|
||||
r3l tests.txt
|
||||
r4l tests.txt test1252.txt
|
||||
r5l tests.txt
|
||||
r6l tests.txt
|
||||
echo testing static single threaded debug version....
|
||||
r1d tests.txt test1252.txt
|
||||
r2d tests.txt
|
||||
r3d tests.txt
|
||||
r4d tests.txt test1252.txt
|
||||
r5d tests.txt
|
||||
r6d tests.txt
|
||||
echo testing static multi-threaded debug version....
|
||||
r1md tests.txt test1252.txt
|
||||
r2md tests.txt
|
||||
r3md tests.txt
|
||||
r4md tests.txt test1252.txt
|
||||
r5md tests.txt
|
||||
r6md tests.txt
|
||||
echo testing dll debug version....
|
||||
r1lmd tests.txt test1252.txt
|
||||
r2lmd tests.txt
|
||||
r3lmd tests.txt
|
||||
r4lmd tests.txt test1252.txt
|
||||
r5lmd tests.txt
|
||||
r6lmd tests.txt
|
||||
|
||||
|
||||
r1.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /ML $(CFLAGS) -o r1.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r2.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /ML $(CFLAGS) -o r2.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r3.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /ML $(CFLAGS) -o r3.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r4.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /ML $(CFLAGS) -o r4.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r5.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /ML $(CFLAGS) -o r5.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r6.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /ML $(CFLAGS) -o r6.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
|
||||
r1m.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MT /D_MT -o r1m.exe $(CFLAGS) -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r2m.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MT /D_MT $(CFLAGS) -o r2m.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r3m.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MT /D_MT $(CFLAGS) -o r3m.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r4m.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MT /D_MT $(CFLAGS) -o r4m.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r5m.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MT /D_MT $(CFLAGS) -o r5m.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r6m.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MT /D_MT $(CFLAGS) -o r6m.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
|
||||
r1l.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MD /D_MT /D_DLL $(CFLAGS) -o r1l.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r2l.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MD /D_MT /D_DLL $(CFLAGS) -o r2l.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r3l.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MD /D_MT /D_DLL $(CFLAGS) -o r3l.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r4l.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MD /D_MT /D_DLL $(CFLAGS) -o r4l.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r5l.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MD /D_MT /D_DLL $(CFLAGS) -o r5l.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r6l.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MD /D_MT /D_DLL $(CFLAGS) -o r6l.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
|
||||
r1d.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MLd $(CFLAGS) -o r1d.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r2d.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MLd $(CFLAGS) -o r2d.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r3d.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MLd $(CFLAGS) -o r3d.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r4d.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MLd $(CFLAGS) -o r4d.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r5d.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MLd $(CFLAGS) -o r5d.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r6d.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MLd $(CFLAGS) -o r6d.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
|
||||
r1md.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r1md.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r2md.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r2md.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r3md.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r3md.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r4md.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r4md.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r5md.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r5md.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r6md.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MTd /D_MT $(CFLAGS) -o r6md.exe -DBOOST_RE_TEST_LOCALE_CPP -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
|
||||
r1lmd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r1lmd.exe -DBOOST_RE_TEST_LOCALE_W32 tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r2lmd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r2lmd.exe -DBOOST_RE_TEST_LOCALE_C tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r3lmd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r3lmd.exe -DBOOST_RE_TEST_LOCALE_CPP tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r4lmd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r4lmd.exe -DBOOST_RE_TEST_LOCALE_W32 -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
r5lmd.exe : tests.cpp parse.cpp regress.cpp
|
||||
cl /MDd /D_MT /D_DLL $(CFLAGS) -o r5lmd.exe -DBOOST_RE_TEST_LOCALE_C -DTEST_UNICODE tests.cpp parse.cpp regress.cpp $(LFLAGS)
|
||||
|
||||
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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,196 +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_test.cpp
|
||||
* VERSION 3.03
|
||||
* DESCRIPTION: Builds regression test program with default
|
||||
* locale and wide character tests. Also
|
||||
* instantiates all the templates in the library
|
||||
* as a sanity check.
|
||||
*/
|
||||
|
||||
// disable automatic selection of support library:
|
||||
#define BOOST_RE_NO_LIB
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
//
|
||||
// instantiate templates used:
|
||||
//
|
||||
namespace boost{
|
||||
|
||||
typedef const wchar_t* ra_it;
|
||||
typedef wchar_t char_type;
|
||||
typedef std::basic_string<char_type> test_string_type;
|
||||
|
||||
bool pred1(const match_results<ra_it>&)
|
||||
{ return true; }
|
||||
|
||||
typedef bool (*pred1_type)(const match_results<ra_it>&);
|
||||
typedef bool (*pred2_type)(const match_results<test_string_type::const_iterator>&);
|
||||
|
||||
//check that all the defined flags are available:
|
||||
regbase::flag_type f = regbase::escape_in_lists | regbase::char_classes | regbase::intervals | regbase::limited_ops
|
||||
| regbase::newline_alt | regbase::bk_plus_qm | regbase::bk_braces
|
||||
| regbase::bk_parens | regbase::bk_refs | regbase::bk_vbar | regbase::use_except
|
||||
| regbase::failbit | regbase::literal | regbase::icase | regbase::nocollate | regbase::basic
|
||||
| regbase::extended | regbase::normal | regbase::emacs | regbase::awk | regbase::grep | regbase::egrep | regbase::sed;
|
||||
|
||||
template class reg_expression<char_type>;
|
||||
template struct sub_match<ra_it>;
|
||||
template class match_results<ra_it>;
|
||||
|
||||
template bool regex_match(ra_it,
|
||||
ra_it,
|
||||
match_results<ra_it>& m,
|
||||
const reg_expression<char_type>& e,
|
||||
unsigned flags);
|
||||
template bool regex_match(ra_it,
|
||||
ra_it,
|
||||
const reg_expression<char_type>& e,
|
||||
unsigned flags);
|
||||
template bool regex_search(ra_it,
|
||||
ra_it,
|
||||
match_results<ra_it>& m,
|
||||
const reg_expression<char_type>& e,
|
||||
unsigned flags);
|
||||
template unsigned int regex_grep(pred1_type,
|
||||
ra_it,
|
||||
ra_it,
|
||||
const reg_expression<char_type>& e,
|
||||
unsigned flags);
|
||||
template char_type* regex_format(char_type*,
|
||||
const match_results<ra_it>& m,
|
||||
const char_type* fmt,
|
||||
unsigned flags);
|
||||
template char_type* regex_format(char_type*,
|
||||
const match_results<ra_it>& m,
|
||||
const test_string_type& fmt,
|
||||
unsigned flags);
|
||||
template char_type* regex_merge(char_type*,
|
||||
ra_it,
|
||||
ra_it,
|
||||
const reg_expression<char_type>&,
|
||||
const char_type*,
|
||||
unsigned int flags);
|
||||
template char_type* regex_merge(char_type*,
|
||||
ra_it,
|
||||
ra_it,
|
||||
const reg_expression<char_type>& e,
|
||||
const test_string_type&,
|
||||
unsigned int flags);
|
||||
template std::size_t regex_split(test_string_type*,
|
||||
test_string_type&,
|
||||
const reg_expression<char_type>&,
|
||||
unsigned flags,
|
||||
std::size_t);
|
||||
template std::size_t regex_split(test_string_type*,
|
||||
test_string_type& s,
|
||||
const reg_expression<char_type>& e,
|
||||
unsigned flags);
|
||||
|
||||
template std::size_t regex_split(test_string_type*, test_string_type&);
|
||||
|
||||
#ifndef BOOST_RE_NO_PARTIAL_FUNC_SPEC
|
||||
//
|
||||
// the following prototypes are only available if partial ordering
|
||||
// of template functions is supported:
|
||||
//
|
||||
template bool regex_match(const char_type*,
|
||||
match_results<const char_type*>& m,
|
||||
const reg_expression<char_type>& e,
|
||||
unsigned flags);
|
||||
template bool regex_match(const test_string_type&,
|
||||
match_results<test_string_type::const_iterator>&,
|
||||
const reg_expression<char_type>&,
|
||||
unsigned flags);
|
||||
template bool regex_match(const char_type*,
|
||||
const reg_expression<char_type>&,
|
||||
unsigned flags);
|
||||
template bool regex_match(const test_string_type&,
|
||||
const reg_expression<char_type>&,
|
||||
unsigned flags);
|
||||
template bool regex_search(const char_type*,
|
||||
match_results<const char_type*>&,
|
||||
const reg_expression<char_type>&,
|
||||
unsigned flags);
|
||||
template bool regex_search(const test_string_type&,
|
||||
match_results<test_string_type::const_iterator>&,
|
||||
const reg_expression<char_type>&,
|
||||
unsigned flags);
|
||||
template unsigned int regex_grep(pred1_type,
|
||||
const char_type*,
|
||||
const reg_expression<char_type>&,
|
||||
unsigned flags);
|
||||
template unsigned int regex_grep(pred2_type,
|
||||
const test_string_type&,
|
||||
const reg_expression<char_type>&,
|
||||
unsigned flags);
|
||||
template test_string_type regex_format
|
||||
(const match_results<test_string_type::const_iterator>& m,
|
||||
const char_type*,
|
||||
unsigned flags);
|
||||
template test_string_type regex_format
|
||||
(const match_results<test_string_type::const_iterator>&,
|
||||
const test_string_type&,
|
||||
unsigned flags);
|
||||
template test_string_type regex_merge(const test_string_type&,
|
||||
const reg_expression<char_type>&,
|
||||
const char_type*,
|
||||
unsigned int flags);
|
||||
template test_string_type regex_merge(const test_string_type&,
|
||||
const reg_expression<char_type>&,
|
||||
const test_string_type&,
|
||||
unsigned int flags);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
} // namespace boost
|
||||
|
||||
//
|
||||
// include regression test source files:
|
||||
//
|
||||
#ifdef BOOST_RE_LOCALE_W32
|
||||
#define BOOST_RE_TEST_LOCALE_W32
|
||||
#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"
|
||||
|
||||
//
|
||||
// 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/regex.cpp"
|
||||
#include "libs/regex/src/regex_debug.cpp"
|
||||
#include "libs/regex/src/regex_synch.cpp"
|
||||
#include "libs/regex/src/wide_posix_api.cpp"
|
||||
|
||||
|
||||
@@ -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 snip1.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,48 +0,0 @@
|
||||
|
||||
#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,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 snip2.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,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 snip3.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,131 +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 snip4.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)
|
||||
{
|
||||
e1.set_expression(expression_text);
|
||||
e2.set_expression(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;
|
||||
}
|
||||
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,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 snip5.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 snip6.cpp
|
||||
* VERSION 3.00
|
||||
* DESCRIPTION: regex_grep example 2: 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 snip7.cpp
|
||||
* VERSION 3.00
|
||||
* DESCRIPTION: regex_grep example 2: 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,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 snip8.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 snip9.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,44 +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..\..\lib\bcb5
|
||||
|
||||
|
||||
timer.exe : regex_timer.cpp
|
||||
$(BCC32) @&&|
|
||||
$(COMPOPTS) -e$@ regex_timer.cpp
|
||||
|
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,44 +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..\..\lib\bcb4
|
||||
|
||||
|
||||
timer.exe : regex_timer.cpp
|
||||
$(BCC32) @&&|
|
||||
$(COMPOPTS) -e$@ regex_timer.cpp
|
||||
|
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,44 +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..\..\lib\bcb5
|
||||
|
||||
|
||||
timer.exe : regex_timer.cpp
|
||||
$(BCC32) @&&|
|
||||
$(COMPOPTS) -e$@ regex_timer.cpp
|
||||
|
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
|
||||
# very basic makefile for timer.exe
|
||||
#
|
||||
# GNU compiler GCC
|
||||
#
|
||||
CXX=-I../../../../ -I./
|
||||
|
||||
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 -L../../lib/gcc -lregex++debug
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
|
||||
# very basic makefile for timer
|
||||
#
|
||||
CXX=@CXX@
|
||||
CXXFLAGS=@CXXFLAGS@
|
||||
LIBS=@LIBS@
|
||||
EXE=@ac_exe_ext@
|
||||
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)
|
||||
$(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
|
||||
|
||||
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;
|
||||
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.begin(), s1.end());
|
||||
#ifndef BOOST_RE_NO_WCSTRING
|
||||
wex.assign(ws1.begin(), ws1.end());
|
||||
#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,24 +0,0 @@
|
||||
# Makefile for timer application
|
||||
#
|
||||
# for SUN workshop 5.0 C++ compiler
|
||||
#
|
||||
|
||||
CXX=CC
|
||||
CPP_FLAGS = -O -I../../../../ -I./
|
||||
|
||||
%.o : %.cpp
|
||||
$(CXX) -c -o $@ $(CPP_FLAGS) $<
|
||||
|
||||
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
|
||||
|
||||
clean:
|
||||
rm -rf SunWS_cache
|
||||
rm -f timer.o timer
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#
|
||||
# very basic VC6 makefile for timer
|
||||
#
|
||||
CXX=cl
|
||||
CXXFLAGS=/Oityb1 /GF /Gy -MT -GX -DSTRICT -I../../../../ -I./
|
||||
LIBS=/link /LIBPATH:..\..\lib\vc6-stlport kernel32.lib user32.lib
|
||||
EXE=.exe
|
||||
OBJ=.obj
|
||||
|
||||
LIBDEP= ../../../../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) $(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,31 +0,0 @@
|
||||
#
|
||||
# very basic VC6 makefile for timer
|
||||
#
|
||||
CXX=cl
|
||||
CXXFLAGS=/Oityb1 /GF /Gy -GX -DSTRICT -I../../../../ -I./
|
||||
LIBS=/link /LIBPATH:..\..\lib\vc6 kernel32.lib user32.lib
|
||||
EXE=.exe
|
||||
OBJ=.obj
|
||||
|
||||
LIBDEP= ../../../../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) $(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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 12 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 12 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"lines": 89.4,
|
||||
"functions": 59.3,
|
||||
"branches": 0.0
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,295 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="theme-green">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<title>regex</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<script>
|
||||
// Apply theme and font size immediately to prevent flash
|
||||
(function() {
|
||||
document.documentElement.classList.add('no-transitions');
|
||||
|
||||
var saved = localStorage.getItem('gcovr-theme');
|
||||
var theme = (saved === 'light' || saved === 'dark') ? saved
|
||||
: window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
document.documentElement.style.backgroundColor = theme === 'light' ? '#ffffff' : '#0d1117';
|
||||
|
||||
// Apply flat mode immediately to prevent sidebar flash
|
||||
if (localStorage.getItem('gcovr-view-mode') === 'flat') {
|
||||
document.documentElement.classList.add('early-flat-mode');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<link rel="stylesheet" href="index.css"/>
|
||||
<script src="index.js" charset="UTF-8"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="app-container">
|
||||
<!-- Sidebar -->
|
||||
<aside class="sidebar" id="sidebar"><script>if(localStorage.getItem('sidebar-collapsed')==='true'){document.currentScript.parentElement.classList.add('collapsed');}else{var sw=localStorage.getItem('gcovr-sidebar-width');if(sw)document.documentElement.style.setProperty('--sidebar-width',sw+'px');}</script>
|
||||
<div class="sidebar-header">
|
||||
<div class="sidebar-header-row">
|
||||
<a href="index.html" class="sidebar-logo" title="Back to index">
|
||||
<svg viewBox="150 150 700 160" class="boost-wordmark"><path fill="#ffa000" d="M292.45,152.89h-93.18l-46.59,80,12.63,21.69,46.57-79.99h47.07c20.07,0,36.38,16.18,36.38,36.07,0,8.46-3.54,18.29-10.84,22.4,7.11,5.3,10.54,13.73,10.54,22.01,0,19.88-16.32,36.06-36.38,36.06h-61.71l16.12-27.7h45.59c4.66,0,8.45-3.75,8.45-8.36s-3.57-8.16-8.05-8.35c-.13-.02-36.25,0-36.25,0l16.14-27.71s20.22.02,20.31,0c1.9-.06,3.63-.74,5-1.85,1.93-1.53,3.15-3.87,3.15-6.5,0-4.62-3.79-8.37-8.45-8.37h-30.03l-47.04,80.75,17.39,29.85h93.18l46.59-80-46.59-80h0Z"/><path fill="currentColor" d="M550.81,291.93c-9.23,0-17.31-2.01-24.23-6.04s-12.29-9.63-16.1-16.83c-3.81-7.19-5.72-15.4-5.72-24.63s1.9-17.6,5.72-24.79c3.81-7.19,9.18-12.82,16.1-16.91,6.92-4.08,15-6.12,24.23-6.12s17.44,2.04,24.31,6.12,12.21,9.72,16.02,16.91,5.72,15.46,5.72,24.79-1.91,17.44-5.72,24.63-9.15,12.8-16.02,16.83c-6.87,4.02-14.97,6.04-24.31,6.04ZM550.81,272.45c5.37,0,9.79-1.23,13.28-3.7,3.49-2.47,6.12-5.82,7.89-10.06s2.66-8.99,2.66-14.25-.89-10.2-2.66-14.49c-1.77-4.29-4.4-7.7-7.89-10.22-3.49-2.52-7.92-3.78-13.28-3.78s-9.82,1.26-13.36,3.78c-3.54,2.52-6.2,5.93-7.97,10.22-1.77,4.29-2.66,9.12-2.66,14.49s.89,10.01,2.66,14.25c1.77,4.24,4.43,7.59,7.97,10.06s7.99,3.7,13.36,3.7Z"/><path fill="currentColor" d="M648.53,291.93c-9.23,0-17.31-2.01-24.23-6.04s-12.29-9.63-16.1-16.83c-3.81-7.19-5.72-15.4-5.72-24.63s1.9-17.6,5.72-24.79c3.81-7.19,9.18-12.82,16.1-16.91,6.92-4.08,15-6.12,24.23-6.12s17.44,2.04,24.31,6.12,12.21,9.72,16.02,16.91,5.72,15.46,5.72,24.79-1.91,17.44-5.72,24.63-9.15,12.8-16.02,16.83c-6.87,4.02-14.97,6.04-24.31,6.04ZM648.53,272.45c5.37,0,9.79-1.23,13.28-3.7,3.49-2.47,6.12-5.82,7.89-10.06s2.66-8.99,2.66-14.25-.89-10.2-2.66-14.49c-1.77-4.29-4.4-7.7-7.89-10.22-3.49-2.52-7.92-3.78-13.28-3.78s-9.82,1.26-13.36,3.78c-3.54,2.52-6.2,5.93-7.97,10.22-1.77,4.29-2.66,9.12-2.66,14.49s.89,10.01,2.66,14.25c1.77,4.24,4.43,7.59,7.97,10.06s7.99,3.7,13.36,3.7Z"/><path fill="currentColor" d="M722.75,260.85c.54,4.62,2.55,7.86,6.04,9.74s7.49,2.82,11.99,2.82,8.21-.8,11.11-2.41c2.9-1.61,4.35-4.24,4.35-7.89,0-2.25-.99-4-2.98-5.23s-4.56-2.2-7.73-2.9c-3.17-.7-6.66-1.37-10.46-2.01-3.81-.64-7.65-1.5-11.51-2.58-3.86-1.07-7.41-2.58-10.63-4.51-3.22-1.93-5.8-4.53-7.73-7.81-1.93-3.27-2.9-7.49-2.9-12.64,0-4.83,1.55-9.47,4.67-13.93,3.11-4.45,7.49-8.05,13.12-10.79,5.63-2.74,12.1-4.11,19.4-4.11,6.55,0,12.61,1.32,18.19,3.95,5.58,2.63,10.06,6.25,13.44,10.87s5.07,9.98,5.07,16.1h-21.41c-.43-4.61-2.15-7.86-5.15-9.74-3.01-1.88-6.6-2.82-10.79-2.82-4.94,0-8.69.99-11.27,2.98s-3.86,4.48-3.86,7.49c0,2.47.99,4.4,2.98,5.8,1.98,1.4,4.56,2.47,7.73,3.22,3.16.75,6.68,1.42,10.55,2.01,3.86.59,7.7,1.4,11.51,2.42,3.81,1.02,7.33,2.47,10.55,4.35s5.8,4.4,7.73,7.57,2.9,7.27,2.9,12.32c0,5.69-1.56,10.71-4.67,15.05-3.11,4.35-7.49,7.73-13.12,10.14-5.64,2.42-12.26,3.62-19.88,3.62-7.08,0-13.52-1.37-19.32-4.11s-10.44-6.44-13.93-11.11c-3.49-4.67-5.34-9.95-5.55-15.86h21.57,0Z"/><path fill="currentColor" d="M815.48,264.84v-47.29h17.55v-18.35h-17.55v-21.78l-34.42,40.14h12.84v51.81c0,11.05,8.95,20,20,20h21.7v-18.52h-14.12c-3.31,0-6-2.69-6-6h0Z"/><path fill="currentColor" d="M494.62,242.26c-2.36-3.92-5.58-7.03-9.66-9.34-1.08-.61-2.19-1.14-3.33-1.61.7-.44,1.36-.91,1.96-1.45,2.95-2.63,5.1-5.82,6.44-9.58,1.34-3.76,2.01-7.35,2.01-10.79,0-8.69-1.99-15.4-5.96-20.12s-9.31-8.02-16.02-9.9c-6.71-1.88-14.14-2.82-22.3-2.82h-34.29v112.7h40.41c8.16,0,15.59-.99,22.3-2.98,6.71-1.98,12.05-5.45,16.02-10.38,3.97-4.94,5.96-11.7,5.96-20.29,0-5.04-1.18-9.53-3.54-13.44ZM472.48,264.8c-1.88,2.09-4.46,3.52-7.73,4.27-3.28.75-6.9,1.13-10.87,1.13h-18.51v-74.54h12.4c4.08,0,7.73.32,10.95.97,3.22.64,5.77,1.96,7.65,3.95,1.88,1.99,2.82,4.91,2.82,8.77s-.94,6.79-2.82,8.78c-1.88,1.99-4.46,3.3-7.73,3.94-1.87.37-3.86.62-5.96.78l-11.25,19.19h12.46c4.08,0,7.73.35,10.95,1.05,3.22.7,5.77,2.01,7.65,3.94s2.82,4.83,2.82,8.69-.94,7-2.82,9.1v-.02Z"/></svg>
|
||||
</a>
|
||||
<button class="sidebar-toggle" id="sidebar-toggle" title="Toggle sidebar">
|
||||
<svg class="icon-collapse" viewBox="0 0 16 16" fill="currentColor"><path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/></svg>
|
||||
<svg class="icon-expand" viewBox="0 0 16 16" fill="currentColor"><path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="sidebar-title-group">
|
||||
<span class="sidebar-library">regex</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-search">
|
||||
<input type="text" id="file-search" placeholder="Search files..." autocomplete="off">
|
||||
<button class="search-clear" id="search-clear" type="button" aria-label="Clear search">×</button>
|
||||
</div>
|
||||
<div class="tree-controls">
|
||||
<button class="tree-control-btn" id="expand-all" title="Expand all">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 1a.5.5 0 01.5.5v5h5a.5.5 0 010 1h-5v5a.5.5 0 01-1 0v-5h-5a.5.5 0 010-1h5v-5A.5.5 0 018 1z"/></svg>
|
||||
Expand
|
||||
</button>
|
||||
<button class="tree-control-btn" id="collapse-all" title="Collapse all">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M2 8a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11A.5.5 0 012 8z"/></svg>
|
||||
Collapse
|
||||
</button>
|
||||
</div>
|
||||
<nav class="sidebar-nav" id="file-tree">
|
||||
<div class="tree-item is-folder">
|
||||
<div class="tree-item-header">
|
||||
<a href="index.include.d436eb0fd9de10b54a828ce6435f7e81.html" class="tree-folder-toggle" title="Open include">+</a>
|
||||
<svg class="tree-icon tree-icon-folder" viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3H7.5a.25.25 0 01-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75z"></path></svg>
|
||||
<a class="tree-label" href="index.include.d436eb0fd9de10b54a828ce6435f7e81.html" title="include">include</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tree-item is-folder">
|
||||
<div class="tree-item-header">
|
||||
<a href="index.src.25d902c24283ab8cfbac54dfa101ad31.html" class="tree-folder-toggle" title="Open src">+</a>
|
||||
<svg class="tree-icon tree-icon-folder" viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3H7.5a.25.25 0 01-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75z"></path></svg>
|
||||
<a class="tree-label" href="index.src.25d902c24283ab8cfbac54dfa101ad31.html" title="src">src</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="sidebar-resize-handle" id="sidebar-resize-handle"></div>
|
||||
</aside>
|
||||
|
||||
<!-- Mobile sidebar backdrop -->
|
||||
<div class="sidebar-backdrop" id="sidebar-backdrop"></div>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<header class="main-header">
|
||||
<button class="mobile-menu-btn" id="mobile-menu-btn" title="Open menu">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"/></svg>
|
||||
</button>
|
||||
<div class="breadcrumb">
|
||||
<span class="breadcrumb-title">regex</span><span class="breadcrumb-label">GCC Code Coverage</span> </div>
|
||||
<div class="header-actions">
|
||||
</div>
|
||||
<div class="view-toggle" id="view-toggle" style="display:none">
|
||||
<button class="view-btn active" data-view="nested">Nested</button>
|
||||
<button class="view-btn" data-view="flat">Flat</button>
|
||||
</div>
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggle theme">
|
||||
<svg class="icon-moon" viewBox="0 0 16 16" fill="currentColor"><path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"/></svg>
|
||||
<svg class="icon-sun" viewBox="0 0 16 16" fill="currentColor"><path d="M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"/></svg>
|
||||
</button>
|
||||
<button class="settings-btn" id="settings-btn" title="Settings">
|
||||
<svg viewBox="0 0 16 16" width="18" height="18" fill="currentColor"><path d="M8 4.754a3.246 3.246 0 100 6.492 3.246 3.246 0 000-6.492zM5.754 8a2.246 2.246 0 114.492 0 2.246 2.246 0 01-4.492 0z"/><path d="M9.796 1.343c-.527-1.79-3.065-1.79-3.592 0l-.094.319a.873.873 0 01-1.255.52l-.292-.16c-1.64-.892-3.433.902-2.54 2.541l.159.292a.873.873 0 01-.52 1.255l-.319.094c-1.79.527-1.79 3.065 0 3.592l.319.094a.873.873 0 01.52 1.255l-.16.292c-.892 1.64.901 3.434 2.541 2.54l.292-.159a.873.873 0 011.255.52l.094.319c.527 1.79 3.065 1.79 3.592 0l.094-.319a.873.873 0 011.255-.52l.292.16c1.64.893 3.434-.902 2.54-2.541l-.159-.292a.873.873 0 01.52-1.255l.319-.094c1.79-.527 1.79-3.065 0-3.592l-.319-.094a.873.873 0 01-.52-1.255l.16-.292c.893-1.64-.902-3.433-2.541-2.54l-.292.159a.873.873 0 01-1.255-.52l-.094-.319zm-2.633.283c.246-.835 1.428-.835 1.674 0l.094.319a1.873 1.873 0 002.693 1.115l.291-.16c.764-.415 1.6.42 1.184 1.185l-.159.292a1.873 1.873 0 001.116 2.692l.318.094c.835.246.835 1.428 0 1.674l-.319.094a1.873 1.873 0 00-1.115 2.693l.16.291c.415.764-.421 1.6-1.185 1.184l-.291-.159a1.873 1.873 0 00-2.693 1.116l-.094.318c-.246.835-1.428.835-1.674 0l-.094-.319a1.873 1.873 0 00-2.692-1.115l-.292.16c-.764.415-1.6-.421-1.184-1.185l.159-.291A1.873 1.873 0 001.945 8.93l-.319-.094c-.835-.246-.835-1.428 0-1.674l.319-.094A1.873 1.873 0 003.06 4.377l-.16-.292c-.415-.764.42-1.6 1.185-1.184l.292.159a1.873 1.873 0 002.692-1.115l.094-.319z"/></svg>
|
||||
</button>
|
||||
<div class="settings-dropdown" id="settings-dropdown"></div>
|
||||
</header>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="summary-section">
|
||||
<div class="summary-cards">
|
||||
<div class="summary-card">
|
||||
<div class="summary-card-header">
|
||||
<h3>Lines</h3>
|
||||
</div>
|
||||
<div class="summary-card-body">
|
||||
<div class="coverage-ring coverage-medium">
|
||||
<svg viewBox="0 0 36 36">
|
||||
<path class="ring-bg" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
|
||||
<path class="ring-fill" stroke-dasharray="89.4, 100" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
|
||||
</svg>
|
||||
<span class="ring-text">89.4%</span>
|
||||
</div>
|
||||
<div class="summary-stats">
|
||||
<div class="stat-row">
|
||||
<span class="stat-label">Hit</span>
|
||||
<span class="stat-value">6554</span>
|
||||
</div>
|
||||
<div class="stat-row">
|
||||
<span class="stat-label">Total</span>
|
||||
<span class="stat-value">7330</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="summary-card">
|
||||
<div class="summary-card-header">
|
||||
<h3>Functions</h3>
|
||||
</div>
|
||||
<div class="summary-card-body">
|
||||
<div class="coverage-ring coverage-low">
|
||||
<svg viewBox="0 0 36 36">
|
||||
<path class="ring-bg" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
|
||||
<path class="ring-fill" stroke-dasharray="59.3, 100" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
|
||||
</svg>
|
||||
<span class="ring-text">59.3%</span>
|
||||
</div>
|
||||
<div class="summary-stats">
|
||||
<div class="stat-row">
|
||||
<span class="stat-label">Hit</span>
|
||||
<span class="stat-value">4210</span>
|
||||
</div>
|
||||
<div class="stat-row">
|
||||
<span class="stat-label">Total</span>
|
||||
<span class="stat-value">7115</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="coverage-legend">
|
||||
<span class="legend-item coverage-high">High: ≥ 90.0%</span>
|
||||
<span class="legend-item coverage-medium">Medium: ≥ 75.0%</span>
|
||||
<span class="legend-item coverage-low">Low: < 75.0%</span>
|
||||
<span class="legend-separator"></span>
|
||||
<a href="index.functions.html" class="legend-item legend-functions-link" title="List of all functions">
|
||||
<span class="fx-icon" aria-hidden="true"><i>f</i>(x)</span>
|
||||
List of functions
|
||||
</a>
|
||||
</div> </section>
|
||||
|
||||
<section class="main-section">
|
||||
<div class="file-list-container no-branches no-conditions no-decisions no-calls">
|
||||
<div class="file-list-header">
|
||||
<div class="col-name sortable sorted-ascending" data-sort="filename">
|
||||
Name
|
||||
</div>
|
||||
<div class="col-coverage sortable" data-sort="coverage">
|
||||
Coverage
|
||||
</div>
|
||||
<div class="col-lines sortable" data-sort="lines">
|
||||
Lines
|
||||
</div>
|
||||
<div class="col-functions sortable" data-sort="functions">
|
||||
Functions
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="file-list-body" id="file-list">
|
||||
<div class="file-row directory"
|
||||
data-filename="include"
|
||||
data-coverage="89.9"
|
||||
data-lines="7108"
|
||||
data-lines-exec="6391"
|
||||
data-lines-coverage="89.9"
|
||||
data-lines-class="coverage-medium"
|
||||
data-functions="59.2"
|
||||
data-functions-coverage="59.2"
|
||||
data-functions-class="coverage-low"
|
||||
data-branches="-"
|
||||
data-branches-coverage="-"
|
||||
data-branches-class="coverage-unknown"
|
||||
data-conditions="-"
|
||||
data-conditions-coverage="-"
|
||||
data-conditions-class="coverage-unknown"
|
||||
data-decisions="-"
|
||||
data-decisions-coverage="-"
|
||||
data-decisions-class="coverage-unknown"
|
||||
data-calls="69.5"
|
||||
data-calls-coverage="69.5"
|
||||
data-calls-class="coverage-low"
|
||||
data-diff="None">
|
||||
<div class="col-name">
|
||||
<span class="file-icon">
|
||||
<svg viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3H7.5a.25.25 0 01-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75z"></path></svg>
|
||||
</span>
|
||||
<a href="index.include.d436eb0fd9de10b54a828ce6435f7e81.html" title="include">include</a>
|
||||
</div>
|
||||
|
||||
<div class="col-coverage">
|
||||
<div class="coverage-bar-container">
|
||||
<div class="coverage-bar coverage-medium" style="width: 89.9%"></div>
|
||||
</div>
|
||||
<span class="coverage-percent coverage-medium">89.9%</span>
|
||||
</div>
|
||||
|
||||
<div class="col-lines">
|
||||
<span class="stat-value">6391</span>
|
||||
<span class="stat-separator">/</span>
|
||||
<span class="stat-total">7108</span>
|
||||
</div>
|
||||
<div class="col-functions">
|
||||
<span class="stat-value coverage-low">59.2%</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="file-row directory"
|
||||
data-filename="src"
|
||||
data-coverage="73.4"
|
||||
data-lines="222"
|
||||
data-lines-exec="163"
|
||||
data-lines-coverage="73.4"
|
||||
data-lines-class="coverage-low"
|
||||
data-functions="100.0"
|
||||
data-functions-coverage="100.0"
|
||||
data-functions-class="coverage-high"
|
||||
data-branches="-"
|
||||
data-branches-coverage="-"
|
||||
data-branches-class="coverage-unknown"
|
||||
data-conditions="-"
|
||||
data-conditions-coverage="-"
|
||||
data-conditions-class="coverage-unknown"
|
||||
data-decisions="-"
|
||||
data-decisions-coverage="-"
|
||||
data-decisions-class="coverage-unknown"
|
||||
data-calls="58.3"
|
||||
data-calls-coverage="58.3"
|
||||
data-calls-class="coverage-low"
|
||||
data-diff="None">
|
||||
<div class="col-name">
|
||||
<span class="file-icon">
|
||||
<svg viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3H7.5a.25.25 0 01-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75z"></path></svg>
|
||||
</span>
|
||||
<a href="index.src.25d902c24283ab8cfbac54dfa101ad31.html" title="src">src</a>
|
||||
</div>
|
||||
|
||||
<div class="col-coverage">
|
||||
<div class="coverage-bar-container">
|
||||
<div class="coverage-bar coverage-low" style="width: 73.4%"></div>
|
||||
</div>
|
||||
<span class="coverage-percent coverage-low">73.4%</span>
|
||||
</div>
|
||||
|
||||
<div class="col-lines">
|
||||
<span class="stat-value">163</span>
|
||||
<span class="stat-separator">/</span>
|
||||
<span class="stat-total">222</span>
|
||||
</div>
|
||||
<div class="col-functions">
|
||||
<span class="stat-value coverage-high">100.0%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> </section>
|
||||
</div>
|
||||
|
||||
<footer class="main-footer">
|
||||
Created using <a href="http://gcovr.com/en/main">GCOVR (Version 8.6+main)</a>
|
||||
at 2026-05-22 16:53:31
|
||||
</footer>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+36329
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,857 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="theme-green">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<title>include/boost/regex/v5/regex_merge.hpp - regex</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<script>
|
||||
// Apply theme and font size immediately to prevent flash
|
||||
(function() {
|
||||
document.documentElement.classList.add('no-transitions');
|
||||
|
||||
var saved = localStorage.getItem('gcovr-theme');
|
||||
var theme = (saved === 'light' || saved === 'dark') ? saved
|
||||
: window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
document.documentElement.style.backgroundColor = theme === 'light' ? '#ffffff' : '#0d1117';
|
||||
|
||||
// Apply flat mode immediately to prevent sidebar flash
|
||||
if (localStorage.getItem('gcovr-view-mode') === 'flat') {
|
||||
document.documentElement.classList.add('early-flat-mode');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<link rel="stylesheet" href="index.css"/>
|
||||
<script src="index.js" charset="UTF-8"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="app-container">
|
||||
<!-- Sidebar -->
|
||||
<aside class="sidebar" id="sidebar"><script>if(localStorage.getItem('sidebar-collapsed')==='true'){document.currentScript.parentElement.classList.add('collapsed');}else{var sw=localStorage.getItem('gcovr-sidebar-width');if(sw)document.documentElement.style.setProperty('--sidebar-width',sw+'px');}</script>
|
||||
<div class="sidebar-header">
|
||||
<div class="sidebar-header-row">
|
||||
<a href="index.html" class="sidebar-logo" title="Back to index">
|
||||
<svg viewBox="150 150 700 160" class="boost-wordmark"><path fill="#ffa000" d="M292.45,152.89h-93.18l-46.59,80,12.63,21.69,46.57-79.99h47.07c20.07,0,36.38,16.18,36.38,36.07,0,8.46-3.54,18.29-10.84,22.4,7.11,5.3,10.54,13.73,10.54,22.01,0,19.88-16.32,36.06-36.38,36.06h-61.71l16.12-27.7h45.59c4.66,0,8.45-3.75,8.45-8.36s-3.57-8.16-8.05-8.35c-.13-.02-36.25,0-36.25,0l16.14-27.71s20.22.02,20.31,0c1.9-.06,3.63-.74,5-1.85,1.93-1.53,3.15-3.87,3.15-6.5,0-4.62-3.79-8.37-8.45-8.37h-30.03l-47.04,80.75,17.39,29.85h93.18l46.59-80-46.59-80h0Z"/><path fill="currentColor" d="M550.81,291.93c-9.23,0-17.31-2.01-24.23-6.04s-12.29-9.63-16.1-16.83c-3.81-7.19-5.72-15.4-5.72-24.63s1.9-17.6,5.72-24.79c3.81-7.19,9.18-12.82,16.1-16.91,6.92-4.08,15-6.12,24.23-6.12s17.44,2.04,24.31,6.12,12.21,9.72,16.02,16.91,5.72,15.46,5.72,24.79-1.91,17.44-5.72,24.63-9.15,12.8-16.02,16.83c-6.87,4.02-14.97,6.04-24.31,6.04ZM550.81,272.45c5.37,0,9.79-1.23,13.28-3.7,3.49-2.47,6.12-5.82,7.89-10.06s2.66-8.99,2.66-14.25-.89-10.2-2.66-14.49c-1.77-4.29-4.4-7.7-7.89-10.22-3.49-2.52-7.92-3.78-13.28-3.78s-9.82,1.26-13.36,3.78c-3.54,2.52-6.2,5.93-7.97,10.22-1.77,4.29-2.66,9.12-2.66,14.49s.89,10.01,2.66,14.25c1.77,4.24,4.43,7.59,7.97,10.06s7.99,3.7,13.36,3.7Z"/><path fill="currentColor" d="M648.53,291.93c-9.23,0-17.31-2.01-24.23-6.04s-12.29-9.63-16.1-16.83c-3.81-7.19-5.72-15.4-5.72-24.63s1.9-17.6,5.72-24.79c3.81-7.19,9.18-12.82,16.1-16.91,6.92-4.08,15-6.12,24.23-6.12s17.44,2.04,24.31,6.12,12.21,9.72,16.02,16.91,5.72,15.46,5.72,24.79-1.91,17.44-5.72,24.63-9.15,12.8-16.02,16.83c-6.87,4.02-14.97,6.04-24.31,6.04ZM648.53,272.45c5.37,0,9.79-1.23,13.28-3.7,3.49-2.47,6.12-5.82,7.89-10.06s2.66-8.99,2.66-14.25-.89-10.2-2.66-14.49c-1.77-4.29-4.4-7.7-7.89-10.22-3.49-2.52-7.92-3.78-13.28-3.78s-9.82,1.26-13.36,3.78c-3.54,2.52-6.2,5.93-7.97,10.22-1.77,4.29-2.66,9.12-2.66,14.49s.89,10.01,2.66,14.25c1.77,4.24,4.43,7.59,7.97,10.06s7.99,3.7,13.36,3.7Z"/><path fill="currentColor" d="M722.75,260.85c.54,4.62,2.55,7.86,6.04,9.74s7.49,2.82,11.99,2.82,8.21-.8,11.11-2.41c2.9-1.61,4.35-4.24,4.35-7.89,0-2.25-.99-4-2.98-5.23s-4.56-2.2-7.73-2.9c-3.17-.7-6.66-1.37-10.46-2.01-3.81-.64-7.65-1.5-11.51-2.58-3.86-1.07-7.41-2.58-10.63-4.51-3.22-1.93-5.8-4.53-7.73-7.81-1.93-3.27-2.9-7.49-2.9-12.64,0-4.83,1.55-9.47,4.67-13.93,3.11-4.45,7.49-8.05,13.12-10.79,5.63-2.74,12.1-4.11,19.4-4.11,6.55,0,12.61,1.32,18.19,3.95,5.58,2.63,10.06,6.25,13.44,10.87s5.07,9.98,5.07,16.1h-21.41c-.43-4.61-2.15-7.86-5.15-9.74-3.01-1.88-6.6-2.82-10.79-2.82-4.94,0-8.69.99-11.27,2.98s-3.86,4.48-3.86,7.49c0,2.47.99,4.4,2.98,5.8,1.98,1.4,4.56,2.47,7.73,3.22,3.16.75,6.68,1.42,10.55,2.01,3.86.59,7.7,1.4,11.51,2.42,3.81,1.02,7.33,2.47,10.55,4.35s5.8,4.4,7.73,7.57,2.9,7.27,2.9,12.32c0,5.69-1.56,10.71-4.67,15.05-3.11,4.35-7.49,7.73-13.12,10.14-5.64,2.42-12.26,3.62-19.88,3.62-7.08,0-13.52-1.37-19.32-4.11s-10.44-6.44-13.93-11.11c-3.49-4.67-5.34-9.95-5.55-15.86h21.57,0Z"/><path fill="currentColor" d="M815.48,264.84v-47.29h17.55v-18.35h-17.55v-21.78l-34.42,40.14h12.84v51.81c0,11.05,8.95,20,20,20h21.7v-18.52h-14.12c-3.31,0-6-2.69-6-6h0Z"/><path fill="currentColor" d="M494.62,242.26c-2.36-3.92-5.58-7.03-9.66-9.34-1.08-.61-2.19-1.14-3.33-1.61.7-.44,1.36-.91,1.96-1.45,2.95-2.63,5.1-5.82,6.44-9.58,1.34-3.76,2.01-7.35,2.01-10.79,0-8.69-1.99-15.4-5.96-20.12s-9.31-8.02-16.02-9.9c-6.71-1.88-14.14-2.82-22.3-2.82h-34.29v112.7h40.41c8.16,0,15.59-.99,22.3-2.98,6.71-1.98,12.05-5.45,16.02-10.38,3.97-4.94,5.96-11.7,5.96-20.29,0-5.04-1.18-9.53-3.54-13.44ZM472.48,264.8c-1.88,2.09-4.46,3.52-7.73,4.27-3.28.75-6.9,1.13-10.87,1.13h-18.51v-74.54h12.4c4.08,0,7.73.32,10.95.97,3.22.64,5.77,1.96,7.65,3.95,1.88,1.99,2.82,4.91,2.82,8.77s-.94,6.79-2.82,8.78c-1.88,1.99-4.46,3.3-7.73,3.94-1.87.37-3.86.62-5.96.78l-11.25,19.19h12.46c4.08,0,7.73.35,10.95,1.05,3.22.7,5.77,2.01,7.65,3.94s2.82,4.83,2.82,8.69-.94,7-2.82,9.1v-.02Z"/></svg>
|
||||
</a>
|
||||
<button class="sidebar-toggle" id="sidebar-toggle" title="Toggle sidebar">
|
||||
<svg class="icon-collapse" viewBox="0 0 16 16" fill="currentColor"><path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/></svg>
|
||||
<svg class="icon-expand" viewBox="0 0 16 16" fill="currentColor"><path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="sidebar-title-group">
|
||||
<span class="sidebar-library">regex</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-search">
|
||||
<input type="text" id="file-search" placeholder="Search files..." autocomplete="off">
|
||||
<button class="search-clear" id="search-clear" type="button" aria-label="Clear search">×</button>
|
||||
</div>
|
||||
<div class="tree-controls">
|
||||
<button class="tree-control-btn" id="expand-all" title="Expand all">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 1a.5.5 0 01.5.5v5h5a.5.5 0 010 1h-5v5a.5.5 0 01-1 0v-5h-5a.5.5 0 010-1h5v-5A.5.5 0 018 1z"/></svg>
|
||||
Expand
|
||||
</button>
|
||||
<button class="tree-control-btn" id="collapse-all" title="Collapse all">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M2 8a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11A.5.5 0 012 8z"/></svg>
|
||||
Collapse
|
||||
</button>
|
||||
</div>
|
||||
<nav class="sidebar-nav" id="file-tree">
|
||||
<div class="tree-item">
|
||||
<div class="tree-item-header">
|
||||
<a href="index.html" class="tree-toggle" title="Back to directory">
|
||||
<span class="toggle-icon">←</span>
|
||||
</a>
|
||||
<span class="tree-icon folder">
|
||||
<svg viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M1.75 1A1.75 1.75 0 000 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0016 13.25v-8.5A1.75 1.75 0 0014.25 3H7.5a.25.25 0 01-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75z"></path></svg>
|
||||
</span>
|
||||
<a class="tree-label" href="index.html">Back to Index</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tree-item active">
|
||||
<div class="tree-item-header">
|
||||
<span class="tree-toggle-spacer"></span>
|
||||
<span class="tree-icon file">
|
||||
<svg viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M3.75 1.5a.25.25 0 00-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 00.25-.25V6h-2.75A1.75 1.75 0 019 4.25V1.5H3.75zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-2.938-2.938zM2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0113.25 16h-9.5A1.75 1.75 0 012 14.25V1.75z"></path></svg>
|
||||
</span>
|
||||
<span class="tree-label">include/boost/regex/v5/regex_merge.hpp</span>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="sidebar-resize-handle" id="sidebar-resize-handle"></div>
|
||||
</aside>
|
||||
|
||||
<!-- Mobile sidebar backdrop -->
|
||||
<div class="sidebar-backdrop" id="sidebar-backdrop"></div>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<header class="main-header">
|
||||
<button class="mobile-menu-btn" id="mobile-menu-btn" title="Open menu">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"/></svg>
|
||||
</button>
|
||||
<div class="breadcrumb">
|
||||
<a href="index.html" class="breadcrumb-home">Index</a><span class="separator">/</span><span class="current" title="include/boost/regex/v5/regex_merge.hpp">include / boost / regex / v5 / regex_merge.hpp</span> </div>
|
||||
<div class="header-actions">
|
||||
</div>
|
||||
<div class="view-toggle" id="view-toggle" style="display:none">
|
||||
<button class="view-btn active" data-view="nested">Nested</button>
|
||||
<button class="view-btn" data-view="flat">Flat</button>
|
||||
</div>
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggle theme">
|
||||
<svg class="icon-moon" viewBox="0 0 16 16" fill="currentColor"><path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"/></svg>
|
||||
<svg class="icon-sun" viewBox="0 0 16 16" fill="currentColor"><path d="M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"/></svg>
|
||||
</button>
|
||||
<button class="settings-btn" id="settings-btn" title="Settings">
|
||||
<svg viewBox="0 0 16 16" width="18" height="18" fill="currentColor"><path d="M8 4.754a3.246 3.246 0 100 6.492 3.246 3.246 0 000-6.492zM5.754 8a2.246 2.246 0 114.492 0 2.246 2.246 0 01-4.492 0z"/><path d="M9.796 1.343c-.527-1.79-3.065-1.79-3.592 0l-.094.319a.873.873 0 01-1.255.52l-.292-.16c-1.64-.892-3.433.902-2.54 2.541l.159.292a.873.873 0 01-.52 1.255l-.319.094c-1.79.527-1.79 3.065 0 3.592l.319.094a.873.873 0 01.52 1.255l-.16.292c-.892 1.64.901 3.434 2.541 2.54l.292-.159a.873.873 0 011.255.52l.094.319c.527 1.79 3.065 1.79 3.592 0l.094-.319a.873.873 0 011.255-.52l.292.16c1.64.893 3.434-.902 2.54-2.541l-.159-.292a.873.873 0 01.52-1.255l.319-.094c1.79-.527 1.79-3.065 0-3.592l-.319-.094a.873.873 0 01-.52-1.255l.16-.292c.893-1.64-.902-3.433-2.541-2.54l-.292.159a.873.873 0 01-1.255-.52l-.094-.319zm-2.633.283c.246-.835 1.428-.835 1.674 0l.094.319a1.873 1.873 0 002.693 1.115l.291-.16c.764-.415 1.6.42 1.184 1.185l-.159.292a1.873 1.873 0 001.116 2.692l.318.094c.835.246.835 1.428 0 1.674l-.319.094a1.873 1.873 0 00-1.115 2.693l.16.291c.415.764-.421 1.6-1.185 1.184l-.291-.159a1.873 1.873 0 00-2.693 1.116l-.094.318c-.246.835-1.428.835-1.674 0l-.094-.319a1.873 1.873 0 00-2.692-1.115l-.292.16c-.764.415-1.6-.421-1.184-1.185l.159-.291A1.873 1.873 0 001.945 8.93l-.319-.094c-.835-.246-.835-1.428 0-1.674l.319-.094A1.873 1.873 0 003.06 4.377l-.16-.292c-.415-.764.42-1.6 1.185-1.184l.292.159a1.873 1.873 0 002.692-1.115l.094-.319z"/></svg>
|
||||
</button>
|
||||
<div class="settings-dropdown" id="settings-dropdown"></div>
|
||||
</header>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="summary-section">
|
||||
<div class="source-summary">
|
||||
<div class="source-info">
|
||||
<h2 class="source-filename">include/boost/regex/v5/regex_merge.hpp</h2>
|
||||
<div class="source-stats">
|
||||
<span class="stat coverage-high">
|
||||
<strong>100.0%</strong> Lines (2/2)
|
||||
</span>
|
||||
<span class="stat coverage-high">
|
||||
<strong>100.0%</strong> List of functions (1/1)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nav-hint">
|
||||
<span><kbd>[</kbd> <kbd>]</kbd> prev/next file</span>
|
||||
</div>
|
||||
</div> </section>
|
||||
|
||||
<section class="main-section">
|
||||
<div class="source-container no-branches">
|
||||
<div class="source-header">
|
||||
<span class="source-header-filename">regex_merge.hpp</span>
|
||||
<div class="source-line-filters">
|
||||
<button type="button" class="btn btn-sm button_toggle_coveredLine show_coveredLine" value="coveredLine" title="Toggle covered lines">
|
||||
covered
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm button_toggle_uncoveredLine show_uncoveredLine" value="uncoveredLine" title="Toggle uncovered lines">
|
||||
uncovered
|
||||
</button>
|
||||
</div>
|
||||
<div class="source-column-filters">
|
||||
<button type="button" class="btn btn-sm col-toggle show-col" data-col="tla" title="Toggle TLA column">TLA</button>
|
||||
<button type="button" class="btn btn-sm col-toggle show-col" data-col="count" title="Toggle Hits column">Hits</button>
|
||||
</div>
|
||||
<div class="source-nav-links">
|
||||
<a class="nav-link nav-prev" href="index.regex_match.hpp.52d49d2882a598bc100172b30fdc9d28.html" title="Previous file">
|
||||
<svg viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M8 2a.75.75 0 01.75.75v8.69l3.22-3.22a.75.75 0 111.06 1.06l-4.5 4.5a.75.75 0 01-1.06 0l-4.5-4.5a.75.75 0 011.06-1.06l3.22 3.22V2.75A.75.75 0 018 2z" transform="rotate(180 8 8)"/></svg>
|
||||
</a>
|
||||
<a class="nav-link nav-next" href="index.regex_raw_buffer.hpp.77701f68cbde88eced9e7f01d308832b.html" title="Next file">
|
||||
<svg viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M8 2a.75.75 0 01.75.75v8.69l3.22-3.22a.75.75 0 111.06 1.06l-4.5 4.5a.75.75 0 01-1.06 0l-4.5-4.5a.75.75 0 011.06-1.06l3.22 3.22V2.75A.75.75 0 018 2z"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<details class="source-functions">
|
||||
<summary class="source-functions-toggle">
|
||||
<span class="fx-icon"><i>f</i>(x)</span>
|
||||
Functions (1)
|
||||
</summary>
|
||||
<div class="source-functions-list">
|
||||
<div class="source-function-header">
|
||||
<span class="source-function-col-name" data-sort="name">Function</span>
|
||||
<span class="source-function-col-stat" data-sort="calls">Calls</span>
|
||||
<span class="source-function-col-stat" data-sort="lines">Lines</span>
|
||||
<span class="source-function-col-stat" data-sort="blocks">Blocks</span>
|
||||
</div>
|
||||
<a href="#l28" class="source-function-item"
|
||||
data-name="std::ostream_iterator<char, char, std::char_traits<char> > boost::regex_merge<std::ostream_iterator<char, char, std::char_traits<char> >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> >, char>(std::ostream_iterator<char, char, std::char_traits<char> >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, char const*, boost::regex_constants::_match_flags)" data-calls="2" data-lines="100.0" data-branches="-1" data-blocks="100.0">
|
||||
<span class="source-function-col-name">
|
||||
<span class="source-function-name">std::ostream_iterator<char, char, std::char_traits<char> > boost::regex_merge<std::ostream_iterator<char, char, std::char_traits<char> >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::regex_traits<char, boost::cpp_regex_traits<char> >, char>(std::ostream_iterator<char, char, std::char_traits<char> >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, char const*, boost::regex_constants::_match_flags)</span>
|
||||
<span class="source-function-line">:28</span>
|
||||
</span>
|
||||
<span class="source-function-col-stat">2x</span>
|
||||
<span class="source-function-col-stat cov-high">100.0%</span>
|
||||
<span class="source-function-col-stat cov-high">100.0%</span>
|
||||
</a>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<div class="source-table-container">
|
||||
<table class="source-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-lineno">Line</th>
|
||||
<th class="col-tla">TLA</th>
|
||||
<th class="col-count">Hits</th>
|
||||
<th class="col-source">Source Code</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l1">1</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm">/*</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l2">2</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> *</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l3">3</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> * Copyright (c) 1998-2002</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l4">4</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> * John Maddock</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l5">5</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> *</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l6">6</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> * Use, modification and distribution are subject to the </span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l7">7</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> * Boost Software License, Version 1.0. (See accompanying file </span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l8">8</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l9">9</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> *</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l10">10</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> */</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l11">11</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l12">12</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="cm">/*</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l13">13</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> * LOCATION: see http://www.boost.org for most recent version.</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l14">14</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> * FILE regex_format.hpp</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l15">15</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> * VERSION see <boost/version.hpp></span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l16">16</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> * DESCRIPTION: Provides formatting output routines for search and replace</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l17">17</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> * operations. Note this is an internal header file included</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l18">18</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> * by regex.hpp, do not include on its own.</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l19">19</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cm"> */</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l20">20</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l21">21</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cp">#ifndef BOOST_REGEX_V5_REGEX_MERGE_HPP</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l22">22</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cp">#define BOOST_REGEX_V5_REGEX_MERGE_HPP</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l23">23</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l24">24</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l25">25</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="k">namespace</span><span class="w"> </span><span class="nn">boost</span><span class="p">{</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l26">26</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l27">27</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="n">BOOST_REGEX_MODULE_EXPORT</span><span class="w"> </span><span class="k">template</span><span class="w"> </span><span class="o"><</span><span class="k">class</span><span class="w"> </span><span class="nc">OutputIterator</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">Iterator</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">traits</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">charT</span><span class="o">></span></td>
|
||||
</tr>
|
||||
<tr class="source-line coveredLine show_coveredLine">
|
||||
<td class="col-lineno">
|
||||
<a id="l28">28</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count coveredLine">
|
||||
2x </td>
|
||||
<td class="col-source"><span class="kr">inline</span><span class="w"> </span><span class="n">OutputIterator</span><span class="w"> </span><span class="n">regex_merge</span><span class="p">(</span><span class="n">OutputIterator</span><span class="w"> </span><span class="n">out</span><span class="p">,</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l29">29</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="n">Iterator</span><span class="w"> </span><span class="n">first</span><span class="p">,</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l30">30</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="n">Iterator</span><span class="w"> </span><span class="n">last</span><span class="p">,</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l31">31</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">basic_regex</span><span class="o"><</span><span class="n">charT</span><span class="p">,</span><span class="w"> </span><span class="n">traits</span><span class="o">>&</span><span class="w"> </span><span class="n">e</span><span class="p">,</span><span class="w"> </span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l32">32</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">charT</span><span class="o">*</span><span class="w"> </span><span class="n">fmt</span><span class="p">,</span><span class="w"> </span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l33">33</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="n">match_flag_type</span><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">match_default</span><span class="p">)</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l34">34</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="p">{</span></td>
|
||||
</tr>
|
||||
<tr class="source-line coveredLine show_coveredLine">
|
||||
<td class="col-lineno">
|
||||
<a id="l35">35</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count coveredLine">
|
||||
2x </td>
|
||||
<td class="col-source"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">regex_replace</span><span class="p">(</span><span class="n">out</span><span class="p">,</span><span class="w"> </span><span class="n">first</span><span class="p">,</span><span class="w"> </span><span class="n">last</span><span class="p">,</span><span class="w"> </span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="n">fmt</span><span class="p">,</span><span class="w"> </span><span class="n">flags</span><span class="p">);</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l36">36</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="p">}</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l37">37</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l38">38</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="n">BOOST_REGEX_MODULE_EXPORT</span><span class="w"> </span><span class="k">template</span><span class="w"> </span><span class="o"><</span><span class="k">class</span><span class="w"> </span><span class="nc">OutputIterator</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">Iterator</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">traits</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">charT</span><span class="o">></span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l39">39</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="kr">inline</span><span class="w"> </span><span class="n">OutputIterator</span><span class="w"> </span><span class="n">regex_merge</span><span class="p">(</span><span class="n">OutputIterator</span><span class="w"> </span><span class="n">out</span><span class="p">,</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l40">40</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="n">Iterator</span><span class="w"> </span><span class="n">first</span><span class="p">,</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l41">41</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="n">Iterator</span><span class="w"> </span><span class="n">last</span><span class="p">,</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l42">42</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">basic_regex</span><span class="o"><</span><span class="n">charT</span><span class="p">,</span><span class="w"> </span><span class="n">traits</span><span class="o">>&</span><span class="w"> </span><span class="n">e</span><span class="p">,</span><span class="w"> </span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l43">43</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">basic_string</span><span class="o"><</span><span class="n">charT</span><span class="o">>&</span><span class="w"> </span><span class="n">fmt</span><span class="p">,</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l44">44</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="n">match_flag_type</span><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">match_default</span><span class="p">)</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l45">45</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="p">{</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l46">46</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">regex_merge</span><span class="p">(</span><span class="n">out</span><span class="p">,</span><span class="w"> </span><span class="n">first</span><span class="p">,</span><span class="w"> </span><span class="n">last</span><span class="p">,</span><span class="w"> </span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="n">fmt</span><span class="p">.</span><span class="n">c_str</span><span class="p">(),</span><span class="w"> </span><span class="n">flags</span><span class="p">);</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l47">47</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="p">}</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l48">48</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l49">49</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="n">BOOST_REGEX_MODULE_EXPORT</span><span class="w"> </span><span class="k">template</span><span class="w"> </span><span class="o"><</span><span class="k">class</span><span class="w"> </span><span class="nc">traits</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">charT</span><span class="o">></span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l50">50</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="kr">inline</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">basic_string</span><span class="o"><</span><span class="n">charT</span><span class="o">></span><span class="w"> </span><span class="n">regex_merge</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">basic_string</span><span class="o"><</span><span class="n">charT</span><span class="o">>&</span><span class="w"> </span><span class="n">s</span><span class="p">,</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l51">51</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">basic_regex</span><span class="o"><</span><span class="n">charT</span><span class="p">,</span><span class="w"> </span><span class="n">traits</span><span class="o">>&</span><span class="w"> </span><span class="n">e</span><span class="p">,</span><span class="w"> </span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l52">52</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">charT</span><span class="o">*</span><span class="w"> </span><span class="n">fmt</span><span class="p">,</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l53">53</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="n">match_flag_type</span><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">match_default</span><span class="p">)</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l54">54</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="p">{</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l55">55</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">regex_replace</span><span class="p">(</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="n">fmt</span><span class="p">,</span><span class="w"> </span><span class="n">flags</span><span class="p">);</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l56">56</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="p">}</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l57">57</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l58">58</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="n">BOOST_REGEX_MODULE_EXPORT</span><span class="w"> </span><span class="k">template</span><span class="w"> </span><span class="o"><</span><span class="k">class</span><span class="w"> </span><span class="nc">traits</span><span class="p">,</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">charT</span><span class="o">></span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l59">59</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="kr">inline</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">basic_string</span><span class="o"><</span><span class="n">charT</span><span class="o">></span><span class="w"> </span><span class="n">regex_merge</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">basic_string</span><span class="o"><</span><span class="n">charT</span><span class="o">>&</span><span class="w"> </span><span class="n">s</span><span class="p">,</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l60">60</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">basic_regex</span><span class="o"><</span><span class="n">charT</span><span class="p">,</span><span class="w"> </span><span class="n">traits</span><span class="o">>&</span><span class="w"> </span><span class="n">e</span><span class="p">,</span><span class="w"> </span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l61">61</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">basic_string</span><span class="o"><</span><span class="n">charT</span><span class="o">>&</span><span class="w"> </span><span class="n">fmt</span><span class="p">,</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l62">62</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="n">match_flag_type</span><span class="w"> </span><span class="n">flags</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">match_default</span><span class="p">)</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l63">63</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="p">{</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l64">64</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">regex_replace</span><span class="p">(</span><span class="n">s</span><span class="p">,</span><span class="w"> </span><span class="n">e</span><span class="p">,</span><span class="w"> </span><span class="n">fmt</span><span class="p">,</span><span class="w"> </span><span class="n">flags</span><span class="p">);</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l65">65</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="p">}</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l66">66</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l67">67</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="p">}</span><span class="w"> </span><span class="c1">// namespace boost</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l68">68</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l69">69</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"><span class="cp">#endif </span><span class="c1">// BOOST_REGEX_V5_REGEX_MERGE_HPP</span></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l70">70</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l71">71</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"></td>
|
||||
</tr>
|
||||
<tr class="source-line">
|
||||
<td class="col-lineno">
|
||||
<a id="l72">72</a>
|
||||
</td>
|
||||
<td class="col-tla"></td>
|
||||
<td class="col-count">
|
||||
</td>
|
||||
<td class="col-source"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> </section>
|
||||
</div>
|
||||
|
||||
<footer class="main-footer">
|
||||
Created using <a href="http://gcovr.com/en/main">GCOVR (Version 8.6+main)</a>
|
||||
at 2026-05-22 16:53:31
|
||||
</footer>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,295 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="theme-green">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<title>src/ - regex</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<script>
|
||||
// Apply theme and font size immediately to prevent flash
|
||||
(function() {
|
||||
document.documentElement.classList.add('no-transitions');
|
||||
|
||||
var saved = localStorage.getItem('gcovr-theme');
|
||||
var theme = (saved === 'light' || saved === 'dark') ? saved
|
||||
: window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';
|
||||
document.documentElement.setAttribute('data-theme', theme);
|
||||
document.documentElement.style.backgroundColor = theme === 'light' ? '#ffffff' : '#0d1117';
|
||||
|
||||
// Apply flat mode immediately to prevent sidebar flash
|
||||
if (localStorage.getItem('gcovr-view-mode') === 'flat') {
|
||||
document.documentElement.classList.add('early-flat-mode');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<link rel="stylesheet" href="index.css"/>
|
||||
<script src="index.js" charset="UTF-8"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="app-container">
|
||||
<!-- Sidebar -->
|
||||
<aside class="sidebar" id="sidebar"><script>if(localStorage.getItem('sidebar-collapsed')==='true'){document.currentScript.parentElement.classList.add('collapsed');}else{var sw=localStorage.getItem('gcovr-sidebar-width');if(sw)document.documentElement.style.setProperty('--sidebar-width',sw+'px');}</script>
|
||||
<div class="sidebar-header">
|
||||
<div class="sidebar-header-row">
|
||||
<a href="index.html" class="sidebar-logo" title="Back to index">
|
||||
<svg viewBox="150 150 700 160" class="boost-wordmark"><path fill="#ffa000" d="M292.45,152.89h-93.18l-46.59,80,12.63,21.69,46.57-79.99h47.07c20.07,0,36.38,16.18,36.38,36.07,0,8.46-3.54,18.29-10.84,22.4,7.11,5.3,10.54,13.73,10.54,22.01,0,19.88-16.32,36.06-36.38,36.06h-61.71l16.12-27.7h45.59c4.66,0,8.45-3.75,8.45-8.36s-3.57-8.16-8.05-8.35c-.13-.02-36.25,0-36.25,0l16.14-27.71s20.22.02,20.31,0c1.9-.06,3.63-.74,5-1.85,1.93-1.53,3.15-3.87,3.15-6.5,0-4.62-3.79-8.37-8.45-8.37h-30.03l-47.04,80.75,17.39,29.85h93.18l46.59-80-46.59-80h0Z"/><path fill="currentColor" d="M550.81,291.93c-9.23,0-17.31-2.01-24.23-6.04s-12.29-9.63-16.1-16.83c-3.81-7.19-5.72-15.4-5.72-24.63s1.9-17.6,5.72-24.79c3.81-7.19,9.18-12.82,16.1-16.91,6.92-4.08,15-6.12,24.23-6.12s17.44,2.04,24.31,6.12,12.21,9.72,16.02,16.91,5.72,15.46,5.72,24.79-1.91,17.44-5.72,24.63-9.15,12.8-16.02,16.83c-6.87,4.02-14.97,6.04-24.31,6.04ZM550.81,272.45c5.37,0,9.79-1.23,13.28-3.7,3.49-2.47,6.12-5.82,7.89-10.06s2.66-8.99,2.66-14.25-.89-10.2-2.66-14.49c-1.77-4.29-4.4-7.7-7.89-10.22-3.49-2.52-7.92-3.78-13.28-3.78s-9.82,1.26-13.36,3.78c-3.54,2.52-6.2,5.93-7.97,10.22-1.77,4.29-2.66,9.12-2.66,14.49s.89,10.01,2.66,14.25c1.77,4.24,4.43,7.59,7.97,10.06s7.99,3.7,13.36,3.7Z"/><path fill="currentColor" d="M648.53,291.93c-9.23,0-17.31-2.01-24.23-6.04s-12.29-9.63-16.1-16.83c-3.81-7.19-5.72-15.4-5.72-24.63s1.9-17.6,5.72-24.79c3.81-7.19,9.18-12.82,16.1-16.91,6.92-4.08,15-6.12,24.23-6.12s17.44,2.04,24.31,6.12,12.21,9.72,16.02,16.91,5.72,15.46,5.72,24.79-1.91,17.44-5.72,24.63-9.15,12.8-16.02,16.83c-6.87,4.02-14.97,6.04-24.31,6.04ZM648.53,272.45c5.37,0,9.79-1.23,13.28-3.7,3.49-2.47,6.12-5.82,7.89-10.06s2.66-8.99,2.66-14.25-.89-10.2-2.66-14.49c-1.77-4.29-4.4-7.7-7.89-10.22-3.49-2.52-7.92-3.78-13.28-3.78s-9.82,1.26-13.36,3.78c-3.54,2.52-6.2,5.93-7.97,10.22-1.77,4.29-2.66,9.12-2.66,14.49s.89,10.01,2.66,14.25c1.77,4.24,4.43,7.59,7.97,10.06s7.99,3.7,13.36,3.7Z"/><path fill="currentColor" d="M722.75,260.85c.54,4.62,2.55,7.86,6.04,9.74s7.49,2.82,11.99,2.82,8.21-.8,11.11-2.41c2.9-1.61,4.35-4.24,4.35-7.89,0-2.25-.99-4-2.98-5.23s-4.56-2.2-7.73-2.9c-3.17-.7-6.66-1.37-10.46-2.01-3.81-.64-7.65-1.5-11.51-2.58-3.86-1.07-7.41-2.58-10.63-4.51-3.22-1.93-5.8-4.53-7.73-7.81-1.93-3.27-2.9-7.49-2.9-12.64,0-4.83,1.55-9.47,4.67-13.93,3.11-4.45,7.49-8.05,13.12-10.79,5.63-2.74,12.1-4.11,19.4-4.11,6.55,0,12.61,1.32,18.19,3.95,5.58,2.63,10.06,6.25,13.44,10.87s5.07,9.98,5.07,16.1h-21.41c-.43-4.61-2.15-7.86-5.15-9.74-3.01-1.88-6.6-2.82-10.79-2.82-4.94,0-8.69.99-11.27,2.98s-3.86,4.48-3.86,7.49c0,2.47.99,4.4,2.98,5.8,1.98,1.4,4.56,2.47,7.73,3.22,3.16.75,6.68,1.42,10.55,2.01,3.86.59,7.7,1.4,11.51,2.42,3.81,1.02,7.33,2.47,10.55,4.35s5.8,4.4,7.73,7.57,2.9,7.27,2.9,12.32c0,5.69-1.56,10.71-4.67,15.05-3.11,4.35-7.49,7.73-13.12,10.14-5.64,2.42-12.26,3.62-19.88,3.62-7.08,0-13.52-1.37-19.32-4.11s-10.44-6.44-13.93-11.11c-3.49-4.67-5.34-9.95-5.55-15.86h21.57,0Z"/><path fill="currentColor" d="M815.48,264.84v-47.29h17.55v-18.35h-17.55v-21.78l-34.42,40.14h12.84v51.81c0,11.05,8.95,20,20,20h21.7v-18.52h-14.12c-3.31,0-6-2.69-6-6h0Z"/><path fill="currentColor" d="M494.62,242.26c-2.36-3.92-5.58-7.03-9.66-9.34-1.08-.61-2.19-1.14-3.33-1.61.7-.44,1.36-.91,1.96-1.45,2.95-2.63,5.1-5.82,6.44-9.58,1.34-3.76,2.01-7.35,2.01-10.79,0-8.69-1.99-15.4-5.96-20.12s-9.31-8.02-16.02-9.9c-6.71-1.88-14.14-2.82-22.3-2.82h-34.29v112.7h40.41c8.16,0,15.59-.99,22.3-2.98,6.71-1.98,12.05-5.45,16.02-10.38,3.97-4.94,5.96-11.7,5.96-20.29,0-5.04-1.18-9.53-3.54-13.44ZM472.48,264.8c-1.88,2.09-4.46,3.52-7.73,4.27-3.28.75-6.9,1.13-10.87,1.13h-18.51v-74.54h12.4c4.08,0,7.73.32,10.95.97,3.22.64,5.77,1.96,7.65,3.95,1.88,1.99,2.82,4.91,2.82,8.77s-.94,6.79-2.82,8.78c-1.88,1.99-4.46,3.3-7.73,3.94-1.87.37-3.86.62-5.96.78l-11.25,19.19h12.46c4.08,0,7.73.35,10.95,1.05,3.22.7,5.77,2.01,7.65,3.94s2.82,4.83,2.82,8.69-.94,7-2.82,9.1v-.02Z"/></svg>
|
||||
</a>
|
||||
<button class="sidebar-toggle" id="sidebar-toggle" title="Toggle sidebar">
|
||||
<svg class="icon-collapse" viewBox="0 0 16 16" fill="currentColor"><path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/></svg>
|
||||
<svg class="icon-expand" viewBox="0 0 16 16" fill="currentColor"><path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="sidebar-title-group">
|
||||
<span class="sidebar-library">regex</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar-search">
|
||||
<input type="text" id="file-search" placeholder="Search files..." autocomplete="off">
|
||||
<button class="search-clear" id="search-clear" type="button" aria-label="Clear search">×</button>
|
||||
</div>
|
||||
<div class="tree-controls">
|
||||
<button class="tree-control-btn" id="expand-all" title="Expand all">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 1a.5.5 0 01.5.5v5h5a.5.5 0 010 1h-5v5a.5.5 0 01-1 0v-5h-5a.5.5 0 010-1h5v-5A.5.5 0 018 1z"/></svg>
|
||||
Expand
|
||||
</button>
|
||||
<button class="tree-control-btn" id="collapse-all" title="Collapse all">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M2 8a.5.5 0 01.5-.5h11a.5.5 0 010 1h-11A.5.5 0 012 8z"/></svg>
|
||||
Collapse
|
||||
</button>
|
||||
</div>
|
||||
<nav class="sidebar-nav" id="file-tree">
|
||||
<div class="tree-item ">
|
||||
<div class="tree-item-header">
|
||||
<span class="tree-spacer"></span>
|
||||
<svg class="tree-icon tree-icon-file" viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M3.75 1.5a.25.25 0 00-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 00.25-.25V6h-2.75A1.75 1.75 0 019 4.25V1.5H3.75zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-2.938-2.938zM2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0113.25 16h-9.5A1.75 1.75 0 012 14.25V1.75z"></path></svg>
|
||||
<a class="tree-label" href="index.posix_api.cpp.cfc7145cfaa87ceb158ee21e8fa5193a.html" title="posix_api.cpp">posix_api.cpp</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tree-item ">
|
||||
<div class="tree-item-header">
|
||||
<span class="tree-spacer"></span>
|
||||
<svg class="tree-icon tree-icon-file" viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M3.75 1.5a.25.25 0 00-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 00.25-.25V6h-2.75A1.75 1.75 0 019 4.25V1.5H3.75zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-2.938-2.938zM2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0113.25 16h-9.5A1.75 1.75 0 012 14.25V1.75z"></path></svg>
|
||||
<a class="tree-label" href="index.wide_posix_api.cpp.5d708c8c14b8fa1710211bdab41e2b13.html" title="wide_posix_api.cpp">wide_posix_api.cpp</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="sidebar-resize-handle" id="sidebar-resize-handle"></div>
|
||||
</aside>
|
||||
|
||||
<!-- Mobile sidebar backdrop -->
|
||||
<div class="sidebar-backdrop" id="sidebar-backdrop"></div>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main class="main-content">
|
||||
<header class="main-header">
|
||||
<button class="mobile-menu-btn" id="mobile-menu-btn" title="Open menu">
|
||||
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M2.5 12a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm0-4a.5.5 0 0 1 .5-.5h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5z"/></svg>
|
||||
</button>
|
||||
<div class="breadcrumb">
|
||||
<a href="index.html" class="breadcrumb-home">regex</a><span class="separator">/</span><span class="current" title="src/">src / </span> </div>
|
||||
<div class="header-actions">
|
||||
</div>
|
||||
<div class="view-toggle" id="view-toggle" style="display:none">
|
||||
<button class="view-btn active" data-view="nested">Nested</button>
|
||||
<button class="view-btn" data-view="flat">Flat</button>
|
||||
</div>
|
||||
<button class="theme-toggle" id="theme-toggle" title="Toggle theme">
|
||||
<svg class="icon-moon" viewBox="0 0 16 16" fill="currentColor"><path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"/></svg>
|
||||
<svg class="icon-sun" viewBox="0 0 16 16" fill="currentColor"><path d="M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z"/></svg>
|
||||
</button>
|
||||
<button class="settings-btn" id="settings-btn" title="Settings">
|
||||
<svg viewBox="0 0 16 16" width="18" height="18" fill="currentColor"><path d="M8 4.754a3.246 3.246 0 100 6.492 3.246 3.246 0 000-6.492zM5.754 8a2.246 2.246 0 114.492 0 2.246 2.246 0 01-4.492 0z"/><path d="M9.796 1.343c-.527-1.79-3.065-1.79-3.592 0l-.094.319a.873.873 0 01-1.255.52l-.292-.16c-1.64-.892-3.433.902-2.54 2.541l.159.292a.873.873 0 01-.52 1.255l-.319.094c-1.79.527-1.79 3.065 0 3.592l.319.094a.873.873 0 01.52 1.255l-.16.292c-.892 1.64.901 3.434 2.541 2.54l.292-.159a.873.873 0 011.255.52l.094.319c.527 1.79 3.065 1.79 3.592 0l.094-.319a.873.873 0 011.255-.52l.292.16c1.64.893 3.434-.902 2.54-2.541l-.159-.292a.873.873 0 01.52-1.255l.319-.094c1.79-.527 1.79-3.065 0-3.592l-.319-.094a.873.873 0 01-.52-1.255l.16-.292c.893-1.64-.902-3.433-2.541-2.54l-.292.159a.873.873 0 01-1.255-.52l-.094-.319zm-2.633.283c.246-.835 1.428-.835 1.674 0l.094.319a1.873 1.873 0 002.693 1.115l.291-.16c.764-.415 1.6.42 1.184 1.185l-.159.292a1.873 1.873 0 001.116 2.692l.318.094c.835.246.835 1.428 0 1.674l-.319.094a1.873 1.873 0 00-1.115 2.693l.16.291c.415.764-.421 1.6-1.185 1.184l-.291-.159a1.873 1.873 0 00-2.693 1.116l-.094.318c-.246.835-1.428.835-1.674 0l-.094-.319a1.873 1.873 0 00-2.692-1.115l-.292.16c-.764.415-1.6-.421-1.184-1.185l.159-.291A1.873 1.873 0 001.945 8.93l-.319-.094c-.835-.246-.835-1.428 0-1.674l.319-.094A1.873 1.873 0 003.06 4.377l-.16-.292c-.415-.764.42-1.6 1.185-1.184l.292.159a1.873 1.873 0 002.692-1.115l.094-.319z"/></svg>
|
||||
</button>
|
||||
<div class="settings-dropdown" id="settings-dropdown"></div>
|
||||
</header>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="summary-section">
|
||||
<div class="summary-cards">
|
||||
<div class="summary-card">
|
||||
<div class="summary-card-header">
|
||||
<h3>Lines</h3>
|
||||
</div>
|
||||
<div class="summary-card-body">
|
||||
<div class="coverage-ring coverage-medium">
|
||||
<svg viewBox="0 0 36 36">
|
||||
<path class="ring-bg" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
|
||||
<path class="ring-fill" stroke-dasharray="89.4, 100" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
|
||||
</svg>
|
||||
<span class="ring-text">89.4%</span>
|
||||
</div>
|
||||
<div class="summary-stats">
|
||||
<div class="stat-row">
|
||||
<span class="stat-label">Hit</span>
|
||||
<span class="stat-value">6554</span>
|
||||
</div>
|
||||
<div class="stat-row">
|
||||
<span class="stat-label">Total</span>
|
||||
<span class="stat-value">7330</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="summary-card">
|
||||
<div class="summary-card-header">
|
||||
<h3>Functions</h3>
|
||||
</div>
|
||||
<div class="summary-card-body">
|
||||
<div class="coverage-ring coverage-low">
|
||||
<svg viewBox="0 0 36 36">
|
||||
<path class="ring-bg" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
|
||||
<path class="ring-fill" stroke-dasharray="59.3, 100" d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831"/>
|
||||
</svg>
|
||||
<span class="ring-text">59.3%</span>
|
||||
</div>
|
||||
<div class="summary-stats">
|
||||
<div class="stat-row">
|
||||
<span class="stat-label">Hit</span>
|
||||
<span class="stat-value">4210</span>
|
||||
</div>
|
||||
<div class="stat-row">
|
||||
<span class="stat-label">Total</span>
|
||||
<span class="stat-value">7115</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="coverage-legend">
|
||||
<span class="legend-item coverage-high">High: ≥ 90.0%</span>
|
||||
<span class="legend-item coverage-medium">Medium: ≥ 75.0%</span>
|
||||
<span class="legend-item coverage-low">Low: < 75.0%</span>
|
||||
<span class="legend-separator"></span>
|
||||
<a href="index.functions.html" class="legend-item legend-functions-link" title="List of all functions">
|
||||
<span class="fx-icon" aria-hidden="true"><i>f</i>(x)</span>
|
||||
List of functions
|
||||
</a>
|
||||
</div> </section>
|
||||
|
||||
<section class="main-section">
|
||||
<div class="file-list-container no-branches no-conditions no-decisions no-calls">
|
||||
<div class="file-list-header">
|
||||
<div class="col-name sortable sorted-ascending" data-sort="filename">
|
||||
Name
|
||||
</div>
|
||||
<div class="col-coverage sortable" data-sort="coverage">
|
||||
Coverage
|
||||
</div>
|
||||
<div class="col-lines sortable" data-sort="lines">
|
||||
Lines
|
||||
</div>
|
||||
<div class="col-functions sortable" data-sort="functions">
|
||||
Functions
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="file-list-body" id="file-list">
|
||||
<div class="file-row file"
|
||||
data-filename="posix_api.cpp"
|
||||
data-coverage="72.6"
|
||||
data-lines="113"
|
||||
data-lines-exec="82"
|
||||
data-lines-coverage="72.6"
|
||||
data-lines-class="coverage-low"
|
||||
data-functions="100.0"
|
||||
data-functions-coverage="100.0"
|
||||
data-functions-class="coverage-high"
|
||||
data-branches="-"
|
||||
data-branches-coverage="-"
|
||||
data-branches-class="coverage-unknown"
|
||||
data-conditions="-"
|
||||
data-conditions-coverage="-"
|
||||
data-conditions-class="coverage-unknown"
|
||||
data-decisions="-"
|
||||
data-decisions-coverage="-"
|
||||
data-decisions-class="coverage-unknown"
|
||||
data-calls="57.7"
|
||||
data-calls-coverage="57.7"
|
||||
data-calls-class="coverage-low"
|
||||
data-diff="UNDEFINED">
|
||||
<div class="col-name">
|
||||
<span class="file-icon">
|
||||
<svg viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M3.75 1.5a.25.25 0 00-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 00.25-.25V6h-2.75A1.75 1.75 0 019 4.25V1.5H3.75zm6.75.062V4.25c0 .138.112.25.25.25h2.688a.252.252 0 00-.011-.013l-2.914-2.914a.272.272 0 00-.013-.011zM2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0113.25 16h-9.5A1.75 1.75 0 012 14.25V1.75z"></path></svg>
|
||||
</span>
|
||||
<a href="index.posix_api.cpp.cfc7145cfaa87ceb158ee21e8fa5193a.html" title="posix_api.cpp">posix_api.cpp</a>
|
||||
</div>
|
||||
|
||||
<div class="col-coverage">
|
||||
<div class="coverage-bar-container">
|
||||
<div class="coverage-bar coverage-low" style="width: 72.6%"></div>
|
||||
</div>
|
||||
<span class="coverage-percent coverage-low">72.6%</span>
|
||||
</div>
|
||||
|
||||
<div class="col-lines">
|
||||
<span class="stat-value">82</span>
|
||||
<span class="stat-separator">/</span>
|
||||
<span class="stat-total">113</span>
|
||||
</div>
|
||||
<div class="col-functions">
|
||||
<span class="stat-value coverage-high">100.0%</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="file-row file"
|
||||
data-filename="wide_posix_api.cpp"
|
||||
data-coverage="74.3"
|
||||
data-lines="109"
|
||||
data-lines-exec="81"
|
||||
data-lines-coverage="74.3"
|
||||
data-lines-class="coverage-low"
|
||||
data-functions="100.0"
|
||||
data-functions-coverage="100.0"
|
||||
data-functions-class="coverage-high"
|
||||
data-branches="-"
|
||||
data-branches-coverage="-"
|
||||
data-branches-class="coverage-unknown"
|
||||
data-conditions="-"
|
||||
data-conditions-coverage="-"
|
||||
data-conditions-class="coverage-unknown"
|
||||
data-decisions="-"
|
||||
data-decisions-coverage="-"
|
||||
data-decisions-class="coverage-unknown"
|
||||
data-calls="58.9"
|
||||
data-calls-coverage="58.9"
|
||||
data-calls-class="coverage-low"
|
||||
data-diff="UNDEFINED">
|
||||
<div class="col-name">
|
||||
<span class="file-icon">
|
||||
<svg viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M3.75 1.5a.25.25 0 00-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 00.25-.25V6h-2.75A1.75 1.75 0 019 4.25V1.5H3.75zm6.75.062V4.25c0 .138.112.25.25.25h2.688a.252.252 0 00-.011-.013l-2.914-2.914a.272.272 0 00-.013-.011zM2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0113.25 16h-9.5A1.75 1.75 0 012 14.25V1.75z"></path></svg>
|
||||
</span>
|
||||
<a href="index.wide_posix_api.cpp.5d708c8c14b8fa1710211bdab41e2b13.html" title="wide_posix_api.cpp">wide_posix_api.cpp</a>
|
||||
</div>
|
||||
|
||||
<div class="col-coverage">
|
||||
<div class="coverage-bar-container">
|
||||
<div class="coverage-bar coverage-low" style="width: 74.3%"></div>
|
||||
</div>
|
||||
<span class="coverage-percent coverage-low">74.3%</span>
|
||||
</div>
|
||||
|
||||
<div class="col-lines">
|
||||
<span class="stat-value">81</span>
|
||||
<span class="stat-separator">/</span>
|
||||
<span class="stat-total">109</span>
|
||||
</div>
|
||||
<div class="col-functions">
|
||||
<span class="stat-value coverage-high">100.0%</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> </section>
|
||||
</div>
|
||||
|
||||
<footer class="main-footer">
|
||||
Created using <a href="http://gcovr.com/en/main">GCOVR (Version 8.6+main)</a>
|
||||
at 2026-05-22 16:53:31
|
||||
</footer>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user