1 /* ANSI-C code produced by gperf version 3.1 */
2 /* Command-line: /usr/local/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
725 }; /* END of CR_Alpha */
727 /* PROPERTY: 'Blank': POSIX [[:Blank:]] */
728 static const OnigCodePoint
738 }; /* END of CR_Blank */
740 /* PROPERTY: 'Cntrl': POSIX [[:Cntrl:]] */
741 static const OnigCodePoint
745 }; /* END of CR_Cntrl */
747 /* PROPERTY: 'Digit': POSIX [[:Digit:]] */
748 static const OnigCodePoint
809 }; /* END of CR_Digit */
811 /* PROPERTY: 'Graph': POSIX [[:Graph:]] */
812 static const OnigCodePoint
1485 }; /* END of CR_Graph */
1487 /* PROPERTY: 'Lower': POSIX [[:Lower:]] */
1488 static const OnigCodePoint
2139 }; /* END of CR_Lower */
2141 /* PROPERTY: 'Print': POSIX [[:Print:]] */
2142 static const OnigCodePoint
2812 }; /* END of CR_Print */
2814 /* PROPERTY: 'Punct': POSIX [[:Punct:]] */
2815 static const OnigCodePoint
2999 }; /* END of CR_Punct */
3001 /* PROPERTY: 'Space': POSIX [[:Space:]] */
3002 static const OnigCodePoint
3014 }; /* END of CR_Space */
3016 /* PROPERTY: 'Upper': POSIX [[:Upper:]] */
3017 static const OnigCodePoint
3660 }; /* END of CR_Upper */
3662 /* PROPERTY: 'XDigit': POSIX [[:XDigit:]] */
3663 static const OnigCodePoint
3668 }; /* END of CR_XDigit */
3670 /* PROPERTY: 'Word': POSIX [[:Word:]] */
3671 static const OnigCodePoint
4389 }; /* END of CR_Word */
4391 /* PROPERTY: 'Alnum': POSIX [[:Alnum:]] */
4392 static const OnigCodePoint
5109 }; /* END of CR_Alnum */
5111 /* PROPERTY: 'ASCII': POSIX [[:ASCII:]] */
5112 static const OnigCodePoint
5115 }; /* END of CR_ASCII */
5118 static const OnigCodePoint
*
5119 const CodeRanges
[] = {
5137 #define pool_offset(s) offsetof(struct unicode_prop_name_pool_t, unicode_prop_name_pool_str##s)
5140 #define TOTAL_KEYWORDS 15
5141 #define MIN_WORD_LENGTH 4
5142 #define MAX_WORD_LENGTH 7
5143 #define MIN_HASH_VALUE 5
5144 #define MAX_HASH_VALUE 19
5145 /* maximum key range = 15, duplicates = 0 */
5147 #ifndef GPERF_DOWNCASE
5148 #define GPERF_DOWNCASE 1
5149 static unsigned char gperf_downcase
[256] =
5151 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
5152 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
5153 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
5154 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
5155 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
5156 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
5157 122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
5158 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
5159 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
5160 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
5161 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
5162 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
5163 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
5164 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
5165 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
5166 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
5167 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
5172 #ifndef GPERF_CASE_STRNCMP
5173 #define GPERF_CASE_STRNCMP 1
5175 gperf_case_strncmp (register const char *s1
, register const char *s2
, register size_t n
)
5179 unsigned char c1
= gperf_downcase
[(unsigned char)*s1
++];
5180 unsigned char c2
= gperf_downcase
[(unsigned char)*s2
++];
5181 if (c1
!= 0 && c1
== c2
)
5186 return (int)c1
- (int)c2
;
5200 hash (register const char *str
, register size_t len
)
5202 static const unsigned char asso_values
[] =
5204 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5205 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5206 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5207 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5208 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5209 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5210 20, 20, 20, 20, 20, 2, 12, 5, 3, 20,
5211 20, 10, 20, 0, 20, 20, 9, 20, 1, 20,
5212 0, 20, 9, 7, 3, 6, 20, 2, 3, 20,
5213 20, 20, 20, 20, 20, 20, 20, 2, 12, 5,
5214 3, 20, 20, 10, 20, 0, 20, 20, 9, 20,
5215 1, 20, 0, 20, 9, 7, 3, 6, 20, 2,
5216 3, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5217 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5218 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5219 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5220 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5221 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5222 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5223 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5224 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5225 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5226 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5227 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5228 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
5229 20, 20, 20, 20, 20, 20
5231 return len
+ asso_values
[(unsigned char)str
[2]] + asso_values
[(unsigned char)str
[0]];
5234 struct unicode_prop_name_pool_t
5236 char unicode_prop_name_pool_str5
[sizeof("print")];
5237 char unicode_prop_name_pool_str6
[sizeof("punct")];
5238 char unicode_prop_name_pool_str7
[sizeof("alpha")];
5239 char unicode_prop_name_pool_str8
[sizeof("alnum")];
5240 char unicode_prop_name_pool_str9
[sizeof("xdigit")];
5241 char unicode_prop_name_pool_str10
[sizeof("newline")];
5242 char unicode_prop_name_pool_str11
[sizeof("upper")];
5243 char unicode_prop_name_pool_str12
[sizeof("ascii")];
5244 char unicode_prop_name_pool_str13
[sizeof("cntrl")];
5245 char unicode_prop_name_pool_str14
[sizeof("space")];
5246 char unicode_prop_name_pool_str15
[sizeof("word")];
5247 char unicode_prop_name_pool_str16
[sizeof("lower")];
5248 char unicode_prop_name_pool_str17
[sizeof("graph")];
5249 char unicode_prop_name_pool_str18
[sizeof("digit")];
5250 char unicode_prop_name_pool_str19
[sizeof("blank")];
5252 static const struct unicode_prop_name_pool_t unicode_prop_name_pool_contents
=
5270 #define unicode_prop_name_pool ((const char *) &unicode_prop_name_pool_contents)
5271 static const struct PoolPropertyNameCtype
*
5272 unicode_lookup_property_name (register const char *str
, register size_t len
)
5274 static const struct PoolPropertyNameCtype wordlist
[] =
5276 {-1}, {-1}, {-1}, {-1}, {-1},
5278 {pool_offset(5), 7},
5280 {pool_offset(6), 8},
5282 {pool_offset(7), 1},
5284 {pool_offset(8), 13},
5286 {pool_offset(9), 11},
5288 {pool_offset(10), 0},
5290 {pool_offset(11), 10},
5292 {pool_offset(12), 14},
5294 {pool_offset(13), 3},
5296 {pool_offset(14), 9},
5298 {pool_offset(15), 12},
5300 {pool_offset(16), 6},
5302 {pool_offset(17), 5},
5304 {pool_offset(18), 4},
5306 {pool_offset(19), 2}
5309 if (len
<= MAX_WORD_LENGTH
&& len
>= MIN_WORD_LENGTH
)
5311 register unsigned int key
= hash (str
, len
);
5313 if (key
<= MAX_HASH_VALUE
)
5315 register int o
= wordlist
[key
].name
;
5318 register const char *s
= o
+ unicode_prop_name_pool
;
5320 if ((((unsigned char)*str
^ (unsigned char)*s
) & ~32) == 0 && !gperf_case_strncmp (str
, s
, len
) && s
[len
] == '\0')
5321 return &wordlist
[key
];
5330 #define PROPERTY_NAME_MAX_SIZE 17
5331 #define CODE_RANGES_NUM 15
5333 #define PROP_INDEX_NEWLINE 0
5334 #define PROP_INDEX_ALPHA 1
5335 #define PROP_INDEX_BLANK 2
5336 #define PROP_INDEX_CNTRL 3
5337 #define PROP_INDEX_DIGIT 4
5338 #define PROP_INDEX_GRAPH 5
5339 #define PROP_INDEX_LOWER 6
5340 #define PROP_INDEX_PRINT 7
5341 #define PROP_INDEX_PUNCT 8
5342 #define PROP_INDEX_SPACE 9
5343 #define PROP_INDEX_UPPER 10
5344 #define PROP_INDEX_XDIGIT 11
5345 #define PROP_INDEX_WORD 12
5346 #define PROP_INDEX_ALNUM 13
5347 #define PROP_INDEX_ASCII 14