Home
last modified time | relevance | path

Searched full:regex (Results 1 – 25 of 1371) sorted by relevance

12345678910>>...55

/third_party/glib/patch/
Dbackport-gregex-Add-G_REGEX_DEFAULT-G_REGEX_MATCH_DEFAULT.patch16 glib/tests/regex.c | 143 +++++++++++++++++++++---------------------
48 GRegex *regex;
51 - regex = g_regex_new (pattern, compile_options, 0, NULL);
52 + regex = g_regex_new (pattern, compile_options, G_REGEX_MATCH_DEFAULT, NULL);
53 if (!regex)
55 result = g_regex_match_full (regex, string, -1, 0, match_options, NULL, NULL);
57 * GRegex *regex;
60 - * regex = g_regex_new ("[A-Z]+", 0, 0, NULL);
61 + * regex = g_regex_new ("[A-Z]+", G_REGEX_DEFAULT, G_REGEX_MATCH_DEFAULT, NULL);
62 * g_regex_match (regex, string, 0, &match_info);
[all …]
Dbackport-gregex-use-G_REGEX_OPTIMIZE-flag-to-enable-JIT-compilation.patch21 glib/tests/regex.c | 128 ++++++++++++++++++++++++---------------------
53 GRegexMatchFlags match_opts; /* options used at match time on the regex */
55 + JITStatus jit_status; /* indicates the status of jit compiler for this compiled regex */
106 +enable_jit_with_match_options (GRegex *regex,
111 + if (!(regex->orig_compile_opts & G_REGEX_OPTIMIZE))
113 + if (regex->jit_status == JIT_STATUS_DISABLED)
116 + old_jit_options = regex->jit_options;
127 + retval = pcre2_jit_compile (regex->pcre_re, new_jit_options);
131 + regex->jit_status = JIT_STATUS_ENABLED;
132 + regex->jit_options = new_jit_options;
[all …]
Dbackport-regex-Do-not-use-JIT-when-using-unsupported-match-options.patch4 Subject: [PATCH] glib/regex: Do not use JIT when using unsupported match
7 Do not store jit status for regex unless during initial compilation.
22 glib/tests/regex.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++
49 enable_jit_with_match_options (GRegex *regex,
52 @@ -877,9 +884,13 @@ enable_jit_with_match_options (GRegex *regex,
55 if (!(regex->orig_compile_opts & G_REGEX_OPTIMIZE))
59 if (regex->jit_status == JIT_STATUS_DISABLED)
66 old_jit_options = regex->jit_options;
68 @@ -890,34 +901,34 @@ enable_jit_with_match_options (GRegex *regex,
73 + return regex->jit_status;
[all …]
Dbackport-regex-Perform-more-tests-both-with-and-without-optimizations.patch4 Subject: [PATCH] tests/regex: Perform more tests both with and without
8 glib/tests/regex.c | 101 +++++++++++++++++++++++++++++++++++++++++----
11 diff --git a/glib/tests/regex.c b/glib/tests/regex.c
13 --- a/glib/tests/regex.c
14 +++ b/glib/tests/regex.c
19 - path = g_strdup_printf ("/regex/match-%s/%d", _name, ++total); \
22 + path = g_strdup_printf ("/regex/match-%s-optimized/%d", _name, total); \
24 + path = g_strdup_printf ("/regex/match-%s/%d", _name, total); \
31 + path = g_strdup_printf ("/regex/match-%s/%d", _name, total); \
36 + path = g_strdup_printf ("/regex/match-%s-optimized/%d", _name, total); \
[all …]
Dbackport-replace-pcre1-with-pcre2.patch10 docs/reference/glib/regex-syntax.xml | 46 --
15 glib/tests/regex.c | 175 ++--
22 diff --git a/docs/reference/glib/regex-syntax.xml b/docs/reference/glib/regex-syntax.xml
24 --- a/docs/reference/glib/regex-syntax.xml
25 +++ b/docs/reference/glib/regex-syntax.xml
254 GRegexMatchFlags match_opts; /* options used at match time on the regex */
950 @@ -568,12 +747,16 @@ match_info_new (const GRegex *regex,
951 match_info->regex = g_regex_ref ((GRegex *)regex);
959 - pcre_fullinfo (regex->pcre_re, regex->extra,
961 + pcre2_pattern_info (regex->pcre_re, PCRE2_INFO_CAPTURECOUNT,
[all …]
Dbackport-gregex-set-default-max-stack-size-for-PCRE2-JIT-compiler-to-512KiB.patch25 regex->orig_compile_opts = compile_options;
26 regex->match_opts = pcre_match_options;
27 regex->orig_match_opts = match_options;
28 - regex->jit_status = enable_jit_with_match_options (regex, regex->match_opts);
30 return regex;
51 glib/tests/regex.c | 9 +++++++++
70 -enable_jit_with_match_options (GRegex *regex,
77 - if (!(regex->orig_compile_opts & G_REGEX_OPTIMIZE))
78 + if (!(match_info->regex->orig_compile_opts & G_REGEX_OPTIMIZE))
81 - if (regex->jit_status == JIT_STATUS_DISABLED)
[all …]
Dbackport-regex-Use-size-types-more-in-line-with-PCRE2-returned-values.patch4 Subject: [PATCH] regex: Use size types more in line with PCRE2 returned values
26 GRegex *regex; /* the regex */
27 uint32_t match_opts; /* pcre match options used at match time on the regex */
29 - gint n_subpatterns; /* total number of sub patterns in the regex */
30 + uint32_t n_subpatterns; /* total number of sub patterns in the regex */
43 uint32_t match_opts; /* pcre2 options used at match time on the regex */
47 JITStatus jit_status; /* indicates the status of jit compiler for this compiled regex */
63 enable_jit_with_match_options (GRegex *regex,
70 if (!(regex->orig_compile_opts & G_REGEX_OPTIMIZE))
84 * the total number of sub expressions in the regex. When matching all
[all …]
Dbackport-regex-Do-not-mix-PCRE2-Compile-Match-Newline-and-BSR-flags.patch4 Subject: [PATCH] regex: Do not mix PCRE2 Compile, Match, Newline and BSR flags
21 glib/tests/regex.c | 18 ++
193 GRegex *regex; /* the regex */
194 - GRegexMatchFlags match_opts; /* options used at match time on the regex */
195 + uint32_t match_opts; /* pcre match options used at match time on the regex */
197 gint n_subpatterns; /* total number of sub patterns in the regex */
206 - GRegexMatchFlags match_opts; /* options used at match time on the regex */
207 + uint32_t match_opts; /* pcre2 options used at match time on the regex */
210 JITStatus jit_status; /* indicates the status of jit compiler for this compiled regex */
538 -match_info_new (const GRegex *regex,
[all …]
/third_party/selinux/libselinux/src/
Dregex.c7 #include "regex.h"
67 pcre2_code *regex; /* compiled regular expression */ member
70 int regex_prepare_data(struct regex_data **regex, char const *pattern_string, in regex_prepare_data() argument
75 *regex = regex_data_create(); in regex_prepare_data()
76 if (!(*regex)) in regex_prepare_data()
79 (*regex)->regex = pcre2_compile( in regex_prepare_data()
82 if (!(*regex)->regex) { in regex_prepare_data()
89 regex_data_free(*regex); in regex_prepare_data()
90 *regex = NULL; in regex_prepare_data()
105 int regex_load_mmap(struct mmap_area *mmap_area, struct regex_data **regex, in regex_load_mmap() argument
[all …]
/third_party/rust/crates/regex/tests/
Dtest_default.rs3 use regex;
11 // regex and the input. Other dynamic tests explicitly set the engine to use.
14 use regex::Regex;
15 Regex::new($re)
19 macro_rules! regex { macro
27 use regex::RegexSet;
66 assert!(regex::Regex::new(r"(?-u)\xFF").is_err()); in disallow_non_utf8()
67 assert!(regex::Regex::new(r"(?-u).").is_err()); in disallow_non_utf8()
68 assert!(regex::Regex::new(r"(?-u)[\xFF]").is_err()); in disallow_non_utf8()
69 assert!(regex::Regex::new(r"(?-u)☃").is_err()); in disallow_non_utf8()
[all …]
/third_party/rust/crates/regex/
DCHANGELOG.md4 regex crate.
8 * [PERF #930](https://github.com/rust-lang/regex/pull/930):
13 * [BUG #945](https://github.com/rust-lang/regex/issues/945):
23 * [FEATURE #832](https://github.com/rust-lang/regex/issues/916):
33 * [FEATURE #832](https://github.com/rust-lang/regex/pull/832):
35 * [FEATURE #857](https://github.com/rust-lang/regex/pull/857):
37 * [FEATURE #861](https://github.com/rust-lang/regex/pull/861):
39 * [FEATURE #877](https://github.com/rust-lang/regex/issues/877):
44 * [BUG #792](https://github.com/rust-lang/regex/issues/792):
53 * [BUG #680](https://github.com/rust-lang/regex/issues/680):
[all …]
DREADME.md1 regex chapter
10 …[Build status](https://github.com/rust-lang/regex/workflows/ci/badge.svg)](https://github.com/rust…
11 [![Crates.io](https://img.shields.io/crates/v/regex.svg)](https://crates.io/crates/regex)
12 …ps://img.shields.io/badge/rust-1.41.1%2B-blue.svg?maxAge=3600)](https://github.com/rust-lang/regex)
16 [Module documentation with examples](https://docs.rs/regex).
22 [`Regex` type](https://docs.rs/regex/*/regex/struct.Regex.html).
26 To bring this crate into your repository, either add `regex` to your
27 `Cargo.toml`, or run `cargo add regex`.
33 use regex::Regex;
36 let re = Regex::new(r"(?x)
[all …]
DCargo.toml2 name = "regex"
7 repository = "https://github.com/rust-lang/regex"
8 documentation = "https://docs.rs/regex"
9 homepage = "https://github.com/rust-lang/regex"
21 "bench", "regex-capi", "regex-debug", "regex-syntax",
33 # https://docs.rs/regex/*/#crate-features
35 default = ["std", "perf", "unicode", "regex-syntax/default"]
39 # The 'std' feature permits the regex crate to use the standard library. This
40 # is intended to support future use cases where the regex crate may be able
43 # will prevent regex from compiling.
[all …]
DPERFORMANCE.md5 can be found here: https://docs.rs/regex
12 regex implementations, which typically use backtracking which has worst case
28 or places where the current regex engine isn't quite optimal. This guide will
34 **Advice**: Use `lazy_static` to amortize the cost of `Regex` compilation.
48 This means that in order to realize efficient regex matching, one must
50 inside a loop, then make sure your call to `Regex::new` is *outside* that loop.
57 static MY_REGEX: Regex = Regex::new("...").unwrap();
59 Unfortunately, this would seem to imply that one must pass `Regex` objects
66 use regex::Regex;
70 static ref MY_REGEX: Regex = Regex::new("...").unwrap();
[all …]
/third_party/libabigail/src/
Dabg-suppression-priv.h17 #include "abg-regex.h"
36 mutable regex::regex_t_sptr file_name_regex_;
38 mutable regex::regex_t_sptr file_name_not_regex_;
40 mutable regex::regex_t_sptr soname_regex_;
42 mutable regex::regex_t_sptr soname_not_regex_;
76 const regex::regex_t_sptr&
80 file_name_regex_ = regex::compile(file_name_regex_str_); in get_file_name_regex()
92 const regex::regex_t_sptr&
96 file_name_not_regex_ = regex::compile(file_name_not_regex_str_); in get_file_name_not_regex()
108 const regex::regex_t_sptr&
[all …]
/third_party/rust/crates/regex/examples/
Dshootout-regex-dna-single.rs10 macro_rules! regex { macro
12 ::regex::Regex::new($re).unwrap()
21 seq = regex!(">[^\n]*\n|\n").replace_all(&seq, "").into_owned(); in main()
25 regex!("agggtaaa|tttaccct"), in main()
26 regex!("[cgt]gggtaaa|tttaccc[acg]"), in main()
27 regex!("a[act]ggtaaa|tttacc[agt]t"), in main()
28 regex!("ag[act]gtaaa|tttac[agt]ct"), in main()
29 regex!("agg[act]taaa|ttta[agt]cct"), in main()
30 regex!("aggg[acg]aaa|ttt[cgt]ccct"), in main()
31 regex!("agggt[cgt]aa|tt[acg]accct"), in main()
[all …]
Dshootout-regex-dna.rs12 macro_rules! regex { macro
14 ::regex::Regex::new($re).unwrap()
23 seq = regex!(">[^\n]*\n|\n").replace_all(&seq, "").into_owned(); in main()
28 regex!("agggtaaa|tttaccct"), in main()
29 regex!("[cgt]gggtaaa|tttaccc[acg]"), in main()
30 regex!("a[act]ggtaaa|tttacc[agt]t"), in main()
31 regex!("ag[act]gtaaa|tttac[agt]ct"), in main()
32 regex!("agg[act]taaa|ttta[agt]cct"), in main()
33 regex!("aggg[acg]aaa|ttt[cgt]ccct"), in main()
34 regex!("agggt[cgt]aa|tt[acg]accct"), in main()
[all …]
Dshootout-regex-dna-bytes.rs12 macro_rules! regex { macro
14 ::regex::bytes::Regex::new($re).unwrap()
23 seq = regex!(">[^\n]*\n|\n").replace_all(&seq, &b""[..]).into_owned(); in main()
28 regex!("agggtaaa|tttaccct"), in main()
29 regex!("[cgt]gggtaaa|tttaccc[acg]"), in main()
30 regex!("a[act]ggtaaa|tttacc[agt]t"), in main()
31 regex!("ag[act]gtaaa|tttac[agt]ct"), in main()
32 regex!("agg[act]taaa|ttta[agt]cct"), in main()
33 regex!("aggg[acg]aaa|ttt[cgt]ccct"), in main()
34 regex!("agggt[cgt]aa|tt[acg]accct"), in main()
[all …]
/third_party/rust/crates/bindgen/bindgen-cli/
Doptions.rs57 /// Mark any enum whose name matches <REGEX> as a set of bitfield flags.
58 #[arg(long, value_name = "REGEX")]
60 /// Mark any enum whose name matches <REGEX> as a newtype.
61 #[arg(long, value_name = "REGEX")]
63 /// Mark any enum whose name matches <REGEX> as a global newtype.
64 #[arg(long, value_name = "REGEX")]
66 /// Mark any enum whose name matches <REGEX> as a Rust enum.
67 #[arg(long, value_name = "REGEX")]
69 /// Mark any enum whose name matches <REGEX> as a series of constants.
70 #[arg(long, value_name = "REGEX")]
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/include/llvm/Support/
DRegex.h1 //===-- Regex.h - Regular Expression matcher implementation -*- C++ -*-----===//
28 class Regex {
46 Regex();
47 /// Compiles the given regular expression \p Regex.
48 Regex(StringRef Regex, unsigned Flags = NoFlags);
49 Regex(const Regex &) = delete;
50 Regex &operator=(Regex regex) {
51 std::swap(preg, regex.preg);
52 std::swap(error, regex.error);
55 Regex(Regex &&regex);
[all …]
/third_party/rust/crates/which-rs/src/
Dlib.rs23 #[cfg(feature = "regex")]
113 /// Only available when feature `regex` is enabled.
117 /// * `regex` - A regular expression to match binaries with
124 /// use regex::Regex;
128 /// let re = Regex::new(r"python\d$").unwrap();
138 /// use regex::Regex;
140 /// which_re(Regex::new("^cargo-.*").unwrap()).unwrap()
143 #[cfg(feature = "regex")]
144 pub fn which_re(regex: impl Borrow<Regex>) -> Result<impl Iterator<Item = path::PathBuf>> { in which_re()
145 which_re_in(regex, env::var_os("PATH")) in which_re()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/
DRegex.h1 //===-- Regex.h - Regular Expression matcher implementation -*- C++ -*-----===//
27 class Regex {
45 Regex();
46 /// Compiles the given regular expression \p Regex.
48 /// \param Regex - referenced string is no longer needed after this
50 Regex(StringRef Regex, unsigned Flags = NoFlags);
51 Regex(const Regex &) = delete;
52 Regex &operator=(Regex regex) {
53 std::swap(preg, regex.preg);
54 std::swap(error, regex.error);
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Support/
DRegex.cpp1 //===-- Regex.cpp - Regular Expression matcher implementation -------------===//
13 #include "llvm/Support/Regex.h"
21 // xlocale.h, this will cause trouble, because of missing regex-related types.
26 Regex::Regex() : preg(nullptr), error(REG_BADPAT) {} in Regex() function in Regex
28 Regex::Regex(StringRef regex, unsigned Flags) { in Regex() argument
31 preg->re_endp = regex.end(); in Regex()
38 error = llvm_regcomp(preg, regex.data(), flags|REG_PEND); in Regex()
41 Regex::Regex(Regex &&regex) { in Regex() argument
42 preg = regex.preg; in Regex()
43 error = regex.error; in Regex()
[all …]
/third_party/rust/crates/regex/regex-syntax/
DREADME.md1 regex-syntax
5 …[Build status](https://github.com/rust-lang/regex/workflows/ci/badge.svg)](https://github.com/rust…
6 [![Crates.io](https://img.shields.io/crates/v/regex-syntax.svg)](https://crates.io/crates/regex-syn…
7 …ps://img.shields.io/badge/rust-1.28.0%2B-blue.svg?maxAge=3600)](https://github.com/rust-lang/regex)
12 https://docs.rs/regex-syntax
55 expressions. Therefore, while there may be bugs in the regex parser itself,
57 in the compiler or the standard library. (Since `regex-syntax` has zero
70 [in the "Crate features" section of the documentation](https://docs.rs/regex-syntax/*/#crate-featur…
83 The primary purpose of this crate is to provide the parser used by `regex`.
84 Specifically, this crate is treated as an implementation detail of the `regex`,
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/lib/Support/
DRegex.cpp1 //===-- Regex.cpp - Regular Expression matcher implementation -------------===//
14 #include "llvm/Support/Regex.h"
22 Regex::Regex() : preg(nullptr), error(REG_BADPAT) {} in Regex() function in Regex
24 Regex::Regex(StringRef regex, unsigned Flags) { in Regex() argument
27 preg->re_endp = regex.end(); in Regex()
34 error = llvm_regcomp(preg, regex.data(), flags|REG_PEND); in Regex()
37 Regex::Regex(Regex &&regex) { in Regex() argument
38 preg = regex.preg; in Regex()
39 error = regex.error; in Regex()
40 regex.preg = nullptr; in Regex()
[all …]

12345678910>>...55