Changeset 4147 for branches/2013/dev_LOCEAN_2013/NEMOGCM/EXTERNAL/AGRIF
- Timestamp:
- 2013-11-04T12:51:55+01:00 (11 years ago)
- Location:
- branches/2013/dev_LOCEAN_2013/NEMOGCM/EXTERNAL/AGRIF/LIB
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2013/dev_LOCEAN_2013/NEMOGCM/EXTERNAL/AGRIF/LIB/SubLoopCreation.c
r2715 r4147 102 102 if ( mark == 1 ) fprintf(fortranout,"!!! aaaaaaaaaaaaaaa \n"); 103 103 WriteLocalParamDeclaration(); 104 if ( mark == 1 ) fprintf(fortranout,"!!! bbbbbbbbbbbbbbb \n"); 104 if ( mark == 1 ) fprintf(fortranout,"!!! bbbbbbbbbbbbbbb \n"); 105 WriteArgumentDeclaration_beforecall(); 106 if ( mark == 1 ) fprintf(fortranout,"!!! bbbbbbccccccccc \n"); 105 107 if ( functiondeclarationisdone == 0 ) WriteFunctionDeclaration(1); 106 if ( mark == 1 ) fprintf(fortranout,"!!! bbbbbbccccccccc \n");107 WriteArgumentDeclaration_beforecall();108 108 /* writesub_loopdeclaration_scalar(List_SubroutineArgument_Var,fortranout); 109 109 writesub_loopdeclaration_tab(List_SubroutineArgument_Var,fortranout);*/ … … 405 405 406 406 AddUseAgrifUtilBeforeCall_0(fortranout); 407 WriteArgumentDeclaration_beforecall(); 407 408 if ( functiondeclarationisdone == 0 ) WriteFunctionDeclaration(0); 408 WriteArgumentDeclaration_beforecall();409 409 if ( !strcasecmp(subofagrifinitgrids,subroutinename) ) 410 410 fprintf(oldfortranout," Call Agrif_Init_Grids () \n"); … … 462 462 " IMPLICIT NONE\n"); 463 463 WriteLocalParamDeclaration(); 464 WriteArgumentDeclaration_beforecall(); 464 465 if ( functiondeclarationisdone == 0 ) WriteFunctionDeclaration(0); 465 WriteArgumentDeclaration_beforecall();466 466 WriteSubroutineDeclaration(0); 467 467 if ( !strcasecmp(subofagrifinitgrids,subroutinename) ) -
branches/2013/dev_LOCEAN_2013/NEMOGCM/EXTERNAL/AGRIF/LIB/main.c
r3294 r4147 1 /* A Bison parser, made by GNU Bison 2.3. */ 2 3 /* Skeleton implementation for Bison's Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 6 Free Software Foundation, Inc. 7 8 This program is free software; you can redistribute it and/or modify 1 /* A Bison parser, made by GNU Bison 2.7.12-4996. */ 2 3 /* Bison implementation for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. 6 7 This program is free software: you can redistribute it and/or modify 9 8 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.12 9 the Free Software Foundation, either version 3 of the License, or 10 (at your option) any later version. 11 13 12 This program is distributed in the hope that it will be useful, 14 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 15 GNU General Public License for more details. 17 16 18 17 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. */ 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 22 19 23 20 /* As a special exception, you may create a larger work that contains … … 30 27 Bison output files to be licensed under the GNU General Public 31 28 License without this special exception. 32 29 33 30 This special exception was added by the Free Software Foundation in 34 31 version 2.2 of Bison. */ … … 48 45 49 46 /* Bison version. */ 50 #define YYBISON_VERSION "2. 3"47 #define YYBISON_VERSION "2.7.12-4996" 51 48 52 49 /* Skeleton name. */ … … 56 53 #define YYPURE 0 57 54 58 /* Using locations. */ 59 #define YYLSP_NEEDED 0 60 61 55 /* Push parsers. */ 56 #define YYPUSH 0 57 58 /* Pull parsers. */ 59 #define YYPULL 1 60 61 62 63 64 /* Copy the first part of user declarations. */ 65 /* Line 371 of yacc.c */ 66 #line 35 "convert.y" 67 68 #include <stdlib.h> 69 #include <stdio.h> 70 #include <string.h> 71 #include "decl.h" 72 73 /* Line 371 of yacc.c */ 74 #line 75 "convert.tab.c" 75 76 # ifndef YY_NULL 77 # if defined __cplusplus && 201103L <= __cplusplus 78 # define YY_NULL nullptr 79 # else 80 # define YY_NULL 0 81 # endif 82 # endif 83 84 /* Enabling verbose error messages. */ 85 #ifdef YYERROR_VERBOSE 86 # undef YYERROR_VERBOSE 87 # define YYERROR_VERBOSE 1 88 #else 89 # define YYERROR_VERBOSE 0 90 #endif 91 92 93 /* Enabling traces. */ 94 #ifndef YYDEBUG 95 # define YYDEBUG 0 96 #endif 97 #if YYDEBUG 98 extern int yydebug; 99 #endif 62 100 63 101 /* Tokens. */ … … 76 114 }; 77 115 #endif 78 /* Tokens. */ 79 #define TOK_SEP 258 80 #define TOK_USE 259 81 #define TOK_MODULEMAIN 260 82 #define TOK_NOTGRIDDEP 261 83 #define TOK_USEITEM 262 84 #define TOK_NAME 263 85 #define TOK_PROBTYPE 264 86 87 88 89 90 /* Copy the first part of user declarations. */ 91 #line 35 "convert.y" 92 93 #include <stdlib.h> 94 #include <stdio.h> 95 #include <string.h> 96 #include "decl.h" 97 98 99 /* Enabling traces. */ 100 #ifndef YYDEBUG 101 # define YYDEBUG 0 102 #endif 103 104 /* Enabling verbose error messages. */ 105 #ifdef YYERROR_VERBOSE 106 # undef YYERROR_VERBOSE 107 # define YYERROR_VERBOSE 1 108 #else 109 # define YYERROR_VERBOSE 0 110 #endif 111 112 /* Enabling the token table. */ 113 #ifndef YYTOKEN_TABLE 114 # define YYTOKEN_TABLE 0 115 #endif 116 116 117 117 118 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 118 119 typedef union YYSTYPE 120 { 121 /* Line 387 of yacc.c */ 119 122 #line 42 "convert.y" 120 { 123 121 124 int ival; 122 125 char na[LONG_C]; 123 126 listnom * ln; 124 } 125 /* Line 193 of yacc.c. */ 126 #line 127 "convert.tab.c" 127 YYSTYPE; 127 128 129 /* Line 387 of yacc.c */ 130 #line 131 "convert.tab.c" 131 } YYSTYPE; 132 # define YYSTYPE_IS_TRIVIAL 1 128 133 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 129 134 # define YYSTYPE_IS_DECLARED 1 130 # define YYSTYPE_IS_TRIVIAL 1 131 #endif 135 #endif 136 137 extern YYSTYPE yylval; 138 139 #ifdef YYPARSE_PARAM 140 #if defined __STDC__ || defined __cplusplus 141 int yyparse (void *YYPARSE_PARAM); 142 #else 143 int yyparse (); 144 #endif 145 #else /* ! YYPARSE_PARAM */ 146 #if defined __STDC__ || defined __cplusplus 147 int yyparse (void); 148 #else 149 int yyparse (); 150 #endif 151 #endif /* ! YYPARSE_PARAM */ 132 152 133 153 … … 135 155 /* Copy the second part of user declarations. */ 136 156 137 138 /* Line 216 of yacc.c. */ 139 #line 140 "convert.tab.c" 157 /* Line 390 of yacc.c */ 158 #line 159 "convert.tab.c" 140 159 141 160 #ifdef short … … 190 209 # if ENABLE_NLS 191 210 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 192 # define YY_( msgid) dgettext ("bison-runtime", msgid)211 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 193 212 # endif 194 213 # endif 195 214 # ifndef YY_ 196 # define YY_(msgid) msgid 215 # define YY_(Msgid) Msgid 216 # endif 217 #endif 218 219 #ifndef __attribute__ 220 /* This feature is available in gcc versions 2.5 and later. */ 221 # if (! defined __GNUC__ || __GNUC__ < 2 \ 222 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) 223 # define __attribute__(Spec) /* empty */ 197 224 # endif 198 225 #endif … … 200 227 /* Suppress unused-variable warnings by "using" E. */ 201 228 #if ! defined lint || defined __GNUC__ 202 # define YYUSE( e) ((void) (e))229 # define YYUSE(E) ((void) (E)) 203 230 #else 204 # define YYUSE(e) /* empty */ 205 #endif 231 # define YYUSE(E) /* empty */ 232 #endif 233 206 234 207 235 /* Identity function, used to suppress warnings about constant conditions. */ 208 236 #ifndef lint 209 # define YYID( n) (n)237 # define YYID(N) (N) 210 238 #else 211 239 #if (defined __STDC__ || defined __C99__FUNC__ \ 212 240 || defined __cplusplus || defined _MSC_VER) 213 241 static int 214 YYID (int i)242 YYID (int yyi) 215 243 #else 216 244 static int 217 YYID ( i)218 int i;219 #endif 220 { 221 return i;245 YYID (yyi) 246 int yyi; 247 #endif 248 { 249 return yyi; 222 250 } 223 251 #endif … … 240 268 # else 241 269 # define YYSTACK_ALLOC alloca 242 # if ! defined _ALLOCA_H && ! defined _STDLIB_H&& (defined __STDC__ || defined __C99__FUNC__ \270 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 243 271 || defined __cplusplus || defined _MSC_VER) 244 272 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 245 # ifndef _STDLIB_H 246 # define _STDLIB_H 1 273 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 274 # ifndef EXIT_SUCCESS 275 # define EXIT_SUCCESS 0 247 276 # endif 248 277 # endif … … 267 296 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 268 297 # endif 269 # if (defined __cplusplus && ! defined _STDLIB_H\298 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 270 299 && ! ((defined YYMALLOC || defined malloc) \ 271 300 && (defined YYFREE || defined free))) 272 301 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 273 # ifndef _STDLIB_H274 # define _STDLIB_H 1302 # ifndef EXIT_SUCCESS 303 # define EXIT_SUCCESS 0 275 304 # endif 276 305 # endif 277 306 # ifndef YYMALLOC 278 307 # define YYMALLOC malloc 279 # if ! defined malloc && ! defined _STDLIB_H&& (defined __STDC__ || defined __C99__FUNC__ \308 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 280 309 || defined __cplusplus || defined _MSC_VER) 281 310 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ … … 284 313 # ifndef YYFREE 285 314 # define YYFREE free 286 # if ! defined free && ! defined _STDLIB_H&& (defined __STDC__ || defined __C99__FUNC__ \315 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 287 316 || defined __cplusplus || defined _MSC_VER) 288 317 void free (void *); /* INFRINGES ON USER NAME SPACE */ … … 300 329 union yyalloc 301 330 { 302 yytype_int16 yyss ;303 YYSTYPE yyvs ;304 331 yytype_int16 yyss_alloc; 332 YYSTYPE yyvs_alloc; 333 }; 305 334 306 335 /* The size of the maximum gap between one aligned stack and the next. */ … … 313 342 + YYSTACK_GAP_MAXIMUM) 314 343 315 /* Copy COUNT objects from FROM to TO. The source and destination do 316 not overlap. */ 317 # ifndef YYCOPY 318 # if defined __GNUC__ && 1 < __GNUC__ 319 # define YYCOPY(To, From, Count) \ 320 __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 321 # else 322 # define YYCOPY(To, From, Count) \ 323 do \ 324 { \ 325 YYSIZE_T yyi; \ 326 for (yyi = 0; yyi < (Count); yyi++) \ 327 (To)[yyi] = (From)[yyi]; \ 328 } \ 329 while (YYID (0)) 330 # endif 331 # endif 344 # define YYCOPY_NEEDED 1 332 345 333 346 /* Relocate STACK from its old location to the new one. The … … 336 349 stack. Advance YYPTR to a properly aligned location for the next 337 350 stack. */ 338 # define YYSTACK_RELOCATE(Stack )\351 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 339 352 do \ 340 353 { \ 341 354 YYSIZE_T yynewbytes; \ 342 YYCOPY (&yyptr->Stack , Stack, yysize);\343 Stack = &yyptr->Stack ;\355 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 356 Stack = &yyptr->Stack_alloc; \ 344 357 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 345 358 yyptr += yynewbytes / sizeof (*yyptr); \ … … 348 361 349 362 #endif 363 364 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 365 /* Copy COUNT objects from SRC to DST. The source and destination do 366 not overlap. */ 367 # ifndef YYCOPY 368 # if defined __GNUC__ && 1 < __GNUC__ 369 # define YYCOPY(Dst, Src, Count) \ 370 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 371 # else 372 # define YYCOPY(Dst, Src, Count) \ 373 do \ 374 { \ 375 YYSIZE_T yyi; \ 376 for (yyi = 0; yyi < (Count); yyi++) \ 377 (Dst)[yyi] = (Src)[yyi]; \ 378 } \ 379 while (YYID (0)) 380 # endif 381 # endif 382 #endif /* !YYCOPY_NEEDED */ 350 383 351 384 /* YYFINAL -- State number of the termination state. */ … … 428 461 #endif 429 462 430 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE463 #if YYDEBUG || YYERROR_VERBOSE || 0 431 464 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 432 465 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ … … 436 469 "TOK_NOTGRIDDEP", "TOK_USEITEM", "TOK_NAME", "TOK_PROBTYPE", "','", 437 470 "';'", "':'", "'('", "')'", "'['", "']'", "'\\n'", "$accept", "input", 438 "line", 0471 "line", YY_NULL 439 472 }; 440 473 #endif … … 464 497 }; 465 498 466 /* YYDEFACT[STATE-NAME] -- Default r ule to reduce with in state467 STATE-NUMwhen YYTABLE doesn't specify something else to do. Zero499 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 500 Performed when YYTABLE doesn't specify something else to do. Zero 468 501 means the default is an error. */ 469 502 static const yytype_uint8 yydefact[] = … … 498 531 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 499 532 positive, shift that token. If negative, reduce the rule which 500 number is the opposite. If zero, do what YYDEFACT says. 501 If YYTABLE_NINF, syntax error. */ 533 number is the opposite. If YYTABLE_NINF, syntax error. */ 502 534 #define YYTABLE_NINF -1 503 535 static const yytype_uint8 yytable[] = … … 508 540 }; 509 541 542 #define yypact_value_is_default(Yystate) \ 543 (!!((Yystate) == (-10))) 544 545 #define yytable_value_is_error(Yytable_value) \ 546 YYID (0) 547 510 548 static const yytype_int8 yycheck[] = 511 549 { … … 536 574 /* Like YYERROR except do call yyerror. This remains here temporarily 537 575 to ease the transition to the new meaning of YYERROR, for GCC. 538 Once GCC version 2 has supplanted version 1, this can go. */ 576 Once GCC version 2 has supplanted version 1, this can go. However, 577 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 578 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 579 discussed. */ 539 580 540 581 #define YYFAIL goto yyerrlab 582 #if defined YYFAIL 583 /* This is here to suppress warnings from the GCC cpp's 584 -Wunused-macros. Normally we don't worry about that warning, but 585 some users do, and we want to make it easy for users to remove 586 YYFAIL uses, which will produce warnings from Bison 2.5. */ 587 #endif 541 588 542 589 #define YYRECOVERING() (!!yyerrstatus) 543 590 544 #define YYBACKUP(Token, Value) 545 do 546 if (yychar == YYEMPTY && yylen == 1)\547 { 548 yychar = (Token); 549 yylval = (Value); 550 yytoken = YYTRANSLATE (yychar);\551 YYPOPSTACK (1);\552 goto yybackup; 553 } 554 else 555 { 591 #define YYBACKUP(Token, Value) \ 592 do \ 593 if (yychar == YYEMPTY) \ 594 { \ 595 yychar = (Token); \ 596 yylval = (Value); \ 597 YYPOPSTACK (yylen); \ 598 yystate = *yyssp; \ 599 goto yybackup; \ 600 } \ 601 else \ 602 { \ 556 603 yyerror (YY_("syntax error: cannot back up")); \ 557 604 YYERROR; \ … … 559 606 while (YYID (0)) 560 607 561 608 /* Error token number */ 562 609 #define YYTERROR 1 563 610 #define YYERRCODE 256 564 611 565 612 566 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 567 If N is 0, then set CURRENT to the empty location which ends 568 the previous symbol: RHS[0] (always defined). */ 569 570 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 571 #ifndef YYLLOC_DEFAULT 572 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 573 do \ 574 if (YYID (N)) \ 575 { \ 576 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ 577 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ 578 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ 579 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ 580 } \ 581 else \ 582 { \ 583 (Current).first_line = (Current).last_line = \ 584 YYRHSLOC (Rhs, 0).last_line; \ 585 (Current).first_column = (Current).last_column = \ 586 YYRHSLOC (Rhs, 0).last_column; \ 587 } \ 588 while (YYID (0)) 589 #endif 590 591 592 /* YY_LOCATION_PRINT -- Print the location on the stream. 593 This macro was not mandated originally: define only if we know 594 we won't break user code: when these are the locations we know. */ 595 613 /* This macro is provided for backward compatibility. */ 596 614 #ifndef YY_LOCATION_PRINT 597 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL 598 # define YY_LOCATION_PRINT(File, Loc) \ 599 fprintf (File, "%d.%d-%d.%d", \ 600 (Loc).first_line, (Loc).first_column, \ 601 (Loc).last_line, (Loc).last_column) 602 # else 603 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 604 # endif 615 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 605 616 #endif 606 617 607 618 608 619 /* YYLEX -- calling `yylex' with the right arguments. */ 609 610 620 #ifdef YYLEX_PARAM 611 621 # define YYLEX yylex (YYLEX_PARAM) … … 657 667 #endif 658 668 { 669 FILE *yyo = yyoutput; 670 YYUSE (yyo); 659 671 if (!yyvaluep) 660 672 return; … … 665 677 YYUSE (yyoutput); 666 678 # endif 667 switch (yytype) 668 { 669 default: 670 break; 671 } 679 YYUSE (yytype); 672 680 } 673 681 … … 706 714 || defined __cplusplus || defined _MSC_VER) 707 715 static void 708 yy_stack_print (yytype_int16 * bottom, yytype_int16 *top)716 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 709 717 #else 710 718 static void 711 yy_stack_print ( bottom,top)712 yytype_int16 * bottom;713 yytype_int16 * top;719 yy_stack_print (yybottom, yytop) 720 yytype_int16 *yybottom; 721 yytype_int16 *yytop; 714 722 #endif 715 723 { 716 724 YYFPRINTF (stderr, "Stack now"); 717 for (; bottom <= top; ++bottom) 718 YYFPRINTF (stderr, " %d", *bottom); 725 for (; yybottom <= yytop; yybottom++) 726 { 727 int yybot = *yybottom; 728 YYFPRINTF (stderr, " %d", yybot); 729 } 719 730 YYFPRINTF (stderr, "\n"); 720 731 } … … 750 761 for (yyi = 0; yyi < yynrhs; yyi++) 751 762 { 752 fprintf(stderr, " $%d = ", yyi + 1);763 YYFPRINTF (stderr, " $%d = ", yyi + 1); 753 764 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 754 765 &(yyvsp[(yyi + 1) - (yynrhs)]) 755 766 ); 756 fprintf(stderr, "\n");767 YYFPRINTF (stderr, "\n"); 757 768 } 758 769 } … … 790 801 # define YYMAXDEPTH 10000 791 802 #endif 792 793 794 803 795 804 … … 895 904 # endif 896 905 897 /* Copy into YYRESULT an error message about the unexpected token 898 YYCHAR while in state YYSTATE. Return the number of bytes copied, 899 including the terminating null byte. If YYRESULT is null, do not 900 copy anything; just return the number of bytes that would be 901 copied. As a special case, return 0 if an ordinary "syntax error" 902 message will do. Return YYSIZE_MAXIMUM if overflow occurs during 903 size calculation. */ 904 static YYSIZE_T 905 yysyntax_error (char *yyresult, int yystate, int yychar) 906 { 907 int yyn = yypact[yystate]; 908 909 if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) 910 return 0; 911 else 906 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 907 about the unexpected token YYTOKEN for the state stack whose top is 908 YYSSP. 909 910 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 911 not large enough to hold the message. In that case, also set 912 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 913 required number of bytes is too large to store. */ 914 static int 915 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 916 yytype_int16 *yyssp, int yytoken) 917 { 918 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); 919 YYSIZE_T yysize = yysize0; 920 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 921 /* Internationalized format string. */ 922 const char *yyformat = YY_NULL; 923 /* Arguments of yyformat. */ 924 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 925 /* Number of reported tokens (one for the "unexpected", one per 926 "expected"). */ 927 int yycount = 0; 928 929 /* There are many possibilities here to consider: 930 - Assume YYFAIL is not used. It's too flawed to consider. See 931 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 932 for details. YYERROR is fine as it does not invoke this 933 function. 934 - If this state is a consistent state with a default action, then 935 the only way this function was invoked is if the default action 936 is an error action. In that case, don't check for expected 937 tokens because there are none. 938 - The only way there can be no lookahead present (in yychar) is if 939 this state is a consistent state with a default action. Thus, 940 detecting the absence of a lookahead is sufficient to determine 941 that there is no unexpected or expected token to report. In that 942 case, just report a simple "syntax error". 943 - Don't assume there isn't a lookahead just because this state is a 944 consistent state with a default action. There might have been a 945 previous inconsistent state, consistent state with a non-default 946 action, or user semantic action that manipulated yychar. 947 - Of course, the expected token list depends on states to have 948 correct lookahead information, and it depends on the parser not 949 to perform extra reductions after fetching a lookahead from the 950 scanner and before detecting a syntax error. Thus, state merging 951 (from LALR or IELR) and default reductions corrupt the expected 952 token list. However, the list is correct for canonical LR with 953 one exception: it will still contain any token that will not be 954 accepted due to an error action in a later state. 955 */ 956 if (yytoken != YYEMPTY) 912 957 { 913 int yytype = YYTRANSLATE (yychar); 914 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); 915 YYSIZE_T yysize = yysize0; 916 YYSIZE_T yysize1; 917 int yysize_overflow = 0; 918 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 919 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 920 int yyx; 921 922 # if 0 923 /* This is so xgettext sees the translatable formats that are 924 constructed on the fly. */ 925 YY_("syntax error, unexpected %s"); 926 YY_("syntax error, unexpected %s, expecting %s"); 927 YY_("syntax error, unexpected %s, expecting %s or %s"); 928 YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 929 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 930 # endif 931 char *yyfmt; 932 char const *yyf; 933 static char const yyunexpected[] = "syntax error, unexpected %s"; 934 static char const yyexpecting[] = ", expecting %s"; 935 static char const yyor[] = " or %s"; 936 char yyformat[sizeof yyunexpected 937 + sizeof yyexpecting - 1 938 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) 939 * (sizeof yyor - 1))]; 940 char const *yyprefix = yyexpecting; 941 942 /* Start YYX at -YYN if negative to avoid negative indexes in 943 YYCHECK. */ 944 int yyxbegin = yyn < 0 ? -yyn : 0; 945 946 /* Stay within bounds of both yycheck and yytname. */ 947 int yychecklim = YYLAST - yyn + 1; 948 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 949 int yycount = 1; 950 951 yyarg[0] = yytname[yytype]; 952 yyfmt = yystpcpy (yyformat, yyunexpected); 953 954 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 955 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) 956 { 957 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 958 { 959 yycount = 1; 960 yysize = yysize0; 961 yyformat[sizeof yyunexpected - 1] = '\0'; 962 break; 963 } 964 yyarg[yycount++] = yytname[yyx]; 965 yysize1 = yysize + yytnamerr (0, yytname[yyx]); 966 yysize_overflow |= (yysize1 < yysize); 967 yysize = yysize1; 968 yyfmt = yystpcpy (yyfmt, yyprefix); 969 yyprefix = yyor; 970 } 971 972 yyf = YY_(yyformat); 973 yysize1 = yysize + yystrlen (yyf); 974 yysize_overflow |= (yysize1 < yysize); 975 yysize = yysize1; 976 977 if (yysize_overflow) 978 return YYSIZE_MAXIMUM; 979 980 if (yyresult) 981 { 982 /* Avoid sprintf, as that infringes on the user's name space. 983 Don't have undefined behavior even if the translation 984 produced a string with the wrong number of "%s"s. */ 985 char *yyp = yyresult; 986 int yyi = 0; 987 while ((*yyp = *yyf) != '\0') 988 { 989 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) 990 { 991 yyp += yytnamerr (yyp, yyarg[yyi++]); 992 yyf += 2; 993 } 994 else 995 { 996 yyp++; 997 yyf++; 998 } 999 } 1000 } 1001 return yysize; 958 int yyn = yypact[*yyssp]; 959 yyarg[yycount++] = yytname[yytoken]; 960 if (!yypact_value_is_default (yyn)) 961 { 962 /* Start YYX at -YYN if negative to avoid negative indexes in 963 YYCHECK. In other words, skip the first -YYN actions for 964 this state because they are default actions. */ 965 int yyxbegin = yyn < 0 ? -yyn : 0; 966 /* Stay within bounds of both yycheck and yytname. */ 967 int yychecklim = YYLAST - yyn + 1; 968 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 969 int yyx; 970 971 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 972 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 973 && !yytable_value_is_error (yytable[yyx + yyn])) 974 { 975 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 976 { 977 yycount = 1; 978 yysize = yysize0; 979 break; 980 } 981 yyarg[yycount++] = yytname[yyx]; 982 { 983 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); 984 if (! (yysize <= yysize1 985 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 986 return 2; 987 yysize = yysize1; 988 } 989 } 990 } 1002 991 } 992 993 switch (yycount) 994 { 995 # define YYCASE_(N, S) \ 996 case N: \ 997 yyformat = S; \ 998 break 999 YYCASE_(0, YY_("syntax error")); 1000 YYCASE_(1, YY_("syntax error, unexpected %s")); 1001 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 1002 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 1003 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 1004 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 1005 # undef YYCASE_ 1006 } 1007 1008 { 1009 YYSIZE_T yysize1 = yysize + yystrlen (yyformat); 1010 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1011 return 2; 1012 yysize = yysize1; 1013 } 1014 1015 if (*yymsg_alloc < yysize) 1016 { 1017 *yymsg_alloc = 2 * yysize; 1018 if (! (yysize <= *yymsg_alloc 1019 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 1020 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 1021 return 1; 1022 } 1023 1024 /* Avoid sprintf, as that infringes on the user's name space. 1025 Don't have undefined behavior even if the translation 1026 produced a string with the wrong number of "%s"s. */ 1027 { 1028 char *yyp = *yymsg; 1029 int yyi = 0; 1030 while ((*yyp = *yyformat) != '\0') 1031 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 1032 { 1033 yyp += yytnamerr (yyp, yyarg[yyi++]); 1034 yyformat += 2; 1035 } 1036 else 1037 { 1038 yyp++; 1039 yyformat++; 1040 } 1041 } 1042 return 0; 1003 1043 } 1004 1044 #endif /* YYERROR_VERBOSE */ 1005 1006 1007 1045 1008 1046 /*-----------------------------------------------. … … 1029 1067 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 1030 1068 1031 switch (yytype) 1032 { 1033 1034 default: 1035 break; 1036 } 1037 } 1038 1039 1040 1041 /* Prevent warnings from -Wmissing-prototypes. */ 1042 1043 #ifdef YYPARSE_PARAM 1044 #if defined __STDC__ || defined __cplusplus 1045 int yyparse (void *YYPARSE_PARAM); 1046 #else 1047 int yyparse (); 1048 #endif 1049 #else /* ! YYPARSE_PARAM */ 1050 #if defined __STDC__ || defined __cplusplus 1051 int yyparse (void); 1052 #else 1053 int yyparse (); 1054 #endif 1055 #endif /* ! YYPARSE_PARAM */ 1056 1057 1058 1059 /* The look-ahead symbol. */ 1069 YYUSE (yytype); 1070 } 1071 1072 1073 1074 1075 /* The lookahead symbol. */ 1060 1076 int yychar; 1061 1077 1062 /* The semantic value of the look-ahead symbol. */ 1063 YYSTYPE yylval; 1078 1079 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1080 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1081 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 1082 #endif 1083 #ifndef YY_INITIAL_VALUE 1084 # define YY_INITIAL_VALUE(Value) /* Nothing. */ 1085 #endif 1086 1087 /* The semantic value of the lookahead symbol. */ 1088 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); 1064 1089 1065 1090 /* Number of syntax errors so far. */ 1066 1091 int yynerrs; 1067 1068 1092 1069 1093 … … 1094 1118 #endif 1095 1119 { 1096 1097 int yystate; 1120 int yystate; 1121 /* Number of tokens to shift before error messages enabled. */ 1122 int yyerrstatus; 1123 1124 /* The stacks and their tools: 1125 `yyss': related to states. 1126 `yyvs': related to semantic values. 1127 1128 Refer to the stacks through separate pointers, to allow yyoverflow 1129 to reallocate them elsewhere. */ 1130 1131 /* The state stack. */ 1132 yytype_int16 yyssa[YYINITDEPTH]; 1133 yytype_int16 *yyss; 1134 yytype_int16 *yyssp; 1135 1136 /* The semantic value stack. */ 1137 YYSTYPE yyvsa[YYINITDEPTH]; 1138 YYSTYPE *yyvs; 1139 YYSTYPE *yyvsp; 1140 1141 YYSIZE_T yystacksize; 1142 1098 1143 int yyn; 1099 1144 int yyresult; 1100 /* Number of tokens to shift before error messages enabled. */ 1101 int yyerrstatus; 1102 /* Look-ahead token as an internal (translated) token number. */ 1145 /* Lookahead token as an internal (translated) token number. */ 1103 1146 int yytoken = 0; 1147 /* The variables used to return semantic value and location from the 1148 action routines. */ 1149 YYSTYPE yyval; 1150 1104 1151 #if YYERROR_VERBOSE 1105 1152 /* Buffer for error messages, and its allocated size. */ … … 1109 1156 #endif 1110 1157 1111 /* Three stacks and their tools:1112 `yyss': related to states,1113 `yyvs': related to semantic values,1114 `yyls': related to locations.1115 1116 Refer to the stacks thru separate pointers, to allow yyoverflow1117 to reallocate them elsewhere. */1118 1119 /* The state stack. */1120 yytype_int16 yyssa[YYINITDEPTH];1121 yytype_int16 *yyss = yyssa;1122 yytype_int16 *yyssp;1123 1124 /* The semantic value stack. */1125 YYSTYPE yyvsa[YYINITDEPTH];1126 YYSTYPE *yyvs = yyvsa;1127 YYSTYPE *yyvsp;1128 1129 1130 1131 1158 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1132 1133 YYSIZE_T yystacksize = YYINITDEPTH;1134 1135 /* The variables used to return semantic value and location from the1136 action routines. */1137 YYSTYPE yyval;1138 1139 1159 1140 1160 /* The number of symbols on the RHS of the reduced rule. … … 1142 1162 int yylen = 0; 1143 1163 1164 yyssp = yyss = yyssa; 1165 yyvsp = yyvs = yyvsa; 1166 yystacksize = YYINITDEPTH; 1167 1144 1168 YYDPRINTF ((stderr, "Starting parse\n")); 1145 1169 … … 1147 1171 yyerrstatus = 0; 1148 1172 yynerrs = 0; 1149 yychar = YYEMPTY; /* Cause a token to be read. */ 1150 1151 /* Initialize stack pointers. 1152 Waste one element of value and location stack 1153 so that they stay on the same level as the state stack. 1154 The wasted elements are never initialized. */ 1155 1156 yyssp = yyss; 1157 yyvsp = yyvs; 1158 1173 yychar = YYEMPTY; /* Cause a token to be read. */ 1159 1174 goto yysetstate; 1160 1175 … … 1183 1198 yytype_int16 *yyss1 = yyss; 1184 1199 1185 1186 1200 /* Each stack pointer address is followed by the size of the 1187 1201 data in use in that stack, in bytes. This used to be a … … 1191 1205 &yyss1, yysize * sizeof (*yyssp), 1192 1206 &yyvs1, yysize * sizeof (*yyvsp), 1193 1194 1207 &yystacksize); 1195 1208 … … 1214 1227 if (! yyptr) 1215 1228 goto yyexhaustedlab; 1216 YYSTACK_RELOCATE (yyss); 1217 YYSTACK_RELOCATE (yyvs); 1218 1229 YYSTACK_RELOCATE (yyss_alloc, yyss); 1230 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1219 1231 # undef YYSTACK_RELOCATE 1220 1232 if (yyss1 != yyssa) … … 1227 1239 yyvsp = yyvs + yysize - 1; 1228 1240 1229 1230 1241 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1231 1242 (unsigned long int) yystacksize)); … … 1236 1247 1237 1248 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1249 1250 if (yystate == YYFINAL) 1251 YYACCEPT; 1238 1252 1239 1253 goto yybackup; … … 1245 1259 1246 1260 /* Do appropriate processing given the current state. Read a 1247 look -ahead token if we need one and don't already have one. */1248 1249 /* First try to decide what to do without reference to look -ahead token. */1261 lookahead token if we need one and don't already have one. */ 1262 1263 /* First try to decide what to do without reference to lookahead token. */ 1250 1264 yyn = yypact[yystate]; 1251 if (yy n == YYPACT_NINF)1265 if (yypact_value_is_default (yyn)) 1252 1266 goto yydefault; 1253 1267 1254 /* Not known => get a look -ahead token if don't already have one. */1255 1256 /* YYCHAR is either YYEMPTY or YYEOF or a valid look -ahead symbol. */1268 /* Not known => get a lookahead token if don't already have one. */ 1269 1270 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 1257 1271 if (yychar == YYEMPTY) 1258 1272 { … … 1280 1294 if (yyn <= 0) 1281 1295 { 1282 if (yy n == 0 || yyn == YYTABLE_NINF)1283 1296 if (yytable_value_is_error (yyn)) 1297 goto yyerrlab; 1284 1298 yyn = -yyn; 1285 1299 goto yyreduce; 1286 1300 } 1287 1288 if (yyn == YYFINAL)1289 YYACCEPT;1290 1301 1291 1302 /* Count tokens shifted since error; after three, turn off error … … 1294 1305 yyerrstatus--; 1295 1306 1296 /* Shift the look -ahead token. */1307 /* Shift the lookahead token. */ 1297 1308 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1298 1309 1299 /* Discard the shifted token unless it is eof. */ 1300 if (yychar != YYEOF) 1301 yychar = YYEMPTY; 1310 /* Discard the shifted token. */ 1311 yychar = YYEMPTY; 1302 1312 1303 1313 yystate = yyn; 1314 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1304 1315 *++yyvsp = yylval; 1316 YY_IGNORE_MAYBE_UNINITIALIZED_END 1305 1317 1306 1318 goto yynewstate; … … 1339 1351 { 1340 1352 case 5: 1353 /* Line 1787 of yacc.c */ 1341 1354 #line 67 "convert.y" 1342 {initdimprob(1,(yyvsp[(2) - (3)].na),"0","0"); ;}1355 {initdimprob(1,(yyvsp[(2) - (3)].na),"0","0");} 1343 1356 break; 1344 1357 1345 1358 case 6: 1359 /* Line 1787 of yacc.c */ 1346 1360 #line 68 "convert.y" 1347 {initdimprob(2,(yyvsp[(2) - (5)].na), (yyvsp[(4) - (5)].na),"0"); ;}1361 {initdimprob(2,(yyvsp[(2) - (5)].na), (yyvsp[(4) - (5)].na),"0");} 1348 1362 break; 1349 1363 1350 1364 case 7: 1365 /* Line 1787 of yacc.c */ 1351 1366 #line 70 "convert.y" 1352 {initdimprob(3,(yyvsp[(2) - (7)].na), (yyvsp[(4) - (7)].na), (yyvsp[(6) - (7)].na)); ;}1367 {initdimprob(3,(yyvsp[(2) - (7)].na), (yyvsp[(4) - (7)].na), (yyvsp[(6) - (7)].na));} 1353 1368 break; 1354 1369 1355 1370 case 8: 1371 /* Line 1787 of yacc.c */ 1356 1372 #line 72 "convert.y" 1357 1373 {listofmodules = Addtolistnom((yyvsp[(2) - (3)].na),listofmodules,0); 1358 Addmoduletothelist((yyvsp[(2) - (3)].na)); ;}1374 Addmoduletothelist((yyvsp[(2) - (3)].na));} 1359 1375 break; 1360 1376 1361 1377 case 9: 1378 /* Line 1787 of yacc.c */ 1362 1379 #line 74 "convert.y" 1363 {Add_NotGridDepend_Var_1((yyvsp[(3) - (4)].na)); ;}1380 {Add_NotGridDepend_Var_1((yyvsp[(3) - (4)].na));} 1364 1381 break; 1365 1382 1366 1383 case 10: 1384 /* Line 1787 of yacc.c */ 1367 1385 #line 75 "convert.y" 1368 1386 { … … 1371 1389 if (!strcasecmp((yyvsp[(2) - (3)].na),"ONLY_FIXED_GRIDS")) 1372 1390 onlyfixedgrids=1; 1373 ;}1391 } 1374 1392 break; 1375 1393 1376 1394 1377 /* Line 1 267 of yacc.c.*/1378 #line 13 76"convert.tab.c"1395 /* Line 1787 of yacc.c */ 1396 #line 1397 "convert.tab.c" 1379 1397 default: break; 1380 1398 } 1399 /* User semantic actions sometimes alter yychar, and that requires 1400 that yytoken be updated with the new translation. We take the 1401 approach of translating immediately before every use of yytoken. 1402 One alternative is translating here after every semantic action, 1403 but that translation would be missed if the semantic action invokes 1404 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 1405 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 1406 incorrect destructor might then be invoked immediately. In the 1407 case of YYERROR or YYBACKUP, subsequent parser actions might lead 1408 to an incorrect destructor call or verbose syntax error message 1409 before the lookahead is translated. */ 1381 1410 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 1382 1411 … … 1386 1415 1387 1416 *++yyvsp = yyval; 1388 1389 1417 1390 1418 /* Now `shift' the result of the reduction. Determine what state … … 1407 1435 `------------------------------------*/ 1408 1436 yyerrlab: 1437 /* Make sure we have latest lookahead translation. See comments at 1438 user semantic actions for why this is necessary. */ 1439 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 1440 1409 1441 /* If not already recovering from an error, report this error. */ 1410 1442 if (!yyerrstatus) … … 1414 1446 yyerror (YY_("syntax error")); 1415 1447 #else 1448 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 1449 yyssp, yytoken) 1416 1450 { 1417 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); 1418 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) 1419 { 1420 YYSIZE_T yyalloc = 2 * yysize; 1421 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) 1422 yyalloc = YYSTACK_ALLOC_MAXIMUM; 1423 if (yymsg != yymsgbuf) 1424 YYSTACK_FREE (yymsg); 1425 yymsg = (char *) YYSTACK_ALLOC (yyalloc); 1426 if (yymsg) 1427 yymsg_alloc = yyalloc; 1428 else 1429 { 1430 yymsg = yymsgbuf; 1431 yymsg_alloc = sizeof yymsgbuf; 1432 } 1433 } 1434 1435 if (0 < yysize && yysize <= yymsg_alloc) 1436 { 1437 (void) yysyntax_error (yymsg, yystate, yychar); 1438 yyerror (yymsg); 1439 } 1440 else 1441 { 1442 yyerror (YY_("syntax error")); 1443 if (yysize != 0) 1444 goto yyexhaustedlab; 1445 } 1451 char const *yymsgp = YY_("syntax error"); 1452 int yysyntax_error_status; 1453 yysyntax_error_status = YYSYNTAX_ERROR; 1454 if (yysyntax_error_status == 0) 1455 yymsgp = yymsg; 1456 else if (yysyntax_error_status == 1) 1457 { 1458 if (yymsg != yymsgbuf) 1459 YYSTACK_FREE (yymsg); 1460 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 1461 if (!yymsg) 1462 { 1463 yymsg = yymsgbuf; 1464 yymsg_alloc = sizeof yymsgbuf; 1465 yysyntax_error_status = 2; 1466 } 1467 else 1468 { 1469 yysyntax_error_status = YYSYNTAX_ERROR; 1470 yymsgp = yymsg; 1471 } 1472 } 1473 yyerror (yymsgp); 1474 if (yysyntax_error_status == 2) 1475 goto yyexhaustedlab; 1446 1476 } 1477 # undef YYSYNTAX_ERROR 1447 1478 #endif 1448 1479 } … … 1452 1483 if (yyerrstatus == 3) 1453 1484 { 1454 /* If just tried and failed to reuse look -ahead token after an1485 /* If just tried and failed to reuse lookahead token after an 1455 1486 error, discard it. */ 1456 1487 … … 1469 1500 } 1470 1501 1471 /* Else will try to reuse look -ahead token after shifting the error1502 /* Else will try to reuse lookahead token after shifting the error 1472 1503 token. */ 1473 1504 goto yyerrlab1; … … 1503 1534 { 1504 1535 yyn = yypact[yystate]; 1505 if ( yyn != YYPACT_NINF)1536 if (!yypact_value_is_default (yyn)) 1506 1537 { 1507 1538 yyn += YYTERROR; … … 1526 1557 } 1527 1558 1528 if (yyn == YYFINAL) 1529 YYACCEPT; 1530 1559 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1531 1560 *++yyvsp = yylval; 1561 YY_IGNORE_MAYBE_UNINITIALIZED_END 1532 1562 1533 1563 … … 1553 1583 goto yyreturn; 1554 1584 1555 #if ndef yyoverflow1585 #if !defined yyoverflow || YYERROR_VERBOSE 1556 1586 /*-------------------------------------------------. 1557 1587 | yyexhaustedlab -- memory exhaustion comes here. | … … 1564 1594 1565 1595 yyreturn: 1566 if (yychar != YYEOF && yychar != YYEMPTY) 1567 yydestruct ("Cleanup: discarding lookahead", 1568 yytoken, &yylval); 1596 if (yychar != YYEMPTY) 1597 { 1598 /* Make sure we have latest lookahead translation. See comments at 1599 user semantic actions for why this is necessary. */ 1600 yytoken = YYTRANSLATE (yychar); 1601 yydestruct ("Cleanup: discarding lookahead", 1602 yytoken, &yylval); 1603 } 1569 1604 /* Do not reclaim the symbols of the rule which action triggered 1570 1605 this YYABORT or YYACCEPT. */ … … 1590 1625 1591 1626 1627 /* Line 2050 of yacc.c */ 1592 1628 #line 82 "convert.y" 1593 1629 … … 1960 1996 return 0; 1961 1997 } 1962 1963 1998 #line 2 "convert.yy.c" 1964 1999 … … 1972 2007 #define YY_FLEX_MAJOR_VERSION 2 1973 2008 #define YY_FLEX_MINOR_VERSION 5 1974 #define YY_FLEX_SUBMINOR_VERSION 3 52009 #define YY_FLEX_SUBMINOR_VERSION 37 1975 2010 #if YY_FLEX_SUBMINOR_VERSION > 0 1976 2011 #define FLEX_BETA … … 2017 2052 typedef unsigned short int flex_uint16_t; 2018 2053 typedef unsigned int flex_uint32_t; 2019 #endif /* ! C99 */2020 2054 2021 2055 /* Limits of integral types. */ … … 2047 2081 #define UINT32_MAX (4294967295U) 2048 2082 #endif 2083 2084 #endif /* ! C99 */ 2049 2085 2050 2086 #endif /* ! FLEXINT_H */ … … 2524 2560 #define MAX_INCLUDE_DEPTH 30 2525 2561 YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; 2526 #line 56 5"convert.yy.c"2562 #line 566 "convert.yy.c" 2527 2563 2528 2564 #define INITIAL 0 … … 2614 2650 * we now use fwrite(). 2615 2651 */ 2616 #define ECHO fwrite( yytext, yyleng, 1, yyout)2652 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) 2617 2653 #endif 2618 2654 … … 2625 2661 { \ 2626 2662 int c = '*'; \ 2627 yy_size_t n; \2663 size_t n; \ 2628 2664 for ( n = 0; n < max_size && \ 2629 2665 (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ … … 2709 2745 #line 55 "convert.lex" 2710 2746 2711 #line 75 0"convert.yy.c"2747 #line 751 "convert.yy.c" 2712 2748 2713 2749 if ( !(yy_init) ) … … 2854 2890 ECHO; 2855 2891 YY_BREAK 2856 #line 89 5"convert.yy.c"2892 #line 896 "convert.yy.c" 2857 2893 case YY_STATE_EOF(INITIAL): 2858 2894 case YY_STATE_EOF(character): … … 3048 3084 3049 3085 /* just a shorter name for the current buffer */ 3050 YY_BUFFER_STATE b = YY_CURRENT_BUFFER ;3086 YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; 3051 3087 3052 3088 int yy_c_buf_p_offset = … … 3181 3217 yy_is_jam = (yy_current_state == 76); 3182 3218 3183 return yy_is_jam ? 0 : yy_current_state;3219 return yy_is_jam ? 0 : yy_current_state; 3184 3220 } 3185 3221 … … 3269 3305 { 3270 3306 if ( yywrap( ) ) 3271 return 0;3307 return EOF; 3272 3308 3273 3309 if ( ! (yy_did_buffer_switch_on_eof) ) … … 3405 3441 } 3406 3442 3407 #ifndef __cplusplus3408 extern int isatty (int );3409 #endif /* __cplusplus */3410 3411 3443 /* Initializes or reinitializes a buffer. 3412 3444 * This function is sometimes called more than once on the same buffer, … … 3613 3645 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will 3614 3646 * scan from a @e copy of @a bytes. 3615 * @param bytes the byte buffer to scan3616 * @param len the number of bytes in the buffer pointed to by @a bytes.3647 * @param yybytes the byte buffer to scan 3648 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. 3617 3649 * 3618 3650 * @return the newly allocated buffer state object. … … 3622 3654 YY_BUFFER_STATE b; 3623 3655 char *buf; 3624 yy_size_t n, i; 3656 yy_size_t n; 3657 int i; 3625 3658 3626 3659 /* Get memory for full buffer, including space for trailing EOB's. */
Note: See TracChangeset
for help on using the changeset viewer.