cint_c.tab.c (128753B)
1 /* 2 This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 3 4 Copyright 2007-2019 Broadcom Inc. All rights reserved. 5 */ 6 /* A Bison parser, made by GNU Bison 2.4.2. */ 7 8 /* Skeleton implementation for Bison's Yacc-like parsers in C 9 10 Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software 11 Foundation, Inc. 12 13 This program is free software: you can redistribute it and/or modify 14 it under the terms of the GNU General Public License as published by 15 the Free Software Foundation, either version 3 of the License, or 16 (at your option) any later version. 17 18 This program is distributed in the hope that it will be useful, 19 but WITHOUT ANY WARRANTY; without even the implied warranty of 20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 GNU General Public License for more details. 22 23 You should have received a copy of the GNU General Public License 24 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 25 26 /* As a special exception, you may create a larger work that contains 27 part or all of the Bison parser skeleton and distribute that work 28 under terms of your choice, so long as that work isn't itself a 29 parser generator using the skeleton or a modified version thereof 30 as a parser skeleton. Alternatively, if you modify or redistribute 31 the parser skeleton itself, you may (at your option) remove this 32 special exception, which will cause the skeleton and the resulting 33 Bison output files to be licensed under the GNU General Public 34 License without this special exception. 35 36 This special exception was added by the Free Software Foundation in 37 version 2.2 of Bison. */ 38 39 /* C LALR(1) parser skeleton written by Richard Stallman, by 40 simplifying the original so-called "semantic" parser. */ 41 42 /* All symbols defined below should begin with yy or YY, to avoid 43 infringing on user name space. This should be done even for local 44 variables, as they might otherwise be expanded by user macros. 45 There are some unavoidable exceptions within include files to 46 define necessary library symbols; they are noted "INFRINGES ON 47 USER NAME SPACE" below. */ 48 49 /* Identify Bison output. */ 50 #define YYBISON 1 51 52 /* Bison version. */ 53 #define YYBISON_VERSION "2.4.2" 54 55 /* Skeleton name. */ 56 #define YYSKELETON_NAME "yacc.c" 57 58 /* Pure parsers. */ 59 #define YYPURE 1 60 61 /* Push parsers. */ 62 #define YYPUSH 1 63 64 /* Pull parsers. */ 65 #define YYPULL 1 66 67 /* Using locations. */ 68 #define YYLSP_NEEDED 1 69 70 /* Substitute the variable and function names. */ 71 #define yyparse cint_c_parse 72 #define yypush_parse cint_c_push_parse 73 #define yypull_parse cint_c_pull_parse 74 #define yypstate_new cint_c_pstate_new 75 #define yypstate_delete cint_c_pstate_delete 76 #define yypstate cint_c_pstate 77 #define yylex cint_c_lex 78 #define yyerror cint_c_error 79 #define yylval cint_c_lval 80 #define yychar cint_c_char 81 #define yydebug cint_c_debug 82 #define yynerrs cint_c_nerrs 83 #define yylloc cint_c_lloc 84 85 /* Copy the first part of user declarations. */ 86 87 /* Line 189 of yacc.c */ 88 #line 1 "cint_grammar.y" 89 90 /* 91 * 92 * $Copyright: (c) 2009 Broadcom Corp. 93 * All Rights Reserved.$ 94 * 95 * File: cint_grammar.y 96 * Purpose: CINT C Parser 97 */ 98 99 /* Line 189 of yacc.c */ 100 #line 56 "cint_grammar.y" 101 102 103 #ifndef LONGEST_SOURCE_LINE 104 #define LONGEST_SOURCE_LINE 256 105 #endif 106 107 typedef struct cint_c_parser_s { 108 int x; 109 } cint_c_parser_t; 110 111 typedef void* yyscan_t; 112 113 #define YY_TYPEDEF_YY_SCANNER_T 114 #define YYERROR_VERBOSE 1 115 116 #include "cint_config.h" 117 #include "cint_parser.h" 118 119 #include "cint_yy.h" 120 #include "cint_c.tab.h" 121 122 123 void cint_c_error(YYLTYPE * locp, yyscan_t yyscanner, cint_cparser_t * cp, 124 const char *msg); 125 extern int cint_c_lex(YYSTYPE * yylval_param, YYLTYPE * yylloc_param, 126 yyscan_t yyscanner); 127 char *cint_current_line(yyscan_t yyscanner, char *const lineBuffer, const int lineLen, 128 int *column, int *tokLen, char **curFile, int *curLine); 129 130 131 #if CINT_CONFIG_INCLUDE_PARSER == 1 132 133 134 #include "cint_interpreter.h" 135 136 137 138 139 /* Line 189 of yacc.c */ 140 #line 137 "cint_c.tab.c" 141 142 /* Enabling traces. */ 143 #ifndef YYDEBUG 144 # define YYDEBUG 0 145 #endif 146 147 /* Enabling verbose error messages. */ 148 #ifdef YYERROR_VERBOSE 149 # undef YYERROR_VERBOSE 150 # define YYERROR_VERBOSE 1 151 #else 152 # define YYERROR_VERBOSE 0 153 #endif 154 155 /* Enabling the token table. */ 156 #ifndef YYTOKEN_TABLE 157 # define YYTOKEN_TABLE 0 158 #endif 159 160 161 /* Tokens. */ 162 #ifndef YYTOKENTYPE 163 # define YYTOKENTYPE 164 /* Put the tokens into the symbol table, so that GDB and other debuggers 165 know about them. */ 166 enum yytokentype { 167 XEOF = 0, 168 IDENTIFIER = 258, 169 CONSTANT = 259, 170 STRING_LITERAL = 260, 171 SIZEOF = 261, 172 PTR_OP = 262, 173 INC_OP = 263, 174 DEC_OP = 264, 175 LEFT_OP = 265, 176 RIGHT_OP = 266, 177 LE_OP = 267, 178 GE_OP = 268, 179 EQ_OP = 269, 180 NE_OP = 270, 181 AND_OP = 271, 182 OR_OP = 272, 183 MUL_ASSIGN = 273, 184 DIV_ASSIGN = 274, 185 MOD_ASSIGN = 275, 186 ADD_ASSIGN = 276, 187 SUB_ASSIGN = 277, 188 LEFT_ASSIGN = 278, 189 RIGHT_ASSIGN = 279, 190 AND_ASSIGN = 280, 191 XOR_ASSIGN = 281, 192 OR_ASSIGN = 282, 193 TYPE_NAME = 283, 194 TYPEDEF = 284, 195 EXTERN = 285, 196 STATIC = 286, 197 AUTO = 287, 198 REGISTER = 288, 199 CHAR = 289, 200 SHORT = 290, 201 INT = 291, 202 LONG = 292, 203 SIGNED = 293, 204 UNSIGNED = 294, 205 FLOAT = 295, 206 DOUBLE = 296, 207 CONST = 297, 208 VOLATILE = 298, 209 T_VOID = 299, 210 STRUCT = 300, 211 UNION = 301, 212 ENUM = 302, 213 ELLIPSIS = 303, 214 CASE = 304, 215 DEFAULT = 305, 216 IF = 306, 217 ELSE = 307, 218 SWITCH = 308, 219 WHILE = 309, 220 DO = 310, 221 FOR = 311, 222 GOTO = 312, 223 CONTINUE = 313, 224 BREAK = 314, 225 RETURN = 315, 226 PRINT = 316, 227 CINT = 317, 228 ITERATOR = 318, 229 MACRO = 319 230 }; 231 #endif 232 /* Tokens. */ 233 #define XEOF 0 234 #define IDENTIFIER 258 235 #define CONSTANT 259 236 #define STRING_LITERAL 260 237 #define SIZEOF 261 238 #define PTR_OP 262 239 #define INC_OP 263 240 #define DEC_OP 264 241 #define LEFT_OP 265 242 #define RIGHT_OP 266 243 #define LE_OP 267 244 #define GE_OP 268 245 #define EQ_OP 269 246 #define NE_OP 270 247 #define AND_OP 271 248 #define OR_OP 272 249 #define MUL_ASSIGN 273 250 #define DIV_ASSIGN 274 251 #define MOD_ASSIGN 275 252 #define ADD_ASSIGN 276 253 #define SUB_ASSIGN 277 254 #define LEFT_ASSIGN 278 255 #define RIGHT_ASSIGN 279 256 #define AND_ASSIGN 280 257 #define XOR_ASSIGN 281 258 #define OR_ASSIGN 282 259 #define TYPE_NAME 283 260 #define TYPEDEF 284 261 #define EXTERN 285 262 #define STATIC 286 263 #define AUTO 287 264 #define REGISTER 288 265 #define CHAR 289 266 #define SHORT 290 267 #define INT 291 268 #define LONG 292 269 #define SIGNED 293 270 #define UNSIGNED 294 271 #define FLOAT 295 272 #define DOUBLE 296 273 #define CONST 297 274 #define VOLATILE 298 275 #define T_VOID 299 276 #define STRUCT 300 277 #define UNION 301 278 #define ENUM 302 279 #define ELLIPSIS 303 280 #define CASE 304 281 #define DEFAULT 305 282 #define IF 306 283 #define ELSE 307 284 #define SWITCH 308 285 #define WHILE 309 286 #define DO 310 287 #define FOR 311 288 #define GOTO 312 289 #define CONTINUE 313 290 #define BREAK 314 291 #define RETURN 315 292 #define PRINT 316 293 #define CINT 317 294 #define ITERATOR 318 295 #define MACRO 319 296 297 298 299 300 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 301 typedef int YYSTYPE; 302 # define YYSTYPE_IS_TRIVIAL 1 303 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 304 # define YYSTYPE_IS_DECLARED 1 305 #endif 306 307 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED 308 typedef struct YYLTYPE 309 { 310 int first_line; 311 int first_column; 312 int last_line; 313 int last_column; 314 } YYLTYPE; 315 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ 316 # define YYLTYPE_IS_DECLARED 1 317 # define YYLTYPE_IS_TRIVIAL 1 318 #endif 319 320 #ifndef YYPUSH_DECLS 321 # define YYPUSH_DECLS 322 struct yypstate; 323 typedef struct yypstate yypstate; 324 enum { YYPUSH_MORE = 4 }; 325 326 #if defined __STDC__ || defined __cplusplus 327 int yyparse (yyscan_t yyscanner, cint_cparser_t* cparser); 328 #else 329 int yyparse (); 330 #endif 331 #if defined __STDC__ || defined __cplusplus 332 int yypush_parse (yypstate *yyps, int yypushed_char, YYSTYPE const *yypushed_val, YYLTYPE const *yypushed_loc, yyscan_t yyscanner, cint_cparser_t* cparser); 333 #else 334 int yypush_parse (); 335 #endif 336 #if defined __STDC__ || defined __cplusplus 337 int yypull_parse (yypstate *yyps, yyscan_t yyscanner, cint_cparser_t* cparser); 338 #else 339 int yypull_parse (); 340 #endif 341 #if defined __STDC__ || defined __cplusplus 342 yypstate * yypstate_new (void); 343 #else 344 yypstate * yypstate_new (); 345 #endif 346 #if defined __STDC__ || defined __cplusplus 347 void yypstate_delete (yypstate *yyps); 348 #else 349 void yypstate_delete (); 350 #endif 351 #endif 352 353 354 /* Copy the second part of user declarations. */ 355 356 357 /* Line 264 of yacc.c */ 358 #line 355 "cint_c.tab.c" 359 360 #ifdef short 361 # undef short 362 #endif 363 364 #ifdef YYTYPE_UINT8 365 typedef YYTYPE_UINT8 yytype_uint8; 366 #else 367 typedef unsigned char yytype_uint8; 368 #endif 369 370 #ifdef YYTYPE_INT8 371 typedef YYTYPE_INT8 yytype_int8; 372 #elif (defined __STDC__ || defined __C99__FUNC__ \ 373 || defined __cplusplus || defined _MSC_VER) 374 typedef signed char yytype_int8; 375 #else 376 typedef short int yytype_int8; 377 #endif 378 379 #ifdef YYTYPE_UINT16 380 typedef YYTYPE_UINT16 yytype_uint16; 381 #else 382 typedef unsigned short int yytype_uint16; 383 #endif 384 385 #ifdef YYTYPE_INT16 386 typedef YYTYPE_INT16 yytype_int16; 387 #else 388 typedef short int yytype_int16; 389 #endif 390 391 #ifndef YYSIZE_T 392 # ifdef __SIZE_TYPE__ 393 # define YYSIZE_T __SIZE_TYPE__ 394 # elif defined size_t 395 # define YYSIZE_T size_t 396 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 397 || defined __cplusplus || defined _MSC_VER) 398 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 399 # define YYSIZE_T size_t 400 # else 401 # define YYSIZE_T unsigned int 402 # endif 403 #endif 404 405 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 406 407 #ifndef YY_ 408 # if defined YYENABLE_NLS && YYENABLE_NLS 409 # if ENABLE_NLS 410 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 411 # define YY_(msgid) dgettext ("bison-runtime", msgid) 412 # endif 413 # endif 414 # ifndef YY_ 415 # define YY_(msgid) msgid 416 # endif 417 #endif 418 419 /* Suppress unused-variable warnings by "using" E. */ 420 #if ! defined lint || defined __GNUC__ 421 # define YYUSE(e) ((void) (e)) 422 #else 423 # define YYUSE(e) /* empty */ 424 #endif 425 426 /* Identity function, used to suppress warnings about constant conditions. */ 427 #ifndef lint 428 # define YYID(n) (n) 429 #else 430 #if (defined __STDC__ || defined __C99__FUNC__ \ 431 || defined __cplusplus || defined _MSC_VER) 432 static int 433 YYID (int yyi) 434 #else 435 static int 436 YYID (yyi) 437 int yyi; 438 #endif 439 { 440 return yyi; 441 } 442 #endif 443 444 #if ! defined yyoverflow || YYERROR_VERBOSE 445 446 # ifdef YYSTACK_ALLOC 447 /* Pacify GCC's `empty if-body' warning. */ 448 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 449 # ifndef YYSTACK_ALLOC_MAXIMUM 450 /* The OS might guarantee only one guard page at the bottom of the stack, 451 and a page size can be as small as 4096 bytes. So we cannot safely 452 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 453 to allow for a few compiler-allocated temporary stack slots. */ 454 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 455 # endif 456 # else 457 # define YYSTACK_ALLOC YYMALLOC 458 # define YYSTACK_FREE YYFREE 459 # ifndef YYSTACK_ALLOC_MAXIMUM 460 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 461 # endif 462 # if (defined __cplusplus && ! defined _STDLIB_H \ 463 && ! ((defined YYMALLOC || defined malloc) \ 464 && (defined YYFREE || defined free))) 465 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 466 # ifndef _STDLIB_H 467 # define _STDLIB_H 1 468 # endif 469 # endif 470 # ifndef YYMALLOC 471 # define YYMALLOC malloc 472 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 473 || defined __cplusplus || defined _MSC_VER) 474 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 475 # endif 476 # endif 477 # ifndef YYFREE 478 # define YYFREE free 479 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 480 || defined __cplusplus || defined _MSC_VER) 481 void free (void *); /* INFRINGES ON USER NAME SPACE */ 482 # endif 483 # endif 484 # endif 485 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 486 487 488 #if (! defined yyoverflow \ 489 && (! defined __cplusplus \ 490 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ 491 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 492 493 /* A type that is properly aligned for any stack member. */ 494 union yyalloc 495 { 496 yytype_int16 yyss_alloc; 497 YYSTYPE yyvs_alloc; 498 YYLTYPE yyls_alloc; 499 }; 500 501 /* The size of the maximum gap between one aligned stack and the next. */ 502 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 503 504 /* The size of an array large to enough to hold all stacks, each with 505 N elements. */ 506 # define YYSTACK_BYTES(N) \ 507 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ 508 + 2 * YYSTACK_GAP_MAXIMUM) 509 510 /* Copy COUNT objects from FROM to TO. The source and destination do 511 not overlap. */ 512 # ifndef YYCOPY 513 # if defined __GNUC__ && 1 < __GNUC__ 514 # define YYCOPY(To, From, Count) \ 515 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 516 # else 517 # define YYCOPY(To, From, Count) \ 518 do \ 519 { \ 520 YYSIZE_T yyi; \ 521 for (yyi = 0; yyi < (Count); yyi++) \ 522 (To)[yyi] = (From)[yyi]; \ 523 } \ 524 while (YYID (0)) 525 # endif 526 # endif 527 528 /* Relocate STACK from its old location to the new one. The 529 local variables YYSIZE and YYSTACKSIZE give the old and new number of 530 elements in the stack, and YYPTR gives the new location of the 531 stack. Advance YYPTR to a properly aligned location for the next 532 stack. */ 533 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 534 do \ 535 { \ 536 YYSIZE_T yynewbytes; \ 537 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 538 Stack = &yyptr->Stack_alloc; \ 539 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 540 yyptr += yynewbytes / sizeof (*yyptr); \ 541 } \ 542 while (YYID (0)) 543 544 #endif 545 546 /* YYFINAL -- State number of the termination state. */ 547 #define YYFINAL 225 548 /* YYLAST -- Last index in YYTABLE. */ 549 #define YYLAST 1440 550 551 /* YYNTOKENS -- Number of terminals. */ 552 #define YYNTOKENS 89 553 /* YYNNTS -- Number of nonterminals. */ 554 #define YYNNTS 69 555 /* YYNRULES -- Number of rules. */ 556 #define YYNRULES 258 557 /* YYNRULES -- Number of states. */ 558 #define YYNSTATES 406 559 560 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 561 #define YYUNDEFTOK 2 562 #define YYMAXUTOK 319 563 564 #define YYTRANSLATE(YYX) \ 565 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 566 567 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 568 static const yytype_uint8 yytranslate[] = 569 { 570 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 571 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 572 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 573 2, 2, 2, 76, 2, 2, 2, 78, 71, 2, 574 65, 66, 72, 73, 70, 74, 69, 77, 2, 2, 575 2, 2, 2, 2, 2, 2, 2, 2, 84, 86, 576 79, 85, 80, 83, 2, 2, 2, 2, 2, 2, 577 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 578 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 579 2, 67, 2, 68, 81, 2, 2, 2, 2, 2, 580 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 581 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 582 2, 2, 2, 87, 82, 88, 75, 2, 2, 2, 583 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 584 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 585 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 586 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 587 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 588 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 589 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 590 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 591 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 592 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 593 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 594 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 595 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 596 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 597 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 598 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 599 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 600 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 601 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 602 }; 603 604 #if YYDEBUG 605 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 606 YYRHS. */ 607 static const yytype_uint16 yyprhs[] = 608 { 609 0, 0, 3, 5, 7, 9, 13, 15, 20, 24, 610 29, 33, 37, 40, 43, 45, 49, 51, 54, 57, 611 60, 63, 68, 70, 72, 74, 76, 78, 80, 82, 612 88, 93, 95, 99, 103, 107, 109, 113, 117, 119, 613 123, 127, 129, 133, 137, 141, 145, 147, 151, 155, 614 157, 161, 163, 167, 169, 173, 175, 179, 181, 185, 615 187, 193, 195, 199, 201, 203, 205, 207, 209, 211, 616 213, 215, 217, 219, 221, 223, 227, 229, 232, 236, 617 238, 241, 243, 246, 248, 251, 253, 257, 259, 263, 618 265, 267, 269, 271, 273, 275, 277, 279, 281, 283, 619 285, 287, 289, 291, 293, 295, 297, 303, 308, 311, 620 313, 315, 317, 320, 324, 326, 330, 332, 337, 343, 621 346, 348, 352, 354, 358, 361, 363, 366, 368, 370, 622 372, 375, 377, 379, 383, 388, 392, 397, 401, 403, 623 406, 409, 413, 415, 418, 420, 422, 426, 429, 432, 624 434, 436, 439, 441, 443, 446, 450, 453, 457, 461, 625 466, 469, 473, 477, 482, 484, 488, 493, 495, 499, 626 501, 503, 505, 507, 509, 511, 513, 515, 517, 520, 627 523, 526, 529, 533, 535, 537, 539, 541, 543, 545, 628 547, 549, 551, 553, 555, 557, 559, 561, 563, 565, 629 567, 569, 571, 573, 575, 577, 579, 581, 583, 585, 630 587, 589, 591, 593, 595, 597, 599, 601, 603, 605, 631 607, 609, 611, 613, 616, 620, 624, 629, 633, 635, 632 638, 642, 644, 647, 649, 652, 654, 657, 663, 671, 633 677, 683, 689, 697, 704, 712, 718, 723, 727, 730, 634 733, 736, 740, 742, 745, 747, 749, 751, 756 635 }; 636 637 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 638 static const yytype_int16 yyrhs[] = 639 { 640 155, 0, -1, 3, -1, 4, -1, 5, -1, 65, 641 109, 66, -1, 90, -1, 91, 67, 109, 68, -1, 642 91, 65, 66, -1, 91, 65, 92, 66, -1, 91, 643 69, 3, -1, 91, 7, 3, -1, 91, 8, -1, 644 91, 9, -1, 107, -1, 92, 70, 107, -1, 91, 645 -1, 8, 93, -1, 9, 93, -1, 94, 95, -1, 646 6, 93, -1, 6, 65, 135, 66, -1, 71, -1, 647 72, -1, 73, -1, 74, -1, 75, -1, 76, -1, 648 93, -1, 65, 44, 72, 66, 95, -1, 65, 32, 649 66, 95, -1, 95, -1, 96, 72, 95, -1, 96, 650 77, 95, -1, 96, 78, 95, -1, 96, -1, 97, 651 73, 96, -1, 97, 74, 96, -1, 97, -1, 98, 652 10, 97, -1, 98, 11, 97, -1, 98, -1, 99, 653 79, 98, -1, 99, 80, 98, -1, 99, 12, 98, 654 -1, 99, 13, 98, -1, 99, -1, 100, 14, 99, 655 -1, 100, 15, 99, -1, 100, -1, 101, 71, 100, 656 -1, 101, -1, 102, 81, 101, -1, 102, -1, 103, 657 82, 102, -1, 103, -1, 104, 16, 103, -1, 104, 658 -1, 105, 17, 104, -1, 105, -1, 105, 83, 109, 659 84, 106, -1, 106, -1, 93, 108, 107, -1, 85, 660 -1, 18, -1, 19, -1, 20, -1, 21, -1, 22, 661 -1, 23, -1, 24, -1, 25, -1, 26, -1, 27, 662 -1, 107, -1, 109, 70, 107, -1, 106, -1, 112, 663 86, -1, 112, 113, 86, -1, 115, -1, 115, 112, 664 -1, 116, -1, 116, 112, -1, 127, -1, 127, 112, 665 -1, 114, -1, 113, 70, 114, -1, 128, -1, 128, 666 85, 138, -1, 30, -1, 29, -1, 31, -1, 32, 667 -1, 33, -1, 44, -1, 34, -1, 35, -1, 36, 668 -1, 37, -1, 40, -1, 41, -1, 38, -1, 39, 669 -1, 117, -1, 123, -1, 28, -1, 118, 3, 87, 670 119, 88, -1, 118, 87, 119, 88, -1, 118, 3, 671 -1, 45, -1, 46, -1, 120, -1, 119, 120, -1, 672 126, 121, 86, -1, 122, -1, 121, 70, 122, -1, 673 128, -1, 47, 87, 124, 88, -1, 47, 3, 87, 674 124, 88, -1, 47, 3, -1, 125, -1, 124, 70, 675 125, -1, 3, -1, 3, 85, 110, -1, 116, 126, 676 -1, 116, -1, 127, 126, -1, 127, -1, 42, -1, 677 43, -1, 130, 129, -1, 129, -1, 3, -1, 65, 678 128, 66, -1, 129, 67, 110, 68, -1, 129, 67, 679 68, -1, 129, 65, 132, 66, -1, 129, 65, 66, 680 -1, 72, -1, 72, 131, -1, 72, 130, -1, 72, 681 131, 130, -1, 127, -1, 131, 127, -1, 133, -1, 682 134, -1, 133, 70, 134, -1, 112, 128, -1, 112, 683 136, -1, 112, -1, 126, -1, 126, 136, -1, 130, 684 -1, 137, -1, 130, 137, -1, 65, 136, 66, -1, 685 67, 68, -1, 67, 110, 68, -1, 137, 67, 68, 686 -1, 137, 67, 110, 68, -1, 65, 66, -1, 65, 687 132, 66, -1, 137, 65, 66, -1, 137, 65, 132, 688 66, -1, 107, -1, 87, 139, 88, -1, 87, 139, 689 70, 88, -1, 138, -1, 139, 70, 138, -1, 146, 690 -1, 147, -1, 148, -1, 151, -1, 152, -1, 153, 691 -1, 154, -1, 141, -1, 145, -1, 3, 86, -1, 692 4, 86, -1, 5, 86, -1, 61, 151, -1, 61, 693 28, 86, -1, 6, -1, 29, -1, 30, -1, 31, 694 -1, 32, -1, 33, -1, 34, -1, 35, -1, 36, 695 -1, 37, -1, 38, -1, 39, -1, 40, -1, 41, 696 -1, 42, -1, 43, -1, 44, -1, 45, -1, 46, 697 -1, 47, -1, 49, -1, 50, -1, 51, -1, 52, 698 -1, 53, -1, 54, -1, 55, -1, 56, -1, 57, 699 -1, 58, -1, 59, -1, 60, -1, 62, -1, 61, 700 -1, 3, -1, 28, -1, 5, -1, 4, -1, 142, 701 -1, 143, -1, 144, 143, -1, 62, 144, 86, -1, 702 3, 84, 140, -1, 49, 110, 84, 140, -1, 50, 703 84, 140, -1, 111, -1, 87, 88, -1, 87, 150, 704 88, -1, 111, -1, 149, 111, -1, 140, -1, 150, 705 140, -1, 86, -1, 109, 86, -1, 51, 65, 109, 706 66, 140, -1, 51, 65, 109, 66, 140, 52, 140, 707 -1, 53, 65, 109, 66, 140, -1, 64, 65, 92, 708 66, 86, -1, 54, 65, 109, 66, 140, -1, 55, 709 140, 54, 65, 109, 66, 86, -1, 56, 65, 151, 710 151, 66, 140, -1, 56, 65, 151, 151, 109, 66, 711 140, -1, 63, 65, 92, 66, 140, -1, 63, 65, 712 66, 140, -1, 57, 3, 86, -1, 58, 86, -1, 713 59, 86, -1, 60, 86, -1, 60, 109, 86, -1, 714 156, -1, 155, 156, -1, 0, -1, 157, -1, 140, 715 -1, 112, 128, 149, 148, -1, 112, 128, 148, -1 716 }; 717 718 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 719 static const yytype_uint16 yyrline[] = 720 { 721 0, 101, 101, 102, 103, 104, 108, 109, 110, 114, 722 118, 122, 126, 127, 131, 132, 140, 141, 142, 143, 723 144, 145, 149, 150, 151, 152, 153, 154, 158, 161, 724 163, 167, 168, 169, 170, 174, 175, 176, 180, 181, 725 182, 186, 187, 188, 189, 190, 194, 195, 196, 200, 726 201, 205, 206, 210, 211, 215, 216, 220, 221, 225, 727 226, 231, 232, 250, 251, 252, 253, 254, 255, 256, 728 257, 258, 259, 260, 264, 265, 272, 276, 277, 284, 729 285, 286, 287, 288, 289, 293, 294, 298, 299, 304, 730 305, 306, 307, 308, 312, 313, 314, 315, 316, 317, 731 318, 319, 320, 321, 322, 323, 327, 328, 329, 333, 732 334, 338, 339, 343, 351, 352, 356, 362, 363, 364, 733 368, 369, 373, 374, 378, 379, 380, 381, 385, 386, 734 390, 394, 398, 399, 400, 402, 404, 409, 416, 417, 735 418, 419, 423, 424, 429, 434, 435, 443, 447, 448, 736 463, 464, 468, 469, 470, 474, 475, 476, 477, 478, 737 479, 480, 481, 482, 486, 487, 488, 492, 493, 497, 738 498, 499, 504, 505, 506, 507, 508, 509, 510, 511, 739 512, 517, 518, 522, 523, 524, 525, 526, 527, 528, 740 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 741 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 742 549, 550, 551, 552, 553, 554, 555, 561, 562, 563, 743 564, 565, 569, 570, 578, 581, 582, 583, 587, 590, 744 591, 597, 598, 602, 603, 611, 612, 616, 620, 624, 745 625, 629, 633, 637, 641, 645, 649, 656, 657, 658, 746 659, 660, 665, 691, 717, 726, 728, 732, 733 747 }; 748 #endif 749 750 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 751 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 752 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 753 static const char *const yytname[] = 754 { 755 "XEOF", "error", "$undefined", "IDENTIFIER", "CONSTANT", 756 "STRING_LITERAL", "SIZEOF", "PTR_OP", "INC_OP", "DEC_OP", "LEFT_OP", 757 "RIGHT_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", 758 "MUL_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", "ADD_ASSIGN", "SUB_ASSIGN", 759 "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", 760 "TYPE_NAME", "TYPEDEF", "EXTERN", "STATIC", "AUTO", "REGISTER", "CHAR", 761 "SHORT", "INT", "LONG", "SIGNED", "UNSIGNED", "FLOAT", "DOUBLE", "CONST", 762 "VOLATILE", "T_VOID", "STRUCT", "UNION", "ENUM", "ELLIPSIS", "CASE", 763 "DEFAULT", "IF", "ELSE", "SWITCH", "WHILE", "DO", "FOR", "GOTO", 764 "CONTINUE", "BREAK", "RETURN", "PRINT", "CINT", "ITERATOR", "MACRO", 765 "'('", "')'", "'['", "']'", "'.'", "','", "'&'", "'*'", "'+'", "'-'", 766 "'~'", "'!'", "'/'", "'%'", "'<'", "'>'", "'^'", "'|'", "'?'", "':'", 767 "'='", "';'", "'{'", "'}'", "$accept", "primary_expression", 768 "postfix_expression", "argument_expression_list", "unary_expression", 769 "unary_operator", "cast_expression", "multiplicative_expression", 770 "additive_expression", "shift_expression", "relational_expression", 771 "equality_expression", "and_expression", "exclusive_or_expression", 772 "inclusive_or_expression", "logical_and_expression", 773 "logical_or_expression", "conditional_expression", 774 "assignment_expression", "assignment_operator", "expression", 775 "constant_expression", "declaration", "declaration_specifiers", 776 "init_declarator_list", "init_declarator", "storage_class_specifier", 777 "type_specifier", "struct_or_union_specifier", "struct_or_union", 778 "struct_declaration_list", "struct_declaration", 779 "struct_declarator_list", "struct_declarator", "enum_specifier", 780 "enumerator_list", "enumerator", "specifier_qualifier_list", 781 "type_qualifier", "declarator", "direct_declarator", "pointer", 782 "type_qualifier_list", "parameter_type_list", "parameter_list", 783 "parameter_declaration", "type_name", "abstract_declarator", 784 "direct_abstract_declarator", "initializer", "initializer_list", 785 "statement", "print_statement", "keyword_arg", "cint_argument", 786 "cint_argument_list", "cint_statement", "labeled_statement", 787 "declaration_statement", "compound_statement", "declaration_list", 788 "statement_list", "expression_statement", "selection_statement", 789 "iteration_statement", "jump_statement", "translation_unit", 790 "external_declaration", "function_definition", 0 791 }; 792 #endif 793 794 # ifdef YYPRINT 795 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 796 token YYLEX-NUM. */ 797 static const yytype_uint16 yytoknum[] = 798 { 799 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 800 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 801 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 802 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 803 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 804 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 805 315, 316, 317, 318, 319, 40, 41, 91, 93, 46, 806 44, 38, 42, 43, 45, 126, 33, 47, 37, 60, 807 62, 94, 124, 63, 58, 61, 59, 123, 125 808 }; 809 # endif 810 811 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 812 static const yytype_uint8 yyr1[] = 813 { 814 0, 89, 90, 90, 90, 90, 91, 91, 91, 91, 815 91, 91, 91, 91, 92, 92, 93, 93, 93, 93, 816 93, 93, 94, 94, 94, 94, 94, 94, 95, 95, 817 95, 96, 96, 96, 96, 97, 97, 97, 98, 98, 818 98, 99, 99, 99, 99, 99, 100, 100, 100, 101, 819 101, 102, 102, 103, 103, 104, 104, 105, 105, 106, 820 106, 107, 107, 108, 108, 108, 108, 108, 108, 108, 821 108, 108, 108, 108, 109, 109, 110, 111, 111, 112, 822 112, 112, 112, 112, 112, 113, 113, 114, 114, 115, 823 115, 115, 115, 115, 116, 116, 116, 116, 116, 116, 824 116, 116, 116, 116, 116, 116, 117, 117, 117, 118, 825 118, 119, 119, 120, 121, 121, 122, 123, 123, 123, 826 124, 124, 125, 125, 126, 126, 126, 126, 127, 127, 827 128, 128, 129, 129, 129, 129, 129, 129, 130, 130, 828 130, 130, 131, 131, 132, 133, 133, 134, 134, 134, 829 135, 135, 136, 136, 136, 137, 137, 137, 137, 137, 830 137, 137, 137, 137, 138, 138, 138, 139, 139, 140, 831 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 832 140, 141, 141, 142, 142, 142, 142, 142, 142, 142, 833 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 834 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 835 142, 142, 142, 142, 142, 142, 142, 143, 143, 143, 836 143, 143, 144, 144, 145, 146, 146, 146, 147, 148, 837 148, 149, 149, 150, 150, 151, 151, 152, 152, 152, 838 152, 153, 153, 153, 153, 153, 153, 154, 154, 154, 839 154, 154, 155, 155, 155, 156, 156, 157, 157 840 }; 841 842 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 843 static const yytype_uint8 yyr2[] = 844 { 845 0, 2, 1, 1, 1, 3, 1, 4, 3, 4, 846 3, 3, 2, 2, 1, 3, 1, 2, 2, 2, 847 2, 4, 1, 1, 1, 1, 1, 1, 1, 5, 848 4, 1, 3, 3, 3, 1, 3, 3, 1, 3, 849 3, 1, 3, 3, 3, 3, 1, 3, 3, 1, 850 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 851 5, 1, 3, 1, 1, 1, 1, 1, 1, 1, 852 1, 1, 1, 1, 1, 3, 1, 2, 3, 1, 853 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 854 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 855 1, 1, 1, 1, 1, 1, 5, 4, 2, 1, 856 1, 1, 2, 3, 1, 3, 1, 4, 5, 2, 857 1, 3, 1, 3, 2, 1, 2, 1, 1, 1, 858 2, 1, 1, 3, 4, 3, 4, 3, 1, 2, 859 2, 3, 1, 2, 1, 1, 3, 2, 2, 1, 860 1, 2, 1, 1, 2, 3, 2, 3, 3, 4, 861 2, 3, 3, 4, 1, 3, 4, 1, 3, 1, 862 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 863 2, 2, 3, 1, 1, 1, 1, 1, 1, 1, 864 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 865 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 866 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 867 1, 1, 1, 2, 3, 3, 4, 3, 1, 2, 868 3, 1, 2, 1, 2, 1, 2, 5, 7, 5, 869 5, 5, 7, 6, 7, 5, 4, 3, 2, 2, 870 2, 3, 1, 2, 1, 1, 1, 4, 3 871 }; 872 873 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 874 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 875 means the default is an error. */ 876 static const yytype_uint16 yydefact[] = 877 { 878 0, 254, 2, 3, 4, 0, 0, 0, 105, 90, 879 89, 91, 92, 93, 95, 96, 97, 98, 101, 102, 880 99, 100, 128, 129, 94, 109, 110, 0, 0, 0, 881 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 882 0, 0, 0, 0, 22, 23, 24, 25, 26, 27, 883 235, 0, 6, 16, 28, 0, 31, 35, 38, 41, 884 46, 49, 51, 53, 55, 57, 59, 61, 74, 0, 885 228, 0, 79, 81, 103, 0, 104, 83, 256, 176, 886 177, 169, 170, 171, 172, 173, 174, 175, 0, 252, 887 255, 0, 178, 179, 180, 2, 3, 4, 0, 20, 888 0, 17, 18, 119, 0, 28, 76, 0, 0, 0, 889 0, 0, 0, 0, 0, 0, 248, 249, 250, 0, 890 0, 181, 217, 220, 219, 183, 218, 184, 185, 186, 891 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 892 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 893 207, 208, 209, 210, 211, 212, 213, 214, 216, 215, 894 221, 222, 0, 0, 0, 0, 0, 0, 229, 233, 895 0, 0, 12, 13, 0, 0, 0, 64, 65, 66, 896 67, 68, 69, 70, 71, 72, 73, 63, 0, 19, 897 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 899 236, 132, 0, 138, 77, 0, 85, 87, 131, 0, 900 80, 82, 108, 0, 84, 1, 253, 225, 125, 150, 901 127, 0, 0, 122, 0, 120, 0, 227, 0, 0, 902 0, 87, 0, 0, 247, 251, 182, 224, 223, 0, 903 0, 14, 0, 0, 0, 5, 230, 234, 11, 8, 904 0, 0, 10, 62, 32, 33, 34, 36, 37, 39, 905 40, 44, 45, 42, 43, 47, 48, 50, 52, 54, 906 56, 58, 0, 75, 0, 142, 140, 139, 0, 78, 907 0, 231, 258, 0, 0, 0, 130, 0, 0, 111, 908 0, 124, 0, 0, 152, 151, 153, 126, 21, 0, 909 0, 0, 117, 226, 0, 0, 0, 0, 0, 246, 910 0, 0, 0, 30, 0, 9, 7, 0, 133, 143, 911 141, 86, 0, 164, 88, 232, 257, 137, 149, 0, 912 144, 145, 135, 0, 0, 107, 112, 0, 114, 116, 913 160, 0, 0, 156, 0, 154, 0, 0, 118, 123, 914 121, 237, 239, 241, 0, 0, 0, 245, 15, 240, 915 29, 60, 167, 0, 0, 147, 152, 148, 136, 0, 916 134, 106, 0, 113, 161, 155, 157, 162, 0, 158, 917 0, 0, 0, 243, 0, 0, 165, 146, 115, 163, 918 159, 238, 242, 244, 166, 168 919 }; 920 921 /* YYDEFGOTO[NTERM-NUM]. */ 922 static const yytype_int16 yydefgoto[] = 923 { 924 -1, 52, 53, 250, 54, 55, 56, 57, 58, 59, 925 60, 61, 62, 63, 64, 65, 66, 67, 68, 188, 926 69, 107, 70, 112, 215, 216, 72, 73, 74, 75, 927 298, 299, 347, 348, 76, 234, 235, 300, 77, 241, 928 218, 219, 287, 351, 340, 341, 231, 352, 306, 334, 929 373, 78, 79, 160, 161, 162, 80, 81, 82, 83, 930 293, 170, 84, 85, 86, 87, 88, 89, 90 931 }; 932 933 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 934 STATE-NUM. */ 935 #define YYPACT_NINF -311 936 static const yytype_int16 yypact[] = 937 { 938 360, -311, 19, -56, -25, 1028, 1049, 1049, -311, -311, 939 -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, 940 -311, -311, -311, -311, -311, -311, -311, 6, 1061, -18, 941 14, 33, 88, 667, 95, 126, 79, 104, 790, 241, 942 1155, 105, 118, 825, -311, -311, -311, -311, -311, -311, 943 -311, 519, -311, 56, 323, 1061, -311, 80, -49, 195, 944 40, 226, 124, 128, 117, 187, 9, -311, -311, -15, 945 -311, 10, 1393, 1393, -311, 8, -311, 1393, -311, -311, 946 -311, -311, -311, -311, -311, -311, -311, -311, 445, -311, 947 -311, 667, -311, -311, -311, -311, -311, -311, 880, -311, 948 1061, -311, -311, 120, 234, -311, -311, 172, 667, 1061, 949 1061, 1061, 10, 203, 806, 179, -311, -311, -311, -2, 950 180, -311, -311, -311, -311, -311, -311, -311, -311, -311, 951 -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, 952 -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, 953 -311, -311, -311, -311, -311, -311, -311, -311, -311, -311, 954 -311, -311, 730, 901, 1061, 201, 196, 4, -311, -311, 955 593, 267, -311, -311, 925, 1061, 268, -311, -311, -311, 956 -311, -311, -311, -311, -311, -311, -311, -311, 1061, -311, 957 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 958 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 1061, 959 -311, -311, 35, -14, -311, 61, -311, 1190, 65, 37, 960 -311, -311, 190, 1244, -311, -311, -311, -311, 1244, 84, 961 1244, 212, 234, 194, -39, -311, 667, -311, 58, 96, 962 97, 204, 221, 806, -311, -311, -311, -311, -311, 667, 963 102, -311, 107, 1061, 224, -311, -311, -311, -311, -311, 964 109, 116, -311, -311, -311, -311, -311, 80, 80, -49, 965 -49, 195, 195, 195, 195, 40, 40, 226, 124, 128, 966 117, 187, 52, -311, 225, -311, -311, -14, 35, -311, 967 39, -311, -311, 1210, 1315, 938, 65, 1244, 424, -311, 968 35, -311, 1270, 954, 122, -311, 133, -311, -311, -38, 969 1061, 234, -311, -311, 667, 667, 667, 1061, 975, -311, 970 667, 1061, 206, -311, 1061, -311, -311, 1061, -311, -311, 971 -311, -311, 39, -311, -311, -311, -311, -311, 34, 227, 972 229, -311, -311, 228, 807, -311, -311, 64, -311, -311, 973 -311, 235, 237, -311, 232, 133, 1354, 1012, -311, -311, 974 -311, 243, -311, -311, 110, 667, 112, -311, -311, -311, 975 -311, -311, -311, -19, 1110, -311, 51, -311, -311, 1393, 976 -311, -311, 35, -311, -311, -311, -311, -311, 239, -311, 977 240, 667, 223, -311, 667, 188, -311, -311, -311, -311, 978 -311, -311, -311, -311, -311, -311 979 }; 980 981 /* YYPGOTO[NTERM-NUM]. */ 982 static const yytype_int16 yypgoto[] = 983 { 984 -311, -311, -311, -107, 28, -311, -51, 49, 59, 16, 985 50, 108, 103, 114, 115, 113, -311, -23, -147, -311, 986 -20, -149, -207, 0, -311, 36, -311, -59, -311, -311, 987 25, -284, -311, -57, -311, 94, 17, -95, -86, -64, 988 -217, -193, -311, -248, -311, -50, -311, -221, -289, -310, 989 -311, -32, -311, -311, 168, -311, -311, -311, -311, -196, 990 -311, -311, -33, -311, -311, -311, -311, 244, -311 991 }; 992 993 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 994 positive, shift that token. If negative, reduce the rule which 995 number is the opposite. If zero, do what YYDEFACT says. 996 If YYTABLE_NINF, syntax error. */ 997 #define YYTABLE_NINF -1 998 static const yytype_uint16 yytable[] = 999 { 1000 71, 113, 296, 229, 189, 106, 121, 217, 305, 103, 1001 291, 222, 230, 211, 346, 355, 251, 251, 119, 169, 1002 286, 292, 372, 167, 193, 194, 207, 251, 22, 23, 1003 93, 311, 311, 99, 101, 102, 304, 211, 211, 228, 1004 211, 263, 95, 96, 97, 5, 339, 6, 7, 312, 1005 358, 395, 197, 198, 211, 209, 105, 252, 213, 227, 1006 346, 94, 283, 171, 172, 173, 108, 260, 209, 396, 1007 255, 210, 220, 221, 209, 212, 237, 224, 167, 109, 1008 167, 243, 213, 105, 245, 405, 335, 355, 71, 238, 1009 239, 240, 208, 104, 330, 223, 214, 336, 110, 374, 1010 212, 303, 212, 91, 43, 92, 213, 213, 388, 304, 1011 44, 45, 46, 47, 48, 49, 374, 377, 303, 199, 1012 200, 174, 209, 175, 314, 176, 332, 285, 209, 115, 1013 294, 288, 295, 301, 382, 307, 327, 230, 257, 264, 1014 265, 266, 230, 333, 230, 376, 343, 289, 284, 302, 1015 383, 303, 190, 111, 354, 261, 213, 191, 192, 296, 1016 114, 359, 315, 316, 228, 116, 209, 209, 320, 228, 1017 163, 228, 321, 322, 368, 325, 392, 321, 394, 321, 1018 209, 376, 209, 164, 326, 333, 209, 302, 282, 303, 1019 117, 95, 96, 97, 5, 203, 6, 7, 356, 205, 1020 357, 329, 323, 206, 313, 195, 196, 232, 390, 204, 1021 318, 230, 230, 271, 272, 273, 274, 319, 105, 105, 1022 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 1023 105, 105, 105, 105, 105, 105, 349, 233, 228, 228, 1024 201, 202, 267, 268, 95, 96, 97, 5, 333, 6, 1025 7, 275, 276, 43, 269, 270, 236, 242, 230, 44, 1026 45, 46, 47, 48, 49, 244, 246, 253, 254, 120, 1027 258, 262, 106, 370, 375, 332, 404, 297, 308, 310, 1028 106, 105, 361, 362, 363, 228, 317, 106, 367, 290, 1029 324, 328, 369, 378, 338, 391, 380, 364, 366, 379, 1030 386, 384, 338, 385, 371, 399, 43, 278, 400, 402, 1031 284, 277, 44, 45, 46, 47, 48, 49, 349, 279, 1032 281, 280, 344, 105, 331, 398, 309, 50, 360, 397, 1033 248, 105, 226, 393, 106, 0, 0, 0, 105, 0, 1034 0, 177, 178, 179, 180, 181, 182, 183, 184, 185, 1035 186, 0, 105, 0, 0, 105, 338, 0, 0, 401, 1036 1, 0, 403, 2, 3, 4, 5, 0, 6, 7, 1037 0, 0, 0, 0, 338, 0, 0, 0, 0, 338, 1038 0, 0, 0, 0, 0, 105, 0, 0, 8, 9, 1039 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1040 20, 21, 22, 23, 24, 25, 26, 27, 187, 28, 1041 29, 30, 0, 31, 32, 33, 34, 35, 36, 37, 1042 38, 39, 40, 41, 42, 43, 0, 0, 0, 0, 1043 0, 44, 45, 46, 47, 48, 49, 0, 0, 0, 1044 0, 0, 0, 0, 0, 225, 50, 51, 2, 3, 1045 4, 5, 8, 6, 7, 0, 0, 0, 14, 15, 1046 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1047 26, 27, 0, 8, 9, 10, 11, 12, 13, 14, 1048 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1049 25, 26, 27, 0, 28, 29, 30, 0, 31, 32, 1050 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 1051 43, 0, 345, 0, 0, 0, 44, 45, 46, 47, 1052 48, 49, 2, 3, 4, 5, 0, 6, 7, 0, 1053 0, 50, 51, 0, 0, 0, 0, 0, 0, 0, 1054 0, 0, 0, 0, 0, 0, 0, 8, 9, 10, 1055 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1056 21, 22, 23, 24, 25, 26, 27, 0, 28, 29, 1057 30, 0, 31, 32, 33, 34, 35, 36, 37, 38, 1058 39, 40, 41, 42, 43, 0, 0, 0, 0, 0, 1059 44, 45, 46, 47, 48, 49, 2, 3, 4, 5, 1060 0, 6, 7, 0, 0, 50, 51, 168, 0, 0, 1061 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1062 0, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1063 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 1064 27, 0, 28, 29, 30, 0, 31, 32, 33, 34, 1065 35, 36, 37, 38, 39, 40, 41, 42, 43, 0, 1066 0, 0, 0, 0, 44, 45, 46, 47, 48, 49, 1067 2, 3, 4, 5, 0, 6, 7, 0, 0, 50, 1068 51, 256, 0, 0, 0, 0, 0, 0, 0, 0, 1069 0, 0, 0, 0, 0, 8, 9, 10, 11, 12, 1070 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 1071 23, 24, 25, 26, 27, 0, 28, 29, 30, 0, 1072 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 1073 41, 42, 43, 122, 123, 124, 125, 0, 44, 45, 1074 46, 47, 48, 49, 0, 0, 0, 0, 0, 0, 1075 0, 0, 0, 50, 51, 0, 0, 0, 126, 127, 1076 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 1077 138, 139, 140, 141, 142, 143, 144, 145, 0, 146, 1078 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 1079 157, 158, 159, 95, 96, 97, 5, 0, 6, 7, 1080 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 1081 96, 97, 5, 0, 6, 7, 247, 0, 0, 0, 1082 0, 0, 0, 0, 0, 0, 0, 0, 95, 96, 1083 97, 5, 0, 6, 7, 8, 0, 0, 0, 0, 1084 0, 14, 15, 16, 17, 18, 19, 20, 21, 22, 1085 23, 24, 25, 26, 27, 43, 0, 165, 0, 0, 1086 0, 44, 45, 46, 47, 48, 49, 0, 0, 166, 1087 0, 43, 0, 0, 0, 0, 118, 44, 45, 46, 1088 47, 48, 49, 95, 96, 97, 5, 0, 6, 7, 1089 43, 0, 50, 0, 0, 381, 44, 45, 46, 47, 1090 48, 49, 0, 0, 95, 96, 97, 5, 8, 6, 1091 7, 0, 0, 0, 14, 15, 16, 17, 18, 19, 1092 20, 21, 22, 23, 24, 25, 26, 27, 95, 96, 1093 97, 5, 0, 6, 7, 0, 0, 0, 0, 0, 1094 0, 95, 96, 97, 5, 43, 6, 7, 0, 0, 1095 0, 44, 45, 46, 47, 48, 49, 95, 96, 97, 1096 5, 0, 6, 7, 0, 0, 43, 249, 0, 0, 1097 0, 0, 44, 45, 46, 47, 48, 49, 95, 96, 1098 97, 5, 0, 6, 7, 0, 0, 0, 0, 0, 1099 43, 259, 0, 0, 0, 0, 44, 45, 46, 47, 1100 48, 49, 0, 43, 0, 0, 342, 0, 0, 44, 1101 45, 46, 47, 48, 49, 95, 96, 97, 5, 43, 1102 6, 7, 353, 0, 0, 44, 45, 46, 47, 48, 1103 49, 95, 96, 97, 5, 0, 6, 7, 0, 0, 1104 43, 365, 0, 0, 0, 0, 44, 45, 46, 47, 1105 48, 49, 95, 96, 97, 5, 0, 6, 7, 0, 1106 0, 0, 0, 0, 95, 96, 97, 5, 0, 6, 1107 7, 0, 0, 0, 0, 0, 0, 43, 0, 0, 1108 389, 0, 0, 44, 45, 46, 47, 48, 49, 0, 1109 0, 0, 0, 98, 0, 0, 0, 0, 0, 44, 1110 45, 46, 47, 48, 49, 0, 0, 0, 0, 0, 1111 0, 0, 0, 211, 100, 0, 0, 0, 0, 0, 1112 44, 45, 46, 47, 48, 49, 43, 0, 0, 0, 1113 0, 0, 44, 45, 46, 47, 48, 49, 8, 9, 1114 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1115 20, 21, 22, 23, 24, 25, 26, 27, 122, 123, 1116 124, 125, 0, 0, 0, 0, 0, 0, 0, 0, 1117 0, 0, 0, 0, 0, 374, 350, 303, 0, 0, 1118 0, 0, 213, 126, 127, 128, 129, 130, 131, 132, 1119 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 1120 143, 144, 145, 0, 146, 147, 148, 149, 150, 151, 1121 152, 153, 154, 155, 156, 157, 158, 159, 8, 9, 1122 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1123 20, 21, 22, 23, 24, 25, 26, 27, 8, 9, 1124 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1125 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 1126 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1127 0, 0, 8, 0, 0, 290, 0, 51, 14, 15, 1128 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1129 26, 27, 0, 0, 0, 0, 0, 51, 8, 9, 1130 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1131 20, 21, 22, 23, 24, 25, 26, 27, 0, 0, 1132 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1133 0, 0, 0, 0, 0, 302, 350, 303, 0, 0, 1134 0, 0, 213, 8, 9, 10, 11, 12, 13, 14, 1135 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1136 25, 26, 27, 0, 0, 0, 0, 0, 0, 0, 1137 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1138 0, 337, 8, 9, 10, 11, 12, 13, 14, 15, 1139 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1140 26, 27, 0, 0, 0, 0, 0, 0, 0, 0, 1141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1142 387, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1143 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 1144 27 1145 }; 1146 1147 static const yytype_int16 yycheck[] = 1148 { 1149 0, 33, 219, 98, 55, 28, 39, 71, 229, 3, 1150 217, 3, 98, 3, 298, 304, 163, 164, 38, 51, 1151 213, 217, 332, 43, 73, 74, 17, 174, 42, 43, 1152 86, 70, 70, 5, 6, 7, 229, 3, 3, 98, 1153 3, 188, 3, 4, 5, 6, 294, 8, 9, 88, 1154 88, 70, 12, 13, 3, 70, 28, 164, 72, 91, 1155 344, 86, 209, 7, 8, 9, 84, 174, 70, 88, 1156 66, 86, 72, 73, 70, 65, 108, 77, 98, 65, 1157 100, 114, 72, 55, 86, 395, 293, 376, 88, 109, 1158 110, 111, 83, 87, 287, 87, 86, 293, 65, 65, 1159 65, 67, 65, 84, 65, 86, 72, 72, 356, 302, 1160 71, 72, 73, 74, 75, 76, 65, 338, 67, 79, 1161 80, 65, 70, 67, 66, 69, 87, 213, 70, 3, 1162 65, 70, 67, 228, 70, 230, 84, 223, 170, 190, 1163 191, 192, 228, 290, 230, 338, 295, 86, 212, 65, 1164 86, 67, 72, 65, 303, 175, 72, 77, 78, 376, 1165 65, 310, 66, 66, 223, 86, 70, 70, 66, 228, 1166 65, 230, 70, 66, 321, 66, 66, 70, 66, 70, 1167 70, 374, 70, 65, 68, 332, 70, 65, 208, 67, 1168 86, 3, 4, 5, 6, 71, 8, 9, 65, 82, 1169 67, 287, 253, 16, 236, 10, 11, 87, 357, 81, 1170 243, 297, 298, 197, 198, 199, 200, 249, 190, 191, 1171 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 1172 202, 203, 204, 205, 206, 207, 300, 3, 297, 298, 1173 14, 15, 193, 194, 3, 4, 5, 6, 395, 8, 1174 9, 201, 202, 65, 195, 196, 84, 54, 344, 71, 1175 72, 73, 74, 75, 76, 86, 86, 66, 72, 28, 1176 3, 3, 295, 324, 338, 87, 88, 87, 66, 85, 1177 303, 253, 314, 315, 316, 344, 65, 310, 320, 85, 1178 66, 66, 86, 66, 294, 52, 68, 317, 318, 70, 1179 68, 66, 302, 66, 327, 66, 65, 204, 68, 86, 1180 374, 203, 71, 72, 73, 74, 75, 76, 382, 205, 1181 207, 206, 297, 295, 288, 382, 232, 86, 311, 379, 1182 162, 303, 88, 365, 357, -1, -1, -1, 310, -1, 1183 -1, 18, 19, 20, 21, 22, 23, 24, 25, 26, 1184 27, -1, 324, -1, -1, 327, 356, -1, -1, 391, 1185 0, -1, 394, 3, 4, 5, 6, -1, 8, 9, 1186 -1, -1, -1, -1, 374, -1, -1, -1, -1, 379, 1187 -1, -1, -1, -1, -1, 357, -1, -1, 28, 29, 1188 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1189 40, 41, 42, 43, 44, 45, 46, 47, 85, 49, 1190 50, 51, -1, 53, 54, 55, 56, 57, 58, 59, 1191 60, 61, 62, 63, 64, 65, -1, -1, -1, -1, 1192 -1, 71, 72, 73, 74, 75, 76, -1, -1, -1, 1193 -1, -1, -1, -1, -1, 0, 86, 87, 3, 4, 1194 5, 6, 28, 8, 9, -1, -1, -1, 34, 35, 1195 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 1196 46, 47, -1, 28, 29, 30, 31, 32, 33, 34, 1197 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 1198 45, 46, 47, -1, 49, 50, 51, -1, 53, 54, 1199 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 1200 65, -1, 88, -1, -1, -1, 71, 72, 73, 74, 1201 75, 76, 3, 4, 5, 6, -1, 8, 9, -1, 1202 -1, 86, 87, -1, -1, -1, -1, -1, -1, -1, 1203 -1, -1, -1, -1, -1, -1, -1, 28, 29, 30, 1204 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 1205 41, 42, 43, 44, 45, 46, 47, -1, 49, 50, 1206 51, -1, 53, 54, 55, 56, 57, 58, 59, 60, 1207 61, 62, 63, 64, 65, -1, -1, -1, -1, -1, 1208 71, 72, 73, 74, 75, 76, 3, 4, 5, 6, 1209 -1, 8, 9, -1, -1, 86, 87, 88, -1, -1, 1210 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1211 -1, 28, 29, 30, 31, 32, 33, 34, 35, 36, 1212 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 1213 47, -1, 49, 50, 51, -1, 53, 54, 55, 56, 1214 57, 58, 59, 60, 61, 62, 63, 64, 65, -1, 1215 -1, -1, -1, -1, 71, 72, 73, 74, 75, 76, 1216 3, 4, 5, 6, -1, 8, 9, -1, -1, 86, 1217 87, 88, -1, -1, -1, -1, -1, -1, -1, -1, 1218 -1, -1, -1, -1, -1, 28, 29, 30, 31, 32, 1219 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 1220 43, 44, 45, 46, 47, -1, 49, 50, 51, -1, 1221 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 1222 63, 64, 65, 3, 4, 5, 6, -1, 71, 72, 1223 73, 74, 75, 76, -1, -1, -1, -1, -1, -1, 1224 -1, -1, -1, 86, 87, -1, -1, -1, 28, 29, 1225 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1226 40, 41, 42, 43, 44, 45, 46, 47, -1, 49, 1227 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 1228 60, 61, 62, 3, 4, 5, 6, -1, 8, 9, 1229 -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 1230 4, 5, 6, -1, 8, 9, 86, -1, -1, -1, 1231 -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 1232 5, 6, -1, 8, 9, 28, -1, -1, -1, -1, 1233 -1, 34, 35, 36, 37, 38, 39, 40, 41, 42, 1234 43, 44, 45, 46, 47, 65, -1, 32, -1, -1, 1235 -1, 71, 72, 73, 74, 75, 76, -1, -1, 44, 1236 -1, 65, -1, -1, -1, -1, 86, 71, 72, 73, 1237 74, 75, 76, 3, 4, 5, 6, -1, 8, 9, 1238 65, -1, 86, -1, -1, 88, 71, 72, 73, 74, 1239 75, 76, -1, -1, 3, 4, 5, 6, 28, 8, 1240 9, -1, -1, -1, 34, 35, 36, 37, 38, 39, 1241 40, 41, 42, 43, 44, 45, 46, 47, 3, 4, 1242 5, 6, -1, 8, 9, -1, -1, -1, -1, -1, 1243 -1, 3, 4, 5, 6, 65, 8, 9, -1, -1, 1244 -1, 71, 72, 73, 74, 75, 76, 3, 4, 5, 1245 6, -1, 8, 9, -1, -1, 65, 66, -1, -1, 1246 -1, -1, 71, 72, 73, 74, 75, 76, 3, 4, 1247 5, 6, -1, 8, 9, -1, -1, -1, -1, -1, 1248 65, 66, -1, -1, -1, -1, 71, 72, 73, 74, 1249 75, 76, -1, 65, -1, -1, 68, -1, -1, 71, 1250 72, 73, 74, 75, 76, 3, 4, 5, 6, 65, 1251 8, 9, 68, -1, -1, 71, 72, 73, 74, 75, 1252 76, 3, 4, 5, 6, -1, 8, 9, -1, -1, 1253 65, 66, -1, -1, -1, -1, 71, 72, 73, 74, 1254 75, 76, 3, 4, 5, 6, -1, 8, 9, -1, 1255 -1, -1, -1, -1, 3, 4, 5, 6, -1, 8, 1256 9, -1, -1, -1, -1, -1, -1, 65, -1, -1, 1257 68, -1, -1, 71, 72, 73, 74, 75, 76, -1, 1258 -1, -1, -1, 65, -1, -1, -1, -1, -1, 71, 1259 72, 73, 74, 75, 76, -1, -1, -1, -1, -1, 1260 -1, -1, -1, 3, 65, -1, -1, -1, -1, -1, 1261 71, 72, 73, 74, 75, 76, 65, -1, -1, -1, 1262 -1, -1, 71, 72, 73, 74, 75, 76, 28, 29, 1263 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1264 40, 41, 42, 43, 44, 45, 46, 47, 3, 4, 1265 5, 6, -1, -1, -1, -1, -1, -1, -1, -1, 1266 -1, -1, -1, -1, -1, 65, 66, 67, -1, -1, 1267 -1, -1, 72, 28, 29, 30, 31, 32, 33, 34, 1268 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 1269 45, 46, 47, -1, 49, 50, 51, 52, 53, 54, 1270 55, 56, 57, 58, 59, 60, 61, 62, 28, 29, 1271 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1272 40, 41, 42, 43, 44, 45, 46, 47, 28, 29, 1273 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1274 40, 41, 42, 43, 44, 45, 46, 47, -1, -1, 1275 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1276 -1, -1, 28, -1, -1, 85, -1, 87, 34, 35, 1277 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 1278 46, 47, -1, -1, -1, -1, -1, 87, 28, 29, 1279 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1280 40, 41, 42, 43, 44, 45, 46, 47, -1, -1, 1281 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1282 -1, -1, -1, -1, -1, 65, 66, 67, -1, -1, 1283 -1, -1, 72, 28, 29, 30, 31, 32, 33, 34, 1284 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 1285 45, 46, 47, -1, -1, -1, -1, -1, -1, -1, 1286 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1287 -1, 66, 28, 29, 30, 31, 32, 33, 34, 35, 1288 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 1289 46, 47, -1, -1, -1, -1, -1, -1, -1, -1, 1290 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1291 66, 28, 29, 30, 31, 32, 33, 34, 35, 36, 1292 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 1293 47 1294 }; 1295 1296 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 1297 symbol of state STATE-NUM. */ 1298 static const yytype_uint8 yystos[] = 1299 { 1300 0, 0, 3, 4, 5, 6, 8, 9, 28, 29, 1301 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 1302 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 1303 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, 1304 62, 63, 64, 65, 71, 72, 73, 74, 75, 76, 1305 86, 87, 90, 91, 93, 94, 95, 96, 97, 98, 1306 99, 100, 101, 102, 103, 104, 105, 106, 107, 109, 1307 111, 112, 115, 116, 117, 118, 123, 127, 140, 141, 1308 145, 146, 147, 148, 151, 152, 153, 154, 155, 156, 1309 157, 84, 86, 86, 86, 3, 4, 5, 65, 93, 1310 65, 93, 93, 3, 87, 93, 106, 110, 84, 65, 1311 65, 65, 112, 140, 65, 3, 86, 86, 86, 109, 1312 28, 151, 3, 4, 5, 6, 28, 29, 30, 31, 1313 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 1314 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 1315 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 1316 142, 143, 144, 65, 65, 32, 44, 109, 88, 140, 1317 150, 7, 8, 9, 65, 67, 69, 18, 19, 20, 1318 21, 22, 23, 24, 25, 26, 27, 85, 108, 95, 1319 72, 77, 78, 73, 74, 10, 11, 12, 13, 79, 1320 80, 14, 15, 71, 81, 82, 16, 17, 83, 70, 1321 86, 3, 65, 72, 86, 113, 114, 128, 129, 130, 1322 112, 112, 3, 87, 112, 0, 156, 140, 116, 126, 1323 127, 135, 87, 3, 124, 125, 84, 140, 109, 109, 1324 109, 128, 54, 151, 86, 86, 86, 86, 143, 66, 1325 92, 107, 92, 66, 72, 66, 88, 140, 3, 66, 1326 92, 109, 3, 107, 95, 95, 95, 96, 96, 97, 1327 97, 98, 98, 98, 98, 99, 99, 100, 101, 102, 1328 103, 104, 109, 107, 128, 127, 130, 131, 70, 86, 1329 85, 111, 148, 149, 65, 67, 129, 87, 119, 120, 1330 126, 126, 65, 67, 130, 136, 137, 126, 66, 124, 1331 85, 70, 88, 140, 66, 66, 66, 65, 151, 140, 1332 66, 70, 66, 95, 66, 66, 68, 84, 66, 127, 1333 130, 114, 87, 107, 138, 111, 148, 66, 112, 132, 1334 133, 134, 68, 110, 119, 88, 120, 121, 122, 128, 1335 66, 132, 136, 68, 110, 137, 65, 67, 88, 110, 1336 125, 140, 140, 140, 109, 66, 109, 140, 107, 86, 1337 95, 106, 138, 139, 65, 128, 130, 136, 66, 70, 1338 68, 88, 70, 86, 66, 66, 68, 66, 132, 68, 1339 110, 52, 66, 140, 66, 70, 88, 134, 122, 66, 1340 68, 140, 86, 140, 88, 138 1341 }; 1342 1343 #define yyerrok (yyerrstatus = 0) 1344 #define yyclearin (yychar = YYEMPTY) 1345 #define YYEMPTY (-2) 1346 #define YYEOF 0 1347 1348 #define YYACCEPT goto yyacceptlab 1349 #define YYABORT goto yyabortlab 1350 #define YYERROR goto yyerrorlab 1351 1352 1353 /* Like YYERROR except do call yyerror. This remains here temporarily 1354 to ease the transition to the new meaning of YYERROR, for GCC. 1355 Once GCC version 2 has supplanted version 1, this can go. However, 1356 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 1357 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 1358 discussed. */ 1359 1360 #define YYFAIL goto yyerrlab 1361 #if defined YYFAIL 1362 /* This is here to suppress warnings from the GCC cpp's 1363 -Wunused-macros. Normally we don't worry about that warning, but 1364 some users do, and we want to make it easy for users to remove 1365 YYFAIL uses, which will produce warnings from Bison 2.5. */ 1366 #endif 1367 1368 #define YYRECOVERING() (!!yyerrstatus) 1369 1370 #define YYBACKUP(Token, Value) \ 1371 do \ 1372 if (yychar == YYEMPTY && yylen == 1) \ 1373 { \ 1374 yychar = (Token); \ 1375 yylval = (Value); \ 1376 yytoken = YYTRANSLATE (yychar); \ 1377 YYPOPSTACK (1); \ 1378 goto yybackup; \ 1379 } \ 1380 else \ 1381 { \ 1382 yyerror (&yylloc, yyscanner, cparser, YY_("syntax error: cannot back up")); \ 1383 YYERROR; \ 1384 } \ 1385 while (YYID (0)) 1386 1387 1388 #define YYTERROR 1 1389 #define YYERRCODE 256 1390 1391 1392 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 1393 If N is 0, then set CURRENT to the empty location which ends 1394 the previous symbol: RHS[0] (always defined). */ 1395 1396 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 1397 #ifndef YYLLOC_DEFAULT 1398 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 1399 do \ 1400 if (YYID (N)) \ 1401 { \ 1402 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 1403 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 1404 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 1405 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 1406 } \ 1407 else \ 1408 { \ 1409 (Current).first_line = (Current).last_line = \ 1410 YYRHSLOC (Rhs, 0).last_line; \ 1411 (Current).first_column = (Current).last_column = \ 1412 YYRHSLOC (Rhs, 0).last_column; \ 1413 } \ 1414 while (YYID (0)) 1415 #endif 1416 1417 1418 /* YY_LOCATION_PRINT -- Print the location on the stream. 1419 This macro was not mandated originally: define only if we know 1420 we won't break user code: when these are the locations we know. */ 1421 1422 #ifndef YY_LOCATION_PRINT 1423 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 1424 # define YY_LOCATION_PRINT(File, Loc) \ 1425 fprintf (File, "%d.%d-%d.%d", \ 1426 (Loc).first_line, (Loc).first_column, \ 1427 (Loc).last_line, (Loc).last_column) 1428 # else 1429 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 1430 # endif 1431 #endif 1432 1433 1434 /* YYLEX -- calling `yylex' with the right arguments. */ 1435 1436 #ifdef YYLEX_PARAM 1437 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) 1438 #else 1439 # define YYLEX yylex (&yylval, &yylloc, yyscanner) 1440 #endif 1441 1442 /* Enable debugging if requested. */ 1443 #if YYDEBUG 1444 1445 # ifndef YYFPRINTF 1446 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 1447 # define YYFPRINTF fprintf 1448 # endif 1449 1450 # define YYDPRINTF(Args) \ 1451 do { \ 1452 if (yydebug) \ 1453 YYFPRINTF Args; \ 1454 } while (YYID (0)) 1455 1456 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 1457 do { \ 1458 if (yydebug) \ 1459 { \ 1460 YYFPRINTF (stderr, "%s ", Title); \ 1461 yy_symbol_print (stderr, \ 1462 Type, Value, Location, yyscanner, cparser); \ 1463 YYFPRINTF (stderr, "\n"); \ 1464 } \ 1465 } while (YYID (0)) 1466 1467 1468 /*--------------------------------. 1469 | Print this symbol on YYOUTPUT. | 1470 `--------------------------------*/ 1471 1472 /*ARGSUSED*/ 1473 #if (defined __STDC__ || defined __C99__FUNC__ \ 1474 || defined __cplusplus || defined _MSC_VER) 1475 static void 1476 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, yyscan_t yyscanner, cint_cparser_t* cparser) 1477 #else 1478 static void 1479 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, yyscanner, cparser) 1480 FILE *yyoutput; 1481 int yytype; 1482 YYSTYPE const * const yyvaluep; 1483 YYLTYPE const * const yylocationp; 1484 yyscan_t yyscanner; 1485 cint_cparser_t* cparser; 1486 #endif 1487 { 1488 if (!yyvaluep) 1489 return; 1490 YYUSE (yylocationp); 1491 YYUSE (yyscanner); 1492 YYUSE (cparser); 1493 # ifdef YYPRINT 1494 if (yytype < YYNTOKENS) 1495 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 1496 # else 1497 YYUSE (yyoutput); 1498 # endif 1499 switch (yytype) 1500 { 1501 default: 1502 break; 1503 } 1504 } 1505 1506 1507 /*--------------------------------. 1508 | Print this symbol on YYOUTPUT. | 1509 `--------------------------------*/ 1510 1511 #if (defined __STDC__ || defined __C99__FUNC__ \ 1512 || defined __cplusplus || defined _MSC_VER) 1513 static void 1514 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, yyscan_t yyscanner, cint_cparser_t* cparser) 1515 #else 1516 static void 1517 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, yyscanner, cparser) 1518 FILE *yyoutput; 1519 int yytype; 1520 YYSTYPE const * const yyvaluep; 1521 YYLTYPE const * const yylocationp; 1522 yyscan_t yyscanner; 1523 cint_cparser_t* cparser; 1524 #endif 1525 { 1526 if (yytype < YYNTOKENS) 1527 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 1528 else 1529 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 1530 1531 YY_LOCATION_PRINT (yyoutput, *yylocationp); 1532 YYFPRINTF (yyoutput, ": "); 1533 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, yyscanner, cparser); 1534 YYFPRINTF (yyoutput, ")"); 1535 } 1536 1537 /*------------------------------------------------------------------. 1538 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 1539 | TOP (included). | 1540 `------------------------------------------------------------------*/ 1541 1542 #if (defined __STDC__ || defined __C99__FUNC__ \ 1543 || defined __cplusplus || defined _MSC_VER) 1544 static void 1545 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 1546 #else 1547 static void 1548 yy_stack_print (yybottom, yytop) 1549 yytype_int16 *yybottom; 1550 yytype_int16 *yytop; 1551 #endif 1552 { 1553 YYFPRINTF (stderr, "Stack now"); 1554 for (; yybottom <= yytop; yybottom++) 1555 { 1556 int yybot = *yybottom; 1557 YYFPRINTF (stderr, " %d", yybot); 1558 } 1559 YYFPRINTF (stderr, "\n"); 1560 } 1561 1562 # define YY_STACK_PRINT(Bottom, Top) \ 1563 do { \ 1564 if (yydebug) \ 1565 yy_stack_print ((Bottom), (Top)); \ 1566 } while (YYID (0)) 1567 1568 1569 /*------------------------------------------------. 1570 | Report that the YYRULE is going to be reduced. | 1571 `------------------------------------------------*/ 1572 1573 #if (defined __STDC__ || defined __C99__FUNC__ \ 1574 || defined __cplusplus || defined _MSC_VER) 1575 static void 1576 yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, yyscan_t yyscanner, cint_cparser_t* cparser) 1577 #else 1578 static void 1579 yy_reduce_print (yyvsp, yylsp, yyrule, yyscanner, cparser) 1580 YYSTYPE *yyvsp; 1581 YYLTYPE *yylsp; 1582 int yyrule; 1583 yyscan_t yyscanner; 1584 cint_cparser_t* cparser; 1585 #endif 1586 { 1587 int yynrhs = yyr2[yyrule]; 1588 int yyi; 1589 unsigned long int yylno = yyrline[yyrule]; 1590 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 1591 yyrule - 1, yylno); 1592 /* The symbols being reduced. */ 1593 for (yyi = 0; yyi < yynrhs; yyi++) 1594 { 1595 YYFPRINTF (stderr, " $%d = ", yyi + 1); 1596 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 1597 &(yyvsp[(yyi + 1) - (yynrhs)]) 1598 , &(yylsp[(yyi + 1) - (yynrhs)]) , yyscanner, cparser); 1599 YYFPRINTF (stderr, "\n"); 1600 } 1601 } 1602 1603 # define YY_REDUCE_PRINT(Rule) \ 1604 do { \ 1605 if (yydebug) \ 1606 yy_reduce_print (yyvsp, yylsp, Rule, yyscanner, cparser); \ 1607 } while (YYID (0)) 1608 1609 /* Nonzero means print parse trace. It is left uninitialized so that 1610 multiple parsers can coexist. */ 1611 int yydebug; 1612 #else /* !YYDEBUG */ 1613 # define YYDPRINTF(Args) 1614 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 1615 # define YY_STACK_PRINT(Bottom, Top) 1616 # define YY_REDUCE_PRINT(Rule) 1617 #endif /* !YYDEBUG */ 1618 1619 1620 /* YYINITDEPTH -- initial size of the parser's stacks. */ 1621 #ifndef YYINITDEPTH 1622 # define YYINITDEPTH 200 1623 #endif 1624 1625 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 1626 if the built-in stack extension method is used). 1627 1628 Do not make this value too large; the results are undefined if 1629 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 1630 evaluated with infinite-precision integer arithmetic. */ 1631 1632 #ifndef YYMAXDEPTH 1633 # define YYMAXDEPTH 10000 1634 #endif 1635 1636 #if YYERROR_VERBOSE 1637 1638 # ifndef yystrlen 1639 # if defined __GLIBC__ && defined _STRING_H 1640 # define yystrlen strlen 1641 # else 1642 /* Return the length of YYSTR. */ 1643 #if (defined __STDC__ || defined __C99__FUNC__ \ 1644 || defined __cplusplus || defined _MSC_VER) 1645 static YYSIZE_T 1646 yystrlen (const char *yystr) 1647 #else 1648 static YYSIZE_T 1649 yystrlen (yystr) 1650 const char *yystr; 1651 #endif 1652 { 1653 YYSIZE_T yylen; 1654 for (yylen = 0; yystr[yylen]; yylen++) 1655 continue; 1656 return yylen; 1657 } 1658 # endif 1659 # endif 1660 1661 # ifndef yystpcpy 1662 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1663 # define yystpcpy stpcpy 1664 # else 1665 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 1666 YYDEST. */ 1667 #if (defined __STDC__ || defined __C99__FUNC__ \ 1668 || defined __cplusplus || defined _MSC_VER) 1669 static char * 1670 yystpcpy (char *yydest, const char *yysrc) 1671 #else 1672 static char * 1673 yystpcpy (yydest, yysrc) 1674 char *yydest; 1675 const char *yysrc; 1676 #endif 1677 { 1678 char *yyd = yydest; 1679 const char *yys = yysrc; 1680 1681 while ((*yyd++ = *yys++) != '\0') 1682 continue; 1683 1684 return yyd - 1; 1685 } 1686 # endif 1687 # endif 1688 1689 # ifndef yytnamerr 1690 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 1691 quotes and backslashes, so that it's suitable for yyerror. The 1692 heuristic is that double-quoting is unnecessary unless the string 1693 contains an apostrophe, a comma, or backslash (other than 1694 backslash-backslash). YYSTR is taken from yytname. If YYRES is 1695 null, do not copy; instead, return the length of what the result 1696 would have been. */ 1697 static YYSIZE_T 1698 yytnamerr (char *yyres, const char *yystr) 1699 { 1700 if (*yystr == '"') 1701 { 1702 YYSIZE_T yyn = 0; 1703 char const *yyp = yystr; 1704 1705 for (;;) 1706 switch (*++yyp) 1707 { 1708 case '\'': 1709 case ',': 1710 goto do_not_strip_quotes; 1711 1712 case '\\': 1713 if (*++yyp != '\\') 1714 goto do_not_strip_quotes; 1715 /* Fall through. */ 1716 default: 1717 if (yyres) 1718 yyres[yyn] = *yyp; 1719 yyn++; 1720 break; 1721 1722 case '"': 1723 if (yyres) 1724 yyres[yyn] = '\0'; 1725 return yyn; 1726 } 1727 do_not_strip_quotes: ; 1728 } 1729 1730 if (! yyres) 1731 return yystrlen (yystr); 1732 1733 return yystpcpy (yyres, yystr) - yyres; 1734 } 1735 # endif 1736 1737 /* Copy into YYRESULT an error message about the unexpected token 1738 YYCHAR while in state YYSTATE. Return the number of bytes copied, 1739 including the terminating null byte. If YYRESULT is null, do not 1740 copy anything; just return the number of bytes that would be 1741 copied. As a special case, return 0 if an ordinary "syntax error" 1742 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 1743 size calculation. */ 1744 static YYSIZE_T 1745 yysyntax_error (char *yyresult, int yystate, int yychar) 1746 { 1747 int yyn = yypact[yystate]; 1748 1749 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 1750 return 0; 1751 else 1752 { 1753 int yytype = YYTRANSLATE (yychar); 1754 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 1755 YYSIZE_T yysize = yysize0; 1756 YYSIZE_T yysize1; 1757 int yysize_overflow = 0; 1758 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 1759 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 1760 int yyx; 1761 1762 # if 0 1763 /* This is so xgettext sees the translatable formats that are 1764 constructed on the fly. */ 1765 YY_("syntax error, unexpected %s"); 1766 YY_("syntax error, unexpected %s, expecting %s"); 1767 YY_("syntax error, unexpected %s, expecting %s or %s"); 1768 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 1769 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 1770 # endif 1771 char *yyfmt; 1772 char const *yyf; 1773 static char const yyunexpected[] = "syntax error, unexpected %s"; 1774 static char const yyexpecting[] = ", expecting %s"; 1775 static char const yyor[] = " or %s"; 1776 char yyformat[sizeof yyunexpected 1777 + sizeof yyexpecting - 1 1778 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 1779 * (sizeof yyor - 1))]; 1780 char const *yyprefix = yyexpecting; 1781 1782 /* Start YYX at -YYN if negative to avoid negative indexes in 1783 YYCHECK. */ 1784 int yyxbegin = yyn < 0 ? -yyn : 0; 1785 1786 /* Stay within bounds of both yycheck and yytname. */ 1787 int yychecklim = YYLAST - yyn + 1; 1788 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 1789 int yycount = 1; 1790 1791 yyarg[0] = yytname[yytype]; 1792 yyfmt = yystpcpy (yyformat, yyunexpected); 1793 1794 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 1795 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 1796 { 1797 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 1798 { 1799 yycount = 1; 1800 yysize = yysize0; 1801 yyformat[sizeof yyunexpected - 1] = '\0'; 1802 break; 1803 } 1804 yyarg[yycount++] = yytname[yyx]; 1805 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 1806 yysize_overflow |= (yysize1 < yysize); 1807 yysize = yysize1; 1808 yyfmt = yystpcpy (yyfmt, yyprefix); 1809 yyprefix = yyor; 1810 } 1811 1812 yyf = YY_(yyformat); 1813 yysize1 = yysize + yystrlen (yyf); 1814 yysize_overflow |= (yysize1 < yysize); 1815 yysize = yysize1; 1816 1817 if (yysize_overflow) 1818 return YYSIZE_MAXIMUM; 1819 1820 if (yyresult) 1821 { 1822 /* Avoid sprintf, as that infringes on the user's name space. 1823 Don't have undefined behavior even if the translation 1824 produced a string with the wrong number of "%s"s. */ 1825 char *yyp = yyresult; 1826 int yyi = 0; 1827 while ((*yyp = *yyf) != '\0') 1828 { 1829 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1830 { 1831 yyp += yytnamerr (yyp, yyarg[yyi++]); 1832 yyf += 2; 1833 } 1834 else 1835 { 1836 yyp++; 1837 yyf++; 1838 } 1839 } 1840 } 1841 return yysize; 1842 } 1843 } 1844 #endif /* YYERROR_VERBOSE */ 1845 1846 /*-----------------------------------------------. 1847 | Release the memory associated to this symbol. | 1848 `-----------------------------------------------*/ 1849 1850 /*ARGSUSED*/ 1851 #if (defined __STDC__ || defined __C99__FUNC__ \ 1852 || defined __cplusplus || defined _MSC_VER) 1853 static void 1854 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, yyscan_t yyscanner, cint_cparser_t* cparser) 1855 #else 1856 static void 1857 yydestruct (yymsg, yytype, yyvaluep, yylocationp, yyscanner, cparser) 1858 const char *yymsg; 1859 int yytype; 1860 YYSTYPE *yyvaluep; 1861 YYLTYPE *yylocationp; 1862 yyscan_t yyscanner; 1863 cint_cparser_t* cparser; 1864 #endif 1865 { 1866 YYUSE (yyvaluep); 1867 YYUSE (yylocationp); 1868 YYUSE (yyscanner); 1869 YYUSE (cparser); 1870 1871 if (!yymsg) 1872 yymsg = "Deleting"; 1873 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1874 1875 switch (yytype) 1876 { 1877 1878 default: 1879 break; 1880 } 1881 } 1882 1883 1884 1885 1886 1887 1888 struct yypstate 1889 { 1890 /* Number of syntax errors so far. */ 1891 int yynerrs; 1892 1893 int yystate; 1894 /* Number of tokens to shift before error messages enabled. */ 1895 int yyerrstatus; 1896 1897 /* The stacks and their tools: 1898 `yyss': related to states. 1899 `yyvs': related to semantic values. 1900 `yyls': related to locations. 1901 1902 Refer to the stacks thru separate pointers, to allow yyoverflow 1903 to reallocate them elsewhere. */ 1904 1905 /* The state stack. */ 1906 yytype_int16 yyssa[YYINITDEPTH]; 1907 yytype_int16 *yyss; 1908 yytype_int16 *yyssp; 1909 1910 /* The semantic value stack. */ 1911 YYSTYPE yyvsa[YYINITDEPTH]; 1912 YYSTYPE *yyvs; 1913 YYSTYPE *yyvsp; 1914 1915 /* The location stack. */ 1916 YYLTYPE yylsa[YYINITDEPTH]; 1917 YYLTYPE *yyls; 1918 YYLTYPE *yylsp; 1919 1920 /* The locations where the error started and ended. */ 1921 YYLTYPE yyerror_range[2]; 1922 1923 YYSIZE_T yystacksize; 1924 1925 /* Used to determine if this is the first time this instance has 1926 been used. */ 1927 int yynew; 1928 }; 1929 1930 #if (defined __STDC__ || defined __C99__FUNC__ \ 1931 || defined __cplusplus || defined _MSC_VER) 1932 int 1933 yyparse (yyscan_t yyscanner, cint_cparser_t* cparser) 1934 #else 1935 int 1936 yyparse (yyscanner, cparser) 1937 yyscan_t yyscanner; 1938 cint_cparser_t* cparser; 1939 #endif 1940 { 1941 return yypull_parse (0, yyscanner, cparser); 1942 } 1943 1944 #if (defined __STDC__ || defined __C99__FUNC__ \ 1945 || defined __cplusplus || defined _MSC_VER) 1946 int 1947 yypull_parse (yypstate *yyps, yyscan_t yyscanner, cint_cparser_t* cparser) 1948 #else 1949 int 1950 yypull_parse (yyps, yyscanner, cparser) 1951 yypstate *yyps; 1952 yyscan_t yyscanner; 1953 cint_cparser_t* cparser; 1954 #endif 1955 { 1956 int yystatus; 1957 yypstate *yyps_local; 1958 int yychar; 1959 YYSTYPE yylval = 0; 1960 YYLTYPE yylloc = {0,0,0,0}; 1961 if (yyps == 0) 1962 { 1963 yyps_local = yypstate_new (); 1964 if (!yyps_local) 1965 { 1966 yyerror (&yylloc, yyscanner, cparser, YY_("memory exhausted")); 1967 return 2; 1968 } 1969 } 1970 else 1971 yyps_local = yyps; 1972 do { 1973 yychar = YYLEX; 1974 yystatus = 1975 yypush_parse (yyps_local, yychar, &yylval, &yylloc, yyscanner, cparser); 1976 } while (yystatus == YYPUSH_MORE); 1977 if (yyps == 0) 1978 yypstate_delete (yyps_local); 1979 return yystatus; 1980 } 1981 1982 /* Initialize the parser data structure. */ 1983 #if (defined __STDC__ || defined __C99__FUNC__ \ 1984 || defined __cplusplus || defined _MSC_VER) 1985 yypstate * 1986 yypstate_new (void) 1987 #else 1988 yypstate * 1989 yypstate_new () 1990 1991 #endif 1992 { 1993 yypstate *yyps; 1994 yyps = (yypstate *) YYMALLOC (sizeof *yyps); 1995 if (!yyps) 1996 return 0; 1997 yyps->yynew = 1; 1998 return yyps; 1999 } 2000 2001 #if (defined __STDC__ || defined __C99__FUNC__ \ 2002 || defined __cplusplus || defined _MSC_VER) 2003 void 2004 yypstate_delete (yypstate *yyps) 2005 #else 2006 void 2007 yypstate_delete (yyps) 2008 yypstate *yyps; 2009 #endif 2010 { 2011 #ifndef yyoverflow 2012 /* If the stack was reallocated but the parse did not complete, then the 2013 stack still needs to be freed. */ 2014 if (!yyps->yynew && yyps->yyss != yyps->yyssa) 2015 YYSTACK_FREE (yyps->yyss); 2016 #endif 2017 YYFREE (yyps); 2018 } 2019 2020 #define cint_c_nerrs yyps->cint_c_nerrs 2021 #define yystate yyps->yystate 2022 #define yyerrstatus yyps->yyerrstatus 2023 #define yyssa yyps->yyssa 2024 #define yyss yyps->yyss 2025 #define yyssp yyps->yyssp 2026 #define yyvsa yyps->yyvsa 2027 #define yyvs yyps->yyvs 2028 #define yyvsp yyps->yyvsp 2029 #define yylsa yyps->yylsa 2030 #define yyls yyps->yyls 2031 #define yylsp yyps->yylsp 2032 #define yyerror_range yyps->yyerror_range 2033 #define yystacksize yyps->yystacksize 2034 2035 /*-------------------------. 2036 | yyparse or yypush_parse. | 2037 `-------------------------*/ 2038 2039 #if (defined __STDC__ || defined __C99__FUNC__ \ 2040 || defined __cplusplus || defined _MSC_VER) 2041 int 2042 yypush_parse (yypstate *yyps, int yypushed_char, YYSTYPE const *yypushed_val, YYLTYPE const *yypushed_loc, yyscan_t yyscanner, cint_cparser_t* cparser) 2043 #else 2044 int 2045 yypush_parse (yyps, yypushed_char, yypushed_val, yypushed_loc, yyscanner, cparser) 2046 yypstate *yyps; 2047 int yypushed_char; 2048 YYSTYPE const *yypushed_val; 2049 YYLTYPE const *yypushed_loc; 2050 yyscan_t yyscanner; 2051 cint_cparser_t* cparser; 2052 #endif 2053 { 2054 /* The lookahead symbol. */ 2055 int yychar; 2056 2057 /* The semantic value of the lookahead symbol. */ 2058 YYSTYPE yylval = 0; 2059 2060 /* Location data for the lookahead symbol. */ 2061 YYLTYPE yylloc = {0,0,0,0}; 2062 2063 2064 int yyn; 2065 int yyresult; 2066 /* Lookahead token as an internal (translated) token number. */ 2067 int yytoken; 2068 /* The variables used to return semantic value and location from the 2069 action routines. */ 2070 YYSTYPE yyval; 2071 YYLTYPE yyloc; 2072 2073 #if YYERROR_VERBOSE 2074 /* Buffer for error messages, and its allocated size. */ 2075 char yymsgbuf[128]; 2076 char *yymsg = yymsgbuf; 2077 YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 2078 #endif 2079 2080 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) 2081 2082 /* The number of symbols on the RHS of the reduced rule. 2083 Keep to zero when no symbol should be popped. */ 2084 int yylen = 0; 2085 2086 if (!yyps->yynew) 2087 { 2088 yyn = yypact[yystate]; 2089 goto yyread_pushed_token; 2090 } 2091 2092 yytoken = 0; 2093 yyss = yyssa; 2094 yyvs = yyvsa; 2095 yyls = yylsa; 2096 yystacksize = YYINITDEPTH; 2097 2098 YYDPRINTF ((stderr, "Starting parse\n")); 2099 2100 yystate = 0; 2101 yyerrstatus = 0; 2102 yynerrs = 0; 2103 yychar = YYEMPTY; /* Cause a token to be read. */ 2104 2105 /* Initialize stack pointers. 2106 Waste one element of value and location stack 2107 so that they stay on the same level as the state stack. 2108 The wasted elements are never initialized. */ 2109 yyssp = yyss; 2110 yyvsp = yyvs; 2111 yylsp = yyls; 2112 2113 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 2114 /* Initialize the default location before parsing starts. */ 2115 yylloc.first_line = yylloc.last_line = 1; 2116 yylloc.first_column = yylloc.last_column = 1; 2117 #endif 2118 2119 goto yysetstate; 2120 2121 /*------------------------------------------------------------. 2122 | yynewstate -- Push a new state, which is found in yystate. | 2123 `------------------------------------------------------------*/ 2124 yynewstate: 2125 /* In all cases, when you get here, the value and location stacks 2126 have just been pushed. So pushing a state here evens the stacks. */ 2127 yyssp++; 2128 2129 yysetstate: 2130 *yyssp = yystate; 2131 2132 if (yyss + yystacksize - 1 <= yyssp) 2133 { 2134 /* Get the current used size of the three stacks, in elements. */ 2135 YYSIZE_T yysize = yyssp - yyss + 1; 2136 2137 #ifdef yyoverflow 2138 { 2139 /* Give user a chance to reallocate the stack. Use copies of 2140 these so that the &'s don't force the real ones into 2141 memory. */ 2142 YYSTYPE *yyvs1 = yyvs; 2143 yytype_int16 *yyss1 = yyss; 2144 YYLTYPE *yyls1 = yyls; 2145 2146 /* Each stack pointer address is followed by the size of the 2147 data in use in that stack, in bytes. This used to be a 2148 conditional around just the two extra args, but that might 2149 be undefined if yyoverflow is a macro. */ 2150 yyoverflow (YY_("memory exhausted"), 2151 &yyss1, yysize * sizeof (*yyssp), 2152 &yyvs1, yysize * sizeof (*yyvsp), 2153 &yyls1, yysize * sizeof (*yylsp), 2154 &yystacksize); 2155 2156 yyls = yyls1; 2157 yyss = yyss1; 2158 yyvs = yyvs1; 2159 } 2160 #else /* no yyoverflow */ 2161 # ifndef YYSTACK_RELOCATE 2162 goto yyexhaustedlab; 2163 # else 2164 /* Extend the stack our own way. */ 2165 if (YYMAXDEPTH <= yystacksize) 2166 goto yyexhaustedlab; 2167 yystacksize *= 2; 2168 if (YYMAXDEPTH < yystacksize) 2169 yystacksize = YYMAXDEPTH; 2170 2171 { 2172 yytype_int16 *yyss1 = yyss; 2173 union yyalloc *yyptr = 2174 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 2175 if (! yyptr) 2176 goto yyexhaustedlab; 2177 YYSTACK_RELOCATE (yyss_alloc, yyss); 2178 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 2179 YYSTACK_RELOCATE (yyls_alloc, yyls); 2180 # undef YYSTACK_RELOCATE 2181 if (yyss1 != yyssa) 2182 YYSTACK_FREE (yyss1); 2183 } 2184 # endif 2185 #endif /* no yyoverflow */ 2186 2187 yyssp = yyss + yysize - 1; 2188 yyvsp = yyvs + yysize - 1; 2189 yylsp = yyls + yysize - 1; 2190 2191 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 2192 (unsigned long int) yystacksize)); 2193 2194 if (yyss + yystacksize - 1 <= yyssp) 2195 YYABORT; 2196 } 2197 2198 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 2199 2200 if (yystate == YYFINAL) 2201 YYACCEPT; 2202 2203 goto yybackup; 2204 2205 /*-----------. 2206 | yybackup. | 2207 `-----------*/ 2208 yybackup: 2209 2210 /* Do appropriate processing given the current state. Read a 2211 lookahead token if we need one and don't already have one. */ 2212 2213 /* First try to decide what to do without reference to lookahead token. */ 2214 yyn = yypact[yystate]; 2215 if (yyn == YYPACT_NINF) 2216 goto yydefault; 2217 2218 /* Not known => get a lookahead token if don't already have one. */ 2219 2220 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 2221 if (yychar == YYEMPTY) 2222 { 2223 if (!yyps->yynew) 2224 { 2225 YYDPRINTF ((stderr, "Return for a new token:\n")); 2226 yyresult = YYPUSH_MORE; 2227 goto yypushreturn; 2228 } 2229 yyps->yynew = 0; 2230 yyread_pushed_token: 2231 YYDPRINTF ((stderr, "Reading a token: ")); 2232 yychar = yypushed_char; 2233 if (yypushed_val) 2234 yylval = *yypushed_val; 2235 if (yypushed_loc) 2236 yylloc = *yypushed_loc; 2237 } 2238 2239 if (yychar <= YYEOF) 2240 { 2241 yychar = yytoken = YYEOF; 2242 YYDPRINTF ((stderr, "Now at end of input.\n")); 2243 } 2244 else 2245 { 2246 yytoken = YYTRANSLATE (yychar); 2247 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 2248 } 2249 2250 /* If the proper action on seeing token YYTOKEN is to reduce or to 2251 detect an error, take that action. */ 2252 yyn += yytoken; 2253 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 2254 goto yydefault; 2255 yyn = yytable[yyn]; 2256 if (yyn <= 0) 2257 { 2258 if (yyn == 0 || yyn == YYTABLE_NINF) 2259 goto yyerrlab; 2260 yyn = -yyn; 2261 goto yyreduce; 2262 } 2263 2264 /* Count tokens shifted since error; after three, turn off error 2265 status. */ 2266 if (yyerrstatus) 2267 yyerrstatus--; 2268 2269 /* Shift the lookahead token. */ 2270 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 2271 2272 /* Discard the shifted token. */ 2273 yychar = YYEMPTY; 2274 2275 yystate = yyn; 2276 *++yyvsp = yylval; 2277 *++yylsp = yylloc; 2278 goto yynewstate; 2279 2280 2281 /*-----------------------------------------------------------. 2282 | yydefault -- do the default action for the current state. | 2283 `-----------------------------------------------------------*/ 2284 yydefault: 2285 yyn = yydefact[yystate]; 2286 if (yyn == 0) 2287 goto yyerrlab; 2288 goto yyreduce; 2289 2290 2291 /*-----------------------------. 2292 | yyreduce -- Do a reduction. | 2293 `-----------------------------*/ 2294 yyreduce: 2295 /* yyn is the number of a rule to reduce with. */ 2296 yylen = yyr2[yyn]; 2297 2298 /* If YYLEN is nonzero, implement the default value of the action: 2299 `$$ = $1'. 2300 2301 Otherwise, the following line sets YYVAL to garbage. 2302 This behavior is undocumented and Bison 2303 users should not rely upon it. Assigning to YYVAL 2304 unconditionally makes the parser a bit smaller, and it avoids a 2305 GCC warning that YYVAL may be used uninitialized. */ 2306 yyval = yyvsp[1-yylen]; 2307 2308 /* Default location. */ 2309 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); 2310 YY_REDUCE_PRINT (yyn); 2311 switch (yyn) 2312 { 2313 case 2: 2314 2315 /* Line 1464 of yacc.c */ 2316 #line 101 "cint_grammar.y" 2317 { (yyval) = (yyvsp[(1) - (1)]); } 2318 break; 2319 2320 case 3: 2321 2322 /* Line 1464 of yacc.c */ 2323 #line 102 "cint_grammar.y" 2324 { (yyval) = (yyvsp[(1) - (1)]); } 2325 break; 2326 2327 case 4: 2328 2329 /* Line 1464 of yacc.c */ 2330 #line 103 "cint_grammar.y" 2331 { (yyval) = (yyvsp[(1) - (1)]); } 2332 break; 2333 2334 case 5: 2335 2336 /* Line 1464 of yacc.c */ 2337 #line 104 "cint_grammar.y" 2338 { (yyval) = (yyvsp[(2) - (3)]); } 2339 break; 2340 2341 case 6: 2342 2343 /* Line 1464 of yacc.c */ 2344 #line 108 "cint_grammar.y" 2345 { (yyval) = (yyvsp[(1) - (1)]); } 2346 break; 2347 2348 case 7: 2349 2350 /* Line 1464 of yacc.c */ 2351 #line 109 "cint_grammar.y" 2352 { (yyval) = cint_ast_operator(cintOpOpenBracket, (yyvsp[(1) - (4)]), (yyvsp[(3) - (4)])); } 2353 break; 2354 2355 case 8: 2356 2357 /* Line 1464 of yacc.c */ 2358 #line 111 "cint_grammar.y" 2359 { 2360 (yyval) = cint_ast_function((yyvsp[(1) - (3)]), 0); 2361 } 2362 break; 2363 2364 case 9: 2365 2366 /* Line 1464 of yacc.c */ 2367 #line 115 "cint_grammar.y" 2368 { 2369 (yyval) = cint_ast_function((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)])); 2370 } 2371 break; 2372 2373 case 10: 2374 2375 /* Line 1464 of yacc.c */ 2376 #line 119 "cint_grammar.y" 2377 { 2378 (yyval) = cint_ast_operator(cintOpDot, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); 2379 } 2380 break; 2381 2382 case 11: 2383 2384 /* Line 1464 of yacc.c */ 2385 #line 123 "cint_grammar.y" 2386 { 2387 (yyval) = cint_ast_operator(cintOpArrow, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); 2388 } 2389 break; 2390 2391 case 12: 2392 2393 /* Line 1464 of yacc.c */ 2394 #line 126 "cint_grammar.y" 2395 { (yyval) = cint_ast_operator(cintOpIncrement, (yyvsp[(1) - (2)]), 0); } 2396 break; 2397 2398 case 13: 2399 2400 /* Line 1464 of yacc.c */ 2401 #line 127 "cint_grammar.y" 2402 { (yyval) = cint_ast_operator(cintOpDecrement, (yyvsp[(1) - (2)]), 0); } 2403 break; 2404 2405 case 15: 2406 2407 /* Line 1464 of yacc.c */ 2408 #line 133 "cint_grammar.y" 2409 { 2410 cint_ast_append((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); 2411 (yyval) = (yyvsp[(1) - (3)]); 2412 } 2413 break; 2414 2415 case 16: 2416 2417 /* Line 1464 of yacc.c */ 2418 #line 140 "cint_grammar.y" 2419 { (yyval) = (yyvsp[(1) - (1)]); } 2420 break; 2421 2422 case 17: 2423 2424 /* Line 1464 of yacc.c */ 2425 #line 141 "cint_grammar.y" 2426 { (yyval) = cint_ast_operator(cintOpIncrement, 0, (yyvsp[(2) - (2)])); } 2427 break; 2428 2429 case 18: 2430 2431 /* Line 1464 of yacc.c */ 2432 #line 142 "cint_grammar.y" 2433 { (yyval) = cint_ast_operator(cintOpDecrement, 0, (yyvsp[(2) - (2)])); } 2434 break; 2435 2436 case 19: 2437 2438 /* Line 1464 of yacc.c */ 2439 #line 143 "cint_grammar.y" 2440 { (yyval) = cint_ast_operator(cint_ast_int((yyvsp[(1) - (2)])), 0, (yyvsp[(2) - (2)])); } 2441 break; 2442 2443 case 20: 2444 2445 /* Line 1464 of yacc.c */ 2446 #line 144 "cint_grammar.y" 2447 { (yyval) = cint_ast_operator(cintOpSizeof, 0, (yyvsp[(2) - (2)])); } 2448 break; 2449 2450 case 21: 2451 2452 /* Line 1464 of yacc.c */ 2453 #line 145 "cint_grammar.y" 2454 { (yyval) = cint_ast_operator(cintOpSizeof, 0, (yyvsp[(3) - (4)])); } 2455 break; 2456 2457 case 22: 2458 2459 /* Line 1464 of yacc.c */ 2460 #line 149 "cint_grammar.y" 2461 { (yyval) = cint_ast_integer(cintOpAddressOf); } 2462 break; 2463 2464 case 23: 2465 2466 /* Line 1464 of yacc.c */ 2467 #line 150 "cint_grammar.y" 2468 { (yyval) = cint_ast_integer(cintOpDereference); } 2469 break; 2470 2471 case 24: 2472 2473 /* Line 1464 of yacc.c */ 2474 #line 151 "cint_grammar.y" 2475 { (yyval) = cint_ast_integer(cintOpPositive); } 2476 break; 2477 2478 case 25: 2479 2480 /* Line 1464 of yacc.c */ 2481 #line 152 "cint_grammar.y" 2482 { (yyval) = cint_ast_integer(cintOpNegative); } 2483 break; 2484 2485 case 26: 2486 2487 /* Line 1464 of yacc.c */ 2488 #line 153 "cint_grammar.y" 2489 { (yyval) = cint_ast_integer(cintOpTilde); } 2490 break; 2491 2492 case 27: 2493 2494 /* Line 1464 of yacc.c */ 2495 #line 154 "cint_grammar.y" 2496 { (yyval) = cint_ast_integer(cintOpNot); } 2497 break; 2498 2499 case 29: 2500 2501 /* Line 1464 of yacc.c */ 2502 #line 161 "cint_grammar.y" 2503 { (yyval) = cint_ast_operator(cintOpTypecast, CINT_AST_PTR_VOID, (yyvsp[(5) - (5)])); } 2504 break; 2505 2506 case 30: 2507 2508 /* Line 1464 of yacc.c */ 2509 #line 163 "cint_grammar.y" 2510 { (yyval) = cint_ast_operator(cintOpTypecast, CINT_AST_PTR_AUTO, (yyvsp[(4) - (4)])); } 2511 break; 2512 2513 case 32: 2514 2515 /* Line 1464 of yacc.c */ 2516 #line 168 "cint_grammar.y" 2517 { (yyval) = cint_ast_operator(cintOpMultiply, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2518 break; 2519 2520 case 33: 2521 2522 /* Line 1464 of yacc.c */ 2523 #line 169 "cint_grammar.y" 2524 { (yyval) = cint_ast_operator(cintOpDivide, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2525 break; 2526 2527 case 34: 2528 2529 /* Line 1464 of yacc.c */ 2530 #line 170 "cint_grammar.y" 2531 { (yyval) = cint_ast_operator(cintOpMod, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2532 break; 2533 2534 case 36: 2535 2536 /* Line 1464 of yacc.c */ 2537 #line 175 "cint_grammar.y" 2538 { (yyval) = cint_ast_operator(cintOpAdd, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2539 break; 2540 2541 case 37: 2542 2543 /* Line 1464 of yacc.c */ 2544 #line 176 "cint_grammar.y" 2545 { (yyval) = cint_ast_operator(cintOpSubtract, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2546 break; 2547 2548 case 39: 2549 2550 /* Line 1464 of yacc.c */ 2551 #line 181 "cint_grammar.y" 2552 { (yyval) = cint_ast_operator(cintOpLeftShift, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2553 break; 2554 2555 case 40: 2556 2557 /* Line 1464 of yacc.c */ 2558 #line 182 "cint_grammar.y" 2559 { (yyval) = cint_ast_operator(cintOpRightShift, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2560 break; 2561 2562 case 42: 2563 2564 /* Line 1464 of yacc.c */ 2565 #line 187 "cint_grammar.y" 2566 { (yyval) = cint_ast_operator(cintOpLessThan, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2567 break; 2568 2569 case 43: 2570 2571 /* Line 1464 of yacc.c */ 2572 #line 188 "cint_grammar.y" 2573 { (yyval) = cint_ast_operator(cintOpGreaterThan, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2574 break; 2575 2576 case 44: 2577 2578 /* Line 1464 of yacc.c */ 2579 #line 189 "cint_grammar.y" 2580 { (yyval) = cint_ast_operator(cintOpLessThanOrEqual, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2581 break; 2582 2583 case 45: 2584 2585 /* Line 1464 of yacc.c */ 2586 #line 190 "cint_grammar.y" 2587 { (yyval) = cint_ast_operator(cintOpGreaterThanOrEqual, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2588 break; 2589 2590 case 47: 2591 2592 /* Line 1464 of yacc.c */ 2593 #line 195 "cint_grammar.y" 2594 { (yyval) = cint_ast_operator(cintOpEqual, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2595 break; 2596 2597 case 48: 2598 2599 /* Line 1464 of yacc.c */ 2600 #line 196 "cint_grammar.y" 2601 { (yyval) = cint_ast_operator(cintOpNotEqual, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2602 break; 2603 2604 case 50: 2605 2606 /* Line 1464 of yacc.c */ 2607 #line 201 "cint_grammar.y" 2608 { (yyval) = cint_ast_operator(cintOpBitwiseAnd, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2609 break; 2610 2611 case 52: 2612 2613 /* Line 1464 of yacc.c */ 2614 #line 206 "cint_grammar.y" 2615 { (yyval) = cint_ast_operator(cintOpBitwiseXor, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2616 break; 2617 2618 case 54: 2619 2620 /* Line 1464 of yacc.c */ 2621 #line 211 "cint_grammar.y" 2622 { (yyval) = cint_ast_operator(cintOpBitwiseOr, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2623 break; 2624 2625 case 56: 2626 2627 /* Line 1464 of yacc.c */ 2628 #line 216 "cint_grammar.y" 2629 { (yyval) = cint_ast_operator(cintOpLogicalAnd, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2630 break; 2631 2632 case 58: 2633 2634 /* Line 1464 of yacc.c */ 2635 #line 221 "cint_grammar.y" 2636 { (yyval) = cint_ast_operator(cintOpLogicalOr, (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2637 break; 2638 2639 case 60: 2640 2641 /* Line 1464 of yacc.c */ 2642 #line 227 "cint_grammar.y" 2643 { (yyval) = cint_ast_ternary((yyvsp[(1) - (5)]), (yyvsp[(3) - (5)]), (yyvsp[(5) - (5)])); } 2644 break; 2645 2646 case 62: 2647 2648 /* Line 1464 of yacc.c */ 2649 #line 233 "cint_grammar.y" 2650 { 2651 /* 2652 * Arithmetic assignment operators are converted to distinct operator/= expressions 2653 * for the benefit of simplifying the interpreter operator logic. 2654 * 2655 * Convert any expressions of the form "x <op>= y" to "x = x <op> y"; 2656 */ 2657 (yyval) = cint_ast_operator(cint_ast_int((yyvsp[(2) - (3)])), (yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); 2658 if(cint_ast_int((yyvsp[(2) - (3)])) != cintOpAssign) { 2659 /* Perform the operator on the left and right and assign it to the left */ 2660 (yyval) = cint_ast_operator(cintOpAssign, (yyvsp[(1) - (3)]), (yyval)); 2661 } 2662 } 2663 break; 2664 2665 case 63: 2666 2667 /* Line 1464 of yacc.c */ 2668 #line 250 "cint_grammar.y" 2669 { (yyval) = cint_ast_integer(cintOpAssign); } 2670 break; 2671 2672 case 64: 2673 2674 /* Line 1464 of yacc.c */ 2675 #line 251 "cint_grammar.y" 2676 { (yyval) = cint_ast_integer(cintOpMultiply); } 2677 break; 2678 2679 case 65: 2680 2681 /* Line 1464 of yacc.c */ 2682 #line 252 "cint_grammar.y" 2683 { (yyval) = cint_ast_integer(cintOpDivide); } 2684 break; 2685 2686 case 66: 2687 2688 /* Line 1464 of yacc.c */ 2689 #line 253 "cint_grammar.y" 2690 { (yyval) = cint_ast_integer(cintOpMod); } 2691 break; 2692 2693 case 67: 2694 2695 /* Line 1464 of yacc.c */ 2696 #line 254 "cint_grammar.y" 2697 { (yyval) = cint_ast_integer(cintOpAdd); } 2698 break; 2699 2700 case 68: 2701 2702 /* Line 1464 of yacc.c */ 2703 #line 255 "cint_grammar.y" 2704 { (yyval) = cint_ast_integer(cintOpSubtract); } 2705 break; 2706 2707 case 69: 2708 2709 /* Line 1464 of yacc.c */ 2710 #line 256 "cint_grammar.y" 2711 { (yyval) = cint_ast_integer(cintOpLeftShift); } 2712 break; 2713 2714 case 70: 2715 2716 /* Line 1464 of yacc.c */ 2717 #line 257 "cint_grammar.y" 2718 { (yyval) = cint_ast_integer(cintOpRightShift); } 2719 break; 2720 2721 case 71: 2722 2723 /* Line 1464 of yacc.c */ 2724 #line 258 "cint_grammar.y" 2725 { (yyval) = cint_ast_integer(cintOpBitwiseAnd); } 2726 break; 2727 2728 case 72: 2729 2730 /* Line 1464 of yacc.c */ 2731 #line 259 "cint_grammar.y" 2732 { (yyval) = cint_ast_integer(cintOpBitwiseXor); } 2733 break; 2734 2735 case 73: 2736 2737 /* Line 1464 of yacc.c */ 2738 #line 260 "cint_grammar.y" 2739 { (yyval) = cint_ast_integer(cintOpBitwiseOr); } 2740 break; 2741 2742 case 74: 2743 2744 /* Line 1464 of yacc.c */ 2745 #line 264 "cint_grammar.y" 2746 { (yyval) = (yyvsp[(1) - (1)]); } 2747 break; 2748 2749 case 75: 2750 2751 /* Line 1464 of yacc.c */ 2752 #line 266 "cint_grammar.y" 2753 { 2754 (yyval) = cint_ast_comma((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); 2755 } 2756 break; 2757 2758 case 77: 2759 2760 /* Line 1464 of yacc.c */ 2761 #line 276 "cint_grammar.y" 2762 { (yyval) = (yyvsp[(1) - (2)]); } 2763 break; 2764 2765 case 78: 2766 2767 /* Line 1464 of yacc.c */ 2768 #line 278 "cint_grammar.y" 2769 { 2770 (yyval) = cint_ast_declaration_init((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)])); 2771 } 2772 break; 2773 2774 case 79: 2775 2776 /* Line 1464 of yacc.c */ 2777 #line 284 "cint_grammar.y" 2778 {(yyval) = (yyvsp[(1) - (1)]); } 2779 break; 2780 2781 case 80: 2782 2783 /* Line 1464 of yacc.c */ 2784 #line 285 "cint_grammar.y" 2785 { cint_ast_append((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); (yyval) = (yyvsp[(1) - (2)]); } 2786 break; 2787 2788 case 81: 2789 2790 /* Line 1464 of yacc.c */ 2791 #line 286 "cint_grammar.y" 2792 { (yyval) = (yyvsp[(1) - (1)]); } 2793 break; 2794 2795 case 82: 2796 2797 /* Line 1464 of yacc.c */ 2798 #line 287 "cint_grammar.y" 2799 { cint_ast_append((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); (yyval) = (yyvsp[(1) - (2)]); } 2800 break; 2801 2802 case 84: 2803 2804 /* Line 1464 of yacc.c */ 2805 #line 289 "cint_grammar.y" 2806 { cint_ast_append((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); (yyval) = (yyvsp[(1) - (2)]); } 2807 break; 2808 2809 case 86: 2810 2811 /* Line 1464 of yacc.c */ 2812 #line 294 "cint_grammar.y" 2813 { cint_ast_append((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); (yyval) = (yyvsp[(1) - (3)]); } 2814 break; 2815 2816 case 87: 2817 2818 /* Line 1464 of yacc.c */ 2819 #line 298 "cint_grammar.y" 2820 { (yyval) = (yyvsp[(1) - (1)]); } 2821 break; 2822 2823 case 88: 2824 2825 /* Line 1464 of yacc.c */ 2826 #line 300 "cint_grammar.y" 2827 { (yyval) = cint_ast_declarator_init((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2828 break; 2829 2830 case 89: 2831 2832 /* Line 1464 of yacc.c */ 2833 #line 304 "cint_grammar.y" 2834 { (yyval) = cint_ast_integer(CINT_AST_TYPE_F_EXTERN); } 2835 break; 2836 2837 case 90: 2838 2839 /* Line 1464 of yacc.c */ 2840 #line 305 "cint_grammar.y" 2841 { (yyval) = cint_ast_integer(CINT_AST_TYPE_F_TYPEDEF); } 2842 break; 2843 2844 case 91: 2845 2846 /* Line 1464 of yacc.c */ 2847 #line 306 "cint_grammar.y" 2848 { (yyval) = cint_ast_integer(CINT_AST_TYPE_F_STATIC); } 2849 break; 2850 2851 case 94: 2852 2853 /* Line 1464 of yacc.c */ 2854 #line 312 "cint_grammar.y" 2855 { (yyval) = cint_ast_type("void"); } 2856 break; 2857 2858 case 95: 2859 2860 /* Line 1464 of yacc.c */ 2861 #line 313 "cint_grammar.y" 2862 { (yyval) = cint_ast_type("char"); } 2863 break; 2864 2865 case 96: 2866 2867 /* Line 1464 of yacc.c */ 2868 #line 314 "cint_grammar.y" 2869 { (yyval) = cint_ast_type("short"); } 2870 break; 2871 2872 case 97: 2873 2874 /* Line 1464 of yacc.c */ 2875 #line 315 "cint_grammar.y" 2876 { (yyval) = cint_ast_type("int"); } 2877 break; 2878 2879 case 98: 2880 2881 /* Line 1464 of yacc.c */ 2882 #line 316 "cint_grammar.y" 2883 { (yyval) = cint_ast_type("long"); } 2884 break; 2885 2886 case 99: 2887 2888 /* Line 1464 of yacc.c */ 2889 #line 317 "cint_grammar.y" 2890 { (yyval) = cint_ast_type("float"); } 2891 break; 2892 2893 case 100: 2894 2895 /* Line 1464 of yacc.c */ 2896 #line 318 "cint_grammar.y" 2897 { (yyval) = cint_ast_type("double"); } 2898 break; 2899 2900 case 101: 2901 2902 /* Line 1464 of yacc.c */ 2903 #line 319 "cint_grammar.y" 2904 { (yyval) = cint_ast_integer(CINT_AST_TYPE_F_SIGNED); } 2905 break; 2906 2907 case 102: 2908 2909 /* Line 1464 of yacc.c */ 2910 #line 320 "cint_grammar.y" 2911 { (yyval) = cint_ast_integer(CINT_AST_TYPE_F_UNSIGNED); } 2912 break; 2913 2914 case 105: 2915 2916 /* Line 1464 of yacc.c */ 2917 #line 323 "cint_grammar.y" 2918 { (yyval) = (yyvsp[(1) - (1)]); } 2919 break; 2920 2921 case 106: 2922 2923 /* Line 1464 of yacc.c */ 2924 #line 327 "cint_grammar.y" 2925 { (yyval) = cint_ast_structure_def((yyvsp[(2) - (5)]), (yyvsp[(4) - (5)])); } 2926 break; 2927 2928 case 107: 2929 2930 /* Line 1464 of yacc.c */ 2931 #line 328 "cint_grammar.y" 2932 { (yyval) = cint_ast_structure_def(0, (yyvsp[(3) - (4)])); } 2933 break; 2934 2935 case 112: 2936 2937 /* Line 1464 of yacc.c */ 2938 #line 339 "cint_grammar.y" 2939 { cint_ast_append((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); (yyval) = (yyvsp[(1) - (2)]); } 2940 break; 2941 2942 case 113: 2943 2944 /* Line 1464 of yacc.c */ 2945 #line 344 "cint_grammar.y" 2946 { 2947 (yyval) = cint_ast_struct_declaration((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)])); 2948 } 2949 break; 2950 2951 case 115: 2952 2953 /* Line 1464 of yacc.c */ 2954 #line 352 "cint_grammar.y" 2955 { cint_ast_append((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); (yyval) = (yyvsp[(1) - (3)]); } 2956 break; 2957 2958 case 118: 2959 2960 /* Line 1464 of yacc.c */ 2961 #line 363 "cint_grammar.y" 2962 { (yyval) = cint_ast_enumdef((yyvsp[(2) - (5)]), (yyvsp[(4) - (5)])); } 2963 break; 2964 2965 case 120: 2966 2967 /* Line 1464 of yacc.c */ 2968 #line 368 "cint_grammar.y" 2969 { (yyval) = (yyvsp[(1) - (1)]); } 2970 break; 2971 2972 case 121: 2973 2974 /* Line 1464 of yacc.c */ 2975 #line 369 "cint_grammar.y" 2976 { cint_ast_append((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); (yyval) = (yyvsp[(1) - (3)]); } 2977 break; 2978 2979 case 122: 2980 2981 /* Line 1464 of yacc.c */ 2982 #line 373 "cint_grammar.y" 2983 { (yyval) = cint_ast_enumerator((yyvsp[(1) - (1)]), 0); } 2984 break; 2985 2986 case 123: 2987 2988 /* Line 1464 of yacc.c */ 2989 #line 374 "cint_grammar.y" 2990 { (yyval) = cint_ast_enumerator((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); } 2991 break; 2992 2993 case 124: 2994 2995 /* Line 1464 of yacc.c */ 2996 #line 378 "cint_grammar.y" 2997 { cint_ast_append((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); (yyval) = (yyvsp[(1) - (2)]); } 2998 break; 2999 3000 case 125: 3001 3002 /* Line 1464 of yacc.c */ 3003 #line 379 "cint_grammar.y" 3004 { (yyval) = (yyvsp[(1) - (1)]); } 3005 break; 3006 3007 case 126: 3008 3009 /* Line 1464 of yacc.c */ 3010 #line 380 "cint_grammar.y" 3011 { cint_ast_append((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); (yyval) = (yyvsp[(1) - (2)]); } 3012 break; 3013 3014 case 127: 3015 3016 /* Line 1464 of yacc.c */ 3017 #line 381 "cint_grammar.y" 3018 { (yyval) = (yyvsp[(1) - (1)]); } 3019 break; 3020 3021 case 128: 3022 3023 /* Line 1464 of yacc.c */ 3024 #line 385 "cint_grammar.y" 3025 { (yyval) = cint_ast_integer(CINT_AST_TYPE_F_CONST); } 3026 break; 3027 3028 case 129: 3029 3030 /* Line 1464 of yacc.c */ 3031 #line 386 "cint_grammar.y" 3032 { (yyval) = cint_ast_integer(CINT_AST_TYPE_F_VOLATILE); } 3033 break; 3034 3035 case 130: 3036 3037 /* Line 1464 of yacc.c */ 3038 #line 391 "cint_grammar.y" 3039 { 3040 (yyval) = cint_ast_pointer_declarator((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); 3041 } 3042 break; 3043 3044 case 131: 3045 3046 /* Line 1464 of yacc.c */ 3047 #line 394 "cint_grammar.y" 3048 { (yyval) = (yyvsp[(1) - (1)]); } 3049 break; 3050 3051 case 132: 3052 3053 /* Line 1464 of yacc.c */ 3054 #line 398 "cint_grammar.y" 3055 { (yyval) = cint_ast_identifier_declarator((yyvsp[(1) - (1)])); } 3056 break; 3057 3058 case 134: 3059 3060 /* Line 1464 of yacc.c */ 3061 #line 401 "cint_grammar.y" 3062 { (yyval) = cint_ast_array_declarator((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)])); } 3063 break; 3064 3065 case 135: 3066 3067 /* Line 1464 of yacc.c */ 3068 #line 403 "cint_grammar.y" 3069 { (yyval) = cint_ast_array_declarator((yyvsp[(1) - (3)]), cint_ast_integer(-1)); } 3070 break; 3071 3072 case 136: 3073 3074 /* Line 1464 of yacc.c */ 3075 #line 405 "cint_grammar.y" 3076 { 3077 (yyval) = cint_ast_function_declarator((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)])); 3078 } 3079 break; 3080 3081 case 137: 3082 3083 /* Line 1464 of yacc.c */ 3084 #line 410 "cint_grammar.y" 3085 { 3086 (yyval) = cint_ast_function_declarator((yyvsp[(1) - (3)]), 0); 3087 } 3088 break; 3089 3090 case 138: 3091 3092 /* Line 1464 of yacc.c */ 3093 #line 416 "cint_grammar.y" 3094 { (yyval) = cint_ast_integer(1); } 3095 break; 3096 3097 case 139: 3098 3099 /* Line 1464 of yacc.c */ 3100 #line 417 "cint_grammar.y" 3101 { (yyval) = cint_ast_integer(1); } 3102 break; 3103 3104 case 140: 3105 3106 /* Line 1464 of yacc.c */ 3107 #line 418 "cint_grammar.y" 3108 { (yyval) = cint_ast_pointer_indirect((yyvsp[(2) - (2)])); } 3109 break; 3110 3111 case 143: 3112 3113 /* Line 1464 of yacc.c */ 3114 #line 424 "cint_grammar.y" 3115 { cint_ast_append((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); (yyval) = (yyvsp[(1) - (2)]); } 3116 break; 3117 3118 case 145: 3119 3120 /* Line 1464 of yacc.c */ 3121 #line 434 "cint_grammar.y" 3122 {(yyval) = (yyvsp[(1) - (1)]);} 3123 break; 3124 3125 case 146: 3126 3127 /* Line 1464 of yacc.c */ 3128 #line 436 "cint_grammar.y" 3129 { 3130 cint_ast_append((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); 3131 (yyval) = (yyvsp[(1) - (3)]); 3132 } 3133 break; 3134 3135 case 147: 3136 3137 /* Line 1464 of yacc.c */ 3138 #line 444 "cint_grammar.y" 3139 { 3140 (yyval) = cint_ast_parameter_declaration_append((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); 3141 } 3142 break; 3143 3144 case 149: 3145 3146 /* Line 1464 of yacc.c */ 3147 #line 449 "cint_grammar.y" 3148 { 3149 (yyval) = cint_ast_parameter_declaration((yyvsp[(1) - (1)])); 3150 } 3151 break; 3152 3153 case 164: 3154 3155 /* Line 1464 of yacc.c */ 3156 #line 486 "cint_grammar.y" 3157 { (yyval) = (yyvsp[(1) - (1)]); } 3158 break; 3159 3160 case 165: 3161 3162 /* Line 1464 of yacc.c */ 3163 #line 487 "cint_grammar.y" 3164 { (yyval) = cint_ast_initializer((yyvsp[(2) - (3)])); } 3165 break; 3166 3167 case 166: 3168 3169 /* Line 1464 of yacc.c */ 3170 #line 488 "cint_grammar.y" 3171 { (yyval) = cint_ast_initializer((yyvsp[(2) - (4)])); } 3172 break; 3173 3174 case 168: 3175 3176 /* Line 1464 of yacc.c */ 3177 #line 493 "cint_grammar.y" 3178 { cint_ast_append((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)])); (yyval) = (yyvsp[(1) - (3)]); } 3179 break; 3180 3181 case 171: 3182 3183 /* Line 1464 of yacc.c */ 3184 #line 500 "cint_grammar.y" 3185 { 3186 (yyval) = cint_ast_compound_statement((yyvsp[(1) - (1)])); 3187 } 3188 break; 3189 3190 case 174: 3191 3192 /* Line 1464 of yacc.c */ 3193 #line 506 "cint_grammar.y" 3194 {(yyval)=(yyvsp[(1) - (1)]);} 3195 break; 3196 3197 case 178: 3198 3199 /* Line 1464 of yacc.c */ 3200 #line 510 "cint_grammar.y" 3201 { (yyval) = cint_ast_statement_with_no_effect((yyvsp[(1) - (2)])); } 3202 break; 3203 3204 case 179: 3205 3206 /* Line 1464 of yacc.c */ 3207 #line 511 "cint_grammar.y" 3208 { (yyval) = cint_ast_statement_with_no_effect((yyvsp[(1) - (2)])); } 3209 break; 3210 3211 case 180: 3212 3213 /* Line 1464 of yacc.c */ 3214 #line 512 "cint_grammar.y" 3215 { (yyval) = cint_ast_statement_with_no_effect((yyvsp[(1) - (2)])); } 3216 break; 3217 3218 case 181: 3219 3220 /* Line 1464 of yacc.c */ 3221 #line 517 "cint_grammar.y" 3222 { (yyval) = cint_ast_print((yyvsp[(2) - (2)])); } 3223 break; 3224 3225 case 182: 3226 3227 /* Line 1464 of yacc.c */ 3228 #line 518 "cint_grammar.y" 3229 { (yyval) = cint_ast_print((yyvsp[(2) - (3)])); } 3230 break; 3231 3232 case 183: 3233 3234 /* Line 1464 of yacc.c */ 3235 #line 522 "cint_grammar.y" 3236 { (yyval) = cint_ast_string("sizeof"); } 3237 break; 3238 3239 case 184: 3240 3241 /* Line 1464 of yacc.c */ 3242 #line 523 "cint_grammar.y" 3243 { (yyval) = cint_ast_string("typedef"); } 3244 break; 3245 3246 case 185: 3247 3248 /* Line 1464 of yacc.c */ 3249 #line 524 "cint_grammar.y" 3250 { (yyval) = cint_ast_string("extern"); } 3251 break; 3252 3253 case 186: 3254 3255 /* Line 1464 of yacc.c */ 3256 #line 525 "cint_grammar.y" 3257 { (yyval) = cint_ast_string("static"); } 3258 break; 3259 3260 case 187: 3261 3262 /* Line 1464 of yacc.c */ 3263 #line 526 "cint_grammar.y" 3264 { (yyval) = cint_ast_string("auto"); } 3265 break; 3266 3267 case 188: 3268 3269 /* Line 1464 of yacc.c */ 3270 #line 527 "cint_grammar.y" 3271 { (yyval) = cint_ast_string("register"); } 3272 break; 3273 3274 case 189: 3275 3276 /* Line 1464 of yacc.c */ 3277 #line 528 "cint_grammar.y" 3278 { (yyval) = cint_ast_string("char"); } 3279 break; 3280 3281 case 190: 3282 3283 /* Line 1464 of yacc.c */ 3284 #line 529 "cint_grammar.y" 3285 { (yyval) = cint_ast_string("short"); } 3286 break; 3287 3288 case 191: 3289 3290 /* Line 1464 of yacc.c */ 3291 #line 530 "cint_grammar.y" 3292 { (yyval) = cint_ast_string("int"); } 3293 break; 3294 3295 case 192: 3296 3297 /* Line 1464 of yacc.c */ 3298 #line 531 "cint_grammar.y" 3299 { (yyval) = cint_ast_string("long"); } 3300 break; 3301 3302 case 193: 3303 3304 /* Line 1464 of yacc.c */ 3305 #line 532 "cint_grammar.y" 3306 { (yyval) = cint_ast_string("signed"); } 3307 break; 3308 3309 case 194: 3310 3311 /* Line 1464 of yacc.c */ 3312 #line 533 "cint_grammar.y" 3313 { (yyval) = cint_ast_string("unsigned"); } 3314 break; 3315 3316 case 195: 3317 3318 /* Line 1464 of yacc.c */ 3319 #line 534 "cint_grammar.y" 3320 { (yyval) = cint_ast_string("float"); } 3321 break; 3322 3323 case 196: 3324 3325 /* Line 1464 of yacc.c */ 3326 #line 535 "cint_grammar.y" 3327 { (yyval) = cint_ast_string("double"); } 3328 break; 3329 3330 case 197: 3331 3332 /* Line 1464 of yacc.c */ 3333 #line 536 "cint_grammar.y" 3334 { (yyval) = cint_ast_string("const"); } 3335 break; 3336 3337 case 198: 3338 3339 /* Line 1464 of yacc.c */ 3340 #line 537 "cint_grammar.y" 3341 { (yyval) = cint_ast_string("volatile"); } 3342 break; 3343 3344 case 199: 3345 3346 /* Line 1464 of yacc.c */ 3347 #line 538 "cint_grammar.y" 3348 { (yyval) = cint_ast_string("void"); } 3349 break; 3350 3351 case 200: 3352 3353 /* Line 1464 of yacc.c */ 3354 #line 539 "cint_grammar.y" 3355 { (yyval) = cint_ast_string("struct"); } 3356 break; 3357 3358 case 201: 3359 3360 /* Line 1464 of yacc.c */ 3361 #line 540 "cint_grammar.y" 3362 { (yyval) = cint_ast_string("union"); } 3363 break; 3364 3365 case 202: 3366 3367 /* Line 1464 of yacc.c */ 3368 #line 541 "cint_grammar.y" 3369 { (yyval) = cint_ast_string("enum"); } 3370 break; 3371 3372 case 203: 3373 3374 /* Line 1464 of yacc.c */ 3375 #line 542 "cint_grammar.y" 3376 { (yyval) = cint_ast_string("case"); } 3377 break; 3378 3379 case 204: 3380 3381 /* Line 1464 of yacc.c */ 3382 #line 543 "cint_grammar.y" 3383 { (yyval) = cint_ast_string("default"); } 3384 break; 3385 3386 case 205: 3387 3388 /* Line 1464 of yacc.c */ 3389 #line 544 "cint_grammar.y" 3390 { (yyval) = cint_ast_string("if"); } 3391 break; 3392 3393 case 206: 3394 3395 /* Line 1464 of yacc.c */ 3396 #line 545 "cint_grammar.y" 3397 { (yyval) = cint_ast_string("else"); } 3398 break; 3399 3400 case 207: 3401 3402 /* Line 1464 of yacc.c */ 3403 #line 546 "cint_grammar.y" 3404 { (yyval) = cint_ast_string("switch"); } 3405 break; 3406 3407 case 208: 3408 3409 /* Line 1464 of yacc.c */ 3410 #line 547 "cint_grammar.y" 3411 { (yyval) = cint_ast_string("while"); } 3412 break; 3413 3414 case 209: 3415 3416 /* Line 1464 of yacc.c */ 3417 #line 548 "cint_grammar.y" 3418 { (yyval) = cint_ast_string("do"); } 3419 break; 3420 3421 case 210: 3422 3423 /* Line 1464 of yacc.c */ 3424 #line 549 "cint_grammar.y" 3425 { (yyval) = cint_ast_string("for"); } 3426 break; 3427 3428 case 211: 3429 3430 /* Line 1464 of yacc.c */ 3431 #line 550 "cint_grammar.y" 3432 { (yyval) = cint_ast_string("goto"); } 3433 break; 3434 3435 case 212: 3436 3437 /* Line 1464 of yacc.c */ 3438 #line 551 "cint_grammar.y" 3439 { (yyval) = cint_ast_string("continue"); } 3440 break; 3441 3442 case 213: 3443 3444 /* Line 1464 of yacc.c */ 3445 #line 552 "cint_grammar.y" 3446 { (yyval) = cint_ast_string("break"); } 3447 break; 3448 3449 case 214: 3450 3451 /* Line 1464 of yacc.c */ 3452 #line 553 "cint_grammar.y" 3453 { (yyval) = cint_ast_string("return"); } 3454 break; 3455 3456 case 215: 3457 3458 /* Line 1464 of yacc.c */ 3459 #line 554 "cint_grammar.y" 3460 { (yyval) = cint_ast_string("cint"); } 3461 break; 3462 3463 case 216: 3464 3465 /* Line 1464 of yacc.c */ 3466 #line 555 "cint_grammar.y" 3467 { (yyval) = cint_ast_string("print"); } 3468 break; 3469 3470 case 223: 3471 3472 /* Line 1464 of yacc.c */ 3473 #line 571 "cint_grammar.y" 3474 { 3475 cint_ast_append((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); 3476 (yyval) = (yyvsp[(1) - (2)]); 3477 } 3478 break; 3479 3480 case 224: 3481 3482 /* Line 1464 of yacc.c */ 3483 #line 578 "cint_grammar.y" 3484 { (yyval) = cint_ast_cint((yyvsp[(2) - (3)])); } 3485 break; 3486 3487 case 226: 3488 3489 /* Line 1464 of yacc.c */ 3490 #line 582 "cint_grammar.y" 3491 { (yyval) = cint_ast_case((yyvsp[(2) - (4)]), (yyvsp[(4) - (4)])); } 3492 break; 3493 3494 case 227: 3495 3496 /* Line 1464 of yacc.c */ 3497 #line 583 "cint_grammar.y" 3498 { (yyval) = cint_ast_case(0, (yyvsp[(3) - (3)])); } 3499 break; 3500 3501 case 229: 3502 3503 /* Line 1464 of yacc.c */ 3504 #line 590 "cint_grammar.y" 3505 { (yyval) = cint_ast_empty(); } 3506 break; 3507 3508 case 230: 3509 3510 /* Line 1464 of yacc.c */ 3511 #line 591 "cint_grammar.y" 3512 { (yyval) = (yyvsp[(2) - (3)]); } 3513 break; 3514 3515 case 231: 3516 3517 /* Line 1464 of yacc.c */ 3518 #line 597 "cint_grammar.y" 3519 { (yyval) = (yyvsp[(1) - (1)]); } 3520 break; 3521 3522 case 232: 3523 3524 /* Line 1464 of yacc.c */ 3525 #line 598 "cint_grammar.y" 3526 { (yyval) = (yyvsp[(1) - (2)]); cint_ast_append((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); } 3527 break; 3528 3529 case 233: 3530 3531 /* Line 1464 of yacc.c */ 3532 #line 602 "cint_grammar.y" 3533 { (yyval) = (yyvsp[(1) - (1)]); } 3534 break; 3535 3536 case 234: 3537 3538 /* Line 1464 of yacc.c */ 3539 #line 604 "cint_grammar.y" 3540 { 3541 cint_ast_append((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); 3542 (yyval) = (yyvsp[(1) - (2)]); 3543 } 3544 break; 3545 3546 case 235: 3547 3548 /* Line 1464 of yacc.c */ 3549 #line 611 "cint_grammar.y" 3550 { (yyval) = cint_ast_empty(); } 3551 break; 3552 3553 case 237: 3554 3555 /* Line 1464 of yacc.c */ 3556 #line 617 "cint_grammar.y" 3557 { 3558 (yyval) = cint_ast_if((yyvsp[(3) - (5)]), (yyvsp[(5) - (5)]), 0); 3559 } 3560 break; 3561 3562 case 238: 3563 3564 /* Line 1464 of yacc.c */ 3565 #line 621 "cint_grammar.y" 3566 { 3567 (yyval) = cint_ast_if((yyvsp[(3) - (7)]), (yyvsp[(5) - (7)]), (yyvsp[(7) - (7)])); 3568 } 3569 break; 3570 3571 case 239: 3572 3573 /* Line 1464 of yacc.c */ 3574 #line 624 "cint_grammar.y" 3575 { (yyval) = cint_ast_switch((yyvsp[(3) - (5)]), (yyvsp[(5) - (5)])); } 3576 break; 3577 3578 case 240: 3579 3580 /* Line 1464 of yacc.c */ 3581 #line 625 "cint_grammar.y" 3582 { (yyval) = cint_interpreter_macro((yyvsp[(1) - (5)]), (yyvsp[(3) - (5)])); } 3583 break; 3584 3585 case 241: 3586 3587 /* Line 1464 of yacc.c */ 3588 #line 630 "cint_grammar.y" 3589 { 3590 (yyval) = cint_ast_while((yyvsp[(3) - (5)]), (yyvsp[(5) - (5)]), 0); 3591 } 3592 break; 3593 3594 case 242: 3595 3596 /* Line 1464 of yacc.c */ 3597 #line 634 "cint_grammar.y" 3598 { 3599 (yyval) = cint_ast_while((yyvsp[(5) - (7)]), (yyvsp[(2) - (7)]), 1); 3600 } 3601 break; 3602 3603 case 243: 3604 3605 /* Line 1464 of yacc.c */ 3606 #line 638 "cint_grammar.y" 3607 { 3608 (yyval) = cint_ast_for((yyvsp[(3) - (6)]), (yyvsp[(4) - (6)]), 0, (yyvsp[(6) - (6)])); 3609 } 3610 break; 3611 3612 case 244: 3613 3614 /* Line 1464 of yacc.c */ 3615 #line 642 "cint_grammar.y" 3616 { 3617 (yyval) = cint_ast_for((yyvsp[(3) - (7)]), (yyvsp[(4) - (7)]), (yyvsp[(5) - (7)]), (yyvsp[(7) - (7)])); 3618 } 3619 break; 3620 3621 case 245: 3622 3623 /* Line 1464 of yacc.c */ 3624 #line 646 "cint_grammar.y" 3625 { 3626 (yyval) = cint_interpreter_iterator((yyvsp[(1) - (5)]), (yyvsp[(3) - (5)]), (yyvsp[(5) - (5)])); 3627 } 3628 break; 3629 3630 case 246: 3631 3632 /* Line 1464 of yacc.c */ 3633 #line 650 "cint_grammar.y" 3634 { 3635 (yyval) = cint_interpreter_iterator((yyvsp[(1) - (4)]), 0, (yyvsp[(3) - (4)])); 3636 } 3637 break; 3638 3639 case 248: 3640 3641 /* Line 1464 of yacc.c */ 3642 #line 657 "cint_grammar.y" 3643 { (yyval) = cint_ast_continue(); } 3644 break; 3645 3646 case 249: 3647 3648 /* Line 1464 of yacc.c */ 3649 #line 658 "cint_grammar.y" 3650 { (yyval) = cint_ast_break(); } 3651 break; 3652 3653 case 250: 3654 3655 /* Line 1464 of yacc.c */ 3656 #line 659 "cint_grammar.y" 3657 { (yyval) = cint_ast_return(0); } 3658 break; 3659 3660 case 251: 3661 3662 /* Line 1464 of yacc.c */ 3663 #line 660 "cint_grammar.y" 3664 { (yyval) = cint_ast_return((yyvsp[(2) - (3)])); } 3665 break; 3666 3667 case 252: 3668 3669 /* Line 1464 of yacc.c */ 3670 #line 666 "cint_grammar.y" 3671 { 3672 /* Accept and append this translation unit */ 3673 if(cparser->result) { 3674 cint_ast_append(cparser->result, (yyvsp[(1) - (1)])); 3675 } 3676 else { 3677 cparser->result = (yyvsp[(1) - (1)]); 3678 } 3679 3680 if(yychar == YYEMPTY) { 3681 /* 3682 * This unit is complete and we have no dangling lookahead. 3683 * Return to the application. 3684 */ 3685 YYACCEPT; 3686 } 3687 else { 3688 /* 3689 * A lookahead has been consumed. If we were to return from parsing 3690 * now we would lose the lookahead on the next invokation. 3691 * 3692 * We will continue to parse units until it is safe to return. 3693 */ 3694 } 3695 } 3696 break; 3697 3698 case 253: 3699 3700 /* Line 1464 of yacc.c */ 3701 #line 692 "cint_grammar.y" 3702 { 3703 /* Accept and append this translation unit */ 3704 if(cparser->result) { 3705 cint_ast_append(cparser->result, (yyvsp[(2) - (2)])); 3706 } 3707 else { 3708 cparser->result = (yyvsp[(1) - (2)]); 3709 } 3710 3711 if(yychar == YYEMPTY) { 3712 /* 3713 * This unit is complete and we have no dangling lookahead. 3714 * Return to the application. 3715 */ 3716 YYACCEPT; 3717 } 3718 else { 3719 /* 3720 * A lookahead has been consumed. If we were to return from parsing 3721 * now we would lose the lookahead on the next invokation. 3722 * 3723 * We will continue to parse units until it is safe to return. 3724 */ 3725 } 3726 } 3727 break; 3728 3729 case 254: 3730 3731 /* Line 1464 of yacc.c */ 3732 #line 718 "cint_grammar.y" 3733 { 3734 cparser->result = 0; 3735 YYACCEPT; 3736 } 3737 break; 3738 3739 case 258: 3740 3741 /* Line 1464 of yacc.c */ 3742 #line 734 "cint_grammar.y" 3743 { 3744 (yyval) = cint_ast_function_definition((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)])); 3745 } 3746 break; 3747 3748 3749 3750 /* Line 1464 of yacc.c */ 3751 #line 3752 "cint_c.tab.c" 3752 default: break; 3753 } 3754 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 3755 3756 YYPOPSTACK (yylen); 3757 yylen = 0; 3758 YY_STACK_PRINT (yyss, yyssp); 3759 3760 *++yyvsp = yyval; 3761 *++yylsp = yyloc; 3762 3763 /* Now `shift' the result of the reduction. Determine what state 3764 that goes to, based on the state we popped back to and the rule 3765 number reduced by. */ 3766 3767 yyn = yyr1[yyn]; 3768 3769 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 3770 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 3771 yystate = yytable[yystate]; 3772 else 3773 yystate = yydefgoto[yyn - YYNTOKENS]; 3774 3775 goto yynewstate; 3776 3777 3778 /*------------------------------------. 3779 | yyerrlab -- here on detecting error | 3780 `------------------------------------*/ 3781 yyerrlab: 3782 /* If not already recovering from an error, report this error. */ 3783 if (!yyerrstatus) 3784 { 3785 ++yynerrs; 3786 #if ! YYERROR_VERBOSE 3787 yyerror (&yylloc, yyscanner, cparser, YY_("syntax error")); 3788 #else 3789 { 3790 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 3791 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 3792 { 3793 YYSIZE_T yyalloc = 2 * yysize; 3794 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 3795 yyalloc = YYSTACK_ALLOC_MAXIMUM; 3796 if (yymsg != yymsgbuf) 3797 YYSTACK_FREE (yymsg); 3798 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 3799 if (yymsg) 3800 yymsg_alloc = yyalloc; 3801 else 3802 { 3803 yymsg = yymsgbuf; 3804 yymsg_alloc = sizeof yymsgbuf; 3805 } 3806 } 3807 3808 if (0 < yysize && yysize <= yymsg_alloc) 3809 { 3810 (void) yysyntax_error (yymsg, yystate, yychar); 3811 yyerror (&yylloc, yyscanner, cparser, yymsg); 3812 } 3813 else 3814 { 3815 yyerror (&yylloc, yyscanner, cparser, YY_("syntax error")); 3816 if (yysize != 0) 3817 goto yyexhaustedlab; 3818 } 3819 } 3820 #endif 3821 } 3822 3823 yyerror_range[0] = yylloc; 3824 3825 if (yyerrstatus == 3) 3826 { 3827 /* If just tried and failed to reuse lookahead token after an 3828 error, discard it. */ 3829 3830 if (yychar <= YYEOF) 3831 { 3832 /* Return failure if at end of input. */ 3833 if (yychar == YYEOF) 3834 YYABORT; 3835 } 3836 else 3837 { 3838 yydestruct ("Error: discarding", 3839 yytoken, &yylval, &yylloc, yyscanner, cparser); 3840 yychar = YYEMPTY; 3841 } 3842 } 3843 3844 /* Else will try to reuse lookahead token after shifting the error 3845 token. */ 3846 goto yyerrlab1; 3847 3848 3849 /*---------------------------------------------------. 3850 | yyerrorlab -- error raised explicitly by YYERROR. | 3851 `---------------------------------------------------*/ 3852 yyerrorlab: 3853 3854 /* Pacify compilers like GCC when the user code never invokes 3855 YYERROR and the label yyerrorlab therefore never appears in user 3856 code. */ 3857 if (/*CONSTCOND*/ 0) 3858 goto yyerrorlab; 3859 3860 yyerror_range[0] = yylsp[1-yylen]; 3861 /* Do not reclaim the symbols of the rule which action triggered 3862 this YYERROR. */ 3863 YYPOPSTACK (yylen); 3864 yylen = 0; 3865 YY_STACK_PRINT (yyss, yyssp); 3866 yystate = *yyssp; 3867 goto yyerrlab1; 3868 3869 3870 /*-------------------------------------------------------------. 3871 | yyerrlab1 -- common code for both syntax error and YYERROR. | 3872 `-------------------------------------------------------------*/ 3873 yyerrlab1: 3874 yyerrstatus = 3; /* Each real token shifted decrements this. */ 3875 3876 for (;;) 3877 { 3878 yyn = yypact[yystate]; 3879 if (yyn != YYPACT_NINF) 3880 { 3881 yyn += YYTERROR; 3882 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 3883 { 3884 yyn = yytable[yyn]; 3885 if (0 < yyn) 3886 break; 3887 } 3888 } 3889 3890 /* Pop the current state because it cannot handle the error token. */ 3891 if (yyssp == yyss) 3892 YYABORT; 3893 3894 yyerror_range[0] = *yylsp; 3895 yydestruct ("Error: popping", 3896 yystos[yystate], yyvsp, yylsp, yyscanner, cparser); 3897 YYPOPSTACK (1); 3898 yystate = *yyssp; 3899 YY_STACK_PRINT (yyss, yyssp); 3900 } 3901 3902 *++yyvsp = yylval; 3903 3904 yyerror_range[1] = yylloc; 3905 /* Using YYLLOC is tempting, but would change the location of 3906 the lookahead. YYLOC is available though. */ 3907 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); 3908 *++yylsp = yyloc; 3909 3910 /* Shift the error token. */ 3911 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 3912 3913 yystate = yyn; 3914 goto yynewstate; 3915 3916 3917 /*-------------------------------------. 3918 | yyacceptlab -- YYACCEPT comes here. | 3919 `-------------------------------------*/ 3920 yyacceptlab: 3921 yyresult = 0; 3922 goto yyreturn; 3923 3924 /*-----------------------------------. 3925 | yyabortlab -- YYABORT comes here. | 3926 `-----------------------------------*/ 3927 yyabortlab: 3928 yyresult = 1; 3929 goto yyreturn; 3930 3931 #if !defined(yyoverflow) || YYERROR_VERBOSE 3932 /*-------------------------------------------------. 3933 | yyexhaustedlab -- memory exhaustion comes here. | 3934 `-------------------------------------------------*/ 3935 yyexhaustedlab: 3936 yyerror (&yylloc, yyscanner, cparser, YY_("memory exhausted")); 3937 yyresult = 2; 3938 /* Fall through. */ 3939 #endif 3940 3941 yyreturn: 3942 if (yychar != YYEMPTY) 3943 yydestruct ("Cleanup: discarding lookahead", 3944 yytoken, &yylval, &yylloc, yyscanner, cparser); 3945 /* Do not reclaim the symbols of the rule which action triggered 3946 this YYABORT or YYACCEPT. */ 3947 YYPOPSTACK (yylen); 3948 YY_STACK_PRINT (yyss, yyssp); 3949 while (yyssp != yyss) 3950 { 3951 yydestruct ("Cleanup: popping", 3952 yystos[*yyssp], yyvsp, yylsp, yyscanner, cparser); 3953 YYPOPSTACK (1); 3954 } 3955 #ifndef yyoverflow 3956 if (yyss != yyssa) 3957 YYSTACK_FREE (yyss); 3958 #endif 3959 yyps->yynew = 1; 3960 3961 yypushreturn: 3962 #if YYERROR_VERBOSE 3963 if (yymsg != yymsgbuf) 3964 YYSTACK_FREE (yymsg); 3965 #endif 3966 /* Make sure YYID is used. */ 3967 return YYID (yyresult); 3968 } 3969 3970 3971 3972 /* Line 1684 of yacc.c */ 3973 #line 741 "cint_grammar.y" 3974 3975 3976 #include "cint_porting.h" 3977 3978 void cint_c_error(YYLTYPE* locp, yyscan_t yyscanner, cint_cparser_t* cp, const char* msg) 3979 { 3980 const int sourceLineLen = LONGEST_SOURCE_LINE; /* Truncate source lines longer than 256 characters. */ 3981 char sourceLine[LONGEST_SOURCE_LINE]; 3982 char errLine[LONGEST_SOURCE_LINE]; 3983 char *errPtr = errLine; 3984 int errCol; 3985 int tokLen; 3986 int i; 3987 char *currentFileName; 3988 int currentLineNum; 3989 3990 (void) cint_current_line(yyscanner, sourceLine, sourceLineLen, &errCol, 3991 &tokLen, ¤tFileName, ¤tLineNum); 3992 if (sourceLine[0] && !cint_cparser_interactive()) { 3993 /* Print current source line (if there is one) and not interactive */ 3994 CINT_PRINTF("%s\n", sourceLine); 3995 } 3996 if (tokLen) { 3997 /* Create a "marker" line pointing to offending token. */ 3998 for (i = 0; i < errCol; i++) { 3999 *errPtr++ = ' '; 4000 } 4001 for (i = 0; i < tokLen; i++) { 4002 *errPtr++ = '^'; 4003 } 4004 *errPtr = 0; 4005 errPtr = errLine; 4006 } else { 4007 /* If tokLen is zero, either the line was longer than max allowed or current line is empty. */ 4008 errPtr = "[No current line]"; 4009 } 4010 4011 /* print marker and parser message */ 4012 if (currentFileName) { 4013 /* If file name is NULL, we're at the top */ 4014 CINT_PRINTF("%s %s [%s:%d]\n", errPtr, msg, currentFileName, currentLineNum); 4015 } else if (currentLineNum) { 4016 CINT_PRINTF("%s %s [%d]\n", errPtr, msg, currentLineNum); 4017 } else { 4018 CINT_PRINTF("%s %s\n", errPtr, msg); 4019 } 4020 } 4021 4022 4023 #else /* CINT_CONFIG_INCLUDE_PARSER */ 4024 int cint_grammar_c_not_empty; 4025 #endif 4026