| 1 |
/* ANSI-C code produced by gperf version 3.3 */ |
| 2 |
/* Command-line: gperf -n -k1-8 -l */ |
| 3 |
|
| 4 |
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ |
| 5 |
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ |
| 6 |
&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ |
| 7 |
&& ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ |
| 8 |
&& ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ |
| 9 |
&& ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ |
| 10 |
&& ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ |
| 11 |
&& ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ |
| 12 |
&& ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ |
| 13 |
&& ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ |
| 14 |
&& ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ |
| 15 |
&& ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ |
| 16 |
&& ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ |
| 17 |
&& ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ |
| 18 |
&& ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ |
| 19 |
&& ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ |
| 20 |
&& ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ |
| 21 |
&& ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ |
| 22 |
&& ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ |
| 23 |
&& ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ |
| 24 |
&& ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ |
| 25 |
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ |
| 26 |
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) |
| 27 |
/* The character set is not based on ISO-646. */ |
| 28 |
#error "gperf generated tables don't work with this execution character set. Please report a bug to <[email protected]>." |
| 29 |
#endif |
| 30 |
|
| 31 |
|
| 32 |
#define TOTAL_KEYWORDS 40 |
| 33 |
#define MIN_WORD_LENGTH 2 |
| 34 |
#define MAX_WORD_LENGTH 14 |
| 35 |
#define MIN_HASH_VALUE 1 |
| 36 |
#define MAX_HASH_VALUE 155 |
| 37 |
/* maximum key range = 155, duplicates = 0 */ |
| 38 |
|
| 39 |
#ifdef __GNUC__ |
| 40 |
__inline |
| 41 |
#else |
| 42 |
#ifdef __cplusplus |
| 43 |
inline |
| 44 |
#endif |
| 45 |
#endif |
| 46 |
static unsigned int |
| 47 |
hash (register const char *str, register size_t len) |
| 48 |
{ |
| 49 |
static unsigned char asso_values[] = |
| 50 |
{ |
| 51 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 52 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 53 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 54 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 55 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 56 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 57 |
156, 156, 156, 156, 156, 1, 10, 30, 25, 0, |
| 58 |
10, 55, 6, 0, 156, 156, 15, 15, 35, 15, |
| 59 |
30, 0, 5, 1, 0, 45, 21, 45, 6, 1, |
| 60 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 61 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 62 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 63 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 64 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 65 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 66 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 67 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 68 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 69 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 70 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 71 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 72 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 73 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 74 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 75 |
156, 156, 156, 156, 156, 156, 156, 156, 156, 156, |
| 76 |
156, 156, 156, 156, 156, 156 |
| 77 |
}; |
| 78 |
register unsigned int hval = 0; |
| 79 |
|
| 80 |
switch (len) |
| 81 |
{ |
| 82 |
default: |
| 83 |
hval += asso_values[(unsigned char)str[7]]; |
| 84 |
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9))) |
| 85 |
[[fallthrough]]; |
| 86 |
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10) |
| 87 |
__attribute__ ((__fallthrough__)); |
| 88 |
#endif |
| 89 |
/*FALLTHROUGH*/ |
| 90 |
case 7: |
| 91 |
hval += asso_values[(unsigned char)str[6]]; |
| 92 |
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9))) |
| 93 |
[[fallthrough]]; |
| 94 |
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10) |
| 95 |
__attribute__ ((__fallthrough__)); |
| 96 |
#endif |
| 97 |
/*FALLTHROUGH*/ |
| 98 |
case 6: |
| 99 |
hval += asso_values[(unsigned char)str[5]]; |
| 100 |
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9))) |
| 101 |
[[fallthrough]]; |
| 102 |
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10) |
| 103 |
__attribute__ ((__fallthrough__)); |
| 104 |
#endif |
| 105 |
/*FALLTHROUGH*/ |
| 106 |
case 5: |
| 107 |
hval += asso_values[(unsigned char)str[4]]; |
| 108 |
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9))) |
| 109 |
[[fallthrough]]; |
| 110 |
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10) |
| 111 |
__attribute__ ((__fallthrough__)); |
| 112 |
#endif |
| 113 |
/*FALLTHROUGH*/ |
| 114 |
case 4: |
| 115 |
hval += asso_values[(unsigned char)str[3]]; |
| 116 |
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9))) |
| 117 |
[[fallthrough]]; |
| 118 |
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10) |
| 119 |
__attribute__ ((__fallthrough__)); |
| 120 |
#endif |
| 121 |
/*FALLTHROUGH*/ |
| 122 |
case 3: |
| 123 |
hval += asso_values[(unsigned char)str[2]]; |
| 124 |
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9))) |
| 125 |
[[fallthrough]]; |
| 126 |
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10) |
| 127 |
__attribute__ ((__fallthrough__)); |
| 128 |
#endif |
| 129 |
/*FALLTHROUGH*/ |
| 130 |
case 2: |
| 131 |
hval += asso_values[(unsigned char)str[1]]; |
| 132 |
#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9))) |
| 133 |
[[fallthrough]]; |
| 134 |
#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10) |
| 135 |
__attribute__ ((__fallthrough__)); |
| 136 |
#endif |
| 137 |
/*FALLTHROUGH*/ |
| 138 |
case 1: |
| 139 |
hval += asso_values[(unsigned char)str[0]]; |
| 140 |
break; |
| 141 |
} |
| 142 |
return hval; |
| 143 |
} |
| 144 |
|
| 145 |
const char * |
| 146 |
in_word_set (register const char *str, register size_t len) |
| 147 |
{ |
| 148 |
static unsigned char lengthtable[] = |
| 149 |
{ |
| 150 |
0, 3, 0, 0, 0, 0, 4, 0, 0, 0, 2, 2, 0, 5, |
| 151 |
0, 2, 4, 0, 0, 0, 2, 0, 0, 0, 0, 2, 5, 3, |
| 152 |
0, 0, 3, 4, 4, 0, 0, 2, 6, 0, 0, 0, 2, 4, |
| 153 |
0, 0, 0, 4, 3, 0, 0, 0, 3, 4, 0, 0, 0, 3, |
| 154 |
6, 0, 0, 0, 3, 3, 0, 0, 0, 6, 5, 0, 0, 0, |
| 155 |
10, 9, 0, 0, 0, 4, 0, 0, 0, 0, 6, 5, 0, 0, |
| 156 |
0, 7, 0, 0, 0, 0, 6, 0, 0, 0, 0, 5, 0, 0, |
| 157 |
0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, |
| 158 |
0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 159 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 160 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 161 |
0, 9 |
| 162 |
}; |
| 163 |
static const char * wordlist[] = |
| 164 |
{ |
| 165 |
"", |
| 166 |
"SET", |
| 167 |
"", "", "", "", |
| 168 |
"EXIT", |
| 169 |
"", "", "", |
| 170 |
"IF", |
| 171 |
"BY", |
| 172 |
"", |
| 173 |
"ARRAY", |
| 174 |
"", |
| 175 |
"TO", |
| 176 |
"ELSE", |
| 177 |
"", "", "", |
| 178 |
"OR", |
| 179 |
"", "", "", "", |
| 180 |
"OF", |
| 181 |
"ELSIF", |
| 182 |
"VAR", |
| 183 |
"", "", |
| 184 |
"FOR", |
| 185 |
"TYPE", |
| 186 |
"CASE", |
| 187 |
"", "", |
| 188 |
"IN", |
| 189 |
"REPEAT", |
| 190 |
"", "", "", |
| 191 |
"DO", |
| 192 |
"THEN", |
| 193 |
"", "", "", |
| 194 |
"FROM", |
| 195 |
"DIV", |
| 196 |
"", "", "", |
| 197 |
"NOT", |
| 198 |
"WITH", |
| 199 |
"", "", "", |
| 200 |
"MOD", |
| 201 |
"EXPORT", |
| 202 |
"", "", "", |
| 203 |
"END", |
| 204 |
"AND", |
| 205 |
"", "", "", |
| 206 |
"IMPORT", |
| 207 |
"WHILE", |
| 208 |
"", "", "", |
| 209 |
"DEFINITION", |
| 210 |
"QUALIFIED", |
| 211 |
"", "", "", |
| 212 |
"LOOP", |
| 213 |
"", "", "", "", |
| 214 |
"RECORD", |
| 215 |
"CONST", |
| 216 |
"", "", "", |
| 217 |
"POINTER", |
| 218 |
"", "", "", "", |
| 219 |
"RETURN", |
| 220 |
"", "", "", "", |
| 221 |
"UNTIL", |
| 222 |
"", "", "", "", |
| 223 |
"BEGIN", |
| 224 |
"", "", "", "", "", "", "", "", "", |
| 225 |
"IMPLEMENTATION", |
| 226 |
"", "", "", "", |
| 227 |
"MODULE", |
| 228 |
"", "", "", "", "", "", "", "", "", |
| 229 |
"", "", "", "", "", "", "", "", "", |
| 230 |
"", "", "", "", "", "", "", "", "", |
| 231 |
"", "", "", "", "", "", "", "", "", |
| 232 |
"", "", "", |
| 233 |
"PROCEDURE" |
| 234 |
}; |
| 235 |
|
| 236 |
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) |
| 237 |
{ |
| 238 |
register unsigned int key = hash (str, len); |
| 239 |
|
| 240 |
if (key <= MAX_HASH_VALUE) |
| 241 |
if (len == lengthtable[key]) |
| 242 |
{ |
| 243 |
register const char *s = wordlist[key]; |
| 244 |
|
| 245 |
if (*str == *s && !memcmp (str + 1, s + 1, len - 1)) |
| 246 |
return s; |
| 247 |
} |
| 248 |
} |
| 249 |
return (const char *) 0; |
| 250 |
} |