- Timestamp:
- 2017-06-05T12:05:17+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8126_UKMO_AGRIF_vert_interp/NEMOGCM/EXTERNAL/AGRIF/LIB/main.c
r5656 r8139 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. */ 2 3 /* Bison implementation for Yacc-like parsers in C 4 5 Copyright (C) 1984, 1989-1990, 2000-2012 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" 51 48 52 49 /* Skeleton name. */ … … 56 53 #define YYPURE 0 57 54 58 /* Using locations. */ 59 #define YYLSP_NEEDED 0 55 /* Push parsers. */ 56 #define YYPUSH 0 57 58 /* Pull parsers. */ 59 #define YYPULL 1 60 60 61 61 62 /* 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 63 #define yyparse convert_parse 64 #define yylex convert_lex 65 #define yyerror convert_error 66 #define yylval convert_lval 67 #define yychar convert_char 68 #define yydebug convert_debug 69 #define yynerrs convert_nerrs 70 71 /* Copy the first part of user declarations. */ 72 /* Line 371 of yacc.c */ 73 #line 35 "convert.y" 74 75 #include <stdlib.h> 76 #include <stdio.h> 77 #include <string.h> 78 #include "decl.h" 79 80 int line_num=1; 81 extern FILE * convert_in; 82 83 int convert_error(const char *s) 84 { 85 printf("##\n## ERROR in conv: '%s' (line %d, file: %s)\n##\n", s, line_num, config_file); 86 exit(0); 87 } 88 89 90 /* Line 371 of yacc.c */ 91 #line 92 "convert.tab.c" 92 93 # ifndef YY_NULL 94 # if defined __cplusplus && 201103L <= __cplusplus 95 # define YY_NULL nullptr 96 # else 97 # define YY_NULL 0 98 # endif 99 # endif 100 101 /* Enabling verbose error messages. */ 102 #ifdef YYERROR_VERBOSE 103 # undef YYERROR_VERBOSE 104 # define YYERROR_VERBOSE 1 105 #else 106 # define YYERROR_VERBOSE 0 107 #endif 108 109 110 /* Enabling traces. */ 111 #ifndef YYDEBUG 112 # define YYDEBUG 1 113 #endif 114 #if YYDEBUG 115 extern int convert_debug; 116 #endif 70 117 71 118 /* Tokens. */ … … 87 134 }; 88 135 #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. */ 105 #line 35 "convert.y" 106 107 #include <stdlib.h> 108 #include <stdio.h> 109 #include <string.h> 110 #include "decl.h" 111 112 int line_num=1; 113 extern FILE * convert_in; 114 115 int convert_error(const char *s) 116 { 117 printf("##\n## ERROR in conv: '%s' (line %d, file: %s)\n##\n", s, line_num, config_file); 118 exit(0); 119 } 120 121 122 123 /* Enabling traces. */ 124 #ifndef YYDEBUG 125 # define YYDEBUG 1 126 #endif 127 128 /* Enabling verbose error messages. */ 129 #ifdef YYERROR_VERBOSE 130 # undef YYERROR_VERBOSE 131 # define YYERROR_VERBOSE 1 132 #else 133 # define YYERROR_VERBOSE 0 134 #endif 135 136 /* Enabling the token table. */ 137 #ifndef YYTOKEN_TABLE 138 # define YYTOKEN_TABLE 0 139 #endif 136 140 137 141 138 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 142 139 typedef union YYSTYPE 140 { 141 /* Line 387 of yacc.c */ 143 142 #line 52 "convert.y" 144 { 143 145 144 char na[LONG_M]; 146 } 147 /* Line 193 of yacc.c. */ 145 146 147 /* Line 387 of yacc.c */ 148 148 #line 149 "convert.tab.c" 149 YYSTYPE; 149 } YYSTYPE; 150 # define YYSTYPE_IS_TRIVIAL 1 150 151 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 151 152 # define YYSTYPE_IS_DECLARED 1 152 # define YYSTYPE_IS_TRIVIAL 1 153 #endif 153 #endif 154 155 extern YYSTYPE convert_lval; 156 157 #ifdef YYPARSE_PARAM 158 #if defined __STDC__ || defined __cplusplus 159 int convert_parse (void *YYPARSE_PARAM); 160 #else 161 int convert_parse (); 162 #endif 163 #else /* ! YYPARSE_PARAM */ 164 #if defined __STDC__ || defined __cplusplus 165 int convert_parse (void); 166 #else 167 int convert_parse (); 168 #endif 169 #endif /* ! YYPARSE_PARAM */ 154 170 155 171 … … 157 173 /* Copy the second part of user declarations. */ 158 174 159 160 /* Line 216 of yacc.c. */ 161 #line 162 "convert.tab.c" 175 /* Line 390 of yacc.c */ 176 #line 177 "convert.tab.c" 162 177 163 178 #ifdef short … … 212 227 # if ENABLE_NLS 213 228 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 214 # define YY_( msgid) dgettext ("bison-runtime", msgid)229 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 215 230 # endif 216 231 # endif 217 232 # ifndef YY_ 218 # define YY_( msgid) msgid233 # define YY_(Msgid) Msgid 219 234 # endif 220 235 #endif … … 222 237 /* Suppress unused-variable warnings by "using" E. */ 223 238 #if ! defined lint || defined __GNUC__ 224 # define YYUSE( e) ((void) (e))239 # define YYUSE(E) ((void) (E)) 225 240 #else 226 # define YYUSE( e) /* empty */241 # define YYUSE(E) /* empty */ 227 242 #endif 228 243 229 244 /* Identity function, used to suppress warnings about constant conditions. */ 230 245 #ifndef lint 231 # define YYID( n) (n)246 # define YYID(N) (N) 232 247 #else 233 248 #if (defined __STDC__ || defined __C99__FUNC__ \ 234 249 || defined __cplusplus || defined _MSC_VER) 235 250 static int 236 YYID (int i)251 YYID (int yyi) 237 252 #else 238 253 static int 239 YYID ( i)240 int i;241 #endif 242 { 243 return i;254 YYID (yyi) 255 int yyi; 256 #endif 257 { 258 return yyi; 244 259 } 245 260 #endif … … 262 277 # else 263 278 # define YYSTACK_ALLOC alloca 264 # if ! defined _ALLOCA_H && ! defined _STDLIB_H&& (defined __STDC__ || defined __C99__FUNC__ \279 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 265 280 || defined __cplusplus || defined _MSC_VER) 266 281 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 267 # ifndef _STDLIB_H 268 # define _STDLIB_H 1 282 /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 283 # ifndef EXIT_SUCCESS 284 # define EXIT_SUCCESS 0 269 285 # endif 270 286 # endif … … 289 305 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 290 306 # endif 291 # if (defined __cplusplus && ! defined _STDLIB_H\307 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 292 308 && ! ((defined YYMALLOC || defined malloc) \ 293 309 && (defined YYFREE || defined free))) 294 310 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 295 # ifndef _STDLIB_H296 # define _STDLIB_H 1311 # ifndef EXIT_SUCCESS 312 # define EXIT_SUCCESS 0 297 313 # endif 298 314 # endif 299 315 # ifndef YYMALLOC 300 316 # define YYMALLOC malloc 301 # if ! defined malloc && ! defined _STDLIB_H&& (defined __STDC__ || defined __C99__FUNC__ \317 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 302 318 || defined __cplusplus || defined _MSC_VER) 303 319 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ … … 306 322 # ifndef YYFREE 307 323 # define YYFREE free 308 # if ! defined free && ! defined _STDLIB_H&& (defined __STDC__ || defined __C99__FUNC__ \324 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 309 325 || defined __cplusplus || defined _MSC_VER) 310 326 void free (void *); /* INFRINGES ON USER NAME SPACE */ … … 322 338 union yyalloc 323 339 { 324 yytype_int16 yyss ;325 YYSTYPE yyvs ;326 340 yytype_int16 yyss_alloc; 341 YYSTYPE yyvs_alloc; 342 }; 327 343 328 344 /* The size of the maximum gap between one aligned stack and the next. */ … … 335 351 + YYSTACK_GAP_MAXIMUM) 336 352 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 353 # define YYCOPY_NEEDED 1 354 354 355 355 /* Relocate STACK from its old location to the new one. The … … 358 358 stack. Advance YYPTR to a properly aligned location for the next 359 359 stack. */ 360 # define YYSTACK_RELOCATE(Stack )\360 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 361 361 do \ 362 362 { \ 363 363 YYSIZE_T yynewbytes; \ 364 YYCOPY (&yyptr->Stack , Stack, yysize);\365 Stack = &yyptr->Stack ;\364 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 365 Stack = &yyptr->Stack_alloc; \ 366 366 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 367 367 yyptr += yynewbytes / sizeof (*yyptr); \ … … 370 370 371 371 #endif 372 373 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 374 /* Copy COUNT objects from SRC to DST. The source and destination do 375 not overlap. */ 376 # ifndef YYCOPY 377 # if defined __GNUC__ && 1 < __GNUC__ 378 # define YYCOPY(Dst, Src, Count) \ 379 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 380 # else 381 # define YYCOPY(Dst, Src, Count) \ 382 do \ 383 { \ 384 YYSIZE_T yyi; \ 385 for (yyi = 0; yyi < (Count); yyi++) \ 386 (Dst)[yyi] = (Src)[yyi]; \ 387 } \ 388 while (YYID (0)) 389 # endif 390 # endif 391 #endif /* !YYCOPY_NEEDED */ 372 392 373 393 /* YYFINAL -- State number of the termination state. */ … … 451 471 #endif 452 472 453 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE473 #if YYDEBUG || YYERROR_VERBOSE || 0 454 474 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 455 475 First, the terminals, then, starting at YYNTOKENS, nonterminals. */ … … 459 479 "TOK_USE", "TOK_MODULEMAIN", "TOK_NOTGRIDDEP", "TOK_USEITEM", "TOK_NAME", 460 480 "TOK_CSTINT", "TOK_PROBTYPE", "','", "';'", "'\\n'", "$accept", "input", 461 "line", 0481 "line", YY_NULL 462 482 }; 463 483 #endif … … 487 507 }; 488 508 489 /* YYDEFACT[STATE-NAME] -- Default r ule to reduce with in state490 STATE-NUMwhen YYTABLE doesn't specify something else to do. Zero509 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 510 Performed when YYTABLE doesn't specify something else to do. Zero 491 511 means the default is an error. */ 492 512 static const yytype_uint8 yydefact[] = … … 521 541 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 522 542 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. */ 543 number is the opposite. If YYTABLE_NINF, syntax error. */ 525 544 #define YYTABLE_NINF -1 526 545 static const yytype_uint8 yytable[] = … … 531 550 }; 532 551 552 #define yypact_value_is_default(Yystate) \ 553 (!!((Yystate) == (-13))) 554 555 #define yytable_value_is_error(Yytable_value) \ 556 YYID (0) 557 533 558 static const yytype_int8 yycheck[] = 534 559 { … … 559 584 /* Like YYERROR except do call yyerror. This remains here temporarily 560 585 to ease the transition to the new meaning of YYERROR, for GCC. 561 Once GCC version 2 has supplanted version 1, this can go. */ 586 Once GCC version 2 has supplanted version 1, this can go. However, 587 YYFAIL appears to be in use. Nevertheless, it is formally deprecated 588 in Bison 2.4.2's NEWS entry, where a plan to phase it out is 589 discussed. */ 562 590 563 591 #define YYFAIL goto yyerrlab 592 #if defined YYFAIL 593 /* This is here to suppress warnings from the GCC cpp's 594 -Wunused-macros. Normally we don't worry about that warning, but 595 some users do, and we want to make it easy for users to remove 596 YYFAIL uses, which will produce warnings from Bison 2.5. */ 597 #endif 564 598 565 599 #define YYRECOVERING() (!!yyerrstatus) 566 600 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 { 601 #define YYBACKUP(Token, Value) \ 602 do \ 603 if (yychar == YYEMPTY) \ 604 { \ 605 yychar = (Token); \ 606 yylval = (Value); \ 607 YYPOPSTACK (yylen); \ 608 yystate = *yyssp; \ 609 goto yybackup; \ 610 } \ 611 else \ 612 { \ 579 613 yyerror (YY_("syntax error: cannot back up")); \ 580 614 YYERROR; \ … … 582 616 while (YYID (0)) 583 617 584 618 /* Error token number */ 585 619 #define YYTERROR 1 586 620 #define YYERRCODE 256 587 621 588 622 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 623 /* This macro is provided for backward compatibility. */ 619 624 #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 625 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 628 626 #endif 629 627 630 628 631 629 /* YYLEX -- calling `yylex' with the right arguments. */ 632 633 630 #ifdef YYLEX_PARAM 634 631 # define YYLEX yylex (YYLEX_PARAM) … … 680 677 #endif 681 678 { 679 FILE *yyo = yyoutput; 680 YYUSE (yyo); 682 681 if (!yyvaluep) 683 682 return; … … 691 690 { 692 691 default: 693 692 break; 694 693 } 695 694 } … … 729 728 || defined __cplusplus || defined _MSC_VER) 730 729 static void 731 yy_stack_print (yytype_int16 * bottom, yytype_int16 *top)730 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 732 731 #else 733 732 static void 734 yy_stack_print ( bottom,top)735 yytype_int16 * bottom;736 yytype_int16 * top;733 yy_stack_print (yybottom, yytop) 734 yytype_int16 *yybottom; 735 yytype_int16 *yytop; 737 736 #endif 738 737 { 739 738 YYFPRINTF (stderr, "Stack now"); 740 for (; bottom <= top; ++bottom) 741 YYFPRINTF (stderr, " %d", *bottom); 739 for (; yybottom <= yytop; yybottom++) 740 { 741 int yybot = *yybottom; 742 YYFPRINTF (stderr, " %d", yybot); 743 } 742 744 YYFPRINTF (stderr, "\n"); 743 745 } … … 773 775 for (yyi = 0; yyi < yynrhs; yyi++) 774 776 { 775 fprintf(stderr, " $%d = ", yyi + 1);777 YYFPRINTF (stderr, " $%d = ", yyi + 1); 776 778 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 777 779 &(yyvsp[(yyi + 1) - (yynrhs)]) 778 780 ); 779 fprintf(stderr, "\n");781 YYFPRINTF (stderr, "\n"); 780 782 } 781 783 } … … 813 815 # define YYMAXDEPTH 10000 814 816 #endif 815 816 817 817 818 818 … … 918 918 # endif 919 919 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 920 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 921 about the unexpected token YYTOKEN for the state stack whose top is 922 YYSSP. 923 924 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 925 not large enough to hold the message. In that case, also set 926 *YYMSG_ALLOC to the required number of bytes. Return 2 if the 927 required number of bytes is too large to store. */ 928 static int 929 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 930 yytype_int16 *yyssp, int yytoken) 931 { 932 YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); 933 YYSIZE_T yysize = yysize0; 934 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 935 /* Internationalized format string. */ 936 const char *yyformat = YY_NULL; 937 /* Arguments of yyformat. */ 938 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 939 /* Number of reported tokens (one for the "unexpected", one per 940 "expected"). */ 941 int yycount = 0; 942 943 /* There are many possibilities here to consider: 944 - Assume YYFAIL is not used. It's too flawed to consider. See 945 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 946 for details. YYERROR is fine as it does not invoke this 947 function. 948 - If this state is a consistent state with a default action, then 949 the only way this function was invoked is if the default action 950 is an error action. In that case, don't check for expected 951 tokens because there are none. 952 - The only way there can be no lookahead present (in yychar) is if 953 this state is a consistent state with a default action. Thus, 954 detecting the absence of a lookahead is sufficient to determine 955 that there is no unexpected or expected token to report. In that 956 case, just report a simple "syntax error". 957 - Don't assume there isn't a lookahead just because this state is a 958 consistent state with a default action. There might have been a 959 previous inconsistent state, consistent state with a non-default 960 action, or user semantic action that manipulated yychar. 961 - Of course, the expected token list depends on states to have 962 correct lookahead information, and it depends on the parser not 963 to perform extra reductions after fetching a lookahead from the 964 scanner and before detecting a syntax error. Thus, state merging 965 (from LALR or IELR) and default reductions corrupt the expected 966 token list. However, the list is correct for canonical LR with 967 one exception: it will still contain any token that will not be 968 accepted due to an error action in a later state. 969 */ 970 if (yytoken != YYEMPTY) 935 971 { 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); 998 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; 972 int yyn = yypact[*yyssp]; 973 yyarg[yycount++] = yytname[yytoken]; 974 if (!yypact_value_is_default (yyn)) 975 { 976 /* Start YYX at -YYN if negative to avoid negative indexes in 977 YYCHECK. In other words, skip the first -YYN actions for 978 this state because they are default actions. */ 979 int yyxbegin = yyn < 0 ? -yyn : 0; 980 /* Stay within bounds of both yycheck and yytname. */ 981 int yychecklim = YYLAST - yyn + 1; 982 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 983 int yyx; 984 985 for (yyx = yyxbegin; yyx < yyxend; ++yyx) 986 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 987 && !yytable_value_is_error (yytable[yyx + yyn])) 988 { 989 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 990 { 991 yycount = 1; 992 yysize = yysize0; 993 break; 994 } 995 yyarg[yycount++] = yytname[yyx]; 996 { 997 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); 998 if (! (yysize <= yysize1 999 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1000 return 2; 1001 yysize = yysize1; 1002 } 1003 } 1004 } 1025 1005 } 1006 1007 switch (yycount) 1008 { 1009 # define YYCASE_(N, S) \ 1010 case N: \ 1011 yyformat = S; \ 1012 break 1013 YYCASE_(0, YY_("syntax error")); 1014 YYCASE_(1, YY_("syntax error, unexpected %s")); 1015 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 1016 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 1017 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 1018 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 1019 # undef YYCASE_ 1020 } 1021 1022 { 1023 YYSIZE_T yysize1 = yysize + yystrlen (yyformat); 1024 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 1025 return 2; 1026 yysize = yysize1; 1027 } 1028 1029 if (*yymsg_alloc < yysize) 1030 { 1031 *yymsg_alloc = 2 * yysize; 1032 if (! (yysize <= *yymsg_alloc 1033 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 1034 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 1035 return 1; 1036 } 1037 1038 /* Avoid sprintf, as that infringes on the user's name space. 1039 Don't have undefined behavior even if the translation 1040 produced a string with the wrong number of "%s"s. */ 1041 { 1042 char *yyp = *yymsg; 1043 int yyi = 0; 1044 while ((*yyp = *yyformat) != '\0') 1045 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 1046 { 1047 yyp += yytnamerr (yyp, yyarg[yyi++]); 1048 yyformat += 2; 1049 } 1050 else 1051 { 1052 yyp++; 1053 yyformat++; 1054 } 1055 } 1056 return 0; 1026 1057 } 1027 1058 #endif /* YYERROR_VERBOSE */ 1028 1029 1030 1059 1031 1060 /*-----------------------------------------------. … … 1056 1085 1057 1086 default: 1058 1087 break; 1059 1088 } 1060 1089 } … … 1062 1091 1063 1092 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. */ 1093 1094 /* The lookahead symbol. */ 1083 1095 int yychar; 1084 1096 1085 /* The semantic value of the look-ahead symbol. */ 1086 YYSTYPE yylval; 1097 1098 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1099 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1100 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 1101 #endif 1102 #ifndef YY_INITIAL_VALUE 1103 # define YY_INITIAL_VALUE(Value) /* Nothing. */ 1104 #endif 1105 1106 /* The semantic value of the lookahead symbol. */ 1107 YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); 1087 1108 1088 1109 /* Number of syntax errors so far. */ 1089 1110 int yynerrs; 1090 1091 1111 1092 1112 … … 1117 1137 #endif 1118 1138 { 1119 1120 int yystate; 1139 int yystate; 1140 /* Number of tokens to shift before error messages enabled. */ 1141 int yyerrstatus; 1142 1143 /* The stacks and their tools: 1144 `yyss': related to states. 1145 `yyvs': related to semantic values. 1146 1147 Refer to the stacks through separate pointers, to allow yyoverflow 1148 to reallocate them elsewhere. */ 1149 1150 /* The state stack. */ 1151 yytype_int16 yyssa[YYINITDEPTH]; 1152 yytype_int16 *yyss; 1153 yytype_int16 *yyssp; 1154 1155 /* The semantic value stack. */ 1156 YYSTYPE yyvsa[YYINITDEPTH]; 1157 YYSTYPE *yyvs; 1158 YYSTYPE *yyvsp; 1159 1160 YYSIZE_T yystacksize; 1161 1121 1162 int yyn; 1122 1163 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. */ 1164 /* Lookahead token as an internal (translated) token number. */ 1126 1165 int yytoken = 0; 1166 /* The variables used to return semantic value and location from the 1167 action routines. */ 1168 YYSTYPE yyval; 1169 1127 1170 #if YYERROR_VERBOSE 1128 1171 /* Buffer for error messages, and its allocated size. */ … … 1132 1175 #endif 1133 1176 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 1177 #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 1178 1163 1179 /* The number of symbols on the RHS of the reduced rule. … … 1165 1181 int yylen = 0; 1166 1182 1183 yyssp = yyss = yyssa; 1184 yyvsp = yyvs = yyvsa; 1185 yystacksize = YYINITDEPTH; 1186 1167 1187 YYDPRINTF ((stderr, "Starting parse\n")); 1168 1188 … … 1170 1190 yyerrstatus = 0; 1171 1191 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 1192 yychar = YYEMPTY; /* Cause a token to be read. */ 1182 1193 goto yysetstate; 1183 1194 … … 1206 1217 yytype_int16 *yyss1 = yyss; 1207 1218 1208 1209 1219 /* Each stack pointer address is followed by the size of the 1210 1220 data in use in that stack, in bytes. This used to be a … … 1214 1224 &yyss1, yysize * sizeof (*yyssp), 1215 1225 &yyvs1, yysize * sizeof (*yyvsp), 1216 1217 1226 &yystacksize); 1218 1227 … … 1237 1246 if (! yyptr) 1238 1247 goto yyexhaustedlab; 1239 YYSTACK_RELOCATE (yyss); 1240 YYSTACK_RELOCATE (yyvs); 1241 1248 YYSTACK_RELOCATE (yyss_alloc, yyss); 1249 YYSTACK_RELOCATE (yyvs_alloc, yyvs); 1242 1250 # undef YYSTACK_RELOCATE 1243 1251 if (yyss1 != yyssa) … … 1250 1258 yyvsp = yyvs + yysize - 1; 1251 1259 1252 1253 1260 YYDPRINTF ((stderr, "Stack size increased to %lu\n", 1254 1261 (unsigned long int) yystacksize)); … … 1259 1266 1260 1267 YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 1268 1269 if (yystate == YYFINAL) 1270 YYACCEPT; 1261 1271 1262 1272 goto yybackup; … … 1268 1278 1269 1279 /* 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. */1280 lookahead token if we need one and don't already have one. */ 1281 1282 /* First try to decide what to do without reference to lookahead token. */ 1273 1283 yyn = yypact[yystate]; 1274 if (yy n == YYPACT_NINF)1284 if (yypact_value_is_default (yyn)) 1275 1285 goto yydefault; 1276 1286 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. */1287 /* Not known => get a lookahead token if don't already have one. */ 1288 1289 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 1280 1290 if (yychar == YYEMPTY) 1281 1291 { … … 1303 1313 if (yyn <= 0) 1304 1314 { 1305 if (yy n == 0 || yyn == YYTABLE_NINF)1306 1315 if (yytable_value_is_error (yyn)) 1316 goto yyerrlab; 1307 1317 yyn = -yyn; 1308 1318 goto yyreduce; 1309 1319 } 1310 1311 if (yyn == YYFINAL)1312 YYACCEPT;1313 1320 1314 1321 /* Count tokens shifted since error; after three, turn off error … … 1317 1324 yyerrstatus--; 1318 1325 1319 /* Shift the look -ahead token. */1326 /* Shift the lookahead token. */ 1320 1327 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 1321 1328 1322 /* Discard the shifted token unless it is eof. */ 1323 if (yychar != YYEOF) 1324 yychar = YYEMPTY; 1329 /* Discard the shifted token. */ 1330 yychar = YYEMPTY; 1325 1331 1326 1332 yystate = yyn; 1333 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1327 1334 *++yyvsp = yylval; 1335 YY_IGNORE_MAYBE_UNINITIALIZED_END 1328 1336 1329 1337 goto yynewstate; … … 1362 1370 { 1363 1371 case 5: 1372 /* Line 1807 of yacc.c */ 1364 1373 #line 76 "convert.y" 1365 { initdimprob(1,(yyvsp[(2) - (3)].na),"0","0"); ;}1374 { initdimprob(1,(yyvsp[(2) - (3)].na),"0","0"); } 1366 1375 break; 1367 1376 1368 1377 case 6: 1378 /* Line 1807 of yacc.c */ 1369 1379 #line 77 "convert.y" 1370 { initdimprob(2,(yyvsp[(2) - (5)].na), (yyvsp[(4) - (5)].na),"0"); ;}1380 { initdimprob(2,(yyvsp[(2) - (5)].na), (yyvsp[(4) - (5)].na),"0"); } 1371 1381 break; 1372 1382 1373 1383 case 7: 1384 /* Line 1807 of yacc.c */ 1374 1385 #line 78 "convert.y" 1375 { initdimprob(3,(yyvsp[(2) - (7)].na), (yyvsp[(4) - (7)].na), (yyvsp[(6) - (7)].na)); ;}1386 { initdimprob(3,(yyvsp[(2) - (7)].na), (yyvsp[(4) - (7)].na), (yyvsp[(6) - (7)].na)); } 1376 1387 break; 1377 1388 1378 1389 case 8: 1390 /* Line 1807 of yacc.c */ 1379 1391 #line 80 "convert.y" 1380 1392 { 1381 1393 listofmodules = Addtolistnom((yyvsp[(2) - (3)].na),listofmodules,0); 1382 1394 Addmoduletothelist((yyvsp[(2) - (3)].na)); 1383 ;}1395 } 1384 1396 break; 1385 1397 1386 1398 case 9: 1399 /* Line 1807 of yacc.c */ 1387 1400 #line 85 "convert.y" 1388 1401 { … … 1400 1413 exit(0); 1401 1414 } 1402 ;}1415 } 1403 1416 break; 1404 1417 1405 1418 case 10: 1419 /* Line 1807 of yacc.c */ 1406 1420 #line 101 "convert.y" 1407 1421 { 1408 1422 Add_NotGridDepend_Var_1((yyvsp[(3) - (4)].na)); 1409 ;}1423 } 1410 1424 break; 1411 1425 1412 1426 case 11: 1427 /* Line 1807 of yacc.c */ 1413 1428 #line 105 "convert.y" 1414 1429 { 1415 1430 if (!strcasecmp((yyvsp[(2) - (3)].na),"FIXED_GRIDS")) fixedgrids = 1; 1416 1431 if (!strcasecmp((yyvsp[(2) - (3)].na),"ONLY_FIXED_GRIDS")) onlyfixedgrids = 1; 1417 ;}1432 } 1418 1433 break; 1419 1434 1420 1435 1421 /* Line 1 267 of yacc.c.*/1422 #line 14 20"convert.tab.c"1436 /* Line 1807 of yacc.c */ 1437 #line 1438 "convert.tab.c" 1423 1438 default: break; 1424 1439 } 1440 /* User semantic actions sometimes alter yychar, and that requires 1441 that yytoken be updated with the new translation. We take the 1442 approach of translating immediately before every use of yytoken. 1443 One alternative is translating here after every semantic action, 1444 but that translation would be missed if the semantic action invokes 1445 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 1446 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 1447 incorrect destructor might then be invoked immediately. In the 1448 case of YYERROR or YYBACKUP, subsequent parser actions might lead 1449 to an incorrect destructor call or verbose syntax error message 1450 before the lookahead is translated. */ 1425 1451 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 1426 1452 … … 1430 1456 1431 1457 *++yyvsp = yyval; 1432 1433 1458 1434 1459 /* Now `shift' the result of the reduction. Determine what state … … 1451 1476 `------------------------------------*/ 1452 1477 yyerrlab: 1478 /* Make sure we have latest lookahead translation. See comments at 1479 user semantic actions for why this is necessary. */ 1480 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 1481 1453 1482 /* If not already recovering from an error, report this error. */ 1454 1483 if (!yyerrstatus) … … 1458 1487 yyerror (YY_("syntax error")); 1459 1488 #else 1489 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 1490 yyssp, yytoken) 1460 1491 { 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 } 1492 char const *yymsgp = YY_("syntax error"); 1493 int yysyntax_error_status; 1494 yysyntax_error_status = YYSYNTAX_ERROR; 1495 if (yysyntax_error_status == 0) 1496 yymsgp = yymsg; 1497 else if (yysyntax_error_status == 1) 1498 { 1499 if (yymsg != yymsgbuf) 1500 YYSTACK_FREE (yymsg); 1501 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 1502 if (!yymsg) 1503 { 1504 yymsg = yymsgbuf; 1505 yymsg_alloc = sizeof yymsgbuf; 1506 yysyntax_error_status = 2; 1507 } 1508 else 1509 { 1510 yysyntax_error_status = YYSYNTAX_ERROR; 1511 yymsgp = yymsg; 1512 } 1513 } 1514 yyerror (yymsgp); 1515 if (yysyntax_error_status == 2) 1516 goto yyexhaustedlab; 1490 1517 } 1518 # undef YYSYNTAX_ERROR 1491 1519 #endif 1492 1520 } … … 1496 1524 if (yyerrstatus == 3) 1497 1525 { 1498 /* If just tried and failed to reuse look -ahead token after an1526 /* If just tried and failed to reuse lookahead token after an 1499 1527 error, discard it. */ 1500 1528 … … 1513 1541 } 1514 1542 1515 /* Else will try to reuse look -ahead token after shifting the error1543 /* Else will try to reuse lookahead token after shifting the error 1516 1544 token. */ 1517 1545 goto yyerrlab1; … … 1547 1575 { 1548 1576 yyn = yypact[yystate]; 1549 if ( yyn != YYPACT_NINF)1577 if (!yypact_value_is_default (yyn)) 1550 1578 { 1551 1579 yyn += YYTERROR; … … 1570 1598 } 1571 1599 1572 if (yyn == YYFINAL) 1573 YYACCEPT; 1574 1600 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 1575 1601 *++yyvsp = yylval; 1602 YY_IGNORE_MAYBE_UNINITIALIZED_END 1576 1603 1577 1604 … … 1597 1624 goto yyreturn; 1598 1625 1599 #if ndef yyoverflow1626 #if !defined yyoverflow || YYERROR_VERBOSE 1600 1627 /*-------------------------------------------------. 1601 1628 | yyexhaustedlab -- memory exhaustion comes here. | … … 1608 1635 1609 1636 yyreturn: 1610 if (yychar != YYEOF && yychar != YYEMPTY) 1611 yydestruct ("Cleanup: discarding lookahead", 1612 yytoken, &yylval); 1637 if (yychar != YYEMPTY) 1638 { 1639 /* Make sure we have latest lookahead translation. See comments at 1640 user semantic actions for why this is necessary. */ 1641 yytoken = YYTRANSLATE (yychar); 1642 yydestruct ("Cleanup: discarding lookahead", 1643 yytoken, &yylval); 1644 } 1613 1645 /* Do not reclaim the symbols of the rule which action triggered 1614 1646 this YYABORT or YYACCEPT. */ … … 1634 1666 1635 1667 1668 /* Line 2055 of yacc.c */ 1636 1669 #line 110 "convert.y" 1637 1670 … … 1657 1690 int infreegiven ; 1658 1691 int infixedgiven ; 1659 int lengthmainfile;1660 1692 1661 1693 char filetoparse[LONG_FNAME]; … … 1687 1719 tmpuselocallist = (listusemodule *) NULL; 1688 1720 List_ContainsSubroutine = (listnom *) NULL; 1721 List_Do_labels = (listname *) NULL; 1689 1722 oldfortran_out = (FILE *) NULL; 1690 1723 1691 if (argc < 2) print_usage(); 1692 1724 if ( argc < 2 ) 1725 print_usage(); 1726 1693 1727 strcpy(config_file, argv[1]); 1694 1728 strcpy(work_dir, "."); … … 1784 1818 strcpy(filetoparse, argv[i+1]); 1785 1819 i++; 1786 lengthmainfile = strlen(filetoparse); 1787 if (!strcasecmp(&filetoparse[lengthmainfile-4], ".f90")) 1788 { 1789 infixed = 0; 1790 infree = 1; 1791 } 1792 else 1793 { 1794 infixed = 1; 1795 infree = 0; 1796 } 1820 infree = (strstr(filetoparse, ".f90") != NULL) || (strstr(filetoparse, ".F90") != NULL); 1821 infixed = ! infree; 1797 1822 } 1798 1823 else if (!strcasecmp(argv[i], "-free")) … … 1927 1952 /* Build new subroutines */ 1928 1953 firstpass = 0; 1954 /* 1955 printf("**********************************\n"); 1956 printf("SECOND PASSES \n"); 1957 printf("**********************************\n"); 1958 */ 1929 1959 process_fortran(filetoparse); 1930 1960 … … 1989 2019 return 0; 1990 2020 } 1991 1992 2021 #line 2 "convert.yy.c" 1993 2022
Note: See TracChangeset
for help on using the changeset viewer.