Debian Codegraph @

tests/java.exp

raw
1 /* C code produced by gperf version 3.3 */
2 /* Command-line: gperf -L C -F ', 0' -t -j1 -i 1 -g -o -N java_keyword -k'1,3,$' */
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 /* Keyword definition for the GNU compiler for the Java(TM) language.
33 Copyright (C) 1997, 1998 Free Software Foundation, Inc.
34 Contributed by Alexandre Petit-Bianco ([email protected])
35
36 This file is free software: you can redistribute it and/or modify
37 it under the terms of the GNU General Public License as published
38 by the Free Software Foundation; either version 2 of the License,
39 or (at your option) any later version.
40
41 This file is distributed in the hope that it will be useful,
42 but WITHOUT ANY WARRANTY; without even the implied warranty of
43 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 GNU General Public License for more details.
45
46 You should have received a copy of the GNU General Public License
47 along with this program. If not, see <https://www.gnu.org/licenses/>.
48
49 Java and all Java-based marks are trademarks or registered trademarks
50 of Sun Microsystems, Inc. in the United States and other countries.
51 The Free Software Foundation is independent of Sun Microsystems, Inc. */
52
53 struct java_keyword { const char *name; int token; };
54
55 #define TOTAL_KEYWORDS 50
56 #define MIN_WORD_LENGTH 2
57 #define MAX_WORD_LENGTH 12
58 #define MIN_HASH_VALUE 7
59 #define MAX_HASH_VALUE 76
60 /* maximum key range = 70, duplicates = 0 */
61
62 #ifdef __GNUC__
63 __inline
64 #else
65 #ifdef __cplusplus
66 inline
67 #endif
68 #endif
69 static unsigned int
70 hash (str, len)
71 register const char *str;
72 register size_t len;
73 {
74 static unsigned char asso_values[] =
75 {
76 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
78 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
79 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
80 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
81 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
82 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
83 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
84 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
85 77, 77, 77, 77, 77, 77, 77, 7, 30, 7,
86 12, 1, 14, 28, 41, 3, 77, 16, 11, 77,
87 16, 23, 1, 77, 15, 1, 1, 34, 30, 18,
88 77, 11, 77, 77, 77, 77, 77, 77, 77, 77,
89 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
90 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
91 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
92 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
93 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
94 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
95 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
96 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
97 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
98 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
99 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
100 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
101 77, 77, 77, 77, 77, 77
102 };
103 register unsigned int hval = len;
104
105 switch (hval)
106 {
107 default:
108 hval += asso_values[(unsigned char)str[2]];
109 #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)))
110 [[fallthrough]];
111 #elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
112 __attribute__ ((__fallthrough__));
113 #endif
114 /*FALLTHROUGH*/
115 case 2:
116 case 1:
117 hval += asso_values[(unsigned char)str[0]];
118 break;
119 }
120 return hval + asso_values[(unsigned char)str[len - 1]];
121 }
122
123 struct java_keyword *
124 java_keyword (str, len)
125 register const char *str;
126 register size_t len;
127 {
128 static struct java_keyword wordlist[] =
129 {
130 {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
131 {"", 0},
132 {"else", ELSE_TK},
133 {"int", INT_TK},
134 {"this", THIS_TK},
135 {"extends", EXTENDS_TK},
136 {"import", IMPORT_TK},
137 {"private", PRIVATE_TK},
138 {"case", CASE_TK},
139 {"interface", INTERFACE_TK},
140 {"implements", IMPLEMENTS_TK},
141 {"package", PACKAGE_TK},
142 {"abstract", ABSTRACT_TK},
143 {"transient", TRANSIENT_TK},
144 {"if", IF_TK},
145 {"class", CLASS_TK},
146 {"static", STATIC_TK},
147 {"super", SUPER_TK},
148 {"throws", THROWS_TK},
149 {"native", NATIVE_TK},
150 {"", 0},
151 {"try", TRY_TK},
152 {"while", WHILE_TK},
153 {"instanceof", INSTANCEOF_TK},
154 {"const", CONST_TK},
155 {"short", SHORT_TK},
156 {"false", FALSE_TK},
157 {"continue", CONTINUE_TK},
158 {"char", CHAR_TK},
159 {"default", DEFAULT_TK},
160 {"", 0},
161 {"byte", BYTE_TK},
162 {"do", DO_TK},
163 {"return", RETURN_TK},
164 {"throw", THROW_TK},
165 {"true", TRUE_TK},
166 {"synchronized", SYNCHRONIZED_TK},
167 {"null", NULL_TK},
168 {"float", FLOAT_TK},
169 {"public", PUBLIC_TK},
170 {"protected", PROTECTED_TK},
171 {"final", FINAL_TK},
172 {"for", FOR_TK},
173 {"finally", FINALLY_TK},
174 {"void", VOID_TK},
175 {"volatile", VOLATILE_TK},
176 {"switch", SWITCH_TK},
177 {"break", BREAK_TK},
178 {"double", DOUBLE_TK},
179 {"catch", CATCH_TK},
180 {"new", NEW_TK},
181 {"goto", GOTO_TK},
182 {"", 0}, {"", 0},
183 {"long", LONG_TK},
184 {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
185 {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0}, {"", 0},
186 {"", 0}, {"", 0}, {"", 0}, {"", 0},
187 {"boolean", BOOLEAN_TK}
188 };
189
190 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
191 {
192 register unsigned int key = hash (str, len);
193
194 if (key <= MAX_HASH_VALUE)
195 {
196 register const char *s = wordlist[key].name;
197
198 if (*str == *s && !strcmp (str + 1, s + 1))
199 return &wordlist[key];
200 }
201 }
202 return (struct java_keyword *) 0;
203 }