亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? regularexpression.cpp

?? IBM的解析xml的工具Xerces的源代碼
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
/* * Copyright 2001-2004 The Apache Software Foundation. *  * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at *  *      http://www.apache.org/licenses/LICENSE-2.0 *  * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *//* * $Log: RegularExpression.cpp,v $ * Revision 1.23  2004/09/08 13:56:47  peiyongz * Apache License Version 2.0 * * Revision 1.22  2004/01/13 20:05:00  peiyongz * revert code back to previous version * * Revision 1.19  2003/12/24 15:24:15  cargilld * More updates to memory management so that the static memory manager. * * Revision 1.18  2003/12/17 05:16:59  neilg * ensure all uses of ArrayJanitor use a memory manager * * Revision 1.17  2003/12/17 00:18:37  cargilld * Update to memory management so that the static memory manager (one used to call Initialize) is only for static data. * * Revision 1.16  2003/12/16 12:25:48  cargilld * Change a conditional expression to an if-else to avoid a compiler problem. * * Revision 1.15  2003/10/01 16:32:40  neilg * improve handling of out of memory conditions, bug #23415.  Thanks to David Cargill. * * Revision 1.14  2003/08/14 02:57:27  knoaman * Code refactoring to improve performance of validation. * * Revision 1.13  2003/05/25 21:42:41  knoaman * Allocate/Deallocate Context::xxx only when necessary. * * Revision 1.12  2003/05/18 14:02:06  knoaman * Memory manager implementation: pass per instance manager. * * Revision 1.11  2003/05/16 21:37:00  knoaman * Memory manager implementation: Modify constructors to pass in the memory manager. * * Revision 1.10  2003/05/16 06:01:57  knoaman * Partial implementation of the configurable memory manager. * * Revision 1.9  2003/05/16 00:03:10  knoaman * Partial implementation of the configurable memory manager. * * Revision 1.8  2003/05/15 18:42:54  knoaman * Partial implementation of the configurable memory manager. * * Revision 1.7  2003/05/12 10:08:22  gareth * The correct file this time. * * Revision 1.5  2002/12/18 13:01:02  gareth * New functionality - tokenize and replace. Fixed REVISIT for case insensitive match. Patch by Jennifer Schachter. * * Revision 1.4  2002/11/04 15:17:00  tng * C++ Namespace Support. * * Revision 1.3  2002/10/15 18:56:02  knoaman * [Bug 13604] while loop never terminates. * * Revision 1.2  2002/03/18 19:29:53  knoaman * Change constant names to eliminate possible conflict with user defined ones. * * Revision 1.1.1.1  2002/02/01 22:22:30  peiyongz * sane_include * * Revision 1.6  2002/01/02 20:09:11  knoaman * Fix for regular expression patterns that begin with ".". * * Revision 1.5  2001/10/09 12:20:25  tng * Leak fix: Need to delete fMatch if adopted. * * Revision 1.4  2001/05/11 21:50:58  knoaman * Schema updates and fixes. * * Revision 1.3  2001/05/11 13:26:46  tng * Copyright update. * * Revision 1.2  2001/05/03 18:17:42  knoaman * Some design changes: * o Changed the TokenFactory from a single static instance, to a *    normal class. Each RegularExpression object will have its own *    instance of TokenFactory, and that instance will be passed to *    other classes that need to use a TokenFactory to create Token *    objects (with the exception of RangeTokenMap). * o Added a new class RangeTokenMap to map a the different ranges *    in a given category to a specific RangeFactory object. In the old *    design RangeFactory had dual functionality (act as a Map, and as *    a factory for creating RangeToken(s)). The RangeTokenMap will *    have its own copy of the TokenFactory. There will be only one *    instance of the RangeTokenMap class, and that instance will be *    lazily deleted when XPlatformUtils::Terminate is called. * * Revision 1.1  2001/03/02 19:22:52  knoaman * Schema: Regular expression handling part I * */// ---------------------------------------------------------------------------//  Includes// ---------------------------------------------------------------------------#include <xercesc/util/regx/RegularExpression.hpp>#include <xercesc/util/PlatformUtils.hpp>#include <xercesc/util/regx/RegxUtil.hpp>#include <xercesc/util/regx/Match.hpp>#include <xercesc/util/regx/RangeToken.hpp>#include <xercesc/util/regx/RegxDefs.hpp>#include <xercesc/util/regx/XMLUniCharacter.hpp>#include <xercesc/util/regx/ParserForXMLSchema.hpp>#include <xercesc/util/Janitor.hpp>#include <xercesc/util/ParseException.hpp>#include <xercesc/util/IllegalArgumentException.hpp>#include <xercesc/framework/XMLBuffer.hpp>#include <xercesc/util/OutOfMemoryException.hpp>XERCES_CPP_NAMESPACE_BEGIN// ---------------------------------------------------------------------------//  Static member data initialization// ---------------------------------------------------------------------------const unsigned int RegularExpression::MARK_PARENS = 1;const unsigned int RegularExpression::IGNORE_CASE = 2;const unsigned int RegularExpression::SINGLE_LINE = 4;const unsigned int RegularExpression::MULTIPLE_LINE = 8;const unsigned int RegularExpression::EXTENDED_COMMENT = 16;const unsigned int RegularExpression::USE_UNICODE_CATEGORY = 32;const unsigned int RegularExpression::UNICODE_WORD_BOUNDARY = 64;const unsigned int RegularExpression::PROHIBIT_HEAD_CHARACTER_OPTIMIZATION = 128;const unsigned int RegularExpression::PROHIBIT_FIXED_STRING_OPTIMIZATION = 256;const unsigned int RegularExpression::XMLSCHEMA_MODE = 512;const unsigned int RegularExpression::SPECIAL_COMMA = 1024;const unsigned short RegularExpression::WT_IGNORE = 0;const unsigned short RegularExpression::WT_LETTER = 1;const unsigned short RegularExpression::WT_OTHER = 2;RangeToken*          RegularExpression::fWordRange = 0;// ---------------------------------------------------------------------------//  RegularExpression::Context: Constructors and Destructor// ---------------------------------------------------------------------------RegularExpression::Context::Context(MemoryManager* const manager) :    	fAdoptMatch(false)    , fStart(0)	, fLimit(0)	, fLength(0)	, fSize(0)    , fStringMaxLen(0)	, fOffsets(0)	, fMatch(0)	, fString(0)    , fMemoryManager(manager){}RegularExpression::Context::~Context(){	if (fOffsets)        fMemoryManager->deallocate(fOffsets);//delete [] fOffsets;    fMemoryManager->deallocate(fString);//delete [] fString;	if (fAdoptMatch)		delete fMatch;}// ---------------------------------------------------------------------------//  RegularExpression::Context: Public methods// ---------------------------------------------------------------------------void RegularExpression::Context::reset(const XMLCh* const string                                       , const int stringLen                                       , const int start                                       , const int limit                                       , const int noClosures){    if (stringLen > fStringMaxLen || !fString) {        fStringMaxLen = stringLen;        if (fString)            fMemoryManager->deallocate(fString);        fString = XMLString::replicate(string, fMemoryManager);    }    else {        memcpy(fString, string, (stringLen + 1) * sizeof(XMLCh));    }	fStart = start;	fLimit = limit;	fLength = fLimit - fStart;		if (fAdoptMatch)		delete fMatch;	fMatch = 0;	if (fSize != noClosures) {		if (fOffsets)            fMemoryManager->deallocate(fOffsets);//delete [] fOffsets;		fOffsets = (int*) fMemoryManager->allocate(noClosures * sizeof(int));//new int[noClosures];	}	fSize = noClosures;	for (int i = 0; i< fSize; i++)		fOffsets[i] = -1;}bool RegularExpression::Context::nextCh(XMLInt32& ch, int& offset,										const short direction){	ch = fString[offset];	if (RegxUtil::isHighSurrogate(ch)) {		if ((offset + 1 < fLimit) && (direction > 0) &&			RegxUtil::isLowSurrogate(fString[offset+1])) {				ch = RegxUtil::composeFromSurrogate(ch, fString[++offset]);		}		else			return false;	}	else if (RegxUtil::isLowSurrogate(ch)) {		if ((offset - 1 >= 0) && (direction <= 0) &&			RegxUtil::isHighSurrogate(fString[offset-1])) {				ch = RegxUtil::composeFromSurrogate(fString[--offset], ch);		}		else			return false;	}	return true;}// ---------------------------------------------------------------------------//  RegularExpression: Constructors and Destructors// ---------------------------------------------------------------------------RegularExpression::RegularExpression(const char* const pattern,                                     MemoryManager* const manager)	:fHasBackReferences(false),	 fFixedStringOnly(false),	 fNoGroups(0),	 fMinLength(0),	 fNoClosures(0),	 fOptions(0),	 fBMPattern(0),	 fPattern(0),	 fFixedString(0),	 fOperations(0),	 fTokenTree(0),	 fFirstChar(0),     fOpFactory(manager),     fTokenFactory(0),     fMemoryManager(manager){	try {		XMLCh* tmpBuf = XMLString::transcode(pattern, fMemoryManager);        ArrayJanitor<XMLCh> janBuf(tmpBuf, fMemoryManager);		setPattern(tmpBuf);	}    catch(const OutOfMemoryException&)    {        throw;    }    catch (...) {		cleanUp();		throw;	}}RegularExpression::RegularExpression(const char* const pattern,									 const char* const options,                                     MemoryManager* const manager)	:fHasBackReferences(false),	 fFixedStringOnly(false),	 fNoGroups(0),	 fMinLength(0),	 fNoClosures(0),	 fOptions(0),	 fBMPattern(0),	 fPattern(0),	 fFixedString(0),	 fOperations(0),	 fTokenTree(0),	 fFirstChar(0),     fOpFactory(manager),     fTokenFactory(0),     fMemoryManager(manager){	try {		XMLCh* tmpBuf = XMLString::transcode(pattern, fMemoryManager);		ArrayJanitor<XMLCh> janBuf(tmpBuf, fMemoryManager);		XMLCh* tmpOptions = XMLString::transcode(options, fMemoryManager);		ArrayJanitor<XMLCh> janOps(tmpOptions, fMemoryManager);		setPattern(tmpBuf, tmpOptions);	}    catch(const OutOfMemoryException&)    {        throw;    }    catch (...) {		cleanUp();		throw;	}}RegularExpression::RegularExpression(const XMLCh* const pattern,                                     MemoryManager* const manager)	:fHasBackReferences(false),	 fFixedStringOnly(false),	 fNoGroups(0),	 fMinLength(0),	 fNoClosures(0),	 fOptions(0),	 fBMPattern(0),	 fPattern(0),	 fFixedString(0),	 fOperations(0),	 fTokenTree(0),	 fFirstChar(0),     fOpFactory(manager),     fTokenFactory(0),     fMemoryManager(manager){	try {		setPattern(pattern);	}    catch(const OutOfMemoryException&)    {        throw;    }    catch (...) {		cleanUp();		throw;	}}RegularExpression::RegularExpression(const XMLCh* const pattern,									 const XMLCh* const options,                                     MemoryManager* const manager)	:fHasBackReferences(false),	 fFixedStringOnly(false),	 fNoGroups(0),	 fMinLength(0),	 fNoClosures(0),	 fOptions(0),	 fBMPattern(0),	 fPattern(0),	 fFixedString(0),	 fOperations(0),	 fTokenTree(0),	 fFirstChar(0),     fOpFactory(manager),     fTokenFactory(0),     fMemoryManager(manager){	try {		setPattern(pattern, options);	}    catch(const OutOfMemoryException&)    {        throw;    }    catch (...) {		cleanUp();		throw;	}}RegularExpression::~RegularExpression() {	cleanUp();}// ---------------------------------------------------------------------------//  RegularExpression: Setter methods// ---------------------------------------------------------------------------void RegularExpression::setPattern(const XMLCh* const pattern,								   const XMLCh* const options) {    fTokenFactory = new (fMemoryManager) TokenFactory(fMemoryManager);	fOptions = parseOptions(options);	fPattern = XMLString::replicate(pattern, fMemoryManager);    // the following construct causes an error in an Intel 7.1 32 bit compiler for     // red hat linux 7.2    // (when an exception is thrown the wrong object is deleted)    //RegxParser* regxParser = isSet(fOptions, XMLSCHEMA_MODE)    //	? new (fMemoryManager) ParserForXMLSchema(fMemoryManager)     //    : new (fMemoryManager) RegxParser(fMemoryManager);    RegxParser* regxParser;    if (isSet(fOptions, XMLSCHEMA_MODE)) {	    regxParser = new (fMemoryManager) ParserForXMLSchema(fMemoryManager);    }    else {        regxParser = new (fMemoryManager) RegxParser(fMemoryManager);    }    if (regxParser) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久久久精| 五月天亚洲精品| www.综合网.com| 中文字幕一区二区三区蜜月| 国产99久久久国产精品潘金网站| 亚洲精品一区二区三区蜜桃下载| 美女性感视频久久| 精品久久久久久综合日本欧美 | 国产欧美日本一区视频| 国产一区二区精品久久99| 久久这里只有精品首页| 国产成人av福利| 亚洲女人的天堂| 欧美精选在线播放| 激情六月婷婷综合| 国产精品美女视频| 91成人在线精品| 另类专区欧美蜜桃臀第一页| 久久夜色精品一区| 91免费看片在线观看| 日韩精品成人一区二区在线| 精品国产电影一区二区| 成人三级伦理片| 亚洲国产乱码最新视频| 精品国产乱码久久久久久闺蜜| 成人在线视频一区二区| 亚洲一区二区三区激情| 欧美变态tickling挠脚心| 国产a级毛片一区| 亚洲一区二区三区影院| 欧美va亚洲va在线观看蝴蝶网| 成人小视频免费观看| 亚洲国产综合在线| 国产欧美日韩精品一区| 欧美电影一区二区三区| 国产成人精品免费一区二区| 亚洲香蕉伊在人在线观| 久久综合国产精品| 欧美亚洲综合另类| 国产成人一区在线| 天天综合色天天| 国产精品第四页| 日韩西西人体444www| 波多野结衣亚洲一区| 青青草精品视频| 成人免费小视频| 欧美成人a视频| 在线免费不卡视频| 成人在线综合网站| 极品尤物av久久免费看| 一区二区三区不卡在线观看| 国产日韩精品一区二区三区| 欧美麻豆精品久久久久久| www.亚洲国产| 国产美女精品人人做人人爽| 亚洲18色成人| 亚洲免费高清视频在线| 国产婷婷色一区二区三区在线| 欧美日韩一区二区在线视频| 99热精品一区二区| 国产一区二区在线视频| 日韩国产欧美三级| 午夜视频一区在线观看| 亚洲激情av在线| 亚洲国产精品高清| 国产嫩草影院久久久久| 欧美精品一区二区三| 91精品国产综合久久精品app| 91视频免费看| 99麻豆久久久国产精品免费优播| 国产成人综合在线| 国产在线国偷精品产拍免费yy| 日韩高清电影一区| 日日摸夜夜添夜夜添国产精品| 亚洲自拍偷拍综合| 亚洲一二三四区| 亚洲无人区一区| 午夜在线电影亚洲一区| 亚洲午夜久久久久久久久电影院| 亚洲免费观看视频| 一区二区三区精密机械公司| 亚洲乱码国产乱码精品精98午夜| 亚洲色欲色欲www| 欧美日韩综合一区| 久久影院午夜片一区| 丝袜a∨在线一区二区三区不卡| 伊人色综合久久天天| 一区二区三区**美女毛片| 亚洲精品日产精品乱码不卡| 亚洲精品视频一区二区| 国产精品国产三级国产专播品爱网| 欧美国产一区二区在线观看 | 日韩欧美电影一区| 337p亚洲精品色噜噜噜| 日韩视频不卡中文| 精品国产精品一区二区夜夜嗨| 久久综合久久综合亚洲| 国产清纯美女被跳蛋高潮一区二区久久w| 久久综合九色欧美综合狠狠| 久久久久久97三级| 国产精品福利一区二区三区| 1000部国产精品成人观看| 一区二区三区中文字幕精品精品| 亚洲一区在线视频观看| 日韩av一区二区在线影视| 精彩视频一区二区| 97国产一区二区| 欧美日韩一区高清| 久久久久国色av免费看影院| 国产精品久久久久久久久快鸭 | 久久蜜桃av一区精品变态类天堂| 国产欧美日韩精品a在线观看| 亚洲欧美日韩人成在线播放| 亚洲成人av一区二区| 国产一区二区福利| 99久久久无码国产精品| 8x8x8国产精品| 国产免费成人在线视频| 亚洲高清在线精品| 国产精品一区一区| 日本久久一区二区三区| 精品剧情在线观看| 亚洲免费成人av| 狠狠网亚洲精品| 欧洲精品视频在线观看| 26uuu亚洲婷婷狠狠天堂| 亚洲精品免费播放| 极品少妇一区二区三区精品视频 | 精品粉嫩超白一线天av| 自拍偷拍国产亚洲| 精品一区二区三区久久| 91免费国产视频网站| 欧美成人猛片aaaaaaa| 亚洲精品网站在线观看| 国产一区二区精品久久99| 在线视频综合导航| 国产精品少妇自拍| 久久爱另类一区二区小说| 91激情在线视频| 国产午夜精品久久| 天天操天天干天天综合网| 一本大道久久a久久综合| 久久久噜噜噜久噜久久综合| 日韩精品亚洲专区| 91久久香蕉国产日韩欧美9色| 久久精品一区八戒影视| 捆绑调教美女网站视频一区| 欧美亚男人的天堂| 国产精品理论片在线观看| 精品一区二区三区不卡| 欧美日韩国产片| 尤物av一区二区| 不卡高清视频专区| 国产午夜精品理论片a级大结局| 免费观看91视频大全| 欧美视频一区二区三区四区 | 国产一区二区三区免费在线观看| 欧美三级中文字幕| 一区二区三区不卡视频| 91亚洲资源网| 国产精品日韩成人| 懂色av中文字幕一区二区三区| 欧美va亚洲va在线观看蝴蝶网| 日本不卡一区二区三区| 欧美天堂一区二区三区| 亚洲伊人伊色伊影伊综合网| 色综合久久久久综合体桃花网| 一区二区三区欧美| 精品亚洲国产成人av制服丝袜| 777午夜精品视频在线播放| 亚洲国产美女搞黄色| 欧美视频中文一区二区三区在线观看| 亚洲少妇中出一区| 欧美性xxxxxx少妇| 天天免费综合色| 欧美videos大乳护士334| 久久精品国产**网站演员| 日韩精品资源二区在线| 韩国av一区二区| 久久久精品蜜桃| 丁香另类激情小说| 亚洲桃色在线一区| 91精品1区2区| 青青草国产成人av片免费| 日韩精品一区二| 国产精品亚洲成人| 国产精品久久777777| 色狠狠桃花综合| 日韩高清不卡一区二区| 亚洲精品一区二区三区精华液| 国产成人精品一区二区三区网站观看 | 一区二区三区四区高清精品免费观看| 一本一道综合狠狠老| 亚洲国产精品精华液网站| 欧美一区二区三区在线电影| 老司机免费视频一区二区三区| 久久免费电影网| 色爱区综合激月婷婷| 日本美女一区二区三区视频| 国产午夜精品一区二区|