1 /* A Bison parser, made from c-parse.y
4 #define YYBISON 1 /* Identify Bison output. */
66 # define IMAGINARY 315
67 # define ATTRIBUTE 316
68 # define GCC_VA_LIST 317
69 # define GCC_VA_ARG 318
70 # define GCC_EXPECT 319
71 # define TYPEDEF_NAME 320
74 # define STRINGLIT 323
76 # define WSTRINGLIT 325
82 /* enable chatty error messages */
83 #define YYERROR_VERBOSE 1
85 /* figure out the location of a non-terminal. We discard extent information
86 * but this isn't necessarily disastrous for our purpose. */
87 #define YYLLOC_DEFAULT(Current, Rhs, N) do { \
95 /* various bits of parsing infrastructure. increasingly i'm thinking some of
96 * this belongs in its own file. still... */
98 /* hang on to both ends of a declarator while it is being parsed. This idiom
99 * is used a lot with anonymous structures below, but we need an actual name
100 * for the type for this particular case. */
101 struct parsing_declarator
{
102 struct declarator_type
*first
, **end
;
103 char *name
; /* pick up name */
106 /* we need to know what declaration specifiers apply to the current
107 * declarator. This means we need a stack of them to cope with nested
109 struct declaration_specifiers_stack
{
110 struct declaration_specifiers_stack
*next
;
111 struct declaration_specifiers
*ds
;
114 static struct declaration_specifiers_stack
*declaration_specifiers_stack
;
116 static void push_declaration_specifiers(struct declaration_specifiers
*ds
) {
117 struct declaration_specifiers_stack
*n
;
120 n
->next
= declaration_specifiers_stack
;
122 declaration_specifiers_stack
= n
;
125 static void pop_declaration_specifiers(void) {
126 /* can we have ->= and .= operators? */
127 declaration_specifiers_stack
= declaration_specifiers_stack
->next
;
130 static struct declaration_specifiers
*top_declaration_specifiers(void) {
131 return declaration_specifiers_stack
->ds
;
134 static void check_top_declaration_specifier(struct declaration_specifiers
*ds
) {
135 assert(declaration_specifiers_stack
->ds
== ds
);
138 /* make up an actual declarator from a completed parse */
139 static struct declarator
*get_declarator(struct parsing_declarator
*pd
,
140 const struct location
*where
) {
141 struct declarator
*d
;
144 d
->declarator_type
= pd
->first
;
145 d
->declaration_specifiers
= top_declaration_specifiers();
151 static struct expression expr_star
; /* kludge */
153 static void warn_old_style_function(const struct location
*where
) {
154 inputwarning(where
, warn_obsolete
,
155 "old-style function declarator");
158 void parser_init(FILE *fp
) {
160 translation_unit
= 0;
174 struct declarator
*declarator
;
176 struct declaration_specifiers
*declaration_specifiers
;
177 struct declarator
*declarator
;
178 struct parsing_declarator
*declarator_parse
;
179 struct declaration
*declaration
;
180 struct identifier_list
*identifier_list
;
181 struct expression
*expression
;
182 struct expression_list
*expression_list
;
183 struct initializer
*initializer
;
184 struct designator
*designator
;
185 struct external_declaration
*external_declaration
;
186 struct function_definition
*function_definition
;
187 struct enumerator
*enumerator
;
188 struct statement
*statement
;
189 /* transients for parsing lists */
190 struct { struct declarator
*first
, **end
; } *declarator_list
;
191 struct { struct declaration
*first
, **end
; } *declaration_list
;
192 struct { struct identifier_list
*first
, **end
; } *identifier_list_parse
;
193 struct { struct expression_list
*first
, **end
; } *parsing_expression_list
;
194 struct { struct initializer
*first
, **end
; } *initializer_list
;
195 struct { struct designator
*first
, **end
; } *designator_list
;
196 struct { struct external_declaration
*first
, **end
; } *external_declaration_list
;
197 struct { struct enumerator
*first
, **end
; } *enumerator_list
;
198 struct { struct statement
*first
, **end
; } *statement_list
;
200 # define YYSTYPE yystype
201 # define YYSTYPE_IS_TRIVIAL 1
205 typedef struct yyltype
214 # define YYLTYPE yyltype
215 # define YYLTYPE_IS_TRIVIAL 1
225 #define YYFLAG -32768
228 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
229 #define YYTRANSLATE(x) ((unsigned)(x) <= 326 ? yytranslate[x] : 203)
231 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
232 static const char yytranslate
[] =
234 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
235 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
236 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
237 2, 2, 2, 30, 2, 2, 2, 32, 25, 2,
238 88, 89, 26, 27, 37, 28, 39, 31, 2, 2,
239 2, 2, 2, 2, 2, 2, 2, 2, 95, 96,
240 33, 38, 34, 94, 2, 2, 2, 2, 2, 2,
241 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
242 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
243 2, 90, 2, 91, 35, 2, 2, 2, 2, 2,
244 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
245 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
246 2, 2, 2, 92, 36, 93, 29, 2, 2, 2,
247 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
248 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
249 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
250 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
251 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
252 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
253 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
254 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
255 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
256 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
257 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
258 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
259 2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
260 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
261 16, 17, 18, 19, 20, 21, 22, 23, 24, 40,
262 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
263 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
264 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
265 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
266 81, 82, 83, 84, 85, 86, 87
270 static const short yyprhs
[] =
272 0, 0, 2, 4, 6, 8, 9, 11, 13, 15,
273 17, 19, 21, 25, 27, 32, 37, 44, 51, 55,
274 58, 66, 68, 70, 72, 74, 76, 80, 82, 83,
275 85, 88, 91, 96, 98, 100, 102, 104, 106, 108,
276 110, 112, 117, 119, 123, 125, 127, 129, 131, 135,
277 137, 139, 141, 145, 147, 149, 151, 155, 157, 159,
278 161, 163, 165, 169, 171, 173, 175, 179, 181, 185,
279 187, 191, 193, 197, 199, 203, 205, 211, 213, 217,
280 219, 221, 223, 225, 227, 229, 231, 233, 235, 237,
281 239, 241, 245, 247, 248, 250, 254, 256, 259, 262,
282 265, 268, 271, 273, 274, 276, 277, 279, 284, 287,
283 289, 290, 295, 297, 299, 301, 303, 305, 307, 309,
284 311, 313, 315, 317, 319, 321, 323, 325, 327, 329,
285 331, 333, 335, 337, 339, 346, 349, 351, 354, 357,
286 359, 362, 366, 368, 371, 374, 377, 380, 383, 385,
287 386, 389, 395, 397, 401, 409, 412, 415, 417, 421,
288 423, 425, 429, 431, 433, 435, 437, 439, 440, 443,
289 445, 447, 452, 458, 463, 469, 471, 473, 474, 476,
290 479, 482, 485, 486, 488, 489, 492, 496, 498, 501,
291 504, 506, 507, 509, 513, 515, 518, 521, 523, 524,
292 526, 530, 533, 538, 544, 548, 554, 556, 557, 559,
293 560, 562, 565, 567, 572, 574, 575, 577, 581, 585,
294 588, 592, 594, 596, 599, 603, 606, 611, 616, 620,
295 627, 633, 636, 642, 650, 660, 661, 671, 675, 678,
296 681, 685, 686, 691, 695, 698, 699, 701, 703, 706,
297 707, 709, 712, 715, 717, 719, 720, 721, 728, 731,
298 732, 735, 736, 743, 746, 747, 749, 751, 752, 753
300 static const short yyrhs
[] =
302 191, 0, 82, 0, 81, 0, 98, 0, 0, 82,
303 0, 83, 0, 85, 0, 84, 0, 87, 0, 86,
304 0, 88, 127, 89, 0, 100, 0, 101, 90, 127,
305 91, 0, 101, 88, 105, 89, 0, 79, 88, 125,
306 37, 173, 89, 0, 80, 88, 125, 37, 125, 89,
307 0, 101, 102, 98, 0, 101, 103, 0, 88, 173,
308 89, 92, 180, 179, 93, 0, 39, 0, 3, 0,
309 4, 0, 5, 0, 125, 0, 104, 37, 125, 0,
310 104, 0, 0, 101, 0, 107, 108, 0, 64, 106,
311 0, 64, 88, 173, 89, 0, 25, 0, 26, 0,
312 27, 0, 28, 0, 29, 0, 30, 0, 103, 0,
313 106, 0, 88, 173, 89, 108, 0, 108, 0, 109,
314 110, 108, 0, 26, 0, 31, 0, 32, 0, 109,
315 0, 111, 112, 109, 0, 27, 0, 28, 0, 111,
316 0, 113, 114, 111, 0, 6, 0, 7, 0, 113,
317 0, 115, 116, 113, 0, 33, 0, 34, 0, 8,
318 0, 9, 0, 115, 0, 117, 118, 115, 0, 10,
319 0, 11, 0, 117, 0, 119, 25, 117, 0, 119,
320 0, 120, 35, 119, 0, 120, 0, 121, 36, 120,
321 0, 121, 0, 122, 12, 121, 0, 122, 0, 123,
322 13, 122, 0, 123, 0, 123, 94, 127, 95, 124,
323 0, 124, 0, 106, 126, 125, 0, 38, 0, 14,
324 0, 15, 0, 16, 0, 17, 0, 18, 0, 19,
325 0, 20, 0, 21, 0, 22, 0, 23, 0, 125,
326 0, 127, 37, 125, 0, 127, 0, 0, 124, 0,
327 131, 134, 96, 0, 132, 0, 139, 133, 0, 140,
328 133, 0, 156, 133, 0, 157, 133, 0, 198, 133,
329 0, 132, 0, 0, 135, 0, 0, 137, 0, 135,
330 37, 197, 137, 0, 159, 197, 0, 136, 0, 0,
331 136, 38, 138, 178, 0, 68, 0, 51, 0, 65,
332 0, 40, 0, 59, 0, 141, 0, 142, 0, 151,
333 0, 81, 0, 71, 0, 43, 0, 62, 0, 57,
334 0, 58, 0, 52, 0, 48, 0, 63, 0, 70,
335 0, 74, 0, 75, 0, 76, 0, 78, 0, 143,
336 99, 92, 144, 93, 197, 0, 143, 98, 0, 143,
337 0, 66, 197, 0, 69, 197, 0, 145, 0, 144,
338 145, 0, 146, 149, 96, 0, 147, 0, 140, 148,
339 0, 156, 148, 0, 139, 148, 0, 157, 148, 0,
340 198, 148, 0, 147, 0, 0, 150, 197, 0, 149,
341 37, 197, 150, 197, 0, 136, 0, 158, 95, 129,
342 0, 152, 99, 92, 153, 179, 93, 197, 0, 152,
343 98, 0, 50, 197, 0, 154, 0, 153, 37, 154,
344 0, 155, 0, 98, 0, 98, 38, 129, 0, 44,
345 0, 60, 0, 72, 0, 56, 0, 159, 0, 0,
346 165, 160, 0, 160, 0, 82, 0, 88, 197, 159,
347 89, 0, 160, 90, 162, 161, 91, 0, 160, 88,
348 171, 89, 0, 160, 88, 168, 163, 89, 0, 125,
349 0, 26, 0, 0, 167, 0, 65, 167, 0, 166,
350 65, 0, 37, 24, 0, 0, 165, 0, 0, 26,
351 167, 0, 26, 167, 165, 0, 156, 0, 166, 156,
352 0, 166, 198, 0, 166, 0, 0, 170, 0, 168,
353 37, 170, 0, 131, 0, 169, 159, 0, 169, 176,
354 0, 172, 0, 0, 82, 0, 172, 37, 82, 0,
355 146, 176, 0, 88, 197, 177, 89, 0, 175, 90,
356 162, 161, 91, 0, 175, 88, 89, 0, 175, 88,
357 168, 163, 89, 0, 174, 0, 0, 177, 0, 0,
358 165, 0, 164, 174, 0, 125, 0, 92, 180, 179,
359 93, 0, 37, 0, 0, 181, 0, 180, 37, 181,
360 0, 182, 38, 178, 0, 183, 178, 0, 82, 95,
361 178, 0, 178, 0, 183, 0, 182, 183, 0, 90,
362 129, 91, 0, 39, 98, 0, 98, 95, 197, 184,
363 0, 42, 129, 95, 184, 0, 46, 95, 184, 0,
364 55, 88, 127, 89, 184, 190, 0, 67, 88, 127,
365 89, 184, 0, 128, 96, 0, 73, 88, 127, 89,
366 184, 0, 47, 184, 73, 88, 127, 89, 96, 0,
367 53, 88, 128, 96, 128, 96, 128, 89, 184, 0,
368 0, 53, 88, 185, 130, 128, 96, 128, 89, 184,
369 0, 54, 98, 96, 0, 45, 96, 0, 41, 96,
370 0, 61, 128, 96, 0, 0, 92, 186, 188, 93,
371 0, 92, 188, 93, 0, 188, 189, 0, 0, 130,
372 0, 184, 0, 49, 184, 0, 0, 192, 0, 191,
373 192, 0, 191, 96, 0, 130, 0, 193, 0, 0,
374 0, 131, 136, 194, 196, 195, 187, 0, 196, 130,
375 0, 0, 197, 198, 0, 0, 77, 88, 88, 199,
376 89, 89, 0, 199, 200, 0, 0, 44, 0, 98,
377 0, 0, 0, 98, 88, 201, 105, 202, 89, 0
383 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
384 static const short yyrline
[] =
386 0, 326, 333, 335, 338, 340, 348, 363, 368, 371,
387 374, 377, 380, 385, 387, 390, 393, 399, 408, 413,
388 416, 425, 425, 427, 427, 429, 436, 445, 447, 450,
389 452, 455, 458, 466, 468, 469, 470, 471, 472, 473,
390 476, 478, 486, 488, 493, 495, 496, 499, 501, 506,
391 508, 511, 513, 518, 520, 523, 525, 530, 532, 533,
392 534, 537, 539, 544, 546, 549, 551, 556, 558, 563,
393 565, 570, 572, 577, 579, 584, 586, 591, 593, 598,
394 600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
395 612, 614, 619, 621, 624, 630, 646, 653, 668, 671,
396 685, 699, 704, 706, 711, 713, 716, 722, 729, 733,
397 737, 737, 748, 750, 751, 752, 753, 758, 763, 764,
398 765, 773, 775, 776, 777, 778, 779, 780, 781, 782,
399 783, 784, 785, 786, 797, 804, 809, 816, 818, 821,
400 827, 834, 847, 854, 858, 872, 876, 880, 885, 887,
401 892, 898, 905, 907, 919, 931, 938, 942, 948, 954,
402 968, 974, 984, 986, 987, 992, 998, 1000, 1003, 1009,
403 1012, 1019, 1022, 1039, 1051, 1065, 1067, 1068, 1071, 1075,
404 1080, 1087, 1089, 1093, 1095, 1101, 1113, 1126, 1128, 1129,
405 1132, 1134, 1137, 1143, 1149, 1157, 1167, 1182, 1184, 1187,
406 1198, 1211, 1224, 1228, 1245, 1257, 1271, 1273, 1280, 1282,
407 1289, 1291, 1300, 1306, 1313, 1315, 1318, 1324, 1330, 1335,
408 1341, 1353, 1356, 1362, 1368, 1375, 1385, 1394, 1401, 1407,
409 1415, 1422, 1428, 1435, 1442, 1453, 1453, 1467, 1473, 1478,
410 1483, 1489, 1489, 1501, 1512, 1517, 1523, 1531, 1535, 1537,
411 1542, 1548, 1553, 1558, 1565, 1576, 1576, 1576, 1675, 1680,
412 1688, 1690, 1693, 1701, 1703, 1706, 1708, 1709, 1709, 1709
417 #if (YYDEBUG) || defined YYERROR_VERBOSE
419 /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
420 static const char *const yytname
[] =
422 "$", "error", "$undefined.", "\"->\"", "\"++\"", "\"--\"", "\"<<\"",
423 "\">>\"", "\"<=\"", "\">=\"", "\"==\"", "\"!=\"", "\"&&\"", "\"||\"",
424 "\"*=\"", "\"/=\"", "\"%=\"", "\"+=\"", "\"-=\"", "\"<<=\"", "\">>=\"",
425 "\"&=\"", "\"^=\"", "\"|=\"", "\"...\"", "'&'", "'*'", "'+'", "'-'",
426 "'~'", "'!'", "'/'", "'%'", "'<'", "'>'", "'^'", "'|'", "','", "'='",
427 "'.'", "\"auto\"", "\"break\"", "\"case\"", "\"char\"", "\"const\"",
428 "\"continue\"", "\"default\"", "\"do\"", "\"double\"", "\"else\"",
429 "\"enum\"", "\"extern\"", "\"float\"", "\"for\"", "\"goto\"", "\"if\"",
430 "\"inline\"", "\"int\"", "\"long\"", "\"register\"", "\"restrict\"",
431 "\"return\"", "\"short\"", "\"signed\"", "\"sizeof\"", "\"static\"",
432 "\"struct\"", "\"switch\"", "\"typedef\"", "\"union\"", "\"unsigned\"",
433 "\"void\"", "\"volatile\"", "\"while\"", "\"_Bool\"", "\"_Complex\"",
434 "\"_Imaginary\"", "\"__attribute__\"", "\"__builtin_va_list\"",
435 "\"__builtin_va_arg\"", "\"__builtin_expect\"", "TYPEDEF_NAME", "ID",
436 "NUMBER", "STRINGLIT", "CHARLIT", "WSTRINGLIT", "WCHARLIT", "'('",
437 "')'", "'['", "']'", "'{'", "'}'", "'?'", "':'", "';'", "main",
438 "identifier", "identifier_opt", "primary_expression",
439 "postfix_expression", "member_operator", "incrdecr",
440 "argument_expression_list", "argument_expression_list_opt",
441 "unary_expression", "unary_operator", "cast_expression",
442 "multiplicative_expression", "multiplicative_operator",
443 "additive_expression", "additive_operator", "shift_expression",
444 "shift_operator", "relational_expression", "relational_operator",
445 "equality_expression", "equality_operator", "AND_expression",
446 "exclusive_OR_expression", "inclusive_OR_expression",
447 "logical_AND_expression", "logical_OR_expression",
448 "conditional_expression", "assignment_expression",
449 "assignment_operator", "expression", "expression_opt",
450 "constant_expression", "declaration", "declaration_specifiers",
451 "declaration_specifiers_definition", "declaration_specifiers_opt",
452 "init_declarator_list_opt", "init_declarator_list",
453 "attributed_declarator", "attributed_init_declarator", "@1",
454 "storage_class_specifier", "type_specifier", "basic_type_specifier",
455 "struct_or_union_specifier", "struct_or_union",
456 "struct_declaration_list", "struct_declaration",
457 "specifier_qualifier_list", "specifier_qualifier_list_definition",
458 "specifier_qualifier_list_opt", "struct_declarator_list",
459 "struct_declarator", "enum_specifier", "enum", "enumerator_list",
460 "registered_enumerator", "enumerator", "type_qualifier",
461 "function_specifier", "declarator_opt", "declarator",
462 "direct_declarator", "array_size", "array_specifiers", "variadic",
463 "pointer_opt", "pointer", "type_qualifier_list",
464 "type_qualifier_list_opt", "parameter_list",
465 "parameter_declaration_specifiers", "parameter_declaration",
466 "ID_list_opt", "ID_list", "type_name", "direct_abstract_declarator",
467 "direct_abstract_declarator_opt", "abstract_declarator_opt",
468 "abstract_declarator", "initializer", "comma_opt", "initializer_list",
469 "designated_initializer", "designator_list", "designator", "statement",
470 "@2", "@3", "function_body", "block_item_list_opt", "block_item",
471 "else_part_opt", "translation_unit", "external_declaration",
472 "function_definition", "@4", "@5", "declaration_list_opt",
473 "attribute_specifier_list", "attribute_specifier", "attribute_list",
474 "attribute", "@6", "@7", 0
478 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
479 static const short yyr1
[] =
481 0, 97, 98, 98, 99, 99, 100, 100, 100, 100,
482 100, 100, 100, 101, 101, 101, 101, 101, 101, 101,
483 101, 102, 102, 103, 103, 104, 104, 105, 105, 106,
484 106, 106, 106, 107, 107, 107, 107, 107, 107, 107,
485 108, 108, 109, 109, 110, 110, 110, 111, 111, 112,
486 112, 113, 113, 114, 114, 115, 115, 116, 116, 116,
487 116, 117, 117, 118, 118, 119, 119, 120, 120, 121,
488 121, 122, 122, 123, 123, 124, 124, 125, 125, 126,
489 126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
490 127, 127, 128, 128, 129, 130, 131, 132, 132, 132,
491 132, 132, 133, 133, 134, 134, 135, 135, 136, 137,
492 138, 137, 139, 139, 139, 139, 139, 140, 140, 140,
493 140, 141, 141, 141, 141, 141, 141, 141, 141, 141,
494 141, 141, 141, 141, 142, 142, 142, 143, 143, 144,
495 144, 145, 146, 147, 147, 147, 147, 147, 148, 148,
496 149, 149, 150, 150, 151, 151, 152, 153, 153, 154,
497 155, 155, 156, 156, 156, 157, 158, 158, 159, 159,
498 160, 160, 160, 160, 160, 161, 161, 161, 162, 162,
499 162, 163, 163, 164, 164, 165, 165, 166, 166, 166,
500 167, 167, 168, 168, 169, 170, 170, 171, 171, 172,
501 172, 173, 174, 174, 174, 174, 175, 175, 176, 176,
502 177, 177, 178, 178, 179, 179, 180, 180, 181, 181,
503 181, 181, 182, 182, 183, 183, 184, 184, 184, 184,
504 184, 184, 184, 184, 184, 185, 184, 184, 184, 184,
505 184, 186, 184, 187, 188, 188, 189, 189, 190, 190,
506 191, 191, 191, 192, 192, 194, 195, 193, 196, 196,
507 197, 197, 198, 199, 199, 200, 200, 201, 202, 200
510 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
511 static const short yyr2
[] =
513 0, 1, 1, 1, 1, 0, 1, 1, 1, 1,
514 1, 1, 3, 1, 4, 4, 6, 6, 3, 2,
515 7, 1, 1, 1, 1, 1, 3, 1, 0, 1,
516 2, 2, 4, 1, 1, 1, 1, 1, 1, 1,
517 1, 4, 1, 3, 1, 1, 1, 1, 3, 1,
518 1, 1, 3, 1, 1, 1, 3, 1, 1, 1,
519 1, 1, 3, 1, 1, 1, 3, 1, 3, 1,
520 3, 1, 3, 1, 3, 1, 5, 1, 3, 1,
521 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
522 1, 3, 1, 0, 1, 3, 1, 2, 2, 2,
523 2, 2, 1, 0, 1, 0, 1, 4, 2, 1,
524 0, 4, 1, 1, 1, 1, 1, 1, 1, 1,
525 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
526 1, 1, 1, 1, 6, 2, 1, 2, 2, 1,
527 2, 3, 1, 2, 2, 2, 2, 2, 1, 0,
528 2, 5, 1, 3, 7, 2, 2, 1, 3, 1,
529 1, 3, 1, 1, 1, 1, 1, 0, 2, 1,
530 1, 4, 5, 4, 5, 1, 1, 0, 1, 2,
531 2, 2, 0, 1, 0, 2, 3, 1, 2, 2,
532 1, 0, 1, 3, 1, 2, 2, 1, 0, 1,
533 3, 2, 4, 5, 3, 5, 1, 0, 1, 0,
534 1, 2, 1, 4, 1, 0, 1, 3, 3, 2,
535 3, 1, 1, 2, 3, 2, 4, 4, 3, 6,
536 5, 2, 5, 7, 9, 0, 9, 3, 2, 2,
537 3, 0, 4, 3, 2, 0, 1, 1, 2, 0,
538 1, 2, 2, 1, 1, 0, 0, 6, 2, 0,
539 2, 0, 6, 2, 0, 1, 1, 0, 0, 6
542 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
543 doesn't specify something else to do. Zero means the default is an
545 static const short yydefact
[] =
547 0, 115, 122, 162, 127, 261, 113, 126, 165, 124,
548 125, 116, 163, 123, 128, 114, 261, 112, 261, 129,
549 121, 164, 130, 131, 132, 0, 133, 120, 253, 105,
550 96, 103, 103, 117, 118, 136, 119, 5, 103, 103,
551 1, 250, 254, 103, 156, 137, 138, 0, 191, 170,
552 261, 0, 104, 255, 106, 261, 169, 0, 102, 97,
553 98, 3, 2, 135, 0, 155, 0, 99, 100, 252,
554 251, 101, 260, 264, 187, 190, 185, 0, 95, 261,
555 110, 259, 108, 198, 191, 168, 0, 0, 0, 188,
556 189, 186, 0, 0, 0, 256, 199, 194, 182, 209,
557 192, 0, 197, 191, 177, 190, 178, 149, 149, 0,
558 139, 167, 142, 149, 149, 149, 160, 215, 157, 159,
559 265, 0, 266, 263, 171, 109, 107, 23, 24, 33,
560 34, 35, 36, 37, 38, 0, 0, 0, 6, 7,
561 9, 8, 11, 10, 0, 0, 13, 29, 39, 40,
562 0, 42, 47, 51, 55, 61, 65, 67, 69, 71,
563 73, 75, 77, 212, 111, 258, 105, 0, 0, 0,
564 195, 207, 210, 196, 208, 173, 0, 179, 34, 175,
565 0, 180, 148, 145, 143, 261, 140, 152, 0, 261,
566 0, 261, 144, 146, 147, 0, 214, 0, 262, 267,
567 0, 31, 0, 0, 90, 0, 184, 0, 0, 6,
568 0, 221, 215, 216, 0, 222, 22, 21, 28, 0,
569 0, 19, 80, 81, 82, 83, 84, 85, 86, 87,
570 88, 89, 79, 0, 40, 30, 44, 45, 46, 0,
571 49, 50, 0, 53, 54, 0, 59, 60, 57, 58,
572 0, 63, 64, 0, 0, 0, 0, 0, 0, 0,
573 245, 257, 181, 193, 174, 261, 206, 0, 200, 172,
574 134, 261, 141, 150, 0, 94, 161, 158, 261, 28,
575 0, 0, 0, 0, 12, 183, 201, 0, 225, 0,
576 0, 214, 0, 0, 223, 219, 27, 0, 25, 0,
577 18, 78, 43, 48, 52, 56, 62, 66, 68, 70,
578 72, 74, 0, 93, 184, 0, 191, 167, 153, 154,
579 268, 32, 0, 0, 91, 0, 41, 220, 224, 217,
580 213, 218, 0, 15, 14, 0, 0, 0, 0, 0,
581 93, 0, 0, 0, 93, 0, 0, 120, 6, 241,
582 243, 0, 92, 0, 246, 247, 244, 0, 204, 182,
583 177, 261, 0, 0, 0, 215, 26, 76, 239, 0,
584 238, 93, 0, 235, 0, 0, 0, 0, 0, 245,
585 261, 231, 202, 0, 0, 151, 269, 16, 17, 0,
586 93, 228, 0, 0, 0, 237, 0, 240, 0, 0,
587 93, 93, 205, 203, 20, 227, 0, 93, 93, 93,
588 93, 93, 242, 226, 0, 0, 0, 249, 230, 232,
589 0, 93, 93, 93, 229, 233, 0, 0, 248, 93,
590 93, 234, 236, 0, 0, 0
593 static const short yydefgoto
[] =
595 433, 351, 64, 146, 147, 220, 148, 296, 297, 149,
596 150, 151, 152, 239, 153, 242, 154, 245, 155, 250,
597 156, 253, 157, 158, 159, 160, 161, 162, 204, 233,
598 352, 353, 276, 28, 166, 30, 59, 51, 52, 125,
599 54, 94, 31, 32, 33, 34, 35, 109, 110, 206,
600 112, 183, 188, 189, 36, 37, 117, 118, 119, 38,
601 39, 190, 55, 56, 180, 104, 169, 171, 57, 75,
602 106, 98, 99, 100, 101, 102, 207, 266, 267, 173,
603 174, 211, 197, 212, 213, 214, 215, 355, 394, 379,
604 261, 313, 356, 424, 40, 41, 42, 81, 167, 95,
605 82, 43, 88, 123, 279, 362
608 static const short yypact
[] =
610 1198,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
611 -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
612 -32768,-32768,-32768,-32768,-32768, -50,-32768,-32768,-32768, 14,
613 -32768, 1198, 1198,-32768,-32768, 42,-32768, 68, 1198, 1198,
614 1037,-32768,-32768, 1198, -35, -35, -35, -42, 7,-32768,
615 -32768, -40, 36, -13,-32768,-32768, 141, -41,-32768,-32768,
616 -32768,-32768,-32768, 30, 50, 30, 54,-32768,-32768,-32768,
617 -32768,-32768,-32768,-32768,-32768, 149, 106, 115,-32768,-32768,
618 -32768,-32768, -35, 1158, 221, 141, 1198, 68, 152,-32768,
619 -32768,-32768, -1, 115, 752, 1198,-32768,-32768, 114, 9,
620 -32768, 102, 162, 7, 922, 192,-32768, 1198, 1198, 1079,
621 -32768, 14,-32768, 1198, 1198, 1198, 178, 185,-32768,-32768,
622 -32768, 139, 144,-32768,-32768, 197,-32768,-32768,-32768,-32768,
623 -32768,-32768,-32768,-32768,-32768, 932, 151, 154,-32768,-32768,
624 -32768,-32768,-32768,-32768, 837, 725,-32768, 89,-32768, 370,
625 949,-32768, 271, 160, 62, 250, 239, 243, 211, 236,
626 268, 16,-32768,-32768,-32768,-32768, 14, 198, 998, 200,
627 -32768, 210, -27,-32768,-32768,-32768, 222,-32768, 218,-32768,
628 219,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -7,-32768,
629 223, 226,-32768,-32768,-32768, 949, 68, 230,-32768,-32768,
630 837,-32768, 949, 949,-32768, -9, -4, 235, 68, 231,
631 949,-32768, 290,-32768, 147, 752,-32768,-32768, 949, 949,
632 68,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
633 -32768,-32768,-32768, 949,-32768,-32768,-32768,-32768,-32768, 949,
634 -32768,-32768, 949,-32768,-32768, 949,-32768,-32768,-32768,-32768,
635 949,-32768,-32768, 949, 949, 949, 949, 949, 949, 949,
636 -32768,-32768,-32768,-32768,-32768,-32768, 22, 225,-32768,-32768,
637 -35,-32768,-32768, -35, 949,-32768,-32768,-32768,-32768, 949,
638 246, 299, 300, 949,-32768, 249,-32768, 766,-32768, 752,
639 248, 725, 247, 752,-32768,-32768, 304, 254,-32768, 15,
640 -32768,-32768,-32768, 271, 160, 62, 250, 239, 243, 211,
641 236, 268, 41, 415, 27, 1118, 221, 115,-32768, -35,
642 -32768, 252, 1198, 949,-32768, 725,-32768,-32768,-32768,-32768,
643 -32768,-32768, 949,-32768,-32768, 949, 255, 949, 257, 251,
644 655, 262, 68, 264, 949, 266, 267, 265, 269,-32768,
645 -32768, 270, 308, 261,-32768,-32768,-32768, 272,-32768, 114,
646 922,-32768, 274, 277, 285, 290,-32768,-32768,-32768, 281,
647 -32768, 655, 286, 343, 282, 949, 283, 949, 949,-32768,
648 -32768,-32768,-32768, 288, 289, -35,-32768,-32768,-32768, 301,
649 655,-32768, 293, 302, 1198,-32768, 40,-32768, 118, 128,
650 500, 585,-32768,-32768,-32768,-32768, 949, 949, 949, 655,
651 655, 655,-32768,-32768, 134, 303, 305, 333,-32768,-32768,
652 306, 949, 949, 655,-32768,-32768, 307, 311,-32768, 655,
653 655,-32768,-32768, 395, 397,-32768
656 static const short yypgoto
[] =
658 -32768, -30, 366,-32768,-32768,-32768, 258,-32768, 125, 75,
659 -32768, -123, 164,-32768, 166,-32768, 159,-32768, 161,-32768,
660 163,-32768, 158, 165, 167, 157,-32768, -174, -85,-32768,
661 -124, -130, -192, -89, 4, 256, 224,-32768,-32768, -21,
662 323,-32768, 12, 45,-32768,-32768,-32768,-32768, 309, -55,
663 193, 105,-32768, 116,-32768,-32768,-32768, 238,-32768, 0,
664 61,-32768, -62, -34, 72, 119, 77,-32768, -66, -72,
665 -22, 122,-32768, 278,-32768,-32768, -183,-32768,-32768, 232,
666 133, -78, -198, 123, 173,-32768, 237, -228,-32768,-32768,
667 -32768, 70,-32768,-32768,-32768, 410,-32768,-32768,-32768,-32768,
668 -5, -43,-32768,-32768,-32768,-32768
675 static const short yytable
[] =
677 44, 72, 72, 72, 29, 63, 165, 65, 53, 163,
678 91, 45, 105, 46, 292, 92, 164, 280, 290, 179,
679 205, 275, 48, 85, -109, 80, 76, 235, 283, 258,
680 271, 111, 90, 172, 72, 48, 275, 170, 47, 72,
681 48, 49, 25, 115, 29, 77, 73, 50, 74, 191,
682 72, 3, 283, 48, 111, 49, 78, 116, 122, -211,
683 163, 50, 90, -183, 115, 115, 115, 12, 243, 244,
684 115, 115, 115, 79, 93, 89, 205, 283, 283, 21,
685 284, 177, 318, -109, 74, -209, 113, 97, 124, 272,
686 187, 49, 216, 127, 128, 299, 49, 50, 107, -184,
687 275, 115, 50, 74, 25, 89, 334, 113, 113, 113,
688 259, -211, 372, 113, 113, 113, 302, 281, 282, 107,
689 107, 107, -4, 61, 62, 107, 107, 107, 217, 409,
690 163, 108, 48, 298, -5, 312, 335, 295, 85, 363,
691 285, 48, 86, 391, 113, 369, 87, 114, 301, 61,
692 62, 168, 108, 108, 108, 283, 107, 115, 108, 108,
693 108, 367, 405, 275, 326, 283, 116, 389, 114, 114,
694 114, 283, 97, 413, 114, 114, 114, 218, 288, 219,
695 270, 417, 418, 419, 273, 293, 208, 240, 241, 108,
696 300, 175, 25, 3, 298, 428, 120, 49, 324, 176,
697 113, 431, 432, 50, 163, 114, 163, 410, 163, 12,
698 201, 327, 107, 184, 376, 331, 195, 411, 192, 193,
699 194, 21, 196, 420, 354, 234, 25, 72, 198, 83,
700 72, 84, 199, 61, 62, 80, 3, 210, 364, 202,
701 163, 121, 203, 393, 105, 108, 255, 366, 285, 251,
702 252, 396, 12, 398, 399, 191, 60, 181, 246, 247,
703 314, 114, 67, 68, 21, 3, 317, 71, 254, 25,
704 234, 72, 256, 319, 72, 179, 72, 415, 416, 115,
705 257, 12, 414, 248, 249, 234, 103, 58, 58, 264,
706 260, 426, 427, 21, 58, 58, 187, 236, 265, 58,
707 182, 182, 237, 238, 268, 408, 182, 182, 182, -176,
708 269, 354, 374, 315, 234, 316, 74, 234, 274, 97,
709 234, -166, 113, 278, 287, 234, 289, 291, 234, 234,
710 234, 234, 234, 234, 107, 321, 322, 323, -210, 328,
711 330, 332, 72, 333, 325, 283, 371, 127, 128, 234,
712 373, 368, 375, 370, 377, 378, 385, 381, 72, 392,
713 -3, 382, 234, 386, -2, 380, 387, 108, 129, 130,
714 131, 132, 133, 134, 388, 401, 390, 402, 395, 397,
715 403, 406, 423, 114, 222, 223, 224, 225, 226, 227,
716 228, 229, 230, 231, 404, 434, 429, 435, 407, 421,
717 430, 422, 425, 66, 320, 221, 303, 135, 232, 305,
718 234, 304, 234, 308, 306, 311, 126, 307, 186, 127,
719 128, 309, 136, 137, 310, 138, 139, 140, 141, 142,
720 143, 144, 384, 361, 277, 360, 383, 359, 286, -93,
721 129, 130, 131, 132, 133, 134, 263, 357, 365, 400,
722 70, 294, 0, 0, 0, 1, 336, 337, 2, 3,
723 338, 339, 340, 4, 329, 5, 6, 7, 341, 342,
724 343, 8, 9, 10, 11, 12, 344, 13, 14, 135,
725 15, 16, 345, 17, 18, 19, 20, 21, 346, 22,
726 23, 24, 25, 26, 136, 137, 347, 348, 139, 140,
727 141, 142, 143, 144, 127, 128, 0, 349, 350, 0,
728 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
729 0, 0, 0, 0, 0, 129, 130, 131, 132, 133,
730 134, 0, 0, 0, 0, 0, 0, 0, 0, 0,
731 1, 336, 337, 2, 3, 338, 339, 340, 4, 0,
732 5, 6, 7, 341, 342, 343, 8, 9, 10, 11,
733 12, 344, 13, 14, 135, 15, 16, 345, 17, 18,
734 19, 20, 21, 346, 22, 23, 24, 25, 26, 136,
735 137, 347, 348, 139, 140, 141, 142, 143, 144, 127,
736 128, 0, 349, 412, 0, 0, 0, 0, 0, 0,
737 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
738 129, 130, 131, 132, 133, 134, 0, 0, 0, 0,
739 0, 0, 0, 0, 0, 0, 336, 337, 0, 0,
740 338, 339, 340, 0, 0, 0, 0, 0, 341, 342,
741 343, 0, 0, 0, 0, 0, 344, 0, 0, 135,
742 0, 0, 345, 0, 0, 0, 0, 0, 346, 127,
743 128, 0, 25, 0, 136, 137, 61, 348, 139, 140,
744 141, 142, 143, 144, 0, 0, 0, 349, 0, 0,
745 129, 130, 131, 132, 133, 134, 0, 0, 0, 0,
746 0, 0, 0, 0, 0, 0, 336, 337, 0, 0,
747 338, 339, 340, 0, 0, 0, 0, 0, 341, 342,
748 343, 0, 0, 0, 0, 0, 344, 0, 0, 135,
749 0, 0, 345, 0, 0, 0, 0, 0, 346, 127,
750 128, 0, 0, 0, 136, 137, 61, 348, 139, 140,
751 141, 142, 143, 144, 0, 0, 0, 349, 0, 0,
752 129, 130, 131, 132, 133, 134, 127, 128, 0, 0,
753 0, 0, 0, 0, 208, 0, 0, 0, 0, 0,
754 127, 128, 0, 0, 0, 0, 0, 129, 130, 131,
755 132, 133, 134, 0, 0, 0, 0, 0, 0, 135,
756 0, 129, 130, 131, 132, 133, 134, 0, 0, 0,
757 0, 0, 0, 0, 136, 137, 0, 209, 139, 140,
758 141, 142, 143, 144, 0, 210, 135, 145, 0, 0,
759 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
760 135, 136, 137, 0, 138, 139, 140, 141, 142, 143,
761 144, 127, 128, 0, 145, 136, 137, 0, 138, 139,
762 140, 141, 142, 143, 144, 0, 0, 0, 325, 0,
763 0, 0, 129, 130, 131, 132, 133, 134, 0, 0,
764 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
765 2, 3, 0, 0, 0, 4, 0, 5, 6, 7,
766 0, 0, 0, 8, 9, 10, 11, 12, 0, 13,
767 14, 135, 15, 16, 0, 17, 18, 19, 20, 21,
768 0, 22, 23, 24, 25, 26, 136, 137, 27, 138,
769 139, 140, 141, 142, 143, 144, 127, 128, 0, 0,
770 0, 0, 0, 0, 0, 0, 127, 128, 0, 0,
771 0, 0, 0, 0, 0, 0, 0, 129, 178, 131,
772 132, 133, 134, 127, 128, 0, 0, 129, 130, 131,
773 132, 133, 134, 0, 0, 0, 0, 0, 0, 0,
774 0, 0, 0, 0, 129, 130, 131, 132, 133, 134,
775 0, 0, 0, 0, 0, 0, 135, 0, 0, 0,
776 0, 0, 0, 0, 0, 0, 135, 0, 0, 0,
777 0, 136, 137, 0, 138, 139, 140, 141, 142, 143,
778 144, 136, 137, 135, 138, 139, 140, 141, 142, 143,
779 200, 0, 262, 0, 0, 0, 0, 0, 136, 137,
780 0, 138, 139, 140, 141, 142, 143, 144, 1, 0,
781 0, 2, 3, 0, 0, 0, 4, 0, 5, 6,
782 7, 0, 0, 0, 8, 9, 10, 11, 12, 0,
783 13, 14, 0, 15, 16, 0, 17, 18, 19, 20,
784 21, 0, 22, 23, 24, 25, 26, 1, 0, 27,
785 2, 3, 0, 0, 0, 4, 0, 5, 6, 7,
786 0, 0, 0, 8, 9, 10, 11, 12, 0, 13,
787 14, 0, 15, 16, 0, 17, 18, 19, 20, 21,
788 0, 22, 23, 24, 25, 26, 0, 0, 27, 1,
789 0, 0, 2, 3, 0, 0, 0, 4, 0, 5,
790 6, 7, 0, 69, 0, 8, 9, 10, 11, 12,
791 0, 13, 14, 0, 15, 16, 0, 17, 18, 19,
792 20, 21, 0, 22, 23, 24, 25, 26, 1, 0,
793 27, 2, 3, 0, 0, 0, 4, 0, 5, 6,
794 7, 0, 185, 0, 8, 9, 10, 11, 12, 0,
795 13, 14, 0, 15, 16, 0, 17, 18, 19, 20,
796 21, 0, 22, 23, 24, 25, 26, 0, 1, 27,
797 0, 2, 3, 0, 0, 0, 4, 358, 5, 6,
798 7, 0, 0, 0, 8, 9, 10, 11, 12, 0,
799 13, 14, 0, 15, 16, 0, 17, 18, 19, 20,
800 21, 0, 22, 23, 24, 25, 26, 0, 1, 27,
801 96, 2, 3, 0, 0, 0, 4, 0, 5, 6,
802 7, 0, 0, 0, 8, 9, 10, 11, 12, 0,
803 13, 14, 0, 15, 16, 0, 17, 18, 19, 20,
804 21, 0, 22, 23, 24, 25, 26, 0, 0, 27
807 static const short yycheck
[] =
809 5, 44, 45, 46, 0, 35, 95, 37, 29, 94,
810 76, 16, 84, 18, 212, 77, 94, 200, 210, 104,
811 144, 195, 26, 57, 37, 38, 48, 150, 37, 13,
812 37, 86, 75, 99, 77, 26, 210, 99, 88, 82,
813 26, 82, 77, 86, 40, 50, 88, 88, 48, 111,
814 93, 44, 37, 26, 109, 82, 96, 87, 88, 37,
815 145, 88, 105, 90, 107, 108, 109, 60, 6, 7,
816 113, 114, 115, 37, 79, 75, 200, 37, 37, 72,
817 89, 103, 274, 96, 84, 89, 86, 83, 89, 96,
818 111, 82, 3, 4, 5, 219, 82, 88, 86, 90,
819 274, 144, 88, 103, 77, 105, 91, 107, 108, 109,
820 94, 89, 340, 113, 114, 115, 239, 202, 203, 107,
821 108, 109, 92, 81, 82, 113, 114, 115, 39, 89,
822 215, 86, 26, 218, 92, 259, 95, 215, 172, 322,
823 206, 26, 92, 371, 144, 337, 92, 86, 233, 81,
824 82, 37, 107, 108, 109, 37, 144, 200, 113, 114,
825 115, 335, 390, 337, 287, 37, 196, 365, 107, 108,
826 109, 37, 168, 401, 113, 114, 115, 88, 208, 90,
827 185, 409, 410, 411, 189, 38, 39, 27, 28, 144,
828 220, 89, 77, 44, 279, 423, 44, 82, 283, 37,
829 200, 429, 430, 88, 289, 144, 291, 89, 293, 60,
830 135, 289, 200, 108, 344, 293, 38, 89, 113, 114,
831 115, 72, 37, 89, 313, 150, 77, 270, 89, 88,
832 273, 90, 88, 81, 82, 38, 44, 90, 323, 88,
833 325, 89, 88, 373, 316, 200, 35, 332, 314, 10,
834 11, 375, 60, 377, 378, 317, 32, 65, 8, 9,
835 265, 200, 38, 39, 72, 44, 271, 43, 25, 77,
836 195, 314, 36, 278, 317, 360, 319, 407, 408, 322,
837 12, 60, 406, 33, 34, 210, 65, 31, 32, 89,
838 92, 421, 422, 72, 38, 39, 317, 26, 88, 43,
839 107, 108, 31, 32, 82, 394, 113, 114, 115, 91,
840 91, 400, 342, 88, 239, 90, 316, 242, 95, 315,
841 245, 95, 322, 93, 89, 250, 95, 37, 253, 254,
842 255, 256, 257, 258, 322, 89, 37, 37, 89, 91,
843 93, 37, 385, 89, 92, 37, 95, 4, 5, 274,
844 88, 96, 88, 96, 88, 88, 361, 96, 401, 73,
845 95, 89, 287, 89, 95, 95, 89, 322, 25, 26,
846 27, 28, 29, 30, 89, 380, 95, 89, 96, 96,
847 91, 88, 49, 322, 14, 15, 16, 17, 18, 19,
848 20, 21, 22, 23, 93, 0, 89, 0, 96, 96,
849 89, 96, 96, 37, 279, 147, 242, 64, 38, 250,
850 335, 245, 337, 255, 253, 258, 93, 254, 109, 4,
851 5, 256, 79, 80, 257, 82, 83, 84, 85, 86,
852 87, 88, 360, 317, 196, 316, 359, 315, 206, 96,
853 25, 26, 27, 28, 29, 30, 168, 314, 325, 379,
854 40, 214, -1, -1, -1, 40, 41, 42, 43, 44,
855 45, 46, 47, 48, 291, 50, 51, 52, 53, 54,
856 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
857 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
858 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
859 85, 86, 87, 88, 4, 5, -1, 92, 93, -1,
860 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
861 -1, -1, -1, -1, -1, 25, 26, 27, 28, 29,
862 30, -1, -1, -1, -1, -1, -1, -1, -1, -1,
863 40, 41, 42, 43, 44, 45, 46, 47, 48, -1,
864 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
865 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
866 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
867 80, 81, 82, 83, 84, 85, 86, 87, 88, 4,
868 5, -1, 92, 93, -1, -1, -1, -1, -1, -1,
869 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
870 25, 26, 27, 28, 29, 30, -1, -1, -1, -1,
871 -1, -1, -1, -1, -1, -1, 41, 42, -1, -1,
872 45, 46, 47, -1, -1, -1, -1, -1, 53, 54,
873 55, -1, -1, -1, -1, -1, 61, -1, -1, 64,
874 -1, -1, 67, -1, -1, -1, -1, -1, 73, 4,
875 5, -1, 77, -1, 79, 80, 81, 82, 83, 84,
876 85, 86, 87, 88, -1, -1, -1, 92, -1, -1,
877 25, 26, 27, 28, 29, 30, -1, -1, -1, -1,
878 -1, -1, -1, -1, -1, -1, 41, 42, -1, -1,
879 45, 46, 47, -1, -1, -1, -1, -1, 53, 54,
880 55, -1, -1, -1, -1, -1, 61, -1, -1, 64,
881 -1, -1, 67, -1, -1, -1, -1, -1, 73, 4,
882 5, -1, -1, -1, 79, 80, 81, 82, 83, 84,
883 85, 86, 87, 88, -1, -1, -1, 92, -1, -1,
884 25, 26, 27, 28, 29, 30, 4, 5, -1, -1,
885 -1, -1, -1, -1, 39, -1, -1, -1, -1, -1,
886 4, 5, -1, -1, -1, -1, -1, 25, 26, 27,
887 28, 29, 30, -1, -1, -1, -1, -1, -1, 64,
888 -1, 25, 26, 27, 28, 29, 30, -1, -1, -1,
889 -1, -1, -1, -1, 79, 80, -1, 82, 83, 84,
890 85, 86, 87, 88, -1, 90, 64, 92, -1, -1,
891 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
892 64, 79, 80, -1, 82, 83, 84, 85, 86, 87,
893 88, 4, 5, -1, 92, 79, 80, -1, 82, 83,
894 84, 85, 86, 87, 88, -1, -1, -1, 92, -1,
895 -1, -1, 25, 26, 27, 28, 29, 30, -1, -1,
896 -1, -1, -1, -1, -1, -1, -1, 40, -1, -1,
897 43, 44, -1, -1, -1, 48, -1, 50, 51, 52,
898 -1, -1, -1, 56, 57, 58, 59, 60, -1, 62,
899 63, 64, 65, 66, -1, 68, 69, 70, 71, 72,
900 -1, 74, 75, 76, 77, 78, 79, 80, 81, 82,
901 83, 84, 85, 86, 87, 88, 4, 5, -1, -1,
902 -1, -1, -1, -1, -1, -1, 4, 5, -1, -1,
903 -1, -1, -1, -1, -1, -1, -1, 25, 26, 27,
904 28, 29, 30, 4, 5, -1, -1, 25, 26, 27,
905 28, 29, 30, -1, -1, -1, -1, -1, -1, -1,
906 -1, -1, -1, -1, 25, 26, 27, 28, 29, 30,
907 -1, -1, -1, -1, -1, -1, 64, -1, -1, -1,
908 -1, -1, -1, -1, -1, -1, 64, -1, -1, -1,
909 -1, 79, 80, -1, 82, 83, 84, 85, 86, 87,
910 88, 79, 80, 64, 82, 83, 84, 85, 86, 87,
911 88, -1, 24, -1, -1, -1, -1, -1, 79, 80,
912 -1, 82, 83, 84, 85, 86, 87, 88, 40, -1,
913 -1, 43, 44, -1, -1, -1, 48, -1, 50, 51,
914 52, -1, -1, -1, 56, 57, 58, 59, 60, -1,
915 62, 63, -1, 65, 66, -1, 68, 69, 70, 71,
916 72, -1, 74, 75, 76, 77, 78, 40, -1, 81,
917 43, 44, -1, -1, -1, 48, -1, 50, 51, 52,
918 -1, -1, -1, 56, 57, 58, 59, 60, -1, 62,
919 63, -1, 65, 66, -1, 68, 69, 70, 71, 72,
920 -1, 74, 75, 76, 77, 78, -1, -1, 81, 40,
921 -1, -1, 43, 44, -1, -1, -1, 48, -1, 50,
922 51, 52, -1, 96, -1, 56, 57, 58, 59, 60,
923 -1, 62, 63, -1, 65, 66, -1, 68, 69, 70,
924 71, 72, -1, 74, 75, 76, 77, 78, 40, -1,
925 81, 43, 44, -1, -1, -1, 48, -1, 50, 51,
926 52, -1, 93, -1, 56, 57, 58, 59, 60, -1,
927 62, 63, -1, 65, 66, -1, 68, 69, 70, 71,
928 72, -1, 74, 75, 76, 77, 78, -1, 40, 81,
929 -1, 43, 44, -1, -1, -1, 48, 89, 50, 51,
930 52, -1, -1, -1, 56, 57, 58, 59, 60, -1,
931 62, 63, -1, 65, 66, -1, 68, 69, 70, 71,
932 72, -1, 74, 75, 76, 77, 78, -1, 40, 81,
933 82, 43, 44, -1, -1, -1, 48, -1, 50, 51,
934 52, -1, -1, -1, 56, 57, 58, 59, 60, -1,
935 62, 63, -1, 65, 66, -1, 68, 69, 70, 71,
936 72, -1, 74, 75, 76, 77, 78, -1, -1, 81
938 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
939 #line 3 "/usr/share/bison/bison.simple"
941 /* Skeleton output parser for bison,
943 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
946 This program is free software; you can redistribute it and/or modify
947 it under the terms of the GNU General Public License as published by
948 the Free Software Foundation; either version 2, or (at your option)
951 This program is distributed in the hope that it will be useful,
952 but WITHOUT ANY WARRANTY; without even the implied warranty of
953 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
954 GNU General Public License for more details.
956 You should have received a copy of the GNU General Public License
957 along with this program; if not, write to the Free Software
958 Foundation, Inc., 59 Temple Place - Suite 330,
959 Boston, MA 02111-1307, USA. */
961 /* As a special exception, when this file is copied by Bison into a
962 Bison output file, you may use that output file without restriction.
963 This special exception was added by the Free Software Foundation
964 in version 1.24 of Bison. */
966 /* This is the parser code that is written into each bison parser when
967 the %semantic_parser declaration is not specified in the grammar.
968 It was written by Richard Stallman by simplifying the hairy parser
969 used when %semantic_parser is specified. */
971 /* All symbols defined below should begin with yy or YY, to avoid
972 infringing on user name space. This should be done even for local
973 variables, as they might otherwise be expanded by user macros.
974 There are some unavoidable exceptions within include files to
975 define necessary library symbols; they are noted "INFRINGES ON
976 USER NAME SPACE" below. */
978 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
980 /* The parser invokes alloca or malloc; define the necessary symbols. */
982 # if YYSTACK_USE_ALLOCA
983 # define YYSTACK_ALLOC alloca
985 # ifndef YYSTACK_USE_ALLOCA
986 # if defined (alloca) || defined (_ALLOCA_H)
987 # define YYSTACK_ALLOC alloca
990 # define YYSTACK_ALLOC __builtin_alloca
996 # ifdef YYSTACK_ALLOC
997 /* Pacify GCC's `empty if-body' warning. */
998 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
1000 # if defined (__STDC__) || defined (__cplusplus)
1001 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
1002 # define YYSIZE_T size_t
1004 # define YYSTACK_ALLOC malloc
1005 # define YYSTACK_FREE free
1007 #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
1010 #if (! defined (yyoverflow) \
1011 && (! defined (__cplusplus) \
1012 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
1014 /* A type that is properly aligned for any stack member. */
1024 /* The size of the maximum gap between one aligned stack and the next. */
1025 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
1027 /* The size of an array large to enough to hold all stacks, each with
1030 # define YYSTACK_BYTES(N) \
1031 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
1032 + 2 * YYSTACK_GAP_MAX)
1034 # define YYSTACK_BYTES(N) \
1035 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
1039 /* Copy COUNT objects from FROM to TO. The source and destination do
1043 # define YYCOPY(To, From, Count) \
1044 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
1046 # define YYCOPY(To, From, Count) \
1049 register YYSIZE_T yyi; \
1050 for (yyi = 0; yyi < (Count); yyi++) \
1051 (To)[yyi] = (From)[yyi]; \
1057 /* Relocate STACK from its old location to the new one. The
1058 local variables YYSIZE and YYSTACKSIZE give the old and new number of
1059 elements in the stack, and YYPTR gives the new location of the
1060 stack. Advance YYPTR to a properly aligned location for the next
1062 # define YYSTACK_RELOCATE(Stack) \
1065 YYSIZE_T yynewbytes; \
1066 YYCOPY (&yyptr->Stack, Stack, yysize); \
1067 Stack = &yyptr->Stack; \
1068 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
1069 yyptr += yynewbytes / sizeof (*yyptr); \
1076 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
1077 # define YYSIZE_T __SIZE_TYPE__
1079 #if ! defined (YYSIZE_T) && defined (size_t)
1080 # define YYSIZE_T size_t
1082 #if ! defined (YYSIZE_T)
1083 # if defined (__STDC__) || defined (__cplusplus)
1084 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
1085 # define YYSIZE_T size_t
1088 #if ! defined (YYSIZE_T)
1089 # define YYSIZE_T unsigned int
1092 #define yyerrok (yyerrstatus = 0)
1093 #define yyclearin (yychar = YYEMPTY)
1096 #define YYACCEPT goto yyacceptlab
1097 #define YYABORT goto yyabortlab
1098 #define YYERROR goto yyerrlab1
1099 /* Like YYERROR except do call yyerror. This remains here temporarily
1100 to ease the transition to the new meaning of YYERROR, for GCC.
1101 Once GCC version 2 has supplanted version 1, this can go. */
1102 #define YYFAIL goto yyerrlab
1103 #define YYRECOVERING() (!!yyerrstatus)
1104 #define YYBACKUP(Token, Value) \
1106 if (yychar == YYEMPTY && yylen == 1) \
1110 yychar1 = YYTRANSLATE (yychar); \
1116 yyerror ("syntax error: cannot back up"); \
1122 #define YYERRCODE 256
1125 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
1128 When YYLLOC_DEFAULT is run, CURRENT is set the location of the
1129 first token. By default, to implement support for ranges, extend
1130 its range to the last symbol. */
1132 #ifndef YYLLOC_DEFAULT
1133 # define YYLLOC_DEFAULT(Current, Rhs, N) \
1134 Current.last_line = Rhs[N].last_line; \
1135 Current.last_column = Rhs[N].last_column;
1139 /* YYLEX -- calling `yylex' with the right arguments. */
1144 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
1146 # define YYLEX yylex (&yylval, &yylloc)
1148 # else /* !YYLSP_NEEDED */
1150 # define YYLEX yylex (&yylval, YYLEX_PARAM)
1152 # define YYLEX yylex (&yylval)
1154 # endif /* !YYLSP_NEEDED */
1156 # define YYLEX yylex ()
1157 #endif /* !YYPURE */
1160 /* Enable debugging if requested. */
1164 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1165 # define YYFPRINTF fprintf
1168 # define YYDPRINTF(Args) \
1173 /* Nonzero means print parse trace. It is left uninitialized so that
1174 multiple parsers can coexist. */
1176 #else /* !YYDEBUG */
1177 # define YYDPRINTF(Args)
1178 #endif /* !YYDEBUG */
1180 /* YYINITDEPTH -- initial size of the parser's stacks. */
1182 # define YYINITDEPTH 200
1185 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1186 if the built-in stack extension method is used).
1188 Do not make this value too large; the results are undefined if
1189 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
1190 evaluated with infinite-precision integer arithmetic. */
1197 # define YYMAXDEPTH 10000
1200 #ifdef YYERROR_VERBOSE
1203 # if defined (__GLIBC__) && defined (_STRING_H)
1204 # define yystrlen strlen
1206 /* Return the length of YYSTR. */
1208 # if defined (__STDC__) || defined (__cplusplus)
1209 yystrlen (const char *yystr
)
1215 register const char *yys
= yystr
;
1217 while (*yys
++ != '\0')
1220 return yys
- yystr
- 1;
1226 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1227 # define yystpcpy stpcpy
1229 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1232 # if defined (__STDC__) || defined (__cplusplus)
1233 yystpcpy (char *yydest
, const char *yysrc
)
1235 yystpcpy (yydest
, yysrc
)
1240 register char *yyd
= yydest
;
1241 register const char *yys
= yysrc
;
1243 while ((*yyd
++ = *yys
++) != '\0')
1252 #line 315 "/usr/share/bison/bison.simple"
1255 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
1256 into yyparse. The argument should have type void *.
1257 It should actually point to an object.
1258 Grammar actions can access the variable by casting it
1259 to the proper pointer type. */
1261 #ifdef YYPARSE_PARAM
1262 # if defined (__STDC__) || defined (__cplusplus)
1263 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
1264 # define YYPARSE_PARAM_DECL
1266 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
1267 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
1269 #else /* !YYPARSE_PARAM */
1270 # define YYPARSE_PARAM_ARG
1271 # define YYPARSE_PARAM_DECL
1272 #endif /* !YYPARSE_PARAM */
1274 /* Prevent warning if -Wstrict-prototypes. */
1276 # ifdef YYPARSE_PARAM
1277 int yyparse (void *);
1283 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
1284 variables are global, or local to YYPARSE. */
1286 #define YY_DECL_NON_LSP_VARIABLES \
1287 /* The lookahead symbol. */ \
1290 /* The semantic value of the lookahead symbol. */ \
1293 /* Number of parse errors so far. */ \
1297 # define YY_DECL_VARIABLES \
1298 YY_DECL_NON_LSP_VARIABLES \
1300 /* Location data for the lookahead symbol. */ \
1303 # define YY_DECL_VARIABLES \
1304 YY_DECL_NON_LSP_VARIABLES
1308 /* If nonreentrant, generate the variables here. */
1312 #endif /* !YYPURE */
1315 yyparse (YYPARSE_PARAM_ARG
)
1318 /* If reentrant, generate the variables here. */
1321 #endif /* !YYPURE */
1323 register int yystate
;
1326 /* Number of tokens to shift before error messages enabled. */
1328 /* Lookahead token as an internal (translated) token number. */
1331 /* Three stacks and their tools:
1332 `yyss': related to states,
1333 `yyvs': related to semantic values,
1334 `yyls': related to locations.
1336 Refer to the stacks thru separate pointers, to allow yyoverflow
1337 to reallocate them elsewhere. */
1339 /* The state stack. */
1340 short yyssa
[YYINITDEPTH
];
1341 short *yyss
= yyssa
;
1342 register short *yyssp
;
1344 /* The semantic value stack. */
1345 YYSTYPE yyvsa
[YYINITDEPTH
];
1346 YYSTYPE
*yyvs
= yyvsa
;
1347 register YYSTYPE
*yyvsp
;
1350 /* The location stack. */
1351 YYLTYPE yylsa
[YYINITDEPTH
];
1352 YYLTYPE
*yyls
= yylsa
;
1357 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
1359 # define YYPOPSTACK (yyvsp--, yyssp--)
1362 YYSIZE_T yystacksize
= YYINITDEPTH
;
1365 /* The variables used to return semantic value and location from the
1372 /* When reducing, the number of symbols on the RHS of the reduced
1376 YYDPRINTF ((stderr
, "Starting parse\n"));
1381 yychar
= YYEMPTY
; /* Cause a token to be read. */
1383 /* Initialize stack pointers.
1384 Waste one element of value and location stack
1385 so that they stay on the same level as the state stack.
1386 The wasted elements are never initialized. */
1395 /*------------------------------------------------------------.
1396 | yynewstate -- Push a new state, which is found in yystate. |
1397 `------------------------------------------------------------*/
1399 /* In all cases, when you get here, the value and location stacks
1400 have just been pushed. so pushing a state here evens the stacks.
1407 if (yyssp
>= yyss
+ yystacksize
- 1)
1409 /* Get the current used size of the three stacks, in elements. */
1410 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1414 /* Give user a chance to reallocate the stack. Use copies of
1415 these so that the &'s don't force the real ones into
1417 YYSTYPE
*yyvs1
= yyvs
;
1418 short *yyss1
= yyss
;
1420 /* Each stack pointer address is followed by the size of the
1421 data in use in that stack, in bytes. */
1423 YYLTYPE
*yyls1
= yyls
;
1424 /* This used to be a conditional around just the two extra args,
1425 but that might be undefined if yyoverflow is a macro. */
1426 yyoverflow ("parser stack overflow",
1427 &yyss1
, yysize
* sizeof (*yyssp
),
1428 &yyvs1
, yysize
* sizeof (*yyvsp
),
1429 &yyls1
, yysize
* sizeof (*yylsp
),
1433 yyoverflow ("parser stack overflow",
1434 &yyss1
, yysize
* sizeof (*yyssp
),
1435 &yyvs1
, yysize
* sizeof (*yyvsp
),
1441 #else /* no yyoverflow */
1442 # ifndef YYSTACK_RELOCATE
1445 /* Extend the stack our own way. */
1446 if (yystacksize
>= YYMAXDEPTH
)
1449 if (yystacksize
> YYMAXDEPTH
)
1450 yystacksize
= YYMAXDEPTH
;
1453 short *yyss1
= yyss
;
1454 union yyalloc
*yyptr
=
1455 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1458 YYSTACK_RELOCATE (yyss
);
1459 YYSTACK_RELOCATE (yyvs
);
1461 YYSTACK_RELOCATE (yyls
);
1463 # undef YYSTACK_RELOCATE
1465 YYSTACK_FREE (yyss1
);
1468 #endif /* no yyoverflow */
1470 yyssp
= yyss
+ yysize
- 1;
1471 yyvsp
= yyvs
+ yysize
- 1;
1473 yylsp
= yyls
+ yysize
- 1;
1476 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1477 (unsigned long int) yystacksize
));
1479 if (yyssp
>= yyss
+ yystacksize
- 1)
1483 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1493 /* Do appropriate processing given the current state. */
1494 /* Read a lookahead token if we need one and don't already have one. */
1497 /* First try to decide what to do without reference to lookahead token. */
1499 yyn
= yypact
[yystate
];
1503 /* Not known => get a lookahead token if don't already have one. */
1505 /* yychar is either YYEMPTY or YYEOF
1506 or a valid token in external form. */
1508 if (yychar
== YYEMPTY
)
1510 YYDPRINTF ((stderr
, "Reading a token: "));
1514 /* Convert token to internal form (in yychar1) for indexing tables with */
1516 if (yychar
<= 0) /* This means end of input. */
1519 yychar
= YYEOF
; /* Don't call YYLEX any more */
1521 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1525 yychar1
= YYTRANSLATE (yychar
);
1528 /* We have to keep this `#if YYDEBUG', since we use variables
1529 which are defined only if `YYDEBUG' is set. */
1532 YYFPRINTF (stderr
, "Next token is %d (%s",
1533 yychar
, yytname
[yychar1
]);
1534 /* Give the individual parser a way to print the precise
1535 meaning of a token, for further debugging info. */
1537 YYPRINT (stderr
, yychar
, yylval
);
1539 YYFPRINTF (stderr
, ")\n");
1545 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != yychar1
)
1550 /* yyn is what to do for this token type in this state.
1551 Negative => reduce, -yyn is rule number.
1552 Positive => shift, yyn is new state.
1553 New state is final state => don't bother to shift,
1554 just return success.
1555 0, or most negative number => error. */
1570 /* Shift the lookahead token. */
1571 YYDPRINTF ((stderr
, "Shifting token %d (%s), ",
1572 yychar
, yytname
[yychar1
]));
1574 /* Discard the token being shifted unless it is eof. */
1575 if (yychar
!= YYEOF
)
1583 /* Count tokens shifted since error; after three, turn off error
1592 /*-----------------------------------------------------------.
1593 | yydefault -- do the default action for the current state. |
1594 `-----------------------------------------------------------*/
1596 yyn
= yydefact
[yystate
];
1602 /*-----------------------------.
1603 | yyreduce -- Do a reduction. |
1604 `-----------------------------*/
1606 /* yyn is the number of a rule to reduce with. */
1609 /* If YYLEN is nonzero, implement the default value of the action:
1612 Otherwise, the following line sets YYVAL to the semantic value of
1613 the lookahead token. This behavior is undocumented and Bison
1614 users should not rely upon it. Assigning to YYVAL
1615 unconditionally makes the parser a bit smaller, and it avoids a
1616 GCC warning that YYVAL may be used uninitialized. */
1617 yyval
= yyvsp
[1-yylen
];
1620 /* Similarly for the default location. Let the user run additional
1621 commands if for instance locations are ranges. */
1622 yyloc
= yylsp
[1-yylen
];
1623 YYLLOC_DEFAULT (yyloc
, (yylsp
- yylen
), yylen
);
1627 /* We have to keep this `#if YYDEBUG', since we use variables which
1628 are defined only if `YYDEBUG' is set. */
1633 YYFPRINTF (stderr
, "Reducing via rule %d (line %d), ",
1636 /* Print the symbols being reduced, and their result. */
1637 for (yyi
= yyprhs
[yyn
]; yyrhs
[yyi
] > 0; yyi
++)
1638 YYFPRINTF (stderr
, "%s ", yytname
[yyrhs
[yyi
]]);
1639 YYFPRINTF (stderr
, " -> %s\n", yytname
[yyr1
[yyn
]]);
1646 #line 327 "c-parse.y"
1648 translation_unit
= yyvsp
[0].external_declaration_list
->first
;
1652 #line 340 "c-parse.y"
1654 yyval
.name
.name
= 0;
1655 yyval
.name
.declarator
= 0;
1659 #line 349 "c-parse.y"
1661 struct declarator
*d
;
1662 yyval
.expression
= expr(ex_id
, &yylsp
[0]);
1663 yyval
.expression
->u
.name
= yyvsp
[0].name
.name
;
1664 d
= yyvsp
[0].name
.declarator
;
1666 inputerror(&yylsp
[0], "undeclared identifier '%s'", yyvsp
[0].name
.name
);
1667 } else if(d
->declaration_specifiers
1668 && (d
->declaration_specifiers
->storage_class_specifiers
1670 inputerror(&yylsp
[0], "typedef-name '%s' used in expression", yyvsp
[0].name
);
1672 yyval
.expression
->valuetype
= resolve_typedefs(d
);
1676 #line 363 "c-parse.y"
1678 yyval
.expression
= expr(ex_number
, &yylsp
[0]);
1679 yyval
.expression
->u
.constant
= yyvsp
[0].s
;
1680 yyval
.expression
->valuetype
= numbertype(yyval
.expression
);
1684 #line 368 "c-parse.y"
1686 yyval
.expression
= stringexpr(ex_char
, yyvsp
[0].s
, &yylsp
[0]);
1690 #line 371 "c-parse.y"
1692 yyval
.expression
= stringexpr(ex_string
, yyvsp
[0].s
, &yylsp
[0]);
1696 #line 374 "c-parse.y"
1698 yyval
.expression
= stringexpr(ex_wchar
, yyvsp
[0].s
, &yylsp
[0]);
1702 #line 377 "c-parse.y"
1704 yyval
.expression
= stringexpr(ex_wstring
, yyvsp
[0].s
, &yylsp
[0]);
1708 #line 380 "c-parse.y"
1710 yyval
.expression
= paren(yyvsp
[-1].expression
, &yylsp
[-2]);
1714 #line 387 "c-parse.y"
1716 yyval
.expression
= binary('[', yyvsp
[-3].expression
, yyvsp
[-1].expression
, &yylsp
[-2]);
1720 #line 390 "c-parse.y"
1722 yyval
.expression
= fncallexpr(yyvsp
[-3].expression
, yyvsp
[-1].expression_list
, &yylsp
[-2]);
1726 #line 393 "c-parse.y"
1728 yyval
.expression
= expr(ex_gcc_va_arg
, &yylsp
[-4]);
1729 yyval
.expression
->u
.gcc_va_arg
.arg
= yyvsp
[-3].expression
;
1730 yyval
.expression
->u
.gcc_va_arg
.type
= yyvsp
[-1].declaration
;
1731 yyval
.expression
->valuetype
= resolve_typedefs(yyvsp
[-1].declaration
->declarator_list
);
1735 #line 399 "c-parse.y"
1737 /* we can't hack this in as a function as the return type is that of
1738 * the LH argument */
1739 yyval
.expression
= expr(ex_gcc_expect
, &yylsp
[-5]);
1740 /* XXX does the LH arg undergo any implicit conversions? */
1741 yyval
.expression
->u
.binary
.l
= yyvsp
[-3].expression
;
1742 yyval
.expression
->u
.binary
.r
= yyvsp
[-1].expression
;
1743 yyval
.expression
->valuetype
= yyvsp
[-3].expression
->valuetype
;
1747 #line 408 "c-parse.y"
1749 struct expression
*e
= expr(ex_id
, &yylsp
[-1]);
1750 e
->u
.name
= yyvsp
[0].name
.name
;
1751 yyval
.expression
= binary(yyvsp
[-1].i
, yyvsp
[-2].expression
, e
, &yylsp
[-1]);
1755 #line 413 "c-parse.y"
1757 yyval
.expression
= postfix(yyvsp
[0].i
, yyvsp
[-1].expression
, &yylsp
[0]);
1761 #line 416 "c-parse.y"
1763 yyval
.expression
= expr(ex_compound_literal
, &yylsp
[-6]);
1764 yyval
.expression
->u
.compound_literal
.type
= yyvsp
[-5].declaration
;
1765 yyval
.expression
->u
.compound_literal
.value
= yyvsp
[-2].initializer_list
->first
;
1766 declaration_constraints(yyvsp
[-5].declaration
, dc_compound_literal
);
1767 yyval
.expression
->valuetype
= resolve_typedefs(yyvsp
[-5].declaration
->declarator_list
);
1771 #line 430 "c-parse.y"
1773 NEW(yyval
.parsing_expression_list
);
1774 NEW(yyval
.parsing_expression_list
->first
);
1775 yyval
.parsing_expression_list
->first
->e
= yyvsp
[0].expression
;
1776 yyval
.parsing_expression_list
->end
= &yyval
.parsing_expression_list
->first
->next
;
1780 #line 436 "c-parse.y"
1782 struct expression_list
*e
;
1784 e
->e
= yyvsp
[0].expression
;
1785 *(yyval
.parsing_expression_list
= yyvsp
[-2].parsing_expression_list
)->end
= e
;
1786 yyval
.parsing_expression_list
->end
= &e
->next
;
1790 #line 446 "c-parse.y"
1791 { yyval
.expression_list
= yyvsp
[0].parsing_expression_list
->first
; }
1794 #line 447 "c-parse.y"
1795 { yyval
.expression_list
= 0; }
1798 #line 452 "c-parse.y"
1800 yyval
.expression
= prefix(yyvsp
[-1].i
, yyvsp
[0].expression
, &yylsp
[-1]);
1804 #line 455 "c-parse.y"
1806 yyval
.expression
= prefix(SIZEOF
, yyvsp
[0].expression
, &yylsp
[-1]);
1810 #line 458 "c-parse.y"
1812 yyval
.expression
= expr(ex_sizeof_type
, &yylsp
[-3]);
1813 yyval
.expression
->u
.type
= yyvsp
[-1].declaration
;
1814 declaration_constraints(yyvsp
[-1].declaration
, dc_sizeof
);
1818 #line 478 "c-parse.y"
1820 yyval
.expression
= expr(ex_cast
, &yylsp
[-3]);
1821 yyval
.expression
->valuetype
= yyvsp
[-2].declaration
->declarator_list
;
1822 yyval
.expression
->u
.cast
= yyvsp
[0].expression
;
1823 declaration_constraints(yyvsp
[-2].declaration
, dc_cast
);
1827 #line 488 "c-parse.y"
1829 yyval
.expression
= binary(yyvsp
[-1].i
, yyvsp
[-2].expression
, yyvsp
[0].expression
, &yylsp
[-1]);
1833 #line 501 "c-parse.y"
1835 yyval
.expression
= binary(yyvsp
[-1].i
, yyvsp
[-2].expression
, yyvsp
[0].expression
, &yylsp
[-1]);
1839 #line 513 "c-parse.y"
1841 yyval
.expression
= binary(yyvsp
[-1].i
, yyvsp
[-2].expression
, yyvsp
[0].expression
, &yylsp
[-1]);
1845 #line 525 "c-parse.y"
1847 yyval
.expression
= binary(yyvsp
[-1].i
, yyvsp
[-2].expression
, yyvsp
[0].expression
, &yylsp
[-1]);
1851 #line 539 "c-parse.y"
1853 yyval
.expression
= binary(yyvsp
[-1].i
, yyvsp
[-2].expression
, yyvsp
[0].expression
, &yylsp
[-1]);
1857 #line 551 "c-parse.y"
1859 yyval
.expression
= binary(yyvsp
[-1].i
, yyvsp
[-2].expression
, yyvsp
[0].expression
, &yylsp
[-1]);
1863 #line 558 "c-parse.y"
1865 yyval
.expression
= binary(yyvsp
[-1].i
, yyvsp
[-2].expression
, yyvsp
[0].expression
, &yylsp
[-1]);
1869 #line 565 "c-parse.y"
1871 yyval
.expression
= binary(yyvsp
[-1].i
, yyvsp
[-2].expression
, yyvsp
[0].expression
, &yylsp
[-1]);
1875 #line 572 "c-parse.y"
1877 yyval
.expression
= binary(yyvsp
[-1].i
, yyvsp
[-2].expression
, yyvsp
[0].expression
, &yylsp
[-1]);
1881 #line 579 "c-parse.y"
1883 yyval
.expression
= binary(yyvsp
[-1].i
, yyvsp
[-2].expression
, yyvsp
[0].expression
, &yylsp
[-1]);
1887 #line 586 "c-parse.y"
1889 yyval
.expression
= binary('?', yyvsp
[-4].expression
, binary(':', yyvsp
[-2].expression
, yyvsp
[0].expression
, &yylsp
[-1]), &yylsp
[-3]);
1893 #line 593 "c-parse.y"
1895 yyval
.expression
= binary(yyvsp
[-1].i
, yyvsp
[-2].expression
, yyvsp
[0].expression
, &yylsp
[-1]);
1899 #line 614 "c-parse.y"
1901 yyval
.expression
= binary(yyvsp
[-1].i
, yyvsp
[-2].expression
, yyvsp
[0].expression
, &yylsp
[-1]);
1905 #line 621 "c-parse.y"
1906 { yyval
.expression
= 0; }
1909 #line 631 "c-parse.y"
1911 struct declaration_specifiers
*ds
= yyvsp
[-2].declaration_specifiers
;
1912 struct declarator
*decl
= yyvsp
[-1].declarator
;
1914 check_top_declaration_specifier(ds
);
1915 pop_declaration_specifiers();
1916 /* will have already done add_declarator() */
1917 NEW(yyval
.declaration
);
1918 yyval
.declaration
->declaration_specifiers
= ds
;
1919 yyval
.declaration
->declarator_list
= decl
;
1920 yyval
.declaration
->where
= yylsp
[-2];
1921 /* constraints checked by calling production */
1925 #line 647 "c-parse.y"
1927 push_declaration_specifiers(yyvsp
[0].declaration_specifiers
);
1928 yyval
.declaration_specifiers
= yyvsp
[0].declaration_specifiers
;
1932 #line 654 "c-parse.y"
1934 struct declaration_specifiers ds
= {
1935 .type_specifiers
= 0,
1936 .storage_class_specifiers
= yyvsp
[-1].u
,
1937 .type_qualifiers
= 0,
1938 .function_specifiers
= 0,
1943 .enum_compat_type
= 0
1945 yyval
.declaration_specifiers
= merge_declaration_specifiers(yyvsp
[0].declaration_specifiers
, &ds
);
1949 #line 668 "c-parse.y"
1951 yyval
.declaration_specifiers
= merge_declaration_specifiers(yyvsp
[0].declaration_specifiers
, yyvsp
[-1].declaration_specifiers
);
1955 #line 671 "c-parse.y"
1957 struct declaration_specifiers ds
= {
1958 .type_specifiers
= 0,
1959 .storage_class_specifiers
= 0,
1960 .type_qualifiers
= yyvsp
[-1].u
,
1961 .function_specifiers
= 0,
1966 .enum_compat_type
= 0
1968 yyval
.declaration_specifiers
= merge_declaration_specifiers(yyvsp
[0].declaration_specifiers
, &ds
);
1972 #line 685 "c-parse.y"
1974 struct declaration_specifiers ds
= {
1975 .type_specifiers
= 0,
1976 .storage_class_specifiers
= 0,
1977 .type_qualifiers
= 0,
1978 .function_specifiers
= yyvsp
[-1].u
,
1983 .enum_compat_type
= 0
1985 yyval
.declaration_specifiers
= merge_declaration_specifiers(yyvsp
[0].declaration_specifiers
, &ds
);
1989 #line 699 "c-parse.y"
1991 yyval
.declaration_specifiers
= yyvsp
[0].declaration_specifiers
;
1995 #line 706 "c-parse.y"
1997 NEW(yyval
.declaration_specifiers
);
2001 #line 712 "c-parse.y"
2002 { yyval
.declarator
= yyvsp
[0].declarator_list
->first
; }
2005 #line 713 "c-parse.y"
2006 { yyval
.declarator
= 0; }
2009 #line 717 "c-parse.y"
2011 NEW(yyval
.declarator_list
);
2012 yyval
.declarator_list
->first
= yyvsp
[0].declarator
;
2013 yyval
.declarator_list
->end
= &yyvsp
[0].declarator
->next
;
2017 #line 722 "c-parse.y"
2019 yyval
.declarator_list
= yyvsp
[-3].declarator_list
;
2020 *yyval
.declarator_list
->end
= yyvsp
[0].declarator
;
2021 yyval
.declarator_list
->end
= &yyvsp
[0].declarator
->next
;
2025 #line 730 "c-parse.y"
2026 { yyval
.declarator
= get_declarator(yyvsp
[-1].declarator_parse
, &yylsp
[-1]); }
2029 #line 734 "c-parse.y"
2031 add_declaration(yyval
.declarator
= yyvsp
[0].declarator
);
2035 #line 737 "c-parse.y"
2037 /* need to do this before we parse the initializer */
2038 add_declaration(yyvsp
[-1].declarator
);
2042 #line 740 "c-parse.y"
2044 yyval
.declarator
= yyvsp
[-3].declarator
;
2045 yyval
.declarator
->initializer
= yyvsp
[0].initializer
;
2049 #line 759 "c-parse.y"
2051 NEW(yyval
.declaration_specifiers
);
2052 yyval
.declaration_specifiers
->type_specifiers
= yyvsp
[0].u
;
2056 #line 763 "c-parse.y"
2057 { yyval
.declaration_specifiers
= yyvsp
[0].declaration_specifiers
; }
2060 #line 765 "c-parse.y"
2062 NEW(yyval
.declaration_specifiers
);
2063 yyval
.declaration_specifiers
->type_specifiers
= TS_TYPEDEF
;
2064 yyval
.declaration_specifiers
->name
= yyvsp
[0].name
.name
;
2065 yyval
.declaration_specifiers
->type
= yyvsp
[0].name
.declarator
;
2069 #line 798 "c-parse.y"
2071 NEW(yyval
.declaration_specifiers
);
2072 yyval
.declaration_specifiers
->type_specifiers
= yyvsp
[-5].u
| TS_DEFINITION
;
2073 yyval
.declaration_specifiers
->name
= yyvsp
[-4].name
.name
;
2074 yyval
.declaration_specifiers
->structure
= yyvsp
[-2].declaration_list
->first
;
2078 #line 804 "c-parse.y"
2080 NEW(yyval
.declaration_specifiers
);
2081 yyval
.declaration_specifiers
->type_specifiers
= yyvsp
[-1].u
;
2082 yyval
.declaration_specifiers
->name
= yyvsp
[0].name
.name
;
2086 #line 809 "c-parse.y"
2087 { /* shift/reduce conflict */
2088 inputerror(&yylsp
[0], "structure must have a tag or a definition");
2089 NEW(yyval
.declaration_specifiers
);
2090 yyval
.declaration_specifiers
->type_specifiers
= yyvsp
[0].u
;
2094 #line 817 "c-parse.y"
2095 { yyval
.u
= yyvsp
[-1].u
; }
2098 #line 818 "c-parse.y"
2099 { yyval
.u
= yyvsp
[-1].u
; }
2102 #line 822 "c-parse.y"
2104 NEW(yyval
.declaration_list
);
2105 yyval
.declaration_list
->first
= yyvsp
[0].declaration
;
2106 yyval
.declaration_list
->end
= &yyvsp
[0].declaration
->next
;
2110 #line 827 "c-parse.y"
2112 yyval
.declaration_list
= yyvsp
[-1].declaration_list
;
2113 *yyval
.declaration_list
->end
= yyvsp
[0].declaration
;
2114 yyval
.declaration_list
->end
= &yyvsp
[0].declaration
->next
;
2118 #line 835 "c-parse.y"
2120 check_top_declaration_specifier(yyvsp
[-2].declaration_specifiers
);
2121 pop_declaration_specifiers();
2122 NEW(yyval
.declaration
);
2123 yyval
.declaration
->declaration_specifiers
= yyvsp
[-2].declaration_specifiers
;
2124 yyval
.declaration
->declarator_list
= yyvsp
[-1].declarator_list
->first
;
2125 declaration_constraints(yyval
.declaration
, dc_struct_member
);
2126 /* XXX perhaps add to a dictionary of struct/union declarations? */
2127 yyval
.declaration
->where
= yylsp
[-2];
2131 #line 848 "c-parse.y"
2133 push_declaration_specifiers(yyvsp
[0].declaration_specifiers
);
2134 yyval
.declaration_specifiers
= yyvsp
[0].declaration_specifiers
;
2138 #line 855 "c-parse.y"
2140 yyval
.declaration_specifiers
= merge_declaration_specifiers(yyvsp
[0].declaration_specifiers
, yyvsp
[-1].declaration_specifiers
);
2144 #line 858 "c-parse.y"
2146 struct declaration_specifiers ds
= {
2147 .type_specifiers
= 0,
2148 .storage_class_specifiers
= 0,
2149 .type_qualifiers
= yyvsp
[-1].u
,
2150 .function_specifiers
= 0,
2155 .enum_compat_type
= 0
2157 yyval
.declaration_specifiers
= merge_declaration_specifiers(yyvsp
[0].declaration_specifiers
, &ds
);
2161 #line 872 "c-parse.y"
2163 inputerror(&yylsp
[-1], "storage class specifiers not allowed here");
2164 yyval
.declaration_specifiers
= yyvsp
[0].declaration_specifiers
;
2168 #line 876 "c-parse.y"
2170 inputerror(&yylsp
[-1], "function specifiers not allowed here");
2171 yyval
.declaration_specifiers
= yyvsp
[0].declaration_specifiers
;
2175 #line 880 "c-parse.y"
2177 yyval
.declaration_specifiers
= yyvsp
[0].declaration_specifiers
;
2181 #line 887 "c-parse.y"
2183 NEW(yyval
.declaration_specifiers
);
2187 #line 893 "c-parse.y"
2189 NEW(yyval
.declarator_list
);
2190 yyval
.declarator_list
->first
= yyvsp
[-1].declarator
;
2191 yyval
.declarator_list
->end
= &yyvsp
[-1].declarator
->next
;
2195 #line 898 "c-parse.y"
2197 yyval
.declarator_list
= yyvsp
[-4].declarator_list
;
2198 *yyval
.declarator_list
->end
= yyvsp
[-1].declarator
;
2199 yyval
.declarator_list
->end
= &yyvsp
[-1].declarator
->next
;
2203 #line 907 "c-parse.y"
2205 if(!(yyval
.declarator
= yyvsp
[-2].declarator
)) {
2206 NEW(yyval
.declarator
);
2207 yyval
.declarator
->declaration_specifiers
= top_declaration_specifiers();
2209 yyval
.declarator
->bits
= yyvsp
[0].expression
;
2210 yyval
.declarator
->where
= yylsp
[-1];
2214 #line 920 "c-parse.y"
2216 NEW(yyval
.declaration_specifiers
);
2217 yyval
.declaration_specifiers
->type_specifiers
= TS_ENUM
| TS_DEFINITION
;
2218 yyval
.declaration_specifiers
->name
= yyvsp
[-5].name
.name
;
2219 yyval
.declaration_specifiers
->enumerators
= yyvsp
[-3].enumerator_list
->first
;
2220 yyval
.declaration_specifiers
->enum_compat_type
= TS_INT
; /* XXX */
2222 inputwarning(&yylsp
[-2], warn_compat
,
2223 "enumerator-list trailing comma not supported in C89 or C++");
2224 /* XXX pick type and fix up the declarators of all the enumerators */
2228 #line 931 "c-parse.y"
2230 NEW(yyval
.declaration_specifiers
);
2231 yyval
.declaration_specifiers
->type_specifiers
= TS_ENUM
;
2232 yyval
.declaration_specifiers
->name
= yyvsp
[0].name
.name
;
2236 #line 943 "c-parse.y"
2238 NEW(yyval
.enumerator_list
);
2239 yyval
.enumerator_list
->first
= yyvsp
[0].enumerator
;
2240 yyval
.enumerator_list
->end
= &yyvsp
[0].enumerator
->next
;
2244 #line 948 "c-parse.y"
2246 *(yyval
.enumerator_list
= yyvsp
[-2].enumerator_list
)->end
= yyvsp
[0].enumerator
;
2247 yyval
.enumerator_list
->end
= &yyvsp
[0].enumerator
->next
;
2251 #line 955 "c-parse.y"
2253 struct declarator
*d
;
2255 d
->name
= yyvsp
[0].enumerator
->name
;
2256 d
->where
= yyval
.enumerator
->where
;
2257 NEW(d
->declaration_specifiers
);
2258 d
->declaration_specifiers
->type_specifiers
= TS_INT
;
2260 yyval
.enumerator
= yyvsp
[0].enumerator
;
2261 yyval
.enumerator
->declarator
= d
;
2265 #line 969 "c-parse.y"
2267 NEW(yyval
.enumerator
);
2268 yyval
.enumerator
->name
= yyvsp
[0].name
.name
;
2269 yyval
.enumerator
->where
= yylsp
[0];
2273 #line 974 "c-parse.y"
2275 NEW(yyval
.enumerator
);
2276 yyval
.enumerator
->name
= yyvsp
[-2].name
.name
;
2277 yyval
.enumerator
->value
= yyvsp
[0].expression
;
2278 yyval
.enumerator
->where
= yylsp
[-2];
2282 #line 999 "c-parse.y"
2283 { yyval
.declarator
= get_declarator(yyvsp
[0].declarator_parse
, &yylsp
[0]); }
2286 #line 1000 "c-parse.y"
2287 { yyval
.declarator
= 0; }
2290 #line 1004 "c-parse.y"
2292 yyval
.declarator_parse
= yyvsp
[0].declarator_parse
;
2293 *yyval
.declarator_parse
->end
= yyvsp
[-1].declarator_parse
->first
;
2294 yyval
.declarator_parse
->end
= yyvsp
[-1].declarator_parse
->end
;
2298 #line 1013 "c-parse.y"
2300 NEW(yyval
.declarator_parse
);
2301 yyval
.declarator_parse
->end
= &yyval
.declarator_parse
->first
;
2302 yyval
.declarator_parse
->name
= yyvsp
[0].name
.name
;
2303 /* XXX warn about redeclaration */
2307 #line 1019 "c-parse.y"
2309 yyval
.declarator_parse
= yyvsp
[-1].declarator_parse
;
2313 #line 1022 "c-parse.y"
2315 struct declarator_type
*t
;
2318 yyval
.declarator_parse
= yyvsp
[-4].declarator_parse
;
2320 t
->type_qualifiers
= yyvsp
[-2].declaration_specifiers
->type_qualifiers
;
2321 t
->storage_class_specifiers
= yyvsp
[-2].declaration_specifiers
->storage_class_specifiers
;
2322 if(yyvsp
[-1].expression
== &expr_star
) {
2323 t
->u
.array
.size
= 0;
2324 t
->u
.array
.flags
= AF_STAR
;
2326 t
->u
.array
.size
= yyvsp
[-1].expression
;
2327 t
->where
= yylsp
[-3];
2328 *yyval
.declarator_parse
->end
= t
;
2329 yyval
.declarator_parse
->end
= &t
->next
;
2333 #line 1039 "c-parse.y"
2335 struct declarator_type
*t
;
2338 yyval
.declarator_parse
= yyvsp
[-3].declarator_parse
;
2339 t
->type
= dt_old_function
;
2340 t
->u
.old_function
.args
= yyvsp
[-1].identifier_list
;
2341 t
->where
= yylsp
[-2];
2342 *yyval
.declarator_parse
->end
= t
;
2343 yyval
.declarator_parse
->end
= &t
->next
;
2344 warn_old_style_function(&yylsp
[-2]);
2348 #line 1051 "c-parse.y"
2350 struct declarator_type
*t
;
2353 yyval
.declarator_parse
= yyvsp
[-4].declarator_parse
;
2354 t
->type
= dt_function
;
2355 t
->u
.function
.args
= yyvsp
[-2].declaration_list
->first
;
2356 t
->u
.function
.variadic
= yyvsp
[-1].i
;
2357 t
->where
= yylsp
[-3];
2358 *yyval
.declarator_parse
->end
= t
;
2359 yyval
.declarator_parse
->end
= &t
->next
;
2363 #line 1067 "c-parse.y"
2364 { yyval
.expression
= &expr_star
; }
2367 #line 1068 "c-parse.y"
2368 { yyval
.expression
= 0; }
2371 #line 1072 "c-parse.y"
2373 NEW(yyval
.declaration_specifiers
);
2377 #line 1075 "c-parse.y"
2379 NEW(yyval
.declaration_specifiers
);
2380 yyval
.declaration_specifiers
->type_qualifiers
= yyvsp
[0].u
;
2381 yyval
.declaration_specifiers
->storage_class_specifiers
= SCS_STATIC
;
2385 #line 1080 "c-parse.y"
2387 NEW(yyval
.declaration_specifiers
);
2388 yyval
.declaration_specifiers
->type_qualifiers
= yyvsp
[-1].u
;
2389 yyval
.declaration_specifiers
->storage_class_specifiers
= SCS_STATIC
;
2393 #line 1088 "c-parse.y"
2397 #line 1089 "c-parse.y"
2401 #line 1095 "c-parse.y"
2403 NEW(yyval
.declarator_parse
);
2404 yyval
.declarator_parse
->end
= &yyval
.declarator_parse
->first
;
2408 #line 1102 "c-parse.y"
2410 struct declarator_type
*t
;
2413 t
->type
= dt_pointer
;
2414 t
->type_qualifiers
= yyvsp
[0].u
;
2415 t
->where
= yylsp
[-1];
2416 NEW(yyval
.declarator_parse
);
2417 yyval
.declarator_parse
->first
= t
;
2418 yyval
.declarator_parse
->end
= &t
->next
;
2422 #line 1113 "c-parse.y"
2424 struct declarator_type
*t
;
2427 t
->type
= dt_pointer
;
2428 t
->type_qualifiers
= yyvsp
[-1].u
;
2429 t
->where
= yylsp
[-2];
2430 yyval
.declarator_parse
= yyvsp
[0].declarator_parse
;
2431 *yyval
.declarator_parse
->end
= t
;
2432 yyval
.declarator_parse
->end
= &t
->next
;
2436 #line 1128 "c-parse.y"
2437 { yyval
.u
= yyvsp
[-1].u
| yyvsp
[0].u
; }
2440 #line 1134 "c-parse.y"
2444 #line 1138 "c-parse.y"
2446 NEW(yyval
.declaration_list
);
2447 yyval
.declaration_list
->first
= yyvsp
[0].declaration
;
2448 yyval
.declaration_list
->end
= &yyvsp
[0].declaration
->next
;
2452 #line 1143 "c-parse.y"
2454 *yyval
.declaration_list
->end
= yyvsp
[0].declaration
;
2455 yyval
.declaration_list
->end
= &yyvsp
[0].declaration
->next
;
2459 #line 1150 "c-parse.y"
2461 yyval
.declaration_specifiers
= yyvsp
[0].declaration_specifiers
;
2465 #line 1158 "c-parse.y"
2467 struct declarator
*d
= get_declarator(yyvsp
[0].declarator_parse
, &yylsp
[0]);
2468 check_top_declaration_specifier(yyvsp
[-1].declaration_specifiers
);
2469 pop_declaration_specifiers();
2470 NEW(yyval
.declaration
);
2471 yyval
.declaration
->declaration_specifiers
= yyvsp
[-1].declaration_specifiers
;
2472 yyval
.declaration
->declarator_list
= d
;
2473 yyval
.declaration
->where
= yylsp
[-1];
2477 #line 1167 "c-parse.y"
2479 struct declarator
*d
= get_declarator(yyvsp
[0].declarator_parse
, yyvsp
[0].declarator_parse
->first ?
&yylsp
[0] : &yylsp
[-1]);
2480 check_top_declaration_specifier(yyvsp
[-1].declaration_specifiers
);
2481 pop_declaration_specifiers();
2482 NEW(yyval
.declaration
);
2483 yyval
.declaration
->declaration_specifiers
= yyvsp
[-1].declaration_specifiers
;
2484 yyval
.declaration
->declarator_list
= d
;
2485 yyval
.declaration
->where
= yylsp
[-1];
2489 #line 1183 "c-parse.y"
2490 { yyval
.identifier_list
= yyvsp
[0].identifier_list_parse
->first
; }
2493 #line 1184 "c-parse.y"
2494 { yyval
.identifier_list
= 0; }
2497 #line 1188 "c-parse.y"
2499 struct identifier_list
*i
;
2502 i
->id
= yyvsp
[0].name
.name
;
2503 /* XXX warn about redeclaration */
2504 NEW(yyval
.identifier_list_parse
);
2505 yyval
.identifier_list_parse
->first
= i
;
2506 yyval
.identifier_list_parse
->end
= &i
->next
;
2510 #line 1198 "c-parse.y"
2512 struct identifier_list
*i
;
2515 i
->id
= yyvsp
[0].name
.name
;
2516 /* XXX warn about redeclaration */
2517 *(yyval
.identifier_list_parse
= yyvsp
[-2].identifier_list_parse
)->end
= i
;
2518 yyval
.identifier_list_parse
->end
= &i
->next
;
2522 #line 1212 "c-parse.y"
2524 struct declarator
*d
= get_declarator(yyvsp
[0].declarator_parse
, yyvsp
[0].declarator_parse
->first ?
&yylsp
[0] : &yylsp
[-1]);
2525 check_top_declaration_specifier(yyvsp
[-1].declaration_specifiers
);
2526 pop_declaration_specifiers();
2527 NEW(yyval
.declaration
);
2528 yyval
.declaration
->declaration_specifiers
= yyvsp
[-1].declaration_specifiers
;
2529 yyval
.declaration
->declarator_list
= d
;
2530 yyval
.declaration
->where
= yylsp
[-1];
2531 /* declaration_constraints checked by calling production */
2535 #line 1225 "c-parse.y"
2537 yyval
.declarator_parse
= yyvsp
[-1].declarator_parse
;
2541 #line 1228 "c-parse.y"
2543 struct declarator_type
*t
;
2546 yyval
.declarator_parse
= yyvsp
[-4].declarator_parse
;
2548 t
->type_qualifiers
= yyvsp
[-2].declaration_specifiers
->type_qualifiers
;
2549 t
->storage_class_specifiers
= yyvsp
[-2].declaration_specifiers
->storage_class_specifiers
;
2550 if(yyvsp
[-1].expression
== &expr_star
) {
2551 t
->u
.array
.size
= 0;
2552 t
->u
.array
.flags
= AF_STAR
;
2554 t
->u
.array
.size
= yyvsp
[-1].expression
;
2555 t
->where
= yylsp
[-3];
2556 *yyval
.declarator_parse
->end
= t
;
2557 yyval
.declarator_parse
->end
= &t
->next
;
2561 #line 1245 "c-parse.y"
2563 struct declarator_type
*t
;
2566 yyval
.declarator_parse
= yyvsp
[-2].declarator_parse
;
2567 t
->type
= dt_old_function
;
2568 t
->u
.old_function
.args
= 0;
2569 t
->where
= yylsp
[-1];
2570 *yyval
.declarator_parse
->end
= t
;
2571 yyval
.declarator_parse
->end
= &t
->next
;
2572 warn_old_style_function(&yylsp
[-1]);
2576 #line 1257 "c-parse.y"
2578 struct declarator_type
*t
;
2581 yyval
.declarator_parse
= yyvsp
[-4].declarator_parse
;
2582 t
->type
= dt_function
;
2583 t
->u
.function
.args
= yyvsp
[-2].declaration_list
->first
;
2584 t
->u
.function
.variadic
= yyvsp
[-1].i
;
2585 t
->where
= yylsp
[-3];
2586 *yyval
.declarator_parse
->end
= t
;
2587 yyval
.declarator_parse
->end
= &t
->next
;
2591 #line 1273 "c-parse.y"
2593 NEW(yyval
.declarator_parse
);
2594 yyval
.declarator_parse
->end
= &yyval
.declarator_parse
->first
;
2595 yyloc
= (struct location
){path
, line
};
2599 #line 1282 "c-parse.y"
2601 NEW(yyval
.declarator_parse
);
2602 yyval
.declarator_parse
->end
= &yyval
.declarator_parse
->first
;
2603 yyloc
= (struct location
){path
, line
};
2607 #line 1291 "c-parse.y"
2609 yyval
.declarator_parse
= yyvsp
[0].declarator_parse
;
2610 *yyval
.declarator_parse
->end
= yyvsp
[-1].declarator_parse
->first
;
2611 yyval
.declarator_parse
->end
= yyvsp
[-1].declarator_parse
->end
;
2615 #line 1301 "c-parse.y"
2617 NEW(yyval
.initializer
);
2618 yyval
.initializer
->type
= in_expr
;
2619 yyval
.initializer
->u
.expr
= yyvsp
[0].expression
;
2623 #line 1306 "c-parse.y"
2625 NEW(yyval
.initializer
);
2626 yyval
.initializer
->type
= in_list
;
2627 yyval
.initializer
->u
.list
= yyvsp
[-2].initializer_list
->first
;
2631 #line 1314 "c-parse.y"
2635 #line 1315 "c-parse.y"
2639 #line 1319 "c-parse.y"
2641 NEW(yyval
.initializer_list
);
2642 yyval
.initializer_list
->first
= yyvsp
[0].initializer
;
2643 yyval
.initializer_list
->end
= &yyvsp
[0].initializer
->next
;
2647 #line 1324 "c-parse.y"
2649 *(yyval
.initializer_list
= yyvsp
[-2].initializer_list
)->end
= yyvsp
[0].initializer
;
2650 yyval
.initializer_list
->end
= &yyvsp
[0].initializer
->next
;
2654 #line 1331 "c-parse.y"
2656 (yyval
.initializer
= yyvsp
[0].initializer
)->designator
= yyvsp
[-2].designator_list
->first
;
2657 yyval
.initializer
->syntax
= des_c99
;
2661 #line 1335 "c-parse.y"
2663 (yyval
.initializer
= yyvsp
[0].initializer
)->designator
= yyvsp
[-1].designator
;
2664 yyval
.initializer
->syntax
= des_gcc_raw
;
2665 inputwarning(&yylsp
[-1], warn_compat
,
2666 "non-portable GNU C initializer designator");
2670 #line 1341 "c-parse.y"
2672 struct designator
*d
;
2675 d
->type
= des_field
;
2676 d
->u
.name
= yyvsp
[-2].name
.name
;
2677 d
->where
= yylsp
[-2];
2678 (yyval
.initializer
= yyvsp
[0].initializer
)->designator
= d
;
2679 yyval
.initializer
->syntax
= des_gcc_colon
;
2680 inputwarning(&yylsp
[-2], warn_compat
,
2681 "non-portable GNU C initializer designator");
2685 #line 1357 "c-parse.y"
2687 NEW(yyval
.designator_list
);
2688 yyval
.designator_list
->first
= yyvsp
[0].designator
;
2689 yyval
.designator_list
->end
= &yyvsp
[0].designator
->next
;
2693 #line 1362 "c-parse.y"
2695 *(yyval
.designator_list
= yyvsp
[-1].designator_list
)->end
= yyvsp
[0].designator
;
2696 yyval
.designator_list
->end
= &yyvsp
[0].designator
->next
;
2700 #line 1369 "c-parse.y"
2702 NEW(yyval
.designator
);
2703 yyval
.designator
->type
= des_expr
;
2704 yyval
.designator
->u
.expr
= yyvsp
[-1].expression
;
2705 yyval
.designator
->where
= yylsp
[-2];
2709 #line 1375 "c-parse.y"
2711 NEW(yyval
.designator
);
2712 yyval
.designator
->type
= des_field
;
2713 yyval
.designator
->u
.name
= yyvsp
[0].name
.name
;
2714 yyval
.designator
->where
= yylsp
[-1];
2718 #line 1386 "c-parse.y"
2720 NEW(yyval
.statement
);
2721 yyval
.statement
->type
= st_label
;
2722 yyval
.statement
->u
.label
.label
= yyvsp
[-3].name
.name
;
2723 /* XXX warn about redeclaration */
2724 yyval
.statement
->u
.label
.body
= yyvsp
[0].statement
;
2725 yyval
.statement
->where
= yylsp
[-3];
2729 #line 1394 "c-parse.y"
2731 NEW(yyval
.statement
);
2732 yyval
.statement
->type
= st_case
;
2733 yyval
.statement
->u
.case_
.value
= yyvsp
[-2].expression
;
2734 yyval
.statement
->u
.case_
.body
= yyvsp
[0].statement
;
2735 yyval
.statement
->where
= yylsp
[-3];
2739 #line 1401 "c-parse.y"
2741 NEW(yyval
.statement
);
2742 yyval
.statement
->type
= st_default
;
2743 yyval
.statement
->u
.default_
= yyvsp
[0].statement
;
2744 yyval
.statement
->where
= yylsp
[-2];
2748 #line 1407 "c-parse.y"
2750 NEW(yyval
.statement
);
2751 yyval
.statement
->type
= st_if
;
2752 yyval
.statement
->u
.if_
.cond
= yyvsp
[-3].expression
;
2753 yyval
.statement
->u
.if_
.true = yyvsp
[-1].statement
;
2754 yyval
.statement
->u
.if_
.false = yyvsp
[0].statement
;
2755 yyval
.statement
->where
= yylsp
[-5];
2759 #line 1415 "c-parse.y"
2761 NEW(yyval
.statement
);
2762 yyval
.statement
->type
= st_switch
;
2763 yyval
.statement
->u
.switch_
.cond
= yyvsp
[-2].expression
;
2764 yyval
.statement
->u
.switch_
.body
= yyvsp
[0].statement
;
2765 yyval
.statement
->where
= yylsp
[-4];
2769 #line 1422 "c-parse.y"
2771 NEW(yyval
.statement
);
2772 yyval
.statement
->type
= st_expression
;
2773 yyval
.statement
->u
.expression
= yyvsp
[-1].expression
;
2774 yyval
.statement
->where
= yyvsp
[-1].expression ? yylsp
[-1] : yylsp
[0];
2778 #line 1428 "c-parse.y"
2780 NEW(yyval
.statement
);
2781 yyval
.statement
->type
= st_while
;
2782 yyval
.statement
->u
.while_
.cond
= yyvsp
[-2].expression
;
2783 yyval
.statement
->u
.while_
.body
= yyvsp
[0].statement
;
2784 yyval
.statement
->where
= yylsp
[-4];
2788 #line 1435 "c-parse.y"
2790 NEW(yyval
.statement
);
2791 yyval
.statement
->type
= st_do
;
2792 yyval
.statement
->u
.while_
.cond
= yyvsp
[-2].expression
;
2793 yyval
.statement
->u
.while_
.body
= yyvsp
[-5].statement
;
2794 yyval
.statement
->where
= yylsp
[-6];
2798 #line 1444 "c-parse.y"
2800 NEW(yyval
.statement
);
2801 yyval
.statement
->type
= st_for
;
2802 yyval
.statement
->u
.for_
.init
= yyvsp
[-6].expression
;
2803 yyval
.statement
->u
.for_
.cond
= yyvsp
[-4].expression
;
2804 yyval
.statement
->u
.for_
.iter
= yyvsp
[-2].expression
;
2805 yyval
.statement
->u
.for_
.body
= yyvsp
[0].statement
;
2806 yyval
.statement
->where
= yylsp
[-8];
2810 #line 1454 "c-parse.y"
2814 #line 1457 "c-parse.y"
2816 NEW(yyval
.statement
);
2817 yyval
.statement
->type
= st_for_declaration
;
2818 yyval
.statement
->u
.for_declaration
.init
= yyvsp
[-5].declaration
;
2819 yyval
.statement
->u
.for_declaration
.cond
= yyvsp
[-4].expression
;
2820 yyval
.statement
->u
.for_declaration
.iter
= yyvsp
[-2].expression
;
2821 yyval
.statement
->u
.for_declaration
.body
= yyvsp
[0].statement
;
2822 yyval
.statement
->where
= yylsp
[-8];
2827 #line 1467 "c-parse.y"
2829 NEW(yyval
.statement
);
2830 yyval
.statement
->type
= st_goto
;
2831 yyval
.statement
->u
.goto_
= yyvsp
[-1].name
.name
;
2832 yyval
.statement
->where
= yylsp
[-2];
2836 #line 1473 "c-parse.y"
2838 NEW(yyval
.statement
);
2839 yyval
.statement
->type
= st_continue
;
2840 yyval
.statement
->where
= yylsp
[-1];
2844 #line 1478 "c-parse.y"
2846 NEW(yyval
.statement
);
2847 yyval
.statement
->type
= st_break
;
2848 yyval
.statement
->where
= yylsp
[-1];
2852 #line 1483 "c-parse.y"
2854 NEW(yyval
.statement
);
2855 yyval
.statement
->type
= st_return
;
2856 yyval
.statement
->u
.expression
= yyvsp
[-1].expression
;
2857 yyval
.statement
->where
= yylsp
[-2];
2861 #line 1489 "c-parse.y"
2865 #line 1489 "c-parse.y"
2867 NEW(yyval
.statement
);
2868 yyval
.statement
->type
= st_compound
;
2869 yyval
.statement
->u
.compound
.body
= yyvsp
[-1].statement_list
->first
;
2870 yyval
.statement
->where
= yylsp
[-3];
2871 yyval
.statement
->u
.compound
.endwhere
= yylsp
[0];
2872 /*$$->u.compound.scope = scope;*/
2877 #line 1502 "c-parse.y"
2879 NEW(yyval
.statement
);
2880 yyval
.statement
->type
= st_compound
;
2881 yyval
.statement
->u
.compound
.body
= yyvsp
[-1].statement_list
->first
;
2882 yyval
.statement
->where
= yylsp
[-2];
2883 yyval
.statement
->u
.compound
.endwhere
= yylsp
[0];
2884 /*$$->u.compound.scope = scope;*/
2888 #line 1513 "c-parse.y"
2890 *(yyval
.statement_list
= yyvsp
[-1].statement_list
)->end
= yyvsp
[0].statement
;
2891 yyval
.statement_list
->end
= &yyvsp
[0].statement
->next
;
2895 #line 1517 "c-parse.y"
2897 NEW(yyval
.statement_list
);
2898 yyval
.statement_list
->end
= &yyval
.statement_list
->first
;
2902 #line 1524 "c-parse.y"
2904 NEW(yyval
.statement
);
2905 yyval
.statement
->type
= st_declaration
;
2906 yyval
.statement
->u
.declaration
= yyvsp
[0].declaration
;
2907 yyval
.statement
->where
= yylsp
[0];
2908 declaration_constraints(yyvsp
[0].declaration
, dc_block_scope
);
2912 #line 1536 "c-parse.y"
2913 { yyval
.statement
= yyvsp
[0].statement
; }
2916 #line 1537 "c-parse.y"
2917 { yyval
.statement
= 0; }
2920 #line 1543 "c-parse.y"
2922 NEW(yyval
.external_declaration_list
);
2923 translation_unit
= yyval
.external_declaration_list
->first
= yyvsp
[0].external_declaration
;
2924 yyval
.external_declaration_list
->end
= &yyvsp
[0].external_declaration
->next
;
2928 #line 1548 "c-parse.y"
2930 yyval
.external_declaration_list
= yyvsp
[-1].external_declaration_list
;
2931 *yyval
.external_declaration_list
->end
= yyvsp
[0].external_declaration
;
2932 yyval
.external_declaration_list
->end
= &yyvsp
[0].external_declaration
->next
;
2936 #line 1553 "c-parse.y"
2938 inputerror(&yylsp
[0], "redundant semicolon at top level");
2942 #line 1559 "c-parse.y"
2944 NEW(yyval
.external_declaration
);
2945 yyval
.external_declaration
->type
= ed_declaration
;
2946 yyval
.external_declaration
->u
.declaration
= yyvsp
[0].declaration
;
2947 declaration_constraints(yyvsp
[0].declaration
, dc_file_scope
);
2951 #line 1565 "c-parse.y"
2953 NEW(yyval
.external_declaration
);
2954 yyval
.external_declaration
->type
= ed_function_definition
;
2955 yyval
.external_declaration
->u
.function_definition
= yyvsp
[0].function_definition
;
2956 /* constraints checked in function_definition (i.e. before errors
2957 * from the function body) */
2961 #line 1577 "c-parse.y"
2963 check_top_declaration_specifier(yyvsp
[-1].declaration_specifiers
);
2964 pop_declaration_specifiers();
2965 declarator_constraints(yyvsp
[-1].declaration_specifiers
, yyvsp
[0].declarator
, dc_function_definition
, 0);
2966 NEW(yyval
.declaration
);
2967 yyval
.declaration
->declaration_specifiers
= yyvsp
[-1].declaration_specifiers
;
2968 yyval
.declaration
->declarator_list
= yyvsp
[0].declarator
;
2969 yyval
.declaration
->where
= yylsp
[-1];
2970 add_declaration(yyvsp
[0].declarator
);
2973 struct declarator
*d
;
2975 NEW(d
->declaration_specifiers
);
2976 NEW(d
->declarator_type
);
2977 d
->name
= xstrdup("__PRETTY_FUNCTION__");
2978 d
->declaration_specifiers
->type_qualifiers
= TQ_CONST
;
2979 d
->declaration_specifiers
->type_specifiers
= TS_CHAR
;
2980 d
->declarator_type
->type
= dt_pointer
;
2983 /* we had better be in the right scope before parsing the declaration
2984 * list for old style functions */
2988 #line 1600 "c-parse.y"
2990 struct declaration
*decl
;
2991 struct declarator
*d
= 0; /* quieten compiler */
2993 /* inject function args into scope */
2994 if(yyvsp
[-2].declarator
->declarator_type
) switch(yyvsp
[-2].declarator
->declarator_type
->type
) {
2996 if(!is_void_args(yyvsp
[-2].declarator
->declarator_type
)) {
2997 for(decl
= yyvsp
[-2].declarator
->declarator_type
->u
.function
.args
;
2999 decl
= decl
->next
) {
3000 decl
->declarator_list
->flags
|= DF_PARAM
;
3001 add_declaration(decl
->declarator_list
);
3004 if(yyvsp
[0].declaration_list
->first
)
3005 inputerror(&yylsp
[0], "declaration-list not required for new-style function definitions");
3007 case dt_old_function
:
3008 if(yyvsp
[-2].declarator
->declarator_type
->u
.old_function
.args
) {
3009 struct identifier_list
*i
;
3011 for(i
= yyvsp
[-2].declarator
->declarator_type
->u
.old_function
.args
;
3014 for(decl
= yyvsp
[0].declaration_list
->first
;
3017 for(d
= decl
->declarator_list
;
3020 if(!strcmp(d
->name
, i
->id
))
3023 d
->flags
|= DF_PARAM
;
3026 /* default to int */
3029 NEW(d
->declaration_specifiers
);
3030 d
->declaration_specifiers
->type_specifiers
= TS_INT
;
3031 d
->flags
= DF_PARAM
;
3036 /* check that all the identifiers in the list are actually
3038 for(decl
= yyvsp
[0].declaration_list
->first
; decl
; decl
= decl
->next
)
3039 for(d
= decl
->declarator_list
;
3042 struct identifier_list
*i
;
3044 for(i
= yyvsp
[-2].declarator
->declarator_type
->u
.old_function
.args
; i
; i
= i
->next
)
3045 if(!strcmp(d
->name
, i
->id
))
3048 inputerror(&d
->where
, "'%s' is not a parameter", d
->name
);
3052 default: /* quieten compiler */
3058 #line 1666 "c-parse.y"
3060 NEW(yyval
.function_definition
);
3061 yyval
.function_definition
->declaration
= yyvsp
[-3].declaration
;
3062 yyval
.function_definition
->args
= yyvsp
[-2].declaration_list
->first
;
3063 yyval
.function_definition
->body
= yyvsp
[0].statement
;
3068 #line 1676 "c-parse.y"
3070 *(yyval
.declaration_list
= yyvsp
[-1].declaration_list
)->end
= yyvsp
[0].declaration
;
3071 yyval
.declaration_list
->end
= &yyvsp
[0].declaration
->next
;
3075 #line 1680 "c-parse.y"
3077 NEW(yyval
.declaration_list
);
3078 yyval
.declaration_list
->end
= &yyval
.declaration_list
->first
;
3082 #line 1694 "c-parse.y"
3084 static int attr_warning
;
3086 inputwarning(&yylsp
[-5], warn_compat
, "GNU C attributes are ignored");
3090 #line 1707 "c-parse.y"
3094 #line 1708 "c-parse.y"
3098 #line 1710 "c-parse.y"
3099 { suppress_errors(); }
3102 #line 1712 "c-parse.y"
3103 { restore_errors(); }
3106 #line 1713 "c-parse.y"
3111 #line 705 "/usr/share/bison/bison.simple"
3123 short *yyssp1
= yyss
- 1;
3124 YYFPRINTF (stderr
, "state stack now");
3125 while (yyssp1
!= yyssp
)
3126 YYFPRINTF (stderr
, " %d", *++yyssp1
);
3127 YYFPRINTF (stderr
, "\n");
3136 /* Now `shift' the result of the reduction. Determine what state
3137 that goes to, based on the state we popped back to and the rule
3138 number reduced by. */
3142 yystate
= yypgoto
[yyn
- YYNTBASE
] + *yyssp
;
3143 if (yystate
>= 0 && yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
3144 yystate
= yytable
[yystate
];
3146 yystate
= yydefgoto
[yyn
- YYNTBASE
];
3151 /*------------------------------------.
3152 | yyerrlab -- here on detecting error |
3153 `------------------------------------*/
3155 /* If not already recovering from an error, report this error. */
3160 #ifdef YYERROR_VERBOSE
3161 yyn
= yypact
[yystate
];
3163 if (yyn
> YYFLAG
&& yyn
< YYLAST
)
3165 YYSIZE_T yysize
= 0;
3170 /* Start YYX at -YYN if negative to avoid negative indexes in
3172 for (yyx
= yyn
< 0 ?
-yyn
: 0;
3173 yyx
< (int) (sizeof (yytname
) / sizeof (char *)); yyx
++)
3174 if (yycheck
[yyx
+ yyn
] == yyx
)
3175 yysize
+= yystrlen (yytname
[yyx
]) + 15, yycount
++;
3176 yysize
+= yystrlen ("parse error, unexpected ") + 1;
3177 yysize
+= yystrlen (yytname
[YYTRANSLATE (yychar
)]);
3178 yymsg
= (char *) YYSTACK_ALLOC (yysize
);
3181 char *yyp
= yystpcpy (yymsg
, "parse error, unexpected ");
3182 yyp
= yystpcpy (yyp
, yytname
[YYTRANSLATE (yychar
)]);
3187 for (yyx
= yyn
< 0 ?
-yyn
: 0;
3188 yyx
< (int) (sizeof (yytname
) / sizeof (char *));
3190 if (yycheck
[yyx
+ yyn
] == yyx
)
3192 const char *yyq
= ! yycount ?
", expecting " : " or ";
3193 yyp
= yystpcpy (yyp
, yyq
);
3194 yyp
= yystpcpy (yyp
, yytname
[yyx
]);
3199 YYSTACK_FREE (yymsg
);
3202 yyerror ("parse error; also virtual memory exhausted");
3205 #endif /* defined (YYERROR_VERBOSE) */
3206 yyerror ("parse error");
3211 /*--------------------------------------------------.
3212 | yyerrlab1 -- error raised explicitly by an action |
3213 `--------------------------------------------------*/
3215 if (yyerrstatus
== 3)
3217 /* If just tried and failed to reuse lookahead token after an
3218 error, discard it. */
3220 /* return failure if at end of input */
3221 if (yychar
== YYEOF
)
3223 YYDPRINTF ((stderr
, "Discarding token %d (%s).\n",
3224 yychar
, yytname
[yychar1
]));
3228 /* Else will try to reuse lookahead token after shifting the error
3231 yyerrstatus
= 3; /* Each real token shifted decrements this */
3236 /*-------------------------------------------------------------------.
3237 | yyerrdefault -- current state does not do anything special for the |
3239 `-------------------------------------------------------------------*/
3242 /* This is wrong; only states that explicitly want error tokens
3243 should shift them. */
3245 /* If its default is to accept any token, ok. Otherwise pop it. */
3246 yyn
= yydefact
[yystate
];
3252 /*---------------------------------------------------------------.
3253 | yyerrpop -- pop the current state because it cannot handle the |
3255 `---------------------------------------------------------------*/
3268 short *yyssp1
= yyss
- 1;
3269 YYFPRINTF (stderr
, "Error: state stack now");
3270 while (yyssp1
!= yyssp
)
3271 YYFPRINTF (stderr
, " %d", *++yyssp1
);
3272 YYFPRINTF (stderr
, "\n");
3280 yyn
= yypact
[yystate
];
3285 if (yyn
< 0 || yyn
> YYLAST
|| yycheck
[yyn
] != YYTERROR
)
3302 YYDPRINTF ((stderr
, "Shifting error token, "));
3313 /*-------------------------------------.
3314 | yyacceptlab -- YYACCEPT comes here. |
3315 `-------------------------------------*/
3320 /*-----------------------------------.
3321 | yyabortlab -- YYABORT comes here. |
3322 `-----------------------------------*/
3327 /*---------------------------------------------.
3328 | yyoverflowab -- parser overflow comes here. |
3329 `---------------------------------------------*/
3331 yyerror ("parser stack overflow");
3338 YYSTACK_FREE (yyss
);
3342 #line 1716 "c-parse.y"