aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2014-04-03 17:46:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-03 19:20:52 -0400
commitdc53324060f324e8af6867f57bf4891c13c6ef18 (patch)
tree8cad63d6b8b31d945dae80f0c18f1c2cb4ad0949 /scripts
parentd507816b58bebc8f9c1bed6a28affaf0729306e2 (diff)
genksyms: fix typeof() handling
Recent increased use of typeof() throughout the tree resulted in a number of symbols (25 in a typical distro config of ours) not getting a proper CRC calculated for them anymore, due to the parser in genksyms not coping with several of these uses (interestingly in the majority of [if not all] cases the problem is due to the use of typeof() in code preceding a certain export, not in the declaration/definition of the exported function/object itself; I wasn't able to find a way to address this more general parser shortcoming). The use of parameter_declaration is a little more relaxed than would be ideal (permitting not just a bare type specification, but also one with identifier), but since the same code is being passed through an actual compiler, there's no apparent risk of allowing through any broken code. Otoh using parameter_declaration instead of the ad hoc "decl_specifier_seq '*'" / "decl_specifier_seq" pair allows all types to be handled rather than just plain ones and pointers to plain ones. Signed-off-by: Jan Beulich <jbeulich@suse.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/genksyms/keywords.gperf5
-rw-r--r--scripts/genksyms/keywords.hash.c_shipped133
-rw-r--r--scripts/genksyms/lex.l51
-rw-r--r--scripts/genksyms/lex.lex.c_shipped51
-rw-r--r--scripts/genksyms/parse.tab.c_shipped608
-rw-r--r--scripts/genksyms/parse.tab.h_shipped29
-rw-r--r--scripts/genksyms/parse.y5
7 files changed, 498 insertions, 384 deletions
diff --git a/scripts/genksyms/keywords.gperf b/scripts/genksyms/keywords.gperf
index 3e77a943e7b7..a9096d993172 100644
--- a/scripts/genksyms/keywords.gperf
+++ b/scripts/genksyms/keywords.gperf
@@ -23,6 +23,8 @@ __inline, INLINE_KEYW
23__inline__, INLINE_KEYW 23__inline__, INLINE_KEYW
24__signed, SIGNED_KEYW 24__signed, SIGNED_KEYW
25__signed__, SIGNED_KEYW 25__signed__, SIGNED_KEYW
26__typeof, TYPEOF_KEYW
27__typeof__, TYPEOF_KEYW
26__volatile, VOLATILE_KEYW 28__volatile, VOLATILE_KEYW
27__volatile__, VOLATILE_KEYW 29__volatile__, VOLATILE_KEYW
28# According to rth, c99 defines _Bool, __restrict, __restrict__, restrict. KAO 30# According to rth, c99 defines _Bool, __restrict, __restrict__, restrict. KAO
@@ -51,9 +53,8 @@ signed, SIGNED_KEYW
51static, STATIC_KEYW 53static, STATIC_KEYW
52struct, STRUCT_KEYW 54struct, STRUCT_KEYW
53typedef, TYPEDEF_KEYW 55typedef, TYPEDEF_KEYW
56typeof, TYPEOF_KEYW
54union, UNION_KEYW 57union, UNION_KEYW
55unsigned, UNSIGNED_KEYW 58unsigned, UNSIGNED_KEYW
56void, VOID_KEYW 59void, VOID_KEYW
57volatile, VOLATILE_KEYW 60volatile, VOLATILE_KEYW
58typeof, TYPEOF_KEYW
59__typeof__, TYPEOF_KEYW
diff --git a/scripts/genksyms/keywords.hash.c_shipped b/scripts/genksyms/keywords.hash.c_shipped
index 82062607e8c0..e9452482e198 100644
--- a/scripts/genksyms/keywords.hash.c_shipped
+++ b/scripts/genksyms/keywords.hash.c_shipped
@@ -34,7 +34,7 @@ struct resword;
34static const struct resword *is_reserved_word(register const char *str, register unsigned int len); 34static const struct resword *is_reserved_word(register const char *str, register unsigned int len);
35#line 8 "scripts/genksyms/keywords.gperf" 35#line 8 "scripts/genksyms/keywords.gperf"
36struct resword { const char *name; int token; }; 36struct resword { const char *name; int token; };
37/* maximum key range = 64, duplicates = 0 */ 37/* maximum key range = 98, duplicates = 0 */
38 38
39#ifdef __GNUC__ 39#ifdef __GNUC__
40__inline 40__inline
@@ -48,32 +48,32 @@ is_reserved_hash (register const char *str, register unsigned int len)
48{ 48{
49 static const unsigned char asso_values[] = 49 static const unsigned char asso_values[] =
50 { 50 {
51 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 51 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
52 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 52 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
53 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 53 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
54 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 54 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
55 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 55 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
56 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 56 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
57 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 57 101, 101, 101, 101, 101, 101, 101, 101, 101, 0,
58 67, 67, 67, 67, 67, 67, 15, 67, 67, 67, 58 101, 101, 101, 101, 101, 101, 15, 101, 101, 101,
59 0, 67, 67, 67, 67, 67, 67, 67, 67, 67, 59 0, 101, 101, 101, 101, 101, 101, 101, 101, 101,
60 67, 67, 67, 67, 67, 0, 67, 0, 67, 5, 60 101, 101, 101, 101, 101, 0, 101, 0, 101, 5,
61 25, 20, 15, 30, 67, 15, 67, 67, 10, 0, 61 25, 20, 55, 30, 101, 15, 101, 101, 10, 0,
62 10, 40, 20, 67, 10, 5, 0, 10, 15, 67, 62 10, 40, 10, 101, 10, 5, 0, 10, 15, 101,
63 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 63 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
64 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 64 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
65 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 65 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
66 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 66 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
67 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
68 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 68 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
69 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 69 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
70 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 70 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
71 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 71 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
72 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 72 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
73 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 73 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
74 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 74 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
75 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 75 101, 101, 101, 101, 101, 101, 101, 101, 101, 101,
76 67, 67, 67, 67, 67, 67 76 101, 101, 101, 101, 101, 101
77 }; 77 };
78 return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]] + asso_values[(unsigned char)str[len - 1]]; 78 return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]] + asso_values[(unsigned char)str[len - 1]];
79} 79}
@@ -89,17 +89,17 @@ is_reserved_word (register const char *str, register unsigned int len)
89{ 89{
90 enum 90 enum
91 { 91 {
92 TOTAL_KEYWORDS = 45, 92 TOTAL_KEYWORDS = 46,
93 MIN_WORD_LENGTH = 3, 93 MIN_WORD_LENGTH = 3,
94 MAX_WORD_LENGTH = 24, 94 MAX_WORD_LENGTH = 24,
95 MIN_HASH_VALUE = 3, 95 MIN_HASH_VALUE = 3,
96 MAX_HASH_VALUE = 66 96 MAX_HASH_VALUE = 100
97 }; 97 };
98 98
99 static const struct resword wordlist[] = 99 static const struct resword wordlist[] =
100 { 100 {
101 {""}, {""}, {""}, 101 {""}, {""}, {""},
102#line 33 "scripts/genksyms/keywords.gperf" 102#line 35 "scripts/genksyms/keywords.gperf"
103 {"asm", ASM_KEYW}, 103 {"asm", ASM_KEYW},
104 {""}, 104 {""},
105#line 15 "scripts/genksyms/keywords.gperf" 105#line 15 "scripts/genksyms/keywords.gperf"
@@ -108,7 +108,7 @@ is_reserved_word (register const char *str, register unsigned int len)
108#line 16 "scripts/genksyms/keywords.gperf" 108#line 16 "scripts/genksyms/keywords.gperf"
109 {"__asm__", ASM_KEYW}, 109 {"__asm__", ASM_KEYW},
110 {""}, {""}, 110 {""}, {""},
111#line 59 "scripts/genksyms/keywords.gperf" 111#line 27 "scripts/genksyms/keywords.gperf"
112 {"__typeof__", TYPEOF_KEYW}, 112 {"__typeof__", TYPEOF_KEYW},
113 {""}, 113 {""},
114#line 19 "scripts/genksyms/keywords.gperf" 114#line 19 "scripts/genksyms/keywords.gperf"
@@ -119,31 +119,31 @@ is_reserved_word (register const char *str, register unsigned int len)
119 {"__const__", CONST_KEYW}, 119 {"__const__", CONST_KEYW},
120#line 25 "scripts/genksyms/keywords.gperf" 120#line 25 "scripts/genksyms/keywords.gperf"
121 {"__signed__", SIGNED_KEYW}, 121 {"__signed__", SIGNED_KEYW},
122#line 51 "scripts/genksyms/keywords.gperf" 122#line 53 "scripts/genksyms/keywords.gperf"
123 {"static", STATIC_KEYW}, 123 {"static", STATIC_KEYW},
124 {""}, 124 {""},
125#line 46 "scripts/genksyms/keywords.gperf" 125#line 48 "scripts/genksyms/keywords.gperf"
126 {"int", INT_KEYW}, 126 {"int", INT_KEYW},
127#line 39 "scripts/genksyms/keywords.gperf" 127#line 41 "scripts/genksyms/keywords.gperf"
128 {"char", CHAR_KEYW}, 128 {"char", CHAR_KEYW},
129#line 40 "scripts/genksyms/keywords.gperf" 129#line 42 "scripts/genksyms/keywords.gperf"
130 {"const", CONST_KEYW}, 130 {"const", CONST_KEYW},
131#line 52 "scripts/genksyms/keywords.gperf" 131#line 54 "scripts/genksyms/keywords.gperf"
132 {"struct", STRUCT_KEYW}, 132 {"struct", STRUCT_KEYW},
133#line 31 "scripts/genksyms/keywords.gperf" 133#line 33 "scripts/genksyms/keywords.gperf"
134 {"__restrict__", RESTRICT_KEYW}, 134 {"__restrict__", RESTRICT_KEYW},
135#line 32 "scripts/genksyms/keywords.gperf" 135#line 34 "scripts/genksyms/keywords.gperf"
136 {"restrict", RESTRICT_KEYW}, 136 {"restrict", RESTRICT_KEYW},
137#line 12 "scripts/genksyms/keywords.gperf" 137#line 12 "scripts/genksyms/keywords.gperf"
138 {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, 138 {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW},
139#line 23 "scripts/genksyms/keywords.gperf" 139#line 23 "scripts/genksyms/keywords.gperf"
140 {"__inline__", INLINE_KEYW}, 140 {"__inline__", INLINE_KEYW},
141 {""}, 141 {""},
142#line 27 "scripts/genksyms/keywords.gperf" 142#line 29 "scripts/genksyms/keywords.gperf"
143 {"__volatile__", VOLATILE_KEYW}, 143 {"__volatile__", VOLATILE_KEYW},
144#line 10 "scripts/genksyms/keywords.gperf" 144#line 10 "scripts/genksyms/keywords.gperf"
145 {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, 145 {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW},
146#line 30 "scripts/genksyms/keywords.gperf" 146#line 32 "scripts/genksyms/keywords.gperf"
147 {"_restrict", RESTRICT_KEYW}, 147 {"_restrict", RESTRICT_KEYW},
148 {""}, 148 {""},
149#line 17 "scripts/genksyms/keywords.gperf" 149#line 17 "scripts/genksyms/keywords.gperf"
@@ -152,56 +152,65 @@ is_reserved_word (register const char *str, register unsigned int len)
152 {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, 152 {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
153#line 21 "scripts/genksyms/keywords.gperf" 153#line 21 "scripts/genksyms/keywords.gperf"
154 {"__extension__", EXTENSION_KEYW}, 154 {"__extension__", EXTENSION_KEYW},
155#line 42 "scripts/genksyms/keywords.gperf" 155#line 44 "scripts/genksyms/keywords.gperf"
156 {"enum", ENUM_KEYW}, 156 {"enum", ENUM_KEYW},
157#line 13 "scripts/genksyms/keywords.gperf" 157#line 13 "scripts/genksyms/keywords.gperf"
158 {"EXPORT_UNUSED_SYMBOL", EXPORT_SYMBOL_KEYW}, 158 {"EXPORT_UNUSED_SYMBOL", EXPORT_SYMBOL_KEYW},
159#line 43 "scripts/genksyms/keywords.gperf" 159#line 45 "scripts/genksyms/keywords.gperf"
160 {"extern", EXTERN_KEYW}, 160 {"extern", EXTERN_KEYW},
161 {""}, 161 {""},
162#line 24 "scripts/genksyms/keywords.gperf" 162#line 24 "scripts/genksyms/keywords.gperf"
163 {"__signed", SIGNED_KEYW}, 163 {"__signed", SIGNED_KEYW},
164#line 14 "scripts/genksyms/keywords.gperf" 164#line 14 "scripts/genksyms/keywords.gperf"
165 {"EXPORT_UNUSED_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, 165 {"EXPORT_UNUSED_SYMBOL_GPL", EXPORT_SYMBOL_KEYW},
166#line 54 "scripts/genksyms/keywords.gperf" 166#line 57 "scripts/genksyms/keywords.gperf"
167 {"union", UNION_KEYW}, 167 {"union", UNION_KEYW},
168#line 58 "scripts/genksyms/keywords.gperf" 168 {""}, {""},
169 {"typeof", TYPEOF_KEYW},
170#line 53 "scripts/genksyms/keywords.gperf"
171 {"typedef", TYPEDEF_KEYW},
172#line 22 "scripts/genksyms/keywords.gperf" 169#line 22 "scripts/genksyms/keywords.gperf"
173 {"__inline", INLINE_KEYW}, 170 {"__inline", INLINE_KEYW},
174#line 38 "scripts/genksyms/keywords.gperf" 171#line 40 "scripts/genksyms/keywords.gperf"
175 {"auto", AUTO_KEYW}, 172 {"auto", AUTO_KEYW},
176#line 26 "scripts/genksyms/keywords.gperf" 173#line 28 "scripts/genksyms/keywords.gperf"
177 {"__volatile", VOLATILE_KEYW}, 174 {"__volatile", VOLATILE_KEYW},
178 {""}, {""}, 175 {""}, {""},
179#line 55 "scripts/genksyms/keywords.gperf" 176#line 58 "scripts/genksyms/keywords.gperf"
180 {"unsigned", UNSIGNED_KEYW}, 177 {"unsigned", UNSIGNED_KEYW},
181 {""}, 178 {""},
182#line 49 "scripts/genksyms/keywords.gperf" 179#line 51 "scripts/genksyms/keywords.gperf"
183 {"short", SHORT_KEYW}, 180 {"short", SHORT_KEYW},
184#line 45 "scripts/genksyms/keywords.gperf" 181#line 47 "scripts/genksyms/keywords.gperf"
185 {"inline", INLINE_KEYW}, 182 {"inline", INLINE_KEYW},
186 {""}, 183 {""},
187#line 57 "scripts/genksyms/keywords.gperf" 184#line 60 "scripts/genksyms/keywords.gperf"
188 {"volatile", VOLATILE_KEYW}, 185 {"volatile", VOLATILE_KEYW},
189#line 47 "scripts/genksyms/keywords.gperf" 186#line 49 "scripts/genksyms/keywords.gperf"
190 {"long", LONG_KEYW}, 187 {"long", LONG_KEYW},
191#line 29 "scripts/genksyms/keywords.gperf" 188#line 31 "scripts/genksyms/keywords.gperf"
192 {"_Bool", BOOL_KEYW}, 189 {"_Bool", BOOL_KEYW},
193 {""}, {""}, 190 {""}, {""},
194#line 48 "scripts/genksyms/keywords.gperf" 191#line 50 "scripts/genksyms/keywords.gperf"
195 {"register", REGISTER_KEYW}, 192 {"register", REGISTER_KEYW},
196#line 56 "scripts/genksyms/keywords.gperf" 193#line 59 "scripts/genksyms/keywords.gperf"
197 {"void", VOID_KEYW}, 194 {"void", VOID_KEYW},
198#line 44 "scripts/genksyms/keywords.gperf" 195 {""},
199 {"float", FLOAT_KEYW}, 196#line 43 "scripts/genksyms/keywords.gperf"
200#line 41 "scripts/genksyms/keywords.gperf"
201 {"double", DOUBLE_KEYW}, 197 {"double", DOUBLE_KEYW},
198 {""},
199#line 26 "scripts/genksyms/keywords.gperf"
200 {"__typeof", TYPEOF_KEYW},
201 {""}, {""},
202#line 52 "scripts/genksyms/keywords.gperf"
203 {"signed", SIGNED_KEYW},
202 {""}, {""}, {""}, {""}, 204 {""}, {""}, {""}, {""},
203#line 50 "scripts/genksyms/keywords.gperf" 205#line 56 "scripts/genksyms/keywords.gperf"
204 {"signed", SIGNED_KEYW} 206 {"typeof", TYPEOF_KEYW},
207#line 55 "scripts/genksyms/keywords.gperf"
208 {"typedef", TYPEDEF_KEYW},
209 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
210 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
211 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
212#line 46 "scripts/genksyms/keywords.gperf"
213 {"float", FLOAT_KEYW}
205 }; 214 };
206 215
207 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) 216 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l
index f770071719cb..e583565f2011 100644
--- a/scripts/genksyms/lex.l
+++ b/scripts/genksyms/lex.l
@@ -129,8 +129,9 @@ int
129yylex(void) 129yylex(void)
130{ 130{
131 static enum { 131 static enum {
132 ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_BRACKET, ST_BRACE, 132 ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_TYPEOF, ST_TYPEOF_1,
133 ST_EXPRESSION, ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4, 133 ST_BRACKET, ST_BRACE, ST_EXPRESSION,
134 ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4,
134 ST_TABLE_5, ST_TABLE_6 135 ST_TABLE_5, ST_TABLE_6
135 } lexstate = ST_NOTSTARTED; 136 } lexstate = ST_NOTSTARTED;
136 137
@@ -198,6 +199,10 @@ repeat:
198 lexstate = ST_ASM; 199 lexstate = ST_ASM;
199 count = 0; 200 count = 0;
200 goto repeat; 201 goto repeat;
202 case TYPEOF_KEYW:
203 lexstate = ST_TYPEOF;
204 count = 0;
205 goto repeat;
201 206
202 case STRUCT_KEYW: 207 case STRUCT_KEYW:
203 case UNION_KEYW: 208 case UNION_KEYW:
@@ -284,6 +289,48 @@ repeat:
284 } 289 }
285 break; 290 break;
286 291
292 case ST_TYPEOF:
293 switch (token)
294 {
295 case '(':
296 if ( ++count == 1 )
297 lexstate = ST_TYPEOF_1;
298 else
299 APP;
300 goto repeat;
301 case ')':
302 APP;
303 if (--count == 0)
304 {
305 lexstate = ST_NORMAL;
306 token = TYPEOF_PHRASE;
307 break;
308 }
309 goto repeat;
310 default:
311 APP;
312 goto repeat;
313 }
314 break;
315
316 case ST_TYPEOF_1:
317 if (token == IDENT)
318 {
319 if (is_reserved_word(yytext, yyleng)
320 || find_symbol(yytext, SYM_TYPEDEF, 1))
321 {
322 yyless(0);
323 unput('(');
324 lexstate = ST_NORMAL;
325 token = TYPEOF_KEYW;
326 break;
327 }
328 _APP("(", 1);
329 }
330 APP;
331 lexstate = ST_TYPEOF;
332 goto repeat;
333
287 case ST_BRACKET: 334 case ST_BRACKET:
288 APP; 335 APP;
289 switch (token) 336 switch (token)
diff --git a/scripts/genksyms/lex.lex.c_shipped b/scripts/genksyms/lex.lex.c_shipped
index 0bf4157e6161..f82740a69b85 100644
--- a/scripts/genksyms/lex.lex.c_shipped
+++ b/scripts/genksyms/lex.lex.c_shipped
@@ -1938,8 +1938,9 @@ int
1938yylex(void) 1938yylex(void)
1939{ 1939{
1940 static enum { 1940 static enum {
1941 ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_BRACKET, ST_BRACE, 1941 ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_TYPEOF, ST_TYPEOF_1,
1942 ST_EXPRESSION, ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4, 1942 ST_BRACKET, ST_BRACE, ST_EXPRESSION,
1943 ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4,
1943 ST_TABLE_5, ST_TABLE_6 1944 ST_TABLE_5, ST_TABLE_6
1944 } lexstate = ST_NOTSTARTED; 1945 } lexstate = ST_NOTSTARTED;
1945 1946
@@ -2007,6 +2008,10 @@ repeat:
2007 lexstate = ST_ASM; 2008 lexstate = ST_ASM;
2008 count = 0; 2009 count = 0;
2009 goto repeat; 2010 goto repeat;
2011 case TYPEOF_KEYW:
2012 lexstate = ST_TYPEOF;
2013 count = 0;
2014 goto repeat;
2010 2015
2011 case STRUCT_KEYW: 2016 case STRUCT_KEYW:
2012 case UNION_KEYW: 2017 case UNION_KEYW:
@@ -2093,6 +2098,48 @@ repeat:
2093 } 2098 }
2094 break; 2099 break;
2095 2100
2101 case ST_TYPEOF:
2102 switch (token)
2103 {
2104 case '(':
2105 if ( ++count == 1 )
2106 lexstate = ST_TYPEOF_1;
2107 else
2108 APP;
2109 goto repeat;
2110 case ')':
2111 APP;
2112 if (--count == 0)
2113 {
2114 lexstate = ST_NORMAL;
2115 token = TYPEOF_PHRASE;
2116 break;
2117 }
2118 goto repeat;
2119 default:
2120 APP;
2121 goto repeat;
2122 }
2123 break;
2124
2125 case ST_TYPEOF_1:
2126 if (token == IDENT)
2127 {
2128 if (is_reserved_word(yytext, yyleng)
2129 || find_symbol(yytext, SYM_TYPEDEF, 1))
2130 {
2131 yyless(0);
2132 unput('(');
2133 lexstate = ST_NORMAL;
2134 token = TYPEOF_KEYW;
2135 break;
2136 }
2137 _APP("(", 1);
2138 }
2139 APP;
2140 lexstate = ST_TYPEOF;
2141 goto repeat;
2142
2096 case ST_BRACKET: 2143 case ST_BRACKET:
2097 APP; 2144 APP;
2098 switch (token) 2145 switch (token)
diff --git a/scripts/genksyms/parse.tab.c_shipped b/scripts/genksyms/parse.tab.c_shipped
index ece53c79bb59..c9f0f0ce82ff 100644
--- a/scripts/genksyms/parse.tab.c_shipped
+++ b/scripts/genksyms/parse.tab.c_shipped
@@ -1,8 +1,8 @@
1/* A Bison parser, made by GNU Bison 2.5. */ 1/* A Bison parser, made by GNU Bison 2.5.1. */
2 2
3/* Bison implementation for Yacc-like parsers in C 3/* Bison implementation for Yacc-like parsers in C
4 4
5 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. 5 Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
6 6
7 This program is free software: you can redistribute it and/or modify 7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@
44#define YYBISON 1 44#define YYBISON 1
45 45
46/* Bison version. */ 46/* Bison version. */
47#define YYBISON_VERSION "2.5" 47#define YYBISON_VERSION "2.5.1"
48 48
49/* Skeleton name. */ 49/* Skeleton name. */
50#define YYSKELETON_NAME "yacc.c" 50#define YYSKELETON_NAME "yacc.c"
@@ -117,6 +117,14 @@ static void record_compound(struct string_list **keyw,
117 117
118 118
119 119
120# ifndef YY_NULL
121# if defined __cplusplus && 201103L <= __cplusplus
122# define YY_NULL nullptr
123# else
124# define YY_NULL 0
125# endif
126# endif
127
120/* Enabling traces. */ 128/* Enabling traces. */
121#ifndef YYDEBUG 129#ifndef YYDEBUG
122# define YYDEBUG 1 130# define YYDEBUG 1
@@ -171,18 +179,19 @@ static void record_compound(struct string_list **keyw,
171 EXPORT_SYMBOL_KEYW = 284, 179 EXPORT_SYMBOL_KEYW = 284,
172 ASM_PHRASE = 285, 180 ASM_PHRASE = 285,
173 ATTRIBUTE_PHRASE = 286, 181 ATTRIBUTE_PHRASE = 286,
174 BRACE_PHRASE = 287, 182 TYPEOF_PHRASE = 287,
175 BRACKET_PHRASE = 288, 183 BRACE_PHRASE = 288,
176 EXPRESSION_PHRASE = 289, 184 BRACKET_PHRASE = 289,
177 CHAR = 290, 185 EXPRESSION_PHRASE = 290,
178 DOTS = 291, 186 CHAR = 291,
179 IDENT = 292, 187 DOTS = 292,
180 INT = 293, 188 IDENT = 293,
181 REAL = 294, 189 INT = 294,
182 STRING = 295, 190 REAL = 295,
183 TYPE = 296, 191 STRING = 296,
184 OTHER = 297, 192 TYPE = 297,
185 FILENAME = 298 193 OTHER = 298,
194 FILENAME = 299
186 }; 195 };
187#endif 196#endif
188 197
@@ -304,6 +313,7 @@ YYID (yyi)
304# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 313# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
305 || defined __cplusplus || defined _MSC_VER) 314 || defined __cplusplus || defined _MSC_VER)
306# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 315# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
316 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
307# ifndef EXIT_SUCCESS 317# ifndef EXIT_SUCCESS
308# define EXIT_SUCCESS 0 318# define EXIT_SUCCESS 0
309# endif 319# endif
@@ -395,20 +405,20 @@ union yyalloc
395#endif 405#endif
396 406
397#if defined YYCOPY_NEEDED && YYCOPY_NEEDED 407#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
398/* Copy COUNT objects from FROM to TO. The source and destination do 408/* Copy COUNT objects from SRC to DST. The source and destination do
399 not overlap. */ 409 not overlap. */
400# ifndef YYCOPY 410# ifndef YYCOPY
401# if defined __GNUC__ && 1 < __GNUC__ 411# if defined __GNUC__ && 1 < __GNUC__
402# define YYCOPY(To, From, Count) \ 412# define YYCOPY(Dst, Src, Count) \
403 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 413 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
404# else 414# else
405# define YYCOPY(To, From, Count) \ 415# define YYCOPY(Dst, Src, Count) \
406 do \ 416 do \
407 { \ 417 { \
408 YYSIZE_T yyi; \ 418 YYSIZE_T yyi; \
409 for (yyi = 0; yyi < (Count); yyi++) \ 419 for (yyi = 0; yyi < (Count); yyi++) \
410 (To)[yyi] = (From)[yyi]; \ 420 (Dst)[yyi] = (Src)[yyi]; \
411 } \ 421 } \
412 while (YYID (0)) 422 while (YYID (0))
413# endif 423# endif
414# endif 424# endif
@@ -417,20 +427,20 @@ union yyalloc
417/* YYFINAL -- State number of the termination state. */ 427/* YYFINAL -- State number of the termination state. */
418#define YYFINAL 4 428#define YYFINAL 4
419/* YYLAST -- Last index in YYTABLE. */ 429/* YYLAST -- Last index in YYTABLE. */
420#define YYLAST 532 430#define YYLAST 514
421 431
422/* YYNTOKENS -- Number of terminals. */ 432/* YYNTOKENS -- Number of terminals. */
423#define YYNTOKENS 53 433#define YYNTOKENS 54
424/* YYNNTS -- Number of nonterminals. */ 434/* YYNNTS -- Number of nonterminals. */
425#define YYNNTS 49 435#define YYNNTS 49
426/* YYNRULES -- Number of rules. */ 436/* YYNRULES -- Number of rules. */
427#define YYNRULES 132 437#define YYNRULES 132
428/* YYNRULES -- Number of states. */ 438/* YYNRULES -- Number of states. */
429#define YYNSTATES 188 439#define YYNSTATES 187
430 440
431/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 441/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
432#define YYUNDEFTOK 2 442#define YYUNDEFTOK 2
433#define YYMAXUTOK 298 443#define YYMAXUTOK 299
434 444
435#define YYTRANSLATE(YYX) \ 445#define YYTRANSLATE(YYX) \
436 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 446 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -442,15 +452,15 @@ static const yytype_uint8 yytranslate[] =
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 47, 49, 48, 2, 46, 2, 2, 2, 2, 2, 455 48, 49, 50, 2, 47, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 52, 44, 456 2, 2, 2, 2, 2, 2, 2, 2, 53, 45,
447 2, 50, 2, 2, 2, 2, 2, 2, 2, 2, 457 2, 51, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 462 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 51, 2, 45, 2, 2, 2, 2, 463 2, 2, 2, 52, 2, 46, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -467,7 +477,7 @@ static const yytype_uint8 yytranslate[] =
467 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 477 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
468 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 478 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
469 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 479 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
470 35, 36, 37, 38, 39, 40, 41, 42, 43 480 35, 36, 37, 38, 39, 40, 41, 42, 43, 44
471}; 481};
472 482
473#if YYDEBUG 483#if YYDEBUG
@@ -478,78 +488,77 @@ static const yytype_uint16 yyprhs[] =
478 0, 0, 3, 5, 8, 9, 12, 13, 18, 19, 488 0, 0, 3, 5, 8, 9, 12, 13, 18, 19,
479 23, 25, 27, 29, 31, 34, 37, 41, 42, 44, 489 23, 25, 27, 29, 31, 34, 37, 41, 42, 44,
480 46, 50, 55, 56, 58, 60, 63, 65, 67, 69, 490 46, 50, 55, 56, 58, 60, 63, 65, 67, 69,
481 71, 73, 75, 77, 79, 81, 87, 92, 95, 98, 491 71, 73, 75, 77, 79, 81, 86, 88, 91, 94,
482 101, 105, 109, 113, 116, 119, 122, 124, 126, 128, 492 97, 101, 105, 109, 112, 115, 118, 120, 122, 124,
483 130, 132, 134, 136, 138, 140, 142, 144, 147, 148, 493 126, 128, 130, 132, 134, 136, 138, 140, 143, 144,
484 150, 152, 155, 157, 159, 161, 163, 166, 168, 170, 494 146, 148, 151, 153, 155, 157, 159, 162, 164, 166,
485 175, 180, 183, 187, 191, 194, 196, 198, 200, 205, 495 171, 176, 179, 183, 187, 190, 192, 194, 196, 201,
486 210, 213, 217, 221, 224, 226, 230, 231, 233, 235, 496 206, 209, 213, 217, 220, 222, 226, 227, 229, 231,
487 239, 242, 245, 247, 248, 250, 252, 257, 262, 265, 497 235, 238, 241, 243, 244, 246, 248, 253, 258, 261,
488 269, 273, 277, 278, 280, 283, 287, 291, 292, 294, 498 265, 269, 273, 274, 276, 279, 283, 287, 288, 290,
489 296, 299, 303, 306, 307, 309, 311, 315, 318, 321, 499 292, 295, 299, 302, 303, 305, 307, 311, 314, 317,
490 323, 326, 327, 330, 334, 339, 341, 345, 347, 351, 500 319, 322, 323, 326, 330, 335, 337, 341, 343, 347,
491 354, 355, 357 501 350, 351, 353
492}; 502};
493 503
494/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 504/* YYRHS -- A `-1'-separated list of the rules' RHS. */
495static const yytype_int8 yyrhs[] = 505static const yytype_int8 yyrhs[] =
496{ 506{
497 54, 0, -1, 55, -1, 54, 55, -1, -1, 56, 507 55, 0, -1, 56, -1, 55, 56, -1, -1, 57,
498 57, -1, -1, 12, 23, 58, 60, -1, -1, 23, 508 58, -1, -1, 12, 23, 59, 61, -1, -1, 23,
499 59, 60, -1, 60, -1, 84, -1, 99, -1, 101, 509 60, 61, -1, 61, -1, 85, -1, 100, -1, 102,
500 -1, 1, 44, -1, 1, 45, -1, 64, 61, 44, 510 -1, 1, 45, -1, 1, 46, -1, 65, 62, 45,
501 -1, -1, 62, -1, 63, -1, 62, 46, 63, -1, 511 -1, -1, 63, -1, 64, -1, 63, 47, 64, -1,
502 74, 100, 95, 85, -1, -1, 65, -1, 66, -1, 512 75, 101, 96, 86, -1, -1, 66, -1, 67, -1,
503 65, 66, -1, 67, -1, 68, -1, 5, -1, 17, 513 66, 67, -1, 68, -1, 69, -1, 5, -1, 17,
504 -1, 21, -1, 11, -1, 14, -1, 69, -1, 73, 514 -1, 21, -1, 11, -1, 14, -1, 70, -1, 74,
505 -1, 28, 47, 65, 48, 49, -1, 28, 47, 65, 515 -1, 28, 48, 82, 49, -1, 32, -1, 22, 38,
506 49, -1, 22, 37, -1, 24, 37, -1, 10, 37, 516 -1, 24, 38, -1, 10, 38, -1, 22, 38, 88,
507 -1, 22, 37, 87, -1, 24, 37, 87, -1, 10, 517 -1, 24, 38, 88, -1, 10, 38, 97, -1, 10,
508 37, 96, -1, 10, 96, -1, 22, 87, -1, 24, 518 97, -1, 22, 88, -1, 24, 88, -1, 7, -1,
509 87, -1, 7, -1, 19, -1, 15, -1, 16, -1, 519 19, -1, 15, -1, 16, -1, 20, -1, 25, -1,
510 20, -1, 25, -1, 13, -1, 9, -1, 26, -1, 520 13, -1, 9, -1, 26, -1, 6, -1, 42, -1,
511 6, -1, 41, -1, 48, 71, -1, -1, 72, -1, 521 50, 72, -1, -1, 73, -1, 74, -1, 73, 74,
512 73, -1, 72, 73, -1, 8, -1, 27, -1, 31, 522 -1, 8, -1, 27, -1, 31, -1, 18, -1, 71,
513 -1, 18, -1, 70, 74, -1, 75, -1, 37, -1, 523 75, -1, 76, -1, 38, -1, 76, 48, 79, 49,
514 75, 47, 78, 49, -1, 75, 47, 1, 49, -1, 524 -1, 76, 48, 1, 49, -1, 76, 34, -1, 48,
515 75, 33, -1, 47, 74, 49, -1, 47, 1, 49, 525 75, 49, -1, 48, 1, 49, -1, 71, 77, -1,
516 -1, 70, 76, -1, 77, -1, 37, -1, 41, -1, 526 78, -1, 38, -1, 42, -1, 78, 48, 79, 49,
517 77, 47, 78, 49, -1, 77, 47, 1, 49, -1, 527 -1, 78, 48, 1, 49, -1, 78, 34, -1, 48,
518 77, 33, -1, 47, 76, 49, -1, 47, 1, 49, 528 77, 49, -1, 48, 1, 49, -1, 80, 37, -1,
519 -1, 79, 36, -1, 79, -1, 80, 46, 36, -1, 529 80, -1, 81, 47, 37, -1, -1, 81, -1, 82,
520 -1, 80, -1, 81, -1, 80, 46, 81, -1, 65, 530 -1, 81, 47, 82, -1, 66, 83, -1, 71, 83,
521 82, -1, 70, 82, -1, 83, -1, -1, 37, -1, 531 -1, 84, -1, -1, 38, -1, 42, -1, 84, 48,
522 41, -1, 83, 47, 78, 49, -1, 83, 47, 1, 532 79, 49, -1, 84, 48, 1, 49, -1, 84, 34,
523 49, -1, 83, 33, -1, 47, 82, 49, -1, 47, 533 -1, 48, 83, 49, -1, 48, 1, 49, -1, 65,
524 1, 49, -1, 64, 74, 32, -1, -1, 86, -1, 534 75, 33, -1, -1, 87, -1, 51, 35, -1, 52,
525 50, 34, -1, 51, 88, 45, -1, 51, 1, 45, 535 89, 46, -1, 52, 1, 46, -1, -1, 90, -1,
526 -1, -1, 89, -1, 90, -1, 89, 90, -1, 64, 536 91, -1, 90, 91, -1, 65, 92, 45, -1, 1,
527 91, 44, -1, 1, 44, -1, -1, 92, -1, 93, 537 45, -1, -1, 93, -1, 94, -1, 93, 47, 94,
528 -1, 92, 46, 93, -1, 76, 95, -1, 37, 94, 538 -1, 77, 96, -1, 38, 95, -1, 95, -1, 53,
529 -1, 94, -1, 52, 34, -1, -1, 95, 31, -1, 539 35, -1, -1, 96, 31, -1, 52, 98, 46, -1,
530 51, 97, 45, -1, 51, 97, 46, 45, -1, 98, 540 52, 98, 47, 46, -1, 99, -1, 98, 47, 99,
531 -1, 97, 46, 98, -1, 37, -1, 37, 50, 34, 541 -1, 38, -1, 38, 51, 35, -1, 30, 45, -1,
532 -1, 30, 44, -1, -1, 30, -1, 29, 47, 37, 542 -1, 30, -1, 29, 48, 38, 49, 45, -1
533 49, 44, -1
534}; 543};
535 544
536/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 545/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
537static const yytype_uint16 yyrline[] = 546static const yytype_uint16 yyrline[] =
538{ 547{
539 0, 123, 123, 124, 128, 128, 134, 134, 136, 136, 548 0, 124, 124, 125, 129, 129, 135, 135, 137, 137,
540 138, 139, 140, 141, 142, 143, 147, 161, 162, 166, 549 139, 140, 141, 142, 143, 144, 148, 162, 163, 167,
541 174, 187, 193, 194, 198, 199, 203, 209, 213, 214, 550 175, 188, 194, 195, 199, 200, 204, 210, 214, 215,
542 215, 216, 217, 221, 222, 223, 224, 228, 230, 232, 551 216, 217, 218, 222, 223, 224, 225, 229, 231, 233,
543 236, 238, 240, 245, 248, 249, 253, 254, 255, 256, 552 237, 239, 241, 246, 249, 250, 254, 255, 256, 257,
544 257, 258, 259, 260, 261, 262, 263, 267, 272, 273, 553 258, 259, 260, 261, 262, 263, 264, 268, 273, 274,
545 277, 278, 282, 282, 282, 283, 291, 292, 296, 305, 554 278, 279, 283, 283, 283, 284, 292, 293, 297, 306,
546 307, 309, 311, 313, 320, 321, 325, 326, 327, 329, 555 308, 310, 312, 314, 321, 322, 326, 327, 328, 330,
547 331, 333, 335, 340, 341, 342, 346, 347, 351, 352, 556 332, 334, 336, 341, 342, 343, 347, 348, 352, 353,
548 357, 362, 364, 368, 369, 377, 381, 383, 385, 387, 557 358, 363, 365, 369, 370, 378, 382, 384, 386, 388,
549 389, 394, 403, 404, 409, 414, 415, 419, 420, 424, 558 390, 395, 404, 405, 410, 415, 416, 420, 421, 425,
550 425, 429, 431, 436, 437, 441, 442, 446, 447, 448, 559 426, 430, 432, 437, 438, 442, 443, 447, 448, 449,
551 452, 456, 457, 461, 462, 466, 467, 470, 475, 483, 560 453, 457, 458, 462, 463, 467, 468, 471, 476, 484,
552 487, 488, 492 561 488, 489, 493
553}; 562};
554#endif 563#endif
555 564
@@ -565,9 +574,9 @@ static const char *const yytname[] =
565 "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW", 574 "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW",
566 "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW", 575 "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW",
567 "VOLATILE_KEYW", "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE", 576 "VOLATILE_KEYW", "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE",
568 "ATTRIBUTE_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE", 577 "ATTRIBUTE_PHRASE", "TYPEOF_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE",
569 "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT", "REAL", "STRING", 578 "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT", "REAL", "STRING",
570 "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "'*'", "')'", 579 "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "')'", "'*'",
571 "'='", "'{'", "':'", "$accept", "declaration_seq", "declaration", "$@1", 580 "'='", "'{'", "':'", "$accept", "declaration_seq", "declaration", "$@1",
572 "declaration1", "$@2", "$@3", "simple_declaration", 581 "declaration1", "$@2", "$@3", "simple_declaration",
573 "init_declarator_list_opt", "init_declarator_list", "init_declarator", 582 "init_declarator_list_opt", "init_declarator_list", "init_declarator",
@@ -584,7 +593,7 @@ static const char *const yytname[] =
584 "member_declarator_list_opt", "member_declarator_list", 593 "member_declarator_list_opt", "member_declarator_list",
585 "member_declarator", "member_bitfield_declarator", "attribute_opt", 594 "member_declarator", "member_bitfield_declarator", "attribute_opt",
586 "enum_body", "enumerator_list", "enumerator", "asm_definition", 595 "enum_body", "enumerator_list", "enumerator", "asm_definition",
587 "asm_phrase_opt", "export_definition", 0 596 "asm_phrase_opt", "export_definition", YY_NULL
588}; 597};
589#endif 598#endif
590 599
@@ -597,28 +606,28 @@ static const yytype_uint16 yytoknum[] =
597 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 606 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
598 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 607 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
599 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 608 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
600 295, 296, 297, 298, 59, 125, 44, 40, 42, 41, 609 295, 296, 297, 298, 299, 59, 125, 44, 40, 41,
601 61, 123, 58 610 42, 61, 123, 58
602}; 611};
603# endif 612# endif
604 613
605/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 614/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
606static const yytype_uint8 yyr1[] = 615static const yytype_uint8 yyr1[] =
607{ 616{
608 0, 53, 54, 54, 56, 55, 58, 57, 59, 57, 617 0, 54, 55, 55, 57, 56, 59, 58, 60, 58,
609 57, 57, 57, 57, 57, 57, 60, 61, 61, 62, 618 58, 58, 58, 58, 58, 58, 61, 62, 62, 63,
610 62, 63, 64, 64, 65, 65, 66, 66, 67, 67, 619 63, 64, 65, 65, 66, 66, 67, 67, 68, 68,
611 67, 67, 67, 68, 68, 68, 68, 68, 68, 68, 620 68, 68, 68, 69, 69, 69, 69, 69, 69, 69,
612 68, 68, 68, 68, 68, 68, 69, 69, 69, 69, 621 69, 69, 69, 69, 69, 69, 70, 70, 70, 70,
613 69, 69, 69, 69, 69, 69, 69, 70, 71, 71, 622 70, 70, 70, 70, 70, 70, 70, 71, 72, 72,
614 72, 72, 73, 73, 73, 73, 74, 74, 75, 75, 623 73, 73, 74, 74, 74, 74, 75, 75, 76, 76,
615 75, 75, 75, 75, 76, 76, 77, 77, 77, 77, 624 76, 76, 76, 76, 77, 77, 78, 78, 78, 78,
616 77, 77, 77, 78, 78, 78, 79, 79, 80, 80, 625 78, 78, 78, 79, 79, 79, 80, 80, 81, 81,
617 81, 82, 82, 83, 83, 83, 83, 83, 83, 83, 626 82, 83, 83, 84, 84, 84, 84, 84, 84, 84,
618 83, 84, 85, 85, 86, 87, 87, 88, 88, 89, 627 84, 85, 86, 86, 87, 88, 88, 89, 89, 90,
619 89, 90, 90, 91, 91, 92, 92, 93, 93, 93, 628 90, 91, 91, 92, 92, 93, 93, 94, 94, 94,
620 94, 95, 95, 96, 96, 97, 97, 98, 98, 99, 629 95, 96, 96, 97, 97, 98, 98, 99, 99, 100,
621 100, 100, 101 630 101, 101, 102
622}; 631};
623 632
624/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 633/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -627,7 +636,7 @@ static const yytype_uint8 yyr2[] =
627 0, 2, 1, 2, 0, 2, 0, 4, 0, 3, 636 0, 2, 1, 2, 0, 2, 0, 4, 0, 3,
628 1, 1, 1, 1, 2, 2, 3, 0, 1, 1, 637 1, 1, 1, 1, 2, 2, 3, 0, 1, 1,
629 3, 4, 0, 1, 1, 2, 1, 1, 1, 1, 638 3, 4, 0, 1, 1, 2, 1, 1, 1, 1,
630 1, 1, 1, 1, 1, 5, 4, 2, 2, 2, 639 1, 1, 1, 1, 1, 4, 1, 2, 2, 2,
631 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 640 3, 3, 3, 2, 2, 2, 1, 1, 1, 1,
632 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, 641 1, 1, 1, 1, 1, 1, 1, 2, 0, 1,
633 1, 2, 1, 1, 1, 1, 2, 1, 1, 4, 642 1, 2, 1, 1, 1, 1, 2, 1, 1, 4,
@@ -648,68 +657,68 @@ static const yytype_uint8 yydefact[] =
648 4, 4, 2, 0, 1, 3, 0, 28, 55, 46, 657 4, 4, 2, 0, 1, 3, 0, 28, 55, 46,
649 62, 53, 0, 31, 0, 52, 32, 48, 49, 29, 658 62, 53, 0, 31, 0, 52, 32, 48, 49, 29,
650 65, 47, 50, 30, 0, 8, 0, 51, 54, 63, 659 65, 47, 50, 30, 0, 8, 0, 51, 54, 63,
651 0, 0, 0, 64, 56, 5, 10, 17, 23, 24, 660 0, 0, 0, 64, 36, 56, 5, 10, 17, 23,
652 26, 27, 33, 34, 11, 12, 13, 14, 15, 39, 661 24, 26, 27, 33, 34, 11, 12, 13, 14, 15,
653 0, 43, 6, 37, 0, 44, 22, 38, 45, 0, 662 39, 0, 43, 6, 37, 0, 44, 22, 38, 45,
654 0, 129, 68, 0, 58, 0, 18, 19, 0, 130, 663 0, 0, 129, 68, 0, 58, 0, 18, 19, 0,
655 67, 25, 42, 127, 0, 125, 22, 40, 0, 113, 664 130, 67, 25, 42, 127, 0, 125, 22, 40, 0,
656 0, 0, 109, 9, 17, 41, 0, 0, 0, 0, 665 113, 0, 0, 109, 9, 17, 41, 93, 0, 0,
657 57, 59, 60, 16, 0, 66, 131, 101, 121, 71, 666 0, 0, 57, 59, 60, 16, 0, 66, 131, 101,
658 0, 0, 123, 0, 7, 112, 106, 76, 77, 0, 667 121, 71, 0, 0, 123, 0, 7, 112, 106, 76,
659 0, 0, 121, 75, 0, 114, 115, 119, 105, 0, 668 77, 0, 0, 0, 121, 75, 0, 114, 115, 119,
660 110, 130, 0, 36, 0, 73, 72, 61, 20, 102, 669 105, 0, 110, 130, 94, 56, 0, 93, 90, 92,
661 0, 93, 0, 84, 87, 88, 128, 124, 126, 118, 670 35, 0, 73, 72, 61, 20, 102, 0, 0, 84,
662 0, 76, 0, 120, 74, 117, 80, 0, 111, 0, 671 87, 88, 128, 124, 126, 118, 0, 76, 0, 120,
663 35, 132, 122, 0, 21, 103, 70, 94, 56, 0, 672 74, 117, 80, 0, 111, 0, 0, 95, 0, 91,
664 93, 90, 92, 69, 83, 0, 82, 81, 0, 0, 673 98, 0, 132, 122, 0, 21, 103, 70, 69, 83,
665 116, 104, 0, 95, 0, 91, 98, 0, 85, 89, 674 0, 82, 81, 0, 0, 116, 100, 99, 0, 0,
666 79, 78, 100, 99, 0, 0, 97, 96 675 104, 85, 89, 79, 78, 97, 96
667}; 676};
668 677
669/* YYDEFGOTO[NTERM-NUM]. */ 678/* YYDEFGOTO[NTERM-NUM]. */
670static const yytype_int16 yydefgoto[] = 679static const yytype_int16 yydefgoto[] =
671{ 680{
672 -1, 1, 2, 3, 35, 76, 56, 36, 65, 66, 681 -1, 1, 2, 3, 36, 77, 57, 37, 66, 67,
673 67, 79, 38, 39, 40, 41, 42, 68, 90, 91, 682 68, 80, 39, 40, 41, 42, 43, 69, 92, 93,
674 43, 121, 70, 112, 113, 132, 133, 134, 135, 161, 683 44, 123, 71, 114, 115, 138, 139, 140, 141, 128,
675 162, 44, 154, 155, 55, 80, 81, 82, 114, 115, 684 129, 45, 165, 166, 56, 81, 82, 83, 116, 117,
676 116, 117, 129, 51, 74, 75, 45, 98, 46 685 118, 119, 136, 52, 75, 76, 46, 100, 47
677}; 686};
678 687
679/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 688/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
680 STATE-NUM. */ 689 STATE-NUM. */
681#define YYPACT_NINF -135 690#define YYPACT_NINF -140
682static const yytype_int16 yypact[] = 691static const yytype_int16 yypact[] =
683{ 692{
684 -135, 20, -135, 321, -135, -135, 30, -135, -135, -135, 693 -140, 29, -140, 207, -140, -140, 40, -140, -140, -140,
685 -135, -135, -28, -135, 2, -135, -135, -135, -135, -135, 694 -140, -140, -27, -140, 44, -140, -140, -140, -140, -140,
686 -135, -135, -135, -135, -6, -135, 9, -135, -135, -135, 695 -140, -140, -140, -140, -22, -140, -18, -140, -140, -140,
687 -5, 15, -17, -135, -135, -135, -135, 18, 491, -135, 696 -9, 22, 28, -140, -140, -140, -140, -140, 42, 472,
688 -135, -135, -135, -135, -135, -135, -135, -135, -135, -22, 697 -140, -140, -140, -140, -140, -140, -140, -140, -140, -140,
689 31, -135, -135, 19, 106, -135, 491, 19, -135, 491, 698 46, 43, -140, -140, 47, 107, -140, 472, 47, -140,
690 50, -135, -135, 11, -3, 51, 57, -135, 18, -14, 699 472, 62, -140, -140, 16, -3, 57, 56, -140, 42,
691 14, -135, -135, 48, 46, -135, 491, -135, 33, 32, 700 35, -11, -140, -140, 53, 48, -140, 472, -140, 51,
692 59, 154, -135, -135, 18, -135, 365, 56, 60, 61, 701 21, 59, 157, -140, -140, 42, -140, 388, 58, 60,
693 -135, -3, -135, -135, 18, -135, -135, -135, -135, -135, 702 70, 81, -140, -3, -140, -140, 42, -140, -140, -140,
694 202, 74, -135, -23, -135, -135, -135, 77, -135, 16, 703 -140, -140, 253, 71, -140, -20, -140, -140, -140, 83,
695 101, 49, -135, 34, 92, 93, -135, -135, -135, 94, 704 -140, 5, 102, 34, -140, 12, 95, 94, -140, -140,
696 -135, 110, 95, -135, 97, -135, -135, -135, -135, -20, 705 -140, 97, -140, 113, -140, -140, 2, 41, -140, 27,
697 96, 410, 99, 113, 100, -135, -135, -135, -135, -135, 706 -140, 99, -140, -140, -140, -140, -24, 98, 101, 109,
698 103, -135, 107, -135, -135, 111, -135, 239, -135, 32, 707 104, -140, -140, -140, -140, -140, 105, -140, 110, -140,
699 -135, -135, -135, 123, -135, -135, -135, -135, -135, 3, 708 -140, 117, -140, 298, -140, 21, 112, -140, 120, -140,
700 52, -135, 38, -135, -135, 454, -135, -135, 117, 128, 709 -140, 343, -140, -140, 121, -140, -140, -140, -140, -140,
701 -135, -135, 134, -135, 135, -135, -135, 276, -135, -135, 710 434, -140, -140, 131, 137, -140, -140, -140, 138, 141,
702 -135, -135, -135, -135, 137, 138, -135, -135 711 -140, -140, -140, -140, -140, -140, -140
703}; 712};
704 713
705/* YYPGOTO[NTERM-NUM]. */ 714/* YYPGOTO[NTERM-NUM]. */
706static const yytype_int16 yypgoto[] = 715static const yytype_int16 yypgoto[] =
707{ 716{
708 -135, -135, 187, -135, -135, -135, -135, -50, -135, -135, 717 -140, -140, 190, -140, -140, -140, -140, -45, -140, -140,
709 98, 0, -59, -37, -135, -135, -135, -77, -135, -135, 718 96, 1, -60, -31, -140, -140, -140, -78, -140, -140,
710 -54, -30, -135, -90, -135, -134, -135, -135, 24, -58, 719 -55, -7, -140, -92, -140, -139, -140, -140, -59, -39,
711 -135, -135, -135, -135, -18, -135, -135, 109, -135, -135, 720 -140, -140, -140, -140, -13, -140, -140, 111, -140, -140,
712 44, 87, 84, 148, -135, 102, -135, -135, -135 721 39, 87, 84, 147, -140, 106, -140, -140, -140
713}; 722};
714 723
715/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 724/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
@@ -718,149 +727,145 @@ static const yytype_int16 yypgoto[] =
718#define YYTABLE_NINF -109 727#define YYTABLE_NINF -109
719static const yytype_int16 yytable[] = 728static const yytype_int16 yytable[] =
720{ 729{
721 86, 71, 111, 37, 172, 10, 83, 69, 58, 49, 730 87, 88, 113, 156, 38, 10, 146, 163, 72, 127,
722 92, 152, 88, 169, 73, 20, 96, 140, 97, 142, 731 94, 50, 84, 59, 174, 20, 54, 90, 74, 148,
723 4, 144, 137, 50, 29, 52, 104, 61, 33, 50, 732 58, 150, 179, 101, 29, 51, 143, 164, 33, 4,
724 153, 53, 111, 89, 111, 77, -93, 127, 95, 85, 733 55, 70, 106, 113, 55, 113, -93, 102, 134, 60,
725 157, 131, 59, 185, 173, 54, 57, 99, 62, 71, 734 124, 78, 87, 147, 157, 86, 152, 110, 127, 127,
726 159, 64, -93, 141, 160, 62, 84, 108, 63, 64, 735 126, -93, 65, 111, 63, 65, 72, 91, 85, 109,
727 54, 100, 60, 109, 64, 63, 64, 146, 73, 107, 736 153, 160, 97, 110, 64, 98, 65, 53, 99, 111,
728 54, 176, 111, 108, 47, 48, 84, 105, 106, 109, 737 61, 65, 147, 62, 112, 161, 110, 113, 85, 124,
729 64, 147, 160, 160, 110, 177, 141, 87, 131, 157, 738 63, 74, 111, 157, 65, 48, 49, 158, 159, 126,
730 108, 102, 103, 173, 71, 93, 109, 64, 101, 159, 739 64, 65, 65, 87, 104, 105, 107, 108, 51, 55,
731 64, 174, 175, 94, 118, 124, 131, 78, 136, 125, 740 89, 87, 95, 96, 103, 120, 142, 130, 79, 131,
732 126, 7, 8, 9, 10, 11, 12, 13, 131, 15, 741 87, 182, 7, 8, 9, 10, 11, 12, 13, 132,
733 16, 17, 18, 19, 20, 21, 22, 23, 24, 110, 742 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
734 26, 27, 28, 29, 30, 143, 148, 33, 105, 149, 743 133, 26, 27, 28, 29, 30, 112, 149, 33, 34,
735 96, 151, 152, -22, 150, 156, 165, 34, 163, 164, 744 154, 155, 107, 98, 162, -22, 169, 167, 163, 35,
736 -22, -107, 166, -22, -22, 119, 167, 171, -22, 7, 745 168, 170, -22, -107, 171, -22, 180, -22, 121, 172,
737 8, 9, 10, 11, 12, 13, 180, 15, 16, 17, 746 -22, 176, 7, 8, 9, 10, 11, 12, 13, 177,
738 18, 19, 20, 21, 22, 23, 24, 181, 26, 27, 747 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
739 28, 29, 30, 182, 183, 33, 186, 187, 5, 179, 748 183, 26, 27, 28, 29, 30, 184, 185, 33, 34,
740 120, -22, 128, 170, 139, 34, 145, 72, -22, -108, 749 186, 5, 135, 122, 175, -22, 145, 73, 151, 35,
741 0, -22, -22, 130, 0, 138, -22, 7, 8, 9, 750 0, 0, -22, -108, 0, -22, 0, -22, 6, 0,
742 10, 11, 12, 13, 0, 15, 16, 17, 18, 19, 751 -22, 144, 7, 8, 9, 10, 11, 12, 13, 14,
743 20, 21, 22, 23, 24, 0, 26, 27, 28, 29, 752 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
744 30, 0, 0, 33, 0, 0, 0, 0, -86, 0, 753 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
745 168, 0, 0, 34, 7, 8, 9, 10, 11, 12, 754 0, 0, 0, 0, 0, -22, 0, 0, 0, 35,
746 13, -86, 15, 16, 17, 18, 19, 20, 21, 22, 755 0, 0, -22, 0, 137, -22, 0, -22, 7, 8,
747 23, 24, 0, 26, 27, 28, 29, 30, 0, 0, 756 9, 10, 11, 12, 13, 0, 15, 16, 17, 18,
748 33, 0, 0, 0, 0, -86, 0, 184, 0, 0, 757 19, 20, 21, 22, 23, 24, 0, 26, 27, 28,
749 34, 7, 8, 9, 10, 11, 12, 13, -86, 15, 758 29, 30, 0, 0, 33, 34, 0, 0, 0, 0,
750 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, 759 -86, 0, 0, 0, 0, 35, 0, 0, 0, 173,
751 26, 27, 28, 29, 30, 0, 0, 33, 0, 0, 760 0, 0, -86, 7, 8, 9, 10, 11, 12, 13,
752 0, 0, -86, 0, 0, 0, 0, 34, 0, 0, 761 0, 15, 16, 17, 18, 19, 20, 21, 22, 23,
753 0, 0, 6, 0, 0, -86, 7, 8, 9, 10, 762 24, 0, 26, 27, 28, 29, 30, 0, 0, 33,
754 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 763 34, 0, 0, 0, 0, -86, 0, 0, 0, 0,
755 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 764 35, 0, 0, 0, 178, 0, 0, -86, 7, 8,
756 31, 32, 33, 0, 0, 0, 0, 0, -22, 0, 765 9, 10, 11, 12, 13, 0, 15, 16, 17, 18,
757 0, 0, 34, 0, 0, -22, 0, 0, -22, -22, 766 19, 20, 21, 22, 23, 24, 0, 26, 27, 28,
758 7, 8, 9, 10, 11, 12, 13, 0, 15, 16, 767 29, 30, 0, 0, 33, 34, 0, 0, 0, 0,
759 17, 18, 19, 20, 21, 22, 23, 24, 0, 26, 768 -86, 0, 0, 0, 0, 35, 0, 0, 0, 0,
760 27, 28, 29, 30, 0, 0, 33, 0, 0, 0, 769 0, 0, -86, 7, 8, 9, 10, 11, 12, 13,
761 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 770 0, 15, 16, 17, 18, 19, 20, 21, 22, 23,
762 0, 0, 0, 122, 123, 7, 8, 9, 10, 11, 771 24, 0, 26, 27, 28, 29, 30, 0, 0, 33,
763 12, 13, 0, 15, 16, 17, 18, 19, 20, 21, 772 34, 0, 0, 0, 0, 0, 124, 0, 0, 0,
764 22, 23, 24, 0, 26, 27, 28, 29, 30, 0, 773 125, 0, 0, 0, 0, 0, 126, 0, 65, 7,
765 0, 33, 0, 0, 0, 0, 0, 157, 0, 0,
766 0, 158, 0, 0, 0, 0, 0, 159, 64, 7,
767 8, 9, 10, 11, 12, 13, 0, 15, 16, 17, 774 8, 9, 10, 11, 12, 13, 0, 15, 16, 17,
768 18, 19, 20, 21, 22, 23, 24, 0, 26, 27, 775 18, 19, 20, 21, 22, 23, 24, 0, 26, 27,
769 28, 29, 30, 0, 0, 33, 0, 0, 0, 0, 776 28, 29, 30, 0, 0, 33, 34, 0, 0, 0,
770 178, 0, 0, 0, 0, 34, 7, 8, 9, 10, 777 0, 181, 0, 0, 0, 0, 35, 7, 8, 9,
771 11, 12, 13, 0, 15, 16, 17, 18, 19, 20, 778 10, 11, 12, 13, 0, 15, 16, 17, 18, 19,
772 21, 22, 23, 24, 0, 26, 27, 28, 29, 30, 779 20, 21, 22, 23, 24, 0, 26, 27, 28, 29,
773 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 780 30, 0, 0, 33, 34, 0, 0, 0, 0, 0,
774 0, 0, 34 781 0, 0, 0, 0, 35
775}; 782};
776 783
777#define yypact_value_is_default(yystate) \ 784#define yypact_value_is_default(yystate) \
778 ((yystate) == (-135)) 785 ((yystate) == (-140))
779 786
780#define yytable_value_is_error(yytable_value) \ 787#define yytable_value_is_error(yytable_value) \
781 YYID (0) 788 YYID (0)
782 789
783static const yytype_int16 yycheck[] = 790static const yytype_int16 yycheck[] =
784{ 791{
785 59, 38, 79, 3, 1, 8, 56, 37, 26, 37, 792 60, 60, 80, 1, 3, 8, 1, 31, 39, 87,
786 64, 31, 1, 147, 37, 18, 30, 1, 32, 109, 793 65, 38, 57, 26, 153, 18, 38, 1, 38, 111,
787 0, 111, 45, 51, 27, 23, 76, 44, 31, 51, 794 38, 113, 161, 34, 27, 52, 46, 51, 31, 0,
788 50, 37, 109, 63, 111, 53, 33, 91, 68, 57, 795 52, 38, 77, 111, 52, 113, 34, 48, 93, 48,
789 37, 100, 47, 177, 41, 51, 37, 33, 37, 86, 796 38, 54, 102, 38, 42, 58, 34, 42, 126, 127,
790 47, 48, 49, 37, 131, 37, 56, 41, 47, 48, 797 48, 49, 50, 48, 38, 50, 87, 64, 57, 38,
791 51, 47, 47, 47, 48, 47, 48, 33, 37, 37, 798 48, 34, 69, 42, 48, 30, 50, 23, 33, 48,
792 51, 33, 149, 41, 44, 45, 76, 44, 45, 47, 799 48, 50, 38, 45, 53, 48, 42, 155, 77, 38,
793 48, 47, 159, 160, 52, 47, 37, 37, 147, 37, 800 38, 38, 48, 42, 50, 45, 46, 126, 127, 48,
794 41, 45, 46, 41, 131, 44, 47, 48, 50, 47, 801 48, 50, 50, 153, 46, 47, 45, 46, 52, 52,
795 48, 159, 160, 46, 45, 49, 165, 1, 34, 49, 802 38, 161, 45, 47, 51, 46, 35, 49, 1, 49,
796 49, 5, 6, 7, 8, 9, 10, 11, 177, 13, 803 170, 170, 5, 6, 7, 8, 9, 10, 11, 49,
797 14, 15, 16, 17, 18, 19, 20, 21, 22, 52, 804 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
798 24, 25, 26, 27, 28, 34, 44, 31, 44, 46, 805 49, 24, 25, 26, 27, 28, 53, 35, 31, 32,
799 30, 44, 31, 37, 49, 49, 46, 41, 49, 36, 806 45, 47, 45, 30, 45, 38, 37, 49, 31, 42,
800 44, 45, 49, 47, 48, 1, 49, 34, 52, 5, 807 49, 47, 45, 46, 49, 48, 35, 50, 1, 49,
801 6, 7, 8, 9, 10, 11, 49, 13, 14, 15, 808 53, 49, 5, 6, 7, 8, 9, 10, 11, 49,
802 16, 17, 18, 19, 20, 21, 22, 49, 24, 25, 809 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
803 26, 27, 28, 49, 49, 31, 49, 49, 1, 165, 810 49, 24, 25, 26, 27, 28, 49, 49, 31, 32,
804 81, 37, 94, 149, 107, 41, 112, 49, 44, 45, 811 49, 1, 96, 82, 155, 38, 109, 50, 114, 42,
805 -1, 47, 48, 1, -1, 103, 52, 5, 6, 7, 812 -1, -1, 45, 46, -1, 48, -1, 50, 1, -1,
806 8, 9, 10, 11, -1, 13, 14, 15, 16, 17, 813 53, 105, 5, 6, 7, 8, 9, 10, 11, 12,
807 18, 19, 20, 21, 22, -1, 24, 25, 26, 27, 814 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
808 28, -1, -1, 31, -1, -1, -1, -1, 36, -1, 815 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
809 1, -1, -1, 41, 5, 6, 7, 8, 9, 10, 816 -1, -1, -1, -1, -1, 38, -1, -1, -1, 42,
810 11, 49, 13, 14, 15, 16, 17, 18, 19, 20, 817 -1, -1, 45, -1, 1, 48, -1, 50, 5, 6,
811 21, 22, -1, 24, 25, 26, 27, 28, -1, -1, 818 7, 8, 9, 10, 11, -1, 13, 14, 15, 16,
812 31, -1, -1, -1, -1, 36, -1, 1, -1, -1, 819 17, 18, 19, 20, 21, 22, -1, 24, 25, 26,
813 41, 5, 6, 7, 8, 9, 10, 11, 49, 13, 820 27, 28, -1, -1, 31, 32, -1, -1, -1, -1,
814 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, 821 37, -1, -1, -1, -1, 42, -1, -1, -1, 1,
815 24, 25, 26, 27, 28, -1, -1, 31, -1, -1, 822 -1, -1, 49, 5, 6, 7, 8, 9, 10, 11,
816 -1, -1, 36, -1, -1, -1, -1, 41, -1, -1, 823 -1, 13, 14, 15, 16, 17, 18, 19, 20, 21,
817 -1, -1, 1, -1, -1, 49, 5, 6, 7, 8, 824 22, -1, 24, 25, 26, 27, 28, -1, -1, 31,
818 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 825 32, -1, -1, -1, -1, 37, -1, -1, -1, -1,
819 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 826 42, -1, -1, -1, 1, -1, -1, 49, 5, 6,
820 29, 30, 31, -1, -1, -1, -1, -1, 37, -1, 827 7, 8, 9, 10, 11, -1, 13, 14, 15, 16,
821 -1, -1, 41, -1, -1, 44, -1, -1, 47, 48, 828 17, 18, 19, 20, 21, 22, -1, 24, 25, 26,
822 5, 6, 7, 8, 9, 10, 11, -1, 13, 14, 829 27, 28, -1, -1, 31, 32, -1, -1, -1, -1,
823 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, 830 37, -1, -1, -1, -1, 42, -1, -1, -1, -1,
824 25, 26, 27, 28, -1, -1, 31, -1, -1, -1, 831 -1, -1, 49, 5, 6, 7, 8, 9, 10, 11,
825 -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, 832 -1, 13, 14, 15, 16, 17, 18, 19, 20, 21,
826 -1, -1, -1, 48, 49, 5, 6, 7, 8, 9, 833 22, -1, 24, 25, 26, 27, 28, -1, -1, 31,
827 10, 11, -1, 13, 14, 15, 16, 17, 18, 19, 834 32, -1, -1, -1, -1, -1, 38, -1, -1, -1,
828 20, 21, 22, -1, 24, 25, 26, 27, 28, -1, 835 42, -1, -1, -1, -1, -1, 48, -1, 50, 5,
829 -1, 31, -1, -1, -1, -1, -1, 37, -1, -1,
830 -1, 41, -1, -1, -1, -1, -1, 47, 48, 5,
831 6, 7, 8, 9, 10, 11, -1, 13, 14, 15, 836 6, 7, 8, 9, 10, 11, -1, 13, 14, 15,
832 16, 17, 18, 19, 20, 21, 22, -1, 24, 25, 837 16, 17, 18, 19, 20, 21, 22, -1, 24, 25,
833 26, 27, 28, -1, -1, 31, -1, -1, -1, -1, 838 26, 27, 28, -1, -1, 31, 32, -1, -1, -1,
834 36, -1, -1, -1, -1, 41, 5, 6, 7, 8, 839 -1, 37, -1, -1, -1, -1, 42, 5, 6, 7,
835 9, 10, 11, -1, 13, 14, 15, 16, 17, 18, 840 8, 9, 10, 11, -1, 13, 14, 15, 16, 17,
836 19, 20, 21, 22, -1, 24, 25, 26, 27, 28, 841 18, 19, 20, 21, 22, -1, 24, 25, 26, 27,
837 -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, 842 28, -1, -1, 31, 32, -1, -1, -1, -1, -1,
838 -1, -1, 41 843 -1, -1, -1, -1, 42
839}; 844};
840 845
841/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 846/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
842 symbol of state STATE-NUM. */ 847 symbol of state STATE-NUM. */
843static const yytype_uint8 yystos[] = 848static const yytype_uint8 yystos[] =
844{ 849{
845 0, 54, 55, 56, 0, 55, 1, 5, 6, 7, 850 0, 55, 56, 57, 0, 56, 1, 5, 6, 7,
846 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 851 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
847 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 852 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
848 28, 29, 30, 31, 41, 57, 60, 64, 65, 66, 853 28, 29, 30, 31, 32, 42, 58, 61, 65, 66,
849 67, 68, 69, 73, 84, 99, 101, 44, 45, 37, 854 67, 68, 69, 70, 74, 85, 100, 102, 45, 46,
850 51, 96, 23, 37, 51, 87, 59, 37, 87, 47, 855 38, 52, 97, 23, 38, 52, 88, 60, 38, 88,
851 47, 44, 37, 47, 48, 61, 62, 63, 70, 74, 856 48, 48, 45, 38, 48, 50, 62, 63, 64, 71,
852 75, 66, 96, 37, 97, 98, 58, 87, 1, 64, 857 75, 76, 67, 97, 38, 98, 99, 59, 88, 1,
853 88, 89, 90, 60, 64, 87, 65, 37, 1, 74, 858 65, 89, 90, 91, 61, 65, 88, 66, 82, 38,
854 71, 72, 73, 44, 46, 74, 30, 32, 100, 33, 859 1, 75, 72, 73, 74, 45, 47, 75, 30, 33,
855 47, 50, 45, 46, 60, 44, 45, 37, 41, 47, 860 101, 34, 48, 51, 46, 47, 61, 45, 46, 38,
856 52, 70, 76, 77, 91, 92, 93, 94, 45, 1, 861 42, 48, 53, 71, 77, 78, 92, 93, 94, 95,
857 90, 74, 48, 49, 49, 49, 49, 73, 63, 95, 862 46, 1, 91, 75, 38, 42, 48, 71, 83, 84,
858 1, 65, 78, 79, 80, 81, 34, 45, 98, 94, 863 49, 49, 49, 49, 74, 64, 96, 1, 79, 80,
859 1, 37, 76, 34, 76, 95, 33, 47, 44, 46, 864 81, 82, 35, 46, 99, 95, 1, 38, 77, 35,
860 49, 44, 31, 50, 85, 86, 49, 37, 41, 47, 865 77, 96, 34, 48, 45, 47, 1, 42, 83, 83,
861 70, 82, 83, 49, 36, 46, 49, 49, 1, 78, 866 34, 48, 45, 31, 51, 86, 87, 49, 49, 37,
862 93, 34, 1, 41, 82, 82, 33, 47, 36, 81, 867 47, 49, 49, 1, 79, 94, 49, 49, 1, 79,
863 49, 49, 49, 49, 1, 78, 49, 49 868 35, 37, 82, 49, 49, 49, 49
864}; 869};
865 870
866#define yyerrok (yyerrstatus = 0) 871#define yyerrok (yyerrstatus = 0)
@@ -890,17 +895,18 @@ static const yytype_uint8 yystos[] =
890 895
891#define YYRECOVERING() (!!yyerrstatus) 896#define YYRECOVERING() (!!yyerrstatus)
892 897
893#define YYBACKUP(Token, Value) \ 898#define YYBACKUP(Token, Value) \
894do \ 899do \
895 if (yychar == YYEMPTY && yylen == 1) \ 900 if (yychar == YYEMPTY) \
896 { \ 901 { \
897 yychar = (Token); \ 902 yychar = (Token); \
898 yylval = (Value); \ 903 yylval = (Value); \
899 YYPOPSTACK (1); \ 904 YYPOPSTACK (yylen); \
900 goto yybackup; \ 905 yystate = *yyssp; \
901 } \ 906 goto yybackup; \
902 else \ 907 } \
903 { \ 908 else \
909 { \
904 yyerror (YY_("syntax error: cannot back up")); \ 910 yyerror (YY_("syntax error: cannot back up")); \
905 YYERROR; \ 911 YYERROR; \
906 } \ 912 } \
@@ -995,6 +1001,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
995 YYSTYPE const * const yyvaluep; 1001 YYSTYPE const * const yyvaluep;
996#endif 1002#endif
997{ 1003{
1004 FILE *yyo = yyoutput;
1005 YYUSE (yyo);
998 if (!yyvaluep) 1006 if (!yyvaluep)
999 return; 1007 return;
1000# ifdef YYPRINT 1008# ifdef YYPRINT
@@ -1246,12 +1254,12 @@ static int
1246yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 1254yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1247 yytype_int16 *yyssp, int yytoken) 1255 yytype_int16 *yyssp, int yytoken)
1248{ 1256{
1249 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); 1257 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1250 YYSIZE_T yysize = yysize0; 1258 YYSIZE_T yysize = yysize0;
1251 YYSIZE_T yysize1; 1259 YYSIZE_T yysize1;
1252 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1260 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1253 /* Internationalized format string. */ 1261 /* Internationalized format string. */
1254 const char *yyformat = 0; 1262 const char *yyformat = YY_NULL;
1255 /* Arguments of yyformat. */ 1263 /* Arguments of yyformat. */
1256 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1264 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1257 /* Number of reported tokens (one for the "unexpected", one per 1265 /* Number of reported tokens (one for the "unexpected", one per
@@ -1311,7 +1319,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1311 break; 1319 break;
1312 } 1320 }
1313 yyarg[yycount++] = yytname[yyx]; 1321 yyarg[yycount++] = yytname[yyx];
1314 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 1322 yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1315 if (! (yysize <= yysize1 1323 if (! (yysize <= yysize1
1316 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1324 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1317 return 2; 1325 return 2;
@@ -1463,7 +1471,7 @@ yyparse ()
1463 `yyss': related to states. 1471 `yyss': related to states.
1464 `yyvs': related to semantic values. 1472 `yyvs': related to semantic values.
1465 1473
1466 Refer to the stacks thru separate pointers, to allow yyoverflow 1474 Refer to the stacks through separate pointers, to allow yyoverflow
1467 to reallocate them elsewhere. */ 1475 to reallocate them elsewhere. */
1468 1476
1469 /* The state stack. */ 1477 /* The state stack. */
@@ -2346,7 +2354,7 @@ yyabortlab:
2346 yyresult = 1; 2354 yyresult = 1;
2347 goto yyreturn; 2355 goto yyreturn;
2348 2356
2349#if !defined(yyoverflow) || YYERROR_VERBOSE 2357#if !defined yyoverflow || YYERROR_VERBOSE
2350/*-------------------------------------------------. 2358/*-------------------------------------------------.
2351| yyexhaustedlab -- memory exhaustion comes here. | 2359| yyexhaustedlab -- memory exhaustion comes here. |
2352`-------------------------------------------------*/ 2360`-------------------------------------------------*/
diff --git a/scripts/genksyms/parse.tab.h_shipped b/scripts/genksyms/parse.tab.h_shipped
index 93240a3cdecc..a4737dec4532 100644
--- a/scripts/genksyms/parse.tab.h_shipped
+++ b/scripts/genksyms/parse.tab.h_shipped
@@ -1,8 +1,8 @@
1/* A Bison parser, made by GNU Bison 2.5. */ 1/* A Bison parser, made by GNU Bison 2.5.1. */
2 2
3/* Bison interface for Yacc-like parsers in C 3/* Bison interface for Yacc-like parsers in C
4 4
5 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. 5 Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
6 6
7 This program is free software: you can redistribute it and/or modify 7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
@@ -66,18 +66,19 @@
66 EXPORT_SYMBOL_KEYW = 284, 66 EXPORT_SYMBOL_KEYW = 284,
67 ASM_PHRASE = 285, 67 ASM_PHRASE = 285,
68 ATTRIBUTE_PHRASE = 286, 68 ATTRIBUTE_PHRASE = 286,
69 BRACE_PHRASE = 287, 69 TYPEOF_PHRASE = 287,
70 BRACKET_PHRASE = 288, 70 BRACE_PHRASE = 288,
71 EXPRESSION_PHRASE = 289, 71 BRACKET_PHRASE = 289,
72 CHAR = 290, 72 EXPRESSION_PHRASE = 290,
73 DOTS = 291, 73 CHAR = 291,
74 IDENT = 292, 74 DOTS = 292,
75 INT = 293, 75 IDENT = 293,
76 REAL = 294, 76 INT = 294,
77 STRING = 295, 77 REAL = 295,
78 TYPE = 296, 78 STRING = 296,
79 OTHER = 297, 79 TYPE = 297,
80 FILENAME = 298 80 OTHER = 298,
81 FILENAME = 299
81 }; 82 };
82#endif 83#endif
83 84
diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y
index 23c39998ad86..b9f4cf202302 100644
--- a/scripts/genksyms/parse.y
+++ b/scripts/genksyms/parse.y
@@ -103,6 +103,7 @@ static void record_compound(struct string_list **keyw,
103 103
104%token ASM_PHRASE 104%token ASM_PHRASE
105%token ATTRIBUTE_PHRASE 105%token ATTRIBUTE_PHRASE
106%token TYPEOF_PHRASE
106%token BRACE_PHRASE 107%token BRACE_PHRASE
107%token BRACKET_PHRASE 108%token BRACKET_PHRASE
108%token EXPRESSION_PHRASE 109%token EXPRESSION_PHRASE
@@ -220,8 +221,8 @@ storage_class_specifier:
220type_specifier: 221type_specifier:
221 simple_type_specifier 222 simple_type_specifier
222 | cvar_qualifier 223 | cvar_qualifier
223 | TYPEOF_KEYW '(' decl_specifier_seq '*' ')' 224 | TYPEOF_KEYW '(' parameter_declaration ')'
224 | TYPEOF_KEYW '(' decl_specifier_seq ')' 225 | TYPEOF_PHRASE
225 226
226 /* References to s/u/e's defined elsewhere. Rearrange things 227 /* References to s/u/e's defined elsewhere. Rearrange things
227 so that it is easier to expand the definition fully later. */ 228 so that it is easier to expand the definition fully later. */