Home
last modified time | relevance | path

Searched refs:re (Results 1 – 25 of 3323) sorted by relevance

12345678910>>...133

/external/python/cpython2/Lib/test/
Dtest_re.py8 import re
9 from re import Scanner
29 x = re.compile('ab+c')
34 self.assertEqual(re.search('x*', 'axx').span(0), (0, 0))
35 self.assertEqual(re.search('x*', 'axx').span(), (0, 0))
36 self.assertEqual(re.search('x+', 'axx').span(0), (1, 3))
37 self.assertEqual(re.search('x+', 'axx').span(), (1, 3))
38 self.assertIsNone(re.search('x', 'aaa'))
39 self.assertEqual(re.match('a*', 'xxx').span(0), (0, 0))
40 self.assertEqual(re.match('a*', 'xxx').span(), (0, 0))
[all …]
/external/icu/icu4c/source/test/cintltst/
Dreapits.c55 re = uregex_openC(pattern, flags, NULL, &status); \
59 uregex_setText(re, srcString, -1, &status); \
66 uregex_close(re); \
205 URegularExpression *re; in TestRegexCAPI() local
213 re = uregex_open(pat, -1, 0, 0, &status); in TestRegexCAPI()
218 uregex_close(re); in TestRegexCAPI()
222 re = uregex_open(pat, -1, in TestRegexCAPI()
226 uregex_close(re); in TestRegexCAPI()
230 re = uregex_open(pat, -1, 0x40000000, 0, &status); in TestRegexCAPI()
232 uregex_close(re); in TestRegexCAPI()
[all …]
/external/regex-re2/re2/
Dsimplify.cc21 Regexp* re = Parse(src, flags, status); in SimplifyRegexp() local
22 if (re == NULL) in SimplifyRegexp()
24 Regexp* sre = re->Simplify(); in SimplifyRegexp()
25 re->Decref(); in SimplifyRegexp()
106 virtual Regexp* PreVisit(Regexp* re, Regexp* parent_arg, bool* stop);
107 virtual Regexp* PostVisit(Regexp* re,
111 virtual Regexp* Copy(Regexp* re);
112 virtual Regexp* ShortVisit(Regexp* re, Regexp* parent_arg);
125 static Regexp* SimplifyRepeat(Regexp* re, int min, int max,
131 static Regexp* SimplifyCharClass(Regexp* re);
[all …]
Dparse.cc60 bool PushRegexp(Regexp* re);
180 for (Regexp* re = stacktop_; re != NULL; re = next) { in ~ParseState() local
181 next = re->down_; in ~ParseState()
182 re->down_ = NULL; in ~ParseState()
183 if (re->op() == kLeftParen) in ~ParseState()
184 delete re->name_; in ~ParseState()
185 re->Decref(); in ~ParseState()
192 Regexp* Regexp::ParseState::FinishRegexp(Regexp* re) { in FinishRegexp() argument
193 if (re == NULL) in FinishRegexp()
195 re->down_ = NULL; in FinishRegexp()
[all …]
Dwalker-inl.h36 virtual T PreVisit(Regexp* re, T parent_arg, bool* stop);
47 virtual T PostVisit(Regexp* re, T parent_arg, T pre_arg,
62 virtual T ShortVisit(Regexp* re, T parent_arg) = 0;
67 T Walk(Regexp* re, T top_arg);
77 T WalkExponential(Regexp* re, T top_arg, int max_visits);
93 T WalkInternal(Regexp* re, T top_arg, bool use_copy);
98 template<typename T> T Regexp::Walker<T>::PreVisit(Regexp* re, in PreVisit() argument
104 template<typename T> T Regexp::Walker<T>::PostVisit(Regexp* re, in PostVisit() argument
118 WalkState<T>(Regexp* re, T parent) in WalkState()
119 : re(re), in WalkState()
[all …]
Dregexp.cc132 Regexp* re = stack; in Destroy() local
133 stack = re->down_; in Destroy()
134 if (re->ref_ != 0) in Destroy()
135 LOG(DFATAL) << "Bad reference count " << re->ref_; in Destroy()
136 if (re->nsub_ > 0) { in Destroy()
137 Regexp** subs = re->sub(); in Destroy()
138 for (int i = 0; i < re->nsub_; i++) { in Destroy()
151 if (re->nsub_ > 1) in Destroy()
153 re->nsub_ = 0; in Destroy()
155 delete re; in Destroy()
[all …]
Dtostring.cc35 virtual int PreVisit(Regexp* re, int parent_arg, bool* stop);
36 virtual int PostVisit(Regexp* re, int parent_arg, int pre_arg,
38 virtual int ShortVisit(Regexp* re, int parent_arg) { in ShortVisit() argument
61 int ToStringWalker::PreVisit(Regexp* re, int parent_arg, bool* stop) { in PreVisit() argument
65 switch (re->op()) { in PreVisit()
97 if (re->name()) { in PreVisit()
99 t_->append(*re->name()); in PreVisit()
139 int ToStringWalker::PostVisit(Regexp* re, int parent_arg, int pre_arg, in PostVisit() argument
142 switch (re->op()) { in PostVisit()
157 AppendLiteral(t_, re->rune(), re->parse_flags() & Regexp::FoldCase); in PostVisit()
[all …]
Dmimics_pcre.cc32 static bool CanBeEmptyString(Regexp *re);
40 bool PostVisit(Regexp* re, bool parent_arg, bool pre_arg, bool* child_args,
43 bool ShortVisit(Regexp* re, bool a) { in ShortVisit() argument
53 bool PCREWalker::PostVisit(Regexp* re, bool parent_arg, bool pre_arg, in PostVisit() argument
61 switch (re->op()) { in PostVisit()
66 if (CanBeEmptyString(re->sub()[0])) in PostVisit()
70 if (re->max() == -1 && CanBeEmptyString(re->sub()[0])) in PostVisit()
76 if (re->rune() == '\v') in PostVisit()
83 if (re->parse_flags() & Regexp::WasDollar) in PostVisit()
117 bool PostVisit(Regexp* re, bool parent_arg, bool pre_arg,
[all …]
Dset.cc38 re2::Regexp* re = Regexp::Parse(pattern, pf, &status); in Add() local
39 if (re == NULL) { in Add()
50 if (re->op() == kRegexpConcat) { in Add()
51 int nsub = re->nsub(); in Add()
54 sub[i] = re->sub()[i]->Incref(); in Add()
56 re->Decref(); in Add()
57 re = re2::Regexp::Concat(sub, nsub + 1, pf); in Add()
61 sub[0] = re; in Add()
63 re = re2::Regexp::Concat(sub, 2, pf); in Add()
65 re_.push_back(re); in Add()
[all …]
/external/smali/smalidea/src/main/antlr/
DsmalideaParser.g92 public void recover(IntStream input, RecognitionException re) {
113 // we want to return the token we're actually matching
204 catch [RecognitionException re] {
205 recover(input, re);
206 reportError(marker, re, false);
213 catch [RecognitionException re] {
214 recover(input, re);
215 reportError(marker, re, false);
222 catch [RecognitionException re] {
223 recover(input, re);
[all …]
/external/regex-re2/re2/testing/
Ddump.cc57 static void DumpRegexpAppending(Regexp* re, string* s) { in DumpRegexpAppending() argument
58 if (re->op() < 0 || re->op() >= arraysize(kOpcodeNames)) { in DumpRegexpAppending()
59 StringAppendF(s, "op%d", re->op()); in DumpRegexpAppending()
61 switch (re->op()) { in DumpRegexpAppending()
68 if (re->parse_flags() & Regexp::NonGreedy) in DumpRegexpAppending()
72 s->append(kOpcodeNames[re->op()]); in DumpRegexpAppending()
73 if (re->op() == kRegexpLiteral && (re->parse_flags() & Regexp::FoldCase)) { in DumpRegexpAppending()
74 Rune r = re->rune(); in DumpRegexpAppending()
78 if (re->op() == kRegexpLiteralString && (re->parse_flags() & Regexp::FoldCase)) { in DumpRegexpAppending()
79 for (int i = 0; i < re->nrunes(); i++) { in DumpRegexpAppending()
[all …]
Dregexp_benchmark.cc24 Regexp* re = Regexp::Parse("(\\d+)-(\\d+)-(\\d+)", Regexp::LikePerl, NULL); in Test() local
25 CHECK(re); in Test()
26 Prog* prog = re->CompileToProg(0); in Test()
37 re->Decref(); in Test()
46 Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL); in MemoryUsage() local
47 CHECK(re); in MemoryUsage()
53 Prog* prog = re->CompileToProg(0); in MemoryUsage()
63 re->Decref(); in MemoryUsage()
69 PCRE re(regexp, PCRE::UTF8); in MemoryUsage() local
71 PCRE::FullMatch(text, re); in MemoryUsage()
[all …]
/external/pcre/dist2/src/
Dpcre2_pattern_info.c67 const pcre2_real_code *re = (pcre2_real_code *)code; in pcre2_pattern_info() local
107 if (re == NULL) return PCRE2_ERROR_NULL; in pcre2_pattern_info()
112 if (re->magic_number != MAGIC_NUMBER) return PCRE2_ERROR_BADMAGIC; in pcre2_pattern_info()
116 if ((re->flags & (PCRE2_CODE_UNIT_WIDTH/8)) == 0) return PCRE2_ERROR_BADMODE; in pcre2_pattern_info()
121 *((uint32_t *)where) = re->overall_options; in pcre2_pattern_info()
125 *((uint32_t *)where) = re->compile_options; in pcre2_pattern_info()
129 *((uint32_t *)where) = re->top_backref; in pcre2_pattern_info()
133 *((uint32_t *)where) = re->bsr_convention; in pcre2_pattern_info()
137 *((uint32_t *)where) = re->top_bracket; in pcre2_pattern_info()
141 *((uint32_t *)where) = ((re->flags & PCRE2_FIRSTSET) != 0)? 1 : in pcre2_pattern_info()
[all …]
Dpcre2_study.c55 #define SET_BIT(c) re->start_bitmap[(c)/8] |= (1 << ((c)&7))
92 find_minlength(const pcre2_real_code *re, PCRE2_SPTR code, in find_minlength() argument
102 BOOL dupcapused = (re->flags & PCRE2_DUPCAPUSED) != 0; in find_minlength()
169 d = find_minlength(re, cc, startcode, utf, recurses, countptr); in find_minlength()
189 prev_cap_d = find_minlength(re, cc, startcode, utf, recurses, countptr); in find_minlength()
450 if ((re->overall_options & PCRE2_MATCH_UNSET_BACKREF) == 0) in find_minlength()
454 (PCRE2_UCHAR *)((uint8_t *)re + sizeof(pcre2_real_code)) + in find_minlength()
455 GET2(cc, 1) * re->name_entry_size; in find_minlength()
487 dd = find_minlength(re, cs, startcode, utf, &this_recurse, countptr); in find_minlength()
491 slot += re->name_entry_size; in find_minlength()
[all …]
/external/icu/icu4c/source/data/curr/
Dsn.txt7 "Diramu re United Arab Emirates",
15 "Dora re Australia",
19 "Dhinari re Bhahareni",
23 "Furenki re Bhurundi",
27 "Pura re Botswana",
31 "Dora re Kanada",
35 "Furenki re Kongo",
39 "Furenki re Swisi",
47 "Dhora re Escudo",
51 "Furenki re Jibhuti",
[all …]
/external/clang/docs/tools/
Ddump_ast_matchers.py7 import re
36 text = re.sub(r'&', '&amp;', text)
37 text = re.sub(r'<', '&lt;', text)
38 text = re.sub(r'>', '&gt;', text)
53 text = re.sub(
69 m = re.search(r'Usable as: Any Matcher[\s\n]*$', comment, re.S)
73 m = re.match(r'^(.*)Matcher<([^>]+)>\s*,?[\s\n]*$', comment, re.S)
75 if re.search(r'Usable as:\s*$', comment):
85 comment = re.sub(r'^\\[^\s]+\n', r'', comment, flags=re.M)
89 comment = re.sub(r'\\see', r'See also:', comment)
[all …]
/external/python/cpython2/Demo/classes/
DComplex.py88 return obj.re
98 def __init__(self, re=0, im=0): argument
101 if IsComplex(re):
102 _re = re.re
103 _im = re.im
105 _re = re
108 _im = _im + im.re
121 return hash(self.re)
122 return hash((self.re, self.im))
126 return 'Complex(%r)' % (self.re,)
[all …]
/external/llvm/test/MC/MachO/
Dx86_32-optimal_nop.s21 # nopl (%[re]ax)
31 # nopl 0(%[re]ax)
40 # nopl 0(%[re]ax,%[re]ax,1)
48 # nopw 0(%[re]ax,%[re]ax,1)
55 # nopl 0L(%[re]ax)
69 # nopl 0L(%[re]ax,%[re]ax,1)
82 # nopw 0L(%[re]ax,%[re]ax,1)
95 # nopw %cs:0L(%[re]ax,%[re]ax,1)
106 # nopw %cs:0L(%[re]ax,%[re]ax,1)
116 # nopw 0(%[re]ax,%[re]ax,1)
[all …]
/external/swiftshader/third_party/LLVM/test/MC/MachO/
Dx86_32-optimal_nop.s21 # nopl (%[re]ax)
31 # nopl 0(%[re]ax)
40 # nopl 0(%[re]ax,%[re]ax,1)
48 # nopw 0(%[re]ax,%[re]ax,1)
55 # nopl 0L(%[re]ax)
69 # nopl 0L(%[re]ax,%[re]ax,1)
82 # nopw 0L(%[re]ax,%[re]ax,1)
95 # nopw %cs:0L(%[re]ax,%[re]ax,1)
106 # nopw %cs:0L(%[re]ax,%[re]ax,1)
116 # nopw 0(%[re]ax,%[re]ax,1)
[all …]
/external/selinux/python/sepolicy/sepolicy/
Dgenerate.py27 import re
346 if not re.match(r"^[a-zA-Z0-9-_]+$", name):
523 return re.sub("TEMPLATETYPE", self.name, executable.te_uid_rules)
529 return re.sub("TEMPLATETYPE", self.name, executable.te_syslog_rules)
535 return re.sub("TEMPLATETYPE", self.name, executable.te_resolve_rules)
541 return re.sub("TEMPLATETYPE", self.name, executable.te_kerberos_rules)
547 return re.sub("TEMPLATETYPE", self.name, executable.te_manage_krb5_rcache_rules)
554 newte = re.sub("TEMPLATETYPE", self.name, executable.te_pam_rules)
560 newte = re.sub("TEMPLATETYPE", self.name, executable.te_audit_rules)
566 newte = re.sub("TEMPLATETYPE", self.name, executable.te_etc_rules)
[all …]
/external/v8/tools/
Djsmin.py47 import re
105 return re.sub(r"\$\{([\w$%]+)\}",
115 if re.match("[\"'/]", matched_text):
117 m = re.match(r"var ", matched_text)
120 var_names = re.split(r",", var_names)
122 m = re.match(r"(function\b[^(]*)\((.*)\)\{$", matched_text)
126 args = re.split(r",", args)
192 if re.match(r"'.*'$", entire_match):
194 if re.match(r'".*"$', entire_match):
196 if re.match(r"`.*`$", entire_match):
[all …]
/external/libcxx/test/std/re/re.alg/re.alg.match/
Dlookahead_capture.pass.cpp31 std::regex re("^(?=(.))a$"); in main() local
32 assert(re.mark_count() == 1); in main()
36 assert(std::regex_match(s, m, re)); in main()
43 std::regex re("^(a)(?=(.))(b)$"); in main() local
44 assert(re.mark_count() == 3); in main()
48 assert(std::regex_match(s, m, re)); in main()
57 std::regex re("^(.)(?=(.)(?=.(.)))(...)$"); in main() local
58 assert(re.mark_count() == 4); in main()
62 assert(std::regex_match(s, m, re)); in main()
72 std::regex re("^(a)(?!([^b]))(.c)$"); in main() local
[all …]
/external/libcxx/test/std/re/re.const/re.matchflag/
Dmatch_not_eol.pass.cpp26 std::regex re("foo$"); in main() local
27 assert( std::regex_match(target, re)); in main()
28 assert(!std::regex_match(target, re, std::regex_constants::match_not_eol)); in main()
33 std::regex re("foo"); in main() local
34 assert( std::regex_match(target, re)); in main()
35 assert( std::regex_match(target, re, std::regex_constants::match_not_eol)); in main()
40 std::regex re("foo$"); in main() local
41 assert( std::regex_search(target, re)); in main()
42 assert(!std::regex_search(target, re, std::regex_constants::match_not_eol)); in main()
47 std::regex re("foo"); in main() local
[all …]
Dmatch_not_bol.pass.cpp26 std::regex re("^foo"); in main() local
27 assert( std::regex_match(target, re)); in main()
28 assert(!std::regex_match(target, re, std::regex_constants::match_not_bol)); in main()
33 std::regex re("foo"); in main() local
34 assert( std::regex_match(target, re)); in main()
35 assert( std::regex_match(target, re, std::regex_constants::match_not_bol)); in main()
40 std::regex re("^foo"); in main() local
41 assert( std::regex_search(target, re)); in main()
42 assert(!std::regex_search(target, re, std::regex_constants::match_not_bol)); in main()
47 std::regex re("foo"); in main() local
[all …]
/external/antlr/antlr-3.4/runtime/ObjC/Framework/examples/simplecTreeParser/
DSimpleCTP.java100 catch (RecognitionException re) { in program()
101 reportError(re); in program()
102 recover(input,re); in program()
192 catch (RecognitionException re) { in declaration()
193 reportError(re); in declaration()
194 recover(input,re); in declaration()
229 catch (RecognitionException re) { in variable()
230 reportError(re); in variable()
231 recover(input,re); in variable()
252 catch (RecognitionException re) { in declarator()
[all …]

12345678910>>...133