/*************************************************
* Perl-Compatible Regular Expressions *
*************************************************/
/* PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
Copyright (c) 1997-2008 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the University of Cambridge nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
*/
/* This module contains the external function pcre_compile(), along with
supporting internal functions that are not used by other modules. */
#include "pcre_config.h"
#define NLBLOCK cd /* Block containing newline information */
#define PSSTART start_pattern /* Field containing processed string start */
#define PSEND end_pattern /* Field containing processed string end */
#include "pcre_internal.h"
/* When DEBUG is defined, we need the pcre_printint() function, which is also
used by pcretest. DEBUG is not defined when building a production library. */
#ifdef DEBUG
#include "pcre_printint.src"
#endif
/* Macro for setting individual bits in class bitmaps. */
#define SETBIT(a,b) a[b/8] |= (1 << (b%8))
/* Maximum length value to check against when making sure that the integer that
holds the compiled pattern length does not overflow. We make it a bit less than
INT_MAX to allow for adding in group terminating bytes, so that we don't have
to check them every time. */
#define OFLOW_MAX (INT_MAX - 20)
/*************************************************
* Code parameters and static tables *
*************************************************/
/* This value specifies the size of stack workspace that is used during the
first pre-compile phase that determines how much memory is required. The regex
is partly compiled into this space, but the compiled parts are discarded as
soon as they can be, so that hopefully there will never be an overrun. The code
does, however, check for an overrun. The largest amount I've seen used is 218,
so this number is very generous.
The same workspace is used during the second, actual compile phase for
remembering forward references to groups so that they can be filled in at the
end. Each entry in this list occupies LINK_SIZE bytes, so even when LINK_SIZE
is 4 there is plenty of room. */
#define COMPILE_WORK_SIZE (4096)
/* Table for handling escaped characters in the range '0'-'z'. Positive returns
are simple data values; negative values are for special things like \d and so
on. Zero means further processing is needed (for things like \x), or the escape
is invalid. */
#ifndef EBCDIC /* This is the "normal" table for ASCII systems */
static const short int escapes[] = {
0, 0, 0, 0, 0, 0, 0, 0, /* 0 - 7 */
0, 0, ':', ';', '<', '=', '>', '?', /* 8 - ? */
'@', -ESC_A, -ESC_B, -ESC_C, -ESC_D, -ESC_E, 0, -ESC_G, /* @ - G */
-ESC_H, 0, 0, -ESC_K, 0, 0, 0, 0, /* H - O */
-ESC_P, -ESC_Q, -ESC_R, -ESC_S, 0, 0, -ESC_V, -ESC_W, /* P - W */
-ESC_X, 0, -ESC_Z, '[', '\\', ']', '^', '_', /* X - _ */
'`', 7, -ESC_b, 0, -ESC_d, ESC_e, ESC_f, 0, /* ` - g */
-ESC_h, 0, 0, -ESC_k, 0, 0, ESC_n, 0, /* h - o */
-ESC_p, 0, ESC_r, -ESC_s, ESC_tee, 0, -ESC_v, -ESC_w, /* p - w */
0, 0, -ESC_z /* x - z */
};
#else /* This is the "abnormal" table for EBCDIC systems */
static const short int escapes[] = {
/* 48 */ 0, 0, 0, '.', '<', '(', '+', '|',
/* 50 */ '&', 0, 0, 0, 0, 0, 0, 0,
/* 58 */ 0, 0, '!', '$', '*', ')', ';', '~',
/* 60 */ '-', '/', 0, 0, 0, 0, 0, 0,
/* 68 */ 0, 0, '|', ',', '%', '_', '>', '?',
/* 70 */ 0, 0, 0, 0, 0, 0, 0, 0,
/* 78 */ 0, '`', ':', '#', '@', '\'', '=', '"',
/* 80 */ 0, 7, -ESC_b, 0, -ESC_d, ESC_e, ESC_f, 0,
/* 88 */-ESC_h, 0, 0, '{', 0, 0, 0, 0,
/* 90 */ 0, 0, -ESC_k, 'l', 0, ESC_n, 0, -ESC_p,
/* 98 */ 0, ESC_r, 0, '}', 0, 0, 0, 0,
/* A0 */ 0, '~', -ESC_s, ESC_tee, 0,-ESC_v, -ESC_w, 0,
/* A8 */ 0,-ESC_z, 0, 0, 0, '[', 0, 0,
/* B0 */ 0, 0, 0, 0, 0, 0, 0, 0,
/* B8 */ 0, 0, 0, 0, 0, ']', '=', '-',
/* C0 */ '{',-ESC_A, -ESC_B, -ESC_C, -ESC_D,-ESC_E, 0, -ESC_G,
/* C8 */-ESC_H, 0, 0, 0, 0, 0, 0, 0,
/* D0 */ '}', 0, -ESC_K, 0, 0, 0, 0, -ESC_P,
/* D8 */-ESC_Q,-ESC_R, 0, 0, 0, 0, 0, 0,
/* E0 */ '\\', 0, -ESC_S, 0, 0,-ESC_V, -ESC_W, -ESC_X,
/* E8 */ 0,-ESC_Z, 0, 0, 0, 0, 0, 0,
/* F0 */ 0, 0, 0, 0, 0, 0, 0, 0,
/* F8 */ 0, 0, 0, 0, 0, 0, 0, 0
};
#endif
/* Table of special "verbs" like (*PRUNE). This is a short table, so it is
searched linearly. Put all the names into a single string, in order to reduce
the number of relocations when a shared library is dynamically linked. */
typedef struct verbitem {
int len;
int op;
} verbitem;
static const char verbnames[] =
"ACCEPT\0"
"COMMIT\0"
"F\0"
"FAIL\0"
"PRUNE\0"
"SKIP\0"
"THEN";
static const verbitem verbs[] = {
{ 6, OP_ACCEPT },
{ 6, OP_COMMIT },
{ 1, OP_FAIL },
{ 4, OP_FAIL },
{ 5, OP_PRUNE },
{ 4, OP_SKIP },
{ 4, OP_THEN }
};
static const int verbcount = sizeof(verbs)/sizeof(verbitem);
/* Tables of names of POSIX character classes and their lengths. The names are
now all in a single string, to reduce the number of relocations when a shared
library is dynamically loaded. The list of lengths is terminated by a zero
length entry. The first three must be alpha, lower, upper, as this is assumed
for
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
poco-1.3.6 for windows (1815个子文件)
makedepend.aCC 466B
AIX 2KB
Angstrom 1KB
ARM-Linux 2KB
MSG00001.bin 241B
pcre_compile.c 204KB
pcre_exec.c 152KB
pcre_ucd.c 146KB
deflate.c 64KB
inflate.c 49KB
xmltok_impl.c 45KB
trees.c 44KB
xmltok.c 42KB
xmlrole.c 33KB
gzio.c 31KB
infback.c 22KB
pcre_study.c 18KB
inftrees.c 14KB
crc32.c 13KB
inffast.c 13KB
pcre_tables.c 10KB
pcre_chartables.c 8KB
zutil.c 7KB
pcre_newline.c 6KB
pcre_valid_utf8.c 6KB
pcre_maketables.c 6KB
pcre_try_flipped.c 5KB
pcre_fullinfo.c 5KB
pcre_xclass.c 5KB
adler32.c 5KB
pcre_ord2utf8.c 3KB
xmltok_ns.c 3KB
pcre_globals.c 3KB
compress.c 3KB
.cdtproject 3KB
.cdtproject 3KB
.cdtproject 3KB
.cdtproject 3KB
CEGCCARM 2KB
CHANGELOG 62KB
PocoConfig.cmake 5KB
buildwin.cmd 6KB
build_vcexpress.cmd 56B
build_vs80.cmd 46B
build_vs71.cmd 46B
build_vs90.cmd 46B
build.com 5KB
pocolnk.com 2KB
pococxx.com 1KB
pococc.com 980B
pocolib.com 773B
buildvms.com 584B
compile 3KB
components 37B
configure 6KB
CONTRIBUTORS 951B
xmlparse.cpp 195KB
SAXParserTest.cpp 52KB
PathTest.cpp 45KB
NamedTuplesTest.cpp 43KB
NodeTest.cpp 42KB
DateTimeTest.cpp 29KB
ParserEngine.cpp 26KB
DynamicAnyTest.cpp 25KB
URITest.cpp 24KB
EventTest.cpp 23KB
ElementTest.cpp 21KB
XMLWriter.cpp 20KB
SocketImpl.cpp 19KB
Path.cpp 19KB
XMLWriterTest.cpp 18KB
NetworkInterface.cpp 18KB
HTTPServerTest.cpp 18KB
URI.cpp 18KB
IPAddress.cpp 17KB
TuplesTest.cpp 17KB
DateTimeParserTest.cpp 16KB
PriorityEventTest.cpp 15KB
FTPClientSessionTest.cpp 15KB
TypeListTest.cpp 15KB
WinRegistryKey.cpp 15KB
ServerApplication.cpp 14KB
ByteOrderTest.cpp 14KB
MailMessage.cpp 14KB
MailMessageTest.cpp 14KB
GlobTest.cpp 14KB
ParserWriterTest.cpp 13KB
FTPClientSession.cpp 13KB
Random.cpp 13KB
LocalDateTimeTest.cpp 13KB
RemoteSyslogListener.cpp 13KB
FileChannelTest.cpp 13KB
TaskManagerTest.cpp 13KB
HTTPResponse.cpp 12KB
Application.cpp 12KB
SocketTest.cpp 12KB
LoggingConfiguratorTest.cpp 12KB
FIFOEventTest.cpp 12KB
Element.cpp 11KB
DateTime.cpp 11KB
共 1815 条
- 1
- 2
- 3
- 4
- 5
- 6
- 19
资源评论
qqwangqq7
- 粉丝: 2
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Screenshot_20240427_031602.jpg
- 网页PDF_2024年04月26日 23-46-14_QQ浏览器网页保存_QQ浏览器转格式(6).docx
- 直接插入排序,冒泡排序,直接选择排序.zip
- 在排序2的基础上,再次对快排进行优化,其次增加快排非递归,归并排序,归并排序非递归版.zip
- 实现了7种排序算法.三种复杂度排序.三种nlogn复杂度排序(堆排序,归并排序,快速排序)一种线性复杂度的排序.zip
- 冒泡排序 直接选择排序 直接插入排序 随机快速排序 归并排序 堆排序.zip
- 课设-内部排序算法比较 包括冒泡排序、直接插入排序、简单选择排序、快速排序、希尔排序、归并排序和堆排序.zip
- Python排序算法.zip
- C语言实现直接插入排序、希尔排序、选择排序、冒泡排序、堆排序、快速排序、归并排序、计数排序,并带图详解.zip
- 常用工具集参考用于图像等数据处理
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功