// Copyright 2007 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. #ifndef RE2_PROG_H_ #define RE2_PROG_H_ // Compiled representation of regular expressions. // See regexp.h for the Regexp class, which represents a regular // expression symbolically. #include <stdint.h> #include <functional> #include <string> #include <type_traits> #include <vector> #include "absl/base/call_once.h" #include "absl/log/absl_check.h" #include "absl/log/absl_log.h" #include "absl/strings/string_view.h" #include "re2/pod_array.h" #include "re2/re2.h" #include "re2/sparse_array.h" #include "re2/sparse_set.h" namespace re2 { // Opcodes for Inst enum InstOp { … }; // Bit flags for empty-width specials enum EmptyOp { … }; class DFA; class Regexp; // Compiled form of regexp program. class Prog { … }; // std::string_view in MSVC has iterators that aren't just pointers and // that don't allow comparisons between different objects - not even if // those objects are views into the same string! Thus, we provide these // conversion functions for convenience. static inline const char* BeginPtr(absl::string_view s) { … } static inline const char* EndPtr(absl::string_view s) { … } } // namespace re2 #endif // RE2_PROG_H_