File indexing completed on 2024-04-21 04:35:55

0001 /* C code produced by gperf version 3.0.4 */
0002 /* Command-line: gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k'1,3,$' gperf.txt  */
0003 
0004 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
0005       && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
0006       && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
0007       && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
0008       && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
0009       && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
0010       && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
0011       && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
0012       && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
0013       && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
0014       && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
0015       && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
0016       && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
0017       && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
0018       && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
0019       && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
0020       && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
0021       && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
0022       && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
0023       && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
0024       && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
0025       && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
0026       && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
0027 /* The character set is not based on ISO-646.  */
0028 error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
0029 #endif
0030 
0031 #line 1 "gperf.txt"
0032 
0033 struct kwtable {const char *name; int id[2]; enum lex_state_e state;};
0034 const struct kwtable *rb_reserved_word(const char *, unsigned int);
0035 static const struct kwtable *reserved_word(const char *, unsigned int);
0036 #define rb_reserved_word(str, len) reserved_word(str, len)
0037 #line 8 "gperf.txt"
0038 struct kwtable;
0039 
0040 #define TOTAL_KEYWORDS 41
0041 #define MIN_WORD_LENGTH 2
0042 #define MAX_WORD_LENGTH 12
0043 #define MIN_HASH_VALUE 8
0044 #define MAX_HASH_VALUE 50
0045 /* maximum key range = 43, duplicates = 0 */
0046 
0047 #ifdef __GNUC__
0048 __inline
0049 #else
0050 #ifdef __cplusplus
0051 inline
0052 #endif
0053 #endif
0054 static unsigned int
0055 hash (str, len)
0056      register const char *str;
0057      register unsigned int len;
0058 {
0059   static const unsigned char asso_values[] =
0060     {
0061       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0062       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0063       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0064       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0065       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0066       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0067       51, 51, 51, 26, 51, 51, 14, 51, 16,  8,
0068       11, 13, 51, 51, 51, 51, 10, 51, 13, 51,
0069       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0070       51, 51, 51, 51, 51, 11, 51, 13,  1, 26,
0071        4,  1,  8, 28, 51, 23, 51,  1,  1, 27,
0072        5, 19, 21, 51,  8,  3,  3, 11, 51, 21,
0073       24, 16, 51, 51, 51, 51, 51, 51, 51, 51,
0074       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0075       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0076       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0077       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0078       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0079       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0080       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0081       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0082       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0083       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0084       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0085       51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
0086       51, 51, 51, 51, 51, 51
0087     };
0088   register int hval = len;
0089 
0090   switch (hval)
0091     {
0092       default:
0093         hval += asso_values[(unsigned char)str[2]];
0094       /*FALLTHROUGH*/
0095       case 2:
0096       case 1:
0097         hval += asso_values[(unsigned char)str[0]];
0098         break;
0099     }
0100   return hval + asso_values[(unsigned char)str[len - 1]];
0101 }
0102 
0103 #ifdef __GNUC__
0104 __inline
0105 #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
0106 __attribute__ ((__gnu_inline__))
0107 #endif
0108 #endif
0109 const struct kwtable *
0110 rb_reserved_word (str, len)
0111      register const char *str;
0112      register unsigned int len;
0113 {
0114   static const struct kwtable wordlist[] =
0115     {
0116       {"", {0,0}, 0}, {"", {0,0}, 0}, {"", {0,0}, 0}, {"", {0,0}, 0}, {"", {0,0}, 0}, {"", {0,0}, 0}, {"", {0,0}, 0}, {"", {0,0}, 0},
0117 #line 18 "gperf.txt"
0118       {"break", {tBREAK, tBREAK}, EXPR_MID},
0119 #line 24 "gperf.txt"
0120       {"else", {tELSE, tELSE}, EXPR_BEG},
0121 #line 34 "gperf.txt"
0122       {"nil", {tNIL, tNIL}, EXPR_END},
0123 #line 27 "gperf.txt"
0124       {"ensure", {tENSURE, tENSURE}, EXPR_BEG},
0125 #line 26 "gperf.txt"
0126       {"end", {tEND, tEND}, EXPR_END},
0127 #line 43 "gperf.txt"
0128       {"then", {tTHEN, tTHEN}, EXPR_BEG},
0129 #line 35 "gperf.txt"
0130       {"not", {tKWNOT, tKWNOT}, EXPR_ARG},
0131 #line 28 "gperf.txt"
0132       {"false", {tFALSE, tFALSE}, EXPR_END},
0133 #line 41 "gperf.txt"
0134       {"self", {tSELF, tSELF}, EXPR_END},
0135 #line 25 "gperf.txt"
0136       {"elsif", {tELSIF, tELSIF}, EXPR_VALUE},
0137 #line 38 "gperf.txt"
0138       {"rescue", {tRESCUE, modifier_rescue}, EXPR_MID},
0139 #line 44 "gperf.txt"
0140       {"true", {tTRUE, tTRUE}, EXPR_END},
0141 #line 47 "gperf.txt"
0142       {"until", {tUNTIL, modifier_until}, EXPR_VALUE},
0143 #line 46 "gperf.txt"
0144       {"unless", {tUNLESS, modifier_unless}, EXPR_VALUE},
0145 #line 40 "gperf.txt"
0146       {"return", {tRETURN, tRETURN}, EXPR_MID},
0147 #line 21 "gperf.txt"
0148       {"def", {tDEF, tDEF}, EXPR_FNAME},
0149 #line 16 "gperf.txt"
0150       {"and", {tKWAND, tKWAND}, EXPR_VALUE},
0151 #line 23 "gperf.txt"
0152       {"do", {tDO, tDO}, EXPR_BEG},
0153 #line 50 "gperf.txt"
0154       {"yield", {tYIELD, tYIELD}, EXPR_ARG},
0155 #line 29 "gperf.txt"
0156       {"for", {tFOR, tFOR}, EXPR_VALUE},
0157 #line 45 "gperf.txt"
0158       {"undef", {tUNDEF, tUNDEF}, EXPR_FNAME},
0159 #line 36 "gperf.txt"
0160       {"or", {tKWOR, tKWOR}, EXPR_VALUE},
0161 #line 31 "gperf.txt"
0162       {"in", {tIN, tIN}, EXPR_VALUE},
0163 #line 48 "gperf.txt"
0164       {"when", {tWHEN, tWHEN}, EXPR_VALUE},
0165 #line 39 "gperf.txt"
0166       {"retry", {tRETRY, tRETRY}, EXPR_END},
0167 #line 30 "gperf.txt"
0168       {"if", {tIF, modifier_if}, EXPR_VALUE},
0169 #line 19 "gperf.txt"
0170       {"case", {tCASE, tCASE}, EXPR_VALUE},
0171 #line 37 "gperf.txt"
0172       {"redo", {tREDO, tREDO}, EXPR_END},
0173 #line 33 "gperf.txt"
0174       {"next", {tNEXT, tNEXT}, EXPR_MID},
0175 #line 42 "gperf.txt"
0176       {"super", {tSUPER, tSUPER}, EXPR_ARG},
0177 #line 32 "gperf.txt"
0178       {"module", {tMODULE, tMODULE}, EXPR_VALUE},
0179 #line 17 "gperf.txt"
0180       {"begin", {tBEGIN, tBEGIN}, EXPR_BEG},
0181 #line 11 "gperf.txt"
0182       {"__LINE__", {tLINE, tLINE}, EXPR_END},
0183 #line 12 "gperf.txt"
0184       {"__FILE__", {tFILE, tFILE}, EXPR_END},
0185 #line 10 "gperf.txt"
0186       {"__ENCODING__", {tENCODING, tENCODING}, EXPR_END},
0187 #line 14 "gperf.txt"
0188       {"END", {upEND, upEND}, EXPR_END},
0189 #line 15 "gperf.txt"
0190       {"alias", {tALIAS, tALIAS}, EXPR_FNAME},
0191 #line 13 "gperf.txt"
0192       {"BEGIN", {upBEGIN, upBEGIN}, EXPR_END},
0193 #line 22 "gperf.txt"
0194       {"defined?", {tDEFINED, tDEFINED}, EXPR_ARG},
0195 #line 20 "gperf.txt"
0196       {"class", {tCLASS, tCLASS}, EXPR_CLASS},
0197       {"", {0,0}, 0}, {"", {0,0}, 0},
0198 #line 49 "gperf.txt"
0199       {"while", {tWHILE, modifier_while}, EXPR_VALUE}
0200     };
0201 
0202   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
0203     {
0204       register int key = hash (str, len);
0205 
0206       if (key <= MAX_HASH_VALUE && key >= 0)
0207         {
0208           register const char *s = wordlist[key].name;
0209 
0210           if (*str == *s && !strcmp (str + 1, s + 1))
0211             return &wordlist[key];
0212         }
0213     }
0214   return 0;
0215 }
0216 #line 51 "gperf.txt"
0217