1 /* ANSI-C code produced by gperf version 3.1 */
2 /* Command-line: /usr/bin/gperf -T -C -c -t -j1 -L ANSI-C --ignore-case --pic -Q unicode_prop_name_pool -N unicode_lookup_property_name --output-file gperf2.tmp unicode_property_data_posix.gperf */
3 /* Computed positions: -k'1,3' */
5 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
6 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
7 && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
8 && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
9 && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
10 && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
11 && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
12 && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
13 && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
14 && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
15 && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
16 && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
17 && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
18 && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
19 && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
20 && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
21 && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
22 && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
23 && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
24 && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
25 && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
26 && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
27 && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
28 /* The character set is not based on ISO-646. */
29 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
34 /* Generated by make_unicode_property_data.py. */
37 /* PROPERTY: 'NEWLINE': POSIX [[:NEWLINE:]] */
38 static const OnigCodePoint
41 }; /* END of CR_NEWLINE */
43 /* PROPERTY: 'Alpha': POSIX [[:Alpha:]] */
44 static const OnigCodePoint
722 }; /* END of CR_Alpha */
724 /* PROPERTY: 'Blank': POSIX [[:Blank:]] */
725 static const OnigCodePoint
735 }; /* END of CR_Blank */
737 /* PROPERTY: 'Cntrl': POSIX [[:Cntrl:]] */
738 static const OnigCodePoint
742 }; /* END of CR_Cntrl */
744 /* PROPERTY: 'Digit': POSIX [[:Digit:]] */
745 static const OnigCodePoint
804 }; /* END of CR_Digit */
806 /* PROPERTY: 'Graph': POSIX [[:Graph:]] */
807 static const OnigCodePoint
1472 }; /* END of CR_Graph */
1474 /* PROPERTY: 'Lower': POSIX [[:Lower:]] */
1475 static const OnigCodePoint
2122 }; /* END of CR_Lower */
2124 /* PROPERTY: 'Print': POSIX [[:Print:]] */
2125 static const OnigCodePoint
2787 }; /* END of CR_Print */
2789 /* PROPERTY: 'Punct': POSIX [[:Punct:]] */
2790 static const OnigCodePoint
2970 }; /* END of CR_Punct */
2972 /* PROPERTY: 'Space': POSIX [[:Space:]] */
2973 static const OnigCodePoint
2985 }; /* END of CR_Space */
2987 /* PROPERTY: 'Upper': POSIX [[:Upper:]] */
2988 static const OnigCodePoint
3626 }; /* END of CR_Upper */
3628 /* PROPERTY: 'XDigit': POSIX [[:XDigit:]] */
3629 static const OnigCodePoint
3634 }; /* END of CR_XDigit */
3636 /* PROPERTY: 'Word': POSIX [[:Word:]] */
3637 static const OnigCodePoint
4349 }; /* END of CR_Word */
4351 /* PROPERTY: 'Alnum': POSIX [[:Alnum:]] */
4352 static const OnigCodePoint
5067 }; /* END of CR_Alnum */
5069 /* PROPERTY: 'ASCII': POSIX [[:ASCII:]] */
5070 static const OnigCodePoint
5073 }; /* END of CR_ASCII */
5076 static const OnigCodePoint
*
5077 const CodeRanges
[] = {
5095 #define pool_offset(s) offsetof(struct unicode_prop_name_pool_t, unicode_prop_name_pool_str##s)
5098 #define TOTAL_KEYWORDS 15
5099 #define MIN_WORD_LENGTH 4
5100 #define MAX_WORD_LENGTH 7
5101 #define MIN_HASH_VALUE 5
5102 #define MAX_HASH_VALUE 19
5103 /* maximum key range = 15, duplicates = 0 */
5105 #ifndef GPERF_DOWNCASE
5106 #define GPERF_DOWNCASE 1
5107 static unsigned char gperf_downcase
[256] =
5109 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
5110 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
5111 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
5112 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
5113 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
5114 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
5115 122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
5116 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
5117 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
5118 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
5119 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
5120 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
5121 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
5122 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
5123 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
5124 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
5125 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
5130 #ifndef GPERF_CASE_STRNCMP
5131 #define GPERF_CASE_STRNCMP 1
5133 gperf_case_strncmp (register const char *s1
, register const char *s2
, register size_t n
)
5137 unsigned char c1
= gperf_downcase
[(unsigned char)*s1
++];
5138 unsigned char c2
= gperf_downcase
[(unsigned char)*s2
++];
5139 if (c1
!= 0 && c1
== c2
)
5144 return (int)c1
- (int)c2
;
5158 hash (register const char *str
, register size_t len
)
5160 static const unsigned char asso_values
[] =
5162 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5163 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5164 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5165 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5166 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5167 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5168 20, 20, 20, 20, 20, 2, 12, 5, 3, 20,
5169 20, 10, 20, 0, 20, 20, 9, 20, 1, 20,
5170 0, 20, 9, 7, 3, 6, 20, 2, 3, 20,
5171 20, 20, 20, 20, 20, 20, 20, 2, 12, 5,
5172 3, 20, 20, 10, 20, 0, 20, 20, 9, 20,
5173 1, 20, 0, 20, 9, 7, 3, 6, 20, 2,
5174 3, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5175 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5176 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5177 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5178 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5179 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5180 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5181 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5182 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5183 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5184 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5185 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5186 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5187 20, 20, 20, 20, 20, 20
5189 return len
+ asso_values
[(unsigned char)str
[2]] + asso_values
[(unsigned char)str
[0]];
5192 struct unicode_prop_name_pool_t
5194 char unicode_prop_name_pool_str5
[sizeof("print")];
5195 char unicode_prop_name_pool_str6
[sizeof("punct")];
5196 char unicode_prop_name_pool_str7
[sizeof("alpha")];
5197 char unicode_prop_name_pool_str8
[sizeof("alnum")];
5198 char unicode_prop_name_pool_str9
[sizeof("xdigit")];
5199 char unicode_prop_name_pool_str10
[sizeof("newline")];
5200 char unicode_prop_name_pool_str11
[sizeof("upper")];
5201 char unicode_prop_name_pool_str12
[sizeof("ascii")];
5202 char unicode_prop_name_pool_str13
[sizeof("cntrl")];
5203 char unicode_prop_name_pool_str14
[sizeof("space")];
5204 char unicode_prop_name_pool_str15
[sizeof("word")];
5205 char unicode_prop_name_pool_str16
[sizeof("lower")];
5206 char unicode_prop_name_pool_str17
[sizeof("graph")];
5207 char unicode_prop_name_pool_str18
[sizeof("digit")];
5208 char unicode_prop_name_pool_str19
[sizeof("blank")];
5210 static const struct unicode_prop_name_pool_t unicode_prop_name_pool_contents
=
5228 #define unicode_prop_name_pool ((const char *) &unicode_prop_name_pool_contents)
5229 static const struct PoolPropertyNameCtype
*
5230 unicode_lookup_property_name (register const char *str
, register size_t len
)
5232 static const struct PoolPropertyNameCtype wordlist
[] =
5234 {-1}, {-1}, {-1}, {-1}, {-1},
5236 {pool_offset(5), 7},
5238 {pool_offset(6), 8},
5240 {pool_offset(7), 1},
5242 {pool_offset(8), 13},
5244 {pool_offset(9), 11},
5246 {pool_offset(10), 0},
5248 {pool_offset(11), 10},
5250 {pool_offset(12), 14},
5252 {pool_offset(13), 3},
5254 {pool_offset(14), 9},
5256 {pool_offset(15), 12},
5258 {pool_offset(16), 6},
5260 {pool_offset(17), 5},
5262 {pool_offset(18), 4},
5264 {pool_offset(19), 2}
5267 if (len
<= MAX_WORD_LENGTH
&& len
>= MIN_WORD_LENGTH
)
5269 register unsigned int key
= hash (str
, len
);
5271 if (key
<= MAX_HASH_VALUE
)
5273 register int o
= wordlist
[key
].name
;
5276 register const char *s
= o
+ unicode_prop_name_pool
;
5278 if ((((unsigned char)*str
^ (unsigned char)*s
) & ~32) == 0 && !gperf_case_strncmp (str
, s
, len
) && s
[len
] == '\0')
5279 return &wordlist
[key
];
5288 #define PROPERTY_NAME_MAX_SIZE 17
5289 #define CODE_RANGES_NUM 15
5291 #define PROP_INDEX_NEWLINE 0
5292 #define PROP_INDEX_ALPHA 1
5293 #define PROP_INDEX_BLANK 2
5294 #define PROP_INDEX_CNTRL 3
5295 #define PROP_INDEX_DIGIT 4
5296 #define PROP_INDEX_GRAPH 5
5297 #define PROP_INDEX_LOWER 6
5298 #define PROP_INDEX_PRINT 7
5299 #define PROP_INDEX_PUNCT 8
5300 #define PROP_INDEX_SPACE 9
5301 #define PROP_INDEX_UPPER 10
5302 #define PROP_INDEX_XDIGIT 11
5303 #define PROP_INDEX_WORD 12
5304 #define PROP_INDEX_ALNUM 13
5305 #define PROP_INDEX_ASCII 14