Lines Matching refs:prefixes

58     pub fn prefixes(expr: &Hir) -> Literals {  in prefixes()  method
311 prefixes(expr, &mut lits); in union_prefixes()
584 fn prefixes(expr: &Hir, lits: &mut Literals) { in prefixes() function
604 prefixes(&**hir, lits); in prefixes()
608 repeat_zero_or_one_literals(&x.hir, lits, prefixes); in prefixes()
611 repeat_zero_or_more_literals(&x.hir, lits, prefixes); in prefixes()
614 repeat_one_or_more_literals(&x.hir, lits, prefixes); in prefixes()
623 &x.hir, min, max, x.greedy, lits, prefixes, in prefixes()
628 HirKind::Concat(ref es) if es.len() == 1 => prefixes(&es[0], lits), in prefixes()
640 prefixes(e, &mut lits2); in prefixes()
651 alternate_literals(es, lits, prefixes); in prefixes()
1050 fn prefixes(lits: &mut Literals, expr: &Hir) { in prefixes() function
1105 test_lit!(pfx_one_lit1, prefixes, "a", M("a"));
1106 test_lit!(pfx_one_lit2, prefixes, "abc", M("abc"));
1107 test_lit!(pfx_one_lit3, prefixes, "(?u)☃", M("\\xe2\\x98\\x83"));
1109 test_lit!(pfx_one_lit4, prefixes, "(?ui)☃", M("\\xe2\\x98\\x83"));
1110 test_lit!(pfx_class1, prefixes, "[1-4]", M("1"), M("2"), M("3"), M("4"));
1113 prefixes,
1121 prefixes,
1127 test_lit!(pfx_one_lit_casei1, prefixes, "(?i-u)a", M("A"), M("a"));
1130 prefixes,
1141 test_lit!(pfx_group1, prefixes, "(a)", M("a"));
1142 test_lit!(pfx_rep_zero_or_one1, prefixes, "a?");
1143 test_lit!(pfx_rep_zero_or_one2, prefixes, "(?:abc)?");
1144 test_lit!(pfx_rep_zero_or_more1, prefixes, "a*");
1145 test_lit!(pfx_rep_zero_or_more2, prefixes, "(?:abc)*");
1146 test_lit!(pfx_rep_one_or_more1, prefixes, "a+", C("a"));
1147 test_lit!(pfx_rep_one_or_more2, prefixes, "(?:abc)+", C("abc"));
1148 test_lit!(pfx_rep_nested_one_or_more, prefixes, "(?:a+)+", C("a"));
1149 test_lit!(pfx_rep_range1, prefixes, "a{0}");
1150 test_lit!(pfx_rep_range2, prefixes, "a{0,}");
1151 test_lit!(pfx_rep_range3, prefixes, "a{0,1}");
1152 test_lit!(pfx_rep_range4, prefixes, "a{1}", M("a"));
1153 test_lit!(pfx_rep_range5, prefixes, "a{2}", M("aa"));
1154 test_lit!(pfx_rep_range6, prefixes, "a{1,2}", C("a"));
1155 test_lit!(pfx_rep_range7, prefixes, "a{2,3}", C("aa"));
1158 test_lit!(pfx_cat1, prefixes, "(?:a)(?:b)", M("ab"));
1159 test_lit!(pfx_cat2, prefixes, "[ab]z", M("az"), M("bz"));
1162 prefixes,
1175 prefixes,
1182 test_lit!(pfx_cat5, prefixes, "a*b", C("a"), M("b"));
1183 test_lit!(pfx_cat6, prefixes, "a*b*c", C("a"), C("b"), M("c"));
1184 test_lit!(pfx_cat7, prefixes, "a*b*c+", C("a"), C("b"), C("c"));
1185 test_lit!(pfx_cat8, prefixes, "a*b+c", C("a"), C("b"));
1186 test_lit!(pfx_cat9, prefixes, "a*b+c*", C("a"), C("b"));
1187 test_lit!(pfx_cat10, prefixes, "ab*", C("ab"), M("a"));
1188 test_lit!(pfx_cat11, prefixes, "ab*c", C("ab"), M("ac"));
1189 test_lit!(pfx_cat12, prefixes, "ab+", C("ab"));
1190 test_lit!(pfx_cat13, prefixes, "ab+c", C("ab"));
1191 test_lit!(pfx_cat14, prefixes, "a^", C("a"));
1192 test_lit!(pfx_cat15, prefixes, "$a");
1193 test_lit!(pfx_cat16, prefixes, r"ab*c", C("ab"), M("ac"));
1194 test_lit!(pfx_cat17, prefixes, r"ab+c", C("ab"));
1195 test_lit!(pfx_cat18, prefixes, r"z*azb", C("z"), M("azb"));
1196 test_lit!(pfx_cat19, prefixes, "a.z", C("a"));
1199 test_lit!(pfx_alt1, prefixes, "a|b", M("a"), M("b"));
1200 test_lit!(pfx_alt2, prefixes, "[1-3]|b", M("1"), M("2"), M("3"), M("b"));
1201 test_lit!(pfx_alt3, prefixes, "y(?:a|b)z", M("yaz"), M("ybz"));
1202 test_lit!(pfx_alt4, prefixes, "a|b*");
1203 test_lit!(pfx_alt5, prefixes, "a|b+", M("a"), C("b"));
1204 test_lit!(pfx_alt6, prefixes, "a|(?:b|c*)");
1207 prefixes,
1216 test_lit!(pfx_alt8, prefixes, "a*b|c", C("a"), M("b"), M("c"));
1219 test_lit!(pfx_empty1, prefixes, "^a", M("a"));
1220 test_lit!(pfx_empty2, prefixes, "a${2}", C("a"));
1221 test_lit!(pfx_empty3, prefixes, "^abc", M("abc"));
1222 test_lit!(pfx_empty4, prefixes, "(?:^abc)|(?:^z)", M("abc"), M("z"));
1225 test_lit!(pfx_nothing1, prefixes, ".");
1226 test_lit!(pfx_nothing2, prefixes, "(?s).");
1227 test_lit!(pfx_nothing3, prefixes, "^");
1228 test_lit!(pfx_nothing4, prefixes, "$");
1229 test_lit!(pfx_nothing6, prefixes, "(?m)$");
1230 test_lit!(pfx_nothing7, prefixes, r"\b");
1231 test_lit!(pfx_nothing8, prefixes, r"\B");
1234 test_lit!(pfx_defeated1, prefixes, ".a");
1235 test_lit!(pfx_defeated2, prefixes, "(?s).a");
1236 test_lit!(pfx_defeated3, prefixes, "a*b*c*");
1237 test_lit!(pfx_defeated4, prefixes, "a|.");
1238 test_lit!(pfx_defeated5, prefixes, ".|a");
1239 test_lit!(pfx_defeated6, prefixes, "a|^");
1240 test_lit!(pfx_defeated7, prefixes, ".(?:a(?:b)(?:c))");
1241 test_lit!(pfx_defeated8, prefixes, "$a");
1242 test_lit!(pfx_defeated9, prefixes, "(?m)$a");
1243 test_lit!(pfx_defeated10, prefixes, r"\ba");
1244 test_lit!(pfx_defeated11, prefixes, r"\Ba");
1245 test_lit!(pfx_defeated12, prefixes, "^*a");
1246 test_lit!(pfx_defeated13, prefixes, "^+a");
1250 prefixes,
1294 test_exhausted!(pfx_exhausted1, prefixes, "[a-z]");
1295 test_exhausted!(pfx_exhausted2, prefixes, "[a-z]*A");
1296 test_exhausted!(pfx_exhausted3, prefixes, "A[a-z]Z", C("A"));
1299 prefixes,
1308 prefixes,
1314 prefixes,
1321 prefixes,
1328 prefixes,