Home | History | Annotate | Download | only in util

Lines Matching defs:PCRE

5 // This is a variant of PCRE's pcrecpp.cc, originally written at Google.
7 // compilation as PCRE in namespace re2.
12 #include "util/pcre.h"
16 // Default PCRE limits.
21 DEFINE_int32(regexp_stack_limit, 256<<10, "default PCRE stack limit (bytes)");
23 "default PCRE match limit (function calls)");
29 static const int kVecSize = (1 + kMaxArgs) * 3; // results + PCRE workspace
31 // Approximate size of a recursive invocation of PCRE's
41 PCRE::Arg PCRE::no_more_args((void*)NULL);
43 const PCRE::PartialMatchFunctor PCRE::PartialMatch = { };
44 const PCRE::FullMatchFunctor PCRE::FullMatch = { } ;
45 const PCRE::ConsumeFunctor PCRE::Consume = { };
46 const PCRE::FindAndConsumeFunctor PCRE::FindAndConsume = { };
51 void PCRE::Init(const char* pattern, Option options, int match_limit,
75 PCRE::PCRE(const char* pattern) {
78 PCRE::PCRE(const char* pattern, Option option) {
81 PCRE::PCRE(const string& pattern) {
84 PCRE::PCRE(const string& pattern, Option option) {
87 PCRE::PCRE(const string& pattern, const PCRE_Options& re_option) {
92 PCRE::PCRE(const char *pattern, const PCRE_Options& re_option) {
97 PCRE::~PCRE() {
103 pcre* PCRE::Compile(Anchor anchor) {
105 // runtime pcre only provides an option for anchoring at the
110 // a pcre unanchored match.
112 // a pcre anchored match.
114 // and use a pcre anchored match.
118 pcre* re;
124 // Tack a '\z' at the end of PCRE. Parenthesize it first so that
142 bool PCRE::FullMatchFunctor::operator ()(const StringPiece& text,
143 const PCRE& re,
185 bool PCRE::PartialMatchFunctor::operator ()(const StringPiece& text,
186 const PCRE& re,
228 bool PCRE::ConsumeFunctor::operator ()(StringPiece* input,
229 const PCRE& pattern,
277 bool PCRE::FindAndConsumeFunctor::operator ()(StringPiece* input,
278 const PCRE& pattern,
326 bool PCRE::Replace(string *str,
327 const PCRE& pattern,
344 int PCRE::GlobalReplace(string *str,
345 const PCRE& pattern,
400 bool PCRE::Extract(const StringPiece &text,
401 const PCRE& pattern,
412 string PCRE
449 bool PCRE::HitLimit() {
453 void PCRE::ClearHitLimit() {
457 int PCRE::TryMatch(const StringPiece& text,
463 pcre* re = (anchor == ANCHOR_BOTH) ? re_full_ : re_partial_;
517 // are using the PCRE, but the flag is only intended
532 // There are other return codes from pcre.h :
553 bool PCRE::DoMatchImpl(const StringPiece& text,
560 assert((1 + n) * 3 <= vecsize); // results + PCRE workspace
573 // PCRE has fewer capturing groups than number of arg pointers passed in
592 bool PCRE::DoMatch(const StringPiece& text,
598 size_t const vecsize = (1 + n) * 3; // results + PCRE workspace
606 bool PCRE::Rewrite(string *out, const StringPiece &rewrite,
642 bool PCRE::CheckRewriteString(const StringPiece& rewrite, string* error) const {
681 int PCRE::NumberOfCapturingGroups() const {
695 bool PCRE::Arg::parse_null(const char* str, int n, void* dest) {
700 bool PCRE::Arg::parse_string(const char* str, int n, void* dest) {
706 bool PCRE::Arg::parse_stringpiece(const char* str, int n, void* dest) {
712 bool PCRE::Arg::parse_char(const char* str, int n, void* dest) {
719 bool PCRE::Arg::parse_uchar(const char* str, int n, void* dest) {
758 bool PCRE::Arg::parse_long_radix(const char* str,
775 bool PCRE::Arg::parse_ulong_radix(const char* str,
798 bool PCRE::Arg::parse_short_radix(const char* str,
810 bool PCRE::Arg::parse_ushort_radix(const char* str,
822 bool PCRE::Arg::parse_int_radix(const char* str,
834 bool PCRE::Arg::parse_uint_radix(const char* str,
846 bool PCRE::Arg::parse_longlong_radix(const char* str,
863 bool PCRE::Arg::parse_ulonglong_radix(const char* str,
885 bool PCRE::Arg::parse_double(const char* str, int n, void* dest) {
927 bool PCRE::Arg::parse_float(const char* str, int n, void* dest) {
937 bool PCRE::Arg::parse_##name(const char* str, int n, void* dest) { \
940 bool PCRE::Arg::parse_##name##_hex(const char* str, int n, void* dest) { \
943 bool PCRE::Arg::parse_##name##_octal(const char* str, int n, void* dest) { \
946 bool PCRE::Arg::parse_##name##_cradix(const char* str, int n, void* dest) { \