1 | /* A Bison parser, made by GNU Bison 3.8.2. */
2 |
3 | /* Bison implementation for Yacc-like parsers in C
4 |
5 | Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6 | Inc.
7 |
8 | This program is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | This program is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with this program. If not, see <https://www.gnu.org/licenses/>. */
20 |
21 | /* As a special exception, you may create a larger work that contains
22 | part or all of the Bison parser skeleton and distribute that work
23 | under terms of your choice, so long as that work isn't itself a
24 | parser generator using the skeleton or a modified version thereof
25 | as a parser skeleton. Alternatively, if you modify or redistribute
26 | the parser skeleton itself, you may (at your option) remove this
27 | special exception, which will cause the skeleton and the resulting
28 | Bison output files to be licensed under the GNU General Public
29 | License without this special exception.
30 |
31 | This special exception was added by the Free Software Foundation in
32 | version 2.2 of Bison. */
33 |
34 | /* C LALR(1) parser skeleton written by Richard Stallman, by
35 | simplifying the original so-called "semantic" parser. */
36 |
37 | /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38 | especially those whose name start with YY_ or yy_. They are
39 | private implementation details that can be changed or removed. */
40 |
41 | /* All symbols defined below should begin with yy or YY, to avoid
42 | infringing on user name space. This should be done even for local
43 | variables, as they might otherwise be expanded by user macros.
44 | There are some unavoidable exceptions within include files to
45 | define necessary library symbols; they are noted "INFRINGES ON
46 | USER NAME SPACE" below. */
47 |
48 | /* Identify Bison output, and Bison version. */
49 | #define YYBISON 30802
50 |
51 | /* Bison version string. */
52 | #define YYBISON_VERSION "3.8.2"
53 |
54 | /* Skeleton name. */
55 | #define YYSKELETON_NAME "yacc.c"
56 |
57 | /* Pure parsers. */
58 | #define YYPURE 0
59 |
60 | /* Push parsers. */
61 | #define YYPUSH 0
62 |
63 | /* Pull parsers. */
64 | #define YYPULL 1
65 |
66 |
67 |
68 |
69 | /* First part of user prologue. */
70 | #line 1 "./parse.y"
71 |
72 | /***************************************
73 | C Cross Referencing & Documentation tool. Version 1.6e.
74 |
75 | C parser.
76 | ******************/ /******************
77 | Written by Andrew M. Bishop
78 |
79 | This file Copyright 1995-2013 Andrew M. Bishop
80 | It may be distributed under the GNU Public License, version 2, or
81 | any higher version. See section COPYING of the GNU Public license
82 | for conditions under which this file may be redistributed.
83 | ***************************************/
84 |
85 | #include <string.h>
86 | #include "parse-yy.h"
87 | #include "cxref.h"
88 | #include "memory.h"
89 |
90 | /*+ A structure to hold the information about an object. +*/
91 | typedef struct _stack
92 | {
93 | char *name; /*+ The name of the object. +*/
94 | char *type; /*+ The type of the object. +*/
95 | char *qual; /*+ The type qualifier of the object. +*/
96 | }
97 | stack;
98 |
99 | #define yylex cxref_yylex
100 |
101 | static int cxref_yylex(void);
102 |
103 | static void yyerror(const char *s);
104 |
105 | /*+ When in a header file, some stuff can be skipped over quickly. +*/
106 | extern int in_header;
107 |
108 | /*+ A flag that is set to true when typedef is seen in a statement. +*/
109 | int in_typedef=0;
110 |
111 | /*+ The scope of the function / variable that is being examined. +*/
112 | static int scope;
113 |
114 | /*+ The variable must be LOCAL or EXTERNAL or GLOBAL, so this checks and sets that. +*/
115 | #define SCOPE ( scope&(LOCAL|EXTERNAL|EXTERN_H|EXTERN_F) ? scope : scope|GLOBAL )
116 |
117 | /*+ When in a function or a function definition, the behaviour is different. +*/
118 | static int in_function=0,in_funcdef=0,in_funcbody=0;
119 |
120 | /*+ The parsing stack +*/
121 | static stack first={NULL,NULL,NULL}, /*+ first value. +*/
122 | *list=NULL, /*+ list of all values. +*/
123 | *current=&first; /*+ current values. +*/
124 |
125 | /*+ The depth of the stack +*/
126 | static int depth=0, /*+ currently in use. +*/
127 | maxdepth=0; /*+ total malloced. +*/
128 |
129 | /*+ Declarations that are in the same statement share this comment. +*/
130 | static char* common_comment=NULL;
131 |
132 | /*+ When inside a struct / union / enum definition, this is the depth. +*/
133 | static int in_structunion=0;
134 |
135 | /*+ When inside a struct / union definition, this is the component type. +*/
136 | static char *comp_type=NULL;
137 |
138 | /*+ To solve the problem where a type name is used as an identifier. +*/
139 | static int in_type_spec=0;
140 |
141 |
142 | /*++++++++++++++++++++++++++++++++++++++
143 | Reset the current level on the stack.
144 | ++++++++++++++++++++++++++++++++++++++*/
145 |
146 | static void reset(void)
147 | {
148 | current->name=NULL;
149 | current->type=NULL;
150 | current->qual=NULL;
151 | }
152 |
153 |
154 | /*++++++++++++++++++++++++++++++++++++++
155 | Push a level onto the stack.
156 | ++++++++++++++++++++++++++++++++++++++*/
157 |
158 | static void push(void)
159 | {
160 | if(list==NULL)
161 | {
162 | list=(stack*)Malloc(8*sizeof(struct _stack));
163 | list[0]=first;
164 | maxdepth=8;
165 | }
166 | else if(depth==(maxdepth-1))
167 | {
168 | list=Realloc(list,(maxdepth+8)*sizeof(struct _stack));
169 | maxdepth+=8;
170 | }
171 |
172 | depth++;
173 | current=&list[depth];
174 |
175 | reset();
176 | }
177 |
178 |
179 | /*++++++++++++++++++++++++++++++++++++++
180 | Pop a level from the stack.
181 | ++++++++++++++++++++++++++++++++++++++*/
182 |
183 | static void pop(void)
184 | {
185 | reset();
186 |
187 | depth--;
188 | current=&list[depth];
189 | }
190 |
191 |
192 | /*++++++++++++++++++++++++++++++++++++++
193 | Reset the Parser, ready for the next file.
194 | ++++++++++++++++++++++++++++++++++++++*/
195 |
196 | void ResetParser(void)
197 | {
198 | in_typedef=0;
199 | scope=0;
200 | in_function=0;
201 | in_funcdef=0;
202 | in_funcbody=0;
203 | depth=0;
204 | maxdepth=0;
205 | if(list) Free(list);
206 | list=NULL;
207 | current=&first;
208 | reset();
209 | common_comment=NULL;
210 | in_structunion=0;
211 | comp_type=NULL;
212 | in_type_spec=0;
213 | }
214 |
215 |
216 | #line 217 "y.tab.c"
217 |
218 | # ifndef YY_CAST
219 | # ifdef __cplusplus
220 | # define YY_CAST(Type, Val) static_cast<Type> (Val)
221 | # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
222 | # else
223 | # define YY_CAST(Type, Val) ((Type) (Val))
224 | # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
225 | # endif
226 | # endif
227 | # ifndef YY_NULLPTR
228 | # if defined __cplusplus
229 | # if 201103L <= __cplusplus
230 | # define YY_NULLPTR nullptr
231 | # else
232 | # define YY_NULLPTR 0
233 | # endif
234 | # else
235 | # define YY_NULLPTR ((void*)0)
236 | # endif
237 | # endif
238 |
239 | /* Use api.header.include to #include this header
240 | instead of duplicating it here. */
241 | #ifndef YY_YY_Y_TAB_H_INCLUDED
242 | # define YY_YY_Y_TAB_H_INCLUDED
243 | /* Debug traces. */
244 | #ifndef YYDEBUG
245 | # define YYDEBUG 0
246 | #endif
247 | #if YYDEBUG
248 | extern int yydebug;
249 | #endif
250 |
251 | /* Token kinds. */
252 | #ifndef YYTOKENTYPE
253 | # define YYTOKENTYPE
254 | enum yytokentype
255 | {
256 | YYEMPTY = -2,
257 | YYEOF = 0, /* "end of file" */
258 | YYerror = 256, /* error */
259 | YYUNDEF = 257, /* "invalid token" */
260 | IDENTIFIER = 258, /* IDENTIFIER */
261 | TYPE_NAME = 259, /* TYPE_NAME */
262 | LITERAL = 260, /* LITERAL */
263 | STRING_LITERAL = 261, /* STRING_LITERAL */
264 | ELLIPSES = 262, /* ELLIPSES */
265 | MUL_ASSIGN = 263, /* MUL_ASSIGN */
266 | DIV_ASSIGN = 264, /* DIV_ASSIGN */
267 | MOD_ASSIGN = 265, /* MOD_ASSIGN */
268 | ADD_ASSIGN = 266, /* ADD_ASSIGN */
269 | SUB_ASSIGN = 267, /* SUB_ASSIGN */
270 | LEFT_ASSIGN = 268, /* LEFT_ASSIGN */
271 | RIGHT_ASSIGN = 269, /* RIGHT_ASSIGN */
272 | AND_ASSIGN = 270, /* AND_ASSIGN */
273 | XOR_ASSIGN = 271, /* XOR_ASSIGN */
274 | OR_ASSIGN = 272, /* OR_ASSIGN */
275 | EQ_OP = 273, /* EQ_OP */
276 | NE_OP = 274, /* NE_OP */
277 | PTR_OP = 275, /* PTR_OP */
278 | AND_OP = 276, /* AND_OP */
279 | OR_OP = 277, /* OR_OP */
280 | DEC_OP = 278, /* DEC_OP */
281 | INC_OP = 279, /* INC_OP */
282 | LE_OP = 280, /* LE_OP */
283 | GE_OP = 281, /* GE_OP */
284 | LEFT_SHIFT = 282, /* LEFT_SHIFT */
285 | RIGHT_SHIFT = 283, /* RIGHT_SHIFT */
286 | SIZEOF = 284, /* SIZEOF */
287 | TYPEDEF = 285, /* TYPEDEF */
288 | EXTERN = 286, /* EXTERN */
289 | STATIC = 287, /* STATIC */
290 | AUTO = 288, /* AUTO */
291 | REGISTER = 289, /* REGISTER */
292 | CONST = 290, /* CONST */
293 | VOLATILE = 291, /* VOLATILE */
294 | VOID = 292, /* VOID */
295 | INLINE = 293, /* INLINE */
296 | CHAR = 294, /* CHAR */
297 | SHORT = 295, /* SHORT */
298 | INT = 296, /* INT */
299 | LONG = 297, /* LONG */
300 | SIGNED = 298, /* SIGNED */
301 | UNSIGNED = 299, /* UNSIGNED */
302 | FLOAT = 300, /* FLOAT */
303 | DOUBLE = 301, /* DOUBLE */
304 | BOOL = 302, /* BOOL */
305 | STRUCT = 303, /* STRUCT */
306 | UNION = 304, /* UNION */
307 | ENUM = 305, /* ENUM */
308 | CASE = 306, /* CASE */
309 | DEFAULT = 307, /* DEFAULT */
310 | IF = 308, /* IF */
311 | ELSE = 309, /* ELSE */
312 | SWITCH = 310, /* SWITCH */
313 | WHILE = 311, /* WHILE */
314 | DO = 312, /* DO */
315 | FOR = 313, /* FOR */
316 | GOTO = 314, /* GOTO */
317 | CONTINUE = 315, /* CONTINUE */
318 | BREAK = 316, /* BREAK */
319 | RETURN = 317, /* RETURN */
320 | ASM = 318 /* ASM */
321 | };
322 | typedef enum yytokentype yytoken_kind_t;
323 | #endif
324 | /* Token kinds. */
325 | #define YYEMPTY -2
326 | #define YYEOF 0
327 | #define YYerror 256
328 | #define YYUNDEF 257
329 | #define IDENTIFIER 258
330 | #define TYPE_NAME 259
331 | #define LITERAL 260
332 | #define STRING_LITERAL 261
333 | #define ELLIPSES 262
334 | #define MUL_ASSIGN 263
335 | #define DIV_ASSIGN 264
336 | #define MOD_ASSIGN 265
337 | #define ADD_ASSIGN 266
338 | #define SUB_ASSIGN 267
339 | #define LEFT_ASSIGN 268
340 | #define RIGHT_ASSIGN 269
341 | #define AND_ASSIGN 270
342 | #define XOR_ASSIGN 271
343 | #define OR_ASSIGN 272
344 | #define EQ_OP 273
345 | #define NE_OP 274
346 | #define PTR_OP 275
347 | #define AND_OP 276
348 | #define OR_OP 277
349 | #define DEC_OP 278
350 | #define INC_OP 279
351 | #define LE_OP 280
352 | #define GE_OP 281
353 | #define LEFT_SHIFT 282
354 | #define RIGHT_SHIFT 283
355 | #define SIZEOF 284
356 | #define TYPEDEF 285
357 | #define EXTERN 286
358 | #define STATIC 287
359 | #define AUTO 288
360 | #define REGISTER 289
361 | #define CONST 290
362 | #define VOLATILE 291
363 | #define VOID 292
364 | #define INLINE 293
365 | #define CHAR 294
366 | #define SHORT 295
367 | #define INT 296
368 | #define LONG 297
369 | #define SIGNED 298
370 | #define UNSIGNED 299
371 | #define FLOAT 300
372 | #define DOUBLE 301
373 | #define BOOL 302
374 | #define STRUCT 303
375 | #define UNION 304
376 | #define ENUM 305
377 | #define CASE 306
378 | #define DEFAULT 307
379 | #define IF 308
380 | #define ELSE 309
381 | #define SWITCH 310
382 | #define WHILE 311
383 | #define DO 312
384 | #define FOR 313
385 | #define GOTO 314
386 | #define CONTINUE 315
387 | #define BREAK 316
388 | #define RETURN 317
389 | #define ASM 318
390 |
391 | /* Value type. */
392 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
393 | typedef int YYSTYPE;
394 | # define YYSTYPE_IS_TRIVIAL 1
395 | # define YYSTYPE_IS_DECLARED 1
396 | #endif
397 |
398 |
399 | extern YYSTYPE yylval;
400 |
401 |
402 | int yyparse (void);
403 |
404 |
405 | #endif /* !YY_YY_Y_TAB_H_INCLUDED */
406 | /* Symbol kind. */
407 | enum yysymbol_kind_t
408 | {
409 | YYSYMBOL_YYEMPTY = -2,
410 | YYSYMBOL_YYEOF = 0, /* "end of file" */
411 | YYSYMBOL_YYerror = 1, /* error */
412 | YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
413 | YYSYMBOL_IDENTIFIER = 3, /* IDENTIFIER */
414 | YYSYMBOL_TYPE_NAME = 4, /* TYPE_NAME */
415 | YYSYMBOL_LITERAL = 5, /* LITERAL */
416 | YYSYMBOL_STRING_LITERAL = 6, /* STRING_LITERAL */
417 | YYSYMBOL_ELLIPSES = 7, /* ELLIPSES */
418 | YYSYMBOL_MUL_ASSIGN = 8, /* MUL_ASSIGN */
419 | YYSYMBOL_DIV_ASSIGN = 9, /* DIV_ASSIGN */
420 | YYSYMBOL_MOD_ASSIGN = 10, /* MOD_ASSIGN */
421 | YYSYMBOL_ADD_ASSIGN = 11, /* ADD_ASSIGN */
422 | YYSYMBOL_SUB_ASSIGN = 12, /* SUB_ASSIGN */
423 | YYSYMBOL_LEFT_ASSIGN = 13, /* LEFT_ASSIGN */
424 | YYSYMBOL_RIGHT_ASSIGN = 14, /* RIGHT_ASSIGN */
425 | YYSYMBOL_AND_ASSIGN = 15, /* AND_ASSIGN */
426 | YYSYMBOL_XOR_ASSIGN = 16, /* XOR_ASSIGN */
427 | YYSYMBOL_OR_ASSIGN = 17, /* OR_ASSIGN */
428 | YYSYMBOL_EQ_OP = 18, /* EQ_OP */
429 | YYSYMBOL_NE_OP = 19, /* NE_OP */
430 | YYSYMBOL_PTR_OP = 20, /* PTR_OP */
431 | YYSYMBOL_AND_OP = 21, /* AND_OP */
432 | YYSYMBOL_OR_OP = 22, /* OR_OP */
433 | YYSYMBOL_DEC_OP = 23, /* DEC_OP */
434 | YYSYMBOL_INC_OP = 24, /* INC_OP */
435 | YYSYMBOL_LE_OP = 25, /* LE_OP */
436 | YYSYMBOL_GE_OP = 26, /* GE_OP */
437 | YYSYMBOL_LEFT_SHIFT = 27, /* LEFT_SHIFT */
438 | YYSYMBOL_RIGHT_SHIFT = 28, /* RIGHT_SHIFT */
439 | YYSYMBOL_SIZEOF = 29, /* SIZEOF */
440 | YYSYMBOL_TYPEDEF = 30, /* TYPEDEF */
441 | YYSYMBOL_EXTERN = 31, /* EXTERN */
442 | YYSYMBOL_STATIC = 32, /* STATIC */
443 | YYSYMBOL_AUTO = 33, /* AUTO */
444 | YYSYMBOL_REGISTER = 34, /* REGISTER */
445 | YYSYMBOL_CONST = 35, /* CONST */
446 | YYSYMBOL_VOLATILE = 36, /* VOLATILE */
447 | YYSYMBOL_VOID = 37, /* VOID */
448 | YYSYMBOL_INLINE = 38, /* INLINE */
449 | YYSYMBOL_CHAR = 39, /* CHAR */
450 | YYSYMBOL_SHORT = 40, /* SHORT */
451 | YYSYMBOL_INT = 41, /* INT */
452 | YYSYMBOL_LONG = 42, /* LONG */
453 | YYSYMBOL_SIGNED = 43, /* SIGNED */
454 | YYSYMBOL_UNSIGNED = 44, /* UNSIGNED */
455 | YYSYMBOL_FLOAT = 45, /* FLOAT */
456 | YYSYMBOL_DOUBLE = 46, /* DOUBLE */
457 | YYSYMBOL_BOOL = 47, /* BOOL */
458 | YYSYMBOL_STRUCT = 48, /* STRUCT */
459 | YYSYMBOL_UNION = 49, /* UNION */
460 | YYSYMBOL_ENUM = 50, /* ENUM */
461 | YYSYMBOL_CASE = 51, /* CASE */
462 | YYSYMBOL_DEFAULT = 52, /* DEFAULT */
463 | YYSYMBOL_IF = 53, /* IF */
464 | YYSYMBOL_ELSE = 54, /* ELSE */
465 | YYSYMBOL_SWITCH = 55, /* SWITCH */
466 | YYSYMBOL_WHILE = 56, /* WHILE */
467 | YYSYMBOL_DO = 57, /* DO */
468 | YYSYMBOL_FOR = 58, /* FOR */
469 | YYSYMBOL_GOTO = 59, /* GOTO */
470 | YYSYMBOL_CONTINUE = 60, /* CONTINUE */
471 | YYSYMBOL_BREAK = 61, /* BREAK */
472 | YYSYMBOL_RETURN = 62, /* RETURN */
473 | YYSYMBOL_ASM = 63, /* ASM */
474 | YYSYMBOL_64_ = 64, /* ';' */
475 | YYSYMBOL_65_ = 65, /* ',' */
476 | YYSYMBOL_66_ = 66, /* '=' */
477 | YYSYMBOL_67_ = 67, /* '{' */
478 | YYSYMBOL_68_ = 68, /* '}' */
479 | YYSYMBOL_69_ = 69, /* ':' */
480 | YYSYMBOL_70_ = 70, /* '.' */
481 | YYSYMBOL_71_ = 71, /* '[' */
482 | YYSYMBOL_72_ = 72, /* ']' */
483 | YYSYMBOL_73_ = 73, /* '(' */
484 | YYSYMBOL_74_ = 74, /* ')' */
485 | YYSYMBOL_75_ = 75, /* '*' */
486 | YYSYMBOL_76_ = 76, /* '?' */
487 | YYSYMBOL_77_ = 77, /* '|' */
488 | YYSYMBOL_78_ = 78, /* '^' */
489 | YYSYMBOL_79_ = 79, /* '&' */
490 | YYSYMBOL_80_ = 80, /* '<' */
491 | YYSYMBOL_81_ = 81, /* '>' */
492 | YYSYMBOL_82_ = 82, /* '+' */
493 | YYSYMBOL_83_ = 83, /* '-' */
494 | YYSYMBOL_84_ = 84, /* '/' */
495 | YYSYMBOL_85_ = 85, /* '%' */
496 | YYSYMBOL_86_ = 86, /* '~' */
497 | YYSYMBOL_87_ = 87, /* '!' */
498 | YYSYMBOL_YYACCEPT = 88, /* $accept */
499 | YYSYMBOL_file = 89, /* file */
500 | YYSYMBOL_program = 90, /* program */
501 | YYSYMBOL_top_level_declaration = 91, /* top_level_declaration */
502 | YYSYMBOL_declaration_list = 92, /* declaration_list */
503 | YYSYMBOL_declaration = 93, /* declaration */
504 | YYSYMBOL_declaration_specifiers = 94, /* declaration_specifiers */
505 | YYSYMBOL_declaration_specifiers1 = 95, /* declaration_specifiers1 */
506 | YYSYMBOL_initialized_declarator_list = 96, /* initialized_declarator_list */
507 | YYSYMBOL_97_1 = 97, /* $@1 */
508 | YYSYMBOL_initialized_declarator = 98, /* initialized_declarator */
509 | YYSYMBOL_initialized_declarator1 = 99, /* initialized_declarator1 */
510 | YYSYMBOL_initializer_part = 100, /* initializer_part */
511 | YYSYMBOL_initializer = 101, /* initializer */
512 | YYSYMBOL_struct_initializer_list = 102, /* struct_initializer_list */
513 | YYSYMBOL_named_initializer = 103, /* named_initializer */
514 | YYSYMBOL_designator = 104, /* designator */
515 | YYSYMBOL_designator_list = 105, /* designator_list */
516 | YYSYMBOL_named_initializer_index = 106, /* named_initializer_index */
517 | YYSYMBOL_abstract_declarator = 107, /* abstract_declarator */
518 | YYSYMBOL_direct_abstract_declarator = 108, /* direct_abstract_declarator */
519 | YYSYMBOL_declarator = 109, /* declarator */
520 | YYSYMBOL_pointer = 110, /* pointer */
521 | YYSYMBOL_direct_declarator = 111, /* direct_declarator */
522 | YYSYMBOL_simple_declarator = 112, /* simple_declarator */
523 | YYSYMBOL_array_declarator = 113, /* array_declarator */
524 | YYSYMBOL_114_2 = 114, /* $@2 */
525 | YYSYMBOL_115_3 = 115, /* $@3 */
526 | YYSYMBOL_name = 116, /* name */
527 | YYSYMBOL_storage_class_specifier = 117, /* storage_class_specifier */
528 | YYSYMBOL_type_qualifier_list = 118, /* type_qualifier_list */
529 | YYSYMBOL_type_qualifier = 119, /* type_qualifier */
530 | YYSYMBOL_type_specifier = 120, /* type_specifier */
531 | YYSYMBOL_type_specifier1 = 121, /* type_specifier1 */
532 | YYSYMBOL_floating_type_specifier = 122, /* floating_type_specifier */
533 | YYSYMBOL_integer_type_specifier = 123, /* integer_type_specifier */
534 | YYSYMBOL_integer_type_specifier_part = 124, /* integer_type_specifier_part */
535 | YYSYMBOL_boolean_type_specifier = 125, /* boolean_type_specifier */
536 | YYSYMBOL_typedef_name = 126, /* typedef_name */
537 | YYSYMBOL_void_type_specifier = 127, /* void_type_specifier */
538 | YYSYMBOL_type_name = 128, /* type_name */
539 | YYSYMBOL_enumeration_type_specifier = 129, /* enumeration_type_specifier */
540 | YYSYMBOL_enumeration_type_definition = 130, /* enumeration_type_definition */
541 | YYSYMBOL_131_4 = 131, /* $@4 */
542 | YYSYMBOL_132_5 = 132, /* $@5 */
543 | YYSYMBOL_enumeration_definition_list = 133, /* enumeration_definition_list */
544 | YYSYMBOL_enumeration_definition_list1 = 134, /* enumeration_definition_list1 */
545 | YYSYMBOL_enumeration_constant_definition = 135, /* enumeration_constant_definition */
546 | YYSYMBOL_enumeration_constant = 136, /* enumeration_constant */
547 | YYSYMBOL_enumeration_type_reference = 137, /* enumeration_type_reference */
548 | YYSYMBOL_enumeration_tag = 138, /* enumeration_tag */
549 | YYSYMBOL_structure_type_specifier = 139, /* structure_type_specifier */
550 | YYSYMBOL_structure_type_definition = 140, /* structure_type_definition */
551 | YYSYMBOL_141_6 = 141, /* $@6 */
552 | YYSYMBOL_142_7 = 142, /* $@7 */
553 | YYSYMBOL_structure_type_reference = 143, /* structure_type_reference */
554 | YYSYMBOL_structure_tag = 144, /* structure_tag */
555 | YYSYMBOL_union_type_specifier = 145, /* union_type_specifier */
556 | YYSYMBOL_union_type_definition = 146, /* union_type_definition */
557 | YYSYMBOL_147_8 = 147, /* $@8 */
558 | YYSYMBOL_148_9 = 148, /* $@9 */
559 | YYSYMBOL_union_type_reference = 149, /* union_type_reference */
560 | YYSYMBOL_union_tag = 150, /* union_tag */
561 | YYSYMBOL_field_list = 151, /* field_list */
562 | YYSYMBOL_field_list1 = 152, /* field_list1 */
563 | YYSYMBOL_field_list2 = 153, /* field_list2 */
564 | YYSYMBOL_component_declaration = 154, /* component_declaration */
565 | YYSYMBOL_155_10 = 155, /* $@10 */
566 | YYSYMBOL_156_11 = 156, /* $@11 */
567 | YYSYMBOL_157_12 = 157, /* $@12 */
568 | YYSYMBOL_component_declarator_list = 158, /* component_declarator_list */
569 | YYSYMBOL_component_declarator = 159, /* component_declarator */
570 | YYSYMBOL_simple_component = 160, /* simple_component */
571 | YYSYMBOL_bit_field = 161, /* bit_field */
572 | YYSYMBOL_width = 162, /* width */
573 | YYSYMBOL_component_name = 163, /* component_name */
574 | YYSYMBOL_function_definition = 164, /* function_definition */
575 | YYSYMBOL_165_13 = 165, /* $@13 */
576 | YYSYMBOL_function_specifier = 166, /* function_specifier */
577 | YYSYMBOL_function_specifier1 = 167, /* function_specifier1 */
578 | YYSYMBOL_function_declarator = 168, /* function_declarator */
579 | YYSYMBOL_function_declarator0 = 169, /* function_declarator0 */
580 | YYSYMBOL_function_direct_declarator = 170, /* function_direct_declarator */
581 | YYSYMBOL_171_14 = 171, /* $@14 */
582 | YYSYMBOL_function_declarator1 = 172, /* function_declarator1 */
583 | YYSYMBOL_function_declarator2 = 173, /* function_declarator2 */
584 | YYSYMBOL_identifier_list = 174, /* identifier_list */
585 | YYSYMBOL_parameter_type_list = 175, /* parameter_type_list */
586 | YYSYMBOL_parameter_list = 176, /* parameter_list */
587 | YYSYMBOL_parameter_declaration = 177, /* parameter_declaration */
588 | YYSYMBOL_statement = 178, /* statement */
589 | YYSYMBOL_compound_statement = 179, /* compound_statement */
590 | YYSYMBOL_180_15 = 180, /* $@15 */
591 | YYSYMBOL_181_16 = 181, /* $@16 */
592 | YYSYMBOL_compound_statement_body = 182, /* compound_statement_body */
593 | YYSYMBOL_block_item_list = 183, /* block_item_list */
594 | YYSYMBOL_block_item = 184, /* block_item */
595 | YYSYMBOL_conditional_statement = 185, /* conditional_statement */
596 | YYSYMBOL_if_else_statement = 186, /* if_else_statement */
597 | YYSYMBOL_if_statement = 187, /* if_statement */
598 | YYSYMBOL_iterative_statement = 188, /* iterative_statement */
599 | YYSYMBOL_do_statement = 189, /* do_statement */
600 | YYSYMBOL_for_statement = 190, /* for_statement */
601 | YYSYMBOL_191_17 = 191, /* $@17 */
602 | YYSYMBOL_for_expressions = 192, /* for_expressions */
603 | YYSYMBOL_for_expression_or_declaration = 193, /* for_expression_or_declaration */
604 | YYSYMBOL_while_statement = 194, /* while_statement */
605 | YYSYMBOL_labeled_statement = 195, /* labeled_statement */
606 | YYSYMBOL_case_label = 196, /* case_label */
607 | YYSYMBOL_default_label = 197, /* default_label */
608 | YYSYMBOL_named_label = 198, /* named_label */
609 | YYSYMBOL_switch_statement = 199, /* switch_statement */
610 | YYSYMBOL_break_statement = 200, /* break_statement */
611 | YYSYMBOL_continue_statement = 201, /* continue_statement */
612 | YYSYMBOL_expression_statement = 202, /* expression_statement */
613 | YYSYMBOL_goto_statement = 203, /* goto_statement */
614 | YYSYMBOL_null_statement = 204, /* null_statement */
615 | YYSYMBOL_return_statement = 205, /* return_statement */
616 | YYSYMBOL_expression = 206, /* expression */
617 | YYSYMBOL_comma_expression = 207, /* comma_expression */
618 | YYSYMBOL_assignment_expression = 208, /* assignment_expression */
619 | YYSYMBOL_assignment_op = 209, /* assignment_op */
620 | YYSYMBOL_conditional_expression = 210, /* conditional_expression */
621 | YYSYMBOL_logical_or_expression = 211, /* logical_or_expression */
622 | YYSYMBOL_logical_and_expression = 212, /* logical_and_expression */
623 | YYSYMBOL_bitwise_or_expression = 213, /* bitwise_or_expression */
624 | YYSYMBOL_bitwise_xor_expression = 214, /* bitwise_xor_expression */
625 | YYSYMBOL_bitwise_and_expression = 215, /* bitwise_and_expression */
626 | YYSYMBOL_equality_expression = 216, /* equality_expression */
627 | YYSYMBOL_equality_op = 217, /* equality_op */
628 | YYSYMBOL_relational_expression = 218, /* relational_expression */
629 | YYSYMBOL_relational_op = 219, /* relational_op */
630 | YYSYMBOL_shift_expression = 220, /* shift_expression */
631 | YYSYMBOL_shift_op = 221, /* shift_op */
632 | YYSYMBOL_additive_expression = 222, /* additive_expression */
633 | YYSYMBOL_add_op = 223, /* add_op */
634 | YYSYMBOL_multiplicative_expression = 224, /* multiplicative_expression */
635 | YYSYMBOL_mult_op = 225, /* mult_op */
636 | YYSYMBOL_unary_expression = 226, /* unary_expression */
637 | YYSYMBOL_address_expression = 227, /* address_expression */
638 | YYSYMBOL_bitwise_negation_expression = 228, /* bitwise_negation_expression */
639 | YYSYMBOL_cast_expression = 229, /* cast_expression */
640 | YYSYMBOL_indirection_expression = 230, /* indirection_expression */
641 | YYSYMBOL_logical_negation_expression = 231, /* logical_negation_expression */
642 | YYSYMBOL_predecrement_expression = 232, /* predecrement_expression */
643 | YYSYMBOL_preincrement_expression = 233, /* preincrement_expression */
644 | YYSYMBOL_sizeof_expression = 234, /* sizeof_expression */
645 | YYSYMBOL_unary_minus_expression = 235, /* unary_minus_expression */
646 | YYSYMBOL_unary_plus_expression = 236, /* unary_plus_expression */
647 | YYSYMBOL_postfix_expression = 237, /* postfix_expression */
648 | YYSYMBOL_component_selection_expression = 238, /* component_selection_expression */
649 | YYSYMBOL_direct_component_selection = 239, /* direct_component_selection */
650 | YYSYMBOL_indirect_component_selection = 240, /* indirect_component_selection */
651 | YYSYMBOL_function_call = 241, /* function_call */
652 | YYSYMBOL_function_call_direct = 242, /* function_call_direct */
653 | YYSYMBOL_postdecrement_expression = 243, /* postdecrement_expression */
654 | YYSYMBOL_postincrement_expression = 244, /* postincrement_expression */
655 | YYSYMBOL_subscript_expression = 245, /* subscript_expression */
656 | YYSYMBOL_primary_expression = 246, /* primary_expression */
657 | YYSYMBOL_string_literal = 247, /* string_literal */
658 | YYSYMBOL_parenthesized_expression = 248, /* parenthesized_expression */
659 | YYSYMBOL_249_18 = 249, /* $@18 */
660 | YYSYMBOL_250_19 = 250, /* $@19 */
661 | YYSYMBOL_constant_expression = 251, /* constant_expression */
662 | YYSYMBOL_expression_list = 252, /* expression_list */
663 | YYSYMBOL_asm_statement = 253, /* asm_statement */
664 | YYSYMBOL_asm_type = 254, /* asm_type */
665 | YYSYMBOL_asm_inout_list = 255, /* asm_inout_list */
666 | YYSYMBOL_asm_inout = 256, /* asm_inout */
667 | YYSYMBOL_asm_clobber_list = 257, /* asm_clobber_list */
668 | YYSYMBOL_asm_label = 258, /* asm_label */
669 | YYSYMBOL_named_label_address = 259 /* named_label_address */
670 | };
671 | typedef enum yysymbol_kind_t yysymbol_kind_t;
672 |
673 |
674 |
675 |
676 | #ifdef short
677 | # undef short
678 | #endif
679 |
680 | /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
681 | <limits.h> and (if available) <stdint.h> are included
682 | so that the code can choose integer types of a good width. */
683 |
684 | #ifndef __PTRDIFF_MAX__
685 | # include <limits.h> /* INFRINGES ON USER NAME SPACE */
686 | # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
687 | # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
688 | # define YY_STDINT_H
689 | # endif
690 | #endif
691 |
692 | /* Narrow types that promote to a signed type and that can represent a
693 | signed or unsigned integer of at least N bits. In tables they can
694 | save space and decrease cache pressure. Promoting to a signed type
695 | helps avoid bugs in integer arithmetic. */
696 |
697 | #ifdef __INT_LEAST8_MAX__
698 | typedef __INT_LEAST8_TYPE__ yytype_int8;
699 | #elif defined YY_STDINT_H
700 | typedef int_least8_t yytype_int8;
701 | #else
702 | typedef signed char yytype_int8;
703 | #endif
704 |
705 | #ifdef __INT_LEAST16_MAX__
706 | typedef __INT_LEAST16_TYPE__ yytype_int16;
707 | #elif defined YY_STDINT_H
708 | typedef int_least16_t yytype_int16;
709 | #else
710 | typedef short yytype_int16;
711 | #endif
712 |
713 | /* Work around bug in HP-UX 11.23, which defines these macros
714 | incorrectly for preprocessor constants. This workaround can likely
715 | be removed in 2023, as HPE has promised support for HP-UX 11.23
716 | (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
717 | <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
718 | #ifdef __hpux
719 | # undef UINT_LEAST8_MAX
720 | # undef UINT_LEAST16_MAX
721 | # define UINT_LEAST8_MAX 255
722 | # define UINT_LEAST16_MAX 65535
723 | #endif
724 |
725 | #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
726 | typedef __UINT_LEAST8_TYPE__ yytype_uint8;
727 | #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
728 | && UINT_LEAST8_MAX <= INT_MAX)
729 | typedef uint_least8_t yytype_uint8;
730 | #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
731 | typedef unsigned char yytype_uint8;
732 | #else
733 | typedef short yytype_uint8;
734 | #endif
735 |
736 | #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
737 | typedef __UINT_LEAST16_TYPE__ yytype_uint16;
738 | #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
739 | && UINT_LEAST16_MAX <= INT_MAX)
740 | typedef uint_least16_t yytype_uint16;
741 | #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
742 | typedef unsigned short yytype_uint16;
743 | #else
744 | typedef int yytype_uint16;
745 | #endif
746 |
747 | #ifndef YYPTRDIFF_T
748 | # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
749 | # define YYPTRDIFF_T __PTRDIFF_TYPE__
750 | # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
751 | # elif defined PTRDIFF_MAX
752 | # ifndef ptrdiff_t
753 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
754 | # endif
755 | # define YYPTRDIFF_T ptrdiff_t
756 | # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
757 | # else
758 | # define YYPTRDIFF_T long
759 | # define YYPTRDIFF_MAXIMUM LONG_MAX
760 | # endif
761 | #endif
762 |
763 | #ifndef YYSIZE_T
764 | # ifdef __SIZE_TYPE__
765 | # define YYSIZE_T __SIZE_TYPE__
766 | # elif defined size_t
767 | # define YYSIZE_T size_t
768 | # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
769 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
770 | # define YYSIZE_T size_t
771 | # else
772 | # define YYSIZE_T unsigned
773 | # endif
774 | #endif
775 |
776 | #define YYSIZE_MAXIMUM \
777 | YY_CAST (YYPTRDIFF_T, \
778 | (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
779 | ? YYPTRDIFF_MAXIMUM \
780 | : YY_CAST (YYSIZE_T, -1)))
781 |
782 | #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
783 |
784 |
785 | /* Stored state numbers (used for stacks). */
786 | typedef yytype_int16 yy_state_t;
787 |
788 | /* State numbers in computations. */
789 | typedef int yy_state_fast_t;
790 |
791 | #ifndef YY_
792 | # if defined YYENABLE_NLS && YYENABLE_NLS
793 | # if ENABLE_NLS
794 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
795 | # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
796 | # endif
797 | # endif
798 | # ifndef YY_
799 | # define YY_(Msgid) Msgid
800 | # endif
801 | #endif
802 |
803 |
804 | #ifndef YY_ATTRIBUTE_PURE
805 | # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
806 | # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
807 | # else
808 | # define YY_ATTRIBUTE_PURE
809 | # endif
810 | #endif
811 |
812 | #ifndef YY_ATTRIBUTE_UNUSED
813 | # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
814 | # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
815 | # else
816 | # define YY_ATTRIBUTE_UNUSED
817 | # endif
818 | #endif
819 |
820 | /* Suppress unused-variable warnings by "using" E. */
821 | #if ! defined lint || defined __GNUC__
822 | # define YY_USE(E) ((void) (E))
823 | #else
824 | # define YY_USE(E) /* empty */
825 | #endif
826 |
827 | /* Suppress an incorrect diagnostic about yylval being uninitialized. */
828 | #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
829 | # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
830 | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
831 | _Pragma ("GCC diagnostic push") \
832 | _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
833 | # else
834 | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
835 | _Pragma ("GCC diagnostic push") \
836 | _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
837 | _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
838 | # endif
839 | # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
840 | _Pragma ("GCC diagnostic pop")
841 | #else
842 | # define YY_INITIAL_VALUE(Value) Value
843 | #endif
844 | #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
845 | # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
846 | # define YY_IGNORE_MAYBE_UNINITIALIZED_END
847 | #endif
848 | #ifndef YY_INITIAL_VALUE
849 | # define YY_INITIAL_VALUE(Value) /* Nothing. */
850 | #endif
851 |
852 | #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
853 | # define YY_IGNORE_USELESS_CAST_BEGIN \
854 | _Pragma ("GCC diagnostic push") \
855 | _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
856 | # define YY_IGNORE_USELESS_CAST_END \
857 | _Pragma ("GCC diagnostic pop")
858 | #endif
859 | #ifndef YY_IGNORE_USELESS_CAST_BEGIN
860 | # define YY_IGNORE_USELESS_CAST_BEGIN
861 | # define YY_IGNORE_USELESS_CAST_END
862 | #endif
863 |
864 |
865 | #define YY_ASSERT(E) ((void) (0 && (E)))
866 |
867 | #if !defined yyoverflow
868 |
869 | /* The parser invokes alloca or malloc; define the necessary symbols. */
870 |
871 | # ifdef YYSTACK_USE_ALLOCA
872 | # if YYSTACK_USE_ALLOCA
873 | # ifdef __GNUC__
874 | # define YYSTACK_ALLOC __builtin_alloca
875 | # elif defined __BUILTIN_VA_ARG_INCR
876 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
877 | # elif defined _AIX
878 | # define YYSTACK_ALLOC __alloca
879 | # elif defined _MSC_VER
880 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
881 | # define alloca _alloca
882 | # else
883 | # define YYSTACK_ALLOC alloca
884 | # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
885 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
886 | /* Use EXIT_SUCCESS as a witness for stdlib.h. */
887 | # ifndef EXIT_SUCCESS
888 | # define EXIT_SUCCESS 0
889 | # endif
890 | # endif
891 | # endif
892 | # endif
893 | # endif
894 |
895 | # ifdef YYSTACK_ALLOC
896 | /* Pacify GCC's 'empty if-body' warning. */
897 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
898 | # ifndef YYSTACK_ALLOC_MAXIMUM
899 | /* The OS might guarantee only one guard page at the bottom of the stack,
900 | and a page size can be as small as 4096 bytes. So we cannot safely
901 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
902 | to allow for a few compiler-allocated temporary stack slots. */
903 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
904 | # endif
905 | # else
906 | # define YYSTACK_ALLOC YYMALLOC
907 | # define YYSTACK_FREE YYFREE
908 | # ifndef YYSTACK_ALLOC_MAXIMUM
909 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
910 | # endif
911 | # if (defined __cplusplus && ! defined EXIT_SUCCESS \
912 | && ! ((defined YYMALLOC || defined malloc) \
913 | && (defined YYFREE || defined free)))
914 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
915 | # ifndef EXIT_SUCCESS
916 | # define EXIT_SUCCESS 0
917 | # endif
918 | # endif
919 | # ifndef YYMALLOC
920 | # define YYMALLOC malloc
921 | # if ! defined malloc && ! defined EXIT_SUCCESS
922 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
923 | # endif
924 | # endif
925 | # ifndef YYFREE
926 | # define YYFREE free
927 | # if ! defined free && ! defined EXIT_SUCCESS
928 | void free (void *); /* INFRINGES ON USER NAME SPACE */
929 | # endif
930 | # endif
931 | # endif
932 | #endif /* !defined yyoverflow */
933 |
934 | #if (! defined yyoverflow \
935 | && (! defined __cplusplus \
936 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
937 |
938 | /* A type that is properly aligned for any stack member. */
939 | union yyalloc
940 | {
941 | yy_state_t yyss_alloc;
942 | YYSTYPE yyvs_alloc;
943 | };
944 |
945 | /* The size of the maximum gap between one aligned stack and the next. */
946 | # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
947 |
948 | /* The size of an array large to enough to hold all stacks, each with
949 | N elements. */
950 | # define YYSTACK_BYTES(N) \
951 | ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
952 | + YYSTACK_GAP_MAXIMUM)
953 |
954 | # define YYCOPY_NEEDED 1
955 |
956 | /* Relocate STACK from its old location to the new one. The
957 | local variables YYSIZE and YYSTACKSIZE give the old and new number of
958 | elements in the stack, and YYPTR gives the new location of the
959 | stack. Advance YYPTR to a properly aligned location for the next
960 | stack. */
961 | # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
962 | do \
963 | { \
964 | YYPTRDIFF_T yynewbytes; \
965 | YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
966 | Stack = &yyptr->Stack_alloc; \
967 | yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
968 | yyptr += yynewbytes / YYSIZEOF (*yyptr); \
969 | } \
970 | while (0)
971 |
972 | #endif
973 |
974 | #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
975 | /* Copy COUNT objects from SRC to DST. The source and destination do
976 | not overlap. */
977 | # ifndef YYCOPY
978 | # if defined __GNUC__ && 1 < __GNUC__
979 | # define YYCOPY(Dst, Src, Count) \
980 | __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
981 | # else
982 | # define YYCOPY(Dst, Src, Count) \
983 | do \
984 | { \
985 | YYPTRDIFF_T yyi; \
986 | for (yyi = 0; yyi < (Count); yyi++) \
987 | (Dst)[yyi] = (Src)[yyi]; \
988 | } \
989 | while (0)
990 | # endif
991 | # endif
992 | #endif /* !YYCOPY_NEEDED */
993 |
994 | /* YYFINAL -- State number of the termination state. */
995 | #define YYFINAL 92
996 | /* YYLAST -- Last index in YYTABLE. */
997 | #define YYLAST 1500
998 |
999 | /* YYNTOKENS -- Number of terminals. */
1000 | #define YYNTOKENS 88
1001 | /* YYNNTS -- Number of nonterminals. */
1002 | #define YYNNTS 172
1003 | /* YYNRULES -- Number of rules. */
1004 | #define YYNRULES 379
1005 | /* YYNSTATES -- Number of states. */
1006 | #define YYNSTATES 572
1007 |
1008 | /* YYMAXUTOK -- Last valid token kind. */
1009 | #define YYMAXUTOK 318
1010 |
1011 |
1012 | /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
1013 | as returned by yylex, with out-of-bounds checking. */
1014 | #define YYTRANSLATE(YYX) \
1015 | (0 <= (YYX) && (YYX) <= YYMAXUTOK \
1016 | ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
1017 | : YYSYMBOL_YYUNDEF)
1018 |
1019 | /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1020 | as returned by yylex. */
1021 | static const yytype_int8 yytranslate[] =
1022 | {
1023 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1024 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1025 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1026 | 2, 2, 2, 87, 2, 2, 2, 85, 79, 2,
1027 | 73, 74, 75, 82, 65, 83, 70, 84, 2, 2,
1028 | 2, 2, 2, 2, 2, 2, 2, 2, 69, 64,
1029 | 80, 66, 81, 76, 2, 2, 2, 2, 2, 2,
1030 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1031 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1032 | 2, 71, 2, 72, 78, 2, 2, 2, 2, 2,
1033 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1034 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1035 | 2, 2, 2, 67, 77, 68, 86, 2, 2, 2,
1036 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1037 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1038 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1039 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1040 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1041 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1042 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1043 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1044 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1045 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1046 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1047 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1048 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1049 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1050 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1051 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
1052 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1053 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1054 | 55, 56, 57, 58, 59, 60, 61, 62, 63
1055 | };
1056 |
1057 | #if YYDEBUG
1058 | /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
1059 | static const yytype_int16 yyrline[] =
1060 | {
1061 | 0, 167, 167, 168, 172, 173, 177, 179, 181, 182,
1062 | 188, 190, 196, 198, 203, 209, 210, 212, 214, 217,
1063 | 218, 225, 226, 226, 230, 274, 275, 276, 277, 281,
1064 | 285, 286, 290, 291, 292, 293, 297, 298, 299, 303,
1065 | 304, 308, 309, 313, 314, 320, 321, 323, 327, 330,
1066 | 332, 334, 336, 338, 340, 342, 344, 351, 353, 358,
1067 | 359, 361, 363, 368, 369, 373, 374, 378, 385, 387,
1068 | 387, 387, 394, 398, 400, 405, 407, 409, 413, 418,
1069 | 419, 424, 426, 433, 438, 439, 440, 441, 442, 443,
1070 | 444, 445, 449, 450, 451, 453, 458, 459, 461, 466,
1071 | 467, 468, 469, 470, 471, 475, 479, 483, 487, 489,
1072 | 496, 497, 502, 501, 515, 514, 530, 531, 535, 536,
1073 | 541, 543, 548, 552, 557, 558, 564, 565, 570, 569,
1074 | 583, 582, 598, 603, 604, 610, 611, 616, 615, 629,
1075 | 628, 644, 649, 650, 656, 657, 661, 662, 667, 668,
1076 | 671, 674, 679, 678, 683, 682, 687, 686, 693, 695,
1077 | 701, 702, 706, 711, 713, 718, 722, 723, 732, 731,
1078 | 738, 761, 762, 764, 765, 772, 777, 778, 779, 781,
1079 | 787, 786, 797, 806, 808, 809, 813, 815, 821, 822,
1080 | 828, 831, 837, 839, 841, 848, 849, 850, 851, 852,
1081 | 853, 854, 855, 856, 857, 858, 859, 866, 868, 865,
1082 | 873, 874, 878, 879, 883, 884, 891, 892, 896, 900,
1083 | 906, 907, 908, 912, 917, 916, 923, 924, 925, 926,
1084 | 927, 928, 929, 930, 934, 935, 937, 942, 948, 949,
1085 | 950, 954, 955, 959, 963, 964, 970, 976, 980, 984,
1086 | 988, 992, 996, 997, 1003, 1009, 1010, 1017, 1018, 1019,
1087 | 1020, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032,
1088 | 1033, 1034, 1040, 1041, 1043, 1050, 1051, 1058, 1059, 1066,
1089 | 1067, 1074, 1075, 1082, 1083, 1090, 1091, 1096, 1097, 1103,
1090 | 1104, 1109, 1110, 1111, 1112, 1118, 1119, 1124, 1125, 1131,
1091 | 1132, 1137, 1138, 1144, 1145, 1150, 1151, 1152, 1158, 1159,
1092 | 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1172,
1093 | 1176, 1181, 1183, 1187, 1191, 1196, 1200, 1204, 1206, 1211,
1094 | 1216, 1223, 1224, 1225, 1227, 1228, 1229, 1230, 1234, 1235,
1095 | 1239, 1243, 1247, 1248, 1252, 1253, 1257, 1261, 1265, 1269,
1096 | 1271, 1272, 1273, 1277, 1278, 1282, 1284, 1284, 1284, 1290,
1097 | 1294, 1295, 1303, 1304, 1305, 1306, 1310, 1311, 1312, 1316,
1098 | 1317, 1318, 1322, 1323, 1324, 1328, 1329, 1330, 1334, 1340
1099 | };
1100 | #endif
1101 |
1102 | /** Accessing symbol of state STATE. */
1103 | #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
1104 |
1105 | #if YYDEBUG || 0
1106 | /* The user-facing name of the symbol whose (internal) number is
1107 | YYSYMBOL. No bounds checking. */
1108 | static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
1109 |
1110 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1111 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1112 | static const char *const yytname[] =
1113 | {
1114 | "\"end of file\"", "error", "\"invalid token\"", "IDENTIFIER",
1115 | "TYPE_NAME", "LITERAL", "STRING_LITERAL", "ELLIPSES", "MUL_ASSIGN",
1116 | "DIV_ASSIGN", "MOD_ASSIGN", "ADD_ASSIGN", "SUB_ASSIGN", "LEFT_ASSIGN",
1117 | "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "EQ_OP",
1118 | "NE_OP", "PTR_OP", "AND_OP", "OR_OP", "DEC_OP", "INC_OP", "LE_OP",
1119 | "GE_OP", "LEFT_SHIFT", "RIGHT_SHIFT", "SIZEOF", "TYPEDEF", "EXTERN",
1120 | "STATIC", "AUTO", "REGISTER", "CONST", "VOLATILE", "VOID", "INLINE",
1121 | "CHAR", "SHORT", "INT", "LONG", "SIGNED", "UNSIGNED", "FLOAT", "DOUBLE",
1122 | "BOOL", "STRUCT", "UNION", "ENUM", "CASE", "DEFAULT", "IF", "ELSE",
1123 | "SWITCH", "WHILE", "DO", "FOR", "GOTO", "CONTINUE", "BREAK", "RETURN",
1124 | "ASM", "';'", "','", "'='", "'{'", "'}'", "':'", "'.'", "'['", "']'",
1125 | "'('", "')'", "'*'", "'?'", "'|'", "'^'", "'&'", "'<'", "'>'", "'+'",
1126 | "'-'", "'/'", "'%'", "'~'", "'!'", "$accept", "file", "program",
1127 | "top_level_declaration", "declaration_list", "declaration",
1128 | "declaration_specifiers", "declaration_specifiers1",
1129 | "initialized_declarator_list", "$@1", "initialized_declarator",
1130 | "initialized_declarator1", "initializer_part", "initializer",
1131 | "struct_initializer_list", "named_initializer", "designator",
1132 | "designator_list", "named_initializer_index", "abstract_declarator",
1133 | "direct_abstract_declarator", "declarator", "pointer",
1134 | "direct_declarator", "simple_declarator", "array_declarator", "$@2",
1135 | "$@3", "name", "storage_class_specifier", "type_qualifier_list",
1136 | "type_qualifier", "type_specifier", "type_specifier1",
1137 | "floating_type_specifier", "integer_type_specifier",
1138 | "integer_type_specifier_part", "boolean_type_specifier", "typedef_name",
1139 | "void_type_specifier", "type_name", "enumeration_type_specifier",
1140 | "enumeration_type_definition", "$@4", "$@5",
1141 | "enumeration_definition_list", "enumeration_definition_list1",
1142 | "enumeration_constant_definition", "enumeration_constant",
1143 | "enumeration_type_reference", "enumeration_tag",
1144 | "structure_type_specifier", "structure_type_definition", "$@6", "$@7",
1145 | "structure_type_reference", "structure_tag", "union_type_specifier",
1146 | "union_type_definition", "$@8", "$@9", "union_type_reference",
1147 | "union_tag", "field_list", "field_list1", "field_list2",
1148 | "component_declaration", "$@10", "$@11", "$@12",
1149 | "component_declarator_list", "component_declarator", "simple_component",
1150 | "bit_field", "width", "component_name", "function_definition", "$@13",
1151 | "function_specifier", "function_specifier1", "function_declarator",
1152 | "function_declarator0", "function_direct_declarator", "$@14",
1153 | "function_declarator1", "function_declarator2", "identifier_list",
1154 | "parameter_type_list", "parameter_list", "parameter_declaration",
1155 | "statement", "compound_statement", "$@15", "$@16",
1156 | "compound_statement_body", "block_item_list", "block_item",
1157 | "conditional_statement", "if_else_statement", "if_statement",
1158 | "iterative_statement", "do_statement", "for_statement", "$@17",
1159 | "for_expressions", "for_expression_or_declaration", "while_statement",
1160 | "labeled_statement", "case_label", "default_label", "named_label",
1161 | "switch_statement", "break_statement", "continue_statement",
1162 | "expression_statement", "goto_statement", "null_statement",
1163 | "return_statement", "expression", "comma_expression",
1164 | "assignment_expression", "assignment_op", "conditional_expression",
1165 | "logical_or_expression", "logical_and_expression",
1166 | "bitwise_or_expression", "bitwise_xor_expression",
1167 | "bitwise_and_expression", "equality_expression", "equality_op",
1168 | "relational_expression", "relational_op", "shift_expression", "shift_op",
1169 | "additive_expression", "add_op", "multiplicative_expression", "mult_op",
1170 | "unary_expression", "address_expression", "bitwise_negation_expression",
1171 | "cast_expression", "indirection_expression",
1172 | "logical_negation_expression", "predecrement_expression",
1173 | "preincrement_expression", "sizeof_expression", "unary_minus_expression",
1174 | "unary_plus_expression", "postfix_expression",
1175 | "component_selection_expression", "direct_component_selection",
1176 | "indirect_component_selection", "function_call", "function_call_direct",
1177 | "postdecrement_expression", "postincrement_expression",
1178 | "subscript_expression", "primary_expression", "string_literal",
1179 | "parenthesized_expression", "$@18", "$@19", "constant_expression",
1180 | "expression_list", "asm_statement", "asm_type", "asm_inout_list",
1181 | "asm_inout", "asm_clobber_list", "asm_label", "named_label_address", YY_NULLPTR
1182 | };
1183 |
1184 | static const char *
1185 | yysymbol_name (yysymbol_kind_t yysymbol)
1186 | {
1187 | return yytname[yysymbol];
1188 | }
1189 | #endif
1190 |
1191 | #define YYPACT_NINF (-406)
1192 |
1193 | #define yypact_value_is_default(Yyn) \
1194 | ((Yyn) == YYPACT_NINF)
1195 |
1196 | #define YYTABLE_NINF (-246)
1197 |
1198 | #define yytable_value_is_error(Yyn) \
1199 | 0
1200 |
1201 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1202 | STATE-NUM. */
1203 | static const yytype_int16 yypact[] =
1204 | {
1205 | 1192, -406, -406, -406, -406, -406, -406, -406, -406, -1,
1206 | -406, -406, -406, -406, -406, 21, -406, -406, -406, 36,
1207 | -406, 53, 57, 61, 62, -406, 43, 120, 151, 1192,
1208 | -406, -406, 19, -406, 14, 104, -406, -406, 1450, 1450,
1209 | 1450, -406, -406, 386, 126, -406, -406, -406, -406, -406,
1210 | -406, -406, -406, -406, -406, -406, -406, -406, -406, -406,
1211 | 1450, -406, 332, 106, -406, -406, 117, -406, -406, -406,
1212 | -406, -406, -406, 129, -406, -406, -406, 165, -406, -406,
1213 | -406, 188, -406, 43, 130, 39, -3, 144, -406, -406,
1214 | 120, -406, -406, -406, -406, 223, -406, -406, 78, 14,
1215 | 1450, 43, 332, 152, -406, -406, -406, -406, -406, -406,
1216 | 200, 1450, -406, 38, -406, 235, 417, -406, 417, -406,
1217 | 248, -406, -406, -406, -3, -406, -406, -406, -406, -406,
1218 | 187, 301, -406, 209, 1450, 205, -406, 1042, -406, -406,
1219 | -406, 1382, -406, 30, -406, 1257, 126, 218, 220, 237,
1220 | 417, -406, -406, 417, 251, 417, -406, 253, 264, -406,
1221 | 273, 248, 43, 235, -406, -406, 287, 1107, 1107, 1132,
1222 | 210, 636, 1107, 1107, 1107, 1107, 1107, 1107, -406, 281,
1223 | -406, -406, 1, 325, 279, 284, 278, 276, 140, 275,
1224 | 244, 103, 300, -406, -406, -406, -406, -406, -406, -406,
1225 | -406, -406, -406, 174, -406, -406, -406, -406, -406, -406,
1226 | -406, -406, -406, 353, -406, -406, -406, -406, -406, 306,
1227 | -406, -406, 466, -406, 137, 299, 313, -406, 314, -406,
1228 | -406, 68, 317, -406, 126, 11, -406, -406, -406, -406,
1229 | 318, -406, 326, -406, 248, 1042, 338, -406, 41, -406,
1230 | -406, -406, -406, -406, 636, -406, 316, -406, 328, 1042,
1231 | -406, 32, -406, -406, 192, 324, 193, 308, 333, 200,
1232 | -406, -406, -406, -406, -406, -406, 85, 1107, 755, 1107,
1233 | 1107, 1107, 1107, -406, -406, 1107, -406, -406, -406, -406,
1234 | 1107, -406, -406, 1107, -406, -406, 1107, -406, -406, -406,
1235 | 1107, -406, -406, -406, -406, -406, -406, -406, -406, -406,
1236 | -406, -406, 777, 328, -406, -406, 328, 1042, 802, 1042,
1237 | 336, 341, 342, 1042, -406, 339, 343, 344, 684, -406,
1238 | 415, 355, 359, 877, -406, -406, -406, -406, 466, -406,
1239 | -406, -406, -406, -406, -406, -406, -406, -406, 362, 363,
1240 | 364, -406, -406, -406, -406, -406, -406, -406, 371, -406,
1241 | 899, 1240, -406, 169, -406, 52, -406, 433, 1403, 330,
1242 | 28, 161, -406, -406, 11, 11, 1042, 368, 272, -406,
1243 | -406, -406, -406, -406, -406, -406, -406, -406, 365, -406,
1244 | -406, 369, 435, 210, -406, 301, -406, 301, 1287, -406,
1245 | 199, 1085, -406, -406, -406, -406, 89, 325, -406, 1107,
1246 | 374, 279, 284, 278, 276, 140, 275, 244, 103, -406,
1247 | 210, -406, -406, -406, 372, -406, 109, -406, -406, 438,
1248 | 1042, 1042, 1042, -1, 384, 375, 383, -406, -406, -406,
1249 | 385, 382, -406, -406, -406, -406, -406, -406, 379, -406,
1250 | 394, 399, 924, 1334, 169, -406, -406, -406, 402, 403,
1251 | 1042, 68, 68, 412, 280, 286, -406, -406, 1042, -406,
1252 | 11, 1085, -406, 1042, -406, -406, -406, 210, -406, 404,
1253 | 1042, -406, -406, 1107, 157, -406, -406, 1042, 405, 406,
1254 | 408, 410, 551, -406, -406, -406, -406, -406, -406, -406,
1255 | 413, -406, 414, 235, 235, 418, -406, 185, -406, -406,
1256 | -406, -406, -406, -406, 184, -406, -406, -406, -406, -406,
1257 | 684, 684, 684, 1042, 995, 43, 446, 420, -406, -406,
1258 | -406, 34, 46, -406, 235, 422, -406, 423, -406, -406,
1259 | 457, 1042, 427, 467, 684, 1020, 1042, 1042, 353, 115,
1260 | -406, 684, 470, -406, 1042, -406, 1042, 471, 462, 463,
1261 | 235, 474, -406, -406, -406, -406, 1042, -406, -406, 353,
1262 | -406, -406
1263 | };
1264 |
1265 | /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1266 | Performed when YYTABLE does not specify something else to do. Zero
1267 | means the default is an error. */
1268 | static const yytype_int16 yydefact[] =
1269 | {
1270 | 2, 67, 106, 77, 74, 76, 73, 75, 81, 82,
1271 | 107, 78, 101, 102, 103, 104, 99, 100, 92, 93,
1272 | 105, 0, 0, 0, 366, 251, 0, 59, 0, 3,
1273 | 4, 6, 0, 14, 0, 182, 63, 65, 15, 19,
1274 | 17, 83, 85, 86, 96, 87, 89, 91, 84, 110,
1275 | 111, 88, 126, 127, 90, 135, 136, 7, 168, 170,
1276 | 171, 175, 176, 0, 9, 8, 0, 368, 95, 94,
1277 | 133, 134, 128, 132, 142, 143, 137, 141, 124, 125,
1278 | 112, 123, 367, 0, 0, 0, 57, 66, 82, 61,
1279 | 60, 79, 1, 5, 13, 0, 21, 24, 25, 0,
1280 | 172, 0, 178, 69, 16, 20, 18, 104, 98, 97,
1281 | 0, 173, 10, 0, 180, 0, 144, 130, 144, 139,
1282 | 0, 114, 66, 64, 58, 177, 62, 80, 12, 22,
1283 | 0, 0, 27, 26, 174, 66, 68, 0, 207, 169,
1284 | 11, 183, 353, 0, 148, 0, 152, 126, 135, 0,
1285 | 145, 146, 151, 144, 0, 144, 122, 0, 116, 118,
1286 | 120, 0, 0, 0, 72, 350, 0, 0, 0, 0,
1287 | 32, 356, 0, 0, 0, 0, 0, 0, 29, 349,
1288 | 30, 257, 272, 275, 277, 279, 281, 283, 285, 289,
1289 | 295, 299, 303, 308, 309, 310, 311, 312, 313, 314,
1290 | 315, 316, 317, 318, 331, 338, 339, 332, 333, 334,
1291 | 335, 336, 337, 351, 352, 258, 28, 179, 359, 254,
1292 | 255, 70, 210, 186, 193, 0, 185, 184, 188, 190,
1293 | 354, 369, 0, 154, 156, 0, 149, 150, 129, 147,
1294 | 0, 138, 0, 113, 117, 0, 0, 23, 0, 244,
1295 | 245, 379, 325, 326, 356, 328, 72, 167, 0, 0,
1296 | 36, 0, 33, 41, 0, 0, 108, 0, 0, 0,
1297 | 323, 319, 330, 329, 320, 324, 0, 0, 0, 0,
1298 | 0, 0, 0, 287, 288, 0, 292, 294, 291, 293,
1299 | 0, 297, 298, 0, 301, 302, 0, 305, 306, 307,
1300 | 0, 262, 263, 264, 265, 266, 267, 268, 269, 270,
1301 | 271, 261, 0, 0, 346, 347, 0, 0, 0, 0,
1302 | 0, 72, 106, 0, 243, 0, 0, 0, 0, 224,
1303 | 0, 0, 0, 0, 215, 214, 196, 208, 211, 212,
1304 | 197, 217, 216, 198, 220, 221, 222, 199, 0, 0,
1305 | 0, 200, 201, 202, 203, 204, 205, 206, 0, 195,
1306 | 0, 0, 194, 47, 192, 45, 181, 0, 0, 0,
1307 | 0, 0, 370, 362, 0, 0, 0, 162, 0, 158,
1308 | 160, 161, 131, 140, 119, 121, 115, 378, 0, 166,
1309 | 39, 0, 43, 35, 31, 0, 42, 0, 0, 109,
1310 | 45, 0, 355, 357, 344, 360, 0, 276, 303, 0,
1311 | 0, 278, 280, 282, 284, 286, 290, 296, 300, 304,
1312 | 32, 259, 341, 340, 0, 342, 0, 256, 71, 241,
1313 | 0, 0, 0, 0, 0, 0, 0, 248, 247, 252,
1314 | 0, 0, 213, 238, 240, 239, 249, 49, 0, 53,
1315 | 0, 0, 0, 0, 46, 187, 189, 191, 0, 0,
1316 | 0, 0, 369, 0, 0, 0, 163, 165, 0, 153,
1317 | 0, 327, 40, 0, 34, 38, 37, 32, 321, 0,
1318 | 0, 345, 274, 0, 0, 348, 343, 0, 0, 0,
1319 | 0, 0, 0, 250, 253, 209, 51, 48, 55, 50,
1320 | 0, 54, 0, 0, 0, 0, 371, 0, 363, 155,
1321 | 157, 164, 159, 44, 0, 358, 361, 273, 260, 242,
1322 | 0, 0, 0, 0, 0, 236, 0, 0, 234, 52,
1323 | 56, 0, 0, 374, 375, 0, 322, 219, 246, 237,
1324 | 0, 226, 0, 235, 0, 0, 0, 0, 376, 0,
1325 | 364, 0, 0, 229, 228, 225, 227, 0, 0, 0,
1326 | 0, 0, 218, 223, 230, 231, 232, 372, 373, 377,
1327 | 365, 233
1328 | };
1329 |
1330 | /* YYPGOTO[NTERM-NUM]. */
1331 | static const yytype_int16 yypgoto[] =
1332 | {
1333 | -406, -406, -406, 511, 442, -52, 2, 5, 18, -406,
1334 | 388, -406, 411, -124, -405, 153, 283, -406, -406, -170,
1335 | -347, -32, 3, 4, -406, -406, -406, -406, -406, -406,
1336 | -11, 31, 93, -406, -406, -406, 508, -406, -406, -406,
1337 | 304, -406, -406, -406, -406, 398, -406, 319, -406, -406,
1338 | -406, -406, 222, -406, -406, -406, -406, -406, 249, -406,
1339 | -406, -406, -406, 64, -406, 416, -406, -406, -406, -406,
1340 | -22, 90, -406, -406, 94, -163, -406, -406, -406, -406,
1341 | 529, -406, 37, -406, -406, -406, -406, -135, -406, 196,
1342 | -315, -100, -406, -406, -406, -406, 227, -406, -406, -406,
1343 | -406, -406, -406, -406, -406, -406, -406, -406, -406, -406,
1344 | 401, -406, -406, -406, -406, -406, 50, -406, -132, -406,
1345 | -119, -406, -398, -406, 291, 290, 293, 289, 294, -406,
1346 | 292, -406, 288, -406, 309, -406, 307, -406, -148, -406,
1347 | -406, -406, -406, -406, -406, -406, -406, -406, -406, -406,
1348 | -406, -406, -406, -406, -406, -406, -406, -406, -406, -114,
1349 | -406, -406, -406, -250, 261, 76, -406, 142, 110, -406,
1350 | -406, -406
1351 | };
1352 |
1353 | /* YYDEFGOTO[NTERM-NUM]. */
1354 | static const yytype_int16 yydefgoto[] =
1355 | {
1356 | 0, 28, 29, 30, 111, 31, 113, 33, 95, 162,
1357 | 96, 97, 132, 260, 261, 262, 263, 264, 391, 450,
1358 | 363, 84, 85, 86, 36, 37, 137, 320, 179, 38,
1359 | 145, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1360 | 267, 48, 49, 120, 161, 157, 158, 159, 160, 50,
1361 | 81, 51, 52, 116, 153, 53, 73, 54, 55, 118,
1362 | 155, 56, 77, 149, 150, 151, 152, 235, 374, 375,
1363 | 378, 379, 380, 381, 466, 265, 57, 110, 58, 59,
1364 | 60, 61, 122, 141, 63, 225, 226, 451, 228, 229,
1365 | 335, 336, 222, 441, 337, 338, 339, 340, 341, 342,
1366 | 343, 344, 345, 435, 526, 527, 346, 347, 348, 349,
1367 | 350, 351, 352, 353, 354, 355, 356, 357, 358, 219,
1368 | 220, 312, 181, 182, 183, 184, 185, 186, 187, 285,
1369 | 188, 290, 189, 293, 190, 296, 191, 300, 192, 193,
1370 | 194, 195, 196, 197, 198, 199, 200, 201, 202, 203,
1371 | 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
1372 | 214, 269, 479, 221, 406, 359, 66, 371, 372, 549,
1373 | 133, 215
1374 | };
1375 |
1376 | /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1377 | positive, shift that token. If negative, reduce the rule whose
1378 | number is the opposite. If YYTABLE_NINF, syntax error. */
1379 | static const yytype_int16 yytable[] =
1380 | {
1381 | 98, 143, 32, 34, 35, 218, 227, 178, 112, 392,
1382 | 139, 482, 180, 434, 1, 484, 90, 1, 454, 252,
1383 | 253, 255, 1, 277, 270, 271, 272, 273, 274, 275,
1384 | 89, 32, 34, 35, 230, 99, 230, 62, 35, 268,
1385 | 230, 1, 1, 104, 105, 106, 1, 230, 112, 248,
1386 | 64, 180, 230, 454, 362, 1, 70, 71, 91, 140,
1387 | 74, 75, 67, 87, 78, 79, 62, 68, 103, 62,
1388 | -182, 102, 514, 429, 142, 109, 65, 278, 69, 64,
1389 | 376, 98, 140, 94, 83, 517, 27, 101, 164, 124,
1390 | 165, 142, 26, 126, 27, 390, 399, 393, 82, 231,
1391 | 394, 460, 94, 124, 232, 65, 166, 546, 167, 168,
1392 | 448, 83, 83, 27, 169, 387, 83, 370, 27, 547,
1393 | 72, 127, 268, 360, 76, 361, 385, 218, 80, 408,
1394 | 98, 408, 408, 408, 408, 234, 102, 408, 135, 369,
1395 | 1, 130, 408, 224, 131, 408, 410, 91, 408, 91,
1396 | 422, 92, 419, 423, 480, 8, 88, 405, 171, 404,
1397 | 172, 8, 88, 481, 173, 286, 287, 174, 175, 403,
1398 | 334, 176, 177, 266, 480, 103, 127, 91, 297, 114,
1399 | 560, 91, 154, 486, 91, 424, 91, 298, 299, 561,
1400 | 115, 218, 364, 421, 313, 27, 117, 314, 315, 405,
1401 | 427, 440, 500, 377, 123, 537, 538, 539, 360, 146,
1402 | 361, 146, 27, 256, 257, 165, 142, 240, 125, 242,
1403 | 288, 289, 393, 513, 136, 518, 461, 365, 218, 555,
1404 | 462, 166, 119, 167, 168, 463, 562, 519, 233, 169,
1405 | 452, 142, 453, 146, 316, 317, 146, 318, 146, 393,
1406 | 461, 156, 536, 478, 534, 121, 266, 467, 395, 535,
1407 | 163, 408, 258, 259, 360, 127, 398, 138, 27, 400,
1408 | 360, 475, 398, 476, 180, 131, 180, 170, 180, 217,
1409 | 258, 259, 236, 171, 237, 172, 334, 128, 129, 173,
1410 | 249, 250, 174, 175, 283, 284, 176, 177, 488, 489,
1411 | 490, 180, 291, 292, 164, 238, 165, 142, 301, 302,
1412 | 303, 304, 305, 306, 307, 308, 309, 310, 502, 241,
1413 | 218, 243, 166, 478, 167, 168, 294, 295, 505, 244,
1414 | 169, 389, 257, 458, 459, 408, 469, 470, 147, 245,
1415 | 147, 218, 377, 377, 509, 470, 279, 370, 370, 467,
1416 | 510, 470, 464, 465, 276, 218, 280, 282, 180, 230,
1417 | 528, 516, 281, 224, 365, 148, 311, 148, 170, 124,
1418 | 224, 319, 147, 366, 171, 147, 172, 147, 367, 368,
1419 | 173, 373, 401, 174, 175, -166, 382, 176, 177, 531,
1420 | 532, 540, 542, 397, 383, -66, -66, -66, -66, 148,
1421 | 224, 400, 148, -66, 148, -66, 386, 402, 428, 553,
1422 | -244, -245, 430, 557, 558, 559, 431, 432, 436, 437,
1423 | 548, 2, 564, 438, 565, 12, 13, 14, 107, 16,
1424 | 17, 443, 444, 445, 571, 446, 455, 468, 377, 471,
1425 | 491, 472, 473, 483, 485, 487, 569, 493, 492, 494,
1426 | 495, 496, 8, 88, 10, 224, 12, 13, 14, 15,
1427 | 16, 17, 18, 19, 20, 21, 22, 23, 497, 321,
1428 | 322, 165, 142, 498, 503, 504, 508, 551, 515, 520,
1429 | 521, 144, 522, 523, 545, 529, 550, 166, 530, 167,
1430 | 168, 554, 533, 98, 525, 169, 3, 4, 5, 6,
1431 | 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1432 | 17, 18, 19, 20, 21, 22, 23, 323, 324, 325,
1433 | 544, 326, 327, 328, 329, 330, 331, 332, 333, 24,
1434 | 25, 552, 129, 138, 563, 566, 567, 568, 570, 171,
1435 | 93, 172, 134, 543, 216, 173, 474, 396, 174, 175,
1436 | 247, 108, 176, 177, 164, 2, 165, 142, 388, 246,
1437 | 512, 100, 511, 384, 457, 442, 239, 251, 407, 411,
1438 | 413, 506, 166, 412, 167, 168, 414, 415, 416, 426,
1439 | 169, 3, 4, 5, 6, 7, 8, 88, 10, 11,
1440 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1441 | 22, 23, 417, 418, 507, 0, 0, 0, 0, 0,
1442 | 0, 0, 0, 0, 0, 524, 0, 0, 0, 0,
1443 | 0, 0, 0, 0, 171, 0, 172, 0, 0, 0,
1444 | 173, 0, 0, 174, 175, 0, 0, 176, 177, 164,
1445 | 2, 165, 142, 0, 0, 0, 0, 0, 0, 0,
1446 | 0, 0, 0, 0, 0, 0, 0, 166, 0, 167,
1447 | 168, 0, 0, 0, 0, 169, 3, 4, 5, 6,
1448 | 7, 8, 88, 10, 11, 12, 13, 14, 15, 16,
1449 | 17, 18, 19, 20, 21, 22, 23, 321, 250, 165,
1450 | 142, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1451 | 0, 0, 0, 0, 0, 166, 0, 167, 168, 171,
1452 | 0, 172, 0, 169, 0, 173, 0, 0, 174, 175,
1453 | 433, 0, 176, 177, 0, 0, 0, 0, 0, 0,
1454 | 0, 0, 0, 0, 0, 323, 324, 325, 0, 326,
1455 | 327, 328, 329, 330, 331, 332, 333, 24, 25, 0,
1456 | 0, 138, 0, 0, 0, 0, 0, 171, 164, 172,
1457 | 165, 142, 0, 173, 0, 0, 174, 175, 0, 0,
1458 | 176, 177, 0, 0, 0, 0, 166, 0, 167, 168,
1459 | 164, 0, 165, 142, 169, 0, 0, 0, 0, 0,
1460 | 0, 0, 0, 0, 0, 0, 0, 0, 166, 0,
1461 | 167, 168, 0, 0, 0, 164, 169, 165, 142, 0,
1462 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1463 | 0, 0, 0, 166, 409, 167, 168, 0, 171, 0,
1464 | 172, 169, 0, 0, 173, 0, 0, 174, 175, 0,
1465 | 0, 176, 177, 0, 420, 0, 0, 0, 0, 0,
1466 | 171, 0, 172, 0, 0, 0, 173, 0, 0, 174,
1467 | 175, 0, 0, 176, 177, 0, 0, 0, 0, 0,
1468 | 0, 0, 0, 0, 0, 171, 425, 172, 0, 0,
1469 | 164, 173, 165, 142, 174, 175, 0, 0, 176, 177,
1470 | 0, 0, 0, 0, 0, 0, 0, 0, 166, 0,
1471 | 167, 168, 164, 0, 165, 142, 169, 0, 0, 0,
1472 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1473 | 166, 0, 167, 168, 0, 0, 0, 164, 169, 165,
1474 | 142, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1475 | 0, 439, 0, 0, 0, 166, 0, 167, 168, 0,
1476 | 171, 0, 172, 169, 0, 0, 173, 0, 0, 174,
1477 | 175, 0, 0, 176, 177, 0, 0, 0, 0, 0,
1478 | 0, 447, 171, 0, 172, 0, 0, 0, 173, 0,
1479 | 0, 174, 175, 0, 0, 176, 177, 0, 0, 0,
1480 | 0, 0, 0, 0, 0, 0, 499, 171, 164, 172,
1481 | 165, 142, 0, 173, 0, 0, 174, 175, 0, 0,
1482 | 176, 177, 0, 0, 0, 0, 166, 0, 167, 168,
1483 | 0, 0, 0, 164, 169, 165, 142, 0, 0, 0,
1484 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1485 | 0, 166, 0, 167, 168, 164, 0, 165, 142, 169,
1486 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 541,
1487 | 0, 0, 0, 166, 0, 167, 168, 0, 171, 0,
1488 | 172, 169, 0, 0, 173, 0, 0, 174, 175, 0,
1489 | 0, 176, 177, 0, 556, 0, 0, 0, 164, 0,
1490 | 165, 142, 0, 171, 0, 172, 0, 0, 0, 173,
1491 | 0, 0, 174, 175, 0, 0, 176, 177, 167, 168,
1492 | 164, 0, 165, 142, 169, 171, 0, 172, 0, 0,
1493 | 0, 173, 0, 0, 174, 175, 0, 0, 176, 177,
1494 | 167, 168, 0, 0, 0, 164, 169, 165, 142, 0,
1495 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1496 | 0, 0, 477, 0, 0, 167, 168, 0, 171, 0,
1497 | 172, 169, 0, 0, 173, 0, 0, 174, 175, 0,
1498 | 0, 176, 177, 0, 0, 0, 0, 0, 0, 0,
1499 | 171, 0, 172, 0, 0, 0, 173, 0, 0, 174,
1500 | 175, 0, 0, 176, 177, 1, 2, 0, 0, 0,
1501 | 0, 0, 0, 0, 0, 254, 0, 172, 0, 0,
1502 | 0, 173, 0, 0, 174, 175, 0, 0, 176, 177,
1503 | 0, 0, 3, 4, 5, 6, 7, 8, 9, 10,
1504 | 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1505 | 21, 22, 23, 1, 2, 0, 0, 0, 0, 0,
1506 | 0, 0, 0, 0, 0, 24, 25, 0, 0, 0,
1507 | 0, 2, 0, 0, 0, 26, 0, 27, 0, 0,
1508 | 3, 4, 5, 6, 7, 8, 88, 10, 11, 12,
1509 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1510 | 23, 2, 8, 88, 10, 0, 12, 13, 14, 15,
1511 | 16, 17, 18, 19, 20, 21, 22, 23, 0, 0,
1512 | 0, 360, 0, 361, 449, 27, 0, 3, 4, 5,
1513 | 6, 7, 8, 88, 10, 11, 12, 13, 14, 15,
1514 | 16, 17, 18, 19, 20, 21, 22, 23, 2, 0,
1515 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1516 | 0, 0, 0, 0, 0, 0, 0, 0, 360, 0,
1517 | 398, 449, 27, 0, 3, 4, 5, 6, 7, 8,
1518 | 88, 10, 11, 12, 13, 14, 15, 16, 17, 18,
1519 | 19, 20, 21, 22, 23, 223, 2, 0, 0, 0,
1520 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1521 | 0, 0, 0, 0, 0, 0, 0, 2, 501, 0,
1522 | 456, 0, 3, 4, 5, 6, 7, 8, 88, 10,
1523 | 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
1524 | 21, 22, 23, 3, 4, 5, 6, 7, 8, 88,
1525 | 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1526 | 20, 21, 22, 23, 2, 0, 0, 0, 0, 0,
1527 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1528 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1529 | 3, 4, 5, 6, 7, 8, 88, 10, 11, 12,
1530 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
1531 | 23
1532 | };
1533 |
1534 | static const yytype_int16 yycheck[] =
1535 | {
1536 | 32, 115, 0, 0, 0, 137, 141, 131, 60, 259,
1537 | 110, 409, 131, 328, 3, 420, 27, 3, 365, 167,
1538 | 168, 169, 3, 22, 172, 173, 174, 175, 176, 177,
1539 | 27, 29, 29, 29, 6, 32, 6, 0, 34, 171,
1540 | 6, 3, 3, 38, 39, 40, 3, 6, 100, 163,
1541 | 0, 170, 6, 400, 224, 3, 3, 4, 27, 111,
1542 | 3, 4, 63, 26, 3, 4, 29, 46, 71, 32,
1543 | 73, 34, 477, 323, 6, 44, 0, 76, 42, 29,
1544 | 69, 113, 134, 64, 73, 483, 75, 73, 3, 85,
1545 | 5, 6, 73, 90, 75, 258, 266, 65, 36, 69,
1546 | 68, 73, 64, 99, 74, 29, 21, 73, 23, 24,
1547 | 360, 73, 73, 75, 29, 74, 73, 231, 75, 73,
1548 | 67, 90, 254, 71, 67, 73, 245, 259, 67, 277,
1549 | 162, 279, 280, 281, 282, 146, 99, 285, 101, 71,
1550 | 3, 63, 290, 141, 66, 293, 278, 116, 296, 118,
1551 | 313, 0, 300, 316, 65, 35, 36, 276, 73, 74,
1552 | 75, 35, 36, 74, 79, 25, 26, 82, 83, 269,
1553 | 222, 86, 87, 171, 65, 71, 145, 146, 75, 73,
1554 | 65, 150, 118, 74, 153, 317, 155, 84, 85, 74,
1555 | 73, 323, 224, 312, 20, 75, 67, 23, 24, 318,
1556 | 319, 333, 452, 235, 74, 520, 521, 522, 71, 116,
1557 | 73, 118, 75, 3, 4, 5, 6, 153, 74, 155,
1558 | 80, 81, 65, 473, 72, 68, 65, 224, 360, 544,
1559 | 69, 21, 67, 23, 24, 74, 551, 487, 145, 29,
1560 | 71, 6, 73, 150, 70, 71, 153, 73, 155, 65,
1561 | 65, 3, 68, 401, 69, 67, 254, 376, 66, 74,
1562 | 73, 409, 70, 71, 71, 234, 73, 67, 75, 266,
1563 | 71, 395, 73, 397, 393, 66, 395, 67, 397, 74,
1564 | 70, 71, 64, 73, 64, 75, 338, 64, 65, 79,
1565 | 3, 4, 82, 83, 18, 19, 86, 87, 430, 431,
1566 | 432, 420, 27, 28, 3, 68, 5, 6, 8, 9,
1567 | 10, 11, 12, 13, 14, 15, 16, 17, 453, 68,
1568 | 452, 68, 21, 471, 23, 24, 82, 83, 460, 65,
1569 | 29, 3, 4, 3, 4, 483, 64, 65, 116, 66,
1570 | 118, 473, 374, 375, 64, 65, 21, 461, 462, 468,
1571 | 64, 65, 374, 375, 73, 487, 77, 79, 477, 6,
1572 | 492, 480, 78, 361, 361, 116, 66, 118, 67, 365,
1573 | 368, 65, 150, 74, 73, 153, 75, 155, 65, 65,
1574 | 79, 64, 74, 82, 83, 69, 68, 86, 87, 503,
1575 | 504, 523, 524, 69, 68, 63, 64, 65, 66, 150,
1576 | 398, 398, 153, 71, 155, 73, 68, 74, 72, 541,
1577 | 69, 69, 73, 545, 546, 547, 73, 73, 3, 64,
1578 | 534, 4, 554, 64, 556, 39, 40, 41, 42, 43,
1579 | 44, 69, 69, 69, 566, 64, 3, 69, 470, 74,
1580 | 56, 72, 7, 69, 72, 7, 560, 64, 73, 64,
1581 | 68, 72, 35, 36, 37, 453, 39, 40, 41, 42,
1582 | 43, 44, 45, 46, 47, 48, 49, 50, 74, 3,
1583 | 4, 5, 6, 74, 72, 72, 64, 54, 74, 74,
1584 | 74, 64, 74, 73, 64, 72, 64, 21, 74, 23,
1585 | 24, 64, 74, 525, 492, 29, 30, 31, 32, 33,
1586 | 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
1587 | 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1588 | 74, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1589 | 64, 74, 65, 67, 64, 64, 74, 74, 64, 73,
1590 | 29, 75, 100, 525, 133, 79, 393, 264, 82, 83,
1591 | 162, 43, 86, 87, 3, 4, 5, 6, 254, 161,
1592 | 470, 32, 468, 244, 368, 338, 150, 166, 277, 279,
1593 | 281, 461, 21, 280, 23, 24, 282, 285, 290, 318,
1594 | 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
1595 | 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
1596 | 49, 50, 293, 296, 462, -1, -1, -1, -1, -1,
1597 | -1, -1, -1, -1, -1, 64, -1, -1, -1, -1,
1598 | -1, -1, -1, -1, 73, -1, 75, -1, -1, -1,
1599 | 79, -1, -1, 82, 83, -1, -1, 86, 87, 3,
1600 | 4, 5, 6, -1, -1, -1, -1, -1, -1, -1,
1601 | -1, -1, -1, -1, -1, -1, -1, 21, -1, 23,
1602 | 24, -1, -1, -1, -1, 29, 30, 31, 32, 33,
1603 | 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
1604 | 44, 45, 46, 47, 48, 49, 50, 3, 4, 5,
1605 | 6, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1606 | -1, -1, -1, -1, -1, 21, -1, 23, 24, 73,
1607 | -1, 75, -1, 29, -1, 79, -1, -1, 82, 83,
1608 | 36, -1, 86, 87, -1, -1, -1, -1, -1, -1,
1609 | -1, -1, -1, -1, -1, 51, 52, 53, -1, 55,
1610 | 56, 57, 58, 59, 60, 61, 62, 63, 64, -1,
1611 | -1, 67, -1, -1, -1, -1, -1, 73, 3, 75,
1612 | 5, 6, -1, 79, -1, -1, 82, 83, -1, -1,
1613 | 86, 87, -1, -1, -1, -1, 21, -1, 23, 24,
1614 | 3, -1, 5, 6, 29, -1, -1, -1, -1, -1,
1615 | -1, -1, -1, -1, -1, -1, -1, -1, 21, -1,
1616 | 23, 24, -1, -1, -1, 3, 29, 5, 6, -1,
1617 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1618 | -1, -1, -1, 21, 69, 23, 24, -1, 73, -1,
1619 | 75, 29, -1, -1, 79, -1, -1, 82, 83, -1,
1620 | -1, 86, 87, -1, 67, -1, -1, -1, -1, -1,
1621 | 73, -1, 75, -1, -1, -1, 79, -1, -1, 82,
1622 | 83, -1, -1, 86, 87, -1, -1, -1, -1, -1,
1623 | -1, -1, -1, -1, -1, 73, 74, 75, -1, -1,
1624 | 3, 79, 5, 6, 82, 83, -1, -1, 86, 87,
1625 | -1, -1, -1, -1, -1, -1, -1, -1, 21, -1,
1626 | 23, 24, 3, -1, 5, 6, 29, -1, -1, -1,
1627 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1628 | 21, -1, 23, 24, -1, -1, -1, 3, 29, 5,
1629 | 6, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1630 | -1, 64, -1, -1, -1, 21, -1, 23, 24, -1,
1631 | 73, -1, 75, 29, -1, -1, 79, -1, -1, 82,
1632 | 83, -1, -1, 86, 87, -1, -1, -1, -1, -1,
1633 | -1, 72, 73, -1, 75, -1, -1, -1, 79, -1,
1634 | -1, 82, 83, -1, -1, 86, 87, -1, -1, -1,
1635 | -1, -1, -1, -1, -1, -1, 72, 73, 3, 75,
1636 | 5, 6, -1, 79, -1, -1, 82, 83, -1, -1,
1637 | 86, 87, -1, -1, -1, -1, 21, -1, 23, 24,
1638 | -1, -1, -1, 3, 29, 5, 6, -1, -1, -1,
1639 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1640 | -1, 21, -1, 23, 24, 3, -1, 5, 6, 29,
1641 | -1, -1, -1, -1, -1, -1, -1, -1, -1, 64,
1642 | -1, -1, -1, 21, -1, 23, 24, -1, 73, -1,
1643 | 75, 29, -1, -1, 79, -1, -1, 82, 83, -1,
1644 | -1, 86, 87, -1, 64, -1, -1, -1, 3, -1,
1645 | 5, 6, -1, 73, -1, 75, -1, -1, -1, 79,
1646 | -1, -1, 82, 83, -1, -1, 86, 87, 23, 24,
1647 | 3, -1, 5, 6, 29, 73, -1, 75, -1, -1,
1648 | -1, 79, -1, -1, 82, 83, -1, -1, 86, 87,
1649 | 23, 24, -1, -1, -1, 3, 29, 5, 6, -1,
1650 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1651 | -1, -1, 67, -1, -1, 23, 24, -1, 73, -1,
1652 | 75, 29, -1, -1, 79, -1, -1, 82, 83, -1,
1653 | -1, 86, 87, -1, -1, -1, -1, -1, -1, -1,
1654 | 73, -1, 75, -1, -1, -1, 79, -1, -1, 82,
1655 | 83, -1, -1, 86, 87, 3, 4, -1, -1, -1,
1656 | -1, -1, -1, -1, -1, 73, -1, 75, -1, -1,
1657 | -1, 79, -1, -1, 82, 83, -1, -1, 86, 87,
1658 | -1, -1, 30, 31, 32, 33, 34, 35, 36, 37,
1659 | 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1660 | 48, 49, 50, 3, 4, -1, -1, -1, -1, -1,
1661 | -1, -1, -1, -1, -1, 63, 64, -1, -1, -1,
1662 | -1, 4, -1, -1, -1, 73, -1, 75, -1, -1,
1663 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1664 | 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
1665 | 50, 4, 35, 36, 37, -1, 39, 40, 41, 42,
1666 | 43, 44, 45, 46, 47, 48, 49, 50, -1, -1,
1667 | -1, 71, -1, 73, 74, 75, -1, 30, 31, 32,
1668 | 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
1669 | 43, 44, 45, 46, 47, 48, 49, 50, 4, -1,
1670 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1671 | -1, -1, -1, -1, -1, -1, -1, -1, 71, -1,
1672 | 73, 74, 75, -1, 30, 31, 32, 33, 34, 35,
1673 | 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
1674 | 46, 47, 48, 49, 50, 3, 4, -1, -1, -1,
1675 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1676 | -1, -1, -1, -1, -1, -1, -1, 4, 74, -1,
1677 | 7, -1, 30, 31, 32, 33, 34, 35, 36, 37,
1678 | 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1679 | 48, 49, 50, 30, 31, 32, 33, 34, 35, 36,
1680 | 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
1681 | 47, 48, 49, 50, 4, -1, -1, -1, -1, -1,
1682 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1683 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1684 | 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
1685 | 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
1686 | 50
1687 | };
1688 |
1689 | /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
1690 | state STATE-NUM. */
1691 | static const yytype_int16 yystos[] =
1692 | {
1693 | 0, 3, 4, 30, 31, 32, 33, 34, 35, 36,
1694 | 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
1695 | 47, 48, 49, 50, 63, 64, 73, 75, 89, 90,
1696 | 91, 93, 94, 95, 110, 111, 112, 113, 117, 119,
1697 | 120, 121, 122, 123, 124, 125, 126, 127, 129, 130,
1698 | 137, 139, 140, 143, 145, 146, 149, 164, 166, 167,
1699 | 168, 169, 170, 172, 204, 253, 254, 63, 46, 42,
1700 | 3, 4, 67, 144, 3, 4, 67, 150, 3, 4,
1701 | 67, 138, 36, 73, 109, 110, 111, 170, 36, 110,
1702 | 118, 119, 0, 91, 64, 96, 98, 99, 109, 110,
1703 | 168, 73, 170, 71, 95, 95, 95, 42, 124, 119,
1704 | 165, 92, 93, 94, 73, 73, 141, 67, 147, 67,
1705 | 131, 67, 170, 74, 111, 74, 110, 119, 64, 65,
1706 | 63, 66, 100, 258, 92, 170, 72, 114, 67, 179,
1707 | 93, 171, 6, 247, 64, 118, 120, 140, 146, 151,
1708 | 152, 153, 154, 142, 151, 148, 3, 133, 134, 135,
1709 | 136, 132, 97, 73, 3, 5, 21, 23, 24, 29,
1710 | 67, 73, 75, 79, 82, 83, 86, 87, 101, 116,
1711 | 208, 210, 211, 212, 213, 214, 215, 216, 218, 220,
1712 | 222, 224, 226, 227, 228, 229, 230, 231, 232, 233,
1713 | 234, 235, 236, 237, 238, 239, 240, 241, 242, 243,
1714 | 244, 245, 246, 247, 248, 259, 100, 74, 206, 207,
1715 | 208, 251, 180, 3, 94, 173, 174, 175, 176, 177,
1716 | 6, 69, 74, 120, 118, 155, 64, 64, 68, 153,
1717 | 151, 68, 151, 68, 65, 66, 133, 98, 247, 3,
1718 | 4, 198, 226, 226, 73, 226, 3, 4, 70, 71,
1719 | 101, 102, 103, 104, 105, 163, 94, 128, 206, 249,
1720 | 226, 226, 226, 226, 226, 226, 73, 22, 76, 21,
1721 | 77, 78, 79, 18, 19, 217, 25, 26, 80, 81,
1722 | 219, 27, 28, 221, 82, 83, 223, 75, 84, 85,
1723 | 225, 8, 9, 10, 11, 12, 13, 14, 15, 16,
1724 | 17, 66, 209, 20, 23, 24, 70, 71, 73, 65,
1725 | 115, 3, 4, 51, 52, 53, 55, 56, 57, 58,
1726 | 59, 60, 61, 62, 93, 178, 179, 182, 183, 184,
1727 | 185, 186, 187, 188, 189, 190, 194, 195, 196, 197,
1728 | 198, 199, 200, 201, 202, 203, 204, 205, 206, 253,
1729 | 71, 73, 107, 108, 109, 110, 74, 65, 65, 71,
1730 | 247, 255, 256, 64, 156, 157, 69, 109, 158, 159,
1731 | 160, 161, 68, 68, 135, 208, 68, 74, 128, 3,
1732 | 163, 106, 251, 65, 68, 66, 104, 69, 73, 107,
1733 | 110, 74, 74, 179, 74, 208, 252, 212, 226, 69,
1734 | 206, 213, 214, 215, 216, 218, 220, 222, 224, 226,
1735 | 67, 208, 163, 163, 206, 74, 252, 208, 72, 251,
1736 | 73, 73, 73, 36, 178, 191, 3, 64, 64, 64,
1737 | 206, 181, 184, 69, 69, 69, 64, 72, 251, 74,
1738 | 107, 175, 71, 73, 108, 3, 7, 177, 3, 4,
1739 | 73, 65, 69, 74, 158, 158, 162, 208, 69, 64,
1740 | 65, 74, 72, 7, 103, 101, 101, 67, 226, 250,
1741 | 65, 74, 210, 69, 102, 72, 74, 7, 206, 206,
1742 | 206, 56, 73, 64, 64, 68, 72, 74, 74, 72,
1743 | 251, 74, 175, 72, 72, 206, 256, 255, 64, 64,
1744 | 64, 162, 159, 251, 102, 74, 208, 210, 68, 251,
1745 | 74, 74, 74, 73, 64, 94, 192, 193, 206, 72,
1746 | 74, 247, 247, 74, 69, 74, 68, 178, 178, 178,
1747 | 206, 64, 206, 96, 74, 64, 73, 73, 247, 257,
1748 | 64, 54, 74, 206, 64, 178, 64, 206, 206, 206,
1749 | 65, 74, 178, 64, 206, 206, 64, 74, 74, 247,
1750 | 64, 206
1751 | };
1752 |
1753 | /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
1754 | static const yytype_int16 yyr1[] =
1755 | {
1756 | 0, 88, 89, 89, 90, 90, 91, 91, 91, 91,
1757 | 92, 92, 93, 93, 94, 95, 95, 95, 95, 95,
1758 | 95, 96, 97, 96, 98, 99, 99, 99, 99, 100,
1759 | 101, 101, 102, 102, 102, 102, 103, 103, 103, 104,
1760 | 104, 105, 105, 106, 106, 107, 107, 107, 108, 108,
1761 | 108, 108, 108, 108, 108, 108, 108, 109, 109, 110,
1762 | 110, 110, 110, 111, 111, 111, 111, 112, 113, 114,
1763 | 115, 113, 116, 117, 117, 117, 117, 117, 117, 118,
1764 | 118, 119, 119, 120, 121, 121, 121, 121, 121, 121,
1765 | 121, 121, 122, 122, 122, 122, 123, 123, 123, 124,
1766 | 124, 124, 124, 124, 124, 125, 126, 127, 128, 128,
1767 | 129, 129, 131, 130, 132, 130, 133, 133, 134, 134,
1768 | 135, 135, 136, 137, 138, 138, 139, 139, 141, 140,
1769 | 142, 140, 143, 144, 144, 145, 145, 147, 146, 148,
1770 | 146, 149, 150, 150, 151, 151, 152, 152, 153, 153,
1771 | 153, 153, 155, 154, 156, 154, 157, 154, 158, 158,
1772 | 159, 159, 160, 161, 161, 162, 163, 163, 165, 164,
1773 | 166, 167, 167, 167, 167, 168, 169, 169, 169, 169,
1774 | 171, 170, 172, 173, 173, 173, 174, 174, 175, 175,
1775 | 176, 176, 177, 177, 177, 178, 178, 178, 178, 178,
1776 | 178, 178, 178, 178, 178, 178, 178, 180, 181, 179,
1777 | 182, 182, 183, 183, 184, 184, 185, 185, 186, 187,
1778 | 188, 188, 188, 189, 191, 190, 192, 192, 192, 192,
1779 | 192, 192, 192, 192, 193, 193, 193, 194, 195, 195,
1780 | 195, 196, 196, 197, 198, 198, 199, 200, 201, 202,
1781 | 203, 204, 205, 205, 206, 207, 207, 208, 208, 208,
1782 | 208, 209, 209, 209, 209, 209, 209, 209, 209, 209,
1783 | 209, 209, 210, 210, 210, 211, 211, 212, 212, 213,
1784 | 213, 214, 214, 215, 215, 216, 216, 217, 217, 218,
1785 | 218, 219, 219, 219, 219, 220, 220, 221, 221, 222,
1786 | 222, 223, 223, 224, 224, 225, 225, 225, 226, 226,
1787 | 226, 226, 226, 226, 226, 226, 226, 226, 226, 227,
1788 | 228, 229, 229, 230, 231, 232, 233, 234, 234, 235,
1789 | 236, 237, 237, 237, 237, 237, 237, 237, 238, 238,
1790 | 239, 240, 241, 241, 242, 242, 243, 244, 245, 246,
1791 | 246, 246, 246, 247, 247, 248, 249, 250, 248, 251,
1792 | 252, 252, 253, 253, 253, 253, 254, 254, 254, 255,
1793 | 255, 255, 256, 256, 256, 257, 257, 257, 258, 259
1794 | };
1795 |
1796 | /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
1797 | static const yytype_int8 yyr2[] =
1798 | {
1799 | 0, 2, 0, 1, 1, 2, 1, 1, 1, 1,
1800 | 1, 2, 3, 2, 1, 1, 2, 1, 2, 1,
1801 | 2, 1, 0, 4, 1, 1, 2, 2, 3, 2,
1802 | 1, 3, 0, 1, 3, 2, 1, 3, 3, 2,
1803 | 3, 1, 2, 1, 3, 1, 2, 1, 3, 2,
1804 | 3, 3, 4, 2, 3, 3, 4, 1, 2, 1,
1805 | 2, 2, 3, 1, 3, 1, 1, 1, 3, 0,
1806 | 0, 6, 1, 1, 1, 1, 1, 1, 1, 1,
1807 | 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1808 | 1, 1, 1, 1, 2, 2, 1, 2, 2, 1,
1809 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1810 | 1, 1, 0, 5, 0, 6, 1, 2, 1, 3,
1811 | 1, 3, 1, 2, 1, 1, 1, 1, 0, 5,
1812 | 0, 6, 2, 1, 1, 1, 1, 0, 5, 0,
1813 | 6, 2, 1, 1, 0, 1, 1, 2, 1, 2,
1814 | 2, 1, 0, 4, 0, 5, 0, 5, 1, 3,
1815 | 1, 1, 1, 2, 3, 1, 1, 1, 0, 3,
1816 | 1, 1, 2, 2, 3, 1, 1, 3, 2, 4,
1817 | 0, 5, 1, 0, 1, 1, 1, 3, 1, 3,
1818 | 1, 3, 2, 1, 2, 1, 1, 1, 1, 1,
1819 | 1, 1, 1, 1, 1, 1, 1, 0, 0, 5,
1820 | 0, 1, 1, 2, 1, 1, 1, 1, 7, 5,
1821 | 1, 1, 1, 7, 0, 6, 2, 3, 3, 3,
1822 | 4, 4, 4, 5, 1, 2, 1, 5, 2, 2,
1823 | 2, 2, 4, 1, 1, 1, 5, 2, 2, 2,
1824 | 3, 1, 2, 3, 1, 1, 3, 1, 1, 3,
1825 | 5, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1826 | 1, 1, 1, 5, 4, 1, 3, 1, 3, 1,
1827 | 3, 1, 3, 1, 3, 1, 3, 1, 1, 1,
1828 | 3, 1, 1, 1, 1, 1, 3, 1, 1, 1,
1829 | 3, 1, 1, 1, 3, 1, 1, 1, 1, 1,
1830 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1831 | 2, 4, 6, 2, 2, 2, 2, 4, 2, 2,
1832 | 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1833 | 3, 3, 3, 4, 3, 4, 2, 2, 4, 1,
1834 | 1, 1, 1, 1, 2, 3, 0, 0, 5, 1,
1835 | 1, 3, 5, 7, 9, 11, 1, 2, 2, 0,
1836 | 1, 3, 7, 7, 4, 0, 1, 3, 4, 2
1837 | };
1838 |
1839 |
1840 | enum { YYENOMEM = -2 };
1841 |
1842 | #define yyerrok (yyerrstatus = 0)
1843 | #define yyclearin (yychar = YYEMPTY)
1844 |
1845 | #define YYACCEPT goto yyacceptlab
1846 | #define YYABORT goto yyabortlab
1847 | #define YYERROR goto yyerrorlab
1848 | #define YYNOMEM goto yyexhaustedlab
1849 |
1850 |
1851 | #define YYRECOVERING() (!!yyerrstatus)
1852 |
1853 | #define YYBACKUP(Token, Value) \
1854 | do \
1855 | if (yychar == YYEMPTY) \
1856 | { \
1857 | yychar = (Token); \
1858 | yylval = (Value); \
1859 | YYPOPSTACK (yylen); \
1860 | yystate = *yyssp; \
1861 | goto yybackup; \
1862 | } \
1863 | else \
1864 | { \
1865 | yyerror (YY_("syntax error: cannot back up")); \
1866 | YYERROR; \
1867 | } \
1868 | while (0)
1869 |
1870 | /* Backward compatibility with an undocumented macro.
1871 | Use YYerror or YYUNDEF. */
1872 | #define YYERRCODE YYUNDEF
1873 |
1874 |
1875 | /* Enable debugging if requested. */
1876 | #if YYDEBUG
1877 |
1878 | # ifndef YYFPRINTF
1879 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1880 | # define YYFPRINTF fprintf
1881 | # endif
1882 |
1883 | # define YYDPRINTF(Args) \
1884 | do { \
1885 | if (yydebug) \
1886 | YYFPRINTF Args; \
1887 | } while (0)
1888 |
1889 |
1890 |
1891 |
1892 | # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
1893 | do { \
1894 | if (yydebug) \
1895 | { \
1896 | YYFPRINTF (stderr, "%s ", Title); \
1897 | yy_symbol_print (stderr, \
1898 | Kind, Value); \
1899 | YYFPRINTF (stderr, "\n"); \
1900 | } \
1901 | } while (0)
1902 |
1903 |
1904 | /*-----------------------------------.
1905 | | Print this symbol's value on YYO. |
1906 | `-----------------------------------*/
1907 |
1908 | static void
1909 | yy_symbol_value_print (FILE *yyo,
1910 | yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
1911 | {
1912 | FILE *yyoutput = yyo;
1913 | YY_USE (yyoutput);
1914 | if (!yyvaluep)
1915 | return;
1916 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1917 | YY_USE (yykind);
1918 | YY_IGNORE_MAYBE_UNINITIALIZED_END
1919 | }
1920 |
1921 |
1922 | /*---------------------------.
1923 | | Print this symbol on YYO. |
1924 | `---------------------------*/
1925 |
1926 | static void
1927 | yy_symbol_print (FILE *yyo,
1928 | yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep)
1929 | {
1930 | YYFPRINTF (yyo, "%s %s (",
1931 | yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
1932 |
1933 | yy_symbol_value_print (yyo, yykind, yyvaluep);
1934 | YYFPRINTF (yyo, ")");
1935 | }
1936 |
1937 | /*------------------------------------------------------------------.
1938 | | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1939 | | TOP (included). |
1940 | `------------------------------------------------------------------*/
1941 |
1942 | static void
1943 | yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
1944 | {
1945 | YYFPRINTF (stderr, "Stack now");
1946 | for (; yybottom <= yytop; yybottom++)
1947 | {
1948 | int yybot = *yybottom;
1949 | YYFPRINTF (stderr, " %d", yybot);
1950 | }
1951 | YYFPRINTF (stderr, "\n");
1952 | }
1953 |
1954 | # define YY_STACK_PRINT(Bottom, Top) \
1955 | do { \
1956 | if (yydebug) \
1957 | yy_stack_print ((Bottom), (Top)); \
1958 | } while (0)
1959 |
1960 |
1961 | /*------------------------------------------------.
1962 | | Report that the YYRULE is going to be reduced. |
1963 | `------------------------------------------------*/
1964 |
1965 | static void
1966 | yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
1967 | int yyrule)
1968 | {
1969 | int yylno = yyrline[yyrule];
1970 | int yynrhs = yyr2[yyrule];
1971 | int yyi;
1972 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
1973 | yyrule - 1, yylno);
1974 | /* The symbols being reduced. */
1975 | for (yyi = 0; yyi < yynrhs; yyi++)
1976 | {
1977 | YYFPRINTF (stderr, " $%d = ", yyi + 1);
1978 | yy_symbol_print (stderr,
1979 | YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
1980 | &yyvsp[(yyi + 1) - (yynrhs)]);
1981 | YYFPRINTF (stderr, "\n");
1982 | }
1983 | }
1984 |
1985 | # define YY_REDUCE_PRINT(Rule) \
1986 | do { \
1987 | if (yydebug) \
1988 | yy_reduce_print (yyssp, yyvsp, Rule); \
1989 | } while (0)
1990 |
1991 | /* Nonzero means print parse trace. It is left uninitialized so that
1992 | multiple parsers can coexist. */
1993 | int yydebug;
1994 | #else /* !YYDEBUG */
1995 | # define YYDPRINTF(Args) ((void) 0)
1996 | # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1997 | # define YY_STACK_PRINT(Bottom, Top)
1998 | # define YY_REDUCE_PRINT(Rule)
1999 | #endif /* !YYDEBUG */
2000 |
2001 |
2002 | /* YYINITDEPTH -- initial size of the parser's stacks. */
2003 | #ifndef YYINITDEPTH
2004 | # define YYINITDEPTH 200
2005 | #endif
2006 |
2007 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
2008 | if the built-in stack extension method is used).
2009 |
2010 | Do not make this value too large; the results are undefined if
2011 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
2012 | evaluated with infinite-precision integer arithmetic. */
2013 |
2014 | #ifndef YYMAXDEPTH
2015 | # define YYMAXDEPTH 10000
2016 | #endif
2017 |
2018 |
2019 |
2020 |
2021 |
2022 |
2023 | /*-----------------------------------------------.
2024 | | Release the memory associated to this symbol. |
2025 | `-----------------------------------------------*/
2026 |
2027 | static void
2028 | yydestruct (const char *yymsg,
2029 | yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
2030 | {
2031 | YY_USE (yyvaluep);
2032 | if (!yymsg)
2033 | yymsg = "Deleting";
2034 | YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
2035 |
2036 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2037 | YY_USE (yykind);
2038 | YY_IGNORE_MAYBE_UNINITIALIZED_END
2039 | }
2040 |
2041 |
2042 | /* Lookahead token kind. */
2043 | int yychar;
2044 |
2045 | /* The semantic value of the lookahead symbol. */
2046 | YYSTYPE yylval;
2047 | /* Number of syntax errors so far. */
2048 | int yynerrs;
2049 |
2050 |
2051 |
2052 |
2053 | /*----------.
2054 | | yyparse. |
2055 | `----------*/
2056 |
2057 | int
2058 | yyparse (void)
2059 | {
2060 | yy_state_fast_t yystate = 0;
2061 | /* Number of tokens to shift before error messages enabled. */
2062 | int yyerrstatus = 0;
2063 |
2064 | /* Refer to the stacks through separate pointers, to allow yyoverflow
2065 | to reallocate them elsewhere. */
2066 |
2067 | /* Their size. */
2068 | YYPTRDIFF_T yystacksize = YYINITDEPTH;
2069 |
2070 | /* The state stack: array, bottom, top. */
2071 | yy_state_t yyssa[YYINITDEPTH];
2072 | yy_state_t *yyss = yyssa;
2073 | yy_state_t *yyssp = yyss;
2074 |
2075 | /* The semantic value stack: array, bottom, top. */
2076 | YYSTYPE yyvsa[YYINITDEPTH];
2077 | YYSTYPE *yyvs = yyvsa;
2078 | YYSTYPE *yyvsp = yyvs;
2079 |
2080 | int yyn;
2081 | /* The return value of yyparse. */
2082 | int yyresult;
2083 | /* Lookahead symbol kind. */
2084 | yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
2085 | /* The variables used to return semantic value and location from the
2086 | action routines. */
2087 | YYSTYPE yyval;
2088 |
2089 |
2090 |
2091 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2092 |
2093 | /* The number of symbols on the RHS of the reduced rule.
2094 | Keep to zero when no symbol should be popped. */
2095 | int yylen = 0;
2096 |
2097 | YYDPRINTF ((stderr, "Starting parse\n"));
2098 |
2099 | yychar = YYEMPTY; /* Cause a token to be read. */
2100 |
2101 | goto yysetstate;
2102 |
2103 |
2104 | /*------------------------------------------------------------.
2105 | | yynewstate -- push a new state, which is found in yystate. |
2106 | `------------------------------------------------------------*/
2107 | yynewstate:
2108 | /* In all cases, when you get here, the value and location stacks
2109 | have just been pushed. So pushing a state here evens the stacks. */
2110 | yyssp++;
2111 |
2112 |
2113 | /*--------------------------------------------------------------------.
2114 | | yysetstate -- set current state (the top of the stack) to yystate. |
2115 | `--------------------------------------------------------------------*/
2116 | yysetstate:
2117 | YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2118 | YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
2119 | YY_IGNORE_USELESS_CAST_BEGIN
2120 | *yyssp = YY_CAST (yy_state_t, yystate);
2121 | YY_IGNORE_USELESS_CAST_END
2122 | YY_STACK_PRINT (yyss, yyssp);
2123 |
2124 | if (yyss + yystacksize - 1 <= yyssp)
2125 | #if !defined yyoverflow && !defined YYSTACK_RELOCATE
2126 | YYNOMEM;
2127 | #else
2128 | {
2129 | /* Get the current used size of the three stacks, in elements. */
2130 | YYPTRDIFF_T yysize = yyssp - yyss + 1;
2131 |
2132 | # if defined yyoverflow
2133 | {
2134 | /* Give user a chance to reallocate the stack. Use copies of
2135 | these so that the &'s don't force the real ones into
2136 | memory. */
2137 | yy_state_t *yyss1 = yyss;
2138 | YYSTYPE *yyvs1 = yyvs;
2139 |
2140 | /* Each stack pointer address is followed by the size of the
2141 | data in use in that stack, in bytes. This used to be a
2142 | conditional around just the two extra args, but that might
2143 | be undefined if yyoverflow is a macro. */
2144 | yyoverflow (YY_("memory exhausted"),
2145 | &yyss1, yysize * YYSIZEOF (*yyssp),
2146 | &yyvs1, yysize * YYSIZEOF (*yyvsp),
2147 | &yystacksize);
2148 | yyss = yyss1;
2149 | yyvs = yyvs1;
2150 | }
2151 | # else /* defined YYSTACK_RELOCATE */
2152 | /* Extend the stack our own way. */
2153 | if (YYMAXDEPTH <= yystacksize)
2154 | YYNOMEM;
2155 | yystacksize *= 2;
2156 | if (YYMAXDEPTH < yystacksize)
2157 | yystacksize = YYMAXDEPTH;
2158 |
2159 | {
2160 | yy_state_t *yyss1 = yyss;
2161 | union yyalloc *yyptr =
2162 | YY_CAST (union yyalloc *,
2163 | YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
2164 | if (! yyptr)
2165 | YYNOMEM;
2166 | YYSTACK_RELOCATE (yyss_alloc, yyss);
2167 | YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2168 | # undef YYSTACK_RELOCATE
2169 | if (yyss1 != yyssa)
2170 | YYSTACK_FREE (yyss1);
2171 | }
2172 | # endif
2173 |
2174 | yyssp = yyss + yysize - 1;
2175 | yyvsp = yyvs + yysize - 1;
2176 |
2177 | YY_IGNORE_USELESS_CAST_BEGIN
2178 | YYDPRINTF ((stderr, "Stack size increased to %ld\n",
2179 | YY_CAST (long, yystacksize)));
2180 | YY_IGNORE_USELESS_CAST_END
2181 |
2182 | if (yyss + yystacksize - 1 <= yyssp)
2183 | YYABORT;
2184 | }
2185 | #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
2186 |
2187 |
2188 | if (yystate == YYFINAL)
2189 | YYACCEPT;
2190 |
2191 | goto yybackup;
2192 |
2193 |
2194 | /*-----------.
2195 | | yybackup. |
2196 | `-----------*/
2197 | yybackup:
2198 | /* Do appropriate processing given the current state. Read a
2199 | lookahead token if we need one and don't already have one. */
2200 |
2201 | /* First try to decide what to do without reference to lookahead token. */
2202 | yyn = yypact[yystate];
2203 | if (yypact_value_is_default (yyn))
2204 | goto yydefault;
2205 |
2206 | /* Not known => get a lookahead token if don't already have one. */
2207 |
2208 | /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
2209 | if (yychar == YYEMPTY)
2210 | {
2211 | YYDPRINTF ((stderr, "Reading a token\n"));
2212 | yychar = yylex ();
2213 | }
2214 |
2215 | if (yychar <= YYEOF)
2216 | {
2217 | yychar = YYEOF;
2218 | yytoken = YYSYMBOL_YYEOF;
2219 | YYDPRINTF ((stderr, "Now at end of input.\n"));
2220 | }
2221 | else if (yychar == YYerror)
2222 | {
2223 | /* The scanner already issued an error message, process directly
2224 | to error recovery. But do not keep the error token as
2225 | lookahead, it is too special and may lead us to an endless
2226 | loop in error recovery. */
2227 | yychar = YYUNDEF;
2228 | yytoken = YYSYMBOL_YYerror;
2229 | goto yyerrlab1;
2230 | }
2231 | else
2232 | {
2233 | yytoken = YYTRANSLATE (yychar);
2234 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2235 | }
2236 |
2237 | /* If the proper action on seeing token YYTOKEN is to reduce or to
2238 | detect an error, take that action. */
2239 | yyn += yytoken;
2240 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2241 | goto yydefault;
2242 | yyn = yytable[yyn];
2243 | if (yyn <= 0)
2244 | {
2245 | if (yytable_value_is_error (yyn))
2246 | goto yyerrlab;
2247 | yyn = -yyn;
2248 | goto yyreduce;
2249 | }
2250 |
2251 | /* Count tokens shifted since error; after three, turn off error
2252 | status. */
2253 | if (yyerrstatus)
2254 | yyerrstatus--;
2255 |
2256 | /* Shift the lookahead token. */
2257 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2258 | yystate = yyn;
2259 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2260 | *++yyvsp = yylval;
2261 | YY_IGNORE_MAYBE_UNINITIALIZED_END
2262 |
2263 | /* Discard the shifted token. */
2264 | yychar = YYEMPTY;
2265 | goto yynewstate;
2266 |
2267 |
2268 | /*-----------------------------------------------------------.
2269 | | yydefault -- do the default action for the current state. |
2270 | `-----------------------------------------------------------*/
2271 | yydefault:
2272 | yyn = yydefact[yystate];
2273 | if (yyn == 0)
2274 | goto yyerrlab;
2275 | goto yyreduce;
2276 |
2277 |
2278 | /*-----------------------------.
2279 | | yyreduce -- do a reduction. |
2280 | `-----------------------------*/
2281 | yyreduce:
2282 | /* yyn is the number of a rule to reduce with. */
2283 | yylen = yyr2[yyn];
2284 |
2285 | /* If YYLEN is nonzero, implement the default value of the action:
2286 | '$$ = $1'.
2287 |
2288 | Otherwise, the following line sets YYVAL to garbage.
2289 | This behavior is undocumented and Bison
2290 | users should not rely upon it. Assigning to YYVAL
2291 | unconditionally makes the parser a bit smaller, and it avoids a
2292 | GCC warning that YYVAL may be used uninitialized. */
2293 | yyval = yyvsp[1-yylen];
2294 |
2295 |
2296 | YY_REDUCE_PRINT (yyn);
2297 | switch (yyn)
2298 | {
2299 | case 6: /* top_level_declaration: declaration */
2300 | #line 178 "./parse.y"
2301 | { scope=0; reset(); common_comment=NULL; in_typedef=0; GetCurrentComment(); }
2302 | #line 2303 "y.tab.c"
2303 | break;
2304 |
2305 | case 7: /* top_level_declaration: function_definition */
2306 | #line 180 "./parse.y"
2307 | { scope=0; reset(); common_comment=NULL; in_typedef=0; GetCurrentComment(); }
2308 | #line 2309 "y.tab.c"
2309 | break;
2310 |
2311 | case 10: /* declaration_list: declaration */
2312 | #line 189 "./parse.y"
2313 | { scope=0; reset(); common_comment=NULL; in_typedef=0; }
2314 | #line 2315 "y.tab.c"
2315 | break;
2316 |
2317 | case 11: /* declaration_list: declaration_list declaration */
2318 | #line 191 "./parse.y"
2319 | { scope=0; reset(); common_comment=NULL; in_typedef=0;
2320 | yyval=yyvsp[0]; }
2321 | #line 2322 "y.tab.c"
2322 | break;
2323 |
2324 | case 12: /* declaration: declaration_specifiers initialized_declarator_list ';' */
2325 | #line 197 "./parse.y"
2326 | { in_type_spec=0; }
2327 | #line 2328 "y.tab.c"
2328 | break;
2329 |
2330 | case 13: /* declaration: declaration_specifiers ';' */
2331 | #line 199 "./parse.y"
2332 | { in_type_spec=0; }
2333 | #line 2334 "y.tab.c"
2334 | break;
2335 |
2336 | case 14: /* declaration_specifiers: declaration_specifiers1 */
2337 | #line 204 "./parse.y"
2338 | { if(!in_structunion && !in_typedef && !in_function && !common_comment)
2339 | {common_comment=CopyString(GetCurrentComment()); SetCurrentComment(common_comment);} }
2340 | #line 2341 "y.tab.c"
2341 | break;
2342 |
2343 | case 16: /* declaration_specifiers1: storage_class_specifier declaration_specifiers1 */
2344 | #line 211 "./parse.y"
2345 | { if(yyvsp[-1]) yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); else yyval=yyvsp[0]; }
2346 | #line 2347 "y.tab.c"
2347 | break;
2348 |
2349 | case 17: /* declaration_specifiers1: type_specifier */
2350 | #line 213 "./parse.y"
2351 | { if(!current->type) current->type=yyvsp[0]; }
2352 | #line 2353 "y.tab.c"
2353 | break;
2354 |
2355 | case 18: /* declaration_specifiers1: type_specifier declaration_specifiers1 */
2356 | #line 215 "./parse.y"
2357 | { if(!current->type) current->type=yyvsp[-1];
2358 | yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); }
2359 | #line 2360 "y.tab.c"
2360 | break;
2361 |
2362 | case 20: /* declaration_specifiers1: type_qualifier declaration_specifiers1 */
2363 | #line 219 "./parse.y"
2364 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); }
2365 | #line 2366 "y.tab.c"
2366 | break;
2367 |
2368 | case 22: /* $@1: %empty */
2369 | #line 226 "./parse.y"
2370 | { in_type_spec=1; }
2371 | #line 2372 "y.tab.c"
2372 | break;
2373 |
2374 | case 24: /* initialized_declarator: initialized_declarator1 */
2375 | #line 231 "./parse.y"
2376 | {
2377 | if((in_function==0 || in_function==3) && !in_funcdef && !in_structunion)
2378 | {
2379 | char* specific_comment=GetCurrentComment();
2380 | if(!common_comment) SetCurrentComment(specific_comment); else
2381 | if(!specific_comment) SetCurrentComment(common_comment); else
2382 | if(strcmp(common_comment,specific_comment)) SetCurrentComment(ConcatStrings(3,common_comment," ",specific_comment)); else
2383 | SetCurrentComment(common_comment);
2384 | }
2385 |
2386 | if(in_typedef)
2387 | {
2388 | char* vname=strstr(yyvsp[0],current->name);
2389 | SeenTypedefName(current->name,vname[strlen(current->name)]=='('?-1:1);
2390 | if(!in_header)
2391 | SeenTypedef(current->name,ConcatStrings(3,current->qual,current->type,yyvsp[0]));
2392 | if(in_function==3)
2393 | DownScope();
2394 | }
2395 | else if(in_function==2)
2396 | SeenFunctionArg(current->name,ConcatStrings(3,current->qual,current->type,yyvsp[0]));
2397 | else
2398 | {
2399 | char* vname=strstr(yyvsp[0],current->name);
2400 | if(vname[strlen(current->name)]!='(' && IsATypeName(current->type)!='f')
2401 | {
2402 | if((in_funcbody==0 || scope&EXTERN_F) && !in_structunion && !(in_header==GLOBAL && scope&EXTERN_H))
2403 | SeenVariableDefinition(current->name,ConcatStrings(3,current->qual,current->type,yyvsp[0]),SCOPE);
2404 | else
2405 | if(in_funcbody)
2406 | SeenScopeVariable(current->name);
2407 | }
2408 | else
2409 | SeenFunctionProto(current->name,in_funcbody);
2410 | if(in_function==3)
2411 | DownScope();
2412 | }
2413 |
2414 | if(in_function==3 && !in_structunion) in_function=0;
2415 | }
2416 | #line 2417 "y.tab.c"
2417 | break;
2418 |
2419 | case 46: /* abstract_declarator: pointer direct_abstract_declarator */
2420 | #line 322 "./parse.y"
2421 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
2422 | #line 2423 "y.tab.c"
2423 | break;
2424 |
2425 | case 48: /* direct_abstract_declarator: '(' abstract_declarator ')' */
2426 | #line 328 "./parse.y"
2427 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]);
2428 | { int i=0; while(yyvsp[-1][i] && yyvsp[-1][i]=='*') i++; if(!yyvsp[-1][i]) in_type_spec=0; } }
2429 | #line 2430 "y.tab.c"
2430 | break;
2431 |
2432 | case 49: /* direct_abstract_declarator: '[' ']' */
2433 | #line 331 "./parse.y"
2434 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
2435 | #line 2436 "y.tab.c"
2436 | break;
2437 |
2438 | case 50: /* direct_abstract_declarator: direct_abstract_declarator '[' ']' */
2439 | #line 333 "./parse.y"
2440 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
2441 | #line 2442 "y.tab.c"
2442 | break;
2443 |
2444 | case 51: /* direct_abstract_declarator: '[' constant_expression ']' */
2445 | #line 335 "./parse.y"
2446 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
2447 | #line 2448 "y.tab.c"
2448 | break;
2449 |
2450 | case 52: /* direct_abstract_declarator: direct_abstract_declarator '[' constant_expression ']' */
2451 | #line 337 "./parse.y"
2452 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); }
2453 | #line 2454 "y.tab.c"
2454 | break;
2455 |
2456 | case 53: /* direct_abstract_declarator: '(' ')' */
2457 | #line 339 "./parse.y"
2458 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
2459 | #line 2460 "y.tab.c"
2460 | break;
2461 |
2462 | case 54: /* direct_abstract_declarator: direct_abstract_declarator '(' ')' */
2463 | #line 341 "./parse.y"
2464 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
2465 | #line 2466 "y.tab.c"
2466 | break;
2467 |
2468 | case 55: /* direct_abstract_declarator: '(' parameter_type_list ')' */
2469 | #line 343 "./parse.y"
2470 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
2471 | #line 2472 "y.tab.c"
2472 | break;
2473 |
2474 | case 56: /* direct_abstract_declarator: direct_abstract_declarator '(' parameter_type_list ')' */
2475 | #line 345 "./parse.y"
2476 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); }
2477 | #line 2478 "y.tab.c"
2478 | break;
2479 |
2480 | case 57: /* declarator: direct_declarator */
2481 | #line 352 "./parse.y"
2482 | { in_type_spec=0; }
2483 | #line 2484 "y.tab.c"
2484 | break;
2485 |
2486 | case 58: /* declarator: pointer direct_declarator */
2487 | #line 354 "./parse.y"
2488 | { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
2489 | #line 2490 "y.tab.c"
2490 | break;
2491 |
2492 | case 60: /* pointer: '*' type_qualifier_list */
2493 | #line 360 "./parse.y"
2494 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); }
2495 | #line 2496 "y.tab.c"
2496 | break;
2497 |
2498 | case 61: /* pointer: '*' pointer */
2499 | #line 362 "./parse.y"
2500 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
2501 | #line 2502 "y.tab.c"
2502 | break;
2503 |
2504 | case 62: /* pointer: '*' type_qualifier_list pointer */
2505 | #line 364 "./parse.y"
2506 | { yyval=ConcatStrings(4,yyvsp[-2]," ",yyvsp[-1],yyvsp[0]); }
2507 | #line 2508 "y.tab.c"
2508 | break;
2509 |
2510 | case 64: /* direct_declarator: '(' declarator ')' */
2511 | #line 370 "./parse.y"
2512 | { if(yyvsp[-1][0]=='*' && yyvsp[-1][1]==' ') { yyvsp[-1]=&yyvsp[-1][1]; yyvsp[-1][0]='*'; }
2513 | yyval=ConcatStrings(4," ",yyvsp[-2],yyvsp[-1],yyvsp[0]);
2514 | }
2515 | #line 2516 "y.tab.c"
2516 | break;
2517 |
2518 | case 67: /* simple_declarator: IDENTIFIER */
2519 | #line 379 "./parse.y"
2520 | { yyval=ConcatStrings(2," ",yyvsp[0]); current->name=yyvsp[0];
2521 | if(!current->type) current->type="int";
2522 | if(in_funcdef==1 && in_function!=3 && !in_structunion) SeenScopeVariable(yyvsp[0]); }
2523 | #line 2524 "y.tab.c"
2524 | break;
2525 |
2526 | case 68: /* array_declarator: direct_declarator '[' ']' */
2527 | #line 386 "./parse.y"
2528 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
2529 | #line 2530 "y.tab.c"
2530 | break;
2531 |
2532 | case 69: /* $@2: %empty */
2533 | #line 387 "./parse.y"
2534 | { in_type_spec=0; }
2535 | #line 2536 "y.tab.c"
2536 | break;
2537 |
2538 | case 70: /* $@3: %empty */
2539 | #line 387 "./parse.y"
2540 | { in_type_spec=1; }
2541 | #line 2542 "y.tab.c"
2542 | break;
2543 |
2544 | case 71: /* array_declarator: direct_declarator '[' $@2 constant_expression $@3 ']' */
2545 | #line 388 "./parse.y"
2546 | { yyval=ConcatStrings(4,yyvsp[-5],yyvsp[-4],yyvsp[-2],yyvsp[0]); }
2547 | #line 2548 "y.tab.c"
2548 | break;
2549 |
2550 | case 73: /* storage_class_specifier: AUTO */
2551 | #line 399 "./parse.y"
2552 | { yyval=NULL; }
2553 | #line 2554 "y.tab.c"
2554 | break;
2555 |
2556 | case 74: /* storage_class_specifier: EXTERN */
2557 | #line 401 "./parse.y"
2558 | { yyval=NULL;
2559 | if(in_funcbody) scope|=EXTERN_F;
2560 | else if(in_header) scope|=EXTERN_H;
2561 | else scope|=EXTERNAL; }
2562 | #line 2563 "y.tab.c"
2563 | break;
2564 |
2565 | case 75: /* storage_class_specifier: REGISTER */
2566 | #line 406 "./parse.y"
2567 | { yyval=NULL; }
2568 | #line 2569 "y.tab.c"
2569 | break;
2570 |
2571 | case 76: /* storage_class_specifier: STATIC */
2572 | #line 408 "./parse.y"
2573 | { yyval=NULL; scope |= LOCAL; }
2574 | #line 2575 "y.tab.c"
2575 | break;
2576 |
2577 | case 77: /* storage_class_specifier: TYPEDEF */
2578 | #line 410 "./parse.y"
2579 | { yyval=NULL;
2580 | in_typedef=1; if(!in_header) SeenTypedef(NULL,NULL);
2581 | common_comment=CopyString(GetCurrentComment()); }
2582 | #line 2583 "y.tab.c"
2583 | break;
2584 |
2585 | case 78: /* storage_class_specifier: INLINE */
2586 | #line 414 "./parse.y"
2587 | { yyval=NULL; scope |= INLINED; }
2588 | #line 2589 "y.tab.c"
2589 | break;
2590 |
2591 | case 80: /* type_qualifier_list: type_qualifier_list type_qualifier */
2592 | #line 420 "./parse.y"
2593 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); }
2594 | #line 2595 "y.tab.c"
2595 | break;
2596 |
2597 | case 81: /* type_qualifier: CONST */
2598 | #line 425 "./parse.y"
2599 | { if(!current->type) current->qual=ConcatStrings(3,current->qual,yyvsp[0]," "); }
2600 | #line 2601 "y.tab.c"
2601 | break;
2602 |
2603 | case 82: /* type_qualifier: VOLATILE */
2604 | #line 427 "./parse.y"
2605 | { if(!current->type) current->qual=ConcatStrings(3,current->qual,yyvsp[0]," "); }
2606 | #line 2607 "y.tab.c"
2607 | break;
2608 |
2609 | case 83: /* type_specifier: type_specifier1 */
2610 | #line 434 "./parse.y"
2611 | { in_type_spec=1; }
2612 | #line 2613 "y.tab.c"
2613 | break;
2614 |
2615 | case 94: /* floating_type_specifier: DOUBLE LONG */
2616 | #line 452 "./parse.y"
2617 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); }
2618 | #line 2619 "y.tab.c"
2619 | break;
2620 |
2621 | case 95: /* floating_type_specifier: LONG DOUBLE */
2622 | #line 454 "./parse.y"
2623 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); }
2624 | #line 2625 "y.tab.c"
2625 | break;
2626 |
2627 | case 97: /* integer_type_specifier: integer_type_specifier_part type_qualifier */
2628 | #line 460 "./parse.y"
2629 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); }
2630 | #line 2631 "y.tab.c"
2631 | break;
2632 |
2633 | case 98: /* integer_type_specifier: integer_type_specifier integer_type_specifier_part */
2634 | #line 462 "./parse.y"
2635 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); }
2636 | #line 2637 "y.tab.c"
2637 | break;
2638 |
2639 | case 108: /* type_name: declaration_specifiers */
2640 | #line 488 "./parse.y"
2641 | { in_type_spec=0; }
2642 | #line 2643 "y.tab.c"
2643 | break;
2644 |
2645 | case 109: /* type_name: declaration_specifiers abstract_declarator */
2646 | #line 490 "./parse.y"
2647 | { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
2648 | #line 2649 "y.tab.c"
2649 | break;
2650 |
2651 | case 112: /* $@4: %empty */
2652 | #line 502 "./parse.y"
2653 | { push();
2654 | if(!in_header)
2655 | {
2656 | if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion);
2657 | else SeenStructUnionStart(yyvsp[-1]);
2658 | }
2659 | in_structunion++; }
2660 | #line 2661 "y.tab.c"
2661 | break;
2662 |
2663 | case 113: /* enumeration_type_definition: ENUM '{' $@4 enumeration_definition_list '}' */
2664 | #line 510 "./parse.y"
2665 | { pop(); in_structunion--;
2666 | if(!in_structunion && !current->type) current->type=ConcatStrings(2,yyvsp[-4]," {...}");
2667 | if(!in_header && !in_structunion && in_typedef) SeenStructUnionEnd();
2668 | yyval=ConcatStrings(5,yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); }
2669 | #line 2670 "y.tab.c"
2670 | break;
2671 |
2672 | case 114: /* $@5: %empty */
2673 | #line 515 "./parse.y"
2674 | { push();
2675 | if(!in_header)
2676 | {
2677 | if(in_structunion) SeenStructUnionComp(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]),in_structunion);
2678 | else SeenStructUnionStart(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]));
2679 | }
2680 | in_structunion++; }
2681 | #line 2682 "y.tab.c"
2682 | break;
2683 |
2684 | case 115: /* enumeration_type_definition: ENUM enumeration_tag '{' $@5 enumeration_definition_list '}' */
2685 | #line 523 "./parse.y"
2686 | { pop(); in_structunion--;
2687 | if(!in_structunion && !current->type) current->type=ConcatStrings(3,yyvsp[-5]," ",yyvsp[-4]);
2688 | if(!in_header && !in_structunion) SeenStructUnionEnd();
2689 | yyval=ConcatStrings(7,yyvsp[-5]," ",yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); }
2690 | #line 2691 "y.tab.c"
2691 | break;
2692 |
2693 | case 119: /* enumeration_definition_list1: enumeration_definition_list1 ',' enumeration_constant_definition */
2694 | #line 537 "./parse.y"
2695 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
2696 | #line 2697 "y.tab.c"
2697 | break;
2698 |
2699 | case 120: /* enumeration_constant_definition: enumeration_constant */
2700 | #line 542 "./parse.y"
2701 | { if(!in_header) SeenStructUnionComp(yyvsp[0],in_structunion); }
2702 | #line 2703 "y.tab.c"
2703 | break;
2704 |
2705 | case 121: /* enumeration_constant_definition: enumeration_constant '=' assignment_expression */
2706 | #line 544 "./parse.y"
2707 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); if(!in_header) SeenStructUnionComp(yyvsp[-2],in_structunion); }
2708 | #line 2709 "y.tab.c"
2709 | break;
2710 |
2711 | case 123: /* enumeration_type_reference: ENUM enumeration_tag */
2712 | #line 553 "./parse.y"
2713 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); }
2714 | #line 2715 "y.tab.c"
2715 | break;
2716 |
2717 | case 128: /* $@6: %empty */
2718 | #line 570 "./parse.y"
2719 | { push();
2720 | if(!in_header)
2721 | {
2722 | if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion);
2723 | else SeenStructUnionStart(yyvsp[-1]);
2724 | }
2725 | in_structunion++; }
2726 | #line 2727 "y.tab.c"
2727 | break;
2728 |
2729 | case 129: /* structure_type_definition: STRUCT '{' $@6 field_list '}' */
2730 | #line 578 "./parse.y"
2731 | { pop(); in_structunion--;
2732 | if(!in_structunion && !current->type) current->type=ConcatStrings(2,yyvsp[-4]," {...}");
2733 | if(!in_header && !in_structunion && in_typedef) SeenStructUnionEnd();
2734 | yyval=ConcatStrings(5,yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); }
2735 | #line 2736 "y.tab.c"
2736 | break;
2737 |
2738 | case 130: /* $@7: %empty */
2739 | #line 583 "./parse.y"
2740 | { push();
2741 | if(!in_header)
2742 | {
2743 | if(in_structunion) SeenStructUnionComp(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]),in_structunion);
2744 | else SeenStructUnionStart(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]));
2745 | }
2746 | in_structunion++; }
2747 | #line 2748 "y.tab.c"
2748 | break;
2749 |
2750 | case 131: /* structure_type_definition: STRUCT structure_tag '{' $@7 field_list '}' */
2751 | #line 591 "./parse.y"
2752 | { pop(); in_structunion--;
2753 | if(!in_structunion && !current->type) current->type=ConcatStrings(3,yyvsp[-5]," ",yyvsp[-4]);
2754 | if(!in_header && !in_structunion) SeenStructUnionEnd();
2755 | yyval=ConcatStrings(7,yyvsp[-5]," ",yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); }
2756 | #line 2757 "y.tab.c"
2757 | break;
2758 |
2759 | case 132: /* structure_type_reference: STRUCT structure_tag */
2760 | #line 599 "./parse.y"
2761 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); }
2762 | #line 2763 "y.tab.c"
2763 | break;
2764 |
2765 | case 137: /* $@8: %empty */
2766 | #line 616 "./parse.y"
2767 | { push();
2768 | if(!in_header)
2769 | {
2770 | if(in_structunion) SeenStructUnionComp(yyvsp[-1],in_structunion);
2771 | else SeenStructUnionStart(yyvsp[-1]);
2772 | }
2773 | in_structunion++; }
2774 | #line 2775 "y.tab.c"
2775 | break;
2776 |
2777 | case 138: /* union_type_definition: UNION '{' $@8 field_list '}' */
2778 | #line 624 "./parse.y"
2779 | { pop(); in_structunion--;
2780 | if(!in_structunion && !current->type) current->type=ConcatStrings(2,yyvsp[-4]," {...}");
2781 | if(!in_header && !in_structunion && in_typedef) SeenStructUnionEnd();
2782 | yyval=ConcatStrings(5,yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); }
2783 | #line 2784 "y.tab.c"
2784 | break;
2785 |
2786 | case 139: /* $@9: %empty */
2787 | #line 629 "./parse.y"
2788 | { push();
2789 | if(!in_header)
2790 | {
2791 | if(in_structunion) SeenStructUnionComp(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]),in_structunion);
2792 | else SeenStructUnionStart(ConcatStrings(3,yyvsp[-2]," ",yyvsp[-1]));
2793 | }
2794 | in_structunion++; }
2795 | #line 2796 "y.tab.c"
2796 | break;
2797 |
2798 | case 140: /* union_type_definition: UNION union_tag '{' $@9 field_list '}' */
2799 | #line 637 "./parse.y"
2800 | { pop(); in_structunion--;
2801 | if(!in_structunion && !current->type) current->type=ConcatStrings(3,yyvsp[-5]," ",yyvsp[-4]);
2802 | if(!in_header && !in_structunion) SeenStructUnionEnd();
2803 | yyval=ConcatStrings(7,yyvsp[-5]," ",yyvsp[-4]," ",yyvsp[-3],yyvsp[-1],yyvsp[0]); }
2804 | #line 2805 "y.tab.c"
2805 | break;
2806 |
2807 | case 141: /* union_type_reference: UNION union_tag */
2808 | #line 645 "./parse.y"
2809 | { yyval=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); }
2810 | #line 2811 "y.tab.c"
2811 | break;
2812 |
2813 | case 147: /* field_list1: field_list1 field_list2 */
2814 | #line 663 "./parse.y"
2815 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
2816 | #line 2817 "y.tab.c"
2817 | break;
2818 |
2819 | case 149: /* field_list2: structure_type_definition ';' */
2820 | #line 669 "./parse.y"
2821 | { yyval = ConcatStrings(3, yyvsp[-1], " ", yyvsp[0]);
2822 | if(!in_header) SeenStructUnionComp(yyvsp[-1],in_structunion); }
2823 | #line 2824 "y.tab.c"
2824 | break;
2825 |
2826 | case 150: /* field_list2: union_type_definition ';' */
2827 | #line 672 "./parse.y"
2828 | { yyval = ConcatStrings(3, yyvsp[-1], " ", yyvsp[0]);
2829 | if(!in_header) SeenStructUnionComp(yyvsp[-1],in_structunion); }
2830 | #line 2831 "y.tab.c"
2831 | break;
2832 |
2833 | case 152: /* $@10: %empty */
2834 | #line 679 "./parse.y"
2835 | { comp_type=yyvsp[0]; }
2836 | #line 2837 "y.tab.c"
2837 | break;
2838 |
2839 | case 153: /* component_declaration: type_specifier $@10 component_declarator_list ';' */
2840 | #line 681 "./parse.y"
2841 | { yyval=ConcatStrings(3,yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; }
2842 | #line 2843 "y.tab.c"
2843 | break;
2844 |
2845 | case 154: /* $@11: %empty */
2846 | #line 683 "./parse.y"
2847 | { comp_type=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); }
2848 | #line 2849 "y.tab.c"
2849 | break;
2850 |
2851 | case 155: /* component_declaration: type_qualifier_list type_specifier $@11 component_declarator_list ';' */
2852 | #line 685 "./parse.y"
2853 | { yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; }
2854 | #line 2855 "y.tab.c"
2855 | break;
2856 |
2857 | case 156: /* $@12: %empty */
2858 | #line 687 "./parse.y"
2859 | { comp_type=ConcatStrings(3,yyvsp[-1]," ",yyvsp[0]); }
2860 | #line 2861 "y.tab.c"
2861 | break;
2862 |
2863 | case 157: /* component_declaration: type_specifier type_qualifier_list $@12 component_declarator_list ';' */
2864 | #line 689 "./parse.y"
2865 | { yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); reset(); in_type_spec=0; }
2866 | #line 2867 "y.tab.c"
2867 | break;
2868 |
2869 | case 158: /* component_declarator_list: component_declarator */
2870 | #line 694 "./parse.y"
2871 | { if(!in_header) SeenStructUnionComp(ConcatStrings(2,comp_type,yyvsp[0]),in_structunion); }
2872 | #line 2873 "y.tab.c"
2873 | break;
2874 |
2875 | case 159: /* component_declarator_list: component_declarator_list ',' component_declarator */
2876 | #line 696 "./parse.y"
2877 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]);
2878 | if(!in_header) SeenStructUnionComp(ConcatStrings(2,comp_type,yyvsp[0]),in_structunion); }
2879 | #line 2880 "y.tab.c"
2880 | break;
2881 |
2882 | case 162: /* simple_component: declarator */
2883 | #line 707 "./parse.y"
2884 | { if(in_function==2 && !in_structunion) { DownScope(); pop(); in_function=0; } }
2885 | #line 2886 "y.tab.c"
2886 | break;
2887 |
2888 | case 163: /* bit_field: ':' width */
2889 | #line 712 "./parse.y"
2890 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
2891 | #line 2892 "y.tab.c"
2892 | break;
2893 |
2894 | case 164: /* bit_field: declarator ':' width */
2895 | #line 714 "./parse.y"
2896 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
2897 | #line 2898 "y.tab.c"
2898 | break;
2899 |
2900 | case 168: /* $@13: %empty */
2901 | #line 732 "./parse.y"
2902 | { pop(); in_funcbody=1; in_function=0; }
2903 | #line 2904 "y.tab.c"
2904 | break;
2905 |
2906 | case 169: /* function_definition: function_specifier $@13 compound_statement */
2907 | #line 734 "./parse.y"
2908 | { in_funcbody=in_function=0; DownScope(); SeenFunctionDefinition(NULL); }
2909 | #line 2910 "y.tab.c"
2910 | break;
2911 |
2912 | case 170: /* function_specifier: function_specifier1 */
2913 | #line 739 "./parse.y"
2914 | { char *func_type,*fname=strstr(yyvsp[0],(current-1)->name),*parenth=strstr(yyvsp[0],"(");
2915 | if(parenth>fname)
2916 | {parenth[0]=0;func_type=ConcatStrings(3,(current-1)->qual,(current-1)->type,yyvsp[0]);}
2917 | else
2918 | {
2919 | int open=1;
2920 | char *argbeg=strstr(&parenth[1],"("),*argend;
2921 | argbeg[1]=0;
2922 | for(argend=argbeg+2;*argend;argend++)
2923 | {
2924 | if(*argend=='(') open++;
2925 | if(*argend==')') open--;
2926 | if(!open) break;
2927 | }
2928 | func_type=ConcatStrings(4,(current-1)->qual,(current-1)->type,yyvsp[0],argend);
2929 | }
2930 | SeenFunctionDefinition(func_type);
2931 | common_comment=NULL;
2932 | }
2933 | #line 2934 "y.tab.c"
2934 | break;
2935 |
2936 | case 172: /* function_specifier1: declaration_specifiers function_declarator */
2937 | #line 763 "./parse.y"
2938 | { yyval=ConcatStrings(3,current->qual,current->type,yyvsp[0]); }
2939 | #line 2940 "y.tab.c"
2940 | break;
2941 |
2942 | case 174: /* function_specifier1: declaration_specifiers function_declarator declaration_list */
2943 | #line 766 "./parse.y"
2944 | { yyval=ConcatStrings(3,current->qual,current->type,yyvsp[-1]); }
2945 | #line 2946 "y.tab.c"
2946 | break;
2947 |
2948 | case 175: /* function_declarator: function_declarator0 */
2949 | #line 773 "./parse.y"
2950 | { if(!in_structunion) { push(); in_function=2; } }
2951 | #line 2952 "y.tab.c"
2952 | break;
2953 |
2954 | case 178: /* function_declarator0: pointer function_direct_declarator */
2955 | #line 780 "./parse.y"
2956 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
2957 | #line 2958 "y.tab.c"
2958 | break;
2959 |
2960 | case 179: /* function_declarator0: pointer '(' function_direct_declarator ')' */
2961 | #line 782 "./parse.y"
2962 | { yyval=ConcatStrings(2,yyvsp[-3],yyvsp[-1]); }
2963 | #line 2964 "y.tab.c"
2964 | break;
2965 |
2966 | case 180: /* $@14: %empty */
2967 | #line 787 "./parse.y"
2968 | { if(!in_structunion)
2969 | { push(); if(in_function==0) UpScope();
2970 | if(in_function==0 && !in_funcdef) in_function=1; if(in_function!=3) in_funcdef++; } }
2971 | #line 2972 "y.tab.c"
2972 | break;
2973 |
2974 | case 181: /* function_direct_declarator: function_declarator1 '(' $@14 function_declarator2 ')' */
2975 | #line 791 "./parse.y"
2976 | { if(!in_structunion)
2977 | { pop(); if(in_function!=3) in_funcdef--; if(in_funcdef==0) in_function=3; }
2978 | yyval=ConcatStrings(4,yyvsp[-4],yyvsp[-3],yyvsp[-1],yyvsp[0]); }
2979 | #line 2980 "y.tab.c"
2980 | break;
2981 |
2982 | case 182: /* function_declarator1: direct_declarator */
2983 | #line 798 "./parse.y"
2984 | {
2985 | if(!in_funcdef && !in_function && !in_funcbody && !in_structunion) SeenFunctionDeclaration(current->name,SCOPE);
2986 | in_type_spec=0;
2987 | }
2988 | #line 2989 "y.tab.c"
2989 | break;
2990 |
2991 | case 183: /* function_declarator2: %empty */
2992 | #line 806 "./parse.y"
2993 | { if(in_function==1 && in_funcdef==1 && !in_structunion) SeenFunctionArg("void","void");
2994 | if(in_structunion) yyval=NULL; else yyval="void"; }
2995 | #line 2996 "y.tab.c"
2996 | break;
2997 |
2998 | case 186: /* identifier_list: IDENTIFIER */
2999 | #line 814 "./parse.y"
3000 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0 && !in_structunion) { SeenFunctionArg(yyvsp[0],NULL); SeenScopeVariable(yyvsp[0]); } }
3001 | #line 3002 "y.tab.c"
3002 | break;
3003 |
3004 | case 187: /* identifier_list: identifier_list ',' IDENTIFIER */
3005 | #line 816 "./parse.y"
3006 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0 && !in_structunion) { SeenFunctionArg(yyvsp[0],NULL); SeenScopeVariable(yyvsp[0]); }
3007 | yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3008 | #line 3009 "y.tab.c"
3009 | break;
3010 |
3011 | case 189: /* parameter_type_list: parameter_list ',' ELLIPSES */
3012 | #line 823 "./parse.y"
3013 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0 && !in_structunion) SeenFunctionArg(yyvsp[0],yyvsp[0]);
3014 | yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3015 | #line 3016 "y.tab.c"
3016 | break;
3017 |
3018 | case 190: /* parameter_list: parameter_declaration */
3019 | #line 829 "./parse.y"
3020 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0 && !in_structunion) SeenFunctionArg(strcmp("void",yyvsp[0])?current->name:"void",yyvsp[0]);
3021 | in_type_spec=0; }
3022 | #line 3023 "y.tab.c"
3023 | break;
3024 |
3025 | case 191: /* parameter_list: parameter_list ',' parameter_declaration */
3026 | #line 832 "./parse.y"
3027 | { if(in_function==1 && in_funcdef==1 && in_funcbody==0 && !in_structunion) SeenFunctionArg(current->name,yyvsp[0]);
3028 | in_type_spec=0; yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3029 | #line 3030 "y.tab.c"
3030 | break;
3031 |
3032 | case 192: /* parameter_declaration: declaration_specifiers declarator */
3033 | #line 838 "./parse.y"
3034 | { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
3035 | #line 3036 "y.tab.c"
3036 | break;
3037 |
3038 | case 193: /* parameter_declaration: declaration_specifiers */
3039 | #line 840 "./parse.y"
3040 | { in_type_spec=0; }
3041 | #line 3042 "y.tab.c"
3042 | break;
3043 |
3044 | case 194: /* parameter_declaration: declaration_specifiers abstract_declarator */
3045 | #line 842 "./parse.y"
3046 | { in_type_spec=0; yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
3047 | #line 3048 "y.tab.c"
3048 | break;
3049 |
3050 | case 207: /* $@15: %empty */
3051 | #line 866 "./parse.y"
3052 | { UpScope(); reset(); }
3053 | #line 3054 "y.tab.c"
3054 | break;
3055 |
3056 | case 208: /* $@16: %empty */
3057 | #line 868 "./parse.y"
3058 | { DownScope(); }
3059 | #line 3060 "y.tab.c"
3060 | break;
3061 |
3062 | case 215: /* block_item: declaration */
3063 | #line 885 "./parse.y"
3064 | { scope=0; reset(); common_comment=NULL; in_typedef=0; }
3065 | #line 3066 "y.tab.c"
3066 | break;
3067 |
3068 | case 224: /* $@17: %empty */
3069 | #line 917 "./parse.y"
3070 | { UpScope(); reset(); }
3071 | #line 3072 "y.tab.c"
3072 | break;
3073 |
3074 | case 225: /* for_statement: FOR $@17 '(' for_expressions ')' statement */
3075 | #line 919 "./parse.y"
3076 | { DownScope(); }
3077 | #line 3078 "y.tab.c"
3078 | break;
3079 |
3080 | case 235: /* for_expression_or_declaration: declaration_specifiers initialized_declarator_list */
3081 | #line 936 "./parse.y"
3082 | { in_type_spec=0; }
3083 | #line 3084 "y.tab.c"
3084 | break;
3085 |
3086 | case 236: /* for_expression_or_declaration: declaration_specifiers */
3087 | #line 938 "./parse.y"
3088 | { in_type_spec=0; }
3089 | #line 3090 "y.tab.c"
3090 | break;
3091 |
3092 | case 256: /* comma_expression: comma_expression ',' assignment_expression */
3093 | #line 1011 "./parse.y"
3094 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3095 | #line 3096 "y.tab.c"
3096 | break;
3097 |
3098 | case 273: /* conditional_expression: logical_or_expression '?' expression ':' conditional_expression */
3099 | #line 1042 "./parse.y"
3100 | { yyval=ConcatStrings(5,yyvsp[-4],yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3101 | #line 3102 "y.tab.c"
3102 | break;
3103 |
3104 | case 274: /* conditional_expression: logical_or_expression '?' ':' conditional_expression */
3105 | #line 1044 "./parse.y"
3106 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3107 | #line 3108 "y.tab.c"
3108 | break;
3109 |
3110 | case 276: /* logical_or_expression: logical_or_expression OR_OP logical_and_expression */
3111 | #line 1052 "./parse.y"
3112 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3113 | #line 3114 "y.tab.c"
3114 | break;
3115 |
3116 | case 278: /* logical_and_expression: logical_and_expression AND_OP bitwise_or_expression */
3117 | #line 1060 "./parse.y"
3118 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3119 | #line 3120 "y.tab.c"
3120 | break;
3121 |
3122 | case 280: /* bitwise_or_expression: bitwise_or_expression '|' bitwise_xor_expression */
3123 | #line 1068 "./parse.y"
3124 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3125 | #line 3126 "y.tab.c"
3126 | break;
3127 |
3128 | case 282: /* bitwise_xor_expression: bitwise_xor_expression '^' bitwise_and_expression */
3129 | #line 1076 "./parse.y"
3130 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3131 | #line 3132 "y.tab.c"
3132 | break;
3133 |
3134 | case 284: /* bitwise_and_expression: bitwise_and_expression '&' equality_expression */
3135 | #line 1084 "./parse.y"
3136 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3137 | #line 3138 "y.tab.c"
3138 | break;
3139 |
3140 | case 286: /* equality_expression: equality_expression equality_op relational_expression */
3141 | #line 1092 "./parse.y"
3142 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3143 | #line 3144 "y.tab.c"
3144 | break;
3145 |
3146 | case 290: /* relational_expression: relational_expression relational_op shift_expression */
3147 | #line 1105 "./parse.y"
3148 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3149 | #line 3150 "y.tab.c"
3150 | break;
3151 |
3152 | case 296: /* shift_expression: shift_expression shift_op additive_expression */
3153 | #line 1120 "./parse.y"
3154 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3155 | #line 3156 "y.tab.c"
3156 | break;
3157 |
3158 | case 300: /* additive_expression: additive_expression add_op multiplicative_expression */
3159 | #line 1133 "./parse.y"
3160 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3161 | #line 3162 "y.tab.c"
3162 | break;
3163 |
3164 | case 304: /* multiplicative_expression: multiplicative_expression mult_op unary_expression */
3165 | #line 1146 "./parse.y"
3166 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3167 | #line 3168 "y.tab.c"
3168 | break;
3169 |
3170 | case 320: /* bitwise_negation_expression: '~' unary_expression */
3171 | #line 1177 "./parse.y"
3172 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
3173 | #line 3174 "y.tab.c"
3174 | break;
3175 |
3176 | case 321: /* cast_expression: '(' type_name ')' unary_expression */
3177 | #line 1182 "./parse.y"
3178 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3179 | #line 3180 "y.tab.c"
3180 | break;
3181 |
3182 | case 324: /* logical_negation_expression: '!' unary_expression */
3183 | #line 1192 "./parse.y"
3184 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
3185 | #line 3186 "y.tab.c"
3186 | break;
3187 |
3188 | case 327: /* sizeof_expression: SIZEOF '(' type_name ')' */
3189 | #line 1205 "./parse.y"
3190 | { yyval=ConcatStrings(4,yyvsp[-3],yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3191 | #line 3192 "y.tab.c"
3192 | break;
3193 |
3194 | case 328: /* sizeof_expression: SIZEOF unary_expression */
3195 | #line 1207 "./parse.y"
3196 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
3197 | #line 3198 "y.tab.c"
3198 | break;
3199 |
3200 | case 329: /* unary_minus_expression: '-' unary_expression */
3201 | #line 1212 "./parse.y"
3202 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
3203 | #line 3204 "y.tab.c"
3204 | break;
3205 |
3206 | case 330: /* unary_plus_expression: '+' unary_expression */
3207 | #line 1217 "./parse.y"
3208 | { yyval=ConcatStrings(2,yyvsp[-1],yyvsp[0]); }
3209 | #line 3210 "y.tab.c"
3210 | break;
3211 |
3212 | case 333: /* postfix_expression: function_call_direct */
3213 | #line 1226 "./parse.y"
3214 | { if(!IsAScopeVariable(yyvsp[0])) SeenFunctionCall(yyvsp[0]); }
3215 | #line 3216 "y.tab.c"
3216 | break;
3217 |
3218 | case 349: /* primary_expression: name */
3219 | #line 1270 "./parse.y"
3220 | { CheckFunctionVariableRef(yyvsp[0],in_funcbody); }
3221 | #line 3222 "y.tab.c"
3222 | break;
3223 |
3224 | case 355: /* parenthesized_expression: '(' expression ')' */
3225 | #line 1283 "./parse.y"
3226 | { yyval=ConcatStrings(3,yyvsp[-2],yyvsp[-1],yyvsp[0]); }
3227 | #line 3228 "y.tab.c"
3228 | break;
3229 |
3230 | case 356: /* $@18: %empty */
3231 | #line 1284 "./parse.y"
3232 | { push(); }
3233 | #line 3234 "y.tab.c"
3234 | break;
3235 |
3236 | case 357: /* $@19: %empty */
3237 | #line 1284 "./parse.y"
3238 | { pop(); }
3239 | #line 3240 "y.tab.c"
3240 | break;
3241 |
3242 |
3243 | #line 3244 "y.tab.c"
3244 |
3245 | default: break;
3246 | }
3247 | /* User semantic actions sometimes alter yychar, and that requires
3248 | that yytoken be updated with the new translation. We take the
3249 | approach of translating immediately before every use of yytoken.
3250 | One alternative is translating here after every semantic action,
3251 | but that translation would be missed if the semantic action invokes
3252 | YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3253 | if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3254 | incorrect destructor might then be invoked immediately. In the
3255 | case of YYERROR or YYBACKUP, subsequent parser actions might lead
3256 | to an incorrect destructor call or verbose syntax error message
3257 | before the lookahead is translated. */
3258 | YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
3259 |
3260 | YYPOPSTACK (yylen);
3261 | yylen = 0;
3262 |
3263 | *++yyvsp = yyval;
3264 |
3265 | /* Now 'shift' the result of the reduction. Determine what state
3266 | that goes to, based on the state we popped back to and the rule
3267 | number reduced by. */
3268 | {
3269 | const int yylhs = yyr1[yyn] - YYNTOKENS;
3270 | const int yyi = yypgoto[yylhs] + *yyssp;
3271 | yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
3272 | ? yytable[yyi]
3273 | : yydefgoto[yylhs]);
3274 | }
3275 |
3276 | goto yynewstate;
3277 |
3278 |
3279 | /*--------------------------------------.
3280 | | yyerrlab -- here on detecting error. |
3281 | `--------------------------------------*/
3282 | yyerrlab:
3283 | /* Make sure we have latest lookahead translation. See comments at
3284 | user semantic actions for why this is necessary. */
3285 | yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
3286 | /* If not already recovering from an error, report this error. */
3287 | if (!yyerrstatus)
3288 | {
3289 | ++yynerrs;
3290 | yyerror (YY_("syntax error"));
3291 | }
3292 |
3293 | if (yyerrstatus == 3)
3294 | {
3295 | /* If just tried and failed to reuse lookahead token after an
3296 | error, discard it. */
3297 |
3298 | if (yychar <= YYEOF)
3299 | {
3300 | /* Return failure if at end of input. */
3301 | if (yychar == YYEOF)
3302 | YYABORT;
3303 | }
3304 | else
3305 | {
3306 | yydestruct ("Error: discarding",
3307 | yytoken, &yylval);
3308 | yychar = YYEMPTY;
3309 | }
3310 | }
3311 |
3312 | /* Else will try to reuse lookahead token after shifting the error
3313 | token. */
3314 | goto yyerrlab1;
3315 |
3316 |
3317 | /*---------------------------------------------------.
3318 | | yyerrorlab -- error raised explicitly by YYERROR. |
3319 | `---------------------------------------------------*/
3320 | yyerrorlab:
3321 | /* Pacify compilers when the user code never invokes YYERROR and the
3322 | label yyerrorlab therefore never appears in user code. */
3323 | if (0)
3324 | YYERROR;
3325 | ++yynerrs;
3326 |
3327 | /* Do not reclaim the symbols of the rule whose action triggered
3328 | this YYERROR. */
3329 | YYPOPSTACK (yylen);
3330 | yylen = 0;
3331 | YY_STACK_PRINT (yyss, yyssp);
3332 | yystate = *yyssp;
3333 | goto yyerrlab1;
3334 |
3335 |
3336 | /*-------------------------------------------------------------.
3337 | | yyerrlab1 -- common code for both syntax error and YYERROR. |
3338 | `-------------------------------------------------------------*/
3339 | yyerrlab1:
3340 | yyerrstatus = 3; /* Each real token shifted decrements this. */
3341 |
3342 | /* Pop stack until we find a state that shifts the error token. */
3343 | for (;;)
3344 | {
3345 | yyn = yypact[yystate];
3346 | if (!yypact_value_is_default (yyn))
3347 | {
3348 | yyn += YYSYMBOL_YYerror;
3349 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
3350 | {
3351 | yyn = yytable[yyn];
3352 | if (0 < yyn)
3353 | break;
3354 | }
3355 | }
3356 |
3357 | /* Pop the current state because it cannot handle the error token. */
3358 | if (yyssp == yyss)
3359 | YYABORT;
3360 |
3361 |
3362 | yydestruct ("Error: popping",
3363 | YY_ACCESSING_SYMBOL (yystate), yyvsp);
3364 | YYPOPSTACK (1);
3365 | yystate = *yyssp;
3366 | YY_STACK_PRINT (yyss, yyssp);
3367 | }
3368 |
3369 | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3370 | *++yyvsp = yylval;
3371 | YY_IGNORE_MAYBE_UNINITIALIZED_END
3372 |
3373 |
3374 | /* Shift the error token. */
3375 | YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
3376 |
3377 | yystate = yyn;
3378 | goto yynewstate;
3379 |
3380 |
3381 | /*-------------------------------------.
3382 | | yyacceptlab -- YYACCEPT comes here. |
3383 | `-------------------------------------*/
3384 | yyacceptlab:
3385 | yyresult = 0;
3386 | goto yyreturnlab;
3387 |
3388 |
3389 | /*-----------------------------------.
3390 | | yyabortlab -- YYABORT comes here. |
3391 | `-----------------------------------*/
3392 | yyabortlab:
3393 | yyresult = 1;
3394 | goto yyreturnlab;
3395 |
3396 |
3397 | /*-----------------------------------------------------------.
3398 | | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
3399 | `-----------------------------------------------------------*/
3400 | yyexhaustedlab:
3401 | yyerror (YY_("memory exhausted"));
3402 | yyresult = 2;
3403 | goto yyreturnlab;
3404 |
3405 |
3406 | /*----------------------------------------------------------.
3407 | | yyreturnlab -- parsing is finished, clean up and return. |
3408 | `----------------------------------------------------------*/
3409 | yyreturnlab:
3410 | if (yychar != YYEMPTY)
3411 | {
3412 | /* Make sure we have latest lookahead translation. See comments at
3413 | user semantic actions for why this is necessary. */
3414 | yytoken = YYTRANSLATE (yychar);
3415 | yydestruct ("Cleanup: discarding lookahead",
3416 | yytoken, &yylval);
3417 | }
3418 | /* Do not reclaim the symbols of the rule whose action triggered
3419 | this YYABORT or YYACCEPT. */
3420 | YYPOPSTACK (yylen);
3421 | YY_STACK_PRINT (yyss, yyssp);
3422 | while (yyssp != yyss)
3423 | {
3424 | yydestruct ("Cleanup: popping",
3425 | YY_ACCESSING_SYMBOL (+*yyssp), yyvsp);
3426 | YYPOPSTACK (1);
3427 | }
3428 | #ifndef yyoverflow
3429 | if (yyss != yyssa)
3430 | YYSTACK_FREE (yyss);
3431 | #endif
3432 |
3433 | return yyresult;
3434 | }
3435 |
3436 | #line 1343 "./parse.y"
3437 |
3438 |
3439 | #if YYDEBUG
3440 |
3441 | static int last_yylex[11];
3442 | static char *last_yylval[11];
3443 | static int count=0,modcount=0;
3444 |
3445 | #endif /* YYDEBUG */
3446 |
3447 |
3448 | /*++++++++++++++++++++++++++++++++++++++
3449 | Stop parsing the current file, due to an error.
3450 |
3451 | char *s The error message to print out.
3452 | ++++++++++++++++++++++++++++++++++++++*/
3453 |
3454 | static void yyerror( const char *s )
3455 | {
3456 | #if YYDEBUG
3457 | int i;
3458 | #endif
3459 |
3460 | fflush(stdout);
3461 | fprintf(stderr,"%s:%d: cxref: %s\n\n",parse_file,parse_line,s);
3462 |
3463 | #if YYDEBUG
3464 |
3465 | fprintf(stderr,"The previous 10, current and next 10 symbols are:\n");
3466 |
3467 | for(i=count>10?count-11:0,modcount=i%11;i<count-1;i++,modcount=i%11)
3468 | #ifdef YYBISON
3469 | fprintf(stderr,"%3d | %3d : %16s : %s\n",i+1-count,last_yylex[modcount],yytname[YYTRANSLATE(last_yylex[modcount])],last_yylval[modcount]);
3470 | #else
3471 | fprintf(stderr,"%3d | %3d : %s\n",i+1-count,last_yylex[modcount],last_yylval[modcount]);
3472 | #endif
3473 |
3474 | #ifdef YYBISON
3475 | fprintf(stderr," 0 | %3d : %16s : %s\n",yychar,yytname[YYTRANSLATE(yychar)],yylval);
3476 | #else
3477 | fprintf(stderr," 0 | %3d : %s\n",yychar,yylval);
3478 | #endif
3479 |
3480 | for(i=0;i<10;i++)
3481 | {
3482 | yychar=yylex();
3483 | if(!yychar)
3484 | {fprintf(stderr,"END OF FILE\n");break;}
3485 | #ifdef YYBISON
3486 | fprintf(stderr,"%3d | %3d : %16s : %s\n",i+1,yychar,yytname[YYTRANSLATE(yychar)],yylval);
3487 | #else
3488 | fprintf(stderr,"%3d | %3d : %s\n",i+1,yychar,yylval);
3489 | #endif
3490 | }
3491 |
3492 | fprintf(stderr,"\n");
3493 |
3494 | #endif /* YYDEBUG */
3495 |
3496 | /* Finish off the input. */
3497 |
3498 | #undef yylex
3499 |
3500 | if(yychar)
3501 | while((yychar=yylex()));
3502 | }
3503 |
3504 |
3505 | /*++++++++++++++++++++++++++++++++++++++
3506 | Call the lexer, the feedback from the parser to the lexer is applied here.
3507 |
3508 | int cxref_yylex Returns the value from the lexer, modified due to parser feedback.
3509 | ++++++++++++++++++++++++++++++++++++++*/
3510 |
3511 | static int cxref_yylex(void)
3512 | {
3513 | static int last_yyl=0;
3514 | int yyl=yylex();
3515 |
3516 | if(yyl==TYPE_NAME)
3517 | if(in_type_spec || (in_structunion && last_yyl=='}') || last_yyl==TYPE_NAME ||
3518 | last_yyl==GOTO ||
3519 | last_yyl==CHAR || last_yyl==SHORT || last_yyl==INT || last_yyl==LONG ||
3520 | last_yyl==SIGNED || last_yyl==UNSIGNED ||
3521 | last_yyl==FLOAT || last_yyl==DOUBLE ||
3522 | last_yyl==BOOL)
3523 | yyl=IDENTIFIER;
3524 |
3525 | last_yyl=yyl;
3526 |
3527 | #if YYDEBUG
3528 |
3529 | last_yylex [modcount]=yyl;
3530 | last_yylval[modcount]=yylval;
3531 |
3532 | if(yyl)
3533 | {
3534 | count++;
3535 | modcount=count%11;
3536 | }
3537 | else
3538 | {
3539 | count=0;
3540 | modcount=0;
3541 | }
3542 |
3543 | #if YYDEBUG == 2
3544 |
3545 | if(yyl)
3546 | #ifdef YYBISON
3547 | printf("#parse.y# %6d | %16s:%4d | %3d : %16s : %s\n",count,parse_file,parse_line,yyl,yytname[YYTRANSLATE(yyl)],yylval);
3548 | #else
3549 | printf("#parse.y# %6d | %16s:%4d | %3d : %s\n",count,parse_file,parse_line,yyl,yylval);
3550 | #endif /* YYBISON */
3551 | else
3552 | printf("#parse.y# %6d | %16s:%4d | END OF FILE\n",count,parse_file,parse_line);
3553 |
3554 | fflush(stdout);
3555 |
3556 | #endif /* YYDEBUG==2 */
3557 |
3558 | #endif /* YYDEBUG */
3559 |
3560 | return(yyl);
3561 | }