Lines Matching defs:set

92 static inline void addCategory(UnicodeSet *set, int32_t value, UErrorCode& ec) {
93 set->addAll(UnicodeSet().applyIntPropertyValue(UCHAR_GENERAL_CATEGORY_MASK, value, ec));
191 // Table row specified an individual character, not a set, and
214 // Table row specified a character class, or set of characters,
783 // 2. LOOP_SR_I set number (assuming repeated item is a set ref)
794 // Emit optimized code for [char set]+
912 // 1. LOOP_SR_I set number
937 // Emit optimized code for a [char set]*
1515 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1516 set->add(chAmp);
1522 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1523 set->add(chDash);
1529 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1530 set->addAll(*RegexStaticSets::gStaticSets->fPropSets[URX_ISSPACE_SET]);
1536 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1539 set->addAll(SSet);
1545 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1546 // TODO - make a static set, ticket 6058.
1547 addCategory(set, U_GC_ND_MASK, *fStatus);
1553 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1555 // TODO - make a static set, ticket 6058.
1558 set->addAll(digits);
1564 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1565 set->addAll(*RegexStaticSets::gStaticSets->fPropSets[URX_ISWORD_SET]);
1571 UnicodeSet *set = (UnicodeSet *)fSetStack.peek();
1574 set->addAll(SSet);
1589 // Set up a new UnicodeSet for the set beginning with the just-scanned '['
1590 // Push a Difference operator, which will cause the new set to be subtracted from what
1621 // Consider this to unambiguously be a set difference operator.
1626 // Have encountered the ']' that closes a set.
1627 // Force the evaluation of any pending operations within this set,
1628 // leave the completed set on the top of the set stack.
1636 // Finished a complete set expression, including all nested sets.
1637 // The close bracket has already triggered clearing out pending set operators,
1639 // one entry, the result set.
1653 // Union the just-scanned literal character into the set being built.
1654 // This operation is the highest precedence set operation, so we can always do
1697 // We have scanned literal-\N{CHAR NAME}. Add the range to the set.
1698 // The left character is already in the set, and is saved in fLastSetLiteral.
1715 // Scanned a '^' at the start of a set.
1716 // Push the negation operator onto the set op stack.
1739 error(U_REGEX_RULE_SYNTAX); // -- or && at the end of a set. Illegal.
1767 // We have scanned literal-literal. Add the range to the set.
1768 // The left character is already in the set, and is saved in fLastSetLiteral.
1981 // Item just compiled is a single thing, a ".", or a single char, a string or a set reference.
2036 U_ASSERT(URX_VAL(patOp) == 0); // Branch target for JMP should not be set.
2212 // Remove any strings from the set.
2230 // The set contains only a single code point. Put it into
2232 // than a set, and discard the set itself.
2240 // The set contains two or more chars. (the normal case)
2241 // Put it into the compiled pattern as a set.
2349 // will end, and set up the state save op that will be needed.
2473 // Add it to the set of possible starting characters.
2571 // TODO: Compute the set of chars that case fold to this char, or to
2582 // set of possible starting chars.
2669 // Add the starting character of this string to the set of possible starting
2691 // do update the set of possible starting characters.
2698 // Add the starting character of this string to the set of possible starting
2704 // TODO: compute correct set of starting chars for full case folding.
2833 // 5. A character from a set of characters.
2837 // start type is already set. We're done.
2846 // Nothing to do here; everything is already set.
2857 // Matches start with a set of character smaller than the set of all chars.
3333 // If this happens, we can make a set of the BMP chars that the
3601 // set them to the appropriate "field not supported" values.
3732 // Don't set c.fQuoted, because that would prevent the state machine from
3975 // or NULL if this is not a valid POSIX-style set expression.
3981 // [:'+=,] is a perfectly good ordinary set expression that
4046 // The main scanner will retry the input as a normal set expression,
4062 static inline void addIdentifierIgnorable(UnicodeSet *set, UErrorCode& ec) {
4063 set->add(0, 8).add(0x0e, 0x1b).add(0x7f, 0x9f);
4064 addCategory(set, U_GC_CF_MASK, ec);
4077 UnicodeSet *set;
4098 set = new UnicodeSet(setExpr, usetFlags, NULL, *fStatus);
4100 return set;
4102 delete set;
4103 set = NULL;
4113 set = new UnicodeSet(*(fRXPat->fStaticSets[URX_ISWORD_SET]));
4114 if (set == NULL) {
4116 return set;
4119 set->complement();
4121 return set;
4162 set = new UnicodeSet(setExpr, usetFlags, NULL, *fStatus);
4164 return set;
4166 delete set;
4167 set = NULL;
4175 set = new UnicodeSet();
4181 addCategory(set, U_GC_CN_MASK, localStatus);
4182 set->complement();
4185 addCategory(set, U_GC_ND_MASK, localStatus);
4188 addIdentifierIgnorable(set, localStatus);
4191 set->add(0, 0x1F).add(0x7F, 0x9F);
4194 addCategory(set, U_GC_L_MASK, localStatus);
4195 addCategory(set, U_GC_SC_MASK, localStatus);
4196 addCategory(set, U_GC_PC_MASK, localStatus);
4197 addCategory(set, U_GC_ND_MASK, localStatus);
4198 addCategory(set, U_GC_NL_MASK, localStatus);
4199 addCategory(set, U_GC_MC_MASK, localStatus);
4200 addCategory(set, U_GC_MN_MASK, localStatus);
4201 addIdentifierIgnorable(set, localStatus);
4204 addCategory(set, U_GC_L_MASK, localStatus);
4205 addCategory(set, U_GC_NL_MASK, localStatus);
4206 addCategory(set, U_GC_SC_MASK, localStatus);
4207 addCategory(set, U_GC_PC_MASK, localStatus);
4210 addCategory(set, U_GC_L_MASK, localStatus);
4213 addCategory(set, U_GC_L_MASK, localStatus);
4214 addCategory(set, U_GC_ND_MASK, localStatus);
4217 addCategory(set, U_GC_LL_MASK, localStatus);
4220 set->applyIntPropertyValue(UCHAR_BIDI_MIRRORED, 1, localStatus);
4223 addCategory(set, U_GC_Z_MASK, localStatus);
4226 set->add(0x10000, UnicodeSet::MAX_VALUE);
4229 addCategory(set, U_GC_LT_MASK, localStatus);
4232 addCategory(set, U_GC_L_MASK, localStatus);
4233 addCategory(set, U_GC_NL_MASK, localStatus);
4236 addCategory(set, U_GC_L_MASK, localStatus);
4237 addCategory(set, U_GC_PC_MASK, localStatus);
4238 addCategory(set, U_GC_ND_MASK, localStatus);
4239 addCategory(set, U_GC_NL_MASK, localStatus);
4240 addCategory(set, U_GC_MC_MASK, localStatus);
4241 addCategory(set, U_GC_MN_MASK, localStatus);
4242 addIdentifierIgnorable(set, localStatus);
4245 addCategory(set, U_GC_LU_MASK, localStatus);
4248 set->add(0, UnicodeSet::MAX_VALUE);
4251 addCategory(set, U_GC_Z_MASK, localStatus);
4252 set->removeAll(UnicodeSet().add(0xa0).add(0x2007).add(0x202f));
4253 set->add(9, 0x0d).add(0x1c, 0x1f);
4256 set->add(0, UnicodeSet::MAX_VALUE);
4259 if (U_SUCCESS(localStatus) && !set->isEmpty()) {
4262 set->closeOver(USET_CASE_INSENSITIVE);
4265 set->complement();
4267 return set;
4269 delete set;
4270 set = NULL;
4279 // SetEval Part of the evaluation of [set expressions].