1 /* ANSI-C code produced by gperf version 3.0.4 */
2 /* Command-line: gperf -C -N cpp_cond_lookup -n -t -s 6 -k '*' --language=ANSI-C src/cpp.gp */
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 <bug-gnu-gperf@gnu.org>."
29 #endif
30
31 #line 1 "src/cpp.gp"
32 struct KW {char const *name; int code;};
33
34 #define TOTAL_KEYWORDS 9
35 #define MIN_WORD_LENGTH 2
36 #define MAX_WORD_LENGTH 6
37 #define MIN_HASH_VALUE 0
38 #define MAX_HASH_VALUE 55
39 /* maximum key range = 56, duplicates = 0 */
40
41 #ifdef __GNUC__
42 __inline
43 #else
44 #ifdef __cplusplus
45 inline
46 #endif
47 #endif
48 static unsigned int
hash(register const char * str,register unsigned int len)49 hash (register const char *str, register unsigned int len)
50 {
51 static const unsigned char asso_values[] =
52 {
53 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
54 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
55 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
56 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
57 56, 56, 5, 56, 56, 56, 56, 56, 56, 56,
58 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
59 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
60 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
61 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
62 56, 56, 56, 56, 56, 56, 56, 0, 56, 56,
63 0, 15, 10, 0, 56, 10, 56, 56, 0, 0,
64 5, 56, 0, 56, 0, 0, 56, 56, 56, 56,
65 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
66 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
67 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
68 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
69 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
70 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
71 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
72 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
73 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
74 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
75 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
76 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
77 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
78 56, 56, 56, 56, 56, 56
79 };
80 register int hval = 0;
81
82 switch (len)
83 {
84 default:
85 hval += asso_values[(unsigned char)str[5]];
86 /*FALLTHROUGH*/
87 case 5:
88 hval += asso_values[(unsigned char)str[4]];
89 /*FALLTHROUGH*/
90 case 4:
91 hval += asso_values[(unsigned char)str[3]];
92 /*FALLTHROUGH*/
93 case 3:
94 hval += asso_values[(unsigned char)str[2]];
95 /*FALLTHROUGH*/
96 case 2:
97 hval += asso_values[(unsigned char)str[1]];
98 /*FALLTHROUGH*/
99 case 1:
100 hval += asso_values[(unsigned char)str[0]];
101 break;
102 }
103 return hval;
104 }
105
106 #ifdef __GNUC__
107 __inline
108 #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
109 __attribute__ ((__gnu_inline__))
110 #endif
111 #endif
112 static
113 const struct KW *
cpp_cond_lookup(register const char * str,register unsigned int len)114 cpp_cond_lookup (register const char *str, register unsigned int len)
115 {
116 static const struct KW wordlist[] =
117 {
118 #line 11 "src/cpp.gp"
119 {"pragma", EIC_PRAGMA},
120 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
121 #line 3 "src/cpp.gp"
122 {"**", EIC_INVALID},
123 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
124 #line 4 "src/cpp.gp"
125 {"if", EIC_IF},
126 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
127 #line 8 "src/cpp.gp"
128 {"else", EIC_ELSE},
129 {""}, {""}, {""}, {""},
130 #line 7 "src/cpp.gp"
131 {"elif", EIC_ELIF},
132 {""}, {""}, {""}, {""},
133 #line 9 "src/cpp.gp"
134 {"endif", EIC_ENDIF},
135 {""}, {""}, {""}, {""},
136 #line 5 "src/cpp.gp"
137 {"ifdef", EIC_IFDEF},
138 {""}, {""}, {""}, {""},
139 #line 6 "src/cpp.gp"
140 {"ifndef", EIC_IFNDEF},
141 {""}, {""}, {""}, {""},
142 #line 10 "src/cpp.gp"
143 {"define", EIC_DEFINE}
144 };
145
146 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
147 {
148 register int key = hash (str, len);
149
150 if (key <= MAX_HASH_VALUE && key >= 0)
151 {
152 register const char *s = wordlist[key].name;
153
154 if (*str == *s && !strcmp (str + 1, s + 1))
155 return &wordlist[key];
156 }
157 }
158 return 0;
159 }
160