mirror of
https://github.com/boostorg/regex.git
synced 2026-06-11 19:51:14 +02:00
Compare commits
469 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ee3d533e84 | |||
| 99f8d02805 | |||
| 7043e5585f | |||
| 048d5b788c | |||
| ee631c02eb | |||
| 4600a25228 | |||
| aebb44e507 | |||
| 8d994b14b2 | |||
| d310bc9835 | |||
| 6c02074270 | |||
| ca44c8182c | |||
| 2e10c5ec17 | |||
| ba148bae42 | |||
| 7c74a98ae5 | |||
| 9424952e8f | |||
| c3f14400b0 | |||
| 55a6787950 | |||
| 4c0572d98f | |||
| 25e51d3984 | |||
| c9b37542c5 | |||
| 6382470ac1 | |||
| 1dc081e1c2 | |||
| b3e28896b7 | |||
| 76176b302b | |||
| a262f28327 | |||
| e3aacc5c55 | |||
| dc90d07749 | |||
| 300ca31723 | |||
| c65dd3be41 | |||
| 5a29047906 | |||
| cdd130ae2d | |||
| 9f47972bcf | |||
| 0633ba70f2 | |||
| 8330b19cec | |||
| b8eab985e5 | |||
| f90d8c667e | |||
| 4b7f14e72d | |||
| 89515b9a8e | |||
| 3075aaba4a | |||
| 50b8204753 | |||
| 02c652c01e | |||
| b3f7d35f68 | |||
| f1312f16c4 | |||
| 9ebe515adf | |||
| c9efbea4a7 | |||
| 6cbda47155 | |||
| 3e60ca3481 | |||
| 3026d5e6c6 | |||
| f3088d1c77 | |||
| f82771be8c | |||
| 02f6fd45b8 | |||
| 9058b985a9 | |||
| 65f6604b24 | |||
| 16d6b87b1b | |||
| 82572db442 | |||
| 80104e292d | |||
| be01708af3 | |||
| 39f1fb4d17 | |||
| b84b17b3c4 | |||
| 2c3ff62e1b | |||
| 7858e47a26 | |||
| cd0072b3e7 | |||
| bf9350aa16 | |||
| 6b95ac002e | |||
| 7f93cee9af | |||
| e79458b0e3 | |||
| 207b0c63cd | |||
| f6b9c3d809 | |||
| a008c722a4 | |||
| dddfc1a63a | |||
| a247f4d7f8 | |||
| 84c2228b3f | |||
| ebc12d24c9 | |||
| 1a50827c46 | |||
| d19f04af7b | |||
| 2e9fa8c8f8 | |||
| c642977acd | |||
| 27875c1e55 | |||
| 42337410fc | |||
| aa132bec5d | |||
| d0258375ae | |||
| 7ba011232c | |||
| 6bb6cddad6 | |||
| f9d0907868 | |||
| 8324fad77c | |||
| 23f71d7727 | |||
| de9338cedf | |||
| dc3878df84 | |||
| aa68609a60 | |||
| a804285fb6 | |||
| 8b4da77f83 | |||
| 2606d1bdd1 | |||
| 9215a04042 | |||
| f7eb12d9c7 | |||
| 515044821c | |||
| 72a7a13565 | |||
| 63778bea05 | |||
| 54e9a2fbcb | |||
| ff1c0a0bb5 | |||
| c23a7a8cfe | |||
| 651256800f | |||
| 696fa47670 | |||
| ab5a7a768d | |||
| a669854a84 | |||
| 11ea8aab76 | |||
| ee85ed89a1 | |||
| 13dfa17e63 | |||
| 182616ea25 | |||
| 83306608a7 | |||
| f3c1b8d784 | |||
| 3b27d5a38e | |||
| 567d76e8e4 | |||
| 51ef8177d3 | |||
| 2e1ed31f34 | |||
| ccc9c16e93 | |||
| 4e412a1774 | |||
| e4248fcb19 | |||
| ae95ac6ad0 | |||
| feb3f7bc40 | |||
| b66ac65061 | |||
| d695b70ee9 | |||
| 222b16693c | |||
| 6750cf4892 | |||
| 9d565f63ed | |||
| 8a5b00c128 | |||
| 11f535596b | |||
| bba214f904 | |||
| 8be91f0568 | |||
| cddfd077a8 | |||
| 41e54c1cf2 | |||
| 0f2f6b6dfc | |||
| ff80be2019 | |||
| 8e03097d9d | |||
| e12105e591 | |||
| 1c915e3fda | |||
| cb9409160a | |||
| c32c644a38 | |||
| 5c0a6398ab | |||
| 4a851cf958 | |||
| 6f9ba7a289 | |||
| 4a06f15183 | |||
| 01a3b56f8a | |||
| 3fc6433d44 | |||
| 5255c45b0a | |||
| ed48905c5e | |||
| 13769e4fff | |||
| 6dfa7ef86c | |||
| eb91bf612a | |||
| e016ef8e21 | |||
| ca984697f0 | |||
| 2f9da388c1 | |||
| f50f35d1fc | |||
| df4b8e696f | |||
| 3673a0a888 | |||
| a69678c3c6 | |||
| 8fb69853fc | |||
| 70199360d3 | |||
| 9aa18a159d | |||
| 4122e8f08d | |||
| 922322b644 | |||
| 89d445c1b6 | |||
| 31d1dc1182 | |||
| 8bb6861595 | |||
| 11ddff601b | |||
| 088b492987 | |||
| 535e1b05cc | |||
| 1f15026060 | |||
| f0f32bdda1 | |||
| a81a1ea30f | |||
| 640f633395 | |||
| 0ed72c37e4 | |||
| 5cf85df857 | |||
| 3819294ac1 | |||
| ea96eafacc | |||
| a31ae14cf8 | |||
| 158c26d85c | |||
| 86e5251979 | |||
| cebaf09b5d | |||
| d0ba00a2e7 | |||
| 75293e9854 | |||
| 45e593c4fe | |||
| 251099c828 | |||
| 5705d52e84 | |||
| 88a0f9d75a | |||
| fbb087dec9 | |||
| c84ebf1c5b | |||
| 1eec12f177 | |||
| 82ad27c468 | |||
| 897c33be2a | |||
| 2ecd905fb2 | |||
| abef9c7249 | |||
| 0e37a76df0 | |||
| adc4ee41e3 | |||
| 9a4e5d29c1 | |||
| ff4890b2e2 | |||
| 3a5f4775f7 | |||
| 5a65397974 | |||
| e5d9c95456 | |||
| b6a13dd215 | |||
| cf285ed3e5 | |||
| 66ddab7fae | |||
| 09bfc7f853 | |||
| 13df8a293b | |||
| 40ab965ee9 | |||
| 0fec291b28 | |||
| 6ee955be5f | |||
| eeae9a0762 | |||
| c7c8400efa | |||
| a7f8f56d92 | |||
| 66ac67533c | |||
| d9694bbc1f | |||
| f81bdae7f1 | |||
| aebf86bbe5 | |||
| de9ecb7407 | |||
| fa43c7ab1d | |||
| 5f0f6fa8f1 | |||
| 81f404ec69 | |||
| 38b55d0db8 | |||
| bed785ad19 | |||
| bb711db956 | |||
| 13f9af564d | |||
| 43cf48f61e | |||
| 2767f7f6ba | |||
| 035e752ed2 | |||
| 753a3d6584 | |||
| ab0051399e | |||
| 61ea1b566a | |||
| 1ad6328d33 | |||
| e6a371c6d6 | |||
| ee59983ea9 | |||
| ad769fcfdb | |||
| 2468d450f2 | |||
| d47f20f147 | |||
| 0575e50ddb | |||
| de40dac5d1 | |||
| b2c4abc9cf | |||
| b856079e74 | |||
| 293b945785 | |||
| 998f94ffe9 | |||
| 53de3c4ae6 | |||
| bbbd65c2e4 | |||
| 129cf61f65 | |||
| 992eb043af | |||
| 084af757b4 | |||
| 1035f25b65 | |||
| eacf31772b | |||
| 8d8a209d8b | |||
| 6b75e3962d | |||
| 1826080071 | |||
| 2ee6dec715 | |||
| 298651b2f6 | |||
| 752c43f9d4 | |||
| 976fb02a1b | |||
| d67a843d5a | |||
| 3e3752e992 | |||
| 7c42b3aca6 | |||
| bb89bbb29a | |||
| 2035a49533 | |||
| 6e82619133 | |||
| 1d560fae85 | |||
| b4cf815f7d | |||
| 1d3653812a | |||
| 9ef4719dff | |||
| e18c474222 | |||
| 7f6be58d92 | |||
| 11accf4a8b | |||
| b55cce9a42 | |||
| 6f9658fa6c | |||
| 936e0cfd99 | |||
| 290270440e | |||
| 76c85c7c34 | |||
| 44d33b20d5 | |||
| 98377b57aa | |||
| 43df21bca1 | |||
| c8e9df8fa2 | |||
| a5d1526fbb | |||
| f79497c625 | |||
| a108657449 | |||
| 9225fa8531 | |||
| 07c20c1926 | |||
| d227059666 | |||
| f5082341c0 | |||
| 5613d77433 | |||
| 6463dcfb07 | |||
| c07c4e0a11 | |||
| e993619390 | |||
| e22aaa9d20 | |||
| 52dbd281ca | |||
| e4138b5bdc | |||
| 534f6273c0 | |||
| b2dd7877da | |||
| 0cda8c8a2e | |||
| 04282b5d0a | |||
| 554832217c | |||
| 63130c1ef5 | |||
| edbc68df6c | |||
| 372a07902e | |||
| 4ae95dae74 | |||
| 277ca851c8 | |||
| f0d62fb2c0 | |||
| 7104418bd5 | |||
| 0bd54d3821 | |||
| c167b1f183 | |||
| 52920ff98f | |||
| 72c3b4ed13 | |||
| 6cc5cf41d5 | |||
| a7984bb149 | |||
| 876ff39307 | |||
| 79f80ad09d | |||
| 19d8e96cf5 | |||
| e047b2b509 | |||
| 28968bd2b6 | |||
| c4b295684b | |||
| 33b6eb0637 | |||
| de9ad8df74 | |||
| a042a0b6de | |||
| f16f300347 | |||
| a543dce5e3 | |||
| fe45d5bf4a | |||
| 4dd87c299f | |||
| 3d3f591516 | |||
| 5b5d4c3145 | |||
| 1c45c7a48d | |||
| 4922ae784f | |||
| 007c0da3b2 | |||
| 3fb0375da4 | |||
| 0cef054b31 | |||
| 7218f9847a | |||
| 2bc1f9c998 | |||
| 9edaddab6f | |||
| 1647dd908e | |||
| 187208adf5 | |||
| 30e9920147 | |||
| 1d473147fd | |||
| 1be8e9241b | |||
| e60414a5e7 | |||
| 7bd8e2a14d | |||
| b2396011f9 | |||
| b9628e449d | |||
| 139a2f60fb | |||
| a4912a834e | |||
| 014b66b2f4 | |||
| b2ea26705d | |||
| 432f59cde7 | |||
| 846da064e0 | |||
| 88a6779e8b | |||
| 5749937f26 | |||
| e1492c79ce | |||
| a06c964cab | |||
| 77f76889f8 | |||
| 50c4d1e6ca | |||
| 7079ba0424 | |||
| e7b8b5712d | |||
| f5f309be54 | |||
| 890dc95e0d | |||
| 517d3e9256 | |||
| 9bbca4613c | |||
| 01575dccbd | |||
| 3045723a54 | |||
| 2fd9ef66cc | |||
| 56447e1443 | |||
| d36070e4cd | |||
| 4f1b0d09b3 | |||
| 1acfee5702 | |||
| 330d46f306 | |||
| 60659c5d84 | |||
| 1444ac208f | |||
| c0a8361373 | |||
| 0ef48255a7 | |||
| bfb3ccc907 | |||
| 04b11fdd1c | |||
| f466b2ad2a | |||
| f913683002 | |||
| a58bf0705d | |||
| f6fd177e2a | |||
| 9f051ee667 | |||
| 08cee9a2a6 | |||
| efd0ce56bc | |||
| fb81ff65fc | |||
| 774c7ec4d5 | |||
| 19dab6c60a | |||
| a719c77f63 | |||
| 33a84ba374 | |||
| 8d9bce7c33 | |||
| a92faf9d3d | |||
| ab16e6c6c0 | |||
| ed21a5183b | |||
| dcb64d5db7 | |||
| 42ba37691e | |||
| 020cbe902e | |||
| fac0fa6653 | |||
| b8adb4df00 | |||
| 1758679bd6 | |||
| 98fd29d60c | |||
| 26ccffe3d0 | |||
| f5368b7666 | |||
| c126ed4b87 | |||
| 9e6a7d8e5f | |||
| 15142ddf9d | |||
| 831160baa2 | |||
| db6b4db44d | |||
| f414a067b8 | |||
| 833740c25b | |||
| ee8c9873bc | |||
| efdf9e57a4 | |||
| 2609a56230 | |||
| 24dd51c869 | |||
| 8872307cb1 | |||
| 50610bf111 | |||
| 25d57dbe3e | |||
| d754f23bcf | |||
| 973b12c5c8 | |||
| ff022f31cf | |||
| bc4755e14f | |||
| 9f9f46f34b | |||
| dd2dbfacbb | |||
| 2f8875124b | |||
| 603337af8f | |||
| 47f5cc6fa1 | |||
| 31c5b449bb | |||
| 1afe49fdbf | |||
| b5dcded581 | |||
| 36c217882a | |||
| 49d23c0323 | |||
| ec8aac99c5 | |||
| 328e0b5561 | |||
| e927090ba0 | |||
| 1d0dabd892 | |||
| 2c52692f8d | |||
| 0b582e974f | |||
| 72caa3f9ca | |||
| 6281799115 | |||
| 6221e7f953 | |||
| 2b0fc3c3a8 | |||
| 91953b9cf2 | |||
| 2c085b3dc4 | |||
| 19ac3b9eba | |||
| c0399a3a57 | |||
| 36e4289aaa | |||
| 680e5b9e13 | |||
| 31c9a1f9c6 | |||
| 8700307cf5 | |||
| 4378b06e43 | |||
| dc38a40569 | |||
| fcdbbcff08 | |||
| 209636b869 | |||
| 13df83ab96 | |||
| 74ca42eb88 | |||
| 5efb356b84 | |||
| bd184b7ade | |||
| f59c88d0bb | |||
| df6fa4ba79 | |||
| 9148159b98 | |||
| fe33e5ebb9 | |||
| 65b6a3ba3e | |||
| 224cb764cf | |||
| 8685c139ee | |||
| d7ab782289 | |||
| a3cc73508f | |||
| 17b1472aa2 | |||
| e345f05fa9 | |||
| 8a5e8b8c62 | |||
| c9cfe5a906 | |||
| a47bcdb944 | |||
| fc0bf318a2 | |||
| 61696218da | |||
| 4dbf30d14e | |||
| 116efaa69a | |||
| 58a5836642 |
@@ -0,0 +1,96 @@
|
||||
* 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
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 12 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 12 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 12 KiB |
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"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
@@ -1,295 +0,0 @@
|
||||
<!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
@@ -1,857 +0,0 @@
|
||||
<!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
@@ -1,295 +0,0 @@
|
||||
<!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
File diff suppressed because it is too large
Load Diff
-4104
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
@@ -1,423 +0,0 @@
|
||||
{
|
||||
"root": "../../boost-root",
|
||||
"gcovr/summary_format_version": "0.6",
|
||||
"files": [
|
||||
{
|
||||
"filename": "include/boost/regex/v5/basic_regex.hpp",
|
||||
"line_total": 205,
|
||||
"line_covered": 200,
|
||||
"line_percent": 97.6,
|
||||
"function_total": 352,
|
||||
"function_covered": 341,
|
||||
"function_percent": 96.9,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/basic_regex_creator.hpp",
|
||||
"line_total": 806,
|
||||
"line_covered": 793,
|
||||
"line_percent": 98.4,
|
||||
"function_total": 371,
|
||||
"function_covered": 331,
|
||||
"function_percent": 89.2,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/basic_regex_parser.hpp",
|
||||
"line_total": 1796,
|
||||
"line_covered": 1582,
|
||||
"line_percent": 88.1,
|
||||
"function_total": 239,
|
||||
"function_covered": 200,
|
||||
"function_percent": 83.7,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/c_regex_traits.hpp",
|
||||
"line_total": 167,
|
||||
"line_covered": 134,
|
||||
"line_percent": 80.2,
|
||||
"function_total": 20,
|
||||
"function_covered": 20,
|
||||
"function_percent": 100.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/cpp_regex_traits.hpp",
|
||||
"line_total": 342,
|
||||
"line_covered": 211,
|
||||
"line_percent": 61.7,
|
||||
"function_total": 81,
|
||||
"function_covered": 72,
|
||||
"function_percent": 88.9,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/icu.hpp",
|
||||
"line_total": 371,
|
||||
"line_covered": 310,
|
||||
"line_percent": 83.6,
|
||||
"function_total": 192,
|
||||
"function_covered": 97,
|
||||
"function_percent": 50.5,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/match_flags.hpp",
|
||||
"line_total": 10,
|
||||
"line_covered": 10,
|
||||
"line_percent": 100.0,
|
||||
"function_total": 5,
|
||||
"function_covered": 5,
|
||||
"function_percent": 100.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/match_results.hpp",
|
||||
"line_total": 307,
|
||||
"line_covered": 273,
|
||||
"line_percent": 88.9,
|
||||
"function_total": 771,
|
||||
"function_covered": 471,
|
||||
"function_percent": 61.1,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/mem_block_cache.hpp",
|
||||
"line_total": 29,
|
||||
"line_covered": 29,
|
||||
"line_percent": 100.0,
|
||||
"function_total": 8,
|
||||
"function_covered": 8,
|
||||
"function_percent": 100.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/object_cache.hpp",
|
||||
"line_total": 44,
|
||||
"line_covered": 42,
|
||||
"line_percent": 95.5,
|
||||
"function_total": 6,
|
||||
"function_covered": 6,
|
||||
"function_percent": 100.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/pattern_except.hpp",
|
||||
"line_total": 20,
|
||||
"line_covered": 17,
|
||||
"line_percent": 85.0,
|
||||
"function_total": 14,
|
||||
"function_covered": 6,
|
||||
"function_percent": 42.9,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/perl_matcher.hpp",
|
||||
"line_total": 137,
|
||||
"line_covered": 134,
|
||||
"line_percent": 97.8,
|
||||
"function_total": 356,
|
||||
"function_covered": 221,
|
||||
"function_percent": 62.1,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/perl_matcher_common.hpp",
|
||||
"line_total": 416,
|
||||
"line_covered": 399,
|
||||
"line_percent": 95.9,
|
||||
"function_total": 1055,
|
||||
"function_covered": 477,
|
||||
"function_percent": 45.2,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/perl_matcher_non_recursive.hpp",
|
||||
"line_total": 910,
|
||||
"line_covered": 873,
|
||||
"line_percent": 95.9,
|
||||
"function_total": 1910,
|
||||
"function_covered": 930,
|
||||
"function_percent": 48.7,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/primary_transform.hpp",
|
||||
"line_total": 31,
|
||||
"line_covered": 17,
|
||||
"line_percent": 54.8,
|
||||
"function_total": 8,
|
||||
"function_covered": 6,
|
||||
"function_percent": 75.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/regex_format.hpp",
|
||||
"line_total": 420,
|
||||
"line_covered": 403,
|
||||
"line_percent": 96.0,
|
||||
"function_total": 458,
|
||||
"function_covered": 196,
|
||||
"function_percent": 42.8,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/regex_grep.hpp",
|
||||
"line_total": 26,
|
||||
"line_covered": 23,
|
||||
"line_percent": 88.5,
|
||||
"function_total": 10,
|
||||
"function_covered": 10,
|
||||
"function_percent": 100.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/regex_iterator.hpp",
|
||||
"line_total": 48,
|
||||
"line_covered": 48,
|
||||
"line_percent": 100.0,
|
||||
"function_total": 242,
|
||||
"function_covered": 152,
|
||||
"function_percent": 62.8,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/regex_match.hpp",
|
||||
"line_total": 20,
|
||||
"line_covered": 20,
|
||||
"line_percent": 100.0,
|
||||
"function_total": 28,
|
||||
"function_covered": 20,
|
||||
"function_percent": 71.4,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/regex_merge.hpp",
|
||||
"line_total": 2,
|
||||
"line_covered": 2,
|
||||
"line_percent": 100.0,
|
||||
"function_total": 1,
|
||||
"function_covered": 1,
|
||||
"function_percent": 100.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/regex_raw_buffer.hpp",
|
||||
"line_total": 45,
|
||||
"line_covered": 45,
|
||||
"line_percent": 100.0,
|
||||
"function_total": 9,
|
||||
"function_covered": 9,
|
||||
"function_percent": 100.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/regex_replace.hpp",
|
||||
"line_total": 25,
|
||||
"line_covered": 24,
|
||||
"line_percent": 96.0,
|
||||
"function_total": 12,
|
||||
"function_covered": 12,
|
||||
"function_percent": 100.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/regex_search.hpp",
|
||||
"line_total": 23,
|
||||
"line_covered": 21,
|
||||
"line_percent": 91.3,
|
||||
"function_total": 65,
|
||||
"function_covered": 50,
|
||||
"function_percent": 76.9,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/regex_split.hpp",
|
||||
"line_total": 38,
|
||||
"line_covered": 37,
|
||||
"line_percent": 97.4,
|
||||
"function_total": 9,
|
||||
"function_covered": 9,
|
||||
"function_percent": 100.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/regex_token_iterator.hpp",
|
||||
"line_total": 98,
|
||||
"line_covered": 96,
|
||||
"line_percent": 98.0,
|
||||
"function_total": 89,
|
||||
"function_covered": 88,
|
||||
"function_percent": 98.9,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/regex_traits.hpp",
|
||||
"line_total": 18,
|
||||
"line_covered": 18,
|
||||
"line_percent": 100.0,
|
||||
"function_total": 32,
|
||||
"function_covered": 31,
|
||||
"function_percent": 96.9,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/regex_traits_defaults.hpp",
|
||||
"line_total": 86,
|
||||
"line_covered": 83,
|
||||
"line_percent": 96.5,
|
||||
"function_total": 42,
|
||||
"function_covered": 38,
|
||||
"function_percent": 90.5,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/regex_workaround.hpp",
|
||||
"line_total": 6,
|
||||
"line_covered": 5,
|
||||
"line_percent": 83.3,
|
||||
"function_total": 1,
|
||||
"function_covered": 1,
|
||||
"function_percent": 100.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/sub_match.hpp",
|
||||
"line_total": 166,
|
||||
"line_covered": 162,
|
||||
"line_percent": 97.6,
|
||||
"function_total": 207,
|
||||
"function_covered": 150,
|
||||
"function_percent": 72.5,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/u32regex_iterator.hpp",
|
||||
"line_total": 55,
|
||||
"line_covered": 49,
|
||||
"line_percent": 89.1,
|
||||
"function_total": 90,
|
||||
"function_covered": 27,
|
||||
"function_percent": 30.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/u32regex_token_iterator.hpp",
|
||||
"line_total": 113,
|
||||
"line_covered": 43,
|
||||
"line_percent": 38.1,
|
||||
"function_total": 97,
|
||||
"function_covered": 12,
|
||||
"function_percent": 12.4,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "include/boost/regex/v5/unicode_iterator.hpp",
|
||||
"line_total": 328,
|
||||
"line_covered": 288,
|
||||
"line_percent": 87.8,
|
||||
"function_total": 314,
|
||||
"function_covered": 205,
|
||||
"function_percent": 65.3,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "src/posix_api.cpp",
|
||||
"line_total": 113,
|
||||
"line_covered": 82,
|
||||
"line_percent": 72.6,
|
||||
"function_total": 4,
|
||||
"function_covered": 4,
|
||||
"function_percent": 100.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
},
|
||||
{
|
||||
"filename": "src/wide_posix_api.cpp",
|
||||
"line_total": 109,
|
||||
"line_covered": 81,
|
||||
"line_percent": 74.3,
|
||||
"function_total": 4,
|
||||
"function_covered": 4,
|
||||
"function_percent": 100.0,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": null
|
||||
}
|
||||
],
|
||||
"line_total": 7330,
|
||||
"line_covered": 6554,
|
||||
"line_percent": 89.4,
|
||||
"function_total": 7102,
|
||||
"function_covered": 4210,
|
||||
"function_percent": 59.3,
|
||||
"branch_total": 0,
|
||||
"branch_covered": 0,
|
||||
"branch_percent": 0.0
|
||||
}
|
||||
@@ -1,631 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "include",
|
||||
"coverage": "89.9",
|
||||
"coverageClass": "coverage-medium",
|
||||
"linesTotal": "7108",
|
||||
"linesExec": "6391",
|
||||
"linesCoverage": "89.9",
|
||||
"linesClass": "coverage-medium",
|
||||
"functionsCoverage": "59.2",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": true,
|
||||
"link": "index.include.d436eb0fd9de10b54a828ce6435f7e81.html",
|
||||
"children": [
|
||||
{
|
||||
"name": "boost",
|
||||
"coverage": "",
|
||||
"coverageClass": "coverage-unknown",
|
||||
"linesTotal": "",
|
||||
"linesExec": "",
|
||||
"linesCoverage": "",
|
||||
"linesClass": "",
|
||||
"functionsCoverage": "",
|
||||
"functionsClass": "",
|
||||
"branchesCoverage": "",
|
||||
"branchesClass": "",
|
||||
"isDirectory": true,
|
||||
"link": null,
|
||||
"children": [
|
||||
{
|
||||
"name": "regex",
|
||||
"coverage": "",
|
||||
"coverageClass": "coverage-unknown",
|
||||
"linesTotal": "",
|
||||
"linesExec": "",
|
||||
"linesCoverage": "",
|
||||
"linesClass": "",
|
||||
"functionsCoverage": "",
|
||||
"functionsClass": "",
|
||||
"branchesCoverage": "",
|
||||
"branchesClass": "",
|
||||
"isDirectory": true,
|
||||
"link": null,
|
||||
"children": [
|
||||
{
|
||||
"name": "v5",
|
||||
"coverage": "",
|
||||
"coverageClass": "coverage-unknown",
|
||||
"linesTotal": "",
|
||||
"linesExec": "",
|
||||
"linesCoverage": "",
|
||||
"linesClass": "",
|
||||
"functionsCoverage": "",
|
||||
"functionsClass": "",
|
||||
"branchesCoverage": "",
|
||||
"branchesClass": "",
|
||||
"isDirectory": true,
|
||||
"link": null,
|
||||
"children": [
|
||||
{
|
||||
"name": "basic_regex.hpp",
|
||||
"coverage": "97.6",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "205",
|
||||
"linesExec": "200",
|
||||
"linesCoverage": "97.6",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "96.9",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.basic_regex.hpp.fc7ae442ee1c3ba72f0c8efe27e0d4a0.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "basic_regex_creator.hpp",
|
||||
"coverage": "98.4",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "806",
|
||||
"linesExec": "793",
|
||||
"linesCoverage": "98.4",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "89.2",
|
||||
"functionsClass": "coverage-medium",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.basic_regex_creator.hpp.ddc38b9ace9f1fce2474b7a8aa072758.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "basic_regex_parser.hpp",
|
||||
"coverage": "88.1",
|
||||
"coverageClass": "coverage-medium",
|
||||
"linesTotal": "1796",
|
||||
"linesExec": "1582",
|
||||
"linesCoverage": "88.1",
|
||||
"linesClass": "coverage-medium",
|
||||
"functionsCoverage": "83.7",
|
||||
"functionsClass": "coverage-medium",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.basic_regex_parser.hpp.3d312756fa15eb91f18ce74346527498.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "c_regex_traits.hpp",
|
||||
"coverage": "80.2",
|
||||
"coverageClass": "coverage-medium",
|
||||
"linesTotal": "167",
|
||||
"linesExec": "134",
|
||||
"linesCoverage": "80.2",
|
||||
"linesClass": "coverage-medium",
|
||||
"functionsCoverage": "100.0",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.c_regex_traits.hpp.4a312148ed0fde78796e7f563ab76c8c.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "cpp_regex_traits.hpp",
|
||||
"coverage": "61.7",
|
||||
"coverageClass": "coverage-low",
|
||||
"linesTotal": "342",
|
||||
"linesExec": "211",
|
||||
"linesCoverage": "61.7",
|
||||
"linesClass": "coverage-low",
|
||||
"functionsCoverage": "88.9",
|
||||
"functionsClass": "coverage-medium",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.cpp_regex_traits.hpp.065ad3525ef9ac006d863057e1e02b79.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "icu.hpp",
|
||||
"coverage": "83.6",
|
||||
"coverageClass": "coverage-medium",
|
||||
"linesTotal": "371",
|
||||
"linesExec": "310",
|
||||
"linesCoverage": "83.6",
|
||||
"linesClass": "coverage-medium",
|
||||
"functionsCoverage": "50.5",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.icu.hpp.85a0eeb0fabef296bfc4997ff2ba1c10.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "match_flags.hpp",
|
||||
"coverage": "100.0",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "10",
|
||||
"linesExec": "10",
|
||||
"linesCoverage": "100.0",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "100.0",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.match_flags.hpp.1af065f3f48dd91d0fe78746fcc481f7.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "match_results.hpp",
|
||||
"coverage": "88.9",
|
||||
"coverageClass": "coverage-medium",
|
||||
"linesTotal": "307",
|
||||
"linesExec": "273",
|
||||
"linesCoverage": "88.9",
|
||||
"linesClass": "coverage-medium",
|
||||
"functionsCoverage": "61.1",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.match_results.hpp.6f836c49889c34cb37b399542baf9aad.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "mem_block_cache.hpp",
|
||||
"coverage": "100.0",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "29",
|
||||
"linesExec": "29",
|
||||
"linesCoverage": "100.0",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "100.0",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.mem_block_cache.hpp.774760178b61a39a431f88e157dbeb00.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "object_cache.hpp",
|
||||
"coverage": "95.5",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "44",
|
||||
"linesExec": "42",
|
||||
"linesCoverage": "95.5",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "100.0",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.object_cache.hpp.4205d672d499c4d505efbd5c4c18a6d7.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "pattern_except.hpp",
|
||||
"coverage": "85.0",
|
||||
"coverageClass": "coverage-medium",
|
||||
"linesTotal": "20",
|
||||
"linesExec": "17",
|
||||
"linesCoverage": "85.0",
|
||||
"linesClass": "coverage-medium",
|
||||
"functionsCoverage": "42.9",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.pattern_except.hpp.b02995306146a84a816c726ffb2330d1.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "perl_matcher.hpp",
|
||||
"coverage": "97.8",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "137",
|
||||
"linesExec": "134",
|
||||
"linesCoverage": "97.8",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "62.1",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.perl_matcher.hpp.06d9b87b6156807b3cf2c759c3470f4c.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "perl_matcher_common.hpp",
|
||||
"coverage": "95.9",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "416",
|
||||
"linesExec": "399",
|
||||
"linesCoverage": "95.9",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "45.2",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.perl_matcher_common.hpp.a80be6e3c2e730ca65c745979c0f2c25.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "perl_matcher_non_recursive.hpp",
|
||||
"coverage": "95.9",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "910",
|
||||
"linesExec": "873",
|
||||
"linesCoverage": "95.9",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "48.7",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.perl_matcher_non_recursive.hpp.dab741f714b85b31fb79aec3a5169121.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "primary_transform.hpp",
|
||||
"coverage": "54.8",
|
||||
"coverageClass": "coverage-low",
|
||||
"linesTotal": "31",
|
||||
"linesExec": "17",
|
||||
"linesCoverage": "54.8",
|
||||
"linesClass": "coverage-low",
|
||||
"functionsCoverage": "75.0",
|
||||
"functionsClass": "coverage-medium",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.primary_transform.hpp.f5a3fa617cbe44ea611e82cf685be5de.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regex_format.hpp",
|
||||
"coverage": "96.0",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "420",
|
||||
"linesExec": "403",
|
||||
"linesCoverage": "96.0",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "42.8",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.regex_format.hpp.cbfb4d559693198023d36b54c0718da8.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regex_grep.hpp",
|
||||
"coverage": "88.5",
|
||||
"coverageClass": "coverage-medium",
|
||||
"linesTotal": "26",
|
||||
"linesExec": "23",
|
||||
"linesCoverage": "88.5",
|
||||
"linesClass": "coverage-medium",
|
||||
"functionsCoverage": "100.0",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.regex_grep.hpp.136157ec6043ed61e9e3c53cbca56207.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regex_iterator.hpp",
|
||||
"coverage": "100.0",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "48",
|
||||
"linesExec": "48",
|
||||
"linesCoverage": "100.0",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "62.8",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.regex_iterator.hpp.ec4c2b3efdca8342ebcbd87d33ac2551.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regex_match.hpp",
|
||||
"coverage": "100.0",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "20",
|
||||
"linesExec": "20",
|
||||
"linesCoverage": "100.0",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "71.4",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.regex_match.hpp.52d49d2882a598bc100172b30fdc9d28.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regex_merge.hpp",
|
||||
"coverage": "100.0",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "2",
|
||||
"linesExec": "2",
|
||||
"linesCoverage": "100.0",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "100.0",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.regex_merge.hpp.33d760b7953f0b4898c72299d831fc8c.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regex_raw_buffer.hpp",
|
||||
"coverage": "100.0",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "45",
|
||||
"linesExec": "45",
|
||||
"linesCoverage": "100.0",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "100.0",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.regex_raw_buffer.hpp.77701f68cbde88eced9e7f01d308832b.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regex_replace.hpp",
|
||||
"coverage": "96.0",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "25",
|
||||
"linesExec": "24",
|
||||
"linesCoverage": "96.0",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "100.0",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.regex_replace.hpp.c4b3d6cdac5c516e993e1b9cc67f4537.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regex_search.hpp",
|
||||
"coverage": "91.3",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "23",
|
||||
"linesExec": "21",
|
||||
"linesCoverage": "91.3",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "76.9",
|
||||
"functionsClass": "coverage-medium",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.regex_search.hpp.f27bcdbf1ed1b869adf859f2f255321f.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regex_split.hpp",
|
||||
"coverage": "97.4",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "38",
|
||||
"linesExec": "37",
|
||||
"linesCoverage": "97.4",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "100.0",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.regex_split.hpp.79301dd57396b64d102f9beeef6f66e1.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regex_token_iterator.hpp",
|
||||
"coverage": "98.0",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "98",
|
||||
"linesExec": "96",
|
||||
"linesCoverage": "98.0",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "98.9",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.regex_token_iterator.hpp.a853c95168815fb1dc822438deee2041.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regex_traits.hpp",
|
||||
"coverage": "100.0",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "18",
|
||||
"linesExec": "18",
|
||||
"linesCoverage": "100.0",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "96.9",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.regex_traits.hpp.d789ddd33a94513158258f47f9458fa9.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regex_traits_defaults.hpp",
|
||||
"coverage": "96.5",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "86",
|
||||
"linesExec": "83",
|
||||
"linesCoverage": "96.5",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "90.5",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.regex_traits_defaults.hpp.0e98adc4b3e9dddef47398f3d8191f7e.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "regex_workaround.hpp",
|
||||
"coverage": "83.3",
|
||||
"coverageClass": "coverage-medium",
|
||||
"linesTotal": "6",
|
||||
"linesExec": "5",
|
||||
"linesCoverage": "83.3",
|
||||
"linesClass": "coverage-medium",
|
||||
"functionsCoverage": "100.0",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.regex_workaround.hpp.4f4c12e5cddef399d459e91c0f0af974.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "sub_match.hpp",
|
||||
"coverage": "97.6",
|
||||
"coverageClass": "coverage-high",
|
||||
"linesTotal": "166",
|
||||
"linesExec": "162",
|
||||
"linesCoverage": "97.6",
|
||||
"linesClass": "coverage-high",
|
||||
"functionsCoverage": "72.5",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.sub_match.hpp.8759274a22f6d7afc27afd16b4ac0c35.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "u32regex_iterator.hpp",
|
||||
"coverage": "89.1",
|
||||
"coverageClass": "coverage-medium",
|
||||
"linesTotal": "55",
|
||||
"linesExec": "49",
|
||||
"linesCoverage": "89.1",
|
||||
"linesClass": "coverage-medium",
|
||||
"functionsCoverage": "30.0",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.u32regex_iterator.hpp.cad511ff9f518ed5712544f4e2df17c3.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "u32regex_token_iterator.hpp",
|
||||
"coverage": "38.1",
|
||||
"coverageClass": "coverage-low",
|
||||
"linesTotal": "113",
|
||||
"linesExec": "43",
|
||||
"linesCoverage": "38.1",
|
||||
"linesClass": "coverage-low",
|
||||
"functionsCoverage": "12.4",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.u32regex_token_iterator.hpp.b0c5226fc9ad02ba0b06216e9824edae.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "unicode_iterator.hpp",
|
||||
"coverage": "87.8",
|
||||
"coverageClass": "coverage-medium",
|
||||
"linesTotal": "328",
|
||||
"linesExec": "288",
|
||||
"linesCoverage": "87.8",
|
||||
"linesClass": "coverage-medium",
|
||||
"functionsCoverage": "65.3",
|
||||
"functionsClass": "coverage-low",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.unicode_iterator.hpp.6391a069c7ef3c1dd9a38df9254be88f.html",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "src",
|
||||
"coverage": "73.4",
|
||||
"coverageClass": "coverage-low",
|
||||
"linesTotal": "222",
|
||||
"linesExec": "163",
|
||||
"linesCoverage": "73.4",
|
||||
"linesClass": "coverage-low",
|
||||
"functionsCoverage": "100.0",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": true,
|
||||
"link": "index.src.25d902c24283ab8cfbac54dfa101ad31.html",
|
||||
"children": [
|
||||
{
|
||||
"name": "posix_api.cpp",
|
||||
"coverage": "72.6",
|
||||
"coverageClass": "coverage-low",
|
||||
"linesTotal": "113",
|
||||
"linesExec": "82",
|
||||
"linesCoverage": "72.6",
|
||||
"linesClass": "coverage-low",
|
||||
"functionsCoverage": "100.0",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.posix_api.cpp.cfc7145cfaa87ceb158ee21e8fa5193a.html",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "wide_posix_api.cpp",
|
||||
"coverage": "74.3",
|
||||
"coverageClass": "coverage-low",
|
||||
"linesTotal": "109",
|
||||
"linesExec": "81",
|
||||
"linesCoverage": "74.3",
|
||||
"linesClass": "coverage-low",
|
||||
"functionsCoverage": "100.0",
|
||||
"functionsClass": "coverage-high",
|
||||
"branchesCoverage": "-",
|
||||
"branchesClass": "coverage-unknown",
|
||||
"isDirectory": false,
|
||||
"link": "index.wide_posix_api.cpp.5d708c8c14b8fa1710211bdab41e2b13.html",
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1,8 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0; url=./gcovr/index.html">
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org/libs/regex for most recent version.
|
||||
* FILE cregex.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares POSIX API functions
|
||||
* + boost::RegEx high level wrapper.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RE_CREGEX_HPP
|
||||
#define BOOST_RE_CREGEX_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_REGEX_V3
|
||||
#include <boost/regex/v3/cregex.hpp>
|
||||
#else
|
||||
#include <boost/regex/v4/cregex.hpp>
|
||||
#endif
|
||||
|
||||
#endif // include guard
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2000
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org/libs/regex for documentation.
|
||||
* FILE regex.h
|
||||
* VERSION 3.12
|
||||
* DESCRIPTION: Declares POSIX API functions
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RE_REGEX_H
|
||||
#define BOOST_RE_REGEX_H
|
||||
|
||||
#include <boost/cregex.hpp>
|
||||
|
||||
//
|
||||
// add using declarations to bring POSIX API functions into
|
||||
// global scope, only if this is C++ (and not C).
|
||||
//
|
||||
#ifdef __cplusplus
|
||||
|
||||
using boost::regoff_t;
|
||||
using boost::regex_tA;
|
||||
using boost::regmatch_t;
|
||||
using boost::REG_BASIC;
|
||||
using boost::REG_EXTENDED;
|
||||
using boost::REG_ICASE;
|
||||
using boost::REG_NOSUB;
|
||||
using boost::REG_NEWLINE;
|
||||
using boost::REG_NOSPEC;
|
||||
using boost::REG_PEND;
|
||||
using boost::REG_DUMP;
|
||||
using boost::REG_NOCOLLATE;
|
||||
using boost::REG_ESCAPE_IN_LISTS;
|
||||
using boost::REG_NEWLINE_ALT;
|
||||
using boost::REG_PERL;
|
||||
using boost::REG_AWK;
|
||||
using boost::REG_GREP;
|
||||
using boost::REG_EGREP;
|
||||
using boost::REG_ASSERT;
|
||||
using boost::REG_INVARG;
|
||||
using boost::REG_ATOI;
|
||||
using boost::REG_ITOA;
|
||||
|
||||
using boost::REG_NOTBOL;
|
||||
using boost::REG_NOTEOL;
|
||||
using boost::REG_STARTEND;
|
||||
|
||||
using boost::reg_comp_flags;
|
||||
using boost::reg_exec_flags;
|
||||
using boost::regcompA;
|
||||
using boost::regerrorA;
|
||||
using boost::regexecA;
|
||||
using boost::regfreeA;
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
using boost::regcompW;
|
||||
using boost::regerrorW;
|
||||
using boost::regexecW;
|
||||
using boost::regfreeW;
|
||||
using boost::regex_tW;
|
||||
#endif
|
||||
|
||||
using boost::REG_NOERROR;
|
||||
using boost::REG_NOMATCH;
|
||||
using boost::REG_BADPAT;
|
||||
using boost::REG_ECOLLATE;
|
||||
using boost::REG_ECTYPE;
|
||||
using boost::REG_EESCAPE;
|
||||
using boost::REG_ESUBREG;
|
||||
using boost::REG_EBRACK;
|
||||
using boost::REG_EPAREN;
|
||||
using boost::REG_EBRACE;
|
||||
using boost::REG_BADBR;
|
||||
using boost::REG_ERANGE;
|
||||
using boost::REG_ESPACE;
|
||||
using boost::REG_BADRPT;
|
||||
using boost::REG_EEND;
|
||||
using boost::REG_ESIZE;
|
||||
using boost::REG_ERPAREN;
|
||||
using boost::REG_EMPTY;
|
||||
using boost::REG_E_MEMORY;
|
||||
using boost::REG_E_UNKNOWN;
|
||||
using boost::reg_errcode_t;
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // BOOST_RE_REGEX_H
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org/libs/regex for documentation.
|
||||
* FILE regex.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares boost::reg_expression<> and associated
|
||||
* functions and classes. This header is the main
|
||||
* entry point for the template regex code.
|
||||
*/
|
||||
|
||||
|
||||
/* start with C compatibility API */
|
||||
|
||||
#ifndef BOOST_RE_REGEX_HPP
|
||||
#define BOOST_RE_REGEX_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_REGEX_V3
|
||||
#include <boost/regex/v3/regex.hpp>
|
||||
#else
|
||||
#include <boost/regex/v4/regex.hpp>
|
||||
#endif
|
||||
|
||||
#endif // include
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,627 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE config.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: regex extended config setup.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#define BOOST_REGEX_CONFIG_HPP
|
||||
//
|
||||
// Borland C++ Fix/error check
|
||||
// this has to go *before* we include any std lib headers:
|
||||
//
|
||||
#if defined(__BORLANDC__)
|
||||
# include <boost/regex/config/borland.hpp>
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Include all the headers we need here:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
# ifndef BOOST_REGEX_USER_CONFIG
|
||||
# define BOOST_REGEX_USER_CONFIG <boost/regex/user.hpp>
|
||||
# endif
|
||||
|
||||
# include BOOST_REGEX_USER_CONFIG
|
||||
|
||||
# include <cstdlib>
|
||||
# include <cstddef>
|
||||
# include <cstdio>
|
||||
# include <clocale>
|
||||
# include <cassert>
|
||||
# include <string>
|
||||
# include <stdexcept>
|
||||
# include <iterator>
|
||||
# include <iosfwd>
|
||||
# include <vector>
|
||||
# include <boost/config.hpp>
|
||||
# include <boost/cstdint.hpp>
|
||||
# include <boost/regex/config/allocator.hpp>
|
||||
# include <boost/regex/config/cstring.hpp>
|
||||
# include <boost/throw_exception.hpp>
|
||||
# include <boost/scoped_ptr.hpp>
|
||||
# ifndef BOOST_NO_STD_LOCALE
|
||||
# include <locale>
|
||||
# endif
|
||||
#else
|
||||
//
|
||||
// C build,
|
||||
// don't include <boost/config.hpp> because that may
|
||||
// do C++ specific things in future...
|
||||
//
|
||||
# include <stdlib.h>
|
||||
# include <stddef.h>
|
||||
# ifdef _MSC_VER
|
||||
# define BOOST_MSVC _MSC_VER
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Boilerplate regex config options:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Obsolete macro, use BOOST_VERSION instead: */
|
||||
#define BOOST_RE_VERSION 320
|
||||
|
||||
// fix:
|
||||
#if defined(_UNICODE) && !defined(UNICODE)
|
||||
#define UNICODE
|
||||
#endif
|
||||
|
||||
//
|
||||
// If there isn't good enough wide character support then there will
|
||||
// be no wide character regular expressions:
|
||||
//
|
||||
#if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING))
|
||||
# if !defined(BOOST_NO_WREGEX)
|
||||
# define BOOST_NO_WREGEX
|
||||
# endif
|
||||
#else
|
||||
# if defined(__sgi) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||
// STLPort on IRIX is misconfigured: <cwctype> does not compile
|
||||
// as a temporary fix include <wctype.h> instead and prevent inclusion
|
||||
// of STLPort version of <cwctype>
|
||||
# include <wctype.h>
|
||||
# define __STLPORT_CWCTYPE
|
||||
# define _STLP_CWCTYPE
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
# include <boost/regex/config/cwchar.hpp>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// If Win32 support has been disabled for boost in general, then
|
||||
// it is for regex in particular:
|
||||
//
|
||||
#if defined(BOOST_DISABLE_WIN32) && !defined(BOOST_REGEX_NO_W32)
|
||||
# define BOOST_REGEX_NO_W32
|
||||
#endif
|
||||
|
||||
// some versions of gcc can't merge template instances:
|
||||
#if defined(__CYGWIN__)
|
||||
# define BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE
|
||||
#endif
|
||||
|
||||
// fix problems with bool as a macro,
|
||||
// this probably doesn't affect any current compilers:
|
||||
#if defined(bool) || defined(true) || defined(false)
|
||||
# define BOOST_REGEX_NO_BOOL
|
||||
#endif
|
||||
|
||||
// We don't make our templates external if the compiler
|
||||
// can't handle it:
|
||||
#if (defined(BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS) || defined(__HP_aCC) || defined(__MWERKS__) || defined(__COMO__) || defined(BOOST_INTEL))\
|
||||
&& !defined(BOOST_MSVC) && !defined(__BORLANDC__)
|
||||
# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
#endif
|
||||
|
||||
// disable our own file-iterators and mapfiles if we can't
|
||||
// support them:
|
||||
#if !defined(BOOST_HAS_DIRENT_H) && !(defined(_WIN32) && !defined(BOOST_REGEX_NO_W32))
|
||||
# define BOOST_REGEX_NO_FILEITER
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef MB_CUR_MAX
|
||||
// yuk!
|
||||
// better make a conservative guess!
|
||||
#define MB_CUR_MAX 10
|
||||
#endif
|
||||
|
||||
namespace boost{ namespace re_detail{
|
||||
#ifdef BOOST_NO_STD_DISTANCE
|
||||
template <class T>
|
||||
std::ptrdiff_t distance(const T& x, const T& y)
|
||||
{ return y - x; }
|
||||
#else
|
||||
using std::distance;
|
||||
#endif
|
||||
}}
|
||||
|
||||
|
||||
#ifdef BOOST_REGEX_NO_BOOL
|
||||
# define BOOST_REGEX_MAKE_BOOL(x) static_cast<bool>((x) ? true : false)
|
||||
#else
|
||||
# ifdef BOOST_MSVC
|
||||
// warning suppression with VC6:
|
||||
# pragma warning(disable: 4800)
|
||||
# endif
|
||||
# define BOOST_REGEX_MAKE_BOOL(x) static_cast<bool>(x)
|
||||
#endif
|
||||
#endif // __cplusplus
|
||||
|
||||
// backwards compatibitity:
|
||||
#if defined(BOOST_RE_NO_LIB)
|
||||
# define BOOST_REGEX_NO_LIB
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (defined(_WIN32) || defined(__CYGWIN__))
|
||||
// gcc on win32 has problems merging switch statements in templates:
|
||||
# define BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE
|
||||
// gcc on win32 has problems if you include <windows.h>
|
||||
// (sporadically generates bad code).
|
||||
# define BOOST_REGEX_USE_C_LOCALE
|
||||
# define BOOST_REGEX_NO_W32
|
||||
#endif
|
||||
#if defined(__COMO__) && !defined(BOOST_REGEX_NO_W32) && !defined(_MSC_EXTENSIONS)
|
||||
# define BOOST_REGEX_NO_W32
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Wide character workarounds:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1300) && !defined(BOOST_REGEX_V3) && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||
# define BOOST_REGEX_HAS_SHORT_WCHAR_T
|
||||
namespace boost{ typedef __wchar_t regex_wchar_type; }
|
||||
#else
|
||||
namespace boost{ typedef wchar_t regex_wchar_type; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Set up dll import/export options:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(BOOST_HAS_DECLSPEC) && (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK)
|
||||
# if defined(BOOST_REGEX_SOURCE)
|
||||
# define BOOST_REGEX_DECL __declspec(dllexport)
|
||||
# define BOOST_REGEX_BUILD_DLL
|
||||
# else
|
||||
# define BOOST_REGEX_DECL __declspec(dllimport)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_REGEX_DECL
|
||||
# define BOOST_REGEX_DECL
|
||||
#endif
|
||||
|
||||
#if (defined(BOOST_MSVC) || defined(__BORLANDC__)) && !defined(BOOST_REGEX_NO_LIB) && !defined(BOOST_REGEX_SOURCE) && !defined(BOOST_ALL_NO_LIB) && defined(__cplusplus)
|
||||
# define BOOST_LIB_NAME boost_regex
|
||||
# if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
|
||||
# define BOOST_DYN_LINK
|
||||
# endif
|
||||
#ifdef BOOST_REGEX_DIAG
|
||||
# define BOOST_LIB_DIAGNOSTIC
|
||||
#endif
|
||||
# include <boost/config/auto_link.hpp>
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Set up function call type:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1200) && defined(_MSC_EXTENSIONS)
|
||||
#if defined(_DEBUG) || defined(__MSVC_RUNTIME_CHECKS)
|
||||
# define BOOST_REGEX_CALL __cdecl
|
||||
#else
|
||||
# define BOOST_REGEX_CALL __fastcall
|
||||
#endif
|
||||
# define BOOST_REGEX_CCALL __cdecl
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)
|
||||
# define BOOST_REGEX_CALL __fastcall
|
||||
# define BOOST_REGEX_CCALL __stdcall
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_REGEX_CALL
|
||||
# define BOOST_REGEX_CALL
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_CCALL
|
||||
#define BOOST_REGEX_CCALL
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Set up localisation model:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
// backwards compatibility:
|
||||
#ifdef BOOST_RE_LOCALE_C
|
||||
# define BOOST_REGEX_USE_C_LOCALE
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_RE_LOCALE_CPP
|
||||
# define BOOST_REGEX_USE_CPP_LOCALE
|
||||
#endif
|
||||
|
||||
// Win32 defaults to native Win32 locale:
|
||||
#if defined(_WIN32) && !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_REGEX_NO_W32)
|
||||
# define BOOST_REGEX_USE_WIN32_LOCALE
|
||||
#endif
|
||||
// otherwise use C locale:
|
||||
#if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE)
|
||||
# define BOOST_REGEX_USE_C_LOCALE
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef MAXPATH
|
||||
# define BOOST_REGEX_MAX_PATH MAXPATH
|
||||
#elif defined(MAX_PATH)
|
||||
# define BOOST_REGEX_MAX_PATH MAX_PATH
|
||||
#elif defined(FILENAME_MAX)
|
||||
# define BOOST_REGEX_MAX_PATH FILENAME_MAX
|
||||
#else
|
||||
# define BOOST_REGEX_MAX_PATH 200
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_REGEX_MAX_STATE_COUNT
|
||||
# define BOOST_REGEX_MAX_STATE_COUNT 100000000
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Error Handling for exception free compilers:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef BOOST_NO_EXCEPTIONS
|
||||
//
|
||||
// If there are no exceptions then we must report critical-errors
|
||||
// the only way we know how; by terminating.
|
||||
//
|
||||
# define BOOST_REGEX_NOEH_ASSERT(x)\
|
||||
if(0 == (x))\
|
||||
{\
|
||||
std::string s("Error: critical regex++ failure in: ");\
|
||||
s.append(#x);\
|
||||
std::runtime_error e(s);\
|
||||
boost::throw_exception(e);\
|
||||
}
|
||||
#else
|
||||
//
|
||||
// With exceptions then error handling is taken care of and
|
||||
// there is no need for these checks:
|
||||
//
|
||||
# define BOOST_REGEX_NOEH_ASSERT(x)
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Debugging / tracing support:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(BOOST_REGEX_DEBUG) && defined(__cplusplus)
|
||||
|
||||
# include <iostream>
|
||||
using std::cout;
|
||||
using std::cin;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using std::hex;
|
||||
using std::dec;
|
||||
|
||||
# ifndef jm_assert
|
||||
# define jm_assert(x) assert(x)
|
||||
# endif
|
||||
# ifndef jm_trace
|
||||
# define jm_trace(x) cerr << x << endl;
|
||||
# endif
|
||||
# ifndef jm_instrument
|
||||
# define jm_instrument jm_trace(__FILE__<<"#"<<__LINE__)
|
||||
# endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
class debug_guard
|
||||
{
|
||||
public:
|
||||
char g1[32];
|
||||
const char* pc;
|
||||
char* pnc;
|
||||
const char* file;
|
||||
int line;
|
||||
char g2[32];
|
||||
debug_guard(const char* f, int l, const char* p1 = 0, char* p2 = 0);
|
||||
~debug_guard();
|
||||
};
|
||||
|
||||
# define BOOST_RE_GUARD_STACK boost::re_detail::debug_guard sg(__FILE__, __LINE__);
|
||||
# define BOOST_RE_GUARD_GLOBAL(x) const char g1##x[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, }; char g2##x[32]; boost::debug_guard g3##x(__FILE__, __LINE__, g1##x, g2##x);
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#else
|
||||
|
||||
# define jm_assert(x)
|
||||
# define jm_trace(x)
|
||||
# define BOOST_RE_GUARD_STACK
|
||||
# define BOOST_RE_GUARD_GLOBAL(x)
|
||||
# ifndef jm_instrument
|
||||
# define jm_instrument
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Stack protection under MS Windows:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(BOOST_REGEX_NO_W32) && !defined(BOOST_REGEX_V3)
|
||||
# if(defined(_WIN32) || defined(_WIN64) || defined(_WINCE)) \
|
||||
&& !defined(__GNUC__) \
|
||||
&& !(defined(__BORLANDC__) && (__BORLANDC__ >= 0x600)) \
|
||||
&& !(defined(__MWERKS__) && (__MWERKS__ <= 0x3003))
|
||||
# define BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
# endif
|
||||
#elif defined(BOOST_REGEX_HAS_MS_STACK_GUARD)
|
||||
# undef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && defined(BOOST_REGEX_HAS_MS_STACK_GUARD)
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL reset_stack_guard_page();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Error handling:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL raise_regex_exception(const std::string& s);
|
||||
|
||||
template <class traits>
|
||||
void raise_error(const traits& t, unsigned code)
|
||||
{
|
||||
(void)t; // warning suppression
|
||||
raise_regex_exception(t.error_string(code));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Algorithm selection and configuration:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(BOOST_REGEX_RECURSIVE) && !defined(BOOST_REGEX_NON_RECURSIVE)
|
||||
# if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && !defined(_STLP_DEBUG) && !defined(__STL_DEBUG)
|
||||
# define BOOST_REGEX_RECURSIVE
|
||||
# else
|
||||
# define BOOST_REGEX_NON_RECURSIVE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_REGEX_NON_RECURSIVE
|
||||
# ifdef BOOST_REGEX_RECURSIVE
|
||||
# error "Can't set both BOOST_REGEX_RECURSIVE and BOOST_REGEX_NON_RECURSIVE"
|
||||
# endif
|
||||
# ifndef BOOST_REGEX_BLOCKSIZE
|
||||
# define BOOST_REGEX_BLOCKSIZE 4096
|
||||
# endif
|
||||
# if BOOST_REGEX_BLOCKSIZE < 512
|
||||
# error "BOOST_REGEX_BLOCKSIZE must be at least 512"
|
||||
# endif
|
||||
# ifndef BOOST_REGEX_MAX_BLOCKS
|
||||
# define BOOST_REGEX_MAX_BLOCKS 1024
|
||||
# endif
|
||||
# ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
# undef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
# endif
|
||||
# ifndef BOOST_REGEX_MAX_CACHE_BLOCKS
|
||||
# define BOOST_REGEX_MAX_CACHE_BLOCKS 16
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Fix broken compilers that wrongly #define some symbols:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
// the following may be defined as macros; this is
|
||||
// incompatable with std::something syntax, we have
|
||||
// no choice but to undef them?
|
||||
|
||||
#ifdef sprintf
|
||||
#undef sprintf
|
||||
#endif
|
||||
#ifdef swprintf
|
||||
#undef swprintf
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Fix broken broken namespace support:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)
|
||||
|
||||
namespace std{
|
||||
using ::ptrdiff_t;
|
||||
using ::size_t;
|
||||
using ::sprintf;
|
||||
using ::abs;
|
||||
using ::setlocale;
|
||||
# ifndef BOOST_NO_WREGEX
|
||||
# ifndef BOOST_NO_SWPRINTF
|
||||
using ::swprintf;
|
||||
# endif
|
||||
using ::wcstombs;
|
||||
using ::mbstowcs;
|
||||
# if !defined(BOOST_NO_STD_LOCALE) && !defined (__STL_NO_NATIVE_MBSTATE_T) && !defined(_STLP_NO_NATIVE_MBSTATE_T)
|
||||
using ::mbstate_t;
|
||||
# endif
|
||||
# endif // BOOST_NO_WREGEX
|
||||
using ::fseek;
|
||||
using ::fread;
|
||||
using ::ftell;
|
||||
using ::fopen;
|
||||
using ::fclose;
|
||||
using ::FILE;
|
||||
#ifdef BOOST_NO_EXCEPTIONS
|
||||
using ::fprintf;
|
||||
using ::abort;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* helper functions pointer_construct/pointer_destroy:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace boost{ namespace re_detail{
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4100)
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
inline void pointer_destroy(T* p)
|
||||
{ p->~T(); (void)p; }
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
inline void pointer_construct(T* p, const T& t)
|
||||
{ new (p) T(t); }
|
||||
|
||||
}} // namespaces
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* helper memory allocation functions:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(__cplusplus) && defined(BOOST_REGEX_NON_RECURSIVE)
|
||||
namespace boost{ namespace re_detail{
|
||||
|
||||
BOOST_REGEX_DECL void* BOOST_REGEX_CALL get_mem_block();
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void*);
|
||||
|
||||
}} // namespaces
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Diagnostics:
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef BOOST_REGEX_CONFIG_INFO
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL print_regex_library_info();
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_REGEX_DIAG)
|
||||
# pragma message ("BOOST_REGEX_DECL set as: " BOOST_STRINGIZE(BOOST_REGEX_DECL))
|
||||
# pragma message ("BOOST_REGEX_CALL set as: " BOOST_STRINGIZE(BOOST_REGEX_CALL))
|
||||
# pragma message ("BOOST_REGEX_CCALL set as: " BOOST_STRINGIZE(BOOST_REGEX_CCALL))
|
||||
#ifdef BOOST_REGEX_USE_C_LOCALE
|
||||
# pragma message ("Using C locale in regex traits class")
|
||||
#elif BOOST_REGEX_USE_CPP_LOCALE
|
||||
# pragma message ("Using C++ locale in regex traits class")
|
||||
#else
|
||||
# pragma message ("Using Win32 locale in regex traits class")
|
||||
#endif
|
||||
#ifdef BOOST_REGEX_DYN_LINK
|
||||
# pragma message ("Dynamic linking enabled")
|
||||
#endif
|
||||
#ifdef BOOST_REGEX_NO_LIB
|
||||
# pragma message ("Auto-linking disabled")
|
||||
#endif
|
||||
#ifdef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
# pragma message ("Extern templates disabled")
|
||||
#endif
|
||||
#ifdef BOOST_REGEX_V3
|
||||
# pragma message ("Using Version 3 regex code")
|
||||
#else
|
||||
# pragma message ("Using Version 4 regex code")
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,281 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2001
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BOOST_DETAIL_ALLOCATOR_HPP
|
||||
#define BOOST_DETAIL_ALLOCATOR_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <cstdlib>
|
||||
#include <new>
|
||||
#include <assert.h>
|
||||
#if defined(BOOST_NO_STDC_NAMESPACE)
|
||||
namespace std{
|
||||
using ::ptrdiff_t;
|
||||
using ::size_t;
|
||||
}
|
||||
#endif
|
||||
|
||||
// see if we have SGI alloc class:
|
||||
#if defined(BOOST_NO_STD_ALLOCATOR) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) || defined(__GLIBCPP__) || defined(__STL_CONFIG_H))
|
||||
# define BOOST_HAVE_SGI_ALLOCATOR
|
||||
# include <memory>
|
||||
# if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
namespace boost{ namespace detail{
|
||||
typedef std::__sgi_alloc alloc_type;
|
||||
}}
|
||||
# else
|
||||
namespace boost{ namespace detail{
|
||||
typedef std::alloc alloc_type;
|
||||
}}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost{ namespace detail{
|
||||
|
||||
template <class T>
|
||||
void allocator_construct(T* p, const T& t)
|
||||
{ new (p) T(t); }
|
||||
|
||||
template <class T>
|
||||
void allocator_destroy(T* p)
|
||||
{
|
||||
(void)p; // warning suppression
|
||||
p->~T();
|
||||
}
|
||||
|
||||
} }
|
||||
|
||||
#if !defined(BOOST_NO_STD_ALLOCATOR)
|
||||
|
||||
#include <memory>
|
||||
|
||||
#define BOOST_DEFAULT_ALLOCATOR(T) std::allocator< T >
|
||||
|
||||
namespace boost{ namespace detail{
|
||||
|
||||
template <class T, class A>
|
||||
struct rebind_allocator
|
||||
{
|
||||
typedef typename A::template rebind<T> binder;
|
||||
typedef typename binder::other type;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace boost
|
||||
|
||||
#elif !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__SUNPRO_CC)
|
||||
|
||||
// no std::allocator, but the compiler supports the necessary syntax,
|
||||
// write our own allocator instead:
|
||||
|
||||
#define BOOST_DEFAULT_ALLOCATOR(T) ::boost::detail::allocator< T >
|
||||
|
||||
namespace boost{ namespace detail{
|
||||
|
||||
template <class T>
|
||||
class allocator
|
||||
{
|
||||
public:
|
||||
|
||||
typedef T value_type;
|
||||
typedef value_type * pointer;
|
||||
typedef const T* const_pointer;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
|
||||
template <class U>
|
||||
struct rebind
|
||||
{
|
||||
typedef allocator<U> other;
|
||||
};
|
||||
|
||||
allocator(){}
|
||||
|
||||
template <class U>
|
||||
allocator(const allocator<U>&){}
|
||||
|
||||
allocator(const allocator&){}
|
||||
|
||||
template <class U>
|
||||
allocator& operator=(const allocator<U>&)
|
||||
{ return *this; }
|
||||
|
||||
~allocator(){}
|
||||
|
||||
pointer address(reference x) { return &x; }
|
||||
|
||||
const_pointer address(const_reference x) const { return &x; }
|
||||
|
||||
pointer allocate(size_type n, const void* = 0)
|
||||
{
|
||||
#ifdef BOOST_HAVE_SGI_ALLOCATOR
|
||||
return n != 0 ?
|
||||
reinterpret_cast<pointer>(alloc_type::allocate(n * sizeof(value_type)))
|
||||
: 0;
|
||||
#else
|
||||
return n != 0 ?
|
||||
reinterpret_cast<pointer>(::operator new(n * sizeof(value_type)))
|
||||
: 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void deallocate(pointer p, size_type n)
|
||||
{
|
||||
#ifdef BOOST_HAVE_SGI_ALLOCATOR
|
||||
assert( (p == 0) == (n == 0) );
|
||||
if (p != 0)
|
||||
alloc_type::deallocate((void*)p, n);
|
||||
#else
|
||||
assert( (p == 0) == (n == 0) );
|
||||
if (p != 0)
|
||||
::operator delete((void*)p);
|
||||
#endif
|
||||
}
|
||||
|
||||
size_type max_size() const
|
||||
{ return size_t(-1) / sizeof(value_type); }
|
||||
|
||||
void construct(pointer p, const T& val) const
|
||||
{ allocator_construct(p, val); }
|
||||
|
||||
void destroy(pointer p) const
|
||||
{ allocator_destroy(p); }
|
||||
};
|
||||
|
||||
template <class T, class A>
|
||||
struct rebind_allocator
|
||||
{
|
||||
typedef typename A::template rebind<T> binder;
|
||||
typedef typename binder::other type;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace boost
|
||||
|
||||
#else
|
||||
|
||||
// no std::allocator, use workaround version instead,
|
||||
// each allocator class must derive from a base class
|
||||
// that allocates blocks of bytes:
|
||||
|
||||
#define BOOST_DEFAULT_ALLOCATOR(T) ::boost::detail::allocator_adapter<T, ::boost::detail::simple_alloc>
|
||||
|
||||
namespace boost{ namespace detail{
|
||||
|
||||
class simple_alloc
|
||||
{
|
||||
public:
|
||||
|
||||
typedef void value_type;
|
||||
typedef value_type * pointer;
|
||||
typedef const void* const_pointer;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
|
||||
simple_alloc(){}
|
||||
simple_alloc(const simple_alloc&){}
|
||||
|
||||
~simple_alloc(){}
|
||||
|
||||
pointer allocate(size_type n, const void* = 0)
|
||||
{
|
||||
#ifdef BOOST_HAVE_SGI_ALLOCATOR
|
||||
return n != 0 ?
|
||||
reinterpret_cast<pointer>(alloc_type::allocate(n))
|
||||
: 0;
|
||||
#else
|
||||
return n != 0 ?
|
||||
reinterpret_cast<pointer>(::operator new(n))
|
||||
: 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void deallocate(pointer p, size_type n)
|
||||
{
|
||||
#ifdef BOOST_HAVE_SGI_ALLOCATOR
|
||||
assert( (p == 0) == (n == 0) );
|
||||
if (p != 0)
|
||||
alloc_type::deallocate((void*)p, n);
|
||||
#else
|
||||
assert( (p == 0) == (n == 0) );
|
||||
if (p != 0)
|
||||
::operator delete((void*)p);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
template <class T, class Base>
|
||||
class allocator_adapter : public Base
|
||||
{
|
||||
public:
|
||||
|
||||
typedef T value_type;
|
||||
typedef value_type * pointer;
|
||||
typedef const T* const_pointer;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef Base base_type;
|
||||
|
||||
allocator_adapter(){}
|
||||
allocator_adapter(const base_type& x) : Base(x){}
|
||||
allocator_adapter& operator=(const base_type& x)
|
||||
{
|
||||
*(static_cast<base_type*>(this)) = x;
|
||||
return *this;
|
||||
}
|
||||
|
||||
~allocator_adapter(){}
|
||||
|
||||
pointer address(reference x) { return &x; }
|
||||
|
||||
const_pointer address(const_reference x) const { return &x; }
|
||||
|
||||
pointer allocate(size_type n, const void* = 0)
|
||||
{
|
||||
return n != 0 ?
|
||||
reinterpret_cast<pointer>(base_type::allocate(n * sizeof(value_type)))
|
||||
: 0;
|
||||
}
|
||||
|
||||
void deallocate(pointer p, size_type n)
|
||||
{
|
||||
assert( (p == 0) == (n == 0) );
|
||||
if (p != 0)
|
||||
static_cast<base_type*>(this)->deallocate((void*)p, n * sizeof(value_type));
|
||||
}
|
||||
|
||||
size_type max_size() const
|
||||
{ return size_t(-1) / sizeof(value_type); }
|
||||
|
||||
void construct(pointer p, const T& val) const
|
||||
{ allocator_construct(p, val); }
|
||||
|
||||
void destroy(pointer p) const
|
||||
{ allocator_destroy(p); }
|
||||
};
|
||||
|
||||
template <class T, class A>
|
||||
struct rebind_allocator
|
||||
{
|
||||
typedef allocator_adapter<T, typename A::base_type> type;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
#endif // include guard
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE boost/regex/config/borland.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: regex borland-specific config setup.
|
||||
*/
|
||||
|
||||
|
||||
#if defined(__BORLANDC__)
|
||||
# if (__BORLANDC__ == 0x550) || (__BORLANDC__ == 0x551)
|
||||
// problems with std::basic_string and dll RTL:
|
||||
# if defined(_RTLDLL) && defined(_RWSTD_COMPILE_INSTANTIATE)
|
||||
# ifdef BOOST_REGEX_BUILD_DLL
|
||||
# error _RWSTD_COMPILE_INSTANTIATE must not be defined when building regex++ as a DLL
|
||||
# else
|
||||
# pragma message("Defining _RWSTD_COMPILE_INSTANTIATE when linking to the DLL version of the RTL may produce memory corruption problems in std::basic_string, as a result of separate versions of basic_string's static data in the RTL and you're exe/dll: be warned!!")
|
||||
# endif
|
||||
# endif
|
||||
# ifndef _RTLDLL
|
||||
// this is harmless for a staic link:
|
||||
# define _RWSTD_COMPILE_INSTANTIATE
|
||||
# endif
|
||||
// external templates cause problems for some reason:
|
||||
# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
# endif
|
||||
# if (__BORLANDC__ <= 0x540) && !defined(BOOST_REGEX_NO_LIB) && !defined(_NO_VCL)
|
||||
// C++ Builder 4 and earlier, we can't tell whether we should be using
|
||||
// the VCL runtime or not, do a static link instead:
|
||||
# define BOOST_REGEX_STATIC_LINK
|
||||
# endif
|
||||
//
|
||||
// VCL support:
|
||||
// if we're building a console app then there can't be any VCL (can there?)
|
||||
# if !defined(__CONSOLE__) && !defined(_NO_VCL)
|
||||
# define BOOST_REGEX_USE_VCL
|
||||
# endif
|
||||
//
|
||||
// if this isn't Win32 then don't automatically select link
|
||||
// libraries:
|
||||
//
|
||||
# ifndef _Windows
|
||||
# ifndef BOOST_REGEX_NO_LIB
|
||||
# define BOOST_REGEX_NO_LIB
|
||||
# endif
|
||||
# ifndef BOOST_REGEX_STATIC_LINK
|
||||
# define BOOST_REGEX_STATIC_LINK
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,303 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE boost/regex/config/cstring.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: regex narrow character string fixes.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_CSTRING_HPP
|
||||
#define BOOST_REGEX_CONFIG_CSTRING_HPP
|
||||
|
||||
#include <cstring>
|
||||
#include <cctype>
|
||||
#ifndef __sgi
|
||||
#ifdef __KCC
|
||||
#include <ios>
|
||||
#endif
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace std{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -w-8008 -w-8066 -w-8004
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_NO_STDC_NAMESPACE
|
||||
|
||||
// Any function that is a macro is converted into an inline function:
|
||||
#ifdef memcmp
|
||||
inline int boost_memcmp(const void * p1, const void * p2, size_t s)
|
||||
{ return memcmp(p1, p2, s); }
|
||||
#undef memcmp
|
||||
inline int memcmp(const void * p1, const void * p2, size_t s)
|
||||
{ return boost_memcmp(p1, p2, s); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::memcmp;
|
||||
#endif
|
||||
|
||||
#ifdef memcpy
|
||||
inline void *boost_memcpy(void * p1, const void *p2, size_t s)
|
||||
{ return memcpy(p1, p2, s); }
|
||||
#undef memcpy
|
||||
inline void *memcpy(void * p1, const void *p2, size_t s)
|
||||
{ return boost_memcpy(p1, p2, s); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::memcpy;
|
||||
#endif
|
||||
|
||||
#ifdef memmove
|
||||
inline void *(memmove)(void *, const void *, size_t)
|
||||
{ return memmove(p1,p2,s); }
|
||||
#undef memmove
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::memmove;
|
||||
#endif
|
||||
|
||||
#ifdef memset
|
||||
inline void *(boost_memset)(void *p, int a, size_t b)
|
||||
{ return memset(p,a,b); }
|
||||
#undef memset
|
||||
inline void *(memset)(void *p, int a, size_t b)
|
||||
{ return boost_memset(p,a,b); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::memset;
|
||||
#endif
|
||||
|
||||
#ifdef strcat
|
||||
inline char *(boost_strcat)(char *p1, const char *p2)
|
||||
{ return strcat(p1,p2); }
|
||||
#undef strcat
|
||||
inline char *(strcat)(char *p1, const char *p2)
|
||||
{ return boost_strcat(p1,p2); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::strcat;
|
||||
#endif
|
||||
|
||||
#ifdef strcmp
|
||||
inline int (boost_strcmp)(const char *p1, const char *p2)
|
||||
{ return strcmp(p1,p2); }
|
||||
#undef strcmp
|
||||
inline int (strcmp)(const char *p1, const char *p2)
|
||||
{ return boost_strcmp(p1,p2); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::strcmp;
|
||||
#endif
|
||||
|
||||
#ifdef strcoll
|
||||
inline int (boost_strcoll) (const char *p1, const char *p2)
|
||||
{ return strcoll(p1,p2); }
|
||||
#undef strcoll
|
||||
inline int (strcoll) (const char *p1, const char *p2)
|
||||
{ return boost_strcoll(p1,p2); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::strcoll;
|
||||
#endif
|
||||
|
||||
#ifdef strcpy
|
||||
inline char *(boost_strcpy)(char *p1, const char *p2)
|
||||
{ return strcpy(p1,p2); }
|
||||
#undef strcpy
|
||||
inline char *(strcpy)(char *p1, const char *p2)
|
||||
{ return boost_strcpy(p1,p2); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::strcpy;
|
||||
#endif
|
||||
|
||||
#ifdef strlen
|
||||
inline size_t (boost_strlen)(const char *p)
|
||||
{ return strlen(p); }
|
||||
#undef strlen
|
||||
inline size_t (strlen)(const char *p)
|
||||
{ return boost_strlen(p); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::strlen;
|
||||
#endif
|
||||
|
||||
#ifdef strxfrm
|
||||
inline size_t (boost_strxfrm)(char *p1, const char *p2, size_t s)
|
||||
{ return strxfrm(p1,p2,s); }
|
||||
#undef strxfrm
|
||||
inline size_t (strxfrm)(char *p1, const char *p2, size_t s)
|
||||
{ return boost_strxfrm(p1,p2,s); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::strxfrm;
|
||||
#endif
|
||||
|
||||
#ifdef isalnum
|
||||
inline int (boost_isalnum)(int i)
|
||||
{ return isalnum(i); }
|
||||
#undef isalnum
|
||||
inline int (isalnum)(int i)
|
||||
{ return boost_isalnum(i); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::isalnum;
|
||||
#endif
|
||||
|
||||
#ifdef isalpha
|
||||
inline int (boost_isalpha)(int i)
|
||||
{ return isalpha(i); }
|
||||
#undef isalpha
|
||||
inline int (isalpha)(int i)
|
||||
{ return boost_isalpha(i); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::isalpha;
|
||||
#endif
|
||||
|
||||
#ifdef iscntrl
|
||||
inline int (boost_iscntrl)(int i)
|
||||
{ return iscntrl(i); }
|
||||
#undef iscntrl
|
||||
inline int (iscntrl)(int i)
|
||||
{ return boost_iscntrl(i); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iscntrl;
|
||||
#endif
|
||||
|
||||
#ifdef isdigit
|
||||
inline int (boost_isdigit)(int i)
|
||||
{ return isdigit(i); }
|
||||
#undef isdigit
|
||||
inline int (isdigit)(int i)
|
||||
{ return boost_isdigit(i); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::isdigit;
|
||||
#endif
|
||||
|
||||
#ifdef isgraph
|
||||
inline int (boost_isgraph)(int i)
|
||||
{ return isgraph(i); }
|
||||
#undef isgraph
|
||||
inline int (isgraph)(int i)
|
||||
{ return boost_isgraph(i); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::isgraph;
|
||||
#endif
|
||||
|
||||
#ifdef islower
|
||||
inline int (boost_islower)(int i)
|
||||
{ return islower(i); }
|
||||
#undef islower
|
||||
inline int (islower)(int i)
|
||||
{ return boost_islower(i); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::islower;
|
||||
#endif
|
||||
|
||||
#ifdef isprint
|
||||
inline int (boost_isprint)(int i)
|
||||
{ return isprint(i); }
|
||||
#undef isprint
|
||||
inline int (isprint)(int i)
|
||||
{ return boost_isprint(i); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::isprint;
|
||||
#endif
|
||||
|
||||
#ifdef ispunct
|
||||
inline int (boost_ispunct)(int i)
|
||||
{ return ispunct(i); }
|
||||
#undef ispunct
|
||||
inline int (ispunct)(int i)
|
||||
{ return boost_ispunct(i); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::ispunct;
|
||||
#endif
|
||||
|
||||
#ifdef isspace
|
||||
inline int (isspace)(int i)
|
||||
{ return isspace(i); }
|
||||
#undef isspace
|
||||
inline int (boost_isspace)(int i)
|
||||
{ return boost_isspace(i); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::isspace;
|
||||
#endif
|
||||
|
||||
#ifdef isupper
|
||||
inline int (isupper)(int i)
|
||||
{ return isupper(i); }
|
||||
#undef isupper
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::isupper;
|
||||
#endif
|
||||
|
||||
#ifdef isxdigit
|
||||
inline int (isxdigit)(int i)
|
||||
{ return isxdigit(i); }
|
||||
#undef isxdigit
|
||||
inline int (boost_isxdigit)(int i)
|
||||
{ return boost_isxdigit(i); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::isxdigit;
|
||||
#endif
|
||||
|
||||
#ifdef tolower
|
||||
inline int (boost_tolower)(int i)
|
||||
{ return tolower(i); }
|
||||
#undef tolower
|
||||
inline int (tolower)(int i)
|
||||
{ return boost_tolower(i); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::tolower;
|
||||
#endif
|
||||
|
||||
#ifdef toupper
|
||||
inline int (boost_toupper)(int i)
|
||||
{ return toupper(i); }
|
||||
#undef toupper
|
||||
inline int (toupper)(int i)
|
||||
{ return boost_toupper(i); }
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::toupper;
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#undef memcmp
|
||||
#undef memcpy
|
||||
#undef memmove
|
||||
#undef memset
|
||||
#undef strcat
|
||||
#undef strcmp
|
||||
#undef strcoll
|
||||
#undef strcpy
|
||||
#undef strlen
|
||||
#undef strxfrm
|
||||
#undef isalnum
|
||||
#undef isalpha
|
||||
#undef iscntrl
|
||||
#undef isdigit
|
||||
#undef isgraph
|
||||
#undef islower
|
||||
#undef isprint
|
||||
#undef ispunct
|
||||
#undef isspace
|
||||
#undef isupper
|
||||
#undef isxdigit
|
||||
#undef tolower
|
||||
#undef toupper
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif // __sgi
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE boost/regex/config/cwchar.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: regex wide character string fixes.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_CWCHAR_HPP
|
||||
#define BOOST_REGEX_CONFIG_CWCHAR_HPP
|
||||
|
||||
#include <cwchar>
|
||||
#include <cwctype>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace std{
|
||||
|
||||
#ifndef BOOST_NO_STDC_NAMESPACE
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
#ifdef iswalnum
|
||||
inline int (iswalnum)(wint_t i)
|
||||
{ return iswalnum(i); }
|
||||
#undef iswalnum
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswalnum;
|
||||
#endif
|
||||
|
||||
#ifdef iswalpha
|
||||
inline int (iswalpha)(wint_t i)
|
||||
{ return iswalpha(i); }
|
||||
#undef iswalpha
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswalpha;
|
||||
#endif
|
||||
|
||||
#ifdef iswcntrl
|
||||
inline int (iswcntrl)(wint_t i)
|
||||
{ return iswcntrl(i); }
|
||||
#undef iswcntrl
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswcntrl;
|
||||
#endif
|
||||
|
||||
#ifdef iswdigit
|
||||
inline int (iswdigit)(wint_t i)
|
||||
{ return iswdigit(i); }
|
||||
#undef iswdigit
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswdigit;
|
||||
#endif
|
||||
|
||||
#ifdef iswgraph
|
||||
inline int (iswgraph)(wint_t i)
|
||||
{ return iswgraph(i); }
|
||||
#undef iswgraph
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswgraph;
|
||||
#endif
|
||||
|
||||
#ifdef iswlower
|
||||
inline int (iswlower)(wint_t i)
|
||||
{ return iswlower(i); }
|
||||
#undef iswlower
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswlower;
|
||||
#endif
|
||||
|
||||
#ifdef iswprint
|
||||
inline int (iswprint)(wint_t i)
|
||||
{ return iswprint(i); }
|
||||
#undef iswprint
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswprint;
|
||||
#endif
|
||||
|
||||
#ifdef iswpunct
|
||||
inline int (iswpunct)(wint_t i)
|
||||
{ return iswpunct(i); }
|
||||
#undef iswpunct
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswpunct;
|
||||
#endif
|
||||
|
||||
#ifdef iswspace
|
||||
inline int (iswspace)(wint_t i)
|
||||
{ return iswspace(i); }
|
||||
#undef iswspace
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswspace;
|
||||
#endif
|
||||
|
||||
#ifdef iswupper
|
||||
inline int (iswupper)(wint_t i)
|
||||
{ return iswupper(i); }
|
||||
#undef iswupper
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswupper;
|
||||
#endif
|
||||
|
||||
#ifdef iswxdigit
|
||||
inline int (iswxdigit)(wint_t i)
|
||||
{ return iswxdigit(i); }
|
||||
#undef iswxdigit
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::iswxdigit;
|
||||
#endif
|
||||
|
||||
#ifdef towlower
|
||||
inline wint_t (towlower)(wint_t i)
|
||||
{ return towlower(i); }
|
||||
#undef towlower
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::towlower;
|
||||
#endif
|
||||
|
||||
#ifdef towupper
|
||||
inline wint_t (towupper)(wint_t i)
|
||||
{ return towupper(i); }
|
||||
#undef towupper
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using :: towupper;
|
||||
#endif
|
||||
|
||||
#ifdef wcscmp
|
||||
inline int (wcscmp)(const wchar_t *p1, const wchar_t *p2)
|
||||
{ return wcscmp(p1,p2); }
|
||||
#undef wcscmp
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::wcscmp;
|
||||
#endif
|
||||
|
||||
#ifdef wcscoll
|
||||
inline int (wcscoll)(const wchar_t *p1, const wchar_t *p2)
|
||||
{ return wcscoll(p1,p2); }
|
||||
#undef wcscoll
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::wcscoll;
|
||||
#endif
|
||||
|
||||
#ifdef wcscpy
|
||||
inline wchar_t *(wcscpy)(wchar_t *p1, const wchar_t *p2)
|
||||
{ return wcscpy(p1,p2); }
|
||||
#undef wcscpy
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::wcscpy;
|
||||
#endif
|
||||
|
||||
#ifdef wcslen
|
||||
inline size_t (wcslen)(const wchar_t *p)
|
||||
{ return wcslen(p); }
|
||||
#undef wcslen
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::wcslen;
|
||||
#endif
|
||||
|
||||
#ifdef wcsxfrm
|
||||
size_t wcsxfrm(wchar_t *p1, const wchar_t *p2, size_t s)
|
||||
{ return wcsxfrm(p1,p2,s); }
|
||||
#undef wcsxfrm
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
using ::wcsxfrm;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef BOOST_NO_STDC_NAMESPACE
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,204 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_libary_include.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
|
||||
* Note this is an internal header file included
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
Libraries for Borland and Microsoft compilers are automatically
|
||||
selected here, the name of the lib is selected according to the following
|
||||
formula:
|
||||
|
||||
BOOST_LIB_PREFIX
|
||||
+ BOOST_LIB_NAME
|
||||
+ "_"
|
||||
+ BOOST_LIB_TOOLSET
|
||||
+ "_"
|
||||
+ BOOST_LIB_THREAD_OPT
|
||||
+ BOOST_LIB_RT_OPT
|
||||
+ BOOST_LIB_DEBUG_OPT
|
||||
|
||||
These are defined as:
|
||||
|
||||
BOOST_LIB_PREFIX: "lib" for static libraries otherwise "".
|
||||
|
||||
BOOST_LIB_NAME: The base name of the lib (boost_regex).
|
||||
|
||||
BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).
|
||||
|
||||
BOOST_LIB_THREAD_OPT: "s" for single thread builds,
|
||||
"m" for multithread builds.
|
||||
|
||||
BOOST_LIB_RT_OPT: "s" for static runtime,
|
||||
"d" for dynamic runtime.
|
||||
|
||||
BOOST_LIB_DEBUG_OPT: nothing for release builds,
|
||||
"d" for debug builds,
|
||||
"dd" for debug-diagnostic builds (_STLP_DEBUG).
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#if !defined(BOOST_REGEX_LIBRARY_INCLUDE_HPP) && !defined(BOOST_REGEX_NO_LIB)
|
||||
#define BOOST_REGEX_LIBRARY_INCLUDE_HPP
|
||||
|
||||
#define BOOST_LIB_NAME "boost_regex"
|
||||
|
||||
//
|
||||
// select toolset:
|
||||
//
|
||||
#if defined(BOOST_MSVC) && (BOOST_MSVC == 1200) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||
|
||||
// vc6-stlport:
|
||||
# define BOOST_LIB_TOOLSET "vc6-stlport"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1200)
|
||||
|
||||
// vc6:
|
||||
# define BOOST_LIB_TOOLSET "vc6"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||
|
||||
// vc6-stlport:
|
||||
# define BOOST_LIB_TOOLSET "vc7-stlport"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300)
|
||||
|
||||
// vc7:
|
||||
# define BOOST_LIB_TOOLSET "vc7"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1310) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||
|
||||
// vc71-stlport:
|
||||
# define BOOST_LIB_TOOLSET "vc71-stlport"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1310)
|
||||
|
||||
// vc71:
|
||||
# define BOOST_LIB_TOOLSET "vc71"
|
||||
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x560)
|
||||
|
||||
// CBuilder 6:
|
||||
# define BOOST_LIB_TOOLSET "bcb6"
|
||||
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
|
||||
|
||||
// CBuilder 6:
|
||||
# define BOOST_LIB_TOOLSET "bcb5"
|
||||
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x540)
|
||||
|
||||
// CBuilder 6:
|
||||
# define BOOST_LIB_TOOLSET "bcb4"
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// select thread opt:
|
||||
//
|
||||
#if defined(_MT) || defined(__MT__)
|
||||
# define BOOST_LIB_THREAD_OPT "m"
|
||||
#else
|
||||
# define BOOST_LIB_THREAD_OPT "s"
|
||||
#endif
|
||||
|
||||
//
|
||||
// select runtime opt:
|
||||
//
|
||||
#if defined(_DLL) || defined(_RTLDLL)
|
||||
# define BOOST_LIB_RT_OPT "d"
|
||||
#else
|
||||
# define BOOST_LIB_RT_OPT "s"
|
||||
#endif
|
||||
|
||||
//
|
||||
// select linkage opt:
|
||||
//
|
||||
#if defined(BOOST_REGEX_STATIC_LINK) && defined(BOOST_REGEX_DYN_LINK)
|
||||
# undef BOOST_REGEX_STATIC_LINK
|
||||
#endif
|
||||
#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_REGEX_DYN_LINK)
|
||||
# define BOOST_LIB_PREFIX
|
||||
#else
|
||||
# define BOOST_LIB_PREFIX "lib"
|
||||
#endif
|
||||
|
||||
//
|
||||
// select debug opt:
|
||||
//
|
||||
#if defined(BOOST_MSVC) && defined(_DEBUG) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
|
||||
# define BOOST_LIB_DEBUG_OPT "dd"
|
||||
#elif defined(BOOST_MSVC) && defined(_DEBUG)
|
||||
# define BOOST_LIB_DEBUG_OPT "d"
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
|
||||
# define BOOST_LIB_DEBUG_OPT "dd"
|
||||
#else
|
||||
# define BOOST_LIB_DEBUG_OPT
|
||||
#endif
|
||||
|
||||
//
|
||||
// now include the lib:
|
||||
//
|
||||
#if defined(BOOST_LIB_NAME) \
|
||||
&& defined(BOOST_LIB_PREFIX) \
|
||||
&& defined(BOOST_LIB_TOOLSET) \
|
||||
&& defined(BOOST_LIB_THREAD_OPT) \
|
||||
&& defined(BOOST_LIB_RT_OPT) \
|
||||
&& defined(BOOST_LIB_DEBUG_OPT)
|
||||
|
||||
# pragma comment(lib, BOOST_LIB_PREFIX BOOST_LIB_NAME "_" BOOST_LIB_TOOLSET "_" BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_DEBUG_OPT ".lib")
|
||||
#ifdef BOOST_REGEX_DIAG
|
||||
# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_LIB_NAME "_" BOOST_LIB_TOOLSET "_" BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_DEBUG_OPT ".lib")
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// finally undef any macros we may have set:
|
||||
//
|
||||
#if defined(BOOST_LIB_NAME)
|
||||
# undef BOOST_LIB_NAME
|
||||
#endif
|
||||
#if defined(BOOST_LIB_TOOLSET)
|
||||
# undef BOOST_LIB_TOOLSET
|
||||
#endif
|
||||
#if defined(BOOST_LIB_THREAD_OPT)
|
||||
# undef BOOST_LIB_THREAD_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_RT_OPT)
|
||||
# undef BOOST_LIB_RT_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_LINK_OPT)
|
||||
# undef BOOST_LIB_LINK_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_DEBUG_OPT)
|
||||
# undef BOOST_LIB_DEBUG_OPT
|
||||
#endif
|
||||
|
||||
|
||||
#endif // BOOST_REGEX_LIBRARY_INCLUDE_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE pattern_except.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares pattern-matching exception classes.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RE_PAT_EXCEPT_HPP
|
||||
#define BOOST_RE_PAT_EXCEPT_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4275)
|
||||
#endif
|
||||
class BOOST_REGEX_DECL bad_pattern : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
explicit bad_pattern(const std::string& s) : std::runtime_error(s){};
|
||||
~bad_pattern() throw();
|
||||
};
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
class BOOST_REGEX_DECL bad_expression : public bad_pattern
|
||||
{
|
||||
public:
|
||||
explicit bad_expression(const std::string& s) : bad_pattern(s) {}
|
||||
~bad_expression() throw();
|
||||
};
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_traits.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares regular expression traits classes.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_TRAITS_HPP
|
||||
#define BOOST_REGEX_TRAITS_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
# include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_REGEX_V3
|
||||
# ifndef BOOST_REGEX_TRAITS_HPP_INCLUDED
|
||||
# include <boost/regex/v3/regex_traits.hpp>
|
||||
# endif
|
||||
#else
|
||||
# ifndef BOOST_REGEX_TRAITS_HPP_INCLUDED
|
||||
# include <boost/regex/v4/regex_traits.hpp>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif // include
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE src.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Includes all the regex source files, include this
|
||||
* file only if you need to build the regex library
|
||||
* as a single file. You must include this file
|
||||
* before any other regex header.
|
||||
*
|
||||
* CAUTION: THIS FILE IS DEPRICATED AND WILL CAUSE
|
||||
* UNNECESSARY CODE BLOAT.
|
||||
*/
|
||||
|
||||
#if (!defined(BOOST_REGEX_NO_LIB) || !defined(BOOST_REGEX_NO_EXTERNAL_TEMPLATES)) && defined(BOOST_REGEX_CONFIG_HPP)
|
||||
#error too late you have already included a regex header - make sure that you include this header before any other boost header
|
||||
#endif
|
||||
|
||||
#define BOOST_REGEX_NO_LIB
|
||||
#define BOOST_REGEX_STATIC_LINK
|
||||
#define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
//
|
||||
// include library source files:
|
||||
//
|
||||
#ifdef BOOST_REGEX_USE_WIN32_LOCALE
|
||||
#include "libs/regex/src/w32_regex_traits.cpp"
|
||||
#elif defined(BOOST_REGEX_USE_C_LOCALE)
|
||||
#include "libs/regex/src/c_regex_traits.cpp"
|
||||
#else
|
||||
#include "libs/regex/src/cpp_regex_traits.cpp"
|
||||
#endif
|
||||
#include "libs/regex/src/c_regex_traits_common.cpp"
|
||||
#include "libs/regex/src/cregex.cpp"
|
||||
#include "libs/regex/src/fileiter.cpp"
|
||||
#include "libs/regex/src/posix_api.cpp"
|
||||
#include "libs/regex/src/wide_posix_api.cpp"
|
||||
#include "libs/regex/src/regex.cpp"
|
||||
#include "libs/regex/src/regex_debug.cpp"
|
||||
#include "libs/regex/src/regex_synch.cpp"
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE user.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: User settable options.
|
||||
*/
|
||||
|
||||
// define if you want the regex library to use the C locale
|
||||
// even on Win32:
|
||||
// #define BOOST_REGEX_USE_C_LOCALE
|
||||
|
||||
// define this is you want the regex library to use the C++
|
||||
// locale:
|
||||
// #define BOOST_REGEX_USE_CPP_LOCALE
|
||||
|
||||
// define this if the runtime library is a dll, and you
|
||||
// want BOOST_REGEX_DYN_LINK to set up dll exports/imports
|
||||
// with __declspec(dllexport)/__declspec(dllimport.)
|
||||
// #define BOOST_REGEX_HAS_DLL_RUNTIME
|
||||
|
||||
// define this if you want to dynamically link to regex,
|
||||
// if the runtime library is also a dll (Probably Win32 specific,
|
||||
// and has no effect unless BOOST_REGEX_HAS_DLL_RUNTIME is set):
|
||||
// #define BOOST_REGEX_DYN_LINK
|
||||
|
||||
// define this if you don't want the lib to automatically
|
||||
// select its link libraries:
|
||||
// #define BOOST_REGEX_NO_LIB
|
||||
|
||||
// define this if templates with switch statements cause problems:
|
||||
// #define BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE
|
||||
|
||||
// define this to disable Win32 support when available:
|
||||
// #define BOOST_REGEX_NO_W32
|
||||
|
||||
// define this if bool is not a real type:
|
||||
// #define BOOST_REGEX_NO_BOOL
|
||||
|
||||
// define this if no template instances are to be placed in
|
||||
// the library rather than users object files:
|
||||
// #define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
|
||||
// define this if the forward declarations in regex_fwd.hpp
|
||||
// cause more problems than they are worth:
|
||||
// #define BOOST_REGEX_NO_FWD
|
||||
|
||||
// define this if your compiler can't cope with the new
|
||||
// version 4 regex code.
|
||||
// #define BOOST_REGEX_V3
|
||||
|
||||
// define this if your compiler supports MS Windows structured
|
||||
// exception handling.
|
||||
// #define BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
|
||||
// define this if you want to use the recursive algorithm
|
||||
// even if BOOST_REGEX_HAS_MS_STACK_GUARD is not defined.
|
||||
// #define BOOST_REGEX_RECURSIVE
|
||||
|
||||
// define this if you want to use the non-recursive
|
||||
// algorithm, even if the recursive version would be the default.
|
||||
// #define BOOST_REGEX_NON_RECURSIVE
|
||||
|
||||
// define this if you want to set the size of the memory blocks
|
||||
// used by the non-recursive algorithm.
|
||||
// #define BOOST_REGEX_BLOCKSIZE 4096
|
||||
|
||||
// define this if you want to set the maximum number of memory blocks
|
||||
// used by the non-recursive algorithm.
|
||||
// #define BOOST_REGEX_MAX_BLOCKS 1024
|
||||
|
||||
// define this if you want to set the maximum number of memory blocks
|
||||
// cached by the non-recursive algorithm: Normally this is 16, but can be
|
||||
// higher if you have multiple threads all using boost.regex, or lower
|
||||
// if you don't want boost.regex to cache memory.
|
||||
// #define BOOST_REGEX_MAX_CACHE_BLOCKS 16
|
||||
|
||||
// define this if you want to be able to access extended capture
|
||||
// information in your sub_match's (caution this will slow things
|
||||
// down quite a bit).
|
||||
// #define BOOST_REGEX_MATCH_EXTRA
|
||||
|
||||
@@ -0,0 +1,314 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE cregex.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares POSIX API functions
|
||||
* + boost::RegEx high level wrapper.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RE_CREGEX_HPP_INCLUDED
|
||||
#define BOOST_RE_CREGEX_HPP_INCLUDED
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a8 -b -Vx -Ve -pc
|
||||
#endif
|
||||
|
||||
/* include these defs only for POSIX compatablity */
|
||||
#ifdef __cplusplus
|
||||
namespace boost{
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && !defined(BOOST_NO_STDC_NAMESPACE)
|
||||
typedef std::ptrdiff_t regoff_t;
|
||||
typedef std::size_t regsize_t;
|
||||
#else
|
||||
typedef ptrdiff_t regoff_t;
|
||||
typedef size_t regsize_t;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int re_magic;
|
||||
unsigned int re_nsub; /* number of parenthesized subexpressions */
|
||||
const char* re_endp; /* end pointer for REG_PEND */
|
||||
void* guts; /* none of your business :-) */
|
||||
unsigned int eflags; /* none of your business :-) */
|
||||
} regex_tA;
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
typedef struct
|
||||
{
|
||||
unsigned int re_magic;
|
||||
unsigned int re_nsub; /* number of parenthesized subexpressions */
|
||||
const wchar_t* re_endp; /* end pointer for REG_PEND */
|
||||
void* guts; /* none of your business :-) */
|
||||
unsigned int eflags; /* none of your business :-) */
|
||||
} regex_tW;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
regoff_t rm_so; /* start of match */
|
||||
regoff_t rm_eo; /* end of match */
|
||||
} regmatch_t;
|
||||
|
||||
/* regcomp() flags */
|
||||
typedef enum{
|
||||
REG_BASIC = 0000,
|
||||
REG_EXTENDED = 0001,
|
||||
REG_ICASE = 0002,
|
||||
REG_NOSUB = 0004,
|
||||
REG_NEWLINE = 0010,
|
||||
REG_NOSPEC = 0020,
|
||||
REG_PEND = 0040,
|
||||
REG_DUMP = 0200,
|
||||
REG_NOCOLLATE = 0400,
|
||||
REG_ESCAPE_IN_LISTS = 01000,
|
||||
REG_NEWLINE_ALT = 02000,
|
||||
|
||||
REG_PERL = REG_EXTENDED | REG_NOCOLLATE | REG_ESCAPE_IN_LISTS,
|
||||
REG_AWK = REG_EXTENDED | REG_ESCAPE_IN_LISTS,
|
||||
REG_GREP = REG_BASIC | REG_NEWLINE_ALT,
|
||||
REG_EGREP = REG_EXTENDED | REG_NEWLINE_ALT,
|
||||
|
||||
REG_ASSERT = 15,
|
||||
REG_INVARG = 16,
|
||||
REG_ATOI = 255, /* convert name to number (!) */
|
||||
REG_ITOA = 0400 /* convert number to name (!) */
|
||||
} reg_comp_flags;
|
||||
|
||||
/* regexec() flags */
|
||||
typedef enum{
|
||||
REG_NOTBOL = 00001,
|
||||
REG_NOTEOL = 00002,
|
||||
REG_STARTEND = 00004
|
||||
} reg_exec_flags;
|
||||
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA*, const char*, int);
|
||||
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int, const regex_tA*, char*, regsize_t);
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecA(const regex_tA*, const char*, regsize_t, regmatch_t*, int);
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeA(regex_tA*);
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW*, const wchar_t*, int);
|
||||
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int, const regex_tW*, wchar_t*, regsize_t);
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecW(const regex_tW*, const wchar_t*, regsize_t, regmatch_t*, int);
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeW(regex_tW*);
|
||||
#endif
|
||||
|
||||
#ifdef UNICODE
|
||||
#define regcomp regcompW
|
||||
#define regerror regerrorW
|
||||
#define regexec regexecW
|
||||
#define regfree regfreeW
|
||||
#define regex_t regex_tW
|
||||
#else
|
||||
#define regcomp regcompA
|
||||
#define regerror regerrorA
|
||||
#define regexec regexecA
|
||||
#define regfree regfreeA
|
||||
#define regex_t regex_tA
|
||||
#endif
|
||||
|
||||
/* regerror() flags */
|
||||
typedef enum
|
||||
{
|
||||
REG_NOERROR = 0, /* Success. */
|
||||
REG_NOMATCH = 1, /* Didn't find a match (for regexec). */
|
||||
|
||||
/* POSIX regcomp return error codes. (In the order listed in the
|
||||
standard.) */
|
||||
REG_BADPAT = 2, /* Invalid pattern. */
|
||||
REG_ECOLLATE = 3, /* Undefined collating element. */
|
||||
REG_ECTYPE = 4, /* Invalid character class name. */
|
||||
REG_EESCAPE = 5, /* Trailing backslash. */
|
||||
REG_ESUBREG = 6, /* Invalid back reference. */
|
||||
REG_EBRACK = 7, /* Unmatched left bracket. */
|
||||
REG_EPAREN = 8, /* Parenthesis imbalance. */
|
||||
REG_EBRACE = 9, /* Unmatched \{. */
|
||||
REG_BADBR = 10, /* Invalid contents of \{\}. */
|
||||
REG_ERANGE = 11, /* Invalid range end. */
|
||||
REG_ESPACE = 12, /* Ran out of memory. */
|
||||
REG_BADRPT = 13, /* No preceding re for repetition op. */
|
||||
REG_EEND = 14, /* unexpected end of expression */
|
||||
REG_ESIZE = 15, /* expression too big */
|
||||
REG_ERPAREN = 16, /* unmatched right parenthesis */
|
||||
REG_EMPTY = 17, /* empty expression */
|
||||
REG_E_MEMORY = REG_ESIZE, /* out of memory */
|
||||
REG_E_UNKNOWN = 18 /* unknown error */
|
||||
} reg_errcode_t;
|
||||
|
||||
enum match_flags
|
||||
{
|
||||
match_default = 0,
|
||||
match_not_bol = 1, // first is not start of line
|
||||
match_not_eol = match_not_bol << 1, // last is not end of line
|
||||
match_not_bob = match_not_eol << 1, // first is not start of buffer
|
||||
match_not_eob = match_not_bob << 1, // last is not end of buffer
|
||||
match_not_bow = match_not_eob << 1, // first is not start of word
|
||||
match_not_eow = match_not_bow << 1, // last is not end of word
|
||||
match_not_dot_newline = match_not_eow << 1, // \n is not matched by '.'
|
||||
match_not_dot_null = match_not_dot_newline << 1, // '\0' is not matched by '.'
|
||||
match_prev_avail = match_not_dot_null << 1, // *--first is a valid expression
|
||||
match_init = match_prev_avail << 1, // internal use
|
||||
match_any = match_init << 1, // don't care what we match
|
||||
match_not_null = match_any << 1, // string can't be null
|
||||
match_continuous = match_not_null << 1, // each grep match must continue from
|
||||
// uninterupted from the previous one
|
||||
match_partial = match_continuous << 1, // find partial matches
|
||||
|
||||
match_stop = match_partial << 1, // stop after first match (grep)
|
||||
match_all = match_stop << 1, // must find the whole of input even if match_any is set
|
||||
match_max = match_all
|
||||
};
|
||||
|
||||
typedef unsigned long match_flag_type;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#if __BORLANDC__ > 0x520
|
||||
#pragma option pop
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// C++ high level wrapper goes here:
|
||||
//
|
||||
#if defined(__cplusplus)
|
||||
#include <string>
|
||||
#include <vector>
|
||||
namespace boost{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#if __BORLANDC__ == 0x530
|
||||
#pragma option push -a4 -b
|
||||
#elif __BORLANDC__ > 0x530
|
||||
#pragma option push -a8 -b
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class RegEx;
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
class RegExData;
|
||||
struct pred1;
|
||||
struct pred2;
|
||||
struct pred3;
|
||||
struct pred4;
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
#if defined(BOOST_MSVC) || defined(__BORLANDC__)
|
||||
typedef bool (__cdecl *GrepCallback)(const RegEx& expression);
|
||||
typedef bool (__cdecl *GrepFileCallback)(const char* file, const RegEx& expression);
|
||||
typedef bool (__cdecl *FindFilesCallback)(const char* file);
|
||||
#else
|
||||
typedef bool (*GrepCallback)(const RegEx& expression);
|
||||
typedef bool (*GrepFileCallback)(const char* file, const RegEx& expression);
|
||||
typedef bool (*FindFilesCallback)(const char* file);
|
||||
#endif
|
||||
|
||||
class BOOST_REGEX_DECL RegEx
|
||||
{
|
||||
private:
|
||||
re_detail::RegExData* pdata;
|
||||
public:
|
||||
RegEx();
|
||||
RegEx(const RegEx& o);
|
||||
~RegEx();
|
||||
explicit RegEx(const char* c, bool icase = false);
|
||||
explicit RegEx(const std::string& s, bool icase = false);
|
||||
RegEx& operator=(const RegEx& o);
|
||||
RegEx& operator=(const char* p);
|
||||
RegEx& operator=(const std::string& s){ return this->operator=(s.c_str()); }
|
||||
unsigned int SetExpression(const char* p, bool icase = false);
|
||||
unsigned int SetExpression(const std::string& s, bool icase = false){ return SetExpression(s.c_str(), icase); }
|
||||
std::string Expression()const;
|
||||
unsigned int error_code()const;
|
||||
//
|
||||
// now matching operators:
|
||||
//
|
||||
bool Match(const char* p, match_flag_type flags = match_default);
|
||||
bool Match(const std::string& s, match_flag_type flags = match_default) { return Match(s.c_str(), flags); }
|
||||
bool Search(const char* p, match_flag_type flags = match_default);
|
||||
bool Search(const std::string& s, match_flag_type flags = match_default) { return Search(s.c_str(), flags); }
|
||||
unsigned int Grep(GrepCallback cb, const char* p, match_flag_type flags = match_default);
|
||||
unsigned int Grep(GrepCallback cb, const std::string& s, match_flag_type flags = match_default) { return Grep(cb, s.c_str(), flags); }
|
||||
unsigned int Grep(std::vector<std::string>& v, const char* p, match_flag_type flags = match_default);
|
||||
unsigned int Grep(std::vector<std::string>& v, const std::string& s, match_flag_type flags = match_default) { return Grep(v, s.c_str(), flags); }
|
||||
unsigned int Grep(std::vector<std::size_t>& v, const char* p, match_flag_type flags = match_default);
|
||||
unsigned int Grep(std::vector<std::size_t>& v, const std::string& s, match_flag_type flags = match_default) { return Grep(v, s.c_str(), flags); }
|
||||
#ifndef BOOST_REGEX_NO_FILEITER
|
||||
unsigned int GrepFiles(GrepFileCallback cb, const char* files, bool recurse = false, match_flag_type flags = match_default);
|
||||
unsigned int GrepFiles(GrepFileCallback cb, const std::string& files, bool recurse = false, match_flag_type flags = match_default) { return GrepFiles(cb, files.c_str(), recurse, flags); }
|
||||
unsigned int FindFiles(FindFilesCallback cb, const char* files, bool recurse = false, match_flag_type flags = match_default);
|
||||
unsigned int FindFiles(FindFilesCallback cb, const std::string& files, bool recurse = false, match_flag_type flags = match_default) { return FindFiles(cb, files.c_str(), recurse, flags); }
|
||||
#endif
|
||||
|
||||
std::string Merge(const std::string& in, const std::string& fmt,
|
||||
bool copy = true, match_flag_type flags = match_default);
|
||||
std::string Merge(const char* in, const char* fmt,
|
||||
bool copy = true, match_flag_type flags = match_default);
|
||||
|
||||
std::size_t Split(std::vector<std::string>& v, std::string& s, match_flag_type flags = match_default, unsigned max_count = ~0);
|
||||
//
|
||||
// now operators for returning what matched in more detail:
|
||||
//
|
||||
std::size_t Position(int i = 0)const;
|
||||
std::size_t Length(int i = 0)const;
|
||||
bool Matched(int i = 0)const;
|
||||
unsigned int Line()const;
|
||||
unsigned int Marks()const;
|
||||
std::string What(int i = 0)const;
|
||||
std::string operator[](int i)const { return What(i); }
|
||||
|
||||
static const unsigned int npos;
|
||||
|
||||
friend struct re_detail::pred1;
|
||||
friend struct re_detail::pred2;
|
||||
friend struct re_detail::pred3;
|
||||
friend struct re_detail::pred4;
|
||||
};
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
#endif // include guard
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,453 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE fileiter.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares various platform independent file and
|
||||
* directory iterators, plus binary file input in
|
||||
* the form of class map_file.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RE_FILEITER_HPP_INCLUDED
|
||||
#define BOOST_RE_FILEITER_HPP_INCLUDED
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_REGEX_NO_FILEITER
|
||||
|
||||
#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_REGEX_NO_W32)
|
||||
#error "Sorry, can't mix <windows.h> with STL code and gcc compiler: if you ran configure, try again with configure --disable-ms-windows"
|
||||
#define BOOST_REGEX_FI_WIN32_MAP
|
||||
#define BOOST_REGEX_FI_POSIX_DIR
|
||||
#elif (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_REGEX_NO_W32)
|
||||
#define BOOST_REGEX_FI_WIN32_MAP
|
||||
#define BOOST_REGEX_FI_WIN32_DIR
|
||||
#else
|
||||
#define BOOST_REGEX_FI_POSIX_MAP
|
||||
#define BOOST_REGEX_FI_POSIX_DIR
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_REGEX_FI_WIN32_MAP)||defined(BOOST_REGEX_FI_WIN32_DIR)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_REGEX_FI_WIN32_DIR)
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
typedef WIN32_FIND_DATAA _fi_find_data;
|
||||
typedef HANDLE _fi_find_handle;
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#define _fi_invalid_handle INVALID_HANDLE_VALUE
|
||||
#define _fi_dir FILE_ATTRIBUTE_DIRECTORY
|
||||
|
||||
#elif defined(BOOST_REGEX_FI_POSIX_DIR)
|
||||
|
||||
#include <cstdio>
|
||||
#include <cctype>
|
||||
#include <iterator>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
#include <dirent.h>
|
||||
|
||||
#if defined(__SUNPRO_CC)
|
||||
using std::list;
|
||||
#endif
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 256
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a8 -b -Vx -Ve -pc
|
||||
#endif
|
||||
|
||||
struct _fi_find_data
|
||||
{
|
||||
unsigned dwFileAttributes;
|
||||
char cFileName[MAX_PATH];
|
||||
};
|
||||
|
||||
struct _fi_priv_data;
|
||||
|
||||
typedef _fi_priv_data* _fi_find_handle;
|
||||
#define _fi_invalid_handle 0
|
||||
#define _fi_dir 1
|
||||
|
||||
_fi_find_handle _fi_FindFirstFile(const char* lpFileName, _fi_find_data* lpFindFileData);
|
||||
bool _fi_FindNextFile(_fi_find_handle hFindFile, _fi_find_data* lpFindFileData);
|
||||
bool _fi_FindClose(_fi_find_handle hFindFile);
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#if __BORLANDC__ > 0x520
|
||||
#pragma option pop
|
||||
#endif
|
||||
#endif
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#ifdef FindFirstFile
|
||||
#undef FindFirstFile
|
||||
#endif
|
||||
#ifdef FindNextFile
|
||||
#undef FindNextFile
|
||||
#endif
|
||||
#ifdef FindClose
|
||||
#undef FindClose
|
||||
#endif
|
||||
|
||||
#define FindFirstFileA _fi_FindFirstFile
|
||||
#define FindNextFileA _fi_FindNextFile
|
||||
#define FindClose _fi_FindClose
|
||||
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#if __BORLANDC__ == 0x530
|
||||
#pragma option push -a4 -b
|
||||
#elif __BORLANDC__ > 0x530
|
||||
#pragma option push -a8 -b
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_REGEX_FI_WIN32_MAP // win32 mapfile
|
||||
|
||||
class BOOST_REGEX_DECL mapfile
|
||||
{
|
||||
HANDLE hfile;
|
||||
HANDLE hmap;
|
||||
const char* _first;
|
||||
const char* _last;
|
||||
public:
|
||||
|
||||
typedef const char* iterator;
|
||||
|
||||
mapfile(){ hfile = hmap = 0; _first = _last = 0; }
|
||||
mapfile(const char* file){ hfile = hmap = 0; _first = _last = 0; open(file); }
|
||||
~mapfile(){ close(); }
|
||||
void open(const char* file);
|
||||
void close();
|
||||
const char* begin(){ return _first; }
|
||||
const char* end(){ return _last; }
|
||||
size_t size(){ return _last - _first; }
|
||||
bool valid(){ return (hfile != 0) && (hfile != INVALID_HANDLE_VALUE); }
|
||||
};
|
||||
|
||||
|
||||
#else
|
||||
|
||||
class BOOST_REGEX_DECL mapfile_iterator;
|
||||
|
||||
class BOOST_REGEX_DECL mapfile
|
||||
{
|
||||
typedef char* pointer;
|
||||
std::FILE* hfile;
|
||||
long int _size;
|
||||
pointer* _first;
|
||||
pointer* _last;
|
||||
mutable std::list<pointer*> condemed;
|
||||
enum sizes
|
||||
{
|
||||
buf_size = 4096
|
||||
};
|
||||
void lock(pointer* node)const;
|
||||
void unlock(pointer* node)const;
|
||||
public:
|
||||
|
||||
typedef mapfile_iterator iterator;
|
||||
|
||||
mapfile(){ hfile = 0; _size = 0; _first = _last = 0; }
|
||||
mapfile(const char* file){ hfile = 0; _size = 0; _first = _last = 0; open(file); }
|
||||
~mapfile(){ close(); }
|
||||
void open(const char* file);
|
||||
void close();
|
||||
iterator begin()const;
|
||||
iterator end()const;
|
||||
unsigned long size()const{ return _size; }
|
||||
bool valid()const{ return hfile != 0; }
|
||||
friend class mapfile_iterator;
|
||||
};
|
||||
|
||||
class BOOST_REGEX_DECL mapfile_iterator
|
||||
#if !defined(BOOST_NO_STD_ITERATOR) || defined(BOOST_MSVC_STD_ITERATOR)
|
||||
: public std::iterator<std::random_access_iterator_tag, char>
|
||||
#endif
|
||||
{
|
||||
typedef mapfile::pointer internal_pointer;
|
||||
internal_pointer* node;
|
||||
const mapfile* file;
|
||||
unsigned long offset;
|
||||
long position()const
|
||||
{
|
||||
return file ? ((node - file->_first) * mapfile::buf_size + offset) : 0;
|
||||
}
|
||||
void position(long pos)
|
||||
{
|
||||
if(file)
|
||||
{
|
||||
node = file->_first + (pos / mapfile::buf_size);
|
||||
offset = pos % mapfile::buf_size;
|
||||
}
|
||||
}
|
||||
public:
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef char value_type;
|
||||
typedef const char* pointer;
|
||||
typedef const char& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
|
||||
mapfile_iterator() { node = 0; file = 0; offset = 0; }
|
||||
mapfile_iterator(const mapfile* f, long position)
|
||||
{
|
||||
file = f;
|
||||
node = f->_first + position / mapfile::buf_size;
|
||||
offset = position % mapfile::buf_size;
|
||||
if(file)
|
||||
file->lock(node);
|
||||
}
|
||||
mapfile_iterator(const mapfile_iterator& i)
|
||||
{
|
||||
file = i.file;
|
||||
node = i.node;
|
||||
offset = i.offset;
|
||||
if(file)
|
||||
file->lock(node);
|
||||
}
|
||||
~mapfile_iterator()
|
||||
{
|
||||
if(file && node)
|
||||
file->unlock(node);
|
||||
}
|
||||
mapfile_iterator& operator = (const mapfile_iterator& i);
|
||||
char operator* ()const
|
||||
{
|
||||
assert(node >= file->_first);
|
||||
assert(node < file->_last);
|
||||
return file ? *(*node + sizeof(int) + offset) : char(0);
|
||||
}
|
||||
char operator[] (long off)const
|
||||
{
|
||||
mapfile_iterator tmp(*this);
|
||||
tmp += off;
|
||||
return *tmp;
|
||||
}
|
||||
mapfile_iterator& operator++ ();
|
||||
mapfile_iterator operator++ (int);
|
||||
mapfile_iterator& operator-- ();
|
||||
mapfile_iterator operator-- (int);
|
||||
|
||||
mapfile_iterator& operator += (long off)
|
||||
{
|
||||
position(position() + off);
|
||||
return *this;
|
||||
}
|
||||
mapfile_iterator& operator -= (long off)
|
||||
{
|
||||
position(position() - off);
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend inline bool operator==(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return (i.file == j.file) && (i.node == j.node) && (i.offset == j.offset);
|
||||
}
|
||||
|
||||
friend inline bool operator!=(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return !(i == j);
|
||||
}
|
||||
|
||||
friend inline bool operator<(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return i.position() < j.position();
|
||||
}
|
||||
friend inline bool operator>(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return i.position() > j.position();
|
||||
}
|
||||
friend inline bool operator<=(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return i.position() <= j.position();
|
||||
}
|
||||
friend inline bool operator>=(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return i.position() >= j.position();
|
||||
}
|
||||
|
||||
friend mapfile_iterator operator + (const mapfile_iterator& i, long off);
|
||||
friend mapfile_iterator operator + (long off, const mapfile_iterator& i)
|
||||
{
|
||||
mapfile_iterator tmp(i);
|
||||
return tmp += off;
|
||||
}
|
||||
friend mapfile_iterator operator - (const mapfile_iterator& i, long off);
|
||||
friend inline long operator - (const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return i.position() - j.position();
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// _fi_sep determines the directory separator, either '\\' or '/'
|
||||
BOOST_REGEX_DECL extern const char* _fi_sep;
|
||||
|
||||
struct file_iterator_ref
|
||||
{
|
||||
_fi_find_handle hf;
|
||||
_fi_find_data _data;
|
||||
long count;
|
||||
};
|
||||
|
||||
|
||||
class BOOST_REGEX_DECL file_iterator
|
||||
{
|
||||
char* _root;
|
||||
char* _path;
|
||||
char* ptr;
|
||||
file_iterator_ref* ref;
|
||||
|
||||
public:
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef const char* value_type;
|
||||
typedef const char** pointer;
|
||||
typedef const char*& reference;
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
|
||||
file_iterator();
|
||||
file_iterator(const char* wild);
|
||||
~file_iterator();
|
||||
file_iterator(const file_iterator&);
|
||||
file_iterator& operator=(const file_iterator&);
|
||||
const char* root()const { return _root; }
|
||||
const char* path()const { return _path; }
|
||||
const char* name()const { return ptr; }
|
||||
_fi_find_data* data() { return &(ref->_data); }
|
||||
void next();
|
||||
file_iterator& operator++() { next(); return *this; }
|
||||
file_iterator operator++(int);
|
||||
const char* operator*() { return path(); }
|
||||
|
||||
friend inline bool operator == (const file_iterator& f1, const file_iterator& f2)
|
||||
{
|
||||
return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
|
||||
}
|
||||
|
||||
friend inline bool operator != (const file_iterator& f1, const file_iterator& f2)
|
||||
{
|
||||
return !(f1 == f2);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// dwa 9/13/00 - suppress unused parameter warning
|
||||
inline bool operator < (const file_iterator&, const file_iterator&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
class BOOST_REGEX_DECL directory_iterator
|
||||
{
|
||||
char* _root;
|
||||
char* _path;
|
||||
char* ptr;
|
||||
file_iterator_ref* ref;
|
||||
|
||||
public:
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef const char* value_type;
|
||||
typedef const char** pointer;
|
||||
typedef const char*& reference;
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
|
||||
directory_iterator();
|
||||
directory_iterator(const char* wild);
|
||||
~directory_iterator();
|
||||
directory_iterator(const directory_iterator& other);
|
||||
directory_iterator& operator=(const directory_iterator& other);
|
||||
|
||||
const char* root()const { return _root; }
|
||||
const char* path()const { return _path; }
|
||||
const char* name()const { return ptr; }
|
||||
_fi_find_data* data() { return &(ref->_data); }
|
||||
void next();
|
||||
directory_iterator& operator++() { next(); return *this; }
|
||||
directory_iterator operator++(int);
|
||||
const char* operator*() { return path(); }
|
||||
|
||||
static const char* separator() { return _fi_sep; }
|
||||
|
||||
friend inline bool operator == (const directory_iterator& f1, const directory_iterator& f2)
|
||||
{
|
||||
return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
|
||||
}
|
||||
|
||||
|
||||
friend inline bool operator != (const directory_iterator& f1, const directory_iterator& f2)
|
||||
{
|
||||
return !(f1 == f2);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
inline bool operator < (const directory_iterator&, const directory_iterator&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
|
||||
} // namespace re_detail
|
||||
using boost::re_detail::directory_iterator;
|
||||
using boost::re_detail::file_iterator;
|
||||
using boost::re_detail::mapfile;
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_NO_FILEITER
|
||||
#endif // BOOST_RE_FILEITER_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,165 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE instances.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Defines those template instances that are placed in the
|
||||
* library rather than in the users object files.
|
||||
*/
|
||||
|
||||
//
|
||||
// note no include guard, we may include this multiple times:
|
||||
//
|
||||
#ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
|
||||
namespace boost{
|
||||
|
||||
//
|
||||
// this header can be included multiple times, each time with
|
||||
// a different character type, BOOST_REGEX_CHAR_T must be defined
|
||||
// first:
|
||||
//
|
||||
#ifndef BOOST_REGEX_CHAR_T
|
||||
# error "BOOST_REGEX_CHAR_T not defined"
|
||||
#endif
|
||||
|
||||
//
|
||||
// what follows is compiler specific:
|
||||
//
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
|
||||
#pragma option push -a8 -b -Vx -Ve -pc
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# pragma option push -Jgx
|
||||
# endif
|
||||
|
||||
template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >;
|
||||
template class BOOST_REGEX_DECL re_detail::match_results_base<BOOST_REGEX_CHAR_T const*>;
|
||||
template class BOOST_REGEX_DECL re_detail::match_results_base<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>;
|
||||
template class BOOST_REGEX_DECL match_results<BOOST_REGEX_CHAR_T const*>;
|
||||
template class BOOST_REGEX_DECL match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>;
|
||||
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# pragma option pop
|
||||
# endif
|
||||
|
||||
#pragma option pop
|
||||
|
||||
#elif defined(BOOST_MSVC)
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# define template extern template
|
||||
# endif
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4251 4231 4660)
|
||||
|
||||
//template class BOOST_REGEX_DECL regex_traits< BOOST_REGEX_CHAR_T >;
|
||||
template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >;
|
||||
template class BOOST_REGEX_DECL re_detail::match_results_base<BOOST_REGEX_CHAR_T const*, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<BOOST_REGEX_CHAR_T const*>::type) >;
|
||||
template class BOOST_REGEX_DECL re_detail::match_results_base<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::type) >;
|
||||
template class BOOST_REGEX_DECL match_results<BOOST_REGEX_CHAR_T const*, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<BOOST_REGEX_CHAR_T const*>::type) >;
|
||||
template class BOOST_REGEX_DECL match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, BOOST_DEFAULT_ALLOCATOR(re_detail::def_alloc_param_traits<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::type) >;
|
||||
|
||||
|
||||
#pragma warning(pop)
|
||||
|
||||
# ifdef template
|
||||
# undef template
|
||||
# endif
|
||||
|
||||
#elif !defined(BOOST_REGEX_HAS_DLL_RUNTIME)
|
||||
|
||||
//
|
||||
// for each [member] function declare a full specialisation of that
|
||||
// [member] function, then instantiate it in one translation unit.
|
||||
// This is not guarenteed to work according to the standard, but in
|
||||
// practice it should work for all compilers (unless they use a realy
|
||||
// perverse name mangling convention). Unfortunately this approach
|
||||
// does *not* work for Win32 style import/export, because that can
|
||||
// alter the class layout.
|
||||
//
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# define template template<>
|
||||
# endif
|
||||
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_REGEX_CHAR_T* p, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)& a);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_REGEX_CHAR_T* p, size_type len, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const reg_expression<BOOST_REGEX_CHAR_T>&);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::~reg_expression();
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>& BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator=(const reg_expression&);
|
||||
template BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::get_allocator()const;
|
||||
template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator==(const reg_expression<BOOST_REGEX_CHAR_T>&)const;
|
||||
template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator<(const reg_expression<BOOST_REGEX_CHAR_T>&)const;
|
||||
template BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::allocator()const;
|
||||
template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::set_expression(const BOOST_REGEX_CHAR_T* p, const BOOST_REGEX_CHAR_T* end, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f);
|
||||
template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_maps();
|
||||
template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_map(re_detail::re_syntax_base* node, unsigned char* _map, unsigned int* pnull, unsigned char mask, re_detail::re_syntax_base* terminal)const;
|
||||
template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_start(re_detail::re_syntax_base* node, BOOST_REGEX_CHAR_T c, re_detail::re_syntax_base* terminal)const;
|
||||
template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const;
|
||||
template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces);
|
||||
template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::move_offsets(re_detail::re_syntax_base* j, unsigned size);
|
||||
template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
|
||||
template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_aux(re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) >& singles, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& ranges, re_detail::jstack<boost::uint_fast32_t, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) >& classes, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) >& equivalents, bool isnot, const re_detail::_narrow_type&);
|
||||
template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_aux(re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) >& singles, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)>& ranges, re_detail::jstack<boost::uint_fast32_t, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) >& classes, re_detail::jstack<reg_expression<BOOST_REGEX_CHAR_T>::traits_string_type, BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) >& equivalents, bool isnot, const re_detail::_wide_type&);
|
||||
template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot);
|
||||
template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_inner_set(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
|
||||
template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size);
|
||||
template re_detail::re_syntax_base* BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::add_literal(re_detail::re_syntax_base* dat, BOOST_REGEX_CHAR_T c);
|
||||
template BOOST_REGEX_CHAR_T BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_escape(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
|
||||
template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::parse_range(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, unsigned& min, unsigned& max);
|
||||
template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::skip_space(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last);
|
||||
template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::probe_restart(re_detail::re_syntax_base* dat);
|
||||
template unsigned int BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end);
|
||||
template void BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::fail(unsigned int err);
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
#define iterator const BOOST_REGEX_CHAR_T*
|
||||
#define Allocator match_results_base<iterator>::alloc_type
|
||||
#define size_type match_results_base<iterator>::size_type
|
||||
|
||||
template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i);
|
||||
template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_first(iterator i, std::size_t pos);
|
||||
template match_results_base<iterator, Allocator>::match_results_base(const Allocator& a);
|
||||
template Allocator BOOST_REGEX_CALL match_results_base<iterator, Allocator>::allocator()const;
|
||||
template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::m_free();
|
||||
template bool match_results_base<iterator, Allocator>::operator==(const match_results_base<iterator, Allocator>& that)const;
|
||||
template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n);
|
||||
template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::set_size(size_type n, iterator i, iterator j);
|
||||
template void BOOST_REGEX_CALL match_results_base<iterator, Allocator>::cow();
|
||||
|
||||
#undef iterator
|
||||
#undef Allocator
|
||||
#undef size_type
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
# ifdef template
|
||||
# undef template
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,131 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_cstring.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: This is an internal header file, do not include directly.
|
||||
* String support and helper functions, for regular
|
||||
* expression library.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_CSTRING_HPP
|
||||
#define BOOST_REGEX_CSTRING_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a8 -b -Vx -Ve -pc
|
||||
#endif
|
||||
|
||||
//
|
||||
// start by defining some template function aliases for C API functions:
|
||||
//
|
||||
|
||||
template <class charT>
|
||||
std::size_t BOOST_REGEX_CALL re_strlen(const charT *s)
|
||||
{
|
||||
std::size_t len = 0;
|
||||
while(*s)
|
||||
{
|
||||
++s;
|
||||
++len;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
inline std::size_t BOOST_REGEX_CALL re_strlen(const char *s)
|
||||
{
|
||||
return std::strlen(s);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
|
||||
inline std::size_t BOOST_REGEX_CALL re_strlen(const wchar_t *s)
|
||||
{
|
||||
return std::wcslen(s);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL re_transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
#endif
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL re_transform(std::string& out, const std::string& in);
|
||||
|
||||
template <class charT>
|
||||
void BOOST_REGEX_CALL re_trunc_primary(std::basic_string<charT>& s)
|
||||
{
|
||||
for(unsigned int i = 0; i < s.size(); ++i)
|
||||
{
|
||||
if(s[i] <= 1)
|
||||
{
|
||||
s.erase(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline char* BOOST_REGEX_CALL re_strcpy(char *s1, const char *s2)
|
||||
{
|
||||
#if defined(__BORLANDC__) && defined(strcpy)
|
||||
return ::strcpy(s1, s2);
|
||||
#else
|
||||
return std::strcpy(s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
|
||||
inline wchar_t* BOOST_REGEX_CALL re_strcpy(wchar_t *s1, const wchar_t *s2)
|
||||
{
|
||||
return std::wcscpy(s1, s2);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
template <class charT>
|
||||
charT* BOOST_REGEX_CALL re_strdup(const charT* p)
|
||||
{
|
||||
charT* buf = new charT[re_strlen(p) + 1];
|
||||
re_strcpy(buf, p);
|
||||
return buf;
|
||||
}
|
||||
|
||||
template <class charT>
|
||||
inline void BOOST_REGEX_CALL re_strfree(charT* p)
|
||||
{
|
||||
delete[] p;
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_CSTRING_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,576 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_format.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Provides formatting output routines for search and replace
|
||||
* operations. Note this is an internal header file included
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_FORMAT_HPP
|
||||
#define BOOST_REGEX_FORMAT_HPP
|
||||
|
||||
|
||||
namespace boost{
|
||||
|
||||
enum format_flags_t{
|
||||
format_all = 0, // enable all extentions to sytax
|
||||
format_sed = match_max << 1, // sed style replacement.
|
||||
format_perl = format_sed << 1, // perl style replacement.
|
||||
format_no_copy = format_perl << 1, // don't copy non-matching segments.
|
||||
format_first_only = format_no_copy << 1, // Only replace first occurance.
|
||||
format_is_if = format_first_only << 1 // internal use only.
|
||||
};
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a8 -b -Vx -Ve -pc -w-8037
|
||||
#endif
|
||||
|
||||
template <class O, class I>
|
||||
O BOOST_REGEX_CALL re_copy_out(O out, I first, I last)
|
||||
{
|
||||
while(first != last)
|
||||
{
|
||||
*out = *first;
|
||||
++out;
|
||||
++first;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
template <class charT, class traits_type>
|
||||
void BOOST_REGEX_CALL re_skip_format(const charT*& fmt, const traits_type& traits_inst)
|
||||
{
|
||||
// dwa 9/13/00 - suppress incorrect unused parameter warning for MSVC
|
||||
(void)traits_inst;
|
||||
|
||||
typedef typename traits_type::size_type traits_size_type;
|
||||
typedef typename traits_type::uchar_type traits_uchar_type;
|
||||
typedef typename traits_type::string_type traits_string_type;
|
||||
|
||||
unsigned int parens = 0;
|
||||
unsigned int c;
|
||||
while(*fmt)
|
||||
{
|
||||
c = traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt));
|
||||
if((c == traits_type::syntax_colon) && (parens == 0))
|
||||
{
|
||||
++fmt;
|
||||
return;
|
||||
}
|
||||
else if(c == traits_type::syntax_close_bracket)
|
||||
{
|
||||
if(parens == 0)
|
||||
{
|
||||
++fmt;
|
||||
return;
|
||||
}
|
||||
--parens;
|
||||
}
|
||||
else if(c == traits_type::syntax_open_bracket)
|
||||
++parens;
|
||||
else if(c == traits_type::syntax_slash)
|
||||
{
|
||||
++fmt;
|
||||
if(*fmt == 0)
|
||||
return;
|
||||
}
|
||||
++fmt;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
|
||||
|
||||
//
|
||||
// ugly hack for buggy output iterators
|
||||
|
||||
template <class T>
|
||||
inline void oi_assign(T* p, T v)
|
||||
{
|
||||
::boost::re_detail::pointer_destroy(p);
|
||||
pointer_construct(p, v);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
template <class T>
|
||||
inline void oi_assign(T* p, T v)
|
||||
{
|
||||
//
|
||||
// if you get a compile time error in here then you either
|
||||
// need to rewrite your output iterator to make it assignable
|
||||
// (as is required by the standard), or define
|
||||
// BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN to use the ugly hack above
|
||||
*p = v;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
//
|
||||
// Ugly ugly hack,
|
||||
// template don't merge if they contain switch statements so declare these
|
||||
// templates in unnamed namespace (ie with internal linkage), each translation
|
||||
// unit then gets its own local copy, it works seemlessly but bloats the app.
|
||||
namespace{
|
||||
#endif
|
||||
|
||||
//
|
||||
// algorithm reg_format:
|
||||
// takes the result of a match and a format string
|
||||
// and merges them to produce a new string which
|
||||
// is sent to an OutputIterator,
|
||||
// _reg_format_aux does the actual work:
|
||||
//
|
||||
template <class OutputIterator, class Iterator, class Allocator, class charT, class traits_type>
|
||||
OutputIterator BOOST_REGEX_CALL _reg_format_aux(OutputIterator out,
|
||||
const match_results<Iterator, Allocator>& m,
|
||||
const charT*& fmt,
|
||||
unsigned flags, const traits_type& traits_inst)
|
||||
{
|
||||
const charT* fmt_end = fmt;
|
||||
while(*fmt_end) ++ fmt_end;
|
||||
|
||||
typedef typename traits_type::size_type traits_size_type;
|
||||
typedef typename traits_type::uchar_type traits_uchar_type;
|
||||
typedef typename traits_type::string_type traits_string_type;
|
||||
|
||||
while(*fmt)
|
||||
{
|
||||
switch(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)))
|
||||
{
|
||||
case traits_type::syntax_dollar:
|
||||
if(flags & format_sed)
|
||||
{
|
||||
// no perl style replacement,
|
||||
// $ is an ordinary character:
|
||||
goto default_opt;
|
||||
}
|
||||
++fmt;
|
||||
if(*fmt == 0) // oops trailing $
|
||||
{
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
return out;
|
||||
}
|
||||
switch(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)))
|
||||
{
|
||||
case traits_type::syntax_start_buffer:
|
||||
oi_assign(&out, re_copy_out(out, Iterator(m[-1].first), Iterator(m[-1].second)));
|
||||
++fmt;
|
||||
continue;
|
||||
case traits_type::syntax_end_buffer:
|
||||
oi_assign(&out, re_copy_out(out, Iterator(m[-2].first), Iterator(m[-2].second)));
|
||||
++fmt;
|
||||
continue;
|
||||
case traits_type::syntax_digit:
|
||||
{
|
||||
expand_sub:
|
||||
unsigned int index = traits_inst.toi(fmt, fmt_end, 10);
|
||||
oi_assign(&out, re_copy_out(out, Iterator(m[index].first), Iterator(m[index].second)));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// anything else:
|
||||
if(*fmt == '&')
|
||||
{
|
||||
oi_assign(&out, re_copy_out(out, Iterator(m[0].first), Iterator(m[0].second)));
|
||||
++fmt;
|
||||
}
|
||||
else
|
||||
{
|
||||
// probably an error, treat as a literal '$'
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
}
|
||||
continue;
|
||||
case traits_type::syntax_slash:
|
||||
{
|
||||
// escape sequence:
|
||||
++fmt;
|
||||
charT c(*fmt);
|
||||
if(*fmt == 0)
|
||||
{
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
return out;
|
||||
}
|
||||
switch(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)))
|
||||
{
|
||||
case traits_type::syntax_a:
|
||||
c = '\a';
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_f:
|
||||
c = '\f';
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_n:
|
||||
c = '\n';
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_r:
|
||||
c = '\r';
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_t:
|
||||
c = '\t';
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_v:
|
||||
c = '\v';
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_x:
|
||||
++fmt;
|
||||
if(fmt == fmt_end)
|
||||
{
|
||||
*out = *--fmt;
|
||||
++out;
|
||||
return out;
|
||||
}
|
||||
// maybe have \x{ddd}
|
||||
if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)) == traits_type::syntax_open_brace)
|
||||
{
|
||||
++fmt;
|
||||
if(fmt == fmt_end)
|
||||
{
|
||||
fmt -= 2;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
if(traits_inst.is_class(*fmt, traits_type::char_class_xdigit) == false)
|
||||
{
|
||||
fmt -= 2;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
c = (charT)traits_inst.toi(fmt, fmt_end, -16);
|
||||
if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)) != traits_type::syntax_close_brace)
|
||||
{
|
||||
while(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*fmt)) != traits_type::syntax_slash)
|
||||
--fmt;
|
||||
++fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
++fmt;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(traits_inst.is_class(*fmt, traits_type::char_class_xdigit) == false)
|
||||
{
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
c = (charT)traits_inst.toi(fmt, fmt_end, -16);
|
||||
}
|
||||
break;
|
||||
case traits_type::syntax_c:
|
||||
++fmt;
|
||||
if(fmt == fmt_end)
|
||||
{
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
return out;
|
||||
}
|
||||
if(((typename traits_type::uchar_type)(*fmt) < (typename traits_type::uchar_type)'@')
|
||||
|| ((typename traits_type::uchar_type)(*fmt) > (typename traits_type::uchar_type)127) )
|
||||
{
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
break;
|
||||
}
|
||||
c = (charT)((typename traits_type::uchar_type)(*fmt) - (typename traits_type::uchar_type)'@');
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_e:
|
||||
c = (charT)27;
|
||||
++fmt;
|
||||
break;
|
||||
case traits_type::syntax_digit:
|
||||
if(flags & format_sed)
|
||||
goto expand_sub;
|
||||
else
|
||||
c = (charT)traits_inst.toi(fmt, fmt_end, -8);
|
||||
break;
|
||||
default:
|
||||
//c = *fmt;
|
||||
++fmt;
|
||||
}
|
||||
*out = c;
|
||||
++out;
|
||||
continue;
|
||||
}
|
||||
case traits_type::syntax_open_bracket:
|
||||
if(flags & (format_sed|format_perl))
|
||||
{
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
++fmt; // recurse
|
||||
oi_assign(&out, _reg_format_aux(out, m, fmt, flags, traits_inst));
|
||||
continue;
|
||||
}
|
||||
case traits_type::syntax_close_bracket:
|
||||
if(flags & (format_sed|format_perl))
|
||||
{
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
++fmt; // return from recursion
|
||||
return out;
|
||||
}
|
||||
case traits_type::syntax_colon:
|
||||
if(flags & format_is_if)
|
||||
{
|
||||
++fmt;
|
||||
return out;
|
||||
}
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
case traits_type::syntax_question:
|
||||
{
|
||||
if(flags & (format_sed|format_perl))
|
||||
{
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
++fmt;
|
||||
if(*fmt == 0)
|
||||
{
|
||||
--fmt;
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
return out;
|
||||
}
|
||||
unsigned int id = traits_inst.toi(fmt, fmt_end, 10);
|
||||
if(m[id].matched)
|
||||
{
|
||||
oi_assign(&out, _reg_format_aux(out, m, fmt, flags | format_is_if, traits_inst));
|
||||
if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*(fmt-1))) == traits_type::syntax_colon)
|
||||
re_skip_format(fmt, traits_inst);
|
||||
}
|
||||
else
|
||||
{
|
||||
re_skip_format(fmt, traits_inst);
|
||||
if(traits_inst.syntax_type((traits_size_type)(traits_uchar_type)(*(fmt-1))) == traits_type::syntax_colon)
|
||||
oi_assign(&out, _reg_format_aux(out, m, fmt, flags | format_is_if, traits_inst));
|
||||
}
|
||||
return out;
|
||||
}
|
||||
}
|
||||
default:
|
||||
default_opt:
|
||||
if((flags & format_sed) && (*fmt == '&'))
|
||||
{
|
||||
oi_assign(&out, re_copy_out(out, Iterator(m[0].first), Iterator(m[0].second)));
|
||||
++fmt;
|
||||
continue;
|
||||
}
|
||||
*out = *fmt;
|
||||
++out;
|
||||
++fmt;
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
#if defined(BOOST_REGEX_NO_TEMPLATE_SWITCH_MERGE)
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
template <class S>
|
||||
class string_out_iterator
|
||||
{
|
||||
S* out;
|
||||
public:
|
||||
string_out_iterator(S& s) : out(&s) {}
|
||||
string_out_iterator& operator++() { return *this; }
|
||||
string_out_iterator& operator++(int) { return *this; }
|
||||
string_out_iterator& operator*() { return *this; }
|
||||
string_out_iterator& operator=(typename S::value_type v)
|
||||
{
|
||||
out->append(1, v);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
template <class OutputIterator, class Iterator, class charT, class Allocator, class traits_type>
|
||||
class merge_out_predicate
|
||||
{
|
||||
OutputIterator* out;
|
||||
Iterator* last;
|
||||
const charT* fmt;
|
||||
unsigned flags;
|
||||
const traits_type* pt;
|
||||
|
||||
public:
|
||||
merge_out_predicate(OutputIterator& o, Iterator& pi, const charT* f, unsigned format_flags, const traits_type& p)
|
||||
: out(&o), last(&pi), fmt(f), flags(format_flags), pt(&p){}
|
||||
|
||||
~merge_out_predicate() {}
|
||||
bool BOOST_REGEX_CALL operator()(const boost::match_results<Iterator, Allocator>& m)
|
||||
{
|
||||
const charT* f = fmt;
|
||||
if(0 == (flags & format_no_copy))
|
||||
oi_assign(out, re_copy_out(*out, Iterator(m[-1].first), Iterator(m[-1].second)));
|
||||
oi_assign(out, _reg_format_aux(*out, m, f, flags, *pt));
|
||||
*last = m[-2].first;
|
||||
return flags & format_first_only ? false : true;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
template <class OutputIterator, class Iterator, class Allocator, class charT>
|
||||
OutputIterator regex_format(OutputIterator out,
|
||||
const match_results<Iterator, Allocator>& m,
|
||||
const charT* fmt,
|
||||
unsigned flags = 0
|
||||
)
|
||||
{
|
||||
regex_traits<charT> t;
|
||||
return re_detail::_reg_format_aux(out, m, fmt, flags, t);
|
||||
}
|
||||
|
||||
template <class OutputIterator, class Iterator, class Allocator, class charT>
|
||||
OutputIterator regex_format(OutputIterator out,
|
||||
const match_results<Iterator, Allocator>& m,
|
||||
const std::basic_string<charT>& fmt,
|
||||
unsigned flags = 0
|
||||
)
|
||||
{
|
||||
regex_traits<charT> t;
|
||||
const charT* start = fmt.c_str();
|
||||
return re_detail::_reg_format_aux(out, m, start, flags, t);
|
||||
}
|
||||
|
||||
template <class Iterator, class Allocator, class charT>
|
||||
std::basic_string<charT> regex_format(const match_results<Iterator, Allocator>& m, const charT* fmt, unsigned flags = 0)
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
|
||||
regex_format(i, m, fmt, flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class Iterator, class Allocator, class charT>
|
||||
std::basic_string<charT> regex_format(const match_results<Iterator, Allocator>& m, const std::basic_string<charT>& fmt, unsigned flags = 0)
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
|
||||
regex_format(i, m, fmt.c_str(), flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class OutputIterator, class Iterator, class traits, class Allocator, class charT>
|
||||
OutputIterator regex_merge(OutputIterator out,
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
const reg_expression<charT, traits, Allocator>& e,
|
||||
const charT* fmt,
|
||||
unsigned int flags = match_default)
|
||||
{
|
||||
Iterator l = first;
|
||||
re_detail::merge_out_predicate<OutputIterator, Iterator, charT, Allocator, traits> oi(out, l, fmt, flags, e.get_traits());
|
||||
regex_grep(oi, first, last, e, flags);
|
||||
return (flags & format_no_copy) ? out : re_detail::re_copy_out(out, l, last);
|
||||
}
|
||||
|
||||
template <class OutputIterator, class Iterator, class traits, class Allocator, class charT>
|
||||
inline OutputIterator regex_merge(OutputIterator out,
|
||||
Iterator first,
|
||||
Iterator last,
|
||||
const reg_expression<charT, traits, Allocator>& e,
|
||||
const std::basic_string<charT>& fmt,
|
||||
unsigned int flags = match_default)
|
||||
{
|
||||
return regex_merge(out, first, last, e, fmt.c_str(), flags);
|
||||
}
|
||||
|
||||
template <class traits, class Allocator, class charT>
|
||||
std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
|
||||
const reg_expression<charT, traits, Allocator>& e,
|
||||
const charT* fmt,
|
||||
unsigned int flags = match_default)
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
|
||||
regex_merge(i, s.begin(), s.end(), e, fmt, flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class traits, class Allocator, class charT>
|
||||
std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
|
||||
const reg_expression<charT, traits, Allocator>& e,
|
||||
const std::basic_string<charT>& fmt,
|
||||
unsigned int flags = match_default)
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
re_detail::string_out_iterator<std::basic_string<charT> > i(result);
|
||||
regex_merge(i, s.begin(), s.end(), e, fmt.c_str(), flags);
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_FORMAT_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_fwd.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Forward declares boost::reg_expression<> and
|
||||
* associated typedefs.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_FWD_HPP_INCLUDED
|
||||
#define BOOST_REGEX_FWD_HPP_INCLUDED
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/config.hpp>
|
||||
#endif
|
||||
#include <boost/regex/config/allocator.hpp>
|
||||
|
||||
//
|
||||
// define BOOST_REGEX_NO_FWD if this
|
||||
// header doesn't work!
|
||||
//
|
||||
#ifdef BOOST_REGEX_NO_FWD
|
||||
# ifndef BOOST_RE_REGEX_HPP
|
||||
# include <boost/regex.hpp>
|
||||
# endif
|
||||
#else
|
||||
|
||||
//
|
||||
// If there isn't good enough wide character support then there will
|
||||
// be no wide character regular expressions:
|
||||
//
|
||||
#if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING)) && !defined(BOOST_NO_WREGEX)
|
||||
# define BOOST_NO_WREGEX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
|
||||
template <class charT>
|
||||
class regex_traits;
|
||||
|
||||
template <class charT, class traits = regex_traits<charT>, class Allocator = BOOST_DEFAULT_ALLOCATOR(charT) >
|
||||
class reg_expression;
|
||||
|
||||
typedef reg_expression<char, regex_traits<char>, BOOST_DEFAULT_ALLOCATOR(char) > regex;
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
typedef reg_expression<wchar_t, regex_traits<wchar_t>, BOOST_DEFAULT_ALLOCATOR(wchar_t) > wregex;
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_NO_FWD
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_kmp.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Provides Knuth Morris Pratt search operations.
|
||||
* Note this is an internal header file included
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_KMP_HPP
|
||||
#define BOOST_REGEX_KMP_HPP
|
||||
|
||||
#ifdef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a8 -b -Vx -Ve -pc
|
||||
#endif
|
||||
|
||||
template <class charT>
|
||||
struct kmp_info
|
||||
{
|
||||
unsigned int size;
|
||||
unsigned int len;
|
||||
const charT* pstr;
|
||||
int kmp_next[1];
|
||||
};
|
||||
|
||||
template <class charT, class Allocator>
|
||||
void kmp_free(kmp_info<charT>* pinfo, const Allocator& a)
|
||||
{
|
||||
typedef typename boost::detail::rebind_allocator<char, Allocator>::type atype;
|
||||
atype(a).deallocate(reinterpret_cast<char*>(pinfo), pinfo->size);
|
||||
}
|
||||
|
||||
template <class iterator, class charT, class Trans, class Allocator>
|
||||
kmp_info<charT>* kmp_compile(iterator first, iterator last, charT, Trans translate, const Allocator& a)
|
||||
{
|
||||
typedef typename boost::detail::rebind_allocator<char, Allocator>::type atype;
|
||||
int i, j, m;
|
||||
i = 0;
|
||||
m = static_cast<int>(boost::re_detail::distance(first, last));
|
||||
++m;
|
||||
unsigned int size = sizeof(kmp_info<charT>) + sizeof(int)*m + sizeof(charT)*m;
|
||||
--m;
|
||||
//
|
||||
// allocate struct and fill it in:
|
||||
//
|
||||
kmp_info<charT>* pinfo = reinterpret_cast<kmp_info<charT>*>(atype(a).allocate(size));
|
||||
BOOST_REGEX_NOEH_ASSERT(pinfo)
|
||||
pinfo->size = size;
|
||||
pinfo->len = m;
|
||||
charT* p = reinterpret_cast<charT*>(reinterpret_cast<char*>(pinfo) + sizeof(kmp_info<charT>) + sizeof(int)*(m+1));
|
||||
pinfo->pstr = p;
|
||||
while(first != last)
|
||||
{
|
||||
*p = translate(*first);
|
||||
++first;
|
||||
++p;
|
||||
}
|
||||
*p = 0;
|
||||
//
|
||||
// finally do regular kmp compile:
|
||||
//
|
||||
j = pinfo->kmp_next[0] = -1;
|
||||
while (i < m)
|
||||
{
|
||||
while ((j > -1) && (pinfo->pstr[i] != pinfo->pstr[j]))
|
||||
j = pinfo->kmp_next[j];
|
||||
++i;
|
||||
++j;
|
||||
if (pinfo->pstr[i] == pinfo->pstr[j])
|
||||
pinfo->kmp_next[i] = pinfo->kmp_next[j];
|
||||
else
|
||||
pinfo->kmp_next[i] = j;
|
||||
}
|
||||
|
||||
return pinfo;
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namepsace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_KMP_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_libary_include.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
|
||||
* Note this is an internal header file included
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
Libraries for Borland and Microsoft compilers are automatically
|
||||
selected here, the name of the lib is selected according to the following
|
||||
formula:
|
||||
|
||||
BOOST_LIB_NAME
|
||||
+ "_"
|
||||
+ BOOST_LIB_TOOLSET
|
||||
+ "_"
|
||||
+ BOOST_LIB_THREAD_OPT
|
||||
+ BOOST_LIB_RT_OPT
|
||||
+ BOOST_LIB_LINK_OPT
|
||||
+ BOOST_LIB_DEBUG_OPT
|
||||
|
||||
These are defined as:
|
||||
|
||||
BOOST_LIB_NAME: The base name of the lib (boost_regex).
|
||||
|
||||
BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).
|
||||
|
||||
BOOST_LIB_THREAD_OPT: "s" for single thread builds,
|
||||
"m" for multithread builds.
|
||||
|
||||
BOOST_LIB_RT_OPT: "s" for static runtime,
|
||||
"d" for dynamic runtime.
|
||||
|
||||
BOOST_LIB_LINK_OPT: "s" for static link,
|
||||
"i" for dynamic link.
|
||||
|
||||
BOOST_LIB_DEBUG_OPT: nothing for release builds,
|
||||
"d" for debug builds,
|
||||
"dd" for debug-diagnostic builds (_STLP_DEBUG).
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#if !defined(BOOST_REGEX_LIBRARY_INCLUDE_HPP) && !defined(BOOST_REGEX_NO_LIB)
|
||||
#define BOOST_REGEX_LIBRARY_INCLUDE_HPP
|
||||
|
||||
#define BOOST_LIB_NAME "boost_regex"
|
||||
|
||||
//
|
||||
// select toolset:
|
||||
//
|
||||
#if defined(BOOST_MSVC) && (BOOST_MSVC == 1200) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||
|
||||
// vc6-stlport:
|
||||
# define BOOST_LIB_TOOLSET "vc6-stlport"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1200)
|
||||
|
||||
// vc6:
|
||||
# define BOOST_LIB_TOOLSET "vc6"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1300)
|
||||
|
||||
// vc7:
|
||||
# define BOOST_LIB_TOOLSET "vc7"
|
||||
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x560)
|
||||
|
||||
// CBuilder 6:
|
||||
# define BOOST_LIB_TOOLSET "bcb6"
|
||||
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550)
|
||||
|
||||
// CBuilder 6:
|
||||
# define BOOST_LIB_TOOLSET "bcb5"
|
||||
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x540)
|
||||
|
||||
// CBuilder 6:
|
||||
# define BOOST_LIB_TOOLSET "bcb4"
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// select thread opt:
|
||||
//
|
||||
#if defined(_MT) || defined(__MT__)
|
||||
# define BOOST_LIB_THREAD_OPT "m"
|
||||
#else
|
||||
# define BOOST_LIB_THREAD_OPT "s"
|
||||
#endif
|
||||
|
||||
//
|
||||
// select runtime opt:
|
||||
//
|
||||
#if defined(_DLL) || defined(_RTLDLL)
|
||||
# define BOOST_LIB_RT_OPT "d"
|
||||
#else
|
||||
# define BOOST_LIB_RT_OPT "s"
|
||||
#endif
|
||||
|
||||
//
|
||||
// select linkage opt:
|
||||
//
|
||||
#if (defined(_DLL) || defined(_RTLDLL)) && !defined(BOOST_REGEX_STATIC_LINK)
|
||||
# define BOOST_LIB_LINK_OPT "i"
|
||||
#else
|
||||
# define BOOST_LIB_LINK_OPT "s"
|
||||
#endif
|
||||
|
||||
//
|
||||
// select debug opt:
|
||||
//
|
||||
#if defined(BOOST_MSVC) && defined(_DEBUG) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
|
||||
# define BOOST_LIB_DEBUG_OPT "dd"
|
||||
#elif defined(BOOST_MSVC) && defined(_DEBUG)
|
||||
# define BOOST_LIB_DEBUG_OPT "d"
|
||||
#elif defined(__BORLANDC__) && (__BORLANDC__ == 0x560) && (defined(_STLP_DEBUG) || defined(__STL_DEBUG))
|
||||
# define BOOST_LIB_DEBUG_OPT "dd"
|
||||
#else
|
||||
# define BOOST_LIB_DEBUG_OPT
|
||||
#endif
|
||||
|
||||
//
|
||||
// now include the lib:
|
||||
//
|
||||
#if defined(BOOST_LIB_NAME) \
|
||||
&& defined(BOOST_LIB_TOOLSET) \
|
||||
&& defined(BOOST_LIB_THREAD_OPT) \
|
||||
&& defined(BOOST_LIB_RT_OPT) \
|
||||
&& defined(BOOST_LIB_LINK_OPT) \
|
||||
&& defined(BOOST_LIB_DEBUG_OPT)
|
||||
|
||||
# pragma comment(lib, BOOST_LIB_NAME "_" BOOST_LIB_TOOLSET "_" BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_LINK_OPT BOOST_LIB_DEBUG_OPT ".lib")
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// finally undef any macros we may have set:
|
||||
//
|
||||
#if defined(BOOST_LIB_NAME)
|
||||
# undef BOOST_LIB_NAME
|
||||
#endif
|
||||
#if defined(BOOST_LIB_TOOLSET)
|
||||
# undef BOOST_LIB_TOOLSET
|
||||
#endif
|
||||
#if defined(BOOST_LIB_THREAD_OPT)
|
||||
# undef BOOST_LIB_THREAD_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_RT_OPT)
|
||||
# undef BOOST_LIB_RT_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_LINK_OPT)
|
||||
# undef BOOST_LIB_LINK_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_DEBUG_OPT)
|
||||
# undef BOOST_LIB_DEBUG_OPT
|
||||
#endif
|
||||
|
||||
|
||||
#endif // BOOST_REGEX_LIBRARY_INCLUDE_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,246 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_raw_buffer.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Raw character buffer for regex code.
|
||||
* Note this is an internal header file included
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_RAW_BUFFER_HPP
|
||||
#define BOOST_REGEX_RAW_BUFFER_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a8 -b -Vx -Ve -pc
|
||||
#endif
|
||||
|
||||
struct empty_padding{};
|
||||
|
||||
union padding
|
||||
{
|
||||
void* p;
|
||||
unsigned int i;
|
||||
};
|
||||
|
||||
template <int N>
|
||||
struct padding3
|
||||
{
|
||||
enum{
|
||||
padding_size = 8,
|
||||
padding_mask = 7
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct padding3<2>
|
||||
{
|
||||
enum{
|
||||
padding_size = 2,
|
||||
padding_mask = 1
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct padding3<4>
|
||||
{
|
||||
enum{
|
||||
padding_size = 4,
|
||||
padding_mask = 3
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct padding3<8>
|
||||
{
|
||||
enum{
|
||||
padding_size = 8,
|
||||
padding_mask = 7
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct padding3<16>
|
||||
{
|
||||
enum{
|
||||
padding_size = 16,
|
||||
padding_mask = 15
|
||||
};
|
||||
};
|
||||
|
||||
enum{
|
||||
padding_size = padding3<sizeof(padding)>::padding_size,
|
||||
padding_mask = padding3<sizeof(padding)>::padding_mask
|
||||
};
|
||||
|
||||
//
|
||||
// class raw_storage
|
||||
// basically this is a simplified vector<unsigned char>
|
||||
// this is used by reg_expression for expression storage
|
||||
//
|
||||
|
||||
template <class Allocator>
|
||||
class raw_storage
|
||||
{
|
||||
public:
|
||||
typedef Allocator allocator_type;
|
||||
typedef typename boost::detail::rebind_allocator<unsigned char, allocator_type>::type alloc_inst_type;
|
||||
typedef typename alloc_inst_type::size_type size_type;
|
||||
typedef typename alloc_inst_type::pointer pointer;
|
||||
private:
|
||||
//
|
||||
// empty member optimisation:
|
||||
struct alloc_data : public alloc_inst_type
|
||||
{
|
||||
typename alloc_inst_type::pointer last;
|
||||
alloc_data(const Allocator& a) : alloc_inst_type(a){}
|
||||
} alloc_inst;
|
||||
pointer start, end;
|
||||
public:
|
||||
|
||||
raw_storage(const Allocator& a = Allocator());
|
||||
raw_storage(size_type n, const Allocator& a = Allocator());
|
||||
|
||||
~raw_storage()
|
||||
{
|
||||
alloc_inst.deallocate(start, (alloc_inst.last - start));
|
||||
}
|
||||
|
||||
void BOOST_REGEX_CALL resize(size_type n);
|
||||
|
||||
void* BOOST_REGEX_CALL extend(size_type n)
|
||||
{
|
||||
if(size_type(alloc_inst.last - end) < n)
|
||||
resize(n + (end - start));
|
||||
register void* result = end;
|
||||
end += n;
|
||||
return result;
|
||||
}
|
||||
|
||||
void* BOOST_REGEX_CALL insert(size_type pos, size_type n);
|
||||
|
||||
size_type BOOST_REGEX_CALL size()
|
||||
{
|
||||
return end - start;
|
||||
}
|
||||
|
||||
size_type BOOST_REGEX_CALL capacity()
|
||||
{
|
||||
return alloc_inst.last - start;
|
||||
}
|
||||
|
||||
void* BOOST_REGEX_CALL data()const
|
||||
{
|
||||
return start;
|
||||
}
|
||||
|
||||
size_type BOOST_REGEX_CALL index(void* ptr)
|
||||
{
|
||||
return reinterpret_cast<unsigned char*>(ptr) - reinterpret_cast<unsigned char*>(data());
|
||||
}
|
||||
|
||||
void BOOST_REGEX_CALL clear()
|
||||
{
|
||||
end = start;
|
||||
}
|
||||
|
||||
void BOOST_REGEX_CALL align()
|
||||
{
|
||||
// move end up to a boundary:
|
||||
end = reinterpret_cast<unsigned char*>(start) + (((reinterpret_cast<unsigned char*>(end) - reinterpret_cast<unsigned char*>(start)) + padding_mask) & ~padding_mask);
|
||||
}
|
||||
|
||||
Allocator BOOST_REGEX_CALL allocator()const;
|
||||
};
|
||||
|
||||
template <class Allocator>
|
||||
raw_storage<Allocator>::raw_storage(const Allocator& a)
|
||||
: alloc_inst(a)
|
||||
{
|
||||
start = end = alloc_inst.allocate(1024);
|
||||
BOOST_REGEX_NOEH_ASSERT(start)
|
||||
alloc_inst.last = start + 1024;
|
||||
}
|
||||
|
||||
template <class Allocator>
|
||||
raw_storage<Allocator>::raw_storage(size_type n, const Allocator& a)
|
||||
: alloc_inst(a)
|
||||
{
|
||||
start = end = alloc_inst.allocate(n);
|
||||
BOOST_REGEX_NOEH_ASSERT(start)
|
||||
alloc_inst.last = start + n;
|
||||
}
|
||||
|
||||
template <class Allocator>
|
||||
Allocator BOOST_REGEX_CALL raw_storage<Allocator>::allocator()const
|
||||
{
|
||||
return alloc_inst;
|
||||
}
|
||||
|
||||
template <class Allocator>
|
||||
void BOOST_REGEX_CALL raw_storage<Allocator>::resize(size_type n)
|
||||
{
|
||||
register size_type newsize = (alloc_inst.last - start) * 2;
|
||||
register size_type datasize = end - start;
|
||||
if(newsize < n)
|
||||
newsize = n;
|
||||
// extend newsize to WORD/DWORD boundary:
|
||||
newsize = (newsize + padding_mask) & ~(padding_mask);
|
||||
|
||||
// allocate and copy data:
|
||||
register unsigned char* ptr = alloc_inst.allocate(newsize);
|
||||
BOOST_REGEX_NOEH_ASSERT(ptr)
|
||||
std::memcpy(ptr, start, datasize);
|
||||
|
||||
// get rid of old buffer:
|
||||
alloc_inst.deallocate(start, (alloc_inst.last - start));
|
||||
|
||||
// and set up pointers:
|
||||
start = ptr;
|
||||
end = ptr + datasize;
|
||||
alloc_inst.last = ptr + newsize;
|
||||
}
|
||||
|
||||
template <class Allocator>
|
||||
void* BOOST_REGEX_CALL raw_storage<Allocator>::insert(size_type pos, size_type n)
|
||||
{
|
||||
jm_assert(pos <= size_type(end - start));
|
||||
if(size_type(alloc_inst.last - end) < n)
|
||||
resize(n + (end - start));
|
||||
register void* result = start + pos;
|
||||
std::memmove(start + pos + n, start + pos, (end - start) - pos);
|
||||
end += n;
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_split.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Implements regex_split and associated functions.
|
||||
* Note this is an internal header file included
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_SPLIT_HPP
|
||||
#define BOOST_REGEX_SPLIT_HPP
|
||||
|
||||
namespace boost{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a8 -b -Vx -Ve -pc
|
||||
#endif
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
template <class charT>
|
||||
const reg_expression<charT>& get_default_expression(charT)
|
||||
{
|
||||
static const charT expression_text[4] = { '\\', 's', '+', '\00', };
|
||||
static const reg_expression<charT> e(expression_text);
|
||||
return e;
|
||||
}
|
||||
|
||||
template <class OutputIterator, class charT, class Traits1, class Alloc1, class Alloc2>
|
||||
class split_pred
|
||||
{
|
||||
typedef std::basic_string<charT, Traits1, Alloc1> string_type;
|
||||
typedef typename string_type::const_iterator iterator_type;
|
||||
iterator_type* p_last;
|
||||
OutputIterator* p_out;
|
||||
std::size_t* p_max;
|
||||
std::size_t initial_max;
|
||||
public:
|
||||
split_pred(iterator_type* a, OutputIterator* b, std::size_t* c)
|
||||
: p_last(a), p_out(b), p_max(c), initial_max(*c) {}
|
||||
|
||||
bool operator()(const match_results<iterator_type, Alloc2>& what);
|
||||
};
|
||||
|
||||
template <class OutputIterator, class charT, class Traits1, class Alloc1, class Alloc2>
|
||||
bool split_pred<OutputIterator, charT, Traits1, Alloc1, Alloc2>::operator()
|
||||
(const match_results<iterator_type, Alloc2>& what)
|
||||
{
|
||||
*p_last = what[0].second;
|
||||
if(what.size() > 1)
|
||||
{
|
||||
// output sub-expressions only:
|
||||
for(unsigned i = 1; i < what.size(); ++i)
|
||||
{
|
||||
*(*p_out) = static_cast<string_type>(what[i]);
|
||||
++(*p_out);
|
||||
if(0 == --*p_max) return false;
|
||||
}
|
||||
return *p_max != 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// output $` only if it's not-null or not at the start of the input:
|
||||
const sub_match<iterator_type>& sub = what[-1];
|
||||
if((sub.first != sub.second) || (*p_max != initial_max))
|
||||
{
|
||||
*(*p_out) = static_cast<string_type>(sub);
|
||||
++(*p_out);
|
||||
return --*p_max;
|
||||
}
|
||||
}
|
||||
//
|
||||
// initial null, do nothing:
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2, class Alloc2>
|
||||
std::size_t regex_split(OutputIterator out,
|
||||
std::basic_string<charT, Traits1, Alloc1>& s,
|
||||
const reg_expression<charT, Traits2, Alloc2>& e,
|
||||
unsigned flags,
|
||||
std::size_t max_split)
|
||||
{
|
||||
typedef typename std::basic_string<charT, Traits1, Alloc1>::const_iterator ci_t;
|
||||
ci_t last = s.begin();
|
||||
std::size_t init_size = max_split;
|
||||
re_detail::split_pred<OutputIterator, charT, Traits1, Alloc1, Alloc2> pred(&last, &out, &max_split);
|
||||
ci_t i, j;
|
||||
i = s.begin();
|
||||
j = s.end();
|
||||
regex_grep(pred, i, j, e, flags);
|
||||
//
|
||||
// if there is still input left, do a final push as long as max_split
|
||||
// is not exhausted, and we're not splitting sub-expressions rather
|
||||
// than whitespace:
|
||||
if(max_split && (last != s.end()) && (e.mark_count() == 1))
|
||||
{
|
||||
*out = std::basic_string<charT, Traits1, Alloc1>((ci_t)last, (ci_t)s.end());
|
||||
++out;
|
||||
last = s.end();
|
||||
--max_split;
|
||||
}
|
||||
//
|
||||
// delete from the string everything that has been processed so far:
|
||||
s.erase(0, last - s.begin());
|
||||
//
|
||||
// return the number of new records pushed:
|
||||
return init_size - max_split;
|
||||
}
|
||||
|
||||
template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2, class Alloc2>
|
||||
inline std::size_t regex_split(OutputIterator out,
|
||||
std::basic_string<charT, Traits1, Alloc1>& s,
|
||||
const reg_expression<charT, Traits2, Alloc2>& e,
|
||||
unsigned flags = match_default)
|
||||
{
|
||||
return regex_split(out, s, e, flags, UINT_MAX);
|
||||
}
|
||||
|
||||
template <class OutputIterator, class charT, class Traits1, class Alloc1>
|
||||
inline std::size_t regex_split(OutputIterator out,
|
||||
std::basic_string<charT, Traits1, Alloc1>& s)
|
||||
{
|
||||
return regex_split(out, s, re_detail::get_default_expression(charT(0)), match_default, UINT_MAX);
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_stack.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Implements customised internal regex stacks.
|
||||
* Note this is an internal header file included
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_STACK_HPP
|
||||
#define BOOST_REGEX_STACK_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_RAW_BUFFER_HPP
|
||||
#include <boost/regex/v3/regex_raw_buffer.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a8 -b -Vx -Ve -pc
|
||||
#endif
|
||||
|
||||
//
|
||||
// class jstack
|
||||
// simplified stack optimised for push/peek/pop
|
||||
// operations, we could use std::stack<std::vector<T>> instead...
|
||||
//
|
||||
template <class T, class Allocator = BOOST_DEFAULT_ALLOCATOR(T) >
|
||||
class jstack
|
||||
{
|
||||
private:
|
||||
typedef typename boost::detail::rebind_allocator<unsigned char, Allocator>::type allocator_type;
|
||||
typedef typename boost::detail::rebind_allocator<T, Allocator>::type T_alloc_type;
|
||||
typedef typename T_alloc_type::size_type size_type;
|
||||
typedef T value_type;
|
||||
struct node
|
||||
{
|
||||
node* next;
|
||||
T* start; // first item
|
||||
T* end; // last item
|
||||
T* last; // end of storage
|
||||
};
|
||||
|
||||
//
|
||||
// empty base member optimisation:
|
||||
struct data : public allocator_type
|
||||
{
|
||||
padding buf[(sizeof(T) * 16 + sizeof(padding) - 1) / sizeof(padding)];
|
||||
data(const Allocator& a) : allocator_type(a){}
|
||||
};
|
||||
|
||||
data alloc_inst;
|
||||
mutable node* m_stack;
|
||||
mutable node* unused;
|
||||
node base;
|
||||
size_type block_size;
|
||||
|
||||
void BOOST_REGEX_CALL pop_aux()const;
|
||||
void BOOST_REGEX_CALL push_aux();
|
||||
|
||||
public:
|
||||
jstack(size_type n = 64, const Allocator& a = Allocator());
|
||||
|
||||
~jstack();
|
||||
|
||||
node* BOOST_REGEX_CALL get_node()
|
||||
{
|
||||
node* new_stack = reinterpret_cast<node*>(alloc_inst.allocate(sizeof(node) + sizeof(T) * block_size));
|
||||
BOOST_REGEX_NOEH_ASSERT(new_stack)
|
||||
new_stack->last = reinterpret_cast<T*>(new_stack+1);
|
||||
new_stack->start = new_stack->end = new_stack->last + block_size;
|
||||
new_stack->next = 0;
|
||||
return new_stack;
|
||||
}
|
||||
|
||||
bool BOOST_REGEX_CALL empty()
|
||||
{
|
||||
return (m_stack->start == m_stack->end) && (m_stack->next == 0);
|
||||
}
|
||||
|
||||
bool BOOST_REGEX_CALL good()
|
||||
{
|
||||
return (m_stack->start != m_stack->end) || (m_stack->next != 0);
|
||||
}
|
||||
|
||||
T& BOOST_REGEX_CALL peek()
|
||||
{
|
||||
if(m_stack->start == m_stack->end)
|
||||
pop_aux();
|
||||
return *m_stack->end;
|
||||
}
|
||||
|
||||
const T& BOOST_REGEX_CALL peek()const
|
||||
{
|
||||
if(m_stack->start == m_stack->end)
|
||||
pop_aux();
|
||||
return *m_stack->end;
|
||||
}
|
||||
|
||||
void BOOST_REGEX_CALL pop()
|
||||
{
|
||||
if(m_stack->start == m_stack->end)
|
||||
pop_aux();
|
||||
::boost::re_detail::pointer_destroy(m_stack->end);
|
||||
++(m_stack->end);
|
||||
}
|
||||
|
||||
void BOOST_REGEX_CALL pop(T& t)
|
||||
{
|
||||
if(m_stack->start == m_stack->end)
|
||||
pop_aux();
|
||||
t = *m_stack->end;
|
||||
::boost::re_detail::pointer_destroy(m_stack->end);
|
||||
++(m_stack->end);
|
||||
}
|
||||
|
||||
void BOOST_REGEX_CALL push(const T& t)
|
||||
{
|
||||
if(m_stack->end == m_stack->last)
|
||||
push_aux();
|
||||
--(m_stack->end);
|
||||
pointer_construct(m_stack->end, t);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
template <class T, class Allocator>
|
||||
jstack<T, Allocator>::jstack(size_type n, const Allocator& a)
|
||||
: alloc_inst(a)
|
||||
{
|
||||
unused = 0;
|
||||
block_size = n;
|
||||
m_stack = &base;
|
||||
base.last = reinterpret_cast<T*>(alloc_inst.buf);
|
||||
base.end = base.start = base.last + 16;
|
||||
base.next = 0;
|
||||
}
|
||||
|
||||
template <class T, class Allocator>
|
||||
void BOOST_REGEX_CALL jstack<T, Allocator>::push_aux()
|
||||
{
|
||||
// make sure we have spare space on TOS:
|
||||
register node* new_node;
|
||||
if(unused)
|
||||
{
|
||||
new_node = unused;
|
||||
unused = new_node->next;
|
||||
new_node->next = m_stack;
|
||||
m_stack = new_node;
|
||||
}
|
||||
else
|
||||
{
|
||||
new_node = get_node();
|
||||
new_node->next = m_stack;
|
||||
m_stack = new_node;
|
||||
}
|
||||
}
|
||||
|
||||
template <class T, class Allocator>
|
||||
void BOOST_REGEX_CALL jstack<T, Allocator>::pop_aux()const
|
||||
{
|
||||
// make sure that we have a valid item
|
||||
// on TOS:
|
||||
jm_assert(m_stack->next);
|
||||
register node* p = m_stack;
|
||||
m_stack = p->next;
|
||||
p->next = unused;
|
||||
unused = p;
|
||||
}
|
||||
|
||||
template <class T, class Allocator>
|
||||
jstack<T, Allocator>::~jstack()
|
||||
{
|
||||
node* condemned;
|
||||
while(good())
|
||||
pop();
|
||||
while(unused)
|
||||
{
|
||||
condemned = unused;
|
||||
unused = unused->next;
|
||||
alloc_inst.deallocate(reinterpret_cast<unsigned char*>(condemned), sizeof(node) + sizeof(T) * block_size);
|
||||
}
|
||||
while(m_stack != &base)
|
||||
{
|
||||
condemned = m_stack;
|
||||
m_stack = m_stack->next;
|
||||
alloc_inst.deallocate(reinterpret_cast<unsigned char*>(condemned), sizeof(node) + sizeof(T) * block_size);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_synch.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Thread synchronisation for regex code.
|
||||
* Note this is an internal header file included
|
||||
* by regex.hpp, do not include on its own.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_SYNCH_HPP
|
||||
#define BOOST_REGEX_SYNCH_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_THREADS)
|
||||
# if defined(BOOST_HAS_WINTHREADS)
|
||||
# include <windows.h>
|
||||
# elif defined(BOOST_HAS_BETHREADS)
|
||||
# include <OS.h>
|
||||
# include <cassert>
|
||||
# elif defined(BOOST_HAS_PTHREADS)
|
||||
# include <pthread.h>
|
||||
# else
|
||||
# error "Unknown threading API"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a8 -b -Vx -Ve -pc
|
||||
#endif
|
||||
|
||||
void BOOST_REGEX_CALL re_init_threads();
|
||||
void BOOST_REGEX_CALL re_free_threads();
|
||||
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
|
||||
# ifdef BOOST_HAS_BETHREADS
|
||||
|
||||
typedef sem_id CRITICAL_SECTION;
|
||||
|
||||
inline void BOOST_REGEX_CALL InitializeCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
*ps = create_sem(1, "regex++");
|
||||
assert(*ps > 0);
|
||||
}
|
||||
|
||||
inline void BOOST_REGEX_CALL DeleteCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
int t = delete_sem(*ps);
|
||||
assert(t == B_NO_ERROR);
|
||||
}
|
||||
|
||||
inline void BOOST_REGEX_CALL EnterCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
status_t t = acquire_sem(*ps);
|
||||
assert(t == B_NO_ERROR);
|
||||
}
|
||||
|
||||
inline void BOOST_REGEX_CALL LeaveCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
status_t t = release_sem(*ps);
|
||||
assert(t == B_NO_ERROR);
|
||||
}
|
||||
|
||||
# elif defined(BOOST_HAS_PTHREADS)
|
||||
|
||||
typedef pthread_mutex_t CRITICAL_SECTION;
|
||||
|
||||
inline void BOOST_REGEX_CALL InitializeCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
pthread_mutex_init(ps, 0);
|
||||
}
|
||||
|
||||
inline void BOOST_REGEX_CALL DeleteCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
pthread_mutex_destroy(ps);
|
||||
}
|
||||
|
||||
inline void BOOST_REGEX_CALL EnterCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
pthread_mutex_lock(ps);
|
||||
}
|
||||
|
||||
inline void BOOST_REGEX_CALL LeaveCriticalSection(CRITICAL_SECTION* ps)
|
||||
{
|
||||
pthread_mutex_unlock(ps);
|
||||
}
|
||||
|
||||
# elif !defined(BOOST_HAS_WINTHREADS)
|
||||
# error "Unknown threading API"
|
||||
# endif
|
||||
|
||||
template <class Lock>
|
||||
class lock_guard
|
||||
{
|
||||
typedef Lock lock_type;
|
||||
public:
|
||||
lock_guard(lock_type& m, bool aq = true)
|
||||
: mut(m), owned(false){ acquire(aq); }
|
||||
|
||||
~lock_guard()
|
||||
{ acquire(false); }
|
||||
|
||||
void BOOST_REGEX_CALL acquire(bool aq = true)
|
||||
{
|
||||
if(aq && !owned)
|
||||
{
|
||||
mut.acquire(true);
|
||||
owned = true;
|
||||
}
|
||||
else if(!aq && owned)
|
||||
{
|
||||
mut.acquire(false);
|
||||
owned = false;
|
||||
}
|
||||
}
|
||||
private:
|
||||
lock_type& mut;
|
||||
bool owned;
|
||||
// VC6 warning suppression:
|
||||
lock_guard& operator=(const lock_guard&);
|
||||
};
|
||||
|
||||
|
||||
class critical_section
|
||||
{
|
||||
public:
|
||||
critical_section()
|
||||
{ InitializeCriticalSection(&hmutex);}
|
||||
|
||||
critical_section(const critical_section&)
|
||||
{ InitializeCriticalSection(&hmutex);}
|
||||
|
||||
const critical_section& BOOST_REGEX_CALL operator=(const critical_section&)
|
||||
{return *this;}
|
||||
|
||||
~critical_section()
|
||||
{DeleteCriticalSection(&hmutex);}
|
||||
|
||||
private:
|
||||
|
||||
void BOOST_REGEX_CALL acquire(bool aq)
|
||||
{ if(aq) EnterCriticalSection(&hmutex);
|
||||
else LeaveCriticalSection(&hmutex);
|
||||
}
|
||||
|
||||
CRITICAL_SECTION hmutex;
|
||||
|
||||
public:
|
||||
typedef lock_guard<critical_section> ro_guard;
|
||||
typedef lock_guard<critical_section> rw_guard;
|
||||
|
||||
friend class lock_guard<critical_section>;
|
||||
};
|
||||
|
||||
inline bool BOOST_REGEX_CALL operator==(const critical_section&, const critical_section&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
inline bool BOOST_REGEX_CALL operator<(const critical_section&, const critical_section&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef lock_guard<critical_section> cs_guard;
|
||||
|
||||
BOOST_REGEX_DECL extern critical_section* p_re_lock;
|
||||
BOOST_REGEX_DECL extern unsigned int re_lock_count;
|
||||
|
||||
#define BOOST_REGEX_GUARD(inst) boost::re_detail::critical_section::rw_guard g(inst);
|
||||
|
||||
#else // BOOST_HAS_THREADS
|
||||
|
||||
#define BOOST_REGEX_GUARD(inst)
|
||||
|
||||
#endif // BOOST_HAS_THREADS
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // sentry
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,815 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_traits.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares regular expression traits classes.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_TRAITS_HPP_INCLUDED
|
||||
#define BOOST_REGEX_TRAITS_HPP_INCLUDED
|
||||
|
||||
#ifndef BOOST_RE_CREGEX_HPP
|
||||
#include <boost/cregex.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_CSTRING_HPP
|
||||
#include <boost/regex/v3/regex_cstring.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a8 -b -Vx -Ve -pc
|
||||
#endif
|
||||
|
||||
template <class charT>
|
||||
class c_regex_traits;
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
struct mss
|
||||
{
|
||||
unsigned int id;
|
||||
const char* what;
|
||||
};
|
||||
|
||||
BOOST_REGEX_DECL bool BOOST_REGEX_CALL re_lookup_def_collate_name(std::string& buf, const char* name);
|
||||
BOOST_REGEX_DECL std::size_t BOOST_REGEX_CALL re_get_default_message(char* buf, std::size_t len, std::size_t id);
|
||||
extern BOOST_REGEX_DECL const char *re_default_error_messages[];
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
extern BOOST_REGEX_DECL wchar_t wide_lower_case_map[];
|
||||
extern BOOST_REGEX_DECL unsigned short wide_unicode_classes[];
|
||||
BOOST_REGEX_DECL bool BOOST_REGEX_CALL is_combining(wchar_t c);
|
||||
#endif
|
||||
|
||||
|
||||
struct BOOST_REGEX_DECL regex_traits_base
|
||||
{
|
||||
enum char_syntax_type
|
||||
{
|
||||
syntax_char = 0,
|
||||
syntax_open_bracket = 1, // (
|
||||
syntax_close_bracket = 2, // )
|
||||
syntax_dollar = 3, // $
|
||||
syntax_caret = 4, // ^
|
||||
syntax_dot = 5, // .
|
||||
syntax_star = 6, // *
|
||||
syntax_plus = 7, // +
|
||||
syntax_question = 8, // ?
|
||||
syntax_open_set = 9, // [
|
||||
syntax_close_set = 10, // ]
|
||||
syntax_or = 11, // |
|
||||
syntax_slash = 12, //
|
||||
syntax_hash = 13, // #
|
||||
syntax_dash = 14, // -
|
||||
syntax_open_brace = 15, // {
|
||||
syntax_close_brace = 16, // }
|
||||
syntax_digit = 17, // 0-9
|
||||
syntax_b = 18, // for \b
|
||||
syntax_B = 19, // for \B
|
||||
syntax_left_word = 20, // for \<
|
||||
syntax_right_word = 21, // for \>
|
||||
syntax_w = 22, // for \w
|
||||
syntax_W = 23, // for \W
|
||||
syntax_start_buffer = 24, // for \`
|
||||
syntax_end_buffer = 25, // for \'
|
||||
syntax_newline = 26, // for newline alt
|
||||
syntax_comma = 27, // for {x,y}
|
||||
|
||||
syntax_a = 28, // for \a
|
||||
syntax_f = 29, // for \f
|
||||
syntax_n = 30, // for \n
|
||||
syntax_r = 31, // for \r
|
||||
syntax_t = 32, // for \t
|
||||
syntax_v = 33, // for \v
|
||||
syntax_x = 34, // for \xdd
|
||||
syntax_c = 35, // for \cx
|
||||
syntax_colon = 36, // for [:...:]
|
||||
syntax_equal = 37, // for [=...=]
|
||||
|
||||
// perl ops:
|
||||
syntax_e = 38, // for \e
|
||||
syntax_l = 39, // for \l
|
||||
syntax_L = 40, // for \L
|
||||
syntax_u = 41, // for \u
|
||||
syntax_U = 42, // for \U
|
||||
syntax_s = 43, // for \s
|
||||
syntax_S = 44, // for \S
|
||||
syntax_d = 45, // for \d
|
||||
syntax_D = 46, // for \D
|
||||
syntax_E = 47, // for \Q\E
|
||||
syntax_Q = 48, // for \Q\E
|
||||
syntax_X = 49, // for \X
|
||||
syntax_C = 50, // for \C
|
||||
syntax_Z = 51, // for \Z
|
||||
syntax_G = 52, // for \G
|
||||
|
||||
// new extentions:
|
||||
syntax_not = 53, // for (?!...)
|
||||
|
||||
syntax_max = 54
|
||||
};
|
||||
#ifdef __BORLANDC__
|
||||
private:
|
||||
char dummy_member;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct BOOST_REGEX_DECL c_traits_base : public regex_traits_base
|
||||
{
|
||||
public:
|
||||
enum{
|
||||
char_class_none = 0,
|
||||
char_class_alpha = 0x0001,
|
||||
char_class_cntrl = 0x0002,
|
||||
char_class_digit = 0x0004,
|
||||
char_class_lower = 0x0008,
|
||||
char_class_punct = 0x0010,
|
||||
char_class_space = 0x0020,
|
||||
char_class_upper = 0x0040,
|
||||
char_class_xdigit = 0x0080,
|
||||
char_class_blank = 0x0100,
|
||||
char_class_underscore = 0x4000,
|
||||
char_class_unicode = 0x8000,
|
||||
|
||||
char_class_alnum = char_class_alpha | char_class_digit,
|
||||
char_class_graph = char_class_alpha | char_class_digit | char_class_punct | char_class_underscore,
|
||||
char_class_print = char_class_alpha | char_class_digit | char_class_punct | char_class_underscore | char_class_blank,
|
||||
char_class_word = char_class_alpha | char_class_digit | char_class_underscore
|
||||
};
|
||||
static std::string BOOST_REGEX_CALL set_message_catalogue(const std::string& s);
|
||||
protected:
|
||||
#if defined(__MWERKS__) && __MWERKS__ <= 0x6000
|
||||
friend class c_regex_traits<char>;
|
||||
friend class c_regex_traits<wchar_t>;
|
||||
#endif
|
||||
|
||||
static char regex_message_catalogue[BOOST_REGEX_MAX_PATH];
|
||||
enum syntax_map_size
|
||||
{
|
||||
map_size = UCHAR_MAX + 1
|
||||
};
|
||||
|
||||
static unsigned char syntax_map[map_size];
|
||||
static unsigned short class_map[map_size];
|
||||
static char lower_case_map[map_size];
|
||||
|
||||
static boost::uint_fast32_t BOOST_REGEX_CALL do_lookup_class(const char* p);
|
||||
static bool BOOST_REGEX_CALL do_lookup_collate(std::string& buf, const char* p);
|
||||
static void BOOST_REGEX_CALL do_update_ctype();
|
||||
static void BOOST_REGEX_CALL do_update_collate();
|
||||
public:
|
||||
static std::string BOOST_REGEX_CALL error_string(unsigned id);
|
||||
static char* BOOST_REGEX_CALL get_catalogue() { return regex_message_catalogue; }
|
||||
};
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
|
||||
template<>
|
||||
class BOOST_REGEX_DECL c_regex_traits<char> : public re_detail::c_traits_base
|
||||
{
|
||||
typedef re_detail::c_traits_base base_type;
|
||||
public:
|
||||
typedef char char_type;
|
||||
typedef unsigned char uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef std::string string_type;
|
||||
typedef int locale_type;
|
||||
|
||||
static std::size_t BOOST_REGEX_CALL length(const char_type* p)
|
||||
{
|
||||
return std::strlen(p);
|
||||
}
|
||||
static unsigned int BOOST_REGEX_CALL syntax_type(size_type c)
|
||||
{
|
||||
return syntax_map[c];
|
||||
}
|
||||
static char BOOST_REGEX_CALL translate(char c, bool icase)
|
||||
{
|
||||
return icase ? lower_case_map[(size_type)(uchar_type)c] : c;
|
||||
}
|
||||
static void BOOST_REGEX_CALL transform(std::string& out, const std::string& in);
|
||||
|
||||
static void BOOST_REGEX_CALL transform_primary(std::string& out, const std::string& in);
|
||||
|
||||
static bool BOOST_REGEX_CALL is_separator(char c)
|
||||
{
|
||||
return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r'));
|
||||
}
|
||||
|
||||
static bool BOOST_REGEX_CALL is_combining(char)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool BOOST_REGEX_CALL is_class(char c, boost::uint_fast32_t f)
|
||||
{
|
||||
return BOOST_REGEX_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
|
||||
}
|
||||
|
||||
static int BOOST_REGEX_CALL toi(char c);
|
||||
static int BOOST_REGEX_CALL toi(const char*& first, const char* last, int radix);
|
||||
|
||||
static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const char* first, const char* last)
|
||||
{
|
||||
std::string s(first, last);
|
||||
return do_lookup_class(s.c_str());
|
||||
}
|
||||
|
||||
static bool BOOST_REGEX_CALL lookup_collatename(std::string& buf, const char* first, const char* last)
|
||||
{
|
||||
std::string s(first, last);
|
||||
return do_lookup_collate(buf, s.c_str());
|
||||
}
|
||||
|
||||
static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
|
||||
|
||||
c_regex_traits()
|
||||
{
|
||||
init();
|
||||
}
|
||||
~c_regex_traits()
|
||||
{
|
||||
m_free();
|
||||
}
|
||||
struct sentry
|
||||
{
|
||||
sentry(const c_regex_traits<char>&)
|
||||
{ c_regex_traits<char>::update(); }
|
||||
operator void*() { return this; }
|
||||
};
|
||||
static void BOOST_REGEX_CALL update();
|
||||
private:
|
||||
static void BOOST_REGEX_CALL init();
|
||||
static void BOOST_REGEX_CALL m_free();
|
||||
static c_regex_traits<char> i;
|
||||
|
||||
static unsigned sort_type;
|
||||
static char sort_delim;
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
template<>
|
||||
class BOOST_REGEX_DECL c_regex_traits<wchar_t> : public re_detail::c_traits_base
|
||||
{
|
||||
typedef re_detail::c_traits_base base_type;
|
||||
public:
|
||||
typedef wchar_t char_type;
|
||||
typedef unsigned short uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef std::basic_string<wchar_t> string_type;
|
||||
typedef int locale_type;
|
||||
static std::size_t BOOST_REGEX_CALL length(const char_type* p)
|
||||
{
|
||||
return std::wcslen(p);
|
||||
}
|
||||
static unsigned int BOOST_REGEX_CALL syntax_type(size_type c);
|
||||
static wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool icase)
|
||||
{
|
||||
return icase ? ((c < 256) ? re_detail::wide_lower_case_map[(uchar_type)c] : std::towlower(c)) : c;
|
||||
}
|
||||
|
||||
static void BOOST_REGEX_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
|
||||
static void BOOST_REGEX_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
|
||||
static bool BOOST_REGEX_CALL is_separator(wchar_t c)
|
||||
{
|
||||
return BOOST_REGEX_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
|
||||
}
|
||||
|
||||
static bool BOOST_REGEX_CALL is_combining(wchar_t c)
|
||||
{ return re_detail::is_combining(c); }
|
||||
|
||||
static bool BOOST_REGEX_CALL is_class(wchar_t c, boost::uint_fast32_t f)
|
||||
{
|
||||
return BOOST_REGEX_MAKE_BOOL(((uchar_type)c < 256) ? (re_detail::wide_unicode_classes[(size_type)(uchar_type)c] & f) : do_iswclass(c, f));
|
||||
}
|
||||
|
||||
static int BOOST_REGEX_CALL toi(wchar_t c);
|
||||
static int BOOST_REGEX_CALL toi(const wchar_t*& first, const wchar_t* last, int radix);
|
||||
|
||||
static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
|
||||
|
||||
static bool BOOST_REGEX_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last);
|
||||
|
||||
static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
|
||||
c_regex_traits<wchar_t>()
|
||||
{ init(); }
|
||||
~c_regex_traits<wchar_t>()
|
||||
{ m_free(); }
|
||||
struct sentry
|
||||
{
|
||||
sentry(const c_regex_traits<wchar_t>&)
|
||||
{ c_regex_traits<wchar_t>::update(); }
|
||||
operator void*() { return this; }
|
||||
};
|
||||
static void BOOST_REGEX_CALL update();
|
||||
static std::size_t BOOST_REGEX_CALL strnarrow(char *s1, std::size_t len, const wchar_t *s2);
|
||||
static std::size_t BOOST_REGEX_CALL strwiden(wchar_t *s1, std::size_t len, const char *s2);
|
||||
private:
|
||||
static bool BOOST_REGEX_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f);
|
||||
static void BOOST_REGEX_CALL m_free();
|
||||
static void BOOST_REGEX_CALL init();
|
||||
static bool BOOST_REGEX_CALL do_lookup_collate(std::basic_string<wchar_t>& out, const wchar_t* first, const wchar_t* last);
|
||||
static c_regex_traits<wchar_t> init_;
|
||||
|
||||
static unsigned sort_type;
|
||||
static wchar_t sort_delim;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
struct BOOST_REGEX_DECL w32_traits_base : public regex_traits_base
|
||||
{
|
||||
enum{
|
||||
char_class_none = 0,
|
||||
char_class_alnum = C1_ALPHA | C1_DIGIT,
|
||||
char_class_alpha = C1_ALPHA,
|
||||
char_class_cntrl = C1_CNTRL,
|
||||
char_class_digit = C1_DIGIT,
|
||||
char_class_graph = C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_ALPHA,
|
||||
char_class_lower = C1_LOWER,
|
||||
char_class_print = C1_UPPER | C1_LOWER | C1_DIGIT | C1_PUNCT | C1_BLANK | C1_ALPHA,
|
||||
char_class_punct = C1_PUNCT,
|
||||
char_class_space = C1_SPACE,
|
||||
char_class_upper = C1_UPPER,
|
||||
char_class_xdigit = C1_XDIGIT,
|
||||
char_class_blank = C1_BLANK,
|
||||
char_class_underscore = 0x4000,
|
||||
char_class_word = C1_ALPHA | C1_DIGIT | char_class_underscore,
|
||||
char_class_unicode = 0x8000,
|
||||
char_class_win = 0x01FF
|
||||
};
|
||||
|
||||
|
||||
public:
|
||||
static std::string BOOST_REGEX_CALL set_message_catalogue(const std::string& s);
|
||||
protected:
|
||||
static char regex_message_catalogue[BOOST_REGEX_MAX_PATH];
|
||||
enum syntax_map_size
|
||||
{
|
||||
map_size = UCHAR_MAX + 1
|
||||
};
|
||||
|
||||
static unsigned char syntax_map[map_size];
|
||||
static unsigned short class_map[map_size];
|
||||
static char lower_case_map[map_size];
|
||||
|
||||
static boost::uint_fast32_t BOOST_REGEX_CALL do_lookup_class(const char* p);
|
||||
static bool BOOST_REGEX_CALL do_lookup_collate(std::string& buf, const char* p);
|
||||
static void BOOST_REGEX_CALL do_free();
|
||||
static void BOOST_REGEX_CALL do_init();
|
||||
public:
|
||||
static std::string BOOST_REGEX_CALL error_string(unsigned id);
|
||||
static char* BOOST_REGEX_CALL get_catalogue() { return regex_message_catalogue; }
|
||||
};
|
||||
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
template<class charT>
|
||||
class w32_regex_traits;
|
||||
|
||||
template<>
|
||||
class BOOST_REGEX_DECL w32_regex_traits<char> : public re_detail::w32_traits_base
|
||||
{
|
||||
typedef re_detail::w32_traits_base base_type;
|
||||
public:
|
||||
typedef char char_type;
|
||||
typedef unsigned char uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef std::string string_type;
|
||||
typedef int locale_type;
|
||||
|
||||
static std::size_t BOOST_REGEX_CALL length(const char_type* p)
|
||||
{
|
||||
return std::strlen(p);
|
||||
}
|
||||
static unsigned int BOOST_REGEX_CALL syntax_type(size_type c)
|
||||
{
|
||||
return syntax_map[c];
|
||||
}
|
||||
static char BOOST_REGEX_CALL translate(char c, bool icase)
|
||||
{
|
||||
return icase ? lower_case_map[(size_type)(uchar_type)c] : c;
|
||||
}
|
||||
static void BOOST_REGEX_CALL transform(std::string& out, const std::string& in);
|
||||
|
||||
static void BOOST_REGEX_CALL transform_primary(std::string& out, const std::string& in);
|
||||
|
||||
static bool BOOST_REGEX_CALL is_separator(char c)
|
||||
{
|
||||
return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r'));
|
||||
}
|
||||
|
||||
static bool BOOST_REGEX_CALL is_combining(char)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool BOOST_REGEX_CALL is_class(char c, boost::uint_fast32_t f)
|
||||
{
|
||||
return BOOST_REGEX_MAKE_BOOL(class_map[(size_type)(uchar_type)c] & f);
|
||||
}
|
||||
|
||||
static int BOOST_REGEX_CALL toi(char c);
|
||||
static int BOOST_REGEX_CALL toi(const char*& first, const char* last, int radix);
|
||||
|
||||
static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const char* first, const char* last)
|
||||
{
|
||||
std::string s(first, last);
|
||||
return do_lookup_class(s.c_str());
|
||||
}
|
||||
|
||||
static bool BOOST_REGEX_CALL lookup_collatename(std::string& buf, const char* first, const char* last)
|
||||
{
|
||||
std::string s(first, last);
|
||||
return do_lookup_collate(buf, s.c_str());
|
||||
}
|
||||
|
||||
static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
|
||||
|
||||
struct sentry
|
||||
{
|
||||
sentry(const w32_regex_traits<char>&)
|
||||
{ w32_regex_traits<char>::update(); }
|
||||
~sentry(){}
|
||||
operator void*() { return this; }
|
||||
};
|
||||
static void BOOST_REGEX_CALL update();
|
||||
w32_regex_traits();
|
||||
~w32_regex_traits();
|
||||
private:
|
||||
static w32_regex_traits<char> i;
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
template<>
|
||||
class BOOST_REGEX_DECL w32_regex_traits<wchar_t> : public re_detail::w32_traits_base
|
||||
{
|
||||
typedef re_detail::w32_traits_base base_type;
|
||||
public:
|
||||
typedef wchar_t char_type;
|
||||
typedef unsigned short uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef std::basic_string<wchar_t> string_type;
|
||||
typedef int locale_type;
|
||||
static std::size_t BOOST_REGEX_CALL length(const char_type* p)
|
||||
{
|
||||
return std::wcslen(p);
|
||||
}
|
||||
static unsigned int BOOST_REGEX_CALL syntax_type(size_type c);
|
||||
static wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool icase)
|
||||
{
|
||||
return icase ? ((c < 256) ? re_detail::wide_lower_case_map[(uchar_type)c] : wtolower(c)) : c;
|
||||
}
|
||||
|
||||
static void BOOST_REGEX_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
|
||||
static void BOOST_REGEX_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
|
||||
static bool BOOST_REGEX_CALL is_separator(wchar_t c)
|
||||
{
|
||||
return BOOST_REGEX_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
|
||||
}
|
||||
|
||||
static bool BOOST_REGEX_CALL is_combining(wchar_t c)
|
||||
{ return re_detail::is_combining(c); }
|
||||
|
||||
static bool BOOST_REGEX_CALL is_class(wchar_t c, boost::uint_fast32_t f)
|
||||
{
|
||||
return BOOST_REGEX_MAKE_BOOL(((uchar_type)c < 256) ? (wide_unicode_classes[(size_type)(uchar_type)c] & f) : do_iswclass(c, f));
|
||||
}
|
||||
|
||||
static int BOOST_REGEX_CALL toi(wchar_t c);
|
||||
static int BOOST_REGEX_CALL toi(const wchar_t*& first, const wchar_t* last, int radix);
|
||||
|
||||
static boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last);
|
||||
|
||||
static bool BOOST_REGEX_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last);
|
||||
|
||||
static locale_type BOOST_REGEX_CALL imbue(locale_type l){ return l; }
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return locale_type(); }
|
||||
|
||||
struct sentry
|
||||
{
|
||||
sentry(const w32_regex_traits<wchar_t>&)
|
||||
{ w32_regex_traits<wchar_t>::update(); }
|
||||
~sentry(){}
|
||||
operator void*() { return this; }
|
||||
};
|
||||
static void BOOST_REGEX_CALL update();
|
||||
w32_regex_traits();
|
||||
~w32_regex_traits();
|
||||
static std::size_t BOOST_REGEX_CALL strnarrow(char *s1, std::size_t len, const wchar_t *s2);
|
||||
static std::size_t BOOST_REGEX_CALL strwiden(wchar_t *s1, std::size_t len, const char *s2);
|
||||
|
||||
private:
|
||||
static bool BOOST_REGEX_CALL do_iswclass(wchar_t c, boost::uint_fast32_t f);
|
||||
static bool BOOST_REGEX_CALL do_lookup_collate(std::basic_string<wchar_t>& out, const wchar_t* first, const wchar_t* last);
|
||||
static w32_regex_traits<wchar_t> init_;
|
||||
static wchar_t BOOST_REGEX_CALL wtolower(wchar_t c);
|
||||
static unsigned short wide_unicode_classes[];
|
||||
};
|
||||
#endif // Wide strings
|
||||
#endif // Win32
|
||||
|
||||
#if !defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
|
||||
|
||||
} // namspace boost
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
#include <locale>
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -a4 -b -Ve -pc
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace re_detail
|
||||
{
|
||||
|
||||
template <class charT>
|
||||
struct message_data;
|
||||
|
||||
template <>
|
||||
struct message_data<char>;
|
||||
|
||||
template <>
|
||||
struct message_data<wchar_t>;
|
||||
|
||||
struct BOOST_REGEX_DECL cpp_regex_traits_base : public regex_traits_base
|
||||
{
|
||||
enum char_class_type
|
||||
{
|
||||
char_class_none = 0,
|
||||
char_class_alnum = std::ctype_base::alnum,
|
||||
char_class_alpha = std::ctype_base::alpha,
|
||||
char_class_cntrl = std::ctype_base::cntrl,
|
||||
char_class_digit = std::ctype_base::digit,
|
||||
char_class_graph = std::ctype_base::graph,
|
||||
char_class_lower = std::ctype_base::lower,
|
||||
char_class_print = std::ctype_base::print,
|
||||
char_class_punct = std::ctype_base::punct,
|
||||
char_class_space = std::ctype_base::space,
|
||||
char_class_upper = std::ctype_base::upper,
|
||||
char_class_xdigit = std::ctype_base::xdigit,
|
||||
char_class_blank = 1<<12,
|
||||
char_class_underscore = 1<<13,
|
||||
char_class_word = std::ctype_base::alnum | char_class_underscore,
|
||||
char_class_unicode = 1<<14,
|
||||
char_class_all_base = char_class_alnum | char_class_alpha | char_class_cntrl
|
||||
| char_class_digit | char_class_graph | char_class_lower
|
||||
| char_class_print | char_class_punct | char_class_space
|
||||
| char_class_upper | char_class_xdigit
|
||||
};
|
||||
|
||||
static std::string BOOST_REGEX_CALL set_message_catalogue(const std::string& s);
|
||||
protected:
|
||||
static char regex_message_cat[BOOST_REGEX_MAX_PATH];
|
||||
};
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
template <class charT>
|
||||
class cpp_regex_traits;
|
||||
|
||||
template<>
|
||||
class BOOST_REGEX_DECL cpp_regex_traits<char> : public re_detail::cpp_regex_traits_base
|
||||
{
|
||||
typedef re_detail::cpp_regex_traits_base base_type;
|
||||
private:
|
||||
re_detail::message_data<char>* pmd;
|
||||
const unsigned char* psyntax;
|
||||
char* lower_map;
|
||||
const std::ctype<char>* pctype;
|
||||
const std::collate<char>* pcollate;
|
||||
std::locale locale_inst;
|
||||
unsigned sort_type;
|
||||
char sort_delim;
|
||||
|
||||
cpp_regex_traits(const cpp_regex_traits&);
|
||||
cpp_regex_traits& operator=(const cpp_regex_traits&);
|
||||
|
||||
public:
|
||||
typedef char char_type;
|
||||
typedef unsigned char uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef std::string string_type;
|
||||
typedef std::locale locale_type;
|
||||
|
||||
cpp_regex_traits();
|
||||
~cpp_regex_traits();
|
||||
|
||||
void swap(cpp_regex_traits&);
|
||||
|
||||
static std::size_t BOOST_REGEX_CALL length(const char_type* p)
|
||||
{
|
||||
return std::strlen(p);
|
||||
}
|
||||
unsigned int BOOST_REGEX_CALL syntax_type(size_type c)const
|
||||
{
|
||||
return psyntax[c];
|
||||
}
|
||||
char BOOST_REGEX_CALL translate(char c, bool icase)const
|
||||
{
|
||||
return icase ? lower_map[(size_type)(uchar_type)c] : c;
|
||||
}
|
||||
void BOOST_REGEX_CALL transform(std::string& out, const std::string& in)const
|
||||
{
|
||||
out = pcollate->transform(in.c_str(), in.c_str() + in.size()).c_str();
|
||||
}
|
||||
|
||||
void BOOST_REGEX_CALL transform_primary(std::string& out, const std::string& in)const;
|
||||
|
||||
static bool BOOST_REGEX_CALL is_separator(char c)
|
||||
{
|
||||
return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r'));
|
||||
}
|
||||
|
||||
static bool BOOST_REGEX_CALL is_combining(char)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BOOST_REGEX_CALL is_class(char c, boost::uint_fast32_t f)const
|
||||
{
|
||||
if(pctype->is((std::ctype<char>::mask)(f & char_class_all_base), c))
|
||||
return true;
|
||||
if((f & char_class_underscore) && (c == '_'))
|
||||
return true;
|
||||
if((f & char_class_blank) && ((c == ' ') || (c == '\t')))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int BOOST_REGEX_CALL toi(char c)const;
|
||||
int BOOST_REGEX_CALL toi(const char*& first, const char* last, int radix)const;
|
||||
|
||||
boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const char* first, const char* last)const;
|
||||
bool BOOST_REGEX_CALL lookup_collatename(std::string& s, const char* first, const char* last)const;
|
||||
|
||||
std::string BOOST_REGEX_CALL error_string(unsigned id)const;
|
||||
locale_type BOOST_REGEX_CALL imbue(locale_type l);
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return locale_inst; }
|
||||
|
||||
struct sentry
|
||||
{
|
||||
sentry(const cpp_regex_traits<char>&){}
|
||||
operator void*() { return this; }
|
||||
};
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
template<>
|
||||
class BOOST_REGEX_DECL cpp_regex_traits<wchar_t> : public re_detail::cpp_regex_traits_base
|
||||
{
|
||||
typedef re_detail::cpp_regex_traits_base base_type;
|
||||
public:
|
||||
typedef wchar_t char_type;
|
||||
typedef unsigned short uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef std::basic_string<wchar_t> string_type;
|
||||
typedef std::locale locale_type;
|
||||
|
||||
private:
|
||||
re_detail::message_data<wchar_t>* pmd;
|
||||
const unsigned char* psyntax;
|
||||
wchar_t* lower_map;
|
||||
const std::ctype<wchar_t>* pctype;
|
||||
const std::collate<wchar_t>* pcollate;
|
||||
const std::codecvt<wchar_t, char, std::mbstate_t>* pcdv;
|
||||
std::locale locale_inst;
|
||||
unsigned int BOOST_REGEX_CALL do_syntax_type(size_type c)const;
|
||||
unsigned sort_type;
|
||||
wchar_t sort_delim;
|
||||
|
||||
cpp_regex_traits(const cpp_regex_traits&);
|
||||
cpp_regex_traits& operator=(const cpp_regex_traits&);
|
||||
|
||||
public:
|
||||
|
||||
static std::size_t BOOST_REGEX_CALL length(const char_type* p)
|
||||
{
|
||||
return std::wcslen(p);
|
||||
}
|
||||
unsigned int BOOST_REGEX_CALL syntax_type(size_type c)const
|
||||
{
|
||||
return (c < UCHAR_MAX) ? psyntax[c] : do_syntax_type(c);
|
||||
}
|
||||
wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool icase)const
|
||||
{
|
||||
return icase ? (((uchar_type)c) <= UCHAR_MAX) ? lower_map[c] : pctype->tolower(c) : c;
|
||||
}
|
||||
void BOOST_REGEX_CALL transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in)const
|
||||
{
|
||||
out = pcollate->transform(in.c_str(), in.c_str() + in.size());
|
||||
}
|
||||
|
||||
void BOOST_REGEX_CALL transform_primary(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in)const;
|
||||
|
||||
static bool BOOST_REGEX_CALL is_separator(wchar_t c)
|
||||
{
|
||||
return BOOST_REGEX_MAKE_BOOL((c == L'\n') || (c == L'\r') || (c == (wchar_t)0x2028) || (c == (wchar_t)0x2029));
|
||||
}
|
||||
|
||||
static bool BOOST_REGEX_CALL is_combining(wchar_t c)
|
||||
{ return re_detail::is_combining(c); }
|
||||
|
||||
bool BOOST_REGEX_CALL is_class(wchar_t c, boost::uint_fast32_t f)const
|
||||
{
|
||||
if(pctype->is((std::ctype<wchar_t>::mask)(f & char_class_all_base), c))
|
||||
return true;
|
||||
if((f & char_class_underscore) && (c == '_'))
|
||||
return true;
|
||||
if((f & char_class_blank) && ((c == ' ') || (c == '\t')))
|
||||
return true;
|
||||
if((f & char_class_unicode) && ((uchar_type)c > (uchar_type)255))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
int BOOST_REGEX_CALL toi(wchar_t c)const;
|
||||
int BOOST_REGEX_CALL toi(const wchar_t*& first, const wchar_t* last, int radix)const;
|
||||
|
||||
boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last)const;
|
||||
bool BOOST_REGEX_CALL lookup_collatename(std::basic_string<wchar_t>& s, const wchar_t* first, const wchar_t* last)const;
|
||||
|
||||
std::string BOOST_REGEX_CALL error_string(unsigned id)const;
|
||||
cpp_regex_traits();
|
||||
~cpp_regex_traits();
|
||||
locale_type BOOST_REGEX_CALL imbue(locale_type l);
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return locale_inst; }
|
||||
std::size_t BOOST_REGEX_CALL strwiden(wchar_t *s1, std::size_t len, const char *s2)const;
|
||||
void swap(cpp_regex_traits&);
|
||||
|
||||
struct sentry
|
||||
{
|
||||
sentry(const cpp_regex_traits<wchar_t>&){}
|
||||
operator void*() { return this; }
|
||||
};
|
||||
};
|
||||
#endif // BOOST_NO_WREGEX
|
||||
|
||||
#endif // BOOST_NO_STD_LOCALE
|
||||
|
||||
#ifdef BOOST_REGEX_USE_WIN32_LOCALE
|
||||
|
||||
template <class charT>
|
||||
class regex_traits : public w32_regex_traits<charT>
|
||||
{
|
||||
};
|
||||
|
||||
#elif defined(BOOST_REGEX_USE_C_LOCALE)
|
||||
|
||||
template <class charT>
|
||||
class regex_traits : public c_regex_traits<charT>
|
||||
{
|
||||
};
|
||||
|
||||
#elif defined(BOOST_REGEX_USE_CPP_LOCALE)
|
||||
|
||||
template <class charT>
|
||||
class regex_traits : public cpp_regex_traits<charT>
|
||||
{
|
||||
};
|
||||
|
||||
#else
|
||||
#error No default localisation model defined
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // include
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,396 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE basic_regex.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares template class basic_regex (note that member function
|
||||
* bodies are in regex_compile.hpp).
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_BASIC_REGEX_HPP
|
||||
#define BOOST_REGEX_V4_BASIC_REGEX_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
//
|
||||
// class reg_expression
|
||||
// represents the compiled
|
||||
// regular expression:
|
||||
//
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4251 4231 4660)
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_REGEX_NO_FWD
|
||||
template <class charT, class traits = regex_traits<charT>, class Allocator = BOOST_DEFAULT_ALLOCATOR(charT) >
|
||||
#else
|
||||
template <class charT, class traits, class Allocator >
|
||||
#endif
|
||||
class reg_expression : public regbase
|
||||
{
|
||||
public:
|
||||
// typedefs:
|
||||
typedef typename traits::size_type traits_size_type;
|
||||
typedef typename traits::uchar_type traits_uchar_type;
|
||||
typedef typename traits::string_type traits_string_type;
|
||||
typedef charT char_type;
|
||||
typedef traits traits_type;
|
||||
|
||||
typedef charT value_type;
|
||||
typedef charT& reference;
|
||||
typedef const charT& const_reference;
|
||||
typedef const charT* const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
typedef typename Allocator::difference_type difference_type;
|
||||
typedef typename Allocator::size_type size_type;
|
||||
typedef Allocator allocator_type;
|
||||
typedef Allocator alloc_type;
|
||||
typedef regex_constants::syntax_option_type flag_type;
|
||||
// locale_type
|
||||
// placeholder for actual locale type used by the
|
||||
// traits class to localise *this.
|
||||
typedef typename traits::locale_type locale_type;
|
||||
|
||||
public:
|
||||
explicit reg_expression(const Allocator& a = Allocator());
|
||||
explicit reg_expression(const charT* p, flag_type f = regex_constants::normal, const Allocator& a = Allocator());
|
||||
reg_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal, const Allocator& a = Allocator());
|
||||
reg_expression(const charT* p, size_type len, flag_type f, const Allocator& a = Allocator());
|
||||
reg_expression(const reg_expression&);
|
||||
~reg_expression();
|
||||
reg_expression& BOOST_REGEX_CALL operator=(const reg_expression&);
|
||||
reg_expression& BOOST_REGEX_CALL operator=(const charT* ptr)
|
||||
{
|
||||
set_expression(ptr, regex_constants::normal | regex_constants::use_except);
|
||||
return *this;
|
||||
}
|
||||
|
||||
//
|
||||
// assign:
|
||||
reg_expression& assign(const reg_expression& that)
|
||||
{ return *this = that; }
|
||||
reg_expression& assign(const charT* ptr, flag_type f = regex_constants::normal)
|
||||
{
|
||||
set_expression(ptr, f | regex_constants::use_except);
|
||||
return *this;
|
||||
}
|
||||
reg_expression& assign(const charT* ptr, size_type len, flag_type f)
|
||||
{
|
||||
std::basic_string<charT> s(ptr, len);
|
||||
set_expression(s.c_str(), f | regex_constants::use_except);
|
||||
return *this;
|
||||
}
|
||||
|
||||
reg_expression& assign(const charT* arg_first,
|
||||
const charT* arg_last,
|
||||
flag_type f = regex_constants::normal)
|
||||
{
|
||||
set_expression(arg_first, arg_last, f | regex_constants::use_except);
|
||||
return *this;
|
||||
}
|
||||
#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__IBMCPP__)
|
||||
|
||||
template <class ST, class SA>
|
||||
unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
|
||||
{ return set_expression(p.data(), p.data() + p.size(), f); }
|
||||
|
||||
template <class ST, class SA>
|
||||
explicit reg_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal, const Allocator& a = Allocator())
|
||||
: data(a), pkmp(0), error_code_(REG_EMPTY), _expression(0) { set_expression(p, f | regex_constants::use_except); }
|
||||
|
||||
template <class InputIterator>
|
||||
reg_expression(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal, const Allocator& al = Allocator())
|
||||
: data(al), pkmp(0), error_code_(REG_EMPTY), _expression(0)
|
||||
{
|
||||
std::basic_string<charT> a(arg_first, arg_last);
|
||||
set_expression(a.data(), a.data() + a.size(), f | regex_constants::use_except);
|
||||
}
|
||||
|
||||
template <class ST, class SA>
|
||||
reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
|
||||
{
|
||||
set_expression(p.c_str(), p.c_str() + p.size(), regex_constants::normal | regex_constants::use_except);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class string_traits, class A>
|
||||
reg_expression& BOOST_REGEX_CALL assign(
|
||||
const std::basic_string<charT, string_traits, A>& s,
|
||||
flag_type f = regex_constants::normal)
|
||||
{
|
||||
set_expression(s.c_str(), s.c_str() + s.size(), f | regex_constants::use_except);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class InputIterator>
|
||||
reg_expression& BOOST_REGEX_CALL assign(InputIterator arg_first,
|
||||
InputIterator arg_last,
|
||||
flag_type f = regex_constants::normal)
|
||||
{
|
||||
std::basic_string<charT> a(arg_first, arg_last);
|
||||
set_expression(a.data(), a.data() + a.size(), f | regex_constants::use_except);
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
|
||||
{ return set_expression(p.data(), p.data() + p.size(), f | regex_constants::use_except); }
|
||||
|
||||
reg_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal, const Allocator& a = Allocator())
|
||||
: data(a), pkmp(0) { set_expression(p, f | regex_constants::use_except); }
|
||||
|
||||
reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
|
||||
{
|
||||
set_expression(p.c_str(), p.c_str() + p.size(), regex_constants::normal | regex_constants::use_except);
|
||||
return *this;
|
||||
}
|
||||
|
||||
reg_expression& BOOST_REGEX_CALL assign(
|
||||
const std::basic_string<charT>& s,
|
||||
flag_type f = regex_constants::normal)
|
||||
{
|
||||
set_expression(s.c_str(), s.c_str() + s.size(), f | regex_constants::use_except);
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// allocator access:
|
||||
Allocator BOOST_REGEX_CALL get_allocator()const;
|
||||
//
|
||||
// locale:
|
||||
locale_type BOOST_REGEX_CALL imbue(locale_type l){ return traits_inst.imbue(l); }
|
||||
locale_type BOOST_REGEX_CALL getloc()const{ return traits_inst.getloc(); }
|
||||
//
|
||||
// getflags:
|
||||
// retained for backwards compatibility only, the base class has "flags"
|
||||
// member which is now the prefered name:
|
||||
flag_type BOOST_REGEX_CALL getflags()const
|
||||
{ return this->flags(); }
|
||||
//
|
||||
// str:
|
||||
std::basic_string<charT> BOOST_REGEX_CALL str()const
|
||||
{
|
||||
std::basic_string<charT> result;
|
||||
if(this->error_code() == 0)
|
||||
result = std::basic_string<charT>(_expression, _expression_len);
|
||||
return result;
|
||||
}
|
||||
//
|
||||
// begin, end:
|
||||
const_iterator BOOST_REGEX_CALL begin()const
|
||||
{ return (this->error_code() ? 0 : _expression); }
|
||||
const_iterator BOOST_REGEX_CALL end()const
|
||||
{ return (this->error_code() ? 0 : _expression + _expression_len); }
|
||||
//
|
||||
// swap:
|
||||
void BOOST_REGEX_CALL swap(reg_expression&)throw();
|
||||
//
|
||||
// size:
|
||||
size_type BOOST_REGEX_CALL size()const
|
||||
{ return (this->error_code() ? 0 : _expression_len); }
|
||||
//
|
||||
// max_size:
|
||||
size_type BOOST_REGEX_CALL max_size()const
|
||||
{ return UINT_MAX; }
|
||||
//
|
||||
// empty:
|
||||
bool BOOST_REGEX_CALL empty()const
|
||||
{ return 0 != this->error_code(); }
|
||||
|
||||
unsigned BOOST_REGEX_CALL mark_count()const { return (this->error_code() ? 0 : marks); }
|
||||
int BOOST_REGEX_CALL compare(const reg_expression&) const;
|
||||
bool BOOST_REGEX_CALL operator==(const reg_expression& e)const
|
||||
{ return compare(e) == 0; }
|
||||
bool operator != (const basic_regex<charT, traits, Allocator>& e)
|
||||
{ return compare(e) != 0; }
|
||||
bool BOOST_REGEX_CALL operator<(const reg_expression& e)const
|
||||
{ return compare(e) < 0; }
|
||||
bool BOOST_REGEX_CALL operator>(const reg_expression& e)const
|
||||
{ return compare(e) > 0; }
|
||||
bool BOOST_REGEX_CALL operator<=(const reg_expression& e)const
|
||||
{ return compare(e) <= 0; }
|
||||
bool BOOST_REGEX_CALL operator>=(const reg_expression& e)const
|
||||
{ return compare(e) >= 0; }
|
||||
|
||||
//
|
||||
// The following are deprecated as public interfaces
|
||||
// but are available for compatibility with earlier versions.
|
||||
allocator_type BOOST_REGEX_CALL allocator()const;
|
||||
const charT* BOOST_REGEX_CALL expression()const { return (this->error_code() ? 0 : _expression); }
|
||||
unsigned int BOOST_REGEX_CALL set_expression(const charT* p, const charT* end, flag_type f = regex_constants::normal);
|
||||
unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regex_constants::normal) { return set_expression(p, p + traits_type::length(p), f); }
|
||||
//
|
||||
// this should be private but template friends don't work:
|
||||
const traits_type& get_traits()const { return traits_inst; }
|
||||
unsigned int BOOST_REGEX_CALL error_code()const
|
||||
{
|
||||
return error_code_;
|
||||
}
|
||||
|
||||
private:
|
||||
traits_type traits_inst; // traits class in use
|
||||
re_detail::raw_storage<Allocator> data; // our state machine
|
||||
unsigned _restart_type; // search method to use
|
||||
unsigned marks; // number of marked sub-expressions
|
||||
int repeats; // number of repeats
|
||||
unsigned char* startmap; // characters that can match the first state(s) in the machine
|
||||
std::size_t _expression_len; // length of the expression
|
||||
std::size_t _leading_len; // length of any leading literal
|
||||
const charT* _leading_string; // leading literal string
|
||||
std::size_t _leading_string_len; // and it's length
|
||||
re_detail::kmp_info<charT>* pkmp; // pointer to Knuth Morris Pratt state machine when available
|
||||
unsigned error_code_; // our current status
|
||||
charT* _expression; // the expression we just compiled if any
|
||||
|
||||
void BOOST_REGEX_CALL compile_maps();
|
||||
void BOOST_REGEX_CALL compile_map(re_detail::re_syntax_base* node, unsigned char* _map, unsigned int* pnull, unsigned char mask, re_detail::re_syntax_base* terminal = 0)const;
|
||||
bool BOOST_REGEX_CALL probe_start(re_detail::re_syntax_base* node, charT c, re_detail::re_syntax_base* terminal)const;
|
||||
bool BOOST_REGEX_CALL probe_start_null(re_detail::re_syntax_base* node, re_detail::re_syntax_base* terminal)const;
|
||||
void BOOST_REGEX_CALL fixup_apply(re_detail::re_syntax_base* b, unsigned cbraces);
|
||||
void BOOST_REGEX_CALL move_offsets(re_detail::re_syntax_base* j, unsigned size);
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set(const charT*& first, const charT* last);
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_narrow_type&);
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set_aux(re_detail::jstack<traits_string_type, Allocator>& singles, re_detail::jstack<traits_string_type, Allocator>& ranges, re_detail::jstack<boost::uint_fast32_t, Allocator>& classes, re_detail::jstack<traits_string_type, Allocator>& equivalents, bool isnot, const re_detail::_wide_type&);
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL compile_set_simple(re_detail::re_syntax_base* dat, unsigned long cls, bool isnot = false);
|
||||
unsigned int BOOST_REGEX_CALL parse_inner_set(const charT*& first, const charT* last);
|
||||
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL add_simple(re_detail::re_syntax_base* dat, re_detail::syntax_element_type type, unsigned int size = sizeof(re_detail::re_syntax_base));
|
||||
re_detail::re_syntax_base* BOOST_REGEX_CALL add_literal(re_detail::re_syntax_base* dat, charT c);
|
||||
charT BOOST_REGEX_CALL parse_escape(const charT*& first, const charT* last);
|
||||
void BOOST_REGEX_CALL parse_range(const charT*& first, const charT* last, unsigned& min, unsigned& max);
|
||||
bool BOOST_REGEX_CALL skip_space(const charT*& first, const charT* last);
|
||||
unsigned int BOOST_REGEX_CALL probe_restart(re_detail::re_syntax_base* dat);
|
||||
unsigned int BOOST_REGEX_CALL fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* end);
|
||||
void BOOST_REGEX_CALL fail(unsigned int err);
|
||||
|
||||
protected:
|
||||
static int BOOST_REGEX_CALL repeat_count(const reg_expression& e)
|
||||
{ return e.repeats; }
|
||||
static unsigned int BOOST_REGEX_CALL restart_type(const reg_expression& e)
|
||||
{ return e._restart_type; }
|
||||
static const re_detail::re_syntax_base* BOOST_REGEX_CALL first(const reg_expression& e)
|
||||
{ return (const re_detail::re_syntax_base*)e.data.data(); }
|
||||
static const unsigned char* BOOST_REGEX_CALL get_map(const reg_expression& e)
|
||||
{ return e.startmap; }
|
||||
static std::size_t BOOST_REGEX_CALL leading_length(const reg_expression& e)
|
||||
{ return e._leading_len; }
|
||||
static const re_detail::kmp_info<charT>* get_kmp(const reg_expression& e)
|
||||
{ return e.pkmp; }
|
||||
static bool BOOST_REGEX_CALL can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_wide_type&);
|
||||
static bool BOOST_REGEX_CALL can_start(charT c, const unsigned char* _map, unsigned char mask, const re_detail::_narrow_type&);
|
||||
};
|
||||
|
||||
template <class charT, class traits, class Allocator >
|
||||
void swap(reg_expression<charT, traits, Allocator>& a, reg_expression<charT, traits, Allocator>& b)
|
||||
{
|
||||
a.swap(b);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
template <class charT, class traits, class traits2, class Allocator>
|
||||
std::basic_ostream<charT, traits>&
|
||||
operator << (std::basic_ostream<charT, traits>& os,
|
||||
const reg_expression<charT, traits2, Allocator>& e)
|
||||
{
|
||||
return (os << e.str());
|
||||
}
|
||||
#else
|
||||
template <class traits, class Allocator>
|
||||
std::ostream& operator << (std::ostream& os, const reg_expression<char, traits, Allocator>& e)
|
||||
{
|
||||
return (os << e.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// We want to rename reg_expression basic_regex but maintain
|
||||
// backwards compatibility, so class basic_regex is just a thin
|
||||
// wrapper around reg_expression:
|
||||
//
|
||||
#ifdef BOOST_REGEX_NO_FWD
|
||||
template <class charT, class traits = regex_traits<charT>, class Allocator = BOOST_DEFAULT_ALLOCATOR(charT) >
|
||||
#else
|
||||
template <class charT, class traits, class Allocator >
|
||||
#endif
|
||||
class basic_regex : public reg_expression<charT, traits, Allocator>
|
||||
{
|
||||
public:
|
||||
typedef typename reg_expression<charT, traits, Allocator>::flag_type flag_type;
|
||||
typedef typename reg_expression<charT, traits, Allocator>::size_type size_type;
|
||||
explicit basic_regex(const Allocator& a = Allocator())
|
||||
: reg_expression<charT, traits, Allocator>(a){}
|
||||
explicit basic_regex(const charT* p, flag_type f = regex_constants::normal, const Allocator& a = Allocator())
|
||||
: reg_expression<charT, traits, Allocator>(p,f,a){}
|
||||
basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal, const Allocator& a = Allocator())
|
||||
: reg_expression<charT, traits, Allocator>(p1,p2,f,a){}
|
||||
basic_regex(const charT* p, size_type len, flag_type f, const Allocator& a = Allocator())
|
||||
: reg_expression<charT, traits, Allocator>(p,len,f,a){}
|
||||
basic_regex(const basic_regex& that)
|
||||
: reg_expression<charT, traits, Allocator>(that){}
|
||||
~basic_regex(){}
|
||||
basic_regex& BOOST_REGEX_CALL operator=(const basic_regex& that)
|
||||
{
|
||||
this->assign(that);
|
||||
return *this;
|
||||
}
|
||||
basic_regex& BOOST_REGEX_CALL operator=(const charT* ptr)
|
||||
{
|
||||
this->assign(ptr);
|
||||
return *this;
|
||||
}
|
||||
#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !(defined(__IBMCPP__) && (__IBMCPP__ <= 502))
|
||||
template <class ST, class SA>
|
||||
explicit basic_regex(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal, const Allocator& a = Allocator())
|
||||
: reg_expression<charT, traits, Allocator>(p,f,a){}
|
||||
|
||||
template <class I>
|
||||
basic_regex(I arg_first, I arg_last, flag_type f = regex_constants::normal, const Allocator& al = Allocator())
|
||||
: reg_expression<charT, traits, Allocator>(arg_first, arg_last, f, al){}
|
||||
|
||||
template <class ST, class SA>
|
||||
basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
|
||||
{
|
||||
this->assign(p);
|
||||
return *this;
|
||||
}
|
||||
#else
|
||||
basic_regex(const std::basic_string<charT>& p, flag_type f = regex_constants::normal, const Allocator& a = Allocator())
|
||||
: reg_expression<charT, traits, Allocator>(p,f,a){}
|
||||
|
||||
basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
|
||||
{
|
||||
this->assign(p);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE char_regex_traits.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares deprecated traits classes char_regex_traits<>.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_REGEX_V4_CHAR_REGEX_TRAITS_HPP
|
||||
#define BOOST_REGEX_V4_CHAR_REGEX_TRAITS_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace deprecated{
|
||||
//
|
||||
// class char_regex_traits_i
|
||||
// provides case insensitive traits classes (deprecated):
|
||||
template <class charT>
|
||||
class char_regex_traits_i : public regex_traits<charT> {};
|
||||
|
||||
template<>
|
||||
class char_regex_traits_i<char> : public regex_traits<char>
|
||||
{
|
||||
public:
|
||||
typedef char char_type;
|
||||
typedef unsigned char uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef regex_traits<char> base_type;
|
||||
|
||||
char BOOST_REGEX_CALL translate(char c, bool)const
|
||||
{
|
||||
return static_cast<const regex_traits<char>*>(this)->translate(c, true);
|
||||
}
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
template<>
|
||||
class char_regex_traits_i<wchar_t> : public regex_traits<wchar_t>
|
||||
{
|
||||
public:
|
||||
typedef wchar_t char_type;
|
||||
typedef unsigned short uchar_type;
|
||||
typedef unsigned int size_type;
|
||||
typedef regex_traits<wchar_t> base_type;
|
||||
|
||||
wchar_t BOOST_REGEX_CALL translate(wchar_t c, bool)const
|
||||
{
|
||||
return static_cast<const regex_traits<wchar_t>*>(this)->translate(c, true);
|
||||
}
|
||||
boost::uint_fast32_t BOOST_REGEX_CALL lookup_classname(const wchar_t* first, const wchar_t* last)const
|
||||
{
|
||||
boost::uint_fast32_t result = static_cast<const regex_traits<wchar_t>*>(this)->lookup_classname(first, last);
|
||||
if((result & base_type::char_class_upper) == base_type::char_class_upper)
|
||||
result |= base_type::char_class_alpha;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
} // namespace deprecated
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif // include
|
||||
|
||||
@@ -0,0 +1,281 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE cregex.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares POSIX API functions
|
||||
* + boost::RegEx high level wrapper.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RE_CREGEX_HPP_INCLUDED
|
||||
#define BOOST_RE_CREGEX_HPP_INCLUDED
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
#include <boost/regex/v4/match_flags.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
/* include these defs only for POSIX compatablity */
|
||||
#ifdef __cplusplus
|
||||
namespace boost{
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && !defined(BOOST_NO_STDC_NAMESPACE)
|
||||
typedef std::ptrdiff_t regoff_t;
|
||||
typedef std::size_t regsize_t;
|
||||
#else
|
||||
typedef ptrdiff_t regoff_t;
|
||||
typedef size_t regsize_t;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int re_magic;
|
||||
unsigned int re_nsub; /* number of parenthesized subexpressions */
|
||||
const char* re_endp; /* end pointer for REG_PEND */
|
||||
void* guts; /* none of your business :-) */
|
||||
match_flag_type eflags; /* none of your business :-) */
|
||||
} regex_tA;
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
typedef struct
|
||||
{
|
||||
unsigned int re_magic;
|
||||
unsigned int re_nsub; /* number of parenthesized subexpressions */
|
||||
const wchar_t* re_endp; /* end pointer for REG_PEND */
|
||||
void* guts; /* none of your business :-) */
|
||||
match_flag_type eflags; /* none of your business :-) */
|
||||
} regex_tW;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
regoff_t rm_so; /* start of match */
|
||||
regoff_t rm_eo; /* end of match */
|
||||
} regmatch_t;
|
||||
|
||||
/* regcomp() flags */
|
||||
typedef enum{
|
||||
REG_BASIC = 0000,
|
||||
REG_EXTENDED = 0001,
|
||||
REG_ICASE = 0002,
|
||||
REG_NOSUB = 0004,
|
||||
REG_NEWLINE = 0010,
|
||||
REG_NOSPEC = 0020,
|
||||
REG_PEND = 0040,
|
||||
REG_DUMP = 0200,
|
||||
REG_NOCOLLATE = 0400,
|
||||
REG_ESCAPE_IN_LISTS = 01000,
|
||||
REG_NEWLINE_ALT = 02000,
|
||||
REG_PERLEX = 04000,
|
||||
|
||||
REG_PERL = REG_EXTENDED | REG_NOCOLLATE | REG_ESCAPE_IN_LISTS | REG_PERLEX,
|
||||
REG_AWK = REG_EXTENDED | REG_ESCAPE_IN_LISTS,
|
||||
REG_GREP = REG_BASIC | REG_NEWLINE_ALT,
|
||||
REG_EGREP = REG_EXTENDED | REG_NEWLINE_ALT,
|
||||
|
||||
REG_ASSERT = 15,
|
||||
REG_INVARG = 16,
|
||||
REG_ATOI = 255, /* convert name to number (!) */
|
||||
REG_ITOA = 0400 /* convert number to name (!) */
|
||||
} reg_comp_flags;
|
||||
|
||||
/* regexec() flags */
|
||||
typedef enum{
|
||||
REG_NOTBOL = 00001,
|
||||
REG_NOTEOL = 00002,
|
||||
REG_STARTEND = 00004
|
||||
} reg_exec_flags;
|
||||
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompA(regex_tA*, const char*, int);
|
||||
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorA(int, const regex_tA*, char*, regsize_t);
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecA(const regex_tA*, const char*, regsize_t, regmatch_t*, int);
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeA(regex_tA*);
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regcompW(regex_tW*, const wchar_t*, int);
|
||||
BOOST_REGEX_DECL regsize_t BOOST_REGEX_CCALL regerrorW(int, const regex_tW*, wchar_t*, regsize_t);
|
||||
BOOST_REGEX_DECL int BOOST_REGEX_CCALL regexecW(const regex_tW*, const wchar_t*, regsize_t, regmatch_t*, int);
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CCALL regfreeW(regex_tW*);
|
||||
#endif
|
||||
|
||||
#ifdef UNICODE
|
||||
#define regcomp regcompW
|
||||
#define regerror regerrorW
|
||||
#define regexec regexecW
|
||||
#define regfree regfreeW
|
||||
#define regex_t regex_tW
|
||||
#else
|
||||
#define regcomp regcompA
|
||||
#define regerror regerrorA
|
||||
#define regexec regexecA
|
||||
#define regfree regfreeA
|
||||
#define regex_t regex_tA
|
||||
#endif
|
||||
|
||||
/* regerror() flags */
|
||||
typedef enum
|
||||
{
|
||||
REG_NOERROR = 0, /* Success. */
|
||||
REG_NOMATCH = 1, /* Didn't find a match (for regexec). */
|
||||
|
||||
/* POSIX regcomp return error codes. (In the order listed in the
|
||||
standard.) */
|
||||
REG_BADPAT = 2, /* Invalid pattern. */
|
||||
REG_ECOLLATE = 3, /* Undefined collating element. */
|
||||
REG_ECTYPE = 4, /* Invalid character class name. */
|
||||
REG_EESCAPE = 5, /* Trailing backslash. */
|
||||
REG_ESUBREG = 6, /* Invalid back reference. */
|
||||
REG_EBRACK = 7, /* Unmatched left bracket. */
|
||||
REG_EPAREN = 8, /* Parenthesis imbalance. */
|
||||
REG_EBRACE = 9, /* Unmatched \{. */
|
||||
REG_BADBR = 10, /* Invalid contents of \{\}. */
|
||||
REG_ERANGE = 11, /* Invalid range end. */
|
||||
REG_ESPACE = 12, /* Ran out of memory. */
|
||||
REG_BADRPT = 13, /* No preceding re for repetition op. */
|
||||
REG_EEND = 14, /* unexpected end of expression */
|
||||
REG_ESIZE = 15, /* expression too big */
|
||||
REG_ERPAREN = 16, /* unmatched right parenthesis */
|
||||
REG_EMPTY = 17, /* empty expression */
|
||||
REG_E_MEMORY = REG_ESIZE, /* out of memory */
|
||||
REG_E_UNKNOWN = 18 /* unknown error */
|
||||
} reg_errcode_t;
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
//
|
||||
// C++ high level wrapper goes here:
|
||||
//
|
||||
#if defined(__cplusplus)
|
||||
#include <string>
|
||||
#include <vector>
|
||||
namespace boost{
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
class RegEx;
|
||||
|
||||
namespace re_detail{
|
||||
|
||||
class RegExData;
|
||||
struct pred1;
|
||||
struct pred2;
|
||||
struct pred3;
|
||||
struct pred4;
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
#if (defined(BOOST_MSVC) || defined(__BORLANDC__)) && !defined(BOOST_DISABLE_WIN32)
|
||||
typedef bool (__cdecl *GrepCallback)(const RegEx& expression);
|
||||
typedef bool (__cdecl *GrepFileCallback)(const char* file, const RegEx& expression);
|
||||
typedef bool (__cdecl *FindFilesCallback)(const char* file);
|
||||
#else
|
||||
typedef bool (*GrepCallback)(const RegEx& expression);
|
||||
typedef bool (*GrepFileCallback)(const char* file, const RegEx& expression);
|
||||
typedef bool (*FindFilesCallback)(const char* file);
|
||||
#endif
|
||||
|
||||
class BOOST_REGEX_DECL RegEx
|
||||
{
|
||||
private:
|
||||
re_detail::RegExData* pdata;
|
||||
public:
|
||||
RegEx();
|
||||
RegEx(const RegEx& o);
|
||||
~RegEx();
|
||||
explicit RegEx(const char* c, bool icase = false);
|
||||
explicit RegEx(const std::string& s, bool icase = false);
|
||||
RegEx& operator=(const RegEx& o);
|
||||
RegEx& operator=(const char* p);
|
||||
RegEx& operator=(const std::string& s){ return this->operator=(s.c_str()); }
|
||||
unsigned int SetExpression(const char* p, bool icase = false);
|
||||
unsigned int SetExpression(const std::string& s, bool icase = false){ return SetExpression(s.c_str(), icase); }
|
||||
std::string Expression()const;
|
||||
unsigned int error_code()const;
|
||||
//
|
||||
// now matching operators:
|
||||
//
|
||||
bool Match(const char* p, match_flag_type flags = match_default);
|
||||
bool Match(const std::string& s, match_flag_type flags = match_default) { return Match(s.c_str(), flags); }
|
||||
bool Search(const char* p, match_flag_type flags = match_default);
|
||||
bool Search(const std::string& s, match_flag_type flags = match_default) { return Search(s.c_str(), flags); }
|
||||
unsigned int Grep(GrepCallback cb, const char* p, match_flag_type flags = match_default);
|
||||
unsigned int Grep(GrepCallback cb, const std::string& s, match_flag_type flags = match_default) { return Grep(cb, s.c_str(), flags); }
|
||||
unsigned int Grep(std::vector<std::string>& v, const char* p, match_flag_type flags = match_default);
|
||||
unsigned int Grep(std::vector<std::string>& v, const std::string& s, match_flag_type flags = match_default) { return Grep(v, s.c_str(), flags); }
|
||||
unsigned int Grep(std::vector<std::size_t>& v, const char* p, match_flag_type flags = match_default);
|
||||
unsigned int Grep(std::vector<std::size_t>& v, const std::string& s, match_flag_type flags = match_default) { return Grep(v, s.c_str(), flags); }
|
||||
#ifndef BOOST_REGEX_NO_FILEITER
|
||||
unsigned int GrepFiles(GrepFileCallback cb, const char* files, bool recurse = false, match_flag_type flags = match_default);
|
||||
unsigned int GrepFiles(GrepFileCallback cb, const std::string& files, bool recurse = false, match_flag_type flags = match_default) { return GrepFiles(cb, files.c_str(), recurse, flags); }
|
||||
unsigned int FindFiles(FindFilesCallback cb, const char* files, bool recurse = false, match_flag_type flags = match_default);
|
||||
unsigned int FindFiles(FindFilesCallback cb, const std::string& files, bool recurse = false, match_flag_type flags = match_default) { return FindFiles(cb, files.c_str(), recurse, flags); }
|
||||
#endif
|
||||
|
||||
std::string Merge(const std::string& in, const std::string& fmt,
|
||||
bool copy = true, match_flag_type flags = match_default);
|
||||
std::string Merge(const char* in, const char* fmt,
|
||||
bool copy = true, match_flag_type flags = match_default);
|
||||
|
||||
std::size_t Split(std::vector<std::string>& v, std::string& s, match_flag_type flags = match_default, unsigned max_count = ~0);
|
||||
//
|
||||
// now operators for returning what matched in more detail:
|
||||
//
|
||||
std::size_t Position(int i = 0)const;
|
||||
std::size_t Length(int i = 0)const;
|
||||
bool Matched(int i = 0)const;
|
||||
unsigned int Marks()const;
|
||||
std::string What(int i = 0)const;
|
||||
std::string operator[](int i)const { return What(i); }
|
||||
|
||||
static const std::size_t npos;
|
||||
|
||||
friend struct re_detail::pred1;
|
||||
friend struct re_detail::pred2;
|
||||
friend struct re_detail::pred3;
|
||||
friend struct re_detail::pred4;
|
||||
};
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
#endif // include guard
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,447 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE fileiter.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares various platform independent file and
|
||||
* directory iterators, plus binary file input in
|
||||
* the form of class map_file.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RE_FILEITER_HPP_INCLUDED
|
||||
#define BOOST_RE_FILEITER_HPP_INCLUDED
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_REGEX_NO_FILEITER
|
||||
|
||||
#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_REGEX_NO_W32)
|
||||
#error "Sorry, can't mix <windows.h> with STL code and gcc compiler: if you ran configure, try again with configure --disable-ms-windows"
|
||||
#define BOOST_REGEX_FI_WIN32_MAP
|
||||
#define BOOST_REGEX_FI_POSIX_DIR
|
||||
#elif (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_REGEX_NO_W32)
|
||||
#define BOOST_REGEX_FI_WIN32_MAP
|
||||
#define BOOST_REGEX_FI_WIN32_DIR
|
||||
#else
|
||||
#define BOOST_REGEX_FI_POSIX_MAP
|
||||
#define BOOST_REGEX_FI_POSIX_DIR
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_REGEX_FI_WIN32_MAP)||defined(BOOST_REGEX_FI_WIN32_DIR)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_REGEX_FI_WIN32_DIR)
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
typedef WIN32_FIND_DATAA _fi_find_data;
|
||||
typedef HANDLE _fi_find_handle;
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#define _fi_invalid_handle INVALID_HANDLE_VALUE
|
||||
#define _fi_dir FILE_ATTRIBUTE_DIRECTORY
|
||||
|
||||
#elif defined(BOOST_REGEX_FI_POSIX_DIR)
|
||||
|
||||
#include <cstdio>
|
||||
#include <cctype>
|
||||
#include <iterator>
|
||||
#include <list>
|
||||
#include <cassert>
|
||||
#include <dirent.h>
|
||||
|
||||
#if defined(__SUNPRO_CC)
|
||||
using std::list;
|
||||
#endif
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 256
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
struct _fi_find_data
|
||||
{
|
||||
unsigned dwFileAttributes;
|
||||
char cFileName[MAX_PATH];
|
||||
};
|
||||
|
||||
struct _fi_priv_data;
|
||||
|
||||
typedef _fi_priv_data* _fi_find_handle;
|
||||
#define _fi_invalid_handle 0
|
||||
#define _fi_dir 1
|
||||
|
||||
_fi_find_handle _fi_FindFirstFile(const char* lpFileName, _fi_find_data* lpFindFileData);
|
||||
bool _fi_FindNextFile(_fi_find_handle hFindFile, _fi_find_data* lpFindFileData);
|
||||
bool _fi_FindClose(_fi_find_handle hFindFile);
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#ifdef FindFirstFile
|
||||
#undef FindFirstFile
|
||||
#endif
|
||||
#ifdef FindNextFile
|
||||
#undef FindNextFile
|
||||
#endif
|
||||
#ifdef FindClose
|
||||
#undef FindClose
|
||||
#endif
|
||||
|
||||
#define FindFirstFileA _fi_FindFirstFile
|
||||
#define FindNextFileA _fi_FindNextFile
|
||||
#define FindClose _fi_FindClose
|
||||
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_REGEX_FI_WIN32_MAP // win32 mapfile
|
||||
|
||||
class BOOST_REGEX_DECL mapfile
|
||||
{
|
||||
HANDLE hfile;
|
||||
HANDLE hmap;
|
||||
const char* _first;
|
||||
const char* _last;
|
||||
public:
|
||||
|
||||
typedef const char* iterator;
|
||||
|
||||
mapfile(){ hfile = hmap = 0; _first = _last = 0; }
|
||||
mapfile(const char* file){ hfile = hmap = 0; _first = _last = 0; open(file); }
|
||||
~mapfile(){ close(); }
|
||||
void open(const char* file);
|
||||
void close();
|
||||
const char* begin(){ return _first; }
|
||||
const char* end(){ return _last; }
|
||||
size_t size(){ return _last - _first; }
|
||||
bool valid(){ return (hfile != 0) && (hfile != INVALID_HANDLE_VALUE); }
|
||||
};
|
||||
|
||||
|
||||
#else
|
||||
|
||||
class BOOST_REGEX_DECL mapfile_iterator;
|
||||
|
||||
class BOOST_REGEX_DECL mapfile
|
||||
{
|
||||
typedef char* pointer;
|
||||
std::FILE* hfile;
|
||||
long int _size;
|
||||
pointer* _first;
|
||||
pointer* _last;
|
||||
mutable std::list<pointer*> condemed;
|
||||
enum sizes
|
||||
{
|
||||
buf_size = 4096
|
||||
};
|
||||
void lock(pointer* node)const;
|
||||
void unlock(pointer* node)const;
|
||||
public:
|
||||
|
||||
typedef mapfile_iterator iterator;
|
||||
|
||||
mapfile(){ hfile = 0; _size = 0; _first = _last = 0; }
|
||||
mapfile(const char* file){ hfile = 0; _size = 0; _first = _last = 0; open(file); }
|
||||
~mapfile(){ close(); }
|
||||
void open(const char* file);
|
||||
void close();
|
||||
iterator begin()const;
|
||||
iterator end()const;
|
||||
unsigned long size()const{ return _size; }
|
||||
bool valid()const{ return hfile != 0; }
|
||||
friend class mapfile_iterator;
|
||||
};
|
||||
|
||||
class BOOST_REGEX_DECL mapfile_iterator
|
||||
#if !defined(BOOST_NO_STD_ITERATOR) || defined(BOOST_MSVC_STD_ITERATOR)
|
||||
: public std::iterator<std::random_access_iterator_tag, char>
|
||||
#endif
|
||||
{
|
||||
typedef mapfile::pointer internal_pointer;
|
||||
internal_pointer* node;
|
||||
const mapfile* file;
|
||||
unsigned long offset;
|
||||
long position()const
|
||||
{
|
||||
return file ? ((node - file->_first) * mapfile::buf_size + offset) : 0;
|
||||
}
|
||||
void position(long pos)
|
||||
{
|
||||
if(file)
|
||||
{
|
||||
node = file->_first + (pos / mapfile::buf_size);
|
||||
offset = pos % mapfile::buf_size;
|
||||
}
|
||||
}
|
||||
public:
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef char value_type;
|
||||
typedef const char* pointer;
|
||||
typedef const char& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
|
||||
mapfile_iterator() { node = 0; file = 0; offset = 0; }
|
||||
mapfile_iterator(const mapfile* f, long arg_position)
|
||||
{
|
||||
file = f;
|
||||
node = f->_first + arg_position / mapfile::buf_size;
|
||||
offset = arg_position % mapfile::buf_size;
|
||||
if(file)
|
||||
file->lock(node);
|
||||
}
|
||||
mapfile_iterator(const mapfile_iterator& i)
|
||||
{
|
||||
file = i.file;
|
||||
node = i.node;
|
||||
offset = i.offset;
|
||||
if(file)
|
||||
file->lock(node);
|
||||
}
|
||||
~mapfile_iterator()
|
||||
{
|
||||
if(file && node)
|
||||
file->unlock(node);
|
||||
}
|
||||
mapfile_iterator& operator = (const mapfile_iterator& i);
|
||||
char operator* ()const
|
||||
{
|
||||
assert(node >= file->_first);
|
||||
assert(node < file->_last);
|
||||
return file ? *(*node + sizeof(int) + offset) : char(0);
|
||||
}
|
||||
char operator[] (long off)const
|
||||
{
|
||||
mapfile_iterator tmp(*this);
|
||||
tmp += off;
|
||||
return *tmp;
|
||||
}
|
||||
mapfile_iterator& operator++ ();
|
||||
mapfile_iterator operator++ (int);
|
||||
mapfile_iterator& operator-- ();
|
||||
mapfile_iterator operator-- (int);
|
||||
|
||||
mapfile_iterator& operator += (long off)
|
||||
{
|
||||
position(position() + off);
|
||||
return *this;
|
||||
}
|
||||
mapfile_iterator& operator -= (long off)
|
||||
{
|
||||
position(position() - off);
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend inline bool operator==(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return (i.file == j.file) && (i.node == j.node) && (i.offset == j.offset);
|
||||
}
|
||||
|
||||
friend inline bool operator!=(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return !(i == j);
|
||||
}
|
||||
|
||||
friend inline bool operator<(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return i.position() < j.position();
|
||||
}
|
||||
friend inline bool operator>(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return i.position() > j.position();
|
||||
}
|
||||
friend inline bool operator<=(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return i.position() <= j.position();
|
||||
}
|
||||
friend inline bool operator>=(const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return i.position() >= j.position();
|
||||
}
|
||||
|
||||
friend mapfile_iterator operator + (const mapfile_iterator& i, long off);
|
||||
friend mapfile_iterator operator + (long off, const mapfile_iterator& i)
|
||||
{
|
||||
mapfile_iterator tmp(i);
|
||||
return tmp += off;
|
||||
}
|
||||
friend mapfile_iterator operator - (const mapfile_iterator& i, long off);
|
||||
friend inline long operator - (const mapfile_iterator& i, const mapfile_iterator& j)
|
||||
{
|
||||
return i.position() - j.position();
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
// _fi_sep determines the directory separator, either '\\' or '/'
|
||||
BOOST_REGEX_DECL extern const char* _fi_sep;
|
||||
|
||||
struct file_iterator_ref
|
||||
{
|
||||
_fi_find_handle hf;
|
||||
_fi_find_data _data;
|
||||
long count;
|
||||
};
|
||||
|
||||
|
||||
class BOOST_REGEX_DECL file_iterator
|
||||
{
|
||||
char* _root;
|
||||
char* _path;
|
||||
char* ptr;
|
||||
file_iterator_ref* ref;
|
||||
|
||||
public:
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef const char* value_type;
|
||||
typedef const char** pointer;
|
||||
typedef const char*& reference;
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
|
||||
file_iterator();
|
||||
file_iterator(const char* wild);
|
||||
~file_iterator();
|
||||
file_iterator(const file_iterator&);
|
||||
file_iterator& operator=(const file_iterator&);
|
||||
const char* root()const { return _root; }
|
||||
const char* path()const { return _path; }
|
||||
const char* name()const { return ptr; }
|
||||
_fi_find_data* data() { return &(ref->_data); }
|
||||
void next();
|
||||
file_iterator& operator++() { next(); return *this; }
|
||||
file_iterator operator++(int);
|
||||
const char* operator*() { return path(); }
|
||||
|
||||
friend inline bool operator == (const file_iterator& f1, const file_iterator& f2)
|
||||
{
|
||||
return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
|
||||
}
|
||||
|
||||
friend inline bool operator != (const file_iterator& f1, const file_iterator& f2)
|
||||
{
|
||||
return !(f1 == f2);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// dwa 9/13/00 - suppress unused parameter warning
|
||||
inline bool operator < (const file_iterator&, const file_iterator&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
class BOOST_REGEX_DECL directory_iterator
|
||||
{
|
||||
char* _root;
|
||||
char* _path;
|
||||
char* ptr;
|
||||
file_iterator_ref* ref;
|
||||
|
||||
public:
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef const char* value_type;
|
||||
typedef const char** pointer;
|
||||
typedef const char*& reference;
|
||||
typedef std::input_iterator_tag iterator_category;
|
||||
|
||||
directory_iterator();
|
||||
directory_iterator(const char* wild);
|
||||
~directory_iterator();
|
||||
directory_iterator(const directory_iterator& other);
|
||||
directory_iterator& operator=(const directory_iterator& other);
|
||||
|
||||
const char* root()const { return _root; }
|
||||
const char* path()const { return _path; }
|
||||
const char* name()const { return ptr; }
|
||||
_fi_find_data* data() { return &(ref->_data); }
|
||||
void next();
|
||||
directory_iterator& operator++() { next(); return *this; }
|
||||
directory_iterator operator++(int);
|
||||
const char* operator*() { return path(); }
|
||||
|
||||
static const char* separator() { return _fi_sep; }
|
||||
|
||||
friend inline bool operator == (const directory_iterator& f1, const directory_iterator& f2)
|
||||
{
|
||||
return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
|
||||
}
|
||||
|
||||
|
||||
friend inline bool operator != (const directory_iterator& f1, const directory_iterator& f2)
|
||||
{
|
||||
return !(f1 == f2);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
inline bool operator < (const directory_iterator&, const directory_iterator&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
|
||||
} // namespace re_detail
|
||||
using boost::re_detail::directory_iterator;
|
||||
using boost::re_detail::file_iterator;
|
||||
using boost::re_detail::mapfile;
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_NO_FILEITER
|
||||
#endif // BOOST_RE_FILEITER_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE instances.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Defines those template instances that are placed in the
|
||||
* library rather than in the users object files.
|
||||
*/
|
||||
|
||||
//
|
||||
// note no include guard, we may include this multiple times:
|
||||
//
|
||||
#ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
|
||||
namespace boost{
|
||||
|
||||
//
|
||||
// this header can be included multiple times, each time with
|
||||
// a different character type, BOOST_REGEX_CHAR_T must be defined
|
||||
// first:
|
||||
//
|
||||
#ifndef BOOST_REGEX_CHAR_T
|
||||
# error "BOOST_REGEX_CHAR_T not defined"
|
||||
#endif
|
||||
|
||||
//
|
||||
// what follows is compiler specific:
|
||||
//
|
||||
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# pragma option push -Jgx
|
||||
# endif
|
||||
|
||||
template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >;
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# pragma option pop
|
||||
# endif
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#elif (defined(BOOST_MSVC) && defined(_MSC_EXTENSIONS)) || defined(__GNUC__)
|
||||
|
||||
# ifndef BOOST_REGEX_INSTANTIATE
|
||||
# define template extern template
|
||||
# endif
|
||||
|
||||
# ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4251 4231 4660)
|
||||
# endif
|
||||
|
||||
template class BOOST_REGEX_DECL reg_expression< BOOST_REGEX_CHAR_T >;
|
||||
|
||||
# ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
# endif
|
||||
|
||||
# ifdef template
|
||||
# undef template
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_match.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Iterator traits for selecting an iterator type as
|
||||
* an integral constant expression.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_REGEX_ITERATOR_CATEGORY_HPP
|
||||
#define BOOST_REGEX_ITERATOR_CATEGORY_HPP
|
||||
|
||||
#include <iterator>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_pointer.hpp>
|
||||
|
||||
namespace boost{
|
||||
namespace detail{
|
||||
|
||||
template <class I>
|
||||
struct is_random_imp
|
||||
{
|
||||
private:
|
||||
typedef typename std::iterator_traits<I>::iterator_category cat;
|
||||
public:
|
||||
BOOST_STATIC_CONSTANT(bool, value = (::boost::is_convertible<cat*, std::random_access_iterator_tag*>::value));
|
||||
};
|
||||
|
||||
template <class I>
|
||||
struct is_random_pointer_imp
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
template <bool is_pointer_type>
|
||||
struct is_random_imp_selector
|
||||
{
|
||||
template <class I>
|
||||
struct rebind
|
||||
{
|
||||
typedef is_random_imp<I> type;
|
||||
};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct is_random_imp_selector<true>
|
||||
{
|
||||
template <class I>
|
||||
struct rebind
|
||||
{
|
||||
typedef is_random_pointer_imp<I> type;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template <class I>
|
||||
struct is_random_access_iterator
|
||||
{
|
||||
private:
|
||||
typedef detail::is_random_imp_selector< ::boost::is_pointer<I>::value> selector;
|
||||
typedef typename selector::template rebind<I> bound_type;
|
||||
typedef typename bound_type::type answer;
|
||||
public:
|
||||
BOOST_STATIC_CONSTANT(bool, value = answer::value);
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
template <class I>
|
||||
const bool is_random_access_iterator<I>::value;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE iterator_traits.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares iterator traits workarounds.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_ITERATOR_TRAITS_HPP
|
||||
#define BOOST_REGEX_V4_ITERATOR_TRAITS_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
#if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
|
||||
template <class T>
|
||||
struct regex_iterator_traits
|
||||
{
|
||||
typedef typename T::iterator_category iterator_category;
|
||||
typedef typename T::value_type value_type;
|
||||
#if !defined(BOOST_NO_STD_ITERATOR)
|
||||
typedef typename T::difference_type difference_type;
|
||||
typedef typename T::pointer pointer;
|
||||
typedef typename T::reference reference;
|
||||
#else
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef value_type* pointer;
|
||||
typedef value_type& reference;
|
||||
#endif
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct pointer_iterator_traits
|
||||
{
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef T value_type;
|
||||
typedef T* pointer;
|
||||
typedef T& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
};
|
||||
template <class T>
|
||||
struct const_pointer_iterator_traits
|
||||
{
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef T value_type;
|
||||
typedef const T* pointer;
|
||||
typedef const T& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct regex_iterator_traits<char*> : pointer_iterator_traits<char>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<const char*> : const_pointer_iterator_traits<char>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<wchar_t*> : pointer_iterator_traits<wchar_t>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<const wchar_t*> : const_pointer_iterator_traits<wchar_t>{};
|
||||
|
||||
#if defined(__SGI_STL_PORT) && defined(__STL_DEBUG)
|
||||
template<>
|
||||
struct regex_iterator_traits<std::string::iterator> : pointer_iterator_traits<char>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<std::string::const_iterator> : const_pointer_iterator_traits<char>{};
|
||||
#ifndef BOOST_NO_STD_WSTRING
|
||||
template<>
|
||||
struct regex_iterator_traits<std::wstring::iterator> : pointer_iterator_traits<wchar_t>{};
|
||||
template<>
|
||||
struct regex_iterator_traits<std::wstring::const_iterator> : const_pointer_iterator_traits<wchar_t>{};
|
||||
#endif // BOOST_NO_WSTRING
|
||||
#endif // stport
|
||||
|
||||
#else
|
||||
|
||||
template <class T>
|
||||
struct regex_iterator_traits : public std::iterator_traits<T> {};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE match_flags.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares match_flags type.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_MATCH_FLAGS
|
||||
#define BOOST_REGEX_V4_MATCH_FLAGS
|
||||
|
||||
#ifdef __cplusplus
|
||||
# include <boost/cstdint.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace boost{
|
||||
namespace regex_constants{
|
||||
#endif
|
||||
|
||||
typedef enum _match_flags
|
||||
{
|
||||
match_default = 0,
|
||||
match_not_bol = 1, // first is not start of line
|
||||
match_not_eol = match_not_bol << 1, // last is not end of line
|
||||
match_not_bob = match_not_eol << 1, // first is not start of buffer
|
||||
match_not_eob = match_not_bob << 1, // last is not end of buffer
|
||||
match_not_bow = match_not_eob << 1, // first is not start of word
|
||||
match_not_eow = match_not_bow << 1, // last is not end of word
|
||||
match_not_dot_newline = match_not_eow << 1, // \n is not matched by '.'
|
||||
match_not_dot_null = match_not_dot_newline << 1, // '\0' is not matched by '.'
|
||||
match_prev_avail = match_not_dot_null << 1, // *--first is a valid expression
|
||||
match_init = match_prev_avail << 1, // internal use
|
||||
match_any = match_init << 1, // don't care what we match
|
||||
match_not_null = match_any << 1, // string can't be null
|
||||
match_continuous = match_not_null << 1, // each grep match must continue from
|
||||
// uninterupted from the previous one
|
||||
match_partial = match_continuous << 1, // find partial matches
|
||||
|
||||
match_stop = match_partial << 1, // stop after first match (grep) V3 only
|
||||
match_not_initial_null = match_stop, // don't match initial null, V4 only
|
||||
match_all = match_stop << 1, // must find the whole of input even if match_any is set
|
||||
match_perl = match_all << 1, // Use perl matching rules
|
||||
match_posix = match_perl << 1, // Use POSIX matching rules
|
||||
match_nosubs = match_posix << 1, // don't trap marked subs
|
||||
match_extra = match_nosubs << 1, // include full capture information for repeated captures
|
||||
match_single_line = match_extra << 1, // treat text as single line and ignor any \n's when matching ^ and $.
|
||||
match_unused1 = match_single_line << 1, // unused
|
||||
match_unused2 = match_unused1 << 1, // unused
|
||||
match_unused3 = match_unused2 << 1, // unused
|
||||
match_max = match_unused3,
|
||||
|
||||
format_perl = 0, // perl style replacement
|
||||
format_default = 0, // ditto.
|
||||
format_sed = match_max << 1, // sed style replacement.
|
||||
format_all = format_sed << 1, // enable all extentions to sytax.
|
||||
format_no_copy = format_all << 1, // don't copy non-matching segments.
|
||||
format_first_only = format_no_copy << 1, // Only replace first occurance.
|
||||
format_is_if = format_first_only << 1 // internal use only.
|
||||
|
||||
} match_flags;
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) || defined(__SUNPRO_CC)
|
||||
typedef unsigned long match_flag_type;
|
||||
#else
|
||||
typedef match_flags match_flag_type;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
inline match_flags operator&(match_flags m1, match_flags m2)
|
||||
{ return static_cast<match_flags>(static_cast<boost::int32_t>(m1) & static_cast<boost::int32_t>(m2)); }
|
||||
inline match_flags operator|(match_flags m1, match_flags m2)
|
||||
{ return static_cast<match_flags>(static_cast<boost::int32_t>(m1) | static_cast<boost::int32_t>(m2)); }
|
||||
inline match_flags operator^(match_flags m1, match_flags m2)
|
||||
{ return static_cast<match_flags>(static_cast<boost::int32_t>(m1) ^ static_cast<boost::int32_t>(m2)); }
|
||||
inline match_flags operator~(match_flags m1)
|
||||
{ return static_cast<match_flags>(~static_cast<boost::int32_t>(m1)); }
|
||||
inline match_flags& operator&=(match_flags& m1, match_flags m2)
|
||||
{ m1 = static_cast<match_flags>(m1&m2); return m1; }
|
||||
inline match_flags& operator|=(match_flags& m1, match_flags m2)
|
||||
{ m1 = static_cast<match_flags>(m1|m2); return m1; }
|
||||
inline match_flags& operator^=(match_flags& m1, match_flags m2)
|
||||
{ m1 = static_cast<match_flags>(m1^m2); return m1; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // namespace regex_constants
|
||||
//
|
||||
// import names into boost for backwards compatiblity:
|
||||
//
|
||||
using regex_constants::match_flag_type;
|
||||
using regex_constants::match_default;
|
||||
using regex_constants::match_not_bol;
|
||||
using regex_constants::match_not_eol;
|
||||
using regex_constants::match_not_bob;
|
||||
using regex_constants::match_not_eob;
|
||||
using regex_constants::match_not_bow;
|
||||
using regex_constants::match_not_eow;
|
||||
using regex_constants::match_not_dot_newline;
|
||||
using regex_constants::match_not_dot_null;
|
||||
using regex_constants::match_prev_avail;
|
||||
//using regex_constants::match_init;
|
||||
using regex_constants::match_any;
|
||||
using regex_constants::match_not_null;
|
||||
using regex_constants::match_continuous;
|
||||
using regex_constants::match_partial;
|
||||
//using regex_constants::match_stop;
|
||||
using regex_constants::match_all;
|
||||
using regex_constants::match_perl;
|
||||
using regex_constants::match_posix;
|
||||
using regex_constants::match_nosubs;
|
||||
using regex_constants::match_extra;
|
||||
using regex_constants::match_single_line;
|
||||
//using regex_constants::match_max;
|
||||
using regex_constants::format_all;
|
||||
using regex_constants::format_sed;
|
||||
using regex_constants::format_perl;
|
||||
using regex_constants::format_default;
|
||||
using regex_constants::format_no_copy;
|
||||
using regex_constants::format_first_only;
|
||||
//using regex_constants::format_is_if;
|
||||
|
||||
} // namespace boost
|
||||
#endif // __cplusplus
|
||||
#endif // include guard
|
||||
|
||||
@@ -0,0 +1,335 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE match_results.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares template class match_results.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_MATCH_RESULTS_HPP
|
||||
#define BOOST_REGEX_V4_MATCH_RESULTS_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
|
||||
template <class BidiIterator
|
||||
, class Allocator = BOOST_DEFAULT_ALLOCATOR(sub_match<BidiIterator> )
|
||||
>
|
||||
class match_results
|
||||
{
|
||||
private:
|
||||
#ifndef BOOST_NO_STD_ALLOCATOR
|
||||
typedef std::vector<sub_match<BidiIterator>, Allocator> vector_type;
|
||||
#else
|
||||
typedef std::vector<sub_match<BidiIterator> > vector_type;
|
||||
#endif
|
||||
public:
|
||||
typedef sub_match<BidiIterator> value_type;
|
||||
#if !defined(BOOST_NO_STD_ALLOCATOR) && !(defined(BOOST_MSVC) && defined(_STLPORT_VERSION))
|
||||
typedef typename Allocator::const_reference const_reference;
|
||||
#else
|
||||
typedef const value_type& const_reference;
|
||||
#endif
|
||||
typedef const_reference reference;
|
||||
typedef typename vector_type::const_iterator const_iterator;
|
||||
typedef const_iterator iterator;
|
||||
typedef typename re_detail::regex_iterator_traits<
|
||||
BidiIterator>::difference_type difference_type;
|
||||
typedef typename Allocator::size_type size_type;
|
||||
typedef Allocator allocator_type;
|
||||
typedef typename re_detail::regex_iterator_traits<
|
||||
BidiIterator>::value_type char_type;
|
||||
typedef std::basic_string<char_type> string_type;
|
||||
|
||||
// construct/copy/destroy:
|
||||
explicit match_results(const Allocator& a = Allocator())
|
||||
#ifndef BOOST_NO_STD_ALLOCATOR
|
||||
: m_subs(a), m_base() {}
|
||||
#else
|
||||
: m_subs(), m_base() { (void)a; }
|
||||
#endif
|
||||
match_results(const match_results& m)
|
||||
: m_subs(m.m_subs), m_base(m.m_base) {}
|
||||
match_results& operator=(const match_results& m)
|
||||
{
|
||||
m_subs = m.m_subs;
|
||||
m_base = m.m_base;
|
||||
return *this;
|
||||
}
|
||||
~match_results(){}
|
||||
|
||||
// size:
|
||||
size_type size() const
|
||||
{ return m_subs.size() - 2; }
|
||||
size_type max_size() const
|
||||
{ return m_subs.max_size(); }
|
||||
bool empty() const
|
||||
{ return m_subs.size() < 2; }
|
||||
// element access:
|
||||
difference_type length(int sub = 0) const
|
||||
{
|
||||
sub += 2;
|
||||
if((sub < (int)m_subs.size()) && (sub > 0))
|
||||
return m_subs[sub].length();
|
||||
return 0;
|
||||
}
|
||||
difference_type position(unsigned int sub = 0) const
|
||||
{
|
||||
sub += 2;
|
||||
if(sub < m_subs.size())
|
||||
{
|
||||
const sub_match<BidiIterator>& s = m_subs[sub];
|
||||
if(s.matched)
|
||||
{
|
||||
return boost::re_detail::distance((BidiIterator)(m_base), (BidiIterator)(s.first));
|
||||
}
|
||||
}
|
||||
return ~static_cast<difference_type>(0);
|
||||
}
|
||||
string_type str(int sub = 0) const
|
||||
{
|
||||
sub += 2;
|
||||
string_type result;
|
||||
if(sub < (int)m_subs.size() && (sub > 0))
|
||||
{
|
||||
const sub_match<BidiIterator>& s = m_subs[sub];
|
||||
if(s.matched)
|
||||
{
|
||||
result = s;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
const_reference operator[](int sub) const
|
||||
{
|
||||
sub += 2;
|
||||
if(sub < (int)m_subs.size() && (sub >= 0))
|
||||
{
|
||||
return m_subs[sub];
|
||||
}
|
||||
return m_null;
|
||||
}
|
||||
|
||||
const_reference prefix() const
|
||||
{
|
||||
return (*this)[-1];
|
||||
}
|
||||
|
||||
const_reference suffix() const
|
||||
{
|
||||
return (*this)[-2];
|
||||
}
|
||||
const_iterator begin() const
|
||||
{
|
||||
return (m_subs.size() > 2) ? (m_subs.begin() + 2) : m_subs.end();
|
||||
}
|
||||
const_iterator end() const
|
||||
{
|
||||
return m_subs.end();
|
||||
}
|
||||
// format:
|
||||
template <class OutputIterator>
|
||||
OutputIterator format(OutputIterator out,
|
||||
const string_type& fmt,
|
||||
match_flag_type flags = format_default) const
|
||||
{
|
||||
return regex_format(out, *this, fmt, flags);
|
||||
}
|
||||
string_type format(const string_type& fmt,
|
||||
match_flag_type flags = format_default) const
|
||||
{
|
||||
return regex_format(*this, fmt, flags);
|
||||
}
|
||||
|
||||
allocator_type get_allocator() const
|
||||
{
|
||||
#ifndef BOOST_NO_STD_ALLOCATOR
|
||||
return m_subs.get_allocator();
|
||||
#else
|
||||
return allocator_type();
|
||||
#endif
|
||||
}
|
||||
void swap(match_results& that)
|
||||
{
|
||||
std::swap(m_subs, that.m_subs);
|
||||
std::swap(m_base, that.m_base);
|
||||
}
|
||||
bool operator==(const match_results& that)const
|
||||
{
|
||||
return (m_subs == that.m_subs) && (m_base == that.m_base);
|
||||
}
|
||||
bool operator!=(const match_results& that)const
|
||||
{ return !(*this == that); }
|
||||
|
||||
#ifdef BOOST_REGEX_MATCH_EXTRA
|
||||
typedef typename sub_match<BidiIterator>::capture_sequence_type capture_sequence_type;
|
||||
|
||||
const capture_sequence_type& captures(int i)const
|
||||
{
|
||||
return (*this)[i].captures();
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// private access functions:
|
||||
void BOOST_REGEX_CALL set_second(BidiIterator i)
|
||||
{
|
||||
assert(m_subs.size() > 2);
|
||||
m_subs[2].second = i;
|
||||
m_subs[2].matched = true;
|
||||
m_subs[0].first = i;
|
||||
m_subs[0].matched = (m_subs[0].first != m_subs[0].second);
|
||||
m_null.first = i;
|
||||
m_null.second = i;
|
||||
m_null.matched = false;
|
||||
}
|
||||
|
||||
void BOOST_REGEX_CALL set_second(BidiIterator i, size_type pos, bool m = true)
|
||||
{
|
||||
pos += 2;
|
||||
assert(m_subs.size() > pos);
|
||||
m_subs[pos].second = i;
|
||||
m_subs[pos].matched = m;
|
||||
if(pos == 2)
|
||||
{
|
||||
m_subs[0].first = i;
|
||||
m_subs[0].matched = (m_subs[0].first != m_subs[0].second);
|
||||
m_null.first = i;
|
||||
m_null.second = i;
|
||||
m_null.matched = false;
|
||||
}
|
||||
}
|
||||
void BOOST_REGEX_CALL set_size(size_type n, BidiIterator i, BidiIterator j)
|
||||
{
|
||||
value_type v(j);
|
||||
size_type len = m_subs.size();
|
||||
if(len > n + 2)
|
||||
{
|
||||
m_subs.erase(m_subs.begin()+n+2);
|
||||
std::fill(m_subs.begin(), m_subs.end(), v);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::fill(m_subs.begin(), m_subs.end(), v);
|
||||
if(n+2 != len)
|
||||
m_subs.insert(m_subs.end(), n+2-len, v);
|
||||
}
|
||||
m_subs[1].first = i;
|
||||
}
|
||||
void BOOST_REGEX_CALL set_base(BidiIterator pos)
|
||||
{
|
||||
m_base = pos;
|
||||
}
|
||||
void BOOST_REGEX_CALL set_first(BidiIterator i)
|
||||
{
|
||||
// set up prefix:
|
||||
m_subs[1].second = i;
|
||||
m_subs[1].matched = (m_subs[1].first != i);
|
||||
// set up $0:
|
||||
m_subs[2].first = i;
|
||||
// zero out everything else:
|
||||
for(size_type n = 3; n < m_subs.size(); ++n)
|
||||
{
|
||||
m_subs[n].first = m_subs[n].second = m_subs[0].second;
|
||||
m_subs[n].matched = false;
|
||||
}
|
||||
}
|
||||
void BOOST_REGEX_CALL set_first(BidiIterator i, size_type pos)
|
||||
{
|
||||
assert(pos+2 < m_subs.size());
|
||||
if(pos)
|
||||
m_subs[pos+2].first = i;
|
||||
else
|
||||
set_first(i);
|
||||
}
|
||||
void BOOST_REGEX_CALL maybe_assign(const match_results<BidiIterator, Allocator>& m);
|
||||
|
||||
|
||||
private:
|
||||
vector_type m_subs; // subexpressions
|
||||
BidiIterator m_base; // where the search started from
|
||||
sub_match<BidiIterator> m_null; // a null match
|
||||
};
|
||||
|
||||
template <class BidiIterator, class Allocator>
|
||||
void BOOST_REGEX_CALL match_results<BidiIterator, Allocator>::maybe_assign(const match_results<BidiIterator, Allocator>& m)
|
||||
{
|
||||
const_iterator p1, p2;
|
||||
p1 = begin();
|
||||
p2 = m.begin();
|
||||
BidiIterator base = (*this)[-1].first;
|
||||
std::size_t len1 = 0;
|
||||
std::size_t len2 = 0;
|
||||
std::size_t base1 = 0;
|
||||
std::size_t base2 = 0;
|
||||
std::size_t i;
|
||||
for(i = 0; i < size(); ++i)
|
||||
{
|
||||
//
|
||||
// leftmost takes priority over longest:
|
||||
base1 = boost::re_detail::distance(base, p1->first);
|
||||
base2 = boost::re_detail::distance(base, p2->first);
|
||||
if(base1 < base2) return;
|
||||
if(base2 < base1) break;
|
||||
|
||||
len1 = boost::re_detail::distance((BidiIterator)p1->first, (BidiIterator)p1->second);
|
||||
len2 = boost::re_detail::distance((BidiIterator)p2->first, (BidiIterator)p2->second);
|
||||
if((len1 != len2) || ((p1->matched == false) && (p2->matched == true)))
|
||||
break;
|
||||
if((p1->matched == true) && (p2->matched == false))
|
||||
return;
|
||||
++p1;
|
||||
++p2;
|
||||
}
|
||||
if(i == size())
|
||||
return;
|
||||
if(base2 < base1)
|
||||
*this = m;
|
||||
else if((len2 > len1) || ((p1->matched == false) && (p2->matched == true)) )
|
||||
*this = m;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator>
|
||||
void swap(match_results<BidiIterator, Allocator>& a, match_results<BidiIterator, Allocator>& b)
|
||||
{
|
||||
a.swap(b);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
template <class charT, class traits, class BidiIterator, class Allocator>
|
||||
std::basic_ostream<charT, traits>&
|
||||
operator << (std::basic_ostream<charT, traits>& os,
|
||||
const match_results<BidiIterator, Allocator>& s)
|
||||
{
|
||||
return (os << s.str());
|
||||
}
|
||||
#else
|
||||
template <class BidiIterator, class Allocator>
|
||||
std::ostream& operator << (std::ostream& os,
|
||||
const match_results<BidiIterator, Allocator>& s)
|
||||
{
|
||||
return (os << s.str());
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright (c) 2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE mem_block_cache.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: memory block cache used by the non-recursive matcher.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_MEM_BLOCK_CACHE_HPP
|
||||
#define BOOST_REGEX_V4_MEM_BLOCK_CACHE_HPP
|
||||
|
||||
#include <new>
|
||||
#include <boost/regex/v4/regex_synch.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
struct mem_block_node
|
||||
{
|
||||
mem_block_node* next;
|
||||
};
|
||||
|
||||
struct mem_block_cache
|
||||
{
|
||||
// this member has to be statically initialsed:
|
||||
mem_block_node* next;
|
||||
unsigned cached_blocks;
|
||||
|
||||
~mem_block_cache()
|
||||
{
|
||||
while(next)
|
||||
{
|
||||
mem_block_node* old = next;
|
||||
next = next->next;
|
||||
::operator delete(old);
|
||||
}
|
||||
}
|
||||
void* get()
|
||||
{
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
re_detail::cs_guard g(*re_detail::p_re_lock);
|
||||
#endif
|
||||
if(next)
|
||||
{
|
||||
mem_block_node* result = next;
|
||||
next = next->next;
|
||||
--cached_blocks;
|
||||
return result;
|
||||
}
|
||||
return ::operator new(BOOST_REGEX_BLOCKSIZE);
|
||||
}
|
||||
void put(void* p)
|
||||
{
|
||||
#ifdef BOOST_HAS_THREADS
|
||||
re_detail::cs_guard g(*re_detail::p_re_lock);
|
||||
#endif
|
||||
if(cached_blocks >= BOOST_REGEX_MAX_CACHE_BLOCKS)
|
||||
{
|
||||
::operator delete(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
mem_block_node* old = static_cast<mem_block_node*>(p);
|
||||
old->next = next;
|
||||
next = old;
|
||||
++cached_blocks;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
extern mem_block_cache block_cache;
|
||||
|
||||
}
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,454 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_MATCHER_HPP
|
||||
#define BOOST_REGEX_MATCHER_HPP
|
||||
|
||||
#include <boost/regex/v4/iterator_category.hpp>
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
//
|
||||
// error checking API:
|
||||
//
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL verify_options(boost::regex::flag_type ef, match_flag_type mf);
|
||||
|
||||
|
||||
//
|
||||
// Unfortunately Rogue Waves standard library appears to have a bug
|
||||
// in std::basic_string::compare that results in eroneous answers
|
||||
// in some cases (tested with Borland C++ 5.1, Rogue Wave lib version
|
||||
// 0x020101) the test case was:
|
||||
// {39135,0} < {0xff,0}
|
||||
// which succeeds when it should not.
|
||||
//
|
||||
#ifndef _RWSTD_VER
|
||||
# define STR_COMP(s,p) s.compare(p)
|
||||
#else
|
||||
template <class C, class T, class A>
|
||||
inline int string_compare(const std::basic_string<C,T,A>& s, const C* p)
|
||||
{ return s.compare(p); }
|
||||
inline int string_compare(const std::string& s, const char* p)
|
||||
{ return std::strcmp(s.c_str(), p); }
|
||||
# ifndef BOOST_NO_WREGEX
|
||||
inline int string_compare(const std::wstring& s, const wchar_t* p)
|
||||
{ return std::wcscmp(s.c_str(), p); }
|
||||
#endif
|
||||
# define STR_COMP(s,p) string_compare(s,p)
|
||||
#endif
|
||||
|
||||
template<class charT>
|
||||
inline const charT* re_skip_past_null(const charT* p)
|
||||
{
|
||||
while (*p != 0) ++p;
|
||||
return ++p;
|
||||
}
|
||||
|
||||
template <class iterator, class charT, class traits_type, class Allocator>
|
||||
iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
|
||||
iterator last,
|
||||
const re_set_long* set_,
|
||||
const reg_expression<charT, traits_type, Allocator>& e)
|
||||
{
|
||||
const charT* p = reinterpret_cast<const charT*>(set_+1);
|
||||
iterator ptr;
|
||||
unsigned int i;
|
||||
bool icase = e.flags() & regex_constants::icase;
|
||||
|
||||
if(next == last) return next;
|
||||
|
||||
typedef typename traits_type::string_type traits_string_type;
|
||||
const traits_type& traits_inst = e.get_traits();
|
||||
|
||||
// dwa 9/13/00 suppress incorrect MSVC warning - it claims this is never
|
||||
// referenced
|
||||
(void)traits_inst;
|
||||
|
||||
// try and match a single character, could be a multi-character
|
||||
// collating element...
|
||||
for(i = 0; i < set_->csingles; ++i)
|
||||
{
|
||||
ptr = next;
|
||||
if(*p == 0)
|
||||
{
|
||||
// treat null string as special case:
|
||||
if(traits_inst.translate(*ptr, icase) != *p)
|
||||
{
|
||||
while(*p == 0)++p;
|
||||
continue;
|
||||
}
|
||||
return set_->isnot ? next : (ptr == next) ? ++next : ptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
while(*p && (ptr != last))
|
||||
{
|
||||
if(traits_inst.translate(*ptr, icase) != *p)
|
||||
break;
|
||||
++p;
|
||||
++ptr;
|
||||
}
|
||||
|
||||
if(*p == 0) // if null we've matched
|
||||
return set_->isnot ? next : (ptr == next) ? ++next : ptr;
|
||||
|
||||
p = re_skip_past_null(p); // skip null
|
||||
}
|
||||
}
|
||||
|
||||
charT col = traits_inst.translate(*next, icase);
|
||||
|
||||
|
||||
if(set_->cranges || set_->cequivalents)
|
||||
{
|
||||
traits_string_type s2(1, col);
|
||||
traits_string_type s1;
|
||||
//
|
||||
// try and match a range, NB only a single character can match
|
||||
if(set_->cranges)
|
||||
{
|
||||
if((e.flags() & regex_constants::collate) == 0)
|
||||
s1 = s2;
|
||||
else
|
||||
traits_inst.transform(s1, s2);
|
||||
for(i = 0; i < set_->cranges; ++i)
|
||||
{
|
||||
if(STR_COMP(s1, p) <= 0)
|
||||
{
|
||||
while(*p)++p;
|
||||
++p;
|
||||
if(STR_COMP(s1, p) >= 0)
|
||||
return set_->isnot ? next : ++next;
|
||||
}
|
||||
else
|
||||
{
|
||||
// skip first string
|
||||
while(*p)++p;
|
||||
++p;
|
||||
}
|
||||
// skip second string
|
||||
while(*p)++p;
|
||||
++p;
|
||||
}
|
||||
}
|
||||
//
|
||||
// try and match an equivalence class, NB only a single character can match
|
||||
if(set_->cequivalents)
|
||||
{
|
||||
traits_inst.transform_primary(s1, s2);
|
||||
for(i = 0; i < set_->cequivalents; ++i)
|
||||
{
|
||||
if(STR_COMP(s1, p) == 0)
|
||||
return set_->isnot ? next : ++next;
|
||||
// skip string
|
||||
while(*p)++p;
|
||||
++p;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(traits_inst.is_class(col, set_->cclasses) == true)
|
||||
return set_->isnot ? next : ++next;
|
||||
return set_->isnot ? ++next : next;
|
||||
}
|
||||
|
||||
template <class charT, class traits, class Allocator>
|
||||
struct access_t : public reg_expression<charT, traits, Allocator>
|
||||
{
|
||||
typedef typename is_byte<charT>::width_type width_type;
|
||||
typedef reg_expression<charT, traits, Allocator> base_type;
|
||||
typedef charT char_type;
|
||||
typedef traits traits_type;
|
||||
typedef Allocator alloc_type;
|
||||
|
||||
static int repeat_count(const base_type& b)
|
||||
{ return base_type::repeat_count(b); }
|
||||
static unsigned int restart_type(const base_type& b)
|
||||
{ return base_type::restart_type(b); }
|
||||
static const re_syntax_base* first(const base_type& b)
|
||||
{ return base_type::first(b); }
|
||||
static const unsigned char* get_map(const base_type& b)
|
||||
{ return base_type::get_map(b); }
|
||||
static std::size_t leading_length(const base_type& b)
|
||||
{ return base_type::leading_length(b); }
|
||||
static const kmp_info<charT>* get_kmp(const base_type& b)
|
||||
{ return base_type::get_kmp(b); }
|
||||
static bool can_start(char_type c, const unsigned char* _map, unsigned char mask)
|
||||
{
|
||||
return reg_expression<char_type, traits_type, alloc_type>::can_start(c, _map, mask, width_type());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template <class BidiIterator>
|
||||
class repeater_count
|
||||
{
|
||||
repeater_count** stack;
|
||||
repeater_count* next;
|
||||
int id;
|
||||
unsigned count; // the number of iterations so far
|
||||
BidiIterator start_pos; // where the last repeat started
|
||||
public:
|
||||
repeater_count(repeater_count** s)
|
||||
{
|
||||
stack = s;
|
||||
next = 0;
|
||||
id = -1;
|
||||
count = 0;
|
||||
}
|
||||
repeater_count(int i, repeater_count** s, BidiIterator start)
|
||||
: start_pos(start)
|
||||
{
|
||||
id = i;
|
||||
stack = s;
|
||||
next = *stack;
|
||||
*stack = this;
|
||||
if(id > next->id)
|
||||
count = 0;
|
||||
else
|
||||
{
|
||||
repeater_count* p = next;
|
||||
while(p->id != id)
|
||||
p = p->next;
|
||||
count = p->count;
|
||||
start_pos = p->start_pos;
|
||||
}
|
||||
}
|
||||
~repeater_count()
|
||||
{
|
||||
*stack = next;
|
||||
}
|
||||
unsigned get_count() { return count; }
|
||||
int get_id() { return id; }
|
||||
int operator++() { return ++count; }
|
||||
bool check_null_repeat(const BidiIterator& pos, unsigned max)
|
||||
{
|
||||
// this is called when we are about to start a new repeat,
|
||||
// if the last one was NULL move our count to max,
|
||||
// otherwise save the current position.
|
||||
bool result = (count == 0) ? false : (pos == start_pos);
|
||||
if(result)
|
||||
count = max;
|
||||
else
|
||||
start_pos = pos;
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
struct saved_state;
|
||||
|
||||
enum saved_state_type
|
||||
{
|
||||
saved_type_end = 0,
|
||||
saved_type_paren = 1,
|
||||
saved_type_recurse = 2,
|
||||
saved_type_assertion = 3,
|
||||
saved_state_alt = 4,
|
||||
saved_state_repeater_count = 5,
|
||||
saved_state_extra_block = 6,
|
||||
saved_state_greedy_single_repeat = 7,
|
||||
saved_state_rep_slow_dot = 8,
|
||||
saved_state_rep_fast_dot = 9,
|
||||
saved_state_rep_char = 10,
|
||||
saved_state_rep_short_set = 11,
|
||||
saved_state_rep_long_set = 12,
|
||||
saved_state_non_greedy_long_repeat = 13,
|
||||
saved_state_count = 14
|
||||
};
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
class perl_matcher
|
||||
{
|
||||
public:
|
||||
typedef typename traits::char_type char_type;
|
||||
typedef perl_matcher<BidiIterator, Allocator, traits, Allocator2> self_type;
|
||||
typedef bool (self_type::*matcher_proc_type)(void);
|
||||
typedef access_t<char_type, traits, Allocator2> access;
|
||||
typedef typename traits::size_type traits_size_type;
|
||||
typedef typename traits::uchar_type traits_uchar_type;
|
||||
typedef typename is_byte<char_type>::width_type width_type;
|
||||
typedef typename regex_iterator_traits<BidiIterator>::difference_type difference_type;
|
||||
|
||||
perl_matcher(BidiIterator first, BidiIterator end,
|
||||
match_results<BidiIterator, Allocator>& what,
|
||||
const reg_expression<char_type, traits, Allocator2>& e,
|
||||
match_flag_type f);
|
||||
|
||||
bool match();
|
||||
bool match_imp();
|
||||
bool find();
|
||||
bool find_imp();
|
||||
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
typedef bool (perl_matcher::*protected_proc_type)();
|
||||
bool protected_call(protected_proc_type);
|
||||
#endif
|
||||
|
||||
void setf(match_flag_type f)
|
||||
{ m_match_flags |= f; }
|
||||
void unsetf(match_flag_type f)
|
||||
{ m_match_flags &= ~f; }
|
||||
|
||||
private:
|
||||
void estimate_max_state_count(std::random_access_iterator_tag*);
|
||||
void estimate_max_state_count(void*);
|
||||
bool match_prefix();
|
||||
bool match_all_states();
|
||||
|
||||
// match procs, stored in s_match_vtable:
|
||||
bool match_startmark();
|
||||
bool match_endmark();
|
||||
bool match_literal();
|
||||
bool match_start_line();
|
||||
bool match_end_line();
|
||||
bool match_wild();
|
||||
bool match_match();
|
||||
bool match_word_boundary();
|
||||
bool match_within_word();
|
||||
bool match_word_start();
|
||||
bool match_word_end();
|
||||
bool match_buffer_start();
|
||||
bool match_buffer_end();
|
||||
bool match_backref();
|
||||
bool match_long_set();
|
||||
bool match_set();
|
||||
bool match_jump();
|
||||
bool match_alt();
|
||||
bool match_rep();
|
||||
bool match_combining();
|
||||
bool match_soft_buffer_end();
|
||||
bool match_restart_continue();
|
||||
bool match_long_set_repeat();
|
||||
bool match_set_repeat();
|
||||
bool match_char_repeat();
|
||||
bool match_dot_repeat_fast();
|
||||
bool match_dot_repeat_slow();
|
||||
bool backtrack_till_match(unsigned count);
|
||||
|
||||
// find procs stored in s_find_vtable:
|
||||
bool find_restart_any();
|
||||
bool find_restart_word();
|
||||
bool find_restart_line();
|
||||
bool find_restart_buf();
|
||||
bool find_restart_lit();
|
||||
|
||||
private:
|
||||
// final result structure to be filled in:
|
||||
match_results<BidiIterator, Allocator>& m_result;
|
||||
// temporary result for POSIX matches:
|
||||
scoped_ptr<match_results<BidiIterator, Allocator> > m_temp_match;
|
||||
// pointer to actual result structure to fill in:
|
||||
match_results<BidiIterator, Allocator>* m_presult;
|
||||
// start of sequence being searched:
|
||||
BidiIterator base;
|
||||
// end of sequence being searched:
|
||||
BidiIterator last;
|
||||
// current character being examined:
|
||||
BidiIterator position;
|
||||
// where to restart next search after failed match attempt:
|
||||
BidiIterator restart;
|
||||
// where the current search started from, acts as base for $` during grep:
|
||||
BidiIterator search_base;
|
||||
// the expression being examined:
|
||||
const reg_expression<char_type, traits, Allocator2>& re;
|
||||
// the expression's traits class:
|
||||
const traits& traits_inst;
|
||||
// the next state in the machine being matched:
|
||||
const re_syntax_base* pstate;
|
||||
// matching flags in use:
|
||||
match_flag_type m_match_flags;
|
||||
// how many states we have examined so far:
|
||||
difference_type state_count;
|
||||
// max number of states to examine before giving up:
|
||||
difference_type max_state_count;
|
||||
// whether we should ignore case or not:
|
||||
bool icase;
|
||||
// set to true when (position == last), indicates that we may have a partial match:
|
||||
bool m_has_partial_match;
|
||||
// set to true whenever we get a match:
|
||||
bool m_has_found_match;
|
||||
// the current repeat being examined:
|
||||
repeater_count<BidiIterator>* next_count;
|
||||
// the first repeat being examined (top of linked list):
|
||||
repeater_count<BidiIterator> rep_obj;
|
||||
|
||||
#ifdef BOOST_REGEX_NON_RECURSIVE
|
||||
//
|
||||
// additional members for non-recursive version:
|
||||
//
|
||||
typedef bool (self_type::*unwind_proc_type)(bool);
|
||||
|
||||
void extend_stack();
|
||||
bool unwind(bool);
|
||||
bool unwind_end(bool);
|
||||
bool unwind_paren(bool);
|
||||
bool unwind_recursion_stopper(bool);
|
||||
bool unwind_assertion(bool);
|
||||
bool unwind_alt(bool);
|
||||
bool unwind_repeater_counter(bool);
|
||||
bool unwind_extra_block(bool);
|
||||
bool unwind_greedy_single_repeat(bool);
|
||||
bool unwind_slow_dot_repeat(bool);
|
||||
bool unwind_fast_dot_repeat(bool);
|
||||
bool unwind_char_repeat(bool);
|
||||
bool unwind_short_set_repeat(bool);
|
||||
bool unwind_long_set_repeat(bool);
|
||||
bool unwind_non_greedy_repeat(bool);
|
||||
void destroy_single_repeat();
|
||||
void push_matched_paren(int index, const sub_match<BidiIterator>& sub);
|
||||
void push_recursion_stopper();
|
||||
void push_assertion(const re_syntax_base* ps, bool positive);
|
||||
void push_alt(const re_syntax_base* ps);
|
||||
void push_repeater_count(int i, repeater_count<BidiIterator>** s);
|
||||
void push_single_repeat(unsigned c, const re_repeat* r, BidiIterator last_position, int id);
|
||||
void push_non_greedy_repeat(const re_syntax_base* ps);
|
||||
|
||||
|
||||
// pointer to base of stack:
|
||||
saved_state* m_stack_base;
|
||||
// pointer to current stack position:
|
||||
saved_state* m_backup_state;
|
||||
// determines what value to return when unwinding from recursion,
|
||||
// allows for mixed recursive/non-recursive algorithm:
|
||||
bool m_recursive_result;
|
||||
// how many memory blocks have we used up?:
|
||||
unsigned used_block_count;
|
||||
#endif
|
||||
|
||||
// these operations aren't allowed, so are declared private:
|
||||
perl_matcher& operator=(const perl_matcher&);
|
||||
perl_matcher(const perl_matcher&);
|
||||
};
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
//
|
||||
// include the implementation of perl_matcher:
|
||||
//
|
||||
#ifdef BOOST_REGEX_RECURSIVE
|
||||
#include <boost/regex/v4/perl_matcher_recursive.hpp>
|
||||
#else
|
||||
#include <boost/regex/v4/perl_matcher_non_recursive.hpp>
|
||||
#endif
|
||||
// this one has to be last:
|
||||
#include <boost/regex/v4/perl_matcher_common.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,840 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE perl_matcher_common.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Definitions of perl_matcher member functions that are
|
||||
* common to both the recursive and non-recursive versions.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_PERL_MATCHER_COMMON_HPP
|
||||
#define BOOST_REGEX_V4_PERL_MATCHER_COMMON_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
# pragma option push -w-8008 -w-8066
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
perl_matcher<BidiIterator, Allocator, traits, Allocator2>::perl_matcher(BidiIterator first, BidiIterator end,
|
||||
match_results<BidiIterator, Allocator>& what,
|
||||
const reg_expression<char_type, traits, Allocator2>& e,
|
||||
match_flag_type f)
|
||||
: m_result(what), base(first), last(end),
|
||||
position(first), re(e), traits_inst(e.get_traits()),
|
||||
next_count(&rep_obj), rep_obj(&next_count)
|
||||
{
|
||||
typedef typename regex_iterator_traits<BidiIterator>::iterator_category category;
|
||||
|
||||
if(e.empty())
|
||||
{
|
||||
// precondition failure: e is not a valid regex.
|
||||
std::invalid_argument ex("Invalid regular expression object");
|
||||
boost::throw_exception(ex);
|
||||
}
|
||||
pstate = 0;
|
||||
m_match_flags = f;
|
||||
icase = re.flags() & regex_constants::icase;
|
||||
estimate_max_state_count(static_cast<category*>(0));
|
||||
if(!(m_match_flags & (match_perl|match_posix)))
|
||||
{
|
||||
if((re.flags() & regex_constants::perlex) || (re.flags() & regex_constants::literal))
|
||||
m_match_flags |= match_perl;
|
||||
else
|
||||
m_match_flags |= match_posix;
|
||||
}
|
||||
if(m_match_flags & match_posix)
|
||||
{
|
||||
m_temp_match.reset(new match_results<BidiIterator, Allocator>());
|
||||
m_presult = m_temp_match.get();
|
||||
}
|
||||
else
|
||||
m_presult = &m_result;
|
||||
#ifdef BOOST_REGEX_NON_RECURSIVE
|
||||
m_stack_base = 0;
|
||||
m_backup_state = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::estimate_max_state_count(std::random_access_iterator_tag*)
|
||||
{
|
||||
difference_type dist = boost::re_detail::distance(base, last);
|
||||
traits_size_type states = static_cast<traits_size_type>(re.size());
|
||||
states *= states;
|
||||
difference_type lim = (std::numeric_limits<difference_type>::max)() - 100000 - states;
|
||||
if(dist > (difference_type)(lim / states))
|
||||
max_state_count = lim;
|
||||
else
|
||||
max_state_count = 100000 + states * dist;
|
||||
}
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
void perl_matcher<BidiIterator, Allocator, traits, Allocator2>::estimate_max_state_count(void*)
|
||||
{
|
||||
// we don't know how long the sequence is:
|
||||
max_state_count = BOOST_REGEX_MAX_STATE_COUNT;
|
||||
}
|
||||
|
||||
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::protected_call(
|
||||
protected_proc_type proc)
|
||||
{
|
||||
__try{
|
||||
return (this->*proc)();
|
||||
}__except(EXCEPTION_STACK_OVERFLOW == GetExceptionCode())
|
||||
{
|
||||
reset_stack_guard_page();
|
||||
}
|
||||
// we only get here after a stack overflow:
|
||||
raise_error<traits>(traits_inst, REG_E_MEMORY);
|
||||
// and we never really get here at all:
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match()
|
||||
{
|
||||
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
return protected_call(&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_imp);
|
||||
#else
|
||||
return match_imp();
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_imp()
|
||||
{
|
||||
// initialise our stack if we are non-recursive:
|
||||
#ifdef BOOST_REGEX_NON_RECURSIVE
|
||||
save_state_init init(&m_stack_base, &m_backup_state);
|
||||
used_block_count = BOOST_REGEX_MAX_BLOCKS;
|
||||
#if !defined(BOOST_NO_EXCEPTIONS)
|
||||
try{
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// reset our state machine:
|
||||
position = base;
|
||||
search_base = base;
|
||||
state_count = 0;
|
||||
m_match_flags |= regex_constants::match_all;
|
||||
m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), base, last);
|
||||
m_presult->set_base(base);
|
||||
if(m_match_flags & match_posix)
|
||||
m_result = *m_presult;
|
||||
verify_options(re.flags(), m_match_flags);
|
||||
if(0 == match_prefix())
|
||||
return false;
|
||||
return m_result[0].second == last;
|
||||
|
||||
#if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
// unwind all pushed states, apart from anything else this
|
||||
// ensures that all the states are correctly destructed
|
||||
// not just the memory freed.
|
||||
while(unwind(true)){}
|
||||
throw;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find()
|
||||
{
|
||||
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||
return protected_call(&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_imp);
|
||||
#else
|
||||
return find_imp();
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_imp()
|
||||
{
|
||||
static matcher_proc_type const s_find_vtable[7] =
|
||||
{
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_any,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_word,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_line,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_buf,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_prefix,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_lit,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_lit,
|
||||
};
|
||||
|
||||
// initialise our stack if we are non-recursive:
|
||||
#ifdef BOOST_REGEX_NON_RECURSIVE
|
||||
save_state_init init(&m_stack_base, &m_backup_state);
|
||||
used_block_count = BOOST_REGEX_MAX_BLOCKS;
|
||||
#if !defined(BOOST_NO_EXCEPTIONS)
|
||||
try{
|
||||
#endif
|
||||
#endif
|
||||
|
||||
state_count = 0;
|
||||
if((m_match_flags & regex_constants::match_init) == 0)
|
||||
{
|
||||
// reset our state machine:
|
||||
position = base;
|
||||
search_base = base;
|
||||
pstate = access::first(re);
|
||||
m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), base, last);
|
||||
m_presult->set_base(base);
|
||||
m_match_flags |= regex_constants::match_init;
|
||||
}
|
||||
else
|
||||
{
|
||||
// start again:
|
||||
search_base = position = m_result[0].second;
|
||||
// If last match was null and match_not_null was not set then increment
|
||||
// our start position, otherwise we go into an infinite loop:
|
||||
if(((m_match_flags & match_not_null) == 0) && (m_result.length() == 0))
|
||||
{
|
||||
if(position == last)
|
||||
return false;
|
||||
else
|
||||
++position;
|
||||
}
|
||||
// reset $` start:
|
||||
m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), search_base, last);
|
||||
if(base != search_base)
|
||||
m_match_flags |= match_prev_avail;
|
||||
}
|
||||
if(m_match_flags & match_posix)
|
||||
{
|
||||
m_result.set_size(re.mark_count(), base, last);
|
||||
m_result.set_base(base);
|
||||
}
|
||||
|
||||
verify_options(re.flags(), m_match_flags);
|
||||
// find out what kind of expression we have:
|
||||
unsigned type = (m_match_flags & match_continuous) ?
|
||||
static_cast<unsigned int>(regbase::restart_continue)
|
||||
: static_cast<unsigned int>(access::restart_type(re));
|
||||
|
||||
// call the appropriate search routine:
|
||||
matcher_proc_type proc = s_find_vtable[type];
|
||||
return (this->*proc)();
|
||||
|
||||
#if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_NO_EXCEPTIONS)
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
// unwind all pushed states, apart from anything else this
|
||||
// ensures that all the states are correctly destructed
|
||||
// not just the memory freed.
|
||||
while(unwind(true)){}
|
||||
throw;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_prefix()
|
||||
{
|
||||
m_has_partial_match = false;
|
||||
m_has_found_match = false;
|
||||
pstate = access::first(re);
|
||||
m_presult->set_first(position);
|
||||
restart = position;
|
||||
match_all_states();
|
||||
if(!m_has_found_match && m_has_partial_match && (m_match_flags & match_partial))
|
||||
{
|
||||
m_has_found_match = true;
|
||||
m_presult->set_second(last, 0, false);
|
||||
position = last;
|
||||
}
|
||||
#ifdef BOOST_REGEX_MATCH_EXTRA
|
||||
if(m_has_found_match && (match_extra & m_match_flags))
|
||||
{
|
||||
//
|
||||
// we have a match, reverse the capture information:
|
||||
//
|
||||
for(unsigned i = 0; i < m_presult->size(); ++i)
|
||||
{
|
||||
typename sub_match<BidiIterator>::capture_sequence_type & seq = ((*m_presult)[i]).get_captures();
|
||||
std::reverse(seq.begin(), seq.end());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(!m_has_found_match)
|
||||
position = restart; // reset search postion
|
||||
return m_has_found_match;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_endmark()
|
||||
{
|
||||
int index = static_cast<const re_brace*>(pstate)->index;
|
||||
if(index > 0)
|
||||
{
|
||||
if((m_match_flags & match_nosubs) == 0)
|
||||
m_presult->set_second(position, index);
|
||||
}
|
||||
else if(index < 0)
|
||||
{
|
||||
// matched forward lookahead:
|
||||
pstate = 0;
|
||||
return true;
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_literal()
|
||||
{
|
||||
unsigned int len = static_cast<const re_literal*>(pstate)->length;
|
||||
const char_type* what = reinterpret_cast<const char_type*>(static_cast<const re_literal*>(pstate) + 1);
|
||||
//
|
||||
// compare string with what we stored in
|
||||
// our records:
|
||||
for(unsigned int i = 0; i < len; ++i, ++position)
|
||||
{
|
||||
if((position == last) || (traits_inst.translate(*position, icase) != what[i]))
|
||||
return false;
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_start_line()
|
||||
{
|
||||
if(position == base)
|
||||
{
|
||||
if((m_match_flags & match_prev_avail) == 0)
|
||||
{
|
||||
if((m_match_flags & match_not_bol) == 0)
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if(m_match_flags & match_single_line)
|
||||
return false;
|
||||
|
||||
// check the previous value character:
|
||||
BidiIterator t(position);
|
||||
--t;
|
||||
if(position != last)
|
||||
{
|
||||
if(traits_inst.is_separator(*t) && !((*t == '\r') && (*position == '\n')) )
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if(traits_inst.is_separator(*t))
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_end_line()
|
||||
{
|
||||
if(position != last)
|
||||
{
|
||||
if(m_match_flags & match_single_line)
|
||||
return false;
|
||||
// we're not yet at the end so *first is always valid:
|
||||
if(traits_inst.is_separator(*position))
|
||||
{
|
||||
if((position != base) || (m_match_flags & match_prev_avail))
|
||||
{
|
||||
// check that we're not in the middle of \r\n sequence
|
||||
BidiIterator t(position);
|
||||
--t;
|
||||
if((*t == '\r') && (*position == '\n'))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if((m_match_flags & match_not_eol) == 0)
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_wild()
|
||||
{
|
||||
if(position == last)
|
||||
return false;
|
||||
if(traits_inst.is_separator(*position) && (m_match_flags & match_not_dot_newline))
|
||||
return false;
|
||||
if((*position == char_type(0)) && (m_match_flags & match_not_dot_null))
|
||||
return false;
|
||||
pstate = pstate->next.p;
|
||||
++position;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_match()
|
||||
{
|
||||
if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first))
|
||||
return false;
|
||||
if((m_match_flags & match_all) && (position != last))
|
||||
return false;
|
||||
if((m_match_flags & regex_constants::match_not_initial_null) && (position == search_base))
|
||||
return false;
|
||||
m_presult->set_second(position);
|
||||
pstate = 0;
|
||||
m_has_found_match = true;
|
||||
if((m_match_flags & (match_posix|match_any)) == match_posix)
|
||||
{
|
||||
m_result.maybe_assign(*m_presult);
|
||||
return false;
|
||||
}
|
||||
#ifdef BOOST_REGEX_MATCH_EXTRA
|
||||
if(match_extra & m_match_flags)
|
||||
{
|
||||
for(unsigned i = 0; i < m_presult->size(); ++i)
|
||||
if((*m_presult)[i].matched)
|
||||
((*m_presult)[i]).get_captures().push_back((*m_presult)[i]);
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_boundary()
|
||||
{
|
||||
bool b; // indcates whether next character is a word character
|
||||
if(position != last)
|
||||
{
|
||||
// prev and this character must be opposites:
|
||||
#if defined(BOOST_REGEX_USE_C_LOCALE) && defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 95)
|
||||
b = traits::is_class(*position, traits::char_class_word);
|
||||
#else
|
||||
b = traits_inst.is_class(*position, traits::char_class_word);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
b = (m_match_flags & match_not_eow) ? true : false;
|
||||
}
|
||||
if((position == base) && ((m_match_flags & match_prev_avail) == 0))
|
||||
{
|
||||
if(m_match_flags & match_not_bow)
|
||||
b ^= true;
|
||||
else
|
||||
b ^= false;
|
||||
}
|
||||
else
|
||||
{
|
||||
--position;
|
||||
b ^= traits_inst.is_class(*position, traits::char_class_word);
|
||||
++position;
|
||||
}
|
||||
if(b)
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
return false; // no match if we get to here...
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_within_word()
|
||||
{
|
||||
if(position == last)
|
||||
return false;
|
||||
// both prev and this character must be traits::char_class_word:
|
||||
if(traits_inst.is_class(*position, traits::char_class_word))
|
||||
{
|
||||
bool b;
|
||||
if((position == base) && ((m_match_flags & match_prev_avail) == 0))
|
||||
return false;
|
||||
else
|
||||
{
|
||||
--position;
|
||||
b = traits_inst.is_class(*position, traits::char_class_word);
|
||||
++position;
|
||||
}
|
||||
if(b)
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_start()
|
||||
{
|
||||
if(position == last)
|
||||
return false; // can't be starting a word if we're already at the end of input
|
||||
if(!traits_inst.is_class(*position, traits::char_class_word))
|
||||
return false; // next character isn't a word character
|
||||
if((position == base) && ((m_match_flags & match_prev_avail) == 0))
|
||||
{
|
||||
if(m_match_flags & match_not_bow)
|
||||
return false; // no previous input
|
||||
}
|
||||
else
|
||||
{
|
||||
// otherwise inside buffer:
|
||||
BidiIterator t(position);
|
||||
--t;
|
||||
if(traits_inst.is_class(*t, traits::char_class_word))
|
||||
return false; // previous character not non-word
|
||||
}
|
||||
// OK we have a match:
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_end()
|
||||
{
|
||||
if((position == base) && ((m_match_flags & match_prev_avail) == 0))
|
||||
return false; // start of buffer can't be end of word
|
||||
BidiIterator t(position);
|
||||
--t;
|
||||
if(traits_inst.is_class(*t, traits::char_class_word) == false)
|
||||
return false; // previous character wasn't a word character
|
||||
|
||||
if(position == last)
|
||||
{
|
||||
if(m_match_flags & match_not_eow)
|
||||
return false; // end of buffer but not end of word
|
||||
}
|
||||
else
|
||||
{
|
||||
// otherwise inside buffer:
|
||||
if(traits_inst.is_class(*position, traits::char_class_word))
|
||||
return false; // next character is a word character
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true; // if we fall through to here then we've succeeded
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_buffer_start()
|
||||
{
|
||||
if((position != base) || (m_match_flags & match_not_bob))
|
||||
return false;
|
||||
// OK match:
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_buffer_end()
|
||||
{
|
||||
if((position != last) || (m_match_flags & match_not_eob))
|
||||
return false;
|
||||
// OK match:
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_backref()
|
||||
{
|
||||
// compare with what we previously matched:
|
||||
BidiIterator i = (*m_presult)[static_cast<const re_brace*>(pstate)->index].first;
|
||||
BidiIterator j = (*m_presult)[static_cast<const re_brace*>(pstate)->index].second;
|
||||
while(i != j)
|
||||
{
|
||||
if((position == last) || (traits_inst.translate(*position, icase) != traits_inst.translate(*i, icase)))
|
||||
return false;
|
||||
++i;
|
||||
++position;
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_long_set()
|
||||
{
|
||||
// let the traits class do the work:
|
||||
if(position == last)
|
||||
return false;
|
||||
BidiIterator t = re_is_set_member(position, last, static_cast<const re_set_long*>(pstate), re);
|
||||
if(t != position)
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
position = t;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_set()
|
||||
{
|
||||
if(position == last)
|
||||
return false;
|
||||
if(static_cast<const re_set*>(pstate)->_map[(traits_uchar_type)traits_inst.translate(*position, icase)])
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
++position;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_jump()
|
||||
{
|
||||
pstate = static_cast<const re_jump*>(pstate)->alt.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_combining()
|
||||
{
|
||||
if(position == last)
|
||||
return false;
|
||||
if(traits_inst.is_combining(traits_inst.translate(*position, icase)))
|
||||
return false;
|
||||
++position;
|
||||
while((position != last) && traits_inst.is_combining(traits_inst.translate(*position, icase)))
|
||||
++position;
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_soft_buffer_end()
|
||||
{
|
||||
if(m_match_flags & match_not_eob)
|
||||
return false;
|
||||
BidiIterator p(position);
|
||||
while((p != last) && traits_inst.is_separator(traits_inst.translate(*p, icase)))++p;
|
||||
if(p != last)
|
||||
return false;
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_restart_continue()
|
||||
{
|
||||
if(position == search_base)
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_any()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
const unsigned char* _map = access::get_map(re);
|
||||
while(true)
|
||||
{
|
||||
// skip everything we can't match:
|
||||
while((position != last) && !access::can_start(*position, _map, (unsigned char)mask_any) )
|
||||
++position;
|
||||
if(position == last)
|
||||
{
|
||||
// run out of characters, try a null match if possible:
|
||||
if(access::first(re)->can_be_null)
|
||||
return match_prefix();
|
||||
break;
|
||||
}
|
||||
// now try and obtain a match:
|
||||
if(match_prefix())
|
||||
return true;
|
||||
if(position == last)
|
||||
return false;
|
||||
++position;
|
||||
}
|
||||
return false;
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_word()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
// do search optimised for word starts:
|
||||
const unsigned char* _map = access::get_map(re);
|
||||
if((m_match_flags & match_prev_avail) || (position != base))
|
||||
--position;
|
||||
else if(match_prefix())
|
||||
return true;
|
||||
do
|
||||
{
|
||||
while((position != last) && traits_inst.is_class(*position, traits::char_class_word))
|
||||
++position;
|
||||
while((position != last) && !traits_inst.is_class(*position, traits::char_class_word))
|
||||
++position;
|
||||
if(position == last)
|
||||
break;
|
||||
|
||||
if(access::can_start(*position, _map, (unsigned char)mask_any) )
|
||||
{
|
||||
if(match_prefix())
|
||||
return true;
|
||||
}
|
||||
if(position == last)
|
||||
break;
|
||||
} while(true);
|
||||
return false;
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_line()
|
||||
{
|
||||
// do search optimised for line starts:
|
||||
const unsigned char* _map = access::get_map(re);
|
||||
if(match_prefix())
|
||||
return true;
|
||||
while(position != last)
|
||||
{
|
||||
while((position != last) && (*position != '\n'))
|
||||
++position;
|
||||
if(position == last)
|
||||
return false;
|
||||
++position;
|
||||
if(position == last)
|
||||
{
|
||||
if((access::first(re)->can_be_null) && match_prefix())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if( access::can_start(*position, _map, (unsigned char)mask_any) )
|
||||
{
|
||||
if(match_prefix())
|
||||
return true;
|
||||
}
|
||||
if(position == last)
|
||||
return false;
|
||||
//++position;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_buf()
|
||||
{
|
||||
if((position == base) && ((m_match_flags & match_not_bob) == 0))
|
||||
return match_prefix();
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::find_restart_lit()
|
||||
{
|
||||
if(position == last)
|
||||
return false; // can't possibly match if we're at the end already
|
||||
|
||||
unsigned type = (m_match_flags & match_continuous) ?
|
||||
static_cast<unsigned int>(regbase::restart_continue)
|
||||
: static_cast<unsigned int>(access::restart_type(re));
|
||||
|
||||
const kmp_info<char_type>* info = access::get_kmp(re);
|
||||
int len = info->len;
|
||||
const char_type* x = info->pstr;
|
||||
int j = 0;
|
||||
while (position != last)
|
||||
{
|
||||
while((j > -1) && (x[j] != traits_inst.translate(*position, icase)))
|
||||
j = info->kmp_next[j];
|
||||
++position;
|
||||
++j;
|
||||
if(j >= len)
|
||||
{
|
||||
if(type == regbase::restart_fixed_lit)
|
||||
{
|
||||
std::advance(position, -j);
|
||||
restart = position;
|
||||
std::advance(restart, len);
|
||||
m_result.set_first(position);
|
||||
m_result.set_second(restart);
|
||||
position = restart;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
restart = position;
|
||||
std::advance(position, -j);
|
||||
if(match_prefix())
|
||||
return true;
|
||||
else
|
||||
{
|
||||
for(int k = 0; (restart != position) && (k < j); ++k, --restart)
|
||||
{} // dwa 10/20/2000 - warning suppression for MWCW
|
||||
if(restart != last)
|
||||
++restart;
|
||||
position = restart;
|
||||
j = 0; //we could do better than this...
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if((m_match_flags & match_partial) && (position == last) && j)
|
||||
{
|
||||
// we need to check for a partial match:
|
||||
restart = position;
|
||||
std::advance(position, -j);
|
||||
return match_prefix();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace re_detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
# pragma option pop
|
||||
#endif
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,764 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE perl_matcher_common.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Definitions of perl_matcher member functions that are
|
||||
* specific to the recursive implementation.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_PERL_MATCHER_RECURSIVE_HPP
|
||||
#define BOOST_REGEX_V4_PERL_MATCHER_RECURSIVE_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
template <class BidiIterator>
|
||||
class backup_subex
|
||||
{
|
||||
int index;
|
||||
sub_match<BidiIterator> sub;
|
||||
public:
|
||||
template <class A>
|
||||
backup_subex(const match_results<BidiIterator, A>& w, int i)
|
||||
: index(i), sub(w[i], false) {}
|
||||
template <class A>
|
||||
void restore(match_results<BidiIterator, A>& w)
|
||||
{
|
||||
w.set_first(sub.first, index);
|
||||
w.set_second(sub.second, index, sub.matched);
|
||||
}
|
||||
const sub_match<BidiIterator>& get() { return sub; }
|
||||
};
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_all_states()
|
||||
{
|
||||
static matcher_proc_type const s_match_vtable[26] =
|
||||
{
|
||||
(&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_startmark),
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_endmark,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_literal,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_start_line,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_end_line,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_wild,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_match,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_boundary,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_within_word,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_start,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_word_end,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_buffer_start,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_buffer_end,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_backref,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_long_set,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_set,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_jump,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_alt,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_rep,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_combining,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_soft_buffer_end,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_restart_continue,
|
||||
(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_slow),
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_char_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_set_repeat,
|
||||
&perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_long_set_repeat,
|
||||
};
|
||||
|
||||
if(state_count > max_state_count)
|
||||
raise_error(traits_inst, REG_ESPACE);
|
||||
while(pstate)
|
||||
{
|
||||
matcher_proc_type proc = s_match_vtable[pstate->type];
|
||||
++state_count;
|
||||
if(!(this->*proc)())
|
||||
{
|
||||
if((m_match_flags & match_partial) && (position == last))
|
||||
m_has_partial_match = true;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_startmark()
|
||||
{
|
||||
int index = static_cast<const re_brace*>(pstate)->index;
|
||||
bool r = true;
|
||||
switch(index)
|
||||
{
|
||||
case 0:
|
||||
pstate = pstate->next.p;
|
||||
break;
|
||||
case -1:
|
||||
case -2:
|
||||
{
|
||||
// forward lookahead assert:
|
||||
BidiIterator old_position(position);
|
||||
const re_syntax_base* next_pstate = static_cast<const re_jump*>(pstate->next.p)->alt.p->next.p;
|
||||
pstate = pstate->next.p->next.p;
|
||||
r = match_all_states();
|
||||
pstate = next_pstate;
|
||||
position = old_position;
|
||||
if((r && (index != -1)) || (!r && (index != -2)))
|
||||
r = false;
|
||||
else
|
||||
r = true;
|
||||
break;
|
||||
}
|
||||
case -3:
|
||||
{
|
||||
// independent sub-expression:
|
||||
const re_syntax_base* next_pstate = static_cast<const re_jump*>(pstate->next.p)->alt.p->next.p;
|
||||
pstate = pstate->next.p->next.p;
|
||||
r = match_all_states();
|
||||
pstate = next_pstate;
|
||||
#ifdef BOOST_REGEX_MATCH_EXTRA
|
||||
if(r && (m_match_flags & match_extra))
|
||||
{
|
||||
//
|
||||
// our captures have been stored in *m_presult
|
||||
// we need to unpack them, and insert them
|
||||
// back in the right order when we unwind the stack:
|
||||
//
|
||||
unsigned i;
|
||||
match_results<BidiIterator, Allocator> tm(*m_presult);
|
||||
for(i = 0; i < tm.size(); ++i)
|
||||
(*m_presult)[i].get_captures().clear();
|
||||
// match everything else:
|
||||
r = match_all_states();
|
||||
// now place the stored captures back:
|
||||
for(i = 0; i < tm.size(); ++i)
|
||||
{
|
||||
typedef typename sub_match<BidiIterator>::capture_sequence_type seq;
|
||||
seq& s1 = (*m_presult)[i].get_captures();
|
||||
const seq& s2 = tm[i].captures();
|
||||
s1.insert(
|
||||
s1.end(),
|
||||
s2.begin(),
|
||||
s2.end());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
assert(index > 0);
|
||||
if((m_match_flags & match_nosubs) == 0)
|
||||
{
|
||||
backup_subex<BidiIterator> sub(*m_presult, index);
|
||||
m_presult->set_first(position, index);
|
||||
pstate = pstate->next.p;
|
||||
r = match_all_states();
|
||||
if(r == false)
|
||||
sub.restore(*m_presult);
|
||||
#ifdef BOOST_REGEX_MATCH_EXTRA
|
||||
//
|
||||
// we have a match, push the capture information onto the stack:
|
||||
//
|
||||
else if(sub.get().matched && (match_extra & m_match_flags))
|
||||
((*m_presult)[index]).get_captures().push_back(sub.get());
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_alt()
|
||||
{
|
||||
bool take_first, take_second;
|
||||
const re_jump* jmp = static_cast<const re_jump*>(pstate);
|
||||
|
||||
// find out which of these two alternatives we need to take:
|
||||
if(position == last)
|
||||
{
|
||||
take_first = jmp->can_be_null & mask_take;
|
||||
take_second = jmp->can_be_null & mask_skip;
|
||||
}
|
||||
else
|
||||
{
|
||||
take_first = access::can_start(*position, jmp->_map, (unsigned char)mask_take);
|
||||
take_second = access::can_start(*position, jmp->_map, (unsigned char)mask_skip);
|
||||
}
|
||||
|
||||
if(take_first)
|
||||
{
|
||||
// we can take the first alternative,
|
||||
// see if we need to push next alternative:
|
||||
if(take_second)
|
||||
{
|
||||
BidiIterator oldposition(position);
|
||||
const re_syntax_base* old_pstate = jmp->alt.p;
|
||||
pstate = pstate->next.p;
|
||||
if(!match_all_states())
|
||||
{
|
||||
pstate = old_pstate;
|
||||
position = oldposition;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
}
|
||||
if(take_second)
|
||||
{
|
||||
pstate = jmp->alt.p;
|
||||
return true;
|
||||
}
|
||||
return false; // neither option is possible
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_rep()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127 4244)
|
||||
#endif
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
if(next_count->get_id() != rep->id)
|
||||
{
|
||||
// we're moving to a different repeat from the last
|
||||
// one, so set up a counter object and recurse:
|
||||
repeater_count<BidiIterator> r(rep->id, &next_count, position);
|
||||
return match_rep();
|
||||
}
|
||||
//
|
||||
// If we've had at least one repeat already, and the last one
|
||||
// matched the NULL string then set the repeat count to
|
||||
// maximum:
|
||||
//
|
||||
next_count->check_null_repeat(position, rep->max);
|
||||
|
||||
// find out which of these two alternatives we need to take:
|
||||
bool take_first, take_second;
|
||||
if(position == last)
|
||||
{
|
||||
take_first = rep->can_be_null & mask_take;
|
||||
take_second = rep->can_be_null & mask_skip;
|
||||
}
|
||||
else
|
||||
{
|
||||
take_first = access::can_start(*position, rep->_map, (unsigned char)mask_take);
|
||||
take_second = access::can_start(*position, rep->_map, (unsigned char)mask_skip);
|
||||
}
|
||||
|
||||
if(next_count->get_count() < rep->min)
|
||||
{
|
||||
// we must take the repeat:
|
||||
if(take_first)
|
||||
{
|
||||
// increase the counter:
|
||||
++(*next_count);
|
||||
pstate = rep->next.p;
|
||||
return match_all_states();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if(rep->greedy)
|
||||
{
|
||||
// try and take the repeat if we can:
|
||||
if((next_count->get_count() < rep->max) && take_first)
|
||||
{
|
||||
// store position in case we fail:
|
||||
BidiIterator pos = position;
|
||||
// increase the counter:
|
||||
++(*next_count);
|
||||
pstate = rep->next.p;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
// failed repeat, reset posistion and fall through for alternative:
|
||||
position = pos;
|
||||
}
|
||||
if(take_second)
|
||||
{
|
||||
pstate = rep->alt.p;
|
||||
return true;
|
||||
}
|
||||
return false; // can't take anything, fail...
|
||||
}
|
||||
else // non-greedy
|
||||
{
|
||||
// try and skip the repeat if we can:
|
||||
if(take_second)
|
||||
{
|
||||
// store position in case we fail:
|
||||
BidiIterator pos = position;
|
||||
pstate = rep->alt.p;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
// failed alternative, reset posistion and fall through for repeat:
|
||||
position = pos;
|
||||
}
|
||||
if((next_count->get_count() < rep->max) && take_first)
|
||||
{
|
||||
// increase the counter:
|
||||
++(*next_count);
|
||||
pstate = rep->next.p;
|
||||
return match_all_states();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_slow()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
unsigned count = 0;
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
re_syntax_base* psingle = rep->next.p;
|
||||
// match compulsary repeats first:
|
||||
while(count < rep->min)
|
||||
{
|
||||
pstate = psingle;
|
||||
if(!match_wild())
|
||||
return false;
|
||||
++count;
|
||||
}
|
||||
if(rep->greedy)
|
||||
{
|
||||
// normal repeat:
|
||||
while(count < rep->max)
|
||||
{
|
||||
pstate = psingle;
|
||||
if(!match_wild())
|
||||
break;
|
||||
++count;
|
||||
}
|
||||
if((rep->leading) && (count < rep->max))
|
||||
restart = position;
|
||||
pstate = rep;
|
||||
return backtrack_till_match(count - rep->min);
|
||||
}
|
||||
else
|
||||
{
|
||||
// non-greedy, keep trying till we get a match:
|
||||
BidiIterator save_pos;
|
||||
do
|
||||
{
|
||||
if((rep->leading) && (rep->max == UINT_MAX))
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
return false;
|
||||
++count;
|
||||
pstate = psingle;
|
||||
position = save_pos;
|
||||
if(!match_wild())
|
||||
return false;
|
||||
}while(true);
|
||||
}
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_dot_repeat_fast()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
if(m_match_flags & (match_not_dot_newline | match_not_dot_null))
|
||||
return match_dot_repeat_slow();
|
||||
//
|
||||
// start by working out how much we can skip:
|
||||
//
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
unsigned count = (std::min)(static_cast<unsigned>(re_detail::distance(position, last)), (rep->greedy ? rep->max : rep->min));
|
||||
if(rep->min > count)
|
||||
return false; // not enough text left to match
|
||||
std::advance(position, count);
|
||||
if((rep->leading) && (count < rep->max) && (rep->greedy))
|
||||
restart = position;
|
||||
if(rep->greedy)
|
||||
return backtrack_till_match(count - rep->min);
|
||||
|
||||
// non-greedy, keep trying till we get a match:
|
||||
BidiIterator save_pos;
|
||||
do
|
||||
{
|
||||
while((position != last) && (count < rep->max) && !access::can_start(*position, rep->_map, mask_skip))
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
if((rep->leading) && (count == UINT_MAX))
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
return false;
|
||||
if(position == last)
|
||||
return false;
|
||||
position = ++save_pos;
|
||||
++count;
|
||||
}while(true);
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_char_repeat()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -w-8008 -w-8066 -w-8004
|
||||
#endif
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
assert(1 == static_cast<const re_literal*>(rep->next.p)->length);
|
||||
const char_type what = *reinterpret_cast<const char_type*>(static_cast<const re_literal*>(rep->next.p) + 1);
|
||||
unsigned count = 0;
|
||||
//
|
||||
// start by working out how much we can skip:
|
||||
//
|
||||
unsigned desired = rep->greedy ? rep->max : rep->min;
|
||||
if(::boost::is_random_access_iterator<BidiIterator>::value)
|
||||
{
|
||||
BidiIterator end = position;
|
||||
std::advance(end, (std::min)((unsigned)re_detail::distance(position, last), desired));
|
||||
BidiIterator origin(position);
|
||||
while((position != end) && (traits_inst.translate(*position, icase) == what))
|
||||
{
|
||||
++position;
|
||||
}
|
||||
count = (unsigned)re_detail::distance(origin, position);
|
||||
}
|
||||
else
|
||||
{
|
||||
while((count < desired) && (position != last) && (traits_inst.translate(*position, icase) == what))
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
}
|
||||
if((rep->leading) && (count < rep->max) && (rep->greedy))
|
||||
restart = position;
|
||||
if(count < rep->min)
|
||||
return false;
|
||||
|
||||
if(rep->greedy)
|
||||
return backtrack_till_match(count - rep->min);
|
||||
|
||||
// non-greedy, keep trying till we get a match:
|
||||
BidiIterator save_pos;
|
||||
do
|
||||
{
|
||||
while((position != last) && (count < rep->max) && !access::can_start(*position, rep->_map, mask_skip))
|
||||
{
|
||||
if((traits_inst.translate(*position, icase) == what))
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
else
|
||||
return false; // counldn't repeat even though it was the only option
|
||||
}
|
||||
if((rep->leading) && (rep->max == UINT_MAX))
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
return false;
|
||||
if(position == last)
|
||||
return false;
|
||||
position = save_pos;
|
||||
if(traits_inst.translate(*position, icase) == what)
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}while(true);
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_set_repeat()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -w-8008 -w-8066 -w-8004
|
||||
#endif
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
const unsigned char* map = static_cast<const re_set*>(rep->next.p)->_map;
|
||||
unsigned count = 0;
|
||||
//
|
||||
// start by working out how much we can skip:
|
||||
//
|
||||
unsigned desired = rep->greedy ? rep->max : rep->min;
|
||||
if(::boost::is_random_access_iterator<BidiIterator>::value)
|
||||
{
|
||||
BidiIterator end = position;
|
||||
std::advance(end, (std::min)((unsigned)re_detail::distance(position, last), desired));
|
||||
BidiIterator origin(position);
|
||||
while((position != end) && map[(traits_uchar_type)traits_inst.translate(*position, icase)])
|
||||
{
|
||||
++position;
|
||||
}
|
||||
count = (unsigned)re_detail::distance(origin, position);
|
||||
}
|
||||
else
|
||||
{
|
||||
while((count < desired) && (position != last) && map[(traits_uchar_type)traits_inst.translate(*position, icase)])
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
}
|
||||
if((rep->leading) && (count < rep->max) && (rep->greedy))
|
||||
restart = position;
|
||||
if(count < rep->min)
|
||||
return false;
|
||||
|
||||
if(rep->greedy)
|
||||
return backtrack_till_match(count - rep->min);
|
||||
|
||||
// non-greedy, keep trying till we get a match:
|
||||
BidiIterator save_pos;
|
||||
do
|
||||
{
|
||||
while((position != last) && (count < rep->max) && !access::can_start(*position, rep->_map, mask_skip))
|
||||
{
|
||||
if(map[(traits_uchar_type)traits_inst.translate(*position, icase)])
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
else
|
||||
return false; // counldn't repeat even though it was the only option
|
||||
}
|
||||
if((rep->leading) && (rep->max == UINT_MAX))
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
return false;
|
||||
if(position == last)
|
||||
return false;
|
||||
position = save_pos;
|
||||
if(map[(traits_uchar_type)traits_inst.translate(*position, icase)])
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}while(true);
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::match_long_set_repeat()
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option push -w-8008 -w-8066 -w-8004
|
||||
#endif
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
const re_set_long* set = static_cast<const re_set_long*>(pstate->next.p);
|
||||
unsigned count = 0;
|
||||
//
|
||||
// start by working out how much we can skip:
|
||||
//
|
||||
unsigned desired = rep->greedy ? rep->max : rep->min;
|
||||
if(::boost::is_random_access_iterator<BidiIterator>::value)
|
||||
{
|
||||
BidiIterator end = position;
|
||||
std::advance(end, (std::min)((unsigned)re_detail::distance(position, last), desired));
|
||||
BidiIterator origin(position);
|
||||
while((position != end) && (position != re_is_set_member(position, last, set, re)))
|
||||
{
|
||||
++position;
|
||||
}
|
||||
count = (unsigned)re_detail::distance(origin, position);
|
||||
}
|
||||
else
|
||||
{
|
||||
while((count < desired) && (position != last) && (position != re_is_set_member(position, last, set, re)))
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
}
|
||||
if((rep->leading) && (count < rep->max) && (rep->greedy))
|
||||
restart = position;
|
||||
if(count < rep->min)
|
||||
return false;
|
||||
|
||||
if(rep->greedy)
|
||||
return backtrack_till_match(count - rep->min);
|
||||
|
||||
// non-greedy, keep trying till we get a match:
|
||||
BidiIterator save_pos;
|
||||
do
|
||||
{
|
||||
while((position != last) && (count < rep->max) && !access::can_start(*position, rep->_map, mask_skip))
|
||||
{
|
||||
if(position != re_is_set_member(position, last, set, re))
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
else
|
||||
return false; // counldn't repeat even though it was the only option
|
||||
}
|
||||
if((rep->leading) && (rep->max == UINT_MAX))
|
||||
restart = position;
|
||||
pstate = rep->alt.p;
|
||||
save_pos = position;
|
||||
++state_count;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count >= rep->max)
|
||||
return false;
|
||||
if(position == last)
|
||||
return false;
|
||||
position = save_pos;
|
||||
if(position != re_is_set_member(position, last, set, re))
|
||||
{
|
||||
++position;
|
||||
++count;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}while(true);
|
||||
#ifdef __BORLANDC__
|
||||
#pragma option pop
|
||||
#endif
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class BidiIterator, class Allocator, class traits, class Allocator2>
|
||||
bool perl_matcher<BidiIterator, Allocator, traits, Allocator2>::backtrack_till_match(unsigned count)
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4127)
|
||||
#endif
|
||||
if((m_match_flags & match_partial) && (position == last))
|
||||
m_has_partial_match = true;
|
||||
|
||||
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
|
||||
BidiIterator backtrack = position;
|
||||
if(position == last)
|
||||
{
|
||||
if(rep->can_be_null & mask_skip)
|
||||
{
|
||||
pstate = rep->alt.p;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
}
|
||||
if(count)
|
||||
{
|
||||
position = --backtrack;
|
||||
--count;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
do
|
||||
{
|
||||
while(count && !access::can_start(*position, rep->_map, mask_skip))
|
||||
{
|
||||
--position;
|
||||
--count;
|
||||
++state_count;
|
||||
}
|
||||
pstate = rep->alt.p;
|
||||
backtrack = position;
|
||||
if(match_all_states())
|
||||
return true;
|
||||
if(count == 0)
|
||||
return false;
|
||||
position = --backtrack;
|
||||
++state_count;
|
||||
--count;
|
||||
}while(true);
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regbase.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares class regbase.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_V4_REGBASE_HPP
|
||||
#define BOOST_REGEX_V4_REGBASE_HPP
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
|
||||
namespace boost{
|
||||
//
|
||||
// class regbase
|
||||
// handles error codes and flags
|
||||
//
|
||||
class BOOST_REGEX_DECL regbase
|
||||
{
|
||||
public:
|
||||
enum flag_type_
|
||||
{
|
||||
escape_in_lists = 1, // '\' special inside [...]
|
||||
char_classes = escape_in_lists << 1, // [[:CLASS:]] allowed
|
||||
intervals = char_classes << 1, // {x,y} allowed
|
||||
limited_ops = intervals << 1, // all of + ? and | are normal characters
|
||||
newline_alt = limited_ops << 1, // \n is the same as |
|
||||
bk_plus_qm = newline_alt << 1, // uses \+ and \?
|
||||
bk_braces = bk_plus_qm << 1, // uses \{ and \}
|
||||
bk_parens = bk_braces << 1, // uses \( and \)
|
||||
bk_refs = bk_parens << 1, // \d allowed
|
||||
bk_vbar = bk_refs << 1, // uses \|
|
||||
|
||||
use_except = bk_vbar << 1, // exception on error
|
||||
failbit = use_except << 1, // error flag
|
||||
literal = failbit << 1, // all characters are literals
|
||||
icase = literal << 1, // characters are matched regardless of case
|
||||
nocollate = 0, // don't use locale specific collation (deprecated)
|
||||
collate = icase << 1, // use locale specific collation
|
||||
perlex = collate << 1, // perl extensions
|
||||
nosubs = perlex << 1, // don't mark sub-expressions
|
||||
optimize = 0, // not really supported
|
||||
|
||||
basic = char_classes | intervals | limited_ops | bk_braces | bk_parens | bk_refs | collate,
|
||||
extended = char_classes | intervals | bk_refs | collate,
|
||||
normal = perlex | escape_in_lists | char_classes | intervals | bk_refs | nocollate,
|
||||
emacs = bk_braces | bk_parens | bk_refs | bk_vbar,
|
||||
awk = extended | escape_in_lists,
|
||||
grep = basic | newline_alt,
|
||||
egrep = extended | newline_alt,
|
||||
sed = basic,
|
||||
perl = normal,
|
||||
ECMAScript = normal,
|
||||
JavaScript = normal,
|
||||
JScript = normal
|
||||
};
|
||||
typedef unsigned int flag_type;
|
||||
|
||||
enum restart_info
|
||||
{
|
||||
restart_any = 0,
|
||||
restart_word = 1,
|
||||
restart_line = 2,
|
||||
restart_buf = 3,
|
||||
restart_continue = 4,
|
||||
restart_lit = 5,
|
||||
restart_fixed_lit = 6,
|
||||
restart_count = 7
|
||||
};
|
||||
|
||||
flag_type BOOST_REGEX_CALL flags()const
|
||||
{
|
||||
return _flags;
|
||||
}
|
||||
|
||||
regbase();
|
||||
regbase(const regbase& b);
|
||||
void swap(regbase& that)
|
||||
{ std::swap(_flags, that._flags); }
|
||||
protected:
|
||||
flag_type _flags;
|
||||
};
|
||||
|
||||
//
|
||||
// provide std lib proposal compatible constants:
|
||||
//
|
||||
namespace regex_constants{
|
||||
|
||||
enum flag_type_
|
||||
{
|
||||
escape_in_lists = ::boost::regbase::escape_in_lists,
|
||||
char_classes = ::boost::regbase::char_classes,
|
||||
intervals = ::boost::regbase::intervals,
|
||||
limited_ops = ::boost::regbase::limited_ops,
|
||||
newline_alt = ::boost::regbase::newline_alt,
|
||||
bk_plus_qm = ::boost::regbase::bk_plus_qm,
|
||||
bk_braces = ::boost::regbase::bk_braces,
|
||||
bk_parens = ::boost::regbase::bk_parens,
|
||||
bk_refs = ::boost::regbase::bk_refs,
|
||||
bk_vbar = ::boost::regbase::bk_vbar,
|
||||
|
||||
use_except = ::boost::regbase::use_except,
|
||||
failbit = ::boost::regbase::failbit,
|
||||
literal = ::boost::regbase::literal,
|
||||
icase = ::boost::regbase::icase,
|
||||
nocollate = ::boost::regbase::nocollate,
|
||||
collate = ::boost::regbase::collate,
|
||||
perlex = ::boost::regbase::perlex,
|
||||
nosubs = ::boost::regbase::nosubs,
|
||||
optimize = ::boost::regbase::optimize,
|
||||
|
||||
basic = ::boost::regbase::basic,
|
||||
extended = ::boost::regbase::extended,
|
||||
normal = ::boost::regbase::normal,
|
||||
emacs = ::boost::regbase::emacs,
|
||||
awk = ::boost::regbase::awk,
|
||||
grep = ::boost::regbase::grep,
|
||||
egrep = ::boost::regbase::egrep,
|
||||
sed = basic,
|
||||
perl = normal,
|
||||
ECMAScript = normal,
|
||||
JavaScript = normal,
|
||||
JScript = normal
|
||||
};
|
||||
typedef ::boost::regbase::flag_type syntax_option_type;
|
||||
|
||||
} // namespace regex_constants
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex.cpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Declares boost::reg_expression<> and associated
|
||||
* functions and classes. This header is the main
|
||||
* entry point for the template regex code.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RE_REGEX_HPP_INCLUDED
|
||||
#define BOOST_RE_REGEX_HPP_INCLUDED
|
||||
|
||||
#ifndef BOOST_RE_CREGEX_HPP
|
||||
#include <boost/cregex.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
// what follows is all C++ don't include in C builds!!
|
||||
|
||||
#ifdef BOOST_REGEX_DEBUG
|
||||
# include <iosfwd>
|
||||
#endif
|
||||
|
||||
#include <new>
|
||||
#include <cstring>
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_FWD_HPP
|
||||
#include <boost/regex_fwd.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_STACK_HPP
|
||||
#include <boost/regex/v4/regex_stack.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_RAW_BUFFER_HPP
|
||||
#include <boost/regex/v4/regex_raw_buffer.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_KMP_HPP
|
||||
#include <boost/regex/v4/regex_kmp.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_RE_PAT_EXCEPT_HPP
|
||||
#include <boost/regex/pattern_except.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_TRAITS_HPP
|
||||
#include <boost/regex/regex_traits.hpp>
|
||||
#endif
|
||||
#include <boost/scoped_array.hpp>
|
||||
|
||||
#ifndef BOOST_REGEX_V4_CHAR_REGEX_TRAITS_HPP
|
||||
#include <boost/regex/v4/char_regex_traits.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_STATES_HPP
|
||||
#include <boost/regex/v4/states.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_REGBASE_HPP
|
||||
#include <boost/regex/v4/regbase.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_ITERATOR_TRAITS_HPP
|
||||
#include <boost/regex/v4/iterator_traits.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_ITERATOR_TRAITS_HPP
|
||||
#include <boost/regex/v4/iterator_traits.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_BASIC_REGEX_HPP
|
||||
#include <boost/regex/v4/basic_regex.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_SUB_MATCH_HPP
|
||||
#include <boost/regex/v4/sub_match.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_FORMAT_HPP
|
||||
#include <boost/regex/v4/regex_format.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_MATCH_RESULTS_HPP
|
||||
#include <boost/regex/v4/match_results.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_COMPILE_HPP
|
||||
#include <boost/regex/v4/regex_compile.hpp>
|
||||
#endif
|
||||
|
||||
//
|
||||
// template instances:
|
||||
//
|
||||
#define BOOST_REGEX_CHAR_T char
|
||||
#ifdef BOOST_REGEX_NARROW_INSTANTIATE
|
||||
# define BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
#include <boost/regex/v4/instances.hpp>
|
||||
#undef BOOST_REGEX_CHAR_T
|
||||
#ifdef BOOST_REGEX_INSTANTIATE
|
||||
# undef BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
#define BOOST_REGEX_CHAR_T boost::regex_wchar_type
|
||||
#ifdef BOOST_REGEX_WIDE_INSTANTIATE
|
||||
# define BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
#include <boost/regex/v4/instances.hpp>
|
||||
#undef BOOST_REGEX_CHAR_T
|
||||
#ifdef BOOST_REGEX_INSTANTIATE
|
||||
# undef BOOST_REGEX_INSTANTIATE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost{
|
||||
#ifdef BOOST_REGEX_NO_FWD
|
||||
typedef reg_expression<char, regex_traits<char>, BOOST_DEFAULT_ALLOCATOR(char)> regex;
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
typedef reg_expression<wchar_t, regex_traits<wchar_t>, BOOST_DEFAULT_ALLOCATOR(wchar_t)> wregex;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef match_results<const char*> cmatch;
|
||||
typedef match_results<std::string::const_iterator> smatch;
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
typedef match_results<const wchar_t*> wcmatch;
|
||||
typedef match_results<std::wstring::const_iterator> wsmatch;
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
#ifndef BOOST_REGEX_MATCH_HPP
|
||||
#include <boost/regex/v4/regex_match.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_REGEX_SEARCH_HPP
|
||||
#include <boost/regex/v4/regex_search.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_REGEX_GREP_HPP
|
||||
#include <boost/regex/v4/regex_grep.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_REGEX_REPLACE_HPP
|
||||
#include <boost/regex/v4/regex_replace.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_V4_REGEX_MERGE_HPP
|
||||
#include <boost/regex/v4/regex_merge.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_SPLIT_HPP
|
||||
#include <boost/regex/v4/regex_split.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_ITERATOR_HPP
|
||||
#include <boost/regex/v4/regex_iterator.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_REGEX_TOKEN_ITERATOR_HPP
|
||||
#include <boost/regex/v4/regex_token_iterator.hpp>
|
||||
#endif
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // include
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 1998-2002
|
||||
* Dr John Maddock
|
||||
*
|
||||
* Use, modification and distribution are subject to the
|
||||
* Boost Software License, Version 1.0. (See accompanying file
|
||||
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE regex_cstring.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: This is an internal header file, do not include directly.
|
||||
* String support and helper functions, for regular
|
||||
* expression library.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_REGEX_CSTRING_HPP
|
||||
#define BOOST_REGEX_CSTRING_HPP
|
||||
|
||||
#ifndef BOOST_REGEX_CONFIG_HPP
|
||||
#include <boost/regex/config.hpp>
|
||||
#endif
|
||||
|
||||
#include <cstring>
|
||||
|
||||
namespace boost{
|
||||
namespace re_detail{
|
||||
|
||||
//
|
||||
// start by defining some template function aliases for C API functions:
|
||||
//
|
||||
|
||||
template <class charT>
|
||||
std::size_t BOOST_REGEX_CALL re_strlen(const charT *s)
|
||||
{
|
||||
std::size_t len = 0;
|
||||
while(*s)
|
||||
{
|
||||
++s;
|
||||
++len;
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
inline std::size_t BOOST_REGEX_CALL re_strlen(const char *s)
|
||||
{
|
||||
return std::strlen(s);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
|
||||
inline std::size_t BOOST_REGEX_CALL re_strlen(const wchar_t *s)
|
||||
{
|
||||
return std::wcslen(s);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL re_transform(std::basic_string<wchar_t>& out, const std::basic_string<wchar_t>& in);
|
||||
#endif
|
||||
BOOST_REGEX_DECL void BOOST_REGEX_CALL re_transform(std::string& out, const std::string& in);
|
||||
|
||||
template <class charT>
|
||||
void BOOST_REGEX_CALL re_trunc_primary(std::basic_string<charT>& s)
|
||||
{
|
||||
for(unsigned int i = 0; i < s.size(); ++i)
|
||||
{
|
||||
if(s[i] <= 1)
|
||||
{
|
||||
s.erase(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inline char* BOOST_REGEX_CALL re_strcpy(char *s1, const char *s2)
|
||||
{
|
||||
#if defined(__BORLANDC__) && defined(strcpy)
|
||||
return ::strcpy(s1, s2);
|
||||
#else
|
||||
return std::strcpy(s1, s2);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_WREGEX
|
||||
|
||||
inline wchar_t* BOOST_REGEX_CALL re_strcpy(wchar_t *s1, const wchar_t *s2)
|
||||
{
|
||||
return std::wcscpy(s1, s2);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
template <class charT>
|
||||
charT* BOOST_REGEX_CALL re_strdup(const charT* p)
|
||||
{
|
||||
charT* buf = new charT[re_strlen(p) + 1];
|
||||
re_strcpy(buf, p);
|
||||
return buf;
|
||||
}
|
||||
|
||||
template <class charT>
|
||||
inline void BOOST_REGEX_CALL re_strfree(charT* p)
|
||||
{
|
||||
delete[] p;
|
||||
}
|
||||
|
||||
} // namespace re_detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_REGEX_CSTRING_HPP
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user