summaryrefslogtreecommitdiffstats
path: root/intl/icu/source/i18n/regexst.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /intl/icu/source/i18n/regexst.h
parentInitial commit. (diff)
downloadfirefox-esr-upstream.tar.xz
firefox-esr-upstream.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'intl/icu/source/i18n/regexst.h')
-rw-r--r--intl/icu/source/i18n/regexst.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/intl/icu/source/i18n/regexst.h b/intl/icu/source/i18n/regexst.h
new file mode 100644
index 0000000000..bcb393dd3f
--- /dev/null
+++ b/intl/icu/source/i18n/regexst.h
@@ -0,0 +1,60 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
+//
+// regexst.h
+//
+// Copyright (C) 2003-2010, International Business Machines Corporation and others.
+// All Rights Reserved.
+//
+// This file contains declarations for the class RegexStaticSets
+//
+// This class is internal to the regular expression implementation.
+// For the public Regular Expression API, see the file "unicode/regex.h"
+//
+// RegexStaticSets groups together the common UnicodeSets that are needed
+// for compiling or executing RegularExpressions. This grouping simplifies
+// the thread safe lazy creation and sharing of these sets across
+// all instances of regular expressions.
+//
+
+#ifndef REGEXST_H
+#define REGEXST_H
+
+#include "unicode/utypes.h"
+#include "unicode/utext.h"
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+
+#include "regeximp.h"
+#include "regexcst.h"
+
+U_NAMESPACE_BEGIN
+
+class UnicodeSet;
+
+
+class RegexStaticSets : public UMemory {
+public:
+ static RegexStaticSets *gStaticSets; // Ptr to all lazily initialized constant
+ // shared sets.
+
+ RegexStaticSets(UErrorCode *status);
+ ~RegexStaticSets();
+ static void initGlobals(UErrorCode *status);
+
+ UnicodeSet fPropSets[URX_LAST_SET] {}; // The sets for common regex items, e.g. \s
+ Regex8BitSet fPropSets8[URX_LAST_SET] {}; // Fast bitmap sets for latin-1 range for above.
+
+ UnicodeSet fRuleSets[kRuleSet_count] {}; // Sets used while parsing regexp patterns.
+ UnicodeSet fUnescapeCharSet {}; // Set of chars handled by unescape when
+ // encountered with a \ in a pattern.
+ UnicodeSet *fRuleDigitsAlias {};
+ UText *fEmptyText {}; // An empty string, to be used when a matcher
+ // is created with no input.
+
+};
+
+
+U_NAMESPACE_END
+#endif // !UCONFIG_NO_REGULAR_EXPRESSIONS
+#endif // REGEXST_H
+