chromium/third_party/re2/src/re2/prefilter.cc

// Copyright 2009 The RE2 Authors.  All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

#include "re2/prefilter.h"

#include <stddef.h>

#include <string>
#include <utility>
#include <vector>

#include "absl/log/absl_check.h"
#include "absl/log/absl_log.h"
#include "absl/strings/str_format.h"
#include "re2/re2.h"
#include "re2/regexp.h"
#include "re2/unicode_casefold.h"
#include "re2/walker-inl.h"
#include "util/utf.h"

namespace re2 {

static const bool ExtraDebug =;

// Initializes a Prefilter, allocating subs_ as necessary.
Prefilter::Prefilter(Op op) {}

// Destroys a Prefilter.
Prefilter::~Prefilter() {}

// Simplify if the node is an empty Or or And.
Prefilter* Prefilter::Simplify() {}

// Combines two Prefilters together to create an "op" (AND or OR).
// The passed Prefilters will be part of the returned Prefilter or deleted.
// Does lots of work to avoid creating unnecessarily complicated structures.
Prefilter* Prefilter::AndOr(Op op, Prefilter* a, Prefilter* b) {}

Prefilter* Prefilter::And(Prefilter* a, Prefilter* b) {}

Prefilter* Prefilter::Or(Prefilter* a, Prefilter* b) {}

void Prefilter::SimplifyStringSet(SSet* ss) {}

Prefilter* Prefilter::OrStrings(SSet* ss) {}

static Rune ToLowerRune(Rune r) {}

static Rune ToLowerRuneLatin1(Rune r) {}

Prefilter* Prefilter::FromString(const std::string& str) {}

// Information about a regexp used during computation of Prefilter.
// Can be thought of as information about the set of strings matching
// the given regular expression.
class Prefilter::Info {};


Prefilter::Info::Info()
  :{}

Prefilter::Info::~Info() {}

Prefilter* Prefilter::Info::TakeMatch() {}

// Format a Info in string form.
std::string Prefilter::Info::ToString() {}

void Prefilter::CrossProduct(const SSet& a, const SSet& b, SSet* dst) {}

// Concats a and b. Requires that both are exact sets.
// Forms an exact set that is a crossproduct of a and b.
Prefilter::Info* Prefilter::Info::Concat(Info* a, Info* b) {}

// Constructs an inexact Info for ab given a and b.
// Used only when a or b is not exact or when the
// exact cross product is likely to be too big.
Prefilter::Info* Prefilter::Info::And(Info* a, Info* b) {}

// Constructs Info for a|b given a and b.
Prefilter::Info* Prefilter::Info::Alt(Info* a, Info* b) {}

// Constructs Info for a? given a.
Prefilter::Info* Prefilter::Info::Quest(Info *a) {}

// Constructs Info for a* given a.
// Same as a? -- not much to do.
Prefilter::Info* Prefilter::Info::Star(Info *a) {}

// Constructs Info for a+ given a. If a was exact set, it isn't
// anymore.
Prefilter::Info* Prefilter::Info::Plus(Info *a) {}

static std::string RuneToString(Rune r) {}

static std::string RuneToStringLatin1(Rune r) {}

// Constructs Info for literal rune.
Prefilter::Info* Prefilter::Info::Literal(Rune r) {}

// Constructs Info for literal rune for Latin1 encoded string.
Prefilter::Info* Prefilter::Info::LiteralLatin1(Rune r) {}

// Constructs Info for dot (any character) or \C (any byte).
Prefilter::Info* Prefilter::Info::AnyCharOrAnyByte() {}

// Constructs Prefilter::Info for no possible match.
Prefilter::Info* Prefilter::Info::NoMatch() {}

// Constructs Prefilter::Info for any possible match.
// This Prefilter::Info is valid for any regular expression,
// since it makes no assertions whatsoever about the
// strings being matched.
Prefilter::Info* Prefilter::Info::AnyMatch() {}

// Constructs Prefilter::Info for just the empty string.
Prefilter::Info* Prefilter::Info::EmptyString() {}

// Constructs Prefilter::Info for a character class.
CCIter;
Prefilter::Info* Prefilter::Info::CClass(CharClass *cc,
                                         bool latin1) {}

class Prefilter::Info::Walker : public Regexp::Walker<Prefilter::Info*> {};

Prefilter::Info* Prefilter::BuildInfo(Regexp* re) {}

Prefilter::Info* Prefilter::Info::Walker::ShortVisit(
    Regexp* re, Prefilter::Info* parent_arg) {}

// Constructs the Prefilter::Info for the given regular expression.
// Assumes re is simplified.
Prefilter::Info* Prefilter::Info::Walker::PostVisit(
    Regexp* re, Prefilter::Info* parent_arg,
    Prefilter::Info* pre_arg, Prefilter::Info** child_args,
    int nchild_args) {}


Prefilter* Prefilter::FromRegexp(Regexp* re) {}

std::string Prefilter::DebugString() const {}

Prefilter* Prefilter::FromRE2(const RE2* re2) {}


}  // namespace re2