Lines Matching defs:set
94 static inline void addCategory(UnicodeSet *set, int32_t value, UErrorCode& ec) {
95 set->addAll(UnicodeSet().applyIntPropertyValue(UCHAR_GENERAL_CATEGORY_MASK, value, ec));
196 // Table row specified an individual character, not a set, and
219 // Table row specified a character class, or set of characters,
280 // Set stack cleanup: a successful compile would have left it empty,
319 // Set up fast latin-1 range sets
773 // 2. LOOP_SR_I set number (assuming repeated item is a set ref)
784 // Emit optimized code for [char set]+
890 // Or, if the body is a simple [Set],
891 // 1. LOOP_SR_I set number
916 // Emit optimized code for a [char set]*
1509 // Set the current mode flags to the new values.
1529 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1530 set->add(chAmp);
1536 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1537 set->add(chDash);
1543 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1544 set->addAll(*RegexStaticSets::gStaticSets->fPropSets[URX_ISSPACE_SET]);
1550 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1553 set->addAll(SSet);
1559 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1560 // TODO - make a static set, ticket 6058.
1561 addCategory(set, U_GC_ND_MASK, *fStatus);
1567 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1569 // TODO - make a static set, ticket 6058.
1572 set->addAll(digits);
1578 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1582 set->addAll(h);
1588 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1593 set->addAll(h);
1599 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1600 set->add((UChar32)0x0a, (UChar32)0x0d); // add range
1601 set->add((UChar32)0x85);
1602 set->add((UChar32)0x2028, (UChar32)0x2029);
1608 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1614 set->addAll(v);
1620 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1621 set->addAll(*RegexStaticSets::gStaticSets->fPropSets[URX_ISWORD_SET]);
1627 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1630 set->addAll(SSet);
1645 // Set up a new UnicodeSet for the set beginning with the just-scanned '['
1646 // Push a Difference operator, which will cause the new set to be subtracted from what
1677 // Consider this to unambiguously be a set difference operator.
1682 // Have encountered the ']' that closes a set.
1683 // Force the evaluation of any pending operations within this set,
1684 // leave the completed set on the top of the set stack.
1692 // Finished a complete set expression, including all nested sets.
1693 // The close bracket has already triggered clearing out pending set operators,
1695 // one entry, the result set.
1709 // Union the just-scanned literal character into the set being built.
1710 // This operation is the highest precedence set operation, so we can always do
1753 // We have scanned literal-\N{CHAR NAME}. Add the range to the set.
1754 // The left character is already in the set, and is saved in fLastSetLiteral.
1771 // Scanned a '^' at the start of a set.
1772 // Push the negation operator onto the set op stack.
1795 error(U_REGEX_RULE_SYNTAX); // -- or && at the end of a set. Illegal.
1823 // We have scanned literal-literal. Add the range to the set.
1824 // The left character is already in the set, and is saved in fLastSetLiteral.
2138 // Item just compiled is a single thing, a ".", or a single char, a string or a set reference.
2193 U_ASSERT(URX_VAL(patOp) == 0); // Branch target for JMP should not be set.
2194 patOp |= fRXPat->fCompiledPat->size(); // Set it now.
2368 // Remove any strings from the set.
2378 // Set of no elements. Always fails to match.
2386 // The set contains only a single code point. Put it into
2388 // than a set, and discard the set itself.
2396 // The set contains two or more chars. (the normal case)
2397 // Put it into the compiled pattern as a set.
2508 // will end, and set up the state save op that will be needed.
2538 // set of characters that could potentially begin a case-insensitive
2556 // to the starting set fully match, rather than having just a first-char of the
2606 starterChars->set(caseFoldedC, caseFoldedC);
2627 starterChars->set(c, c);
2728 // Add it to the set of possible starting characters.
2750 // [Set]*, like a SETREF, above, in what it can match,
2869 // set of possible starting chars.
2956 // Add the starting character of this string to the set of possible starting
2978 // do update the set of possible starting characters.
2985 // Add the starting character of this string to the set of possible starting
3114 // 5. A character from a set of characters.
3118 // start type is already set. We're done.
3127 // Nothing to do here; everything is already set.
3138 // Matches start with a set of character smaller than the set of all chars.
3620 // If this happens, we can make a set of the BMP chars that the
3892 // set them to the appropriate "field not supported" values.
4023 // Don't set c.fQuoted, because that would prevent the state machine from
4267 set expression.
4273 // [:'+=,] is a perfectly good ordinary set expression that
4338 // The main scanner will retry the input as a normal set expression,
4354 static inline void addIdentifierIgnorable(UnicodeSet *set, UErrorCode& ec) {
4355 set->add(0, 8).add(0x0e, 0x1b).add(0x7f, 0x9f);
4356 addCategory(set, U_GC_CF_MASK, ec);
4360 // Create a Unicode Set from a Unicode Property expression.
4369 UnicodeSet *set;
4390 set = new UnicodeSet(setExpr, usetFlags, NULL, *fStatus);
4392 return set;
4394 delete set;
4395 set = NULL;
4405 set = new UnicodeSet(*(fRXPat->fStaticSets[URX_ISWORD_SET]));
4406 if (set == NULL) {
4408 return set;
4411 set->complement();
4413 return set;
4454 set = new UnicodeSet(setExpr, usetFlags, NULL, *fStatus);
4456 return set;
4458 delete set;
4459 set = NULL;
4467 set = new UnicodeSet();
4473 addCategory(set, U_GC_CN_MASK, localStatus);
4474 set->complement();
4477 addCategory(set, U_GC_ND_MASK, localStatus);
4480 addIdentifierIgnorable(set, localStatus);
4483 set->add(0, 0x1F).add(0x7F, 0x9F);
4486 addCategory(set, U_GC_L_MASK, localStatus);
4487 addCategory(set, U_GC_SC_MASK, localStatus);
4488 addCategory(set, U_GC_PC_MASK, localStatus);
4489 addCategory(set, U_GC_ND_MASK, localStatus);
4490 addCategory(set, U_GC_NL_MASK, localStatus);
4491 addCategory(set, U_GC_MC_MASK, localStatus);
4492 addCategory(set, U_GC_MN_MASK, localStatus);
4493 addIdentifierIgnorable(set, localStatus);
4496 addCategory(set, U_GC_L_MASK, localStatus);
4497 addCategory(set, U_GC_NL_MASK, localStatus);
4498 addCategory(set, U_GC_SC_MASK, localStatus);
4499 addCategory(set, U_GC_PC_MASK, localStatus);
4502 addCategory(set, U_GC_L_MASK, localStatus);
4505 addCategory(set, U_GC_L_MASK, localStatus);
4506 addCategory(set, U_GC_ND_MASK, localStatus);
4509 addCategory(set, U_GC_LL_MASK, localStatus);
4512 set->applyIntPropertyValue(UCHAR_BIDI_MIRRORED, 1, localStatus);
4515 addCategory(set, U_GC_Z_MASK, localStatus);
4518 set->add(0x10000, UnicodeSet::MAX_VALUE);
4521 addCategory(set, U_GC_LT_MASK, localStatus);
4524 addCategory(set, U_GC_L_MASK, localStatus);
4525 addCategory(set, U_GC_NL_MASK, localStatus);
4528 addCategory(set, U_GC_L_MASK, localStatus);
4529 addCategory(set, U_GC_PC_MASK, localStatus);
4530 addCategory(set, U_GC_ND_MASK, localStatus);
4531 addCategory(set, U_GC_NL_MASK, localStatus);
4532 addCategory(set, U_GC_MC_MASK, localStatus);
4533 addCategory(set, U_GC_MN_MASK, localStatus);
4534 addIdentifierIgnorable(set, localStatus);
4537 addCategory(set, U_GC_LU_MASK, localStatus);
4540 set->add(0, UnicodeSet::MAX_VALUE);
4543 addCategory(set, U_GC_Z_MASK, localStatus);
4544 set->removeAll(UnicodeSet().add(0xa0).add(0x2007).add(0x202f));
4545 set->add(9, 0x0d).add(0x1c, 0x1f);
4548 set->add(0, UnicodeSet::MAX_VALUE);
4551 if (U_SUCCESS(localStatus) && !set->isEmpty()) {
4554 set->closeOver(USET_CASE_INSENSITIVE);
4557 set->complement();
4559 return set;
4561 delete set;
4562 set = NULL;
4571 // SetEval Part of the evaluation of [set expressions].