[pcre-dev] Using the Google C++ PCRE code

Página superior
Eliminar este mensaje
Autor: Callanan, Colin C.
Fecha:  
A: pcre-dev@exim.org
Cc: Sowrinaidu, Elavarasan \(TS R&D\), Udayashankar, Rashmi
Asunto: [pcre-dev] Using the Google C++ PCRE code
Hi there,

I've been working on a project in my company which uses pcre_exec to do string matching for our XML parser. It's been very useful, but recently we've had issues throwing in an XML file containing about 512,259 lines (about 14MB) and it has been falling over. It hasn't reported an error, it just isn't able to see to the end of the file so it reports that no match is found for an end tag, when there is actually a match. Smaller files are fine.

I started taking a look into the pcre version we are using, and in the pcre.h header file I found:
#define PCRE_MAJOR          6
#define PCRE_MINOR          6
#define PCRE_PRERELEASE     ""
#define PCRE_DATE           06-Feb-2006


I also noticed that we had been using the google C++ wrapper code, as seen in pcrecpp.h:
// Author: Sanjay Ghemawat
// Support for PCRE_XXX modifiers added by Giuseppe Maxia, July 2005

#ifndef _PCRECPP_H
#define _PCRECPP_H

// C++ interface to the pcre regular-expression library. RE supports
// Perl-style regular expressions (with extensions like \d, \w, \s,
// ...).

So I set about looking for a more recent version of this C++ wrapper that we'd been using, but I couldn't find it on the www.pcre.org site or on code.google.com, I can only find the regular C language PCRE.

Can anyone help me in getting an updated C++ wrapper, if one exists? I haven't seen anything out there that looks like the current PCRE directory I have in my code. My current PCRE directory looks like this:
config.h
LICENCE.pcre
makefile.mk
pcre.h
pcre_chartables.cxx
pcre_compile.cxx
pcre_config.cxx
pcre_dfa_exec.cxx
pcre_exec.c
pcre_exec.cxx
pcre_fullinfo.cxx
pcre_get.cxx
pcre_globals.cxx
pcre_info.cxx
pcre_internal.h
pcre_maketables.cxx
pcre_ord2utf8.cxx
pcre_printint.src
pcre_refcount.cxx
pcre_scanner.h
pcre_study.cxx
pcre_tables.cxx
pcre_try_flipped.cxx
pcre_ucp_searchfuncs.cxx
pcre_valid_utf8.cxx
pcre_version.cxx
pcre_xclass.cxx
pcrecpp.h
pcreposix.h
ucp.h
ucpinternal.h
ucptable.c


Any help or advice is much appreciated!

Regards,

Colin