1 // Copyright 2008 The RE2 Authors. All Rights Reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // Unicode character groups.
7 // The codes get split into ranges of 16-bit codes
8 // and ranges of 32-bit codes. It would be simpler
9 // to use only 32-bit ranges, but these tables are large
10 // enough to warrant extra care.
12 // Using just 32-bit ranges gives 27 kB of data.
13 // Adding 16-bit ranges gives 18 kB of data.
14 // Adding an extra table of 16-bit singletons would reduce
15 // to 16.5 kB of data but make the data harder to use;
18 #ifndef RE2_UNICODE_GROUPS_H__
19 #define RE2_UNICODE_GROUPS_H__
21 #include "util/util.h"
40 int sign
; // +1 for [abc], -1 for [^abc]
47 // Named by property or script name (e.g., "Nd", "N", "Han").
48 // Negated groups are not included.
49 extern UGroup unicode_groups
[];
50 extern int num_unicode_groups
;
52 // Named by POSIX name (e.g., "[:alpha:]", "[:^lower:]").
53 // Negated groups are included.
54 extern UGroup posix_groups
[];
55 extern int num_posix_groups
;
57 // Named by Perl name (e.g., "\\d", "\\D").
58 // Negated groups are included.
59 extern UGroup perl_groups
[];
60 extern int num_perl_groups
;
64 #endif // RE2_UNICODE_GROUPS_H__