- Timestamp:
- 2019-10-09T14:01:43+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendors/AGRIF/dev_r11615_ENHANCE-04_namelists_as_internalfiles_agrif/LIB/main.c
r5656 r11668 1 /* A Bison parser, made by GNU Bison 2.3. */2 3 /* Skeleton implementation for Bison'sYacc-like parsers in C4 5 Copyright (C) 1984, 1989 , 1990, 2000, 2001, 2002, 2003, 2004, 2005, 20066 Free Software Foundation,Inc.7 8 This program is free software ;you can redistribute it and/or modify1 /* A Bison parser, made by GNU Bison 3.4.2. */ 2 3 /* Bison implementation for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation, 6 Inc. 7 8 This program is free software: you can redistribute it and/or modify 9 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation ; either version 2, or (at your option)11 any later version.10 the Free Software Foundation, either version 3 of the License, or 11 (at your option) any later version. 12 12 13 13 This program is distributed in the hope that it will be useful, … … 17 17 18 18 You should have received a copy of the GNU General Public License 19 along with this program; if not, write to the Free Software 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 Boston, MA 02110-1301, USA. */ 19 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 22 20 23 21 /* As a special exception, you may create a larger work that contains … … 44 42 USER NAME SPACE" below. */ 45 43 44 /* Undocumented macros, especially those whose name start with YY_, 45 are private implementation details. Do not rely on them. */ 46 46 47 /* Identify Bison output. */ 47 48 #define YYBISON 1 48 49 49 50 /* Bison version. */ 50 #define YYBISON_VERSION " 2.3"51 #define YYBISON_VERSION "3.4.2" 51 52 52 53 /* Skeleton name. */ … … 56 57 #define YYPURE 0 57 58 58 /* Using locations. */ 59 #define YYLSP_NEEDED 0 59 /* Push parsers. */ 60 #define YYPUSH 0 61 62 /* Pull parsers. */ 63 #define YYPULL 1 64 60 65 61 66 /* Substitute the variable and function names. */ 62 #define yyparse convert_parse 63 #define yylex convert_lex 64 #define yyerror convert_error 65 #define yylval convert_lval 66 #define yychar convert_char 67 #define yydebug convert_debug 68 #define yynerrs convert_nerrs 69 70 71 /* Tokens. */ 72 #ifndef YYTOKENTYPE 73 # define YYTOKENTYPE 74 /* Put the tokens into the symbol table, so that GDB and other debuggers 75 know about them. */ 76 enum yytokentype { 77 TOK_SEP = 258, 78 TOK_KIND = 259, 79 TOK_EQUAL = 260, 80 TOK_USE = 261, 81 TOK_MODULEMAIN = 262, 82 TOK_NOTGRIDDEP = 263, 83 TOK_USEITEM = 264, 84 TOK_NAME = 265, 85 TOK_CSTINT = 266, 86 TOK_PROBTYPE = 267 87 }; 88 #endif 89 /* Tokens. */ 90 #define TOK_SEP 258 91 #define TOK_KIND 259 92 #define TOK_EQUAL 260 93 #define TOK_USE 261 94 #define TOK_MODULEMAIN 262 95 #define TOK_NOTGRIDDEP 263 96 #define TOK_USEITEM 264 97 #define TOK_NAME 265 98 #define TOK_CSTINT 266 99 #define TOK_PROBTYPE 267 100 101 102 103 104 /* Copy the first part of user declarations. */ 67 #define yyparse convert_parse 68 #define yylex convert_lex 69 #define yyerror convert_error 70 #define yydebug convert_debug 71 #define yynerrs convert_nerrs 72 73 #define yylval convert_lval 74 #define yychar convert_char 75 76 /* First part of user prologue. */ 105 77 #line 35 "convert.y" 106 78 … … 120 92 121 93 122 123 /* Enabling traces. */ 124 #ifndef YYDEBUG 125 # define YYDEBUG 1 126 #endif 94 #line 95 "convert.tab.c" 95 96 # ifndef YY_NULLPTR 97 # if defined __cplusplus 98 # if 201103L <= __cplusplus 99 # define YY_NULLPTR nullptr 100 # else 101 # define YY_NULLPTR 0 102 # endif 103 # else 104 # define YY_NULLPTR ((void*)0) 105 # endif 106 # endif 127 107 128 108 /* Enabling verbose error messages. */ … … 134 114 #endif 135 115 136 /* Enabling the token table. */ 137 #ifndef YYTOKEN_TABLE 138 # define YYTOKEN_TABLE 0 139 #endif 140 116 117 /* Debug traces. */ 118 #ifndef YYDEBUG 119 # define YYDEBUG 1 120 #endif 121 #if YYDEBUG 122 extern int convert_debug; 123 #endif 124 125 /* Token type. */ 126 #ifndef YYTOKENTYPE 127 # define YYTOKENTYPE 128 enum yytokentype 129 { 130 TOK_SEP = 258, 131 TOK_KIND = 259, 132 TOK_EQUAL = 260, 133 TOK_USE = 261, 134 TOK_MODULEMAIN = 262, 135 TOK_NOTGRIDDEP = 263, 136 TOK_USEITEM = 264, 137 TOK_NAME = 265, 138 TOK_CSTINT = 266, 139 TOK_PROBTYPE = 267 140 }; 141 #endif 142 143 /* Value type. */ 141 144 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 142 typedef union YYSTYPE 145 union YYSTYPE 146 { 143 147 #line 52 "convert.y" 144 { 148 145 149 char na[LONG_M]; 146 } 147 /* Line 193 of yacc.c. */ 148 #line 149 "convert.tab.c" 149 YYSTYPE; 150 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 150 151 #line 152 "convert.tab.c" 152 153 }; 154 typedef union YYSTYPE YYSTYPE; 155 # define YYSTYPE_IS_TRIVIAL 1 151 156 # define YYSTYPE_IS_DECLARED 1 152 # define YYSTYPE_IS_TRIVIAL 1153 #endif 154 155 156 157 /* Copy the second part of user declarations. */ 158 159 160 /* Line 216 of yacc.c. */ 161 #line 162 "convert.tab.c" 157 #endif 158 159 160 extern YYSTYPE convert_lval; 161 162 int convert_parse (void); 163 164 165 166 162 167 163 168 #ifdef short … … 173 178 #ifdef YYTYPE_INT8 174 179 typedef YYTYPE_INT8 yytype_int8; 175 #elif (defined __STDC__ || defined __C99__FUNC__ \ 176 || defined __cplusplus || defined _MSC_VER) 180 #else 177 181 typedef signed char yytype_int8; 178 #else179 typedef short int yytype_int8;180 182 #endif 181 183 … … 183 185 typedef YYTYPE_UINT16 yytype_uint16; 184 186 #else 185 typedef unsigned short intyytype_uint16;187 typedef unsigned short yytype_uint16; 186 188 #endif 187 189 … … 189 191 typedef YYTYPE_INT16 yytype_int16; 190 192 #else 191 typedef short intyytype_int16;193 typedef short yytype_int16; 192 194 #endif 193 195 … … 197 199 # elif defined size_t 198 200 # define YYSIZE_T size_t 199 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 200 || defined __cplusplus || defined _MSC_VER) 201 # elif ! defined YYSIZE_T 201 202 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 202 203 # define YYSIZE_T size_t 203 204 # else 204 # define YYSIZE_T unsigned int205 # define YYSIZE_T unsigned 205 206 # endif 206 207 #endif … … 212 213 # if ENABLE_NLS 213 214 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 214 # define YY_( msgid) dgettext ("bison-runtime", msgid)215 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 215 216 # endif 216 217 # endif 217 218 # ifndef YY_ 218 # define YY_( msgid) msgid219 # define YY_(Msgid) Msgid 219 220 # endif 221 #endif 222 223 #ifndef YY_ATTRIBUTE 224 # if (defined __GNUC__ \ 225 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 226 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 227 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 228 # else 229 # define YY_ATTRIBUTE(Spec) /* empty */ 230 # endif 231 #endif 232 233 #ifndef YY_ATTRIBUTE_PURE 234 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 235 #endif 236 237 #ifndef YY_ATTRIBUTE_UNUSED 238 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 220 239 #endif 221 240 222 241 /* Suppress unused-variable warnings by "using" E. */ 223 242 #if ! defined lint || defined __GNUC__ 224 # define YYUSE( e) ((void) (e))243 # define YYUSE(E) ((void) (E)) 225 244 #else 226 # define YYUSE(e) /* empty */ 227 #endif 228 229 /* Identity function, used to suppress warnings about constant conditions. */ 230 #ifndef lint 231 # define YYID(n) (n) 245 # define YYUSE(E) /* empty */ 246 #endif 247 248 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 249 /* Suppress an incorrect diagnostic about yylval being uninitialized. */ 250 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 251 _Pragma ("GCC diagnostic push") \ 252 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 253 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 254 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 255 _Pragma ("GCC diagnostic pop") 232 256 #else 233 #if (defined __STDC__ || defined __C99__FUNC__ \ 234 || defined __cplusplus || defined _MSC_VER) 235 static int 236 YYID (int i) 237 #else 238 static int 239 YYID (i) 240 int i; 241 #endif 242 { 243 return i; 244 } 245 #endif 257 # define YY_INITIAL_VALUE(Value) Value 258 #endif 259 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 260 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 261 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 262 #endif 263 #ifndef YY_INITIAL_VALUE 264 # define YY_INITIAL_VALUE(Value) /* Nothing. */ 265 #endif 266 267 268 #define YY_ASSERT(E) ((void) (0 && (E))) 246 269 247 270 #if ! defined yyoverflow || YYERROR_VERBOSE … … 262 285 # else 263 286 # define YYSTACK_ALLOC alloca 264 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 265 || defined __cplusplus || defined _MSC_VER) 287 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 266 288 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 267 # ifndef _STDLIB_H 268 # define _STDLIB_H 1 289 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 290 # ifndef EXIT_SUCCESS 291 # define EXIT_SUCCESS 0 269 292 # endif 270 293 # endif … … 274 297 275 298 # ifdef YYSTACK_ALLOC 276 /* Pacify GCC's `empty if-body' warning. */277 # define YYSTACK_FREE(Ptr) do { /* empty */; } while ( YYID (0))299 /* Pacify GCC's 'empty if-body' warning. */ 300 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) 278 301 # ifndef YYSTACK_ALLOC_MAXIMUM 279 302 /* The OS might guarantee only one guard page at the bottom of the stack, … … 289 312 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 290 313 # endif 291 # if (defined __cplusplus && ! defined _STDLIB_H\314 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 292 315 && ! ((defined YYMALLOC || defined malloc) \ 293 316 && (defined YYFREE || defined free))) 294 317 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 295 # ifndef _STDLIB_H296 # define _STDLIB_H 1318 # ifndef EXIT_SUCCESS 319 # define EXIT_SUCCESS 0 297 320 # endif 298 321 # endif 299 322 # ifndef YYMALLOC 300 323 # define YYMALLOC malloc 301 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 302 || defined __cplusplus || defined _MSC_VER) 324 # if ! defined malloc && ! defined EXIT_SUCCESS 303 325 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 304 326 # endif … … 306 328 # ifndef YYFREE 307 329 # define YYFREE free 308 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 309 || defined __cplusplus || defined _MSC_VER) 330 # if ! defined free && ! defined EXIT_SUCCESS 310 331 void free (void *); /* INFRINGES ON USER NAME SPACE */ 311 332 # endif … … 317 338 #if (! defined yyoverflow \ 318 339 && (! defined __cplusplus \ 319 340 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 320 341 321 342 /* A type that is properly aligned for any stack member. */ 322 343 union yyalloc 323 344 { 324 yytype_int16 yyss ;325 YYSTYPE yyvs ;326 345 yytype_int16 yyss_alloc; 346 YYSTYPE yyvs_alloc; 347 }; 327 348 328 349 /* The size of the maximum gap between one aligned stack and the next. */ … … 335 356 + YYSTACK_GAP_MAXIMUM) 336 357 337 /* Copy COUNT objects from FROM to TO. The source and destination do 338 not overlap. */ 339 # ifndef YYCOPY 340 # if defined __GNUC__ && 1 < __GNUC__ 341 # define YYCOPY(To, From, Count) \ 342 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 343 # else 344 # define YYCOPY(To, From, Count) \ 345 do \ 346 { \ 347 YYSIZE_T yyi; \ 348 for (yyi = 0; yyi < (Count); yyi++) \ 349 (To)[yyi] = (From)[yyi]; \ 350 } \ 351 while (YYID (0)) 352 # endif 353 # endif 358 # define YYCOPY_NEEDED 1 354 359 355 360 /* Relocate STACK from its old location to the new one. The … … 358 363 stack. Advance YYPTR to a properly aligned location for the next 359 364 stack. */ 360 # define YYSTACK_RELOCATE(Stack) \ 361 do \ 362 { \ 363 YYSIZE_T yynewbytes; \ 364 YYCOPY (&yyptr->Stack, Stack, yysize); \ 365 Stack = &yyptr->Stack; \ 366 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 367 yyptr += yynewbytes / sizeof (*yyptr); \ 368 } \ 369 while (YYID (0)) 370 371 #endif 365 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 366 do \ 367 { \ 368 YYSIZE_T yynewbytes; \ 369 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 370 Stack = &yyptr->Stack_alloc; \ 371 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 372 yyptr += yynewbytes / sizeof (*yyptr); \ 373 } \ 374 while (0) 375 376 #endif 377 378 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 379 /* Copy COUNT objects from SRC to DST. The source and destination do 380 not overlap. */ 381 # ifndef YYCOPY 382 # if defined __GNUC__ && 1 < __GNUC__ 383 # define YYCOPY(Dst, Src, Count) \ 384 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 385 # else 386 # define YYCOPY(Dst, Src, Count) \ 387 do \ 388 { \ 389 YYSIZE_T yyi; \ 390 for (yyi = 0; yyi < (Count); yyi++) \ 391 (Dst)[yyi] = (Src)[yyi]; \ 392 } \ 393 while (0) 394 # endif 395 # endif 396 #endif /* !YYCOPY_NEEDED */ 372 397 373 398 /* YYFINAL -- State number of the termination state. */ … … 382 407 /* YYNRULES -- Number of rules. */ 383 408 #define YYNRULES 11 384 /* YYN RULES -- Number of states. */409 /* YYNSTATES -- Number of states. */ 385 410 #define YYNSTATES 29 386 411 387 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */388 412 #define YYUNDEFTOK 2 389 413 #define YYMAXUTOK 267 390 414 391 #define YYTRANSLATE(YYX) \ 392 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 393 394 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 415 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM 416 as returned by yylex, with out-of-bounds checking. */ 417 #define YYTRANSLATE(YYX) \ 418 ((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 419 420 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM 421 as returned by yylex. */ 395 422 static const yytype_uint8 yytranslate[] = 396 423 { … … 425 452 426 453 #if YYDEBUG 427 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 428 YYRHS. */ 429 static const yytype_uint8 yyprhs[] = 430 { 431 0, 0, 3, 4, 7, 9, 13, 19, 27, 31, 432 37, 42 433 }; 434 435 /* YYRHS -- A `-1'-separated list of the rules' RHS. */ 436 static const yytype_int8 yyrhs[] = 437 { 438 17, 0, -1, -1, 17, 18, -1, 15, -1, 12, 439 10, 14, -1, 12, 10, 13, 10, 14, -1, 12, 440 10, 13, 10, 13, 10, 14, -1, 7, 10, 14, 441 -1, 4, 10, 5, 11, 14, -1, 8, 3, 10, 442 14, -1, 6, 9, 14, -1 443 }; 444 445 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 454 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ 446 455 static const yytype_uint8 yyrline[] = 447 456 { … … 451 460 #endif 452 461 453 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE462 #if YYDEBUG || YYERROR_VERBOSE || 0 454 463 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 455 464 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ … … 459 468 "TOK_USE", "TOK_MODULEMAIN", "TOK_NOTGRIDDEP", "TOK_USEITEM", "TOK_NAME", 460 469 "TOK_CSTINT", "TOK_PROBTYPE", "','", "';'", "'\\n'", "$accept", "input", 461 "line", 0470 "line", YY_NULLPTR 462 471 }; 463 472 #endif 464 473 465 474 # ifdef YYPRINT 466 /* YYTOKNUM[ YYLEX-NUM] -- Internal token number corresponding to467 token YYLEX-NUM. */475 /* YYTOKNUM[NUM] -- (External) token number corresponding to the 476 (internal) symbol number NUM (which must be that of a token). */ 468 477 static const yytype_uint16 yytoknum[] = 469 478 { … … 473 482 # endif 474 483 475 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 476 static const yytype_uint8 yyr1[] = 477 { 478 0, 16, 17, 17, 18, 18, 18, 18, 18, 18, 479 18, 18 484 #define YYPACT_NINF -13 485 486 #define yypact_value_is_default(Yystate) \ 487 (!!((Yystate) == (-13))) 488 489 #define YYTABLE_NINF -1 490 491 #define yytable_value_is_error(Yytable_value) \ 492 0 493 494 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 495 STATE-NUM. */ 496 static const yytype_int8 yypact[] = 497 { 498 -13, 0, -13, -7, 2, -5, 10, 4, -13, -13, 499 11, 3, 5, 8, -12, 9, -13, -13, 7, 12, 500 -13, 13, -13, -4, -13, 14, -13, 15, -13 480 501 }; 481 502 482 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 483 static const yytype_uint8 yyr2[] = 484 { 485 0, 2, 0, 2, 1, 3, 5, 7, 3, 5, 486 4, 3 487 }; 488 489 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 490 STATE-NUM when YYTABLE doesn't specify something else to do. Zero 491 means the default is an error. */ 503 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. 504 Performed when YYTABLE does not specify something else to do. Zero 505 means the default is an error. */ 492 506 static const yytype_uint8 yydefact[] = 493 507 { … … 497 511 }; 498 512 499 /* YYDEFGOTO[NTERM-NUM]. */ 513 /* YYPGOTO[NTERM-NUM]. */ 514 static const yytype_int8 yypgoto[] = 515 { 516 -13, -13, -13 517 }; 518 519 /* YYDEFGOTO[NTERM-NUM]. */ 500 520 static const yytype_int8 yydefgoto[] = 501 521 { … … 503 523 }; 504 524 505 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 506 STATE-NUM. */ 507 #define YYPACT_NINF -13 508 static const yytype_int8 yypact[] = 509 { 510 -13, 0, -13, -7, 2, -5, 10, 4, -13, -13, 511 11, 3, 5, 8, -12, 9, -13, -13, 7, 12, 512 -13, 13, -13, -4, -13, 14, -13, 15, -13 513 }; 514 515 /* YYPGOTO[NTERM-NUM]. */ 516 static const yytype_int8 yypgoto[] = 517 { 518 -13, -13, -13 519 }; 520 521 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 522 positive, shift that token. If negative, reduce the rule which 523 number is the opposite. If zero, do what YYDEFACT says. 524 If YYTABLE_NINF, syntax error. */ 525 #define YYTABLE_NINF -1 525 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If 526 positive, shift that token. If negative, reduce the rule whose 527 number is the opposite. If YYTABLE_NINF, syntax error. */ 526 528 static const yytype_uint8 yytable[] = 527 529 { … … 538 540 }; 539 541 540 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing541 symbol of state STATE-NUM. */542 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 543 symbol of state STATE-NUM. */ 542 544 static const yytype_uint8 yystos[] = 543 545 { … … 547 549 }; 548 550 549 #define yyerrok (yyerrstatus = 0) 550 #define yyclearin (yychar = YYEMPTY) 551 #define YYEMPTY (-2) 552 #define YYEOF 0 553 554 #define YYACCEPT goto yyacceptlab 555 #define YYABORT goto yyabortlab 556 #define YYERROR goto yyerrorlab 557 558 559 /* Like YYERROR except do call yyerror. This remains here temporarily 560 to ease the transition to the new meaning of YYERROR, for GCC. 561 Once GCC version 2 has supplanted version 1, this can go. */ 562 563 #define YYFAIL goto yyerrlab 551 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 552 static const yytype_uint8 yyr1[] = 553 { 554 0, 16, 17, 17, 18, 18, 18, 18, 18, 18, 555 18, 18 556 }; 557 558 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ 559 static const yytype_uint8 yyr2[] = 560 { 561 0, 2, 0, 2, 1, 3, 5, 7, 3, 5, 562 4, 3 563 }; 564 565 566 #define yyerrok (yyerrstatus = 0) 567 #define yyclearin (yychar = YYEMPTY) 568 #define YYEMPTY (-2) 569 #define YYEOF 0 570 571 #define YYACCEPT goto yyacceptlab 572 #define YYABORT goto yyabortlab 573 #define YYERROR goto yyerrorlab 574 564 575 565 576 #define YYRECOVERING() (!!yyerrstatus) 566 577 567 #define YYBACKUP(Token, Value) \ 568 do \ 569 if (yychar == YYEMPTY && yylen == 1) \ 570 { \ 571 yychar = (Token); \ 572 yylval = (Value); \ 573 yytoken = YYTRANSLATE (yychar); \ 574 YYPOPSTACK (1); \ 575 goto yybackup; \ 576 } \ 577 else \ 578 { \ 579 yyerror (YY_("syntax error: cannot back up")); \ 580 YYERROR; \ 581 } \ 582 while (YYID (0)) 583 584 585 #define YYTERROR 1 586 #define YYERRCODE 256 587 588 589 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 590 If N is 0, then set CURRENT to the empty location which ends 591 the previous symbol: RHS[0] (always defined). */ 592 593 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 594 #ifndef YYLLOC_DEFAULT 595 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 596 do \ 597 if (YYID (N)) \ 598 { \ 599 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 600 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 601 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 602 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 603 } \ 604 else \ 605 { \ 606 (Current).first_line = (Current).last_line = \ 607 YYRHSLOC (Rhs, 0).last_line; \ 608 (Current).first_column = (Current).last_column = \ 609 YYRHSLOC (Rhs, 0).last_column; \ 610 } \ 611 while (YYID (0)) 612 #endif 613 614 615 /* YY_LOCATION_PRINT -- Print the location on the stream. 616 This macro was not mandated originally: define only if we know 617 we won't break user code: when these are the locations we know. */ 618 619 #ifndef YY_LOCATION_PRINT 620 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 621 # define YY_LOCATION_PRINT(File, Loc) \ 622 fprintf (File, "%d.%d-%d.%d", \ 623 (Loc).first_line, (Loc).first_column, \ 624 (Loc).last_line, (Loc).last_column) 625 # else 626 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 627 # endif 628 #endif 629 630 631 /* YYLEX -- calling `yylex' with the right arguments. */ 632 633 #ifdef YYLEX_PARAM 634 # define YYLEX yylex (YYLEX_PARAM) 635 #else 636 # define YYLEX yylex () 637 #endif 578 #define YYBACKUP(Token, Value) \ 579 do \ 580 if (yychar == YYEMPTY) \ 581 { \ 582 yychar = (Token); \ 583 yylval = (Value); \ 584 YYPOPSTACK (yylen); \ 585 yystate = *yyssp; \ 586 goto yybackup; \ 587 } \ 588 else \ 589 { \ 590 yyerror (YY_("syntax error: cannot back up")); \ 591 YYERROR; \ 592 } \ 593 while (0) 594 595 /* Error token number */ 596 #define YYTERROR 1 597 #define YYERRCODE 256 598 599 638 600 639 601 /* Enable debugging if requested. */ … … 645 607 # endif 646 608 647 # define YYDPRINTF(Args) \ 648 do { \ 649 if (yydebug) \ 650 YYFPRINTF Args; \ 651 } while (YYID (0)) 652 653 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 654 do { \ 655 if (yydebug) \ 656 { \ 657 YYFPRINTF (stderr, "%s ", Title); \ 658 yy_symbol_print (stderr, \ 659 Type, Value); \ 660 YYFPRINTF (stderr, "\n"); \ 661 } \ 662 } while (YYID (0)) 663 664 665 /*--------------------------------. 666 | Print this symbol on YYOUTPUT. | 667 `--------------------------------*/ 668 669 /*ARGSUSED*/ 670 #if (defined __STDC__ || defined __C99__FUNC__ \ 671 || defined __cplusplus || defined _MSC_VER) 609 # define YYDPRINTF(Args) \ 610 do { \ 611 if (yydebug) \ 612 YYFPRINTF Args; \ 613 } while (0) 614 615 /* This macro is provided for backward compatibility. */ 616 #ifndef YY_LOCATION_PRINT 617 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 618 #endif 619 620 621 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 622 do { \ 623 if (yydebug) \ 624 { \ 625 YYFPRINTF (stderr, "%s ", Title); \ 626 yy_symbol_print (stderr, \ 627 Type, Value); \ 628 YYFPRINTF (stderr, "\n"); \ 629 } \ 630 } while (0) 631 632 633 /*-----------------------------------. 634 | Print this symbol's value on YYO. | 635 `-----------------------------------*/ 636 672 637 static void 673 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 674 #else 675 static void 676 yy_symbol_value_print (yyoutput, yytype, yyvaluep) 677 FILE *yyoutput; 678 int yytype; 679 YYSTYPE const * const yyvaluep; 680 #endif 681 { 638 yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) 639 { 640 FILE *yyoutput = yyo; 641 YYUSE (yyoutput); 682 642 if (!yyvaluep) 683 643 return; 684 644 # ifdef YYPRINT 685 645 if (yytype < YYNTOKENS) 686 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 687 # else 688 YYUSE (yyoutput); 646 YYPRINT (yyo, yytoknum[yytype], *yyvaluep); 689 647 # endif 690 switch (yytype) 691 { 692 default: 693 break; 694 } 695 } 696 697 698 /*--------------------------------. 699 | Print this symbol on YYOUTPUT. | 700 `--------------------------------*/ 701 702 #if (defined __STDC__ || defined __C99__FUNC__ \ 703 || defined __cplusplus || defined _MSC_VER) 648 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 649 YYUSE (yytype); 650 YY_IGNORE_MAYBE_UNINITIALIZED_END 651 } 652 653 654 /*---------------------------. 655 | Print this symbol on YYO. | 656 `---------------------------*/ 657 704 658 static void 705 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 706 #else 707 static void 708 yy_symbol_print (yyoutput, yytype, yyvaluep) 709 FILE *yyoutput; 710 int yytype; 711 YYSTYPE const * const yyvaluep; 712 #endif 713 { 714 if (yytype < YYNTOKENS) 715 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 716 else 717 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 718 719 yy_symbol_value_print (yyoutput, yytype, yyvaluep); 720 YYFPRINTF (yyoutput, ")"); 659 yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) 660 { 661 YYFPRINTF (yyo, "%s %s (", 662 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); 663 664 yy_symbol_value_print (yyo, yytype, yyvaluep); 665 YYFPRINTF (yyo, ")"); 721 666 } 722 667 … … 726 671 `------------------------------------------------------------------*/ 727 672 728 #if (defined __STDC__ || defined __C99__FUNC__ \729 || defined __cplusplus || defined _MSC_VER)730 673 static void 731 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 732 #else 733 static void 734 yy_stack_print (bottom, top) 735 yytype_int16 *bottom; 736 yytype_int16 *top; 737 #endif 674 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 738 675 { 739 676 YYFPRINTF (stderr, "Stack now"); 740 for (; bottom <= top; ++bottom) 741 YYFPRINTF (stderr, " %d", *bottom); 677 for (; yybottom <= yytop; yybottom++) 678 { 679 int yybot = *yybottom; 680 YYFPRINTF (stderr, " %d", yybot); 681 } 742 682 YYFPRINTF (stderr, "\n"); 743 683 } 744 684 745 # define YY_STACK_PRINT(Bottom, Top) 746 do { 747 if (yydebug) 748 yy_stack_print ((Bottom), (Top)); 749 } while ( YYID (0))685 # define YY_STACK_PRINT(Bottom, Top) \ 686 do { \ 687 if (yydebug) \ 688 yy_stack_print ((Bottom), (Top)); \ 689 } while (0) 750 690 751 691 … … 754 694 `------------------------------------------------*/ 755 695 756 #if (defined __STDC__ || defined __C99__FUNC__ \757 || defined __cplusplus || defined _MSC_VER)758 696 static void 759 yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 760 #else 761 static void 762 yy_reduce_print (yyvsp, yyrule) 763 YYSTYPE *yyvsp; 764 int yyrule; 765 #endif 766 { 697 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) 698 { 699 unsigned long yylno = yyrline[yyrule]; 767 700 int yynrhs = yyr2[yyrule]; 768 701 int yyi; 769 unsigned long int yylno = yyrline[yyrule];770 702 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 771 703 yyrule - 1, yylno); 772 704 /* The symbols being reduced. */ 773 705 for (yyi = 0; yyi < yynrhs; yyi++) 774 706 { 775 fprintf (stderr, " $%d = ", yyi + 1); 776 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 777 &(yyvsp[(yyi + 1) - (yynrhs)]) 778 ); 779 fprintf (stderr, "\n"); 707 YYFPRINTF (stderr, " $%d = ", yyi + 1); 708 yy_symbol_print (stderr, 709 yystos[yyssp[yyi + 1 - yynrhs]], 710 &yyvsp[(yyi + 1) - (yynrhs)] 711 ); 712 YYFPRINTF (stderr, "\n"); 780 713 } 781 714 } 782 715 783 # define YY_REDUCE_PRINT(Rule) 784 do { 785 if (yydebug) 786 yy_reduce_print (yy vsp, Rule); \787 } while ( YYID (0))716 # define YY_REDUCE_PRINT(Rule) \ 717 do { \ 718 if (yydebug) \ 719 yy_reduce_print (yyssp, yyvsp, Rule); \ 720 } while (0) 788 721 789 722 /* Nonzero means print parse trace. It is left uninitialized so that … … 799 732 800 733 /* YYINITDEPTH -- initial size of the parser's stacks. */ 801 #ifndef 734 #ifndef YYINITDEPTH 802 735 # define YYINITDEPTH 200 803 736 #endif … … 813 746 # define YYMAXDEPTH 10000 814 747 #endif 815 816 817 748 818 749 … … 824 755 # else 825 756 /* Return the length of YYSTR. */ 826 #if (defined __STDC__ || defined __C99__FUNC__ \827 || defined __cplusplus || defined _MSC_VER)828 757 static YYSIZE_T 829 758 yystrlen (const char *yystr) 830 #else831 static YYSIZE_T832 yystrlen (yystr)833 const char *yystr;834 #endif835 759 { 836 760 YYSIZE_T yylen; … … 848 772 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 849 773 YYDEST. */ 850 #if (defined __STDC__ || defined __C99__FUNC__ \851 || defined __cplusplus || defined _MSC_VER)852 774 static char * 853 775 yystpcpy (char *yydest, const char *yysrc) 854 #else855 static char *856 yystpcpy (yydest, yysrc)857 char *yydest;858 const char *yysrc;859 #endif860 776 { 861 777 char *yyd = yydest; … … 887 803 888 804 for (;;) 889 switch (*++yyp) 890 { 891 case '\'': 892 case ',': 893 goto do_not_strip_quotes; 894 895 case '\\': 896 if (*++yyp != '\\') 897 goto do_not_strip_quotes; 898 /* Fall through. */ 899 default: 900 if (yyres) 901 yyres[yyn] = *yyp; 902 yyn++; 903 break; 904 905 case '"': 906 if (yyres) 907 yyres[yyn] = '\0'; 908 return yyn; 909 } 805 switch (*++yyp) 806 { 807 case '\'': 808 case ',': 809 goto do_not_strip_quotes; 810 811 case '\\': 812 if (*++yyp != '\\') 813 goto do_not_strip_quotes; 814 else 815 goto append; 816 817 append: 818 default: 819 if (yyres) 820 yyres[yyn] = *yyp; 821 yyn++; 822 break; 823 824 case '"': 825 if (yyres) 826 yyres[yyn] = '\0'; 827 return yyn; 828 } 910 829 do_not_strip_quotes: ; 911 830 } … … 914 833 return yystrlen (yystr); 915 834 916 return yystpcpy (yyres, yystr) - yyres;835 return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres); 917 836 } 918 837 # endif 919 838 920 /* Copy into YYRESULT an error message about the unexpected token 921 YYCHAR while in state YYSTATE. Return the number of bytes copied, 922 including the terminating null byte. If YYRESULT is null, do not 923 copy anything; just return the number of bytes that would be 924 copied. As a special case, return 0 if an ordinary "syntax error" 925 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 926 size calculation. */ 927 static YYSIZE_T 928 yysyntax_error (char *yyresult, int yystate, int yychar) 929 { 930 int yyn = yypact[yystate]; 931 932 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 933 return 0; 934 else 839 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 840 about the unexpected token YYTOKEN for the state stack whose top is 841 YYSSP. 842 843 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 844 not large enough to hold the message. In that case, also set 845 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 846 required number of bytes is too large to store. */ 847 static int 848 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 849 yytype_int16 *yyssp, int yytoken) 850 { 851 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); 852 YYSIZE_T yysize = yysize0; 853 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 854 /* Internationalized format string. */ 855 const char *yyformat = YY_NULLPTR; 856 /* Arguments of yyformat. */ 857 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 858 /* Number of reported tokens (one for the "unexpected", one per 859 "expected"). */ 860 int yycount = 0; 861 862 /* There are many possibilities here to consider: 863 - If this state is a consistent state with a default action, then 864 the only way this function was invoked is if the default action 865 is an error action. In that case, don't check for expected 866 tokens because there are none. 867 - The only way there can be no lookahead present (in yychar) is if 868 this state is a consistent state with a default action. Thus, 869 detecting the absence of a lookahead is sufficient to determine 870 that there is no unexpected or expected token to report. In that 871 case, just report a simple "syntax error". 872 - Don't assume there isn't a lookahead just because this state is a 873 consistent state with a default action. There might have been a 874 previous inconsistent state, consistent state with a non-default 875 action, or user semantic action that manipulated yychar. 876 - Of course, the expected token list depends on states to have 877 correct lookahead information, and it depends on the parser not 878 to perform extra reductions after fetching a lookahead from the 879 scanner and before detecting a syntax error. Thus, state merging 880 (from LALR or IELR) and default reductions corrupt the expected 881 token list. However, the list is correct for canonical LR with 882 one exception: it will still contain any token that will not be 883 accepted due to an error action in a later state. 884 */ 885 if (yytoken != YYEMPTY) 935 886 { 936 int yytype = YYTRANSLATE (yychar); 937 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 938 YYSIZE_T yysize = yysize0; 939 YYSIZE_T yysize1; 940 int yysize_overflow = 0; 941 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 942 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 943 int yyx; 944 945 # if 0 946 /* This is so xgettext sees the translatable formats that are 947 constructed on the fly. */ 948 YY_("syntax error, unexpected %s"); 949 YY_("syntax error, unexpected %s, expecting %s"); 950 YY_("syntax error, unexpected %s, expecting %s or %s"); 951 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 952 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 953 # endif 954 char *yyfmt; 955 char const *yyf; 956 static char const yyunexpected[] = "syntax error, unexpected %s"; 957 static char const yyexpecting[] = ", expecting %s"; 958 static char const yyor[] = " or %s"; 959 char yyformat[sizeof yyunexpected 960 + sizeof yyexpecting - 1 961 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 962 * (sizeof yyor - 1))]; 963 char const *yyprefix = yyexpecting; 964 965 /* Start YYX at -YYN if negative to avoid negative indexes in 966 YYCHECK. */ 967 int yyxbegin = yyn < 0 ? -yyn : 0; 968 969 /* Stay within bounds of both yycheck and yytname. */ 970 int yychecklim = YYLAST - yyn + 1; 971 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 972 int yycount = 1; 973 974 yyarg[0] = yytname[yytype]; 975 yyfmt = yystpcpy (yyformat, yyunexpected); 976 977 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 978 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 979 { 980 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 981 { 982 yycount = 1; 983 yysize = yysize0; 984 yyformat[sizeof yyunexpected - 1] = '\0'; 985 break; 986 } 987 yyarg[yycount++] = yytname[yyx]; 988 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 989 yysize_overflow |= (yysize1 < yysize); 990 yysize = yysize1; 991 yyfmt = yystpcpy (yyfmt, yyprefix); 992 yyprefix = yyor; 993 } 994 995 yyf = YY_(yyformat); 996 yysize1 = yysize + yystrlen (yyf); 997 yysize_overflow |= (yysize1 < yysize); 887 int yyn = yypact[*yyssp]; 888 yyarg[yycount++] = yytname[yytoken]; 889 if (!yypact_value_is_default (yyn)) 890 { 891 /* Start YYX at -YYN if negative to avoid negative indexes in 892 YYCHECK. In other words, skip the first -YYN actions for 893 this state because they are default actions. */ 894 int yyxbegin = yyn < 0 ? -yyn : 0; 895 /* Stay within bounds of both yycheck and yytname. */ 896 int yychecklim = YYLAST - yyn + 1; 897 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 898 int yyx; 899 900 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 901 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 902 && !yytable_value_is_error (yytable[yyx + yyn])) 903 { 904 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 905 { 906 yycount = 1; 907 yysize = yysize0; 908 break; 909 } 910 yyarg[yycount++] = yytname[yyx]; 911 { 912 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); 913 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) 914 yysize = yysize1; 915 else 916 return 2; 917 } 918 } 919 } 920 } 921 922 switch (yycount) 923 { 924 # define YYCASE_(N, S) \ 925 case N: \ 926 yyformat = S; \ 927 break 928 default: /* Avoid compiler warnings. */ 929 YYCASE_(0, YY_("syntax error")); 930 YYCASE_(1, YY_("syntax error, unexpected %s")); 931 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 932 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 933 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 934 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 935 # undef YYCASE_ 936 } 937 938 { 939 YYSIZE_T yysize1 = yysize + yystrlen (yyformat); 940 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) 998 941 yysize = yysize1; 999 1000 if (yysize_overflow) 1001 return YYSIZE_MAXIMUM; 1002 1003 if (yyresult) 1004 { 1005 /* Avoid sprintf, as that infringes on the user's name space. 1006 Don't have undefined behavior even if the translation 1007 produced a string with the wrong number of "%s"s. */ 1008 char *yyp = yyresult; 1009 int yyi = 0; 1010 while ((*yyp = *yyf) != '\0') 1011 { 1012 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 1013 { 1014 yyp += yytnamerr (yyp, yyarg[yyi++]); 1015 yyf += 2; 1016 } 1017 else 1018 { 1019 yyp++; 1020 yyf++; 1021 } 1022 } 1023 } 1024 return yysize; 942 else 943 return 2; 944 } 945 946 if (*yymsg_alloc < yysize) 947 { 948 *yymsg_alloc = 2 * yysize; 949 if (! (yysize <= *yymsg_alloc 950 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 951 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 952 return 1; 1025 953 } 954 955 /* Avoid sprintf, as that infringes on the user's name space. 956 Don't have undefined behavior even if the translation 957 produced a string with the wrong number of "%s"s. */ 958 { 959 char *yyp = *yymsg; 960 int yyi = 0; 961 while ((*yyp = *yyformat) != '\0') 962 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 963 { 964 yyp += yytnamerr (yyp, yyarg[yyi++]); 965 yyformat += 2; 966 } 967 else 968 { 969 yyp++; 970 yyformat++; 971 } 972 } 973 return 0; 1026 974 } 1027 975 #endif /* YYERROR_VERBOSE */ 1028 1029 1030 976 1031 977 /*-----------------------------------------------. … … 1033 979 `-----------------------------------------------*/ 1034 980 1035 /*ARGSUSED*/1036 #if (defined __STDC__ || defined __C99__FUNC__ \1037 || defined __cplusplus || defined _MSC_VER)1038 981 static void 1039 982 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 1040 #else1041 static void1042 yydestruct (yymsg, yytype, yyvaluep)1043 const char *yymsg;1044 int yytype;1045 YYSTYPE *yyvaluep;1046 #endif1047 983 { 1048 984 YYUSE (yyvaluep); 1049 1050 985 if (!yymsg) 1051 986 yymsg = "Deleting"; 1052 987 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1053 988 1054 switch (yytype) 1055 { 1056 1057 default: 1058 break; 1059 } 1060 } 1061 1062 1063 1064 /* Prevent warnings from -Wmissing-prototypes. */ 1065 1066 #ifdef YYPARSE_PARAM 1067 #if defined __STDC__ || defined __cplusplus 1068 int yyparse (void *YYPARSE_PARAM); 1069 #else 1070 int yyparse (); 1071 #endif 1072 #else /* ! YYPARSE_PARAM */ 1073 #if defined __STDC__ || defined __cplusplus 1074 int yyparse (void); 1075 #else 1076 int yyparse (); 1077 #endif 1078 #endif /* ! YYPARSE_PARAM */ 1079 1080 1081 1082 /* The look-ahead symbol. */ 989 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 990 YYUSE (yytype); 991 YY_IGNORE_MAYBE_UNINITIALIZED_END 992 } 993 994 995 996 997 /* The lookahead symbol. */ 1083 998 int yychar; 1084 999 1085 /* The semantic value of the look -ahead symbol. */1000 /* The semantic value of the lookahead symbol. */ 1086 1001 YYSTYPE yylval; 1087 1088 1002 /* Number of syntax errors so far. */ 1089 1003 int yynerrs; 1090 1091 1004 1092 1005 … … 1095 1008 `----------*/ 1096 1009 1097 #ifdef YYPARSE_PARAM1098 #if (defined __STDC__ || defined __C99__FUNC__ \1099 || defined __cplusplus || defined _MSC_VER)1100 int1101 yyparse (void *YYPARSE_PARAM)1102 #else1103 int1104 yyparse (YYPARSE_PARAM)1105 void *YYPARSE_PARAM;1106 #endif1107 #else /* ! YYPARSE_PARAM */1108 #if (defined __STDC__ || defined __C99__FUNC__ \1109 || defined __cplusplus || defined _MSC_VER)1110 1010 int 1111 1011 yyparse (void) 1112 #else 1113 int 1114 yyparse () 1115 1116 #endif 1117 #endif 1118 { 1119 1120 int yystate; 1012 { 1013 int yystate; 1014 /* Number of tokens to shift before error messages enabled. */ 1015 int yyerrstatus; 1016 1017 /* The stacks and their tools: 1018 'yyss': related to states. 1019 'yyvs': related to semantic values. 1020 1021 Refer to the stacks through separate pointers, to allow yyoverflow 1022 to reallocate them elsewhere. */ 1023 1024 /* The state stack. */ 1025 yytype_int16 yyssa[YYINITDEPTH]; 1026 yytype_int16 *yyss; 1027 yytype_int16 *yyssp; 1028 1029 /* The semantic value stack. */ 1030 YYSTYPE yyvsa[YYINITDEPTH]; 1031 YYSTYPE *yyvs; 1032 YYSTYPE *yyvsp; 1033 1034 YYSIZE_T yystacksize; 1035 1121 1036 int yyn; 1122 1037 int yyresult; 1123 /* Number of tokens to shift before error messages enabled. */ 1124 int yyerrstatus; 1125 /* Look-ahead token as an internal (translated) token number. */ 1038 /* Lookahead token as an internal (translated) token number. */ 1126 1039 int yytoken = 0; 1040 /* The variables used to return semantic value and location from the 1041 action routines. */ 1042 YYSTYPE yyval; 1043 1127 1044 #if YYERROR_VERBOSE 1128 1045 /* Buffer for error messages, and its allocated size. */ … … 1132 1049 #endif 1133 1050 1134 /* Three stacks and their tools:1135 `yyss': related to states,1136 `yyvs': related to semantic values,1137 `yyls': related to locations.1138 1139 Refer to the stacks thru separate pointers, to allow yyoverflow1140 to reallocate them elsewhere. */1141 1142 /* The state stack. */1143 yytype_int16 yyssa[YYINITDEPTH];1144 yytype_int16 *yyss = yyssa;1145 yytype_int16 *yyssp;1146 1147 /* The semantic value stack. */1148 YYSTYPE yyvsa[YYINITDEPTH];1149 YYSTYPE *yyvs = yyvsa;1150 YYSTYPE *yyvsp;1151 1152 1153 1154 1051 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1155 1156 YYSIZE_T yystacksize = YYINITDEPTH;1157 1158 /* The variables used to return semantic value and location from the1159 action routines. */1160 YYSTYPE yyval;1161 1162 1052 1163 1053 /* The number of symbols on the RHS of the reduced rule. … … 1165 1055 int yylen = 0; 1166 1056 1057 yyssp = yyss = yyssa; 1058 yyvsp = yyvs = yyvsa; 1059 yystacksize = YYINITDEPTH; 1060 1167 1061 YYDPRINTF ((stderr, "Starting parse\n")); 1168 1062 … … 1170 1064 yyerrstatus = 0; 1171 1065 yynerrs = 0; 1172 yychar = YYEMPTY; /* Cause a token to be read. */ 1173 1174 /* Initialize stack pointers. 1175 Waste one element of value and location stack 1176 so that they stay on the same level as the state stack. 1177 The wasted elements are never initialized. */ 1178 1179 yyssp = yyss; 1180 yyvsp = yyvs; 1181 1066 yychar = YYEMPTY; /* Cause a token to be read. */ 1182 1067 goto yysetstate; 1183 1068 1069 1184 1070 /*------------------------------------------------------------. 1185 | yynewstate -- Push a new state, which is found in yystate. |1071 | yynewstate -- push a new state, which is found in yystate. | 1186 1072 `------------------------------------------------------------*/ 1187 1073 yynewstate: 1188 1074 /* In all cases, when you get here, the value and location stacks 1189 1075 have just been pushed. So pushing a state here evens the stacks. */ 1190 1076 yyssp++; 1191 1077 1192 yysetstate: 1193 *yyssp = yystate; 1078 1079 /*--------------------------------------------------------------------. 1080 | yynewstate -- set current state (the top of the stack) to yystate. | 1081 `--------------------------------------------------------------------*/ 1082 yysetstate: 1083 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1084 YY_ASSERT (0 <= yystate && yystate < YYNSTATES); 1085 *yyssp = (yytype_int16) yystate; 1194 1086 1195 1087 if (yyss + yystacksize - 1 <= yyssp) 1088 #if !defined yyoverflow && !defined YYSTACK_RELOCATE 1089 goto yyexhaustedlab; 1090 #else 1196 1091 { 1197 1092 /* Get the current used size of the three stacks, in elements. */ 1198 YYSIZE_T yysize = yyssp - yyss + 1;1199 1200 # ifdefyyoverflow1093 YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1); 1094 1095 # if defined yyoverflow 1201 1096 { 1202 /* Give user a chance to reallocate the stack. Use copies of 1203 these so that the &'s don't force the real ones into 1204 memory. */ 1205 YYSTYPE *yyvs1 = yyvs; 1206 yytype_int16 *yyss1 = yyss; 1207 1208 1209 /* Each stack pointer address is followed by the size of the 1210 data in use in that stack, in bytes. This used to be a 1211 conditional around just the two extra args, but that might 1212 be undefined if yyoverflow is a macro. */ 1213 yyoverflow (YY_("memory exhausted"), 1214 &yyss1, yysize * sizeof (*yyssp), 1215 &yyvs1, yysize * sizeof (*yyvsp), 1216 1217 &yystacksize); 1218 1219 yyss = yyss1; 1220 yyvs = yyvs1; 1097 /* Give user a chance to reallocate the stack. Use copies of 1098 these so that the &'s don't force the real ones into 1099 memory. */ 1100 YYSTYPE *yyvs1 = yyvs; 1101 yytype_int16 *yyss1 = yyss; 1102 1103 /* Each stack pointer address is followed by the size of the 1104 data in use in that stack, in bytes. This used to be a 1105 conditional around just the two extra args, but that might 1106 be undefined if yyoverflow is a macro. */ 1107 yyoverflow (YY_("memory exhausted"), 1108 &yyss1, yysize * sizeof (*yyssp), 1109 &yyvs1, yysize * sizeof (*yyvsp), 1110 &yystacksize); 1111 yyss = yyss1; 1112 yyvs = yyvs1; 1221 1113 } 1222 #else /* no yyoverflow */ 1223 # ifndef YYSTACK_RELOCATE 1224 goto yyexhaustedlab; 1225 # else 1114 # else /* defined YYSTACK_RELOCATE */ 1226 1115 /* Extend the stack our own way. */ 1227 1116 if (YYMAXDEPTH <= yystacksize) 1228 1117 goto yyexhaustedlab; 1229 1118 yystacksize *= 2; 1230 1119 if (YYMAXDEPTH < yystacksize) 1231 1120 yystacksize = YYMAXDEPTH; 1232 1121 1233 1122 { 1234 yytype_int16 *yyss1 = yyss; 1235 union yyalloc *yyptr = 1236 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1237 if (! yyptr) 1238 goto yyexhaustedlab; 1239 YYSTACK_RELOCATE (yyss); 1240 YYSTACK_RELOCATE (yyvs); 1241 1242 # undef YYSTACK_RELOCATE 1243 if (yyss1 != yyssa) 1244 YYSTACK_FREE (yyss1); 1123 yytype_int16 *yyss1 = yyss; 1124 union yyalloc *yyptr = 1125 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 1126 if (! yyptr) 1127 goto yyexhaustedlab; 1128 YYSTACK_RELOCATE (yyss_alloc, yyss); 1129 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1130 # undef YYSTACK_RELOCATE 1131 if (yyss1 != yyssa) 1132 YYSTACK_FREE (yyss1); 1245 1133 } 1246 1134 # endif 1247 #endif /* no yyoverflow */1248 1135 1249 1136 yyssp = yyss + yysize - 1; 1250 1137 yyvsp = yyvs + yysize - 1; 1251 1138 1252 1253 1139 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1254 (unsigned long int) yystacksize));1140 (unsigned long) yystacksize)); 1255 1141 1256 1142 if (yyss + yystacksize - 1 <= yyssp) 1257 1143 YYABORT; 1258 1144 } 1259 1260 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1145 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ 1146 1147 if (yystate == YYFINAL) 1148 YYACCEPT; 1261 1149 1262 1150 goto yybackup; 1151 1263 1152 1264 1153 /*-----------. … … 1266 1155 `-----------*/ 1267 1156 yybackup: 1268 1269 1157 /* Do appropriate processing given the current state. Read a 1270 look -ahead token if we need one and don't already have one. */1271 1272 /* First try to decide what to do without reference to look -ahead token. */1158 lookahead token if we need one and don't already have one. */ 1159 1160 /* First try to decide what to do without reference to lookahead token. */ 1273 1161 yyn = yypact[yystate]; 1274 if (yy n == YYPACT_NINF)1162 if (yypact_value_is_default (yyn)) 1275 1163 goto yydefault; 1276 1164 1277 /* Not known => get a look -ahead token if don't already have one. */1278 1279 /* YYCHAR is either YYEMPTY or YYEOF or a valid look -ahead symbol. */1165 /* Not known => get a lookahead token if don't already have one. */ 1166 1167 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 1280 1168 if (yychar == YYEMPTY) 1281 1169 { 1282 1170 YYDPRINTF ((stderr, "Reading a token: ")); 1283 yychar = YYLEX;1171 yychar = yylex (); 1284 1172 } 1285 1173 … … 1303 1191 if (yyn <= 0) 1304 1192 { 1305 if (yy n == 0 || yyn == YYTABLE_NINF)1306 1193 if (yytable_value_is_error (yyn)) 1194 goto yyerrlab; 1307 1195 yyn = -yyn; 1308 1196 goto yyreduce; 1309 1197 } 1310 1311 if (yyn == YYFINAL)1312 YYACCEPT;1313 1198 1314 1199 /* Count tokens shifted since error; after three, turn off error … … 1317 1202 yyerrstatus--; 1318 1203 1319 /* Shift the look -ahead token. */1204 /* Shift the lookahead token. */ 1320 1205 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1321 1206 1322 /* Discard the shifted token unless it is eof. */ 1323 if (yychar != YYEOF) 1324 yychar = YYEMPTY; 1207 /* Discard the shifted token. */ 1208 yychar = YYEMPTY; 1325 1209 1326 1210 yystate = yyn; 1211 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1327 1212 *++yyvsp = yylval; 1328 1213 YY_IGNORE_MAYBE_UNINITIALIZED_END 1329 1214 goto yynewstate; 1330 1215 … … 1341 1226 1342 1227 /*-----------------------------. 1343 | yyreduce -- Do a reduction. |1228 | yyreduce -- do a reduction. | 1344 1229 `-----------------------------*/ 1345 1230 yyreduce: … … 1348 1233 1349 1234 /* If YYLEN is nonzero, implement the default value of the action: 1350 `$$ = $1'.1235 '$$ = $1'. 1351 1236 1352 1237 Otherwise, the following line sets YYVAL to garbage. … … 1361 1246 switch (yyn) 1362 1247 { 1363 1248 case 5: 1364 1249 #line 76 "convert.y" 1365 { initdimprob(1,(yyvsp[(2) - (3)].na),"0","0"); ;} 1250 { initdimprob(1,(yyvsp[-1].na),"0","0"); } 1251 #line 1252 "convert.tab.c" 1366 1252 break; 1367 1253 1368 1254 case 6: 1369 1255 #line 77 "convert.y" 1370 { initdimprob(2,(yyvsp[(2) - (5)].na), (yyvsp[(4) - (5)].na),"0"); ;} 1256 { initdimprob(2,(yyvsp[-3].na), (yyvsp[-1].na),"0"); } 1257 #line 1258 "convert.tab.c" 1371 1258 break; 1372 1259 1373 1260 case 7: 1374 1261 #line 78 "convert.y" 1375 { initdimprob(3,(yyvsp[(2) - (7)].na), (yyvsp[(4) - (7)].na), (yyvsp[(6) - (7)].na)); ;} 1262 { initdimprob(3,(yyvsp[-5].na), (yyvsp[-3].na), (yyvsp[-1].na)); } 1263 #line 1264 "convert.tab.c" 1376 1264 break; 1377 1265 … … 1379 1267 #line 80 "convert.y" 1380 1268 { 1381 listofmodules = Addtolistnom((yyvsp[(2) - (3)].na),listofmodules,0); 1382 Addmoduletothelist((yyvsp[(2) - (3)].na)); 1383 ;} 1269 listofmodules = Addtolistnom((yyvsp[-1].na),listofmodules,0); 1270 Addmoduletothelist((yyvsp[-1].na)); 1271 } 1272 #line 1273 "convert.tab.c" 1384 1273 break; 1385 1274 … … 1387 1276 #line 85 "convert.y" 1388 1277 { 1389 if (!strcasecmp((yyvsp[ (4) - (5)].na),"4"))1278 if (!strcasecmp((yyvsp[-1].na),"4")) 1390 1279 { 1391 listofkind = Addtolistnom((yyvsp[ (2) - (5)].na),listofkind,4);1280 listofkind = Addtolistnom((yyvsp[-3].na),listofkind,4); 1392 1281 } 1393 else if (!strcasecmp((yyvsp[ (4) - (5)].na),"8"))1282 else if (!strcasecmp((yyvsp[-1].na),"8")) 1394 1283 { 1395 listofkind = Addtolistnom((yyvsp[ (2) - (5)].na),listofkind,8);1284 listofkind = Addtolistnom((yyvsp[-3].na),listofkind,8); 1396 1285 } 1397 1286 else 1398 1287 { 1399 printf("##\n## Unknown kind type : %s (must be 4 or 8)\n##",(yyvsp[ (4) - (5)].na));1288 printf("##\n## Unknown kind type : %s (must be 4 or 8)\n##",(yyvsp[-1].na)); 1400 1289 exit(0); 1401 1290 } 1402 ;} 1291 } 1292 #line 1293 "convert.tab.c" 1403 1293 break; 1404 1294 … … 1406 1296 #line 101 "convert.y" 1407 1297 { 1408 Add_NotGridDepend_Var_1((yyvsp[(3) - (4)].na)); 1409 ;} 1298 Add_NotGridDepend_Var_1((yyvsp[-1].na)); 1299 } 1300 #line 1301 "convert.tab.c" 1410 1301 break; 1411 1302 … … 1413 1304 #line 105 "convert.y" 1414 1305 { 1415 if (!strcasecmp((yyvsp[(2) - (3)].na),"FIXED_GRIDS")) fixedgrids = 1; 1416 if (!strcasecmp((yyvsp[(2) - (3)].na),"ONLY_FIXED_GRIDS")) onlyfixedgrids = 1; 1417 ;} 1306 if (!strcasecmp((yyvsp[-1].na),"FIXED_GRIDS")) fixedgrids = 1; 1307 if (!strcasecmp((yyvsp[-1].na),"ONLY_FIXED_GRIDS")) onlyfixedgrids = 1; 1308 } 1309 #line 1310 "convert.tab.c" 1418 1310 break; 1419 1311 1420 1312 1421 /* Line 1267 of yacc.c. */ 1422 #line 1420 "convert.tab.c" 1313 #line 1314 "convert.tab.c" 1314 1423 1315 default: break; 1424 1316 } 1317 /* User semantic actions sometimes alter yychar, and that requires 1318 that yytoken be updated with the new translation. We take the 1319 approach of translating immediately before every use of yytoken. 1320 One alternative is translating here after every semantic action, 1321 but that translation would be missed if the semantic action invokes 1322 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 1323 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 1324 incorrect destructor might then be invoked immediately. In the 1325 case of YYERROR or YYBACKUP, subsequent parser actions might lead 1326 to an incorrect destructor call or verbose syntax error message 1327 before the lookahead is translated. */ 1425 1328 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 1426 1329 … … 1431 1334 *++yyvsp = yyval; 1432 1335 1433 1434 /* Now `shift' the result of the reduction. Determine what state 1336 /* Now 'shift' the result of the reduction. Determine what state 1435 1337 that goes to, based on the state we popped back to and the rule 1436 1338 number reduced by. */ 1437 1438 yyn = yyr1[yyn]; 1439 1440 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 1441 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 1442 yystate = yytable[yystate]; 1443 else 1444 yystate = yydefgoto[yyn - YYNTOKENS]; 1339 { 1340 const int yylhs = yyr1[yyn] - YYNTOKENS; 1341 const int yyi = yypgoto[yylhs] + *yyssp; 1342 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp 1343 ? yytable[yyi] 1344 : yydefgoto[yylhs]); 1345 } 1445 1346 1446 1347 goto yynewstate; 1447 1348 1448 1349 1449 /*------------------------------------ .1450 | yyerrlab -- here on detecting error |1451 `------------------------------------ */1350 /*--------------------------------------. 1351 | yyerrlab -- here on detecting error. | 1352 `--------------------------------------*/ 1452 1353 yyerrlab: 1354 /* Make sure we have latest lookahead translation. See comments at 1355 user semantic actions for why this is necessary. */ 1356 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 1357 1453 1358 /* If not already recovering from an error, report this error. */ 1454 1359 if (!yyerrstatus) … … 1458 1363 yyerror (YY_("syntax error")); 1459 1364 #else 1365 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 1366 yyssp, yytoken) 1460 1367 { 1461 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 1462 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 1463 { 1464 YYSIZE_T yyalloc = 2 * yysize; 1465 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 1466 yyalloc = YYSTACK_ALLOC_MAXIMUM; 1467 if (yymsg != yymsgbuf) 1468 YYSTACK_FREE (yymsg); 1469 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 1470 if (yymsg) 1471 yymsg_alloc = yyalloc; 1472 else 1473 { 1474 yymsg = yymsgbuf; 1475 yymsg_alloc = sizeof yymsgbuf; 1476 } 1477 } 1478 1479 if (0 < yysize && yysize <= yymsg_alloc) 1480 { 1481 (void) yysyntax_error (yymsg, yystate, yychar); 1482 yyerror (yymsg); 1483 } 1484 else 1485 { 1486 yyerror (YY_("syntax error")); 1487 if (yysize != 0) 1488 goto yyexhaustedlab; 1489 } 1368 char const *yymsgp = YY_("syntax error"); 1369 int yysyntax_error_status; 1370 yysyntax_error_status = YYSYNTAX_ERROR; 1371 if (yysyntax_error_status == 0) 1372 yymsgp = yymsg; 1373 else if (yysyntax_error_status == 1) 1374 { 1375 if (yymsg != yymsgbuf) 1376 YYSTACK_FREE (yymsg); 1377 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 1378 if (!yymsg) 1379 { 1380 yymsg = yymsgbuf; 1381 yymsg_alloc = sizeof yymsgbuf; 1382 yysyntax_error_status = 2; 1383 } 1384 else 1385 { 1386 yysyntax_error_status = YYSYNTAX_ERROR; 1387 yymsgp = yymsg; 1388 } 1389 } 1390 yyerror (yymsgp); 1391 if (yysyntax_error_status == 2) 1392 goto yyexhaustedlab; 1490 1393 } 1394 # undef YYSYNTAX_ERROR 1491 1395 #endif 1492 1396 } … … 1496 1400 if (yyerrstatus == 3) 1497 1401 { 1498 /* If just tried and failed to reuse look -ahead token after an1499 1402 /* If just tried and failed to reuse lookahead token after an 1403 error, discard it. */ 1500 1404 1501 1405 if (yychar <= YYEOF) 1502 1503 1504 1505 1506 1406 { 1407 /* Return failure if at end of input. */ 1408 if (yychar == YYEOF) 1409 YYABORT; 1410 } 1507 1411 else 1508 1509 1510 1511 1512 1412 { 1413 yydestruct ("Error: discarding", 1414 yytoken, &yylval); 1415 yychar = YYEMPTY; 1416 } 1513 1417 } 1514 1418 1515 /* Else will try to reuse look -ahead token after shifting the error1419 /* Else will try to reuse lookahead token after shifting the error 1516 1420 token. */ 1517 1421 goto yyerrlab1; … … 1522 1426 `---------------------------------------------------*/ 1523 1427 yyerrorlab: 1524 1525 /* Pacify compilers like GCC when the user code never invokes 1526 YYERROR and the label yyerrorlab therefore never appears in user 1527 code. */ 1528 if (/*CONSTCOND*/ 0) 1529 goto yyerrorlab; 1530 1531 /* Do not reclaim the symbols of the rule which action triggered 1428 /* Pacify compilers when the user code never invokes YYERROR and the 1429 label yyerrorlab therefore never appears in user code. */ 1430 if (0) 1431 YYERROR; 1432 1433 /* Do not reclaim the symbols of the rule whose action triggered 1532 1434 this YYERROR. */ 1533 1435 YYPOPSTACK (yylen); … … 1542 1444 `-------------------------------------------------------------*/ 1543 1445 yyerrlab1: 1544 yyerrstatus = 3; 1446 yyerrstatus = 3; /* Each real token shifted decrements this. */ 1545 1447 1546 1448 for (;;) 1547 1449 { 1548 1450 yyn = yypact[yystate]; 1549 if ( yyn != YYPACT_NINF)1550 1551 1552 1553 1554 1555 1556 1557 1558 1451 if (!yypact_value_is_default (yyn)) 1452 { 1453 yyn += YYTERROR; 1454 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 1455 { 1456 yyn = yytable[yyn]; 1457 if (0 < yyn) 1458 break; 1459 } 1460 } 1559 1461 1560 1462 /* Pop the current state because it cannot handle the error token. */ 1561 1463 if (yyssp == yyss) 1562 1464 YYABORT; 1563 1465 1564 1466 1565 1467 yydestruct ("Error: popping", 1566 1468 yystos[yystate], yyvsp); 1567 1469 YYPOPSTACK (1); 1568 1470 yystate = *yyssp; … … 1570 1472 } 1571 1473 1572 if (yyn == YYFINAL) 1573 YYACCEPT; 1574 1474 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1575 1475 *++yyvsp = yylval; 1476 YY_IGNORE_MAYBE_UNINITIALIZED_END 1576 1477 1577 1478 … … 1590 1491 goto yyreturn; 1591 1492 1493 1592 1494 /*-----------------------------------. 1593 1495 | yyabortlab -- YYABORT comes here. | … … 1597 1499 goto yyreturn; 1598 1500 1599 #ifndef yyoverflow 1501 1502 #if !defined yyoverflow || YYERROR_VERBOSE 1600 1503 /*-------------------------------------------------. 1601 1504 | yyexhaustedlab -- memory exhaustion comes here. | … … 1607 1510 #endif 1608 1511 1512 1513 /*-----------------------------------------------------. 1514 | yyreturn -- parsing is finished, return the result. | 1515 `-----------------------------------------------------*/ 1609 1516 yyreturn: 1610 if (yychar != YYEOF && yychar != YYEMPTY) 1611 yydestruct ("Cleanup: discarding lookahead", 1612 yytoken, &yylval); 1613 /* Do not reclaim the symbols of the rule which action triggered 1517 if (yychar != YYEMPTY) 1518 { 1519 /* Make sure we have latest lookahead translation. See comments at 1520 user semantic actions for why this is necessary. */ 1521 yytoken = YYTRANSLATE (yychar); 1522 yydestruct ("Cleanup: discarding lookahead", 1523 yytoken, &yylval); 1524 } 1525 /* Do not reclaim the symbols of the rule whose action triggered 1614 1526 this YYABORT or YYACCEPT. */ 1615 1527 YYPOPSTACK (yylen); … … 1618 1530 { 1619 1531 yydestruct ("Cleanup: popping", 1620 1532 yystos[*yyssp], yyvsp); 1621 1533 YYPOPSTACK (1); 1622 1534 } … … 1629 1541 YYSTACK_FREE (yymsg); 1630 1542 #endif 1631 /* Make sure YYID is used. */ 1632 return YYID (yyresult); 1633 } 1634 1635 1543 return yyresult; 1544 } 1636 1545 #line 110 "convert.y" 1637 1546 … … 1989 1898 return 0; 1990 1899 } 1991 1992 1900 #line 2 "convert.yy.c" 1993 1901 … … 2058 1966 typedef int32_t flex_int32_t; 2059 1967 typedef uint32_t flex_uint32_t; 2060 typedef uint64_t flex_uint64_t;2061 1968 #else 2062 1969 typedef signed char flex_int8_t; … … 2165 2072 #endif 2166 2073 2167 #ifndef YY_TYPEDEF_YY_SIZE_T 2168 #define YY_TYPEDEF_YY_SIZE_T 2169 typedef size_t yy_size_t; 2170 #endif 2171 2172 extern yy_size_t convert_leng; 2074 extern int convert_leng; 2173 2075 2174 2076 extern FILE *convert_in, *convert_out; … … 2196 2098 #define unput(c) yyunput( c, (yytext_ptr) ) 2197 2099 2100 #ifndef YY_TYPEDEF_YY_SIZE_T 2101 #define YY_TYPEDEF_YY_SIZE_T 2102 typedef size_t yy_size_t; 2103 #endif 2104 2198 2105 #ifndef YY_STRUCT_YY_BUFFER_STATE 2199 2106 #define YY_STRUCT_YY_BUFFER_STATE … … 2213 2120 * characters. 2214 2121 */ 2215 yy_size_t yy_n_chars;2122 int yy_n_chars; 2216 2123 2217 2124 /* Whether we "own" the buffer - i.e., we know we created it, … … 2283 2190 /* yy_hold_char holds the character lost when convert_text is formed. */ 2284 2191 static char yy_hold_char; 2285 static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */2286 yy_size_t convert_leng;2192 static int yy_n_chars; /* number of characters read into yy_ch_buf */ 2193 int convert_leng; 2287 2194 2288 2195 /* Points to current character in buffer. */ … … 2312 2219 YY_BUFFER_STATE convert__scan_buffer (char *base,yy_size_t size ); 2313 2220 YY_BUFFER_STATE convert__scan_string (yyconst char *yy_str ); 2314 YY_BUFFER_STATE convert__scan_bytes (yyconst char *bytes, yy_size_t len );2221 YY_BUFFER_STATE convert__scan_bytes (yyconst char *bytes,int len ); 2315 2222 2316 2223 void *convert_alloc (yy_size_t ); … … 2370 2277 #define YY_DO_BEFORE_ACTION \ 2371 2278 (yytext_ptr) = yy_bp; \ 2372 convert_leng = ( yy_size_t) (yy_cp - yy_bp); \2279 convert_leng = (size_t) (yy_cp - yy_bp); \ 2373 2280 (yy_hold_char) = *yy_cp; \ 2374 2281 *yy_cp = '\0'; \ … … 2583 2490 2584 2491 #define YY_NO_INPUT 2585 #line 59 5"convert.yy.c"2492 #line 594 "convert.yy.c" 2586 2493 2587 2494 #define INITIAL 0 … … 2623 2530 void convert_set_out (FILE * out_str ); 2624 2531 2625 yy_size_t convert_get_leng (void );2532 int convert_get_leng (void ); 2626 2533 2627 2534 char *convert_get_text (void ); … … 2673 2580 * we now use fwrite(). 2674 2581 */ 2675 #define ECHO fwrite( convert_text, convert_leng, 1, convert_out)2582 #define ECHO do { if (fwrite( convert_text, convert_leng, 1, convert_out )) {} } while (0) 2676 2583 #endif 2677 2584 … … 2684 2591 { \ 2685 2592 int c = '*'; \ 2686 yy_size_tn; \2593 unsigned n; \ 2687 2594 for ( n = 0; n < max_size && \ 2688 2595 (c = getc( convert_in )) != EOF && c != '\n'; ++n ) \ … … 2768 2675 #line 54 "convert.lex" 2769 2676 2770 #line 7 80"convert.yy.c"2677 #line 779 "convert.yy.c" 2771 2678 2772 2679 if ( !(yy_init) ) … … 2927 2834 ECHO; 2928 2835 YY_BREAK 2929 #line 93 9"convert.yy.c"2836 #line 938 "convert.yy.c" 2930 2837 case YY_STATE_EOF(INITIAL): 2931 2838 case YY_STATE_EOF(character): … … 3114 3021 else 3115 3022 { 3116 yy_size_t num_to_read =3023 int num_to_read = 3117 3024 YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 3118 3025 … … 3128 3035 if ( b->yy_is_our_buffer ) 3129 3036 { 3130 yy_size_t new_size = b->yy_buf_size * 2;3037 int new_size = b->yy_buf_size * 2; 3131 3038 3132 3039 if ( new_size <= 0 ) … … 3159 3066 /* Read in more data. */ 3160 3067 YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 3161 (yy_n_chars), num_to_read );3068 (yy_n_chars), (size_t) num_to_read ); 3162 3069 3163 3070 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); … … 3269 3176 { /* need to shift things up to make room */ 3270 3177 /* +2 for EOB chars. */ 3271 register yy_size_t number_to_move = (yy_n_chars) + 2;3178 register int number_to_move = (yy_n_chars) + 2; 3272 3179 register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 3273 3180 YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; … … 3318 3225 else 3319 3226 { /* need more input */ 3320 yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);3227 int offset = (yy_c_buf_p) - (yytext_ptr); 3321 3228 ++(yy_c_buf_p); 3322 3229 … … 3342 3249 { 3343 3250 if ( convert_wrap( ) ) 3344 return 0;3251 return EOF; 3345 3252 3346 3253 if ( ! (yy_did_buffer_switch_on_eof) ) … … 3594 3501 static void convert_ensure_buffer_stack (void) 3595 3502 { 3596 yy_size_t num_to_alloc;3503 int num_to_alloc; 3597 3504 3598 3505 if (!(yy_buffer_stack)) { … … 3691 3598 * @return the newly allocated buffer state object. 3692 3599 */ 3693 YY_BUFFER_STATE convert__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )3600 YY_BUFFER_STATE convert__scan_bytes (yyconst char * yybytes, int _yybytes_len ) 3694 3601 { 3695 3602 YY_BUFFER_STATE b; 3696 3603 char *buf; 3697 yy_size_t n, i; 3604 yy_size_t n; 3605 int i; 3698 3606 3699 3607 /* Get memory for full buffer, including space for trailing EOB's. */ … … 3777 3685 * 3778 3686 */ 3779 yy_size_t convert_get_leng (void)3687 int convert_get_leng (void) 3780 3688 { 3781 3689 return convert_leng;
Note: See TracChangeset
for help on using the changeset viewer.