New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 8139 for branches/2017/dev_r8126_UKMO_AGRIF_vert_interp/NEMOGCM/EXTERNAL/AGRIF/LIB/main.c – NEMO

Ignore:
Timestamp:
2017-06-05T12:05:17+02:00 (7 years ago)
Author:
timgraham
Message:

Updates to conv library as received from Laurent - required for vertical refinement

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 
    98   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    
    1312   This program is distributed in the hope that it will be useful, 
    1413   but WITHOUT ANY WARRANTY; without even the implied warranty of 
    1514   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1615   GNU General Public License for more details. 
    17  
     16    
    1817   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/>.  */ 
    2219 
    2320/* As a special exception, you may create a larger work that contains 
     
    3027   Bison output files to be licensed under the GNU General Public 
    3128   License without this special exception. 
    32  
     29    
    3330   This special exception was added by the Free Software Foundation in 
    3431   version 2.2 of Bison.  */ 
     
    4845 
    4946/* Bison version.  */ 
    50 #define YYBISON_VERSION "2.3" 
     47#define YYBISON_VERSION "2.7" 
    5148 
    5249/* Skeleton name.  */ 
     
    5653#define YYPURE 0 
    5754 
    58 /* Using locations.  */ 
    59 #define YYLSP_NEEDED 0 
     55/* Push parsers.  */ 
     56#define YYPUSH 0 
     57 
     58/* Pull parsers.  */ 
     59#define YYPULL 1 
     60 
    6061 
    6162/* 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 
     80int line_num=1; 
     81extern FILE * convert_in; 
     82 
     83int 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 
     115extern int convert_debug; 
     116#endif 
    70117 
    71118/* Tokens.  */ 
     
    87134   }; 
    88135#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 
    140137 
    141138#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 
    142139typedef union YYSTYPE 
     140{ 
     141/* Line 387 of yacc.c  */ 
    143142#line 52 "convert.y" 
    144 { 
     143 
    145144    char na[LONG_M]; 
    146 } 
    147 /* Line 193 of yacc.c.  */ 
     145 
     146 
     147/* Line 387 of yacc.c  */ 
    148148#line 149 "convert.tab.c" 
    149    YYSTYPE; 
     149} YYSTYPE; 
     150# define YYSTYPE_IS_TRIVIAL 1 
    150151# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 
    151152# define YYSTYPE_IS_DECLARED 1 
    152 # define YYSTYPE_IS_TRIVIAL 1 
    153 #endif 
     153#endif 
     154 
     155extern YYSTYPE convert_lval; 
     156 
     157#ifdef YYPARSE_PARAM 
     158#if defined __STDC__ || defined __cplusplus 
     159int convert_parse (void *YYPARSE_PARAM); 
     160#else 
     161int convert_parse (); 
     162#endif 
     163#else /* ! YYPARSE_PARAM */ 
     164#if defined __STDC__ || defined __cplusplus 
     165int convert_parse (void); 
     166#else 
     167int convert_parse (); 
     168#endif 
     169#endif /* ! YYPARSE_PARAM */ 
    154170 
    155171 
     
    157173/* Copy the second part of user declarations.  */ 
    158174 
    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" 
    162177 
    163178#ifdef short 
     
    212227#  if ENABLE_NLS 
    213228#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 
    214 #   define YY_(msgid) dgettext ("bison-runtime", msgid) 
     229#   define YY_(Msgid) dgettext ("bison-runtime", Msgid) 
    215230#  endif 
    216231# endif 
    217232# ifndef YY_ 
    218 #  define YY_(msgid) msgid 
     233#  define YY_(Msgid) Msgid 
    219234# endif 
    220235#endif 
     
    222237/* Suppress unused-variable warnings by "using" E.  */ 
    223238#if ! defined lint || defined __GNUC__ 
    224 # define YYUSE(e) ((void) (e)) 
     239# define YYUSE(E) ((void) (E)) 
    225240#else 
    226 # define YYUSE(e) /* empty */ 
     241# define YYUSE(E) /* empty */ 
    227242#endif 
    228243 
    229244/* Identity function, used to suppress warnings about constant conditions.  */ 
    230245#ifndef lint 
    231 # define YYID(n) (n) 
     246# define YYID(N) (N) 
    232247#else 
    233248#if (defined __STDC__ || defined __C99__FUNC__ \ 
    234249     || defined __cplusplus || defined _MSC_VER) 
    235250static int 
    236 YYID (int i) 
     251YYID (int yyi) 
    237252#else 
    238253static int 
    239 YYID (i) 
    240     int i; 
    241 #endif 
    242 { 
    243   return i; 
     254YYID (yyi) 
     255    int yyi; 
     256#endif 
     257{ 
     258  return yyi; 
    244259} 
    245260#endif 
     
    262277#   else 
    263278#    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__ \ 
    265280     || defined __cplusplus || defined _MSC_VER) 
    266281#     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 
    269285#     endif 
    270286#    endif 
     
    289305#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 
    290306#  endif 
    291 #  if (defined __cplusplus && ! defined _STDLIB_H \ 
     307#  if (defined __cplusplus && ! defined EXIT_SUCCESS \ 
    292308       && ! ((defined YYMALLOC || defined malloc) \ 
    293309        && (defined YYFREE || defined free))) 
    294310#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 
    295 #   ifndef _STDLIB_H 
    296 #    define _STDLIB_H 1 
     311#   ifndef EXIT_SUCCESS 
     312#    define EXIT_SUCCESS 0 
    297313#   endif 
    298314#  endif 
    299315#  ifndef YYMALLOC 
    300316#   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__ \ 
    302318     || defined __cplusplus || defined _MSC_VER) 
    303319void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 
     
    306322#  ifndef YYFREE 
    307323#   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__ \ 
    309325     || defined __cplusplus || defined _MSC_VER) 
    310326void free (void *); /* INFRINGES ON USER NAME SPACE */ 
     
    322338union yyalloc 
    323339{ 
    324   yytype_int16 yyss; 
    325   YYSTYPE yyvs; 
    326   }; 
     340  yytype_int16 yyss_alloc; 
     341  YYSTYPE yyvs_alloc; 
     342}; 
    327343 
    328344/* The size of the maximum gap between one aligned stack and the next.  */ 
     
    335351      + YYSTACK_GAP_MAXIMUM) 
    336352 
    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 
    354354 
    355355/* Relocate STACK from its old location to the new one.  The 
     
    358358   stack.  Advance YYPTR to a properly aligned location for the next 
    359359   stack.  */ 
    360 # define YYSTACK_RELOCATE(Stack)             \ 
     360# define YYSTACK_RELOCATE(Stack_alloc, Stack)            \ 
    361361    do                           \ 
    362362      {                          \ 
    363363   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;              \ 
    366366   yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 
    367367   yyptr += yynewbytes / sizeof (*yyptr);          \ 
     
    370370 
    371371#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 */ 
    372392 
    373393/* YYFINAL -- State number of the termination state.  */ 
     
    451471#endif 
    452472 
    453 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 
     473#if YYDEBUG || YYERROR_VERBOSE || 0 
    454474/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 
    455475   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */ 
     
    459479  "TOK_USE", "TOK_MODULEMAIN", "TOK_NOTGRIDDEP", "TOK_USEITEM", "TOK_NAME", 
    460480  "TOK_CSTINT", "TOK_PROBTYPE", "','", "';'", "'\\n'", "$accept", "input", 
    461   "line", 0 
     481  "line", YY_NULL 
    462482}; 
    463483#endif 
     
    487507}; 
    488508 
    489 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 
    490    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero 
     509/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 
     510   Performed when YYTABLE doesn't specify something else to do.  Zero 
    491511   means the default is an error.  */ 
    492512static const yytype_uint8 yydefact[] = 
     
    521541/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If 
    522542   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.  */ 
    525544#define YYTABLE_NINF -1 
    526545static const yytype_uint8 yytable[] = 
     
    531550}; 
    532551 
     552#define yypact_value_is_default(Yystate) \ 
     553  (!!((Yystate) == (-13))) 
     554 
     555#define yytable_value_is_error(Yytable_value) \ 
     556  YYID (0) 
     557 
    533558static const yytype_int8 yycheck[] = 
    534559{ 
     
    559584/* Like YYERROR except do call yyerror.  This remains here temporarily 
    560585   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.  */ 
    562590 
    563591#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 
    564598 
    565599#define YYRECOVERING()  (!!yyerrstatus) 
    566600 
    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)                                  \ 
     602do                                                              \ 
     603  if (yychar == YYEMPTY)                                        \ 
     604    {                                                           \ 
     605      yychar = (Token);                                         \ 
     606      yylval = (Value);                                         \ 
     607      YYPOPSTACK (yylen);                                       \ 
     608      yystate = *yyssp;                                         \ 
     609      goto yybackup;                                            \ 
     610    }                                                           \ 
     611  else                                                          \ 
     612    {                                                           \ 
    579613      yyerror (YY_("syntax error: cannot back up")); \ 
    580614      YYERROR;                   \ 
     
    582616while (YYID (0)) 
    583617 
    584  
     618/* Error token number */ 
    585619#define YYTERROR  1 
    586620#define YYERRCODE 256 
    587621 
    588622 
    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. */ 
    619624#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) 
    628626#endif 
    629627 
    630628 
    631629/* YYLEX -- calling `yylex' with the right arguments.  */ 
    632  
    633630#ifdef YYLEX_PARAM 
    634631# define YYLEX yylex (YYLEX_PARAM) 
     
    680677#endif 
    681678{ 
     679  FILE *yyo = yyoutput; 
     680  YYUSE (yyo); 
    682681  if (!yyvaluep) 
    683682    return; 
     
    691690    { 
    692691      default: 
    693    break; 
     692        break; 
    694693    } 
    695694} 
     
    729728     || defined __cplusplus || defined _MSC_VER) 
    730729static void 
    731 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) 
     730yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 
    732731#else 
    733732static void 
    734 yy_stack_print (bottom, top) 
    735     yytype_int16 *bottom; 
    736     yytype_int16 *top; 
     733yy_stack_print (yybottom, yytop) 
     734    yytype_int16 *yybottom; 
     735    yytype_int16 *yytop; 
    737736#endif 
    738737{ 
    739738  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    } 
    742744  YYFPRINTF (stderr, "\n"); 
    743745} 
     
    773775  for (yyi = 0; yyi < yynrhs; yyi++) 
    774776    { 
    775       fprintf (stderr, "   $%d = ", yyi + 1); 
     777      YYFPRINTF (stderr, "   $%d = ", yyi + 1); 
    776778      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 
    777779             &(yyvsp[(yyi + 1) - (yynrhs)]) 
    778780                         ); 
    779       fprintf (stderr, "\n"); 
     781      YYFPRINTF (stderr, "\n"); 
    780782    } 
    781783} 
     
    813815# define YYMAXDEPTH 10000 
    814816#endif 
    815  
    816  
    817817 
    818818 
     
    918918# endif 
    919919 
    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.  */ 
     928static int 
     929yysyntax_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) 
    935971    { 
    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        } 
    10251005    } 
     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; 
    10261057} 
    10271058#endif /* YYERROR_VERBOSE */ 
    1028  
    1029  
    10301059 
    10311060/*-----------------------------------------------. 
     
    10561085 
    10571086      default: 
    1058    break; 
     1087        break; 
    10591088    } 
    10601089} 
     
    10621091 
    10631092 
    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.  */ 
    10831095int yychar; 
    10841096 
    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.  */ 
     1107YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); 
    10871108 
    10881109/* Number of syntax errors so far.  */ 
    10891110int yynerrs; 
    1090  
    10911111 
    10921112 
     
    11171137#endif 
    11181138{ 
    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 
    11211162  int yyn; 
    11221163  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.  */ 
    11261165  int yytoken = 0; 
     1166  /* The variables used to return semantic value and location from the 
     1167     action routines.  */ 
     1168  YYSTYPE yyval; 
     1169 
    11271170#if YYERROR_VERBOSE 
    11281171  /* Buffer for error messages, and its allocated size.  */ 
     
    11321175#endif 
    11331176 
    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 yyoverflow 
    1140      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  
    11541177#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 the 
    1159      action routines.  */ 
    1160   YYSTYPE yyval; 
    1161  
    11621178 
    11631179  /* The number of symbols on the RHS of the reduced rule. 
     
    11651181  int yylen = 0; 
    11661182 
     1183  yyssp = yyss = yyssa; 
     1184  yyvsp = yyvs = yyvsa; 
     1185  yystacksize = YYINITDEPTH; 
     1186 
    11671187  YYDPRINTF ((stderr, "Starting parse\n")); 
    11681188 
     
    11701190  yyerrstatus = 0; 
    11711191  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.  */ 
    11821193  goto yysetstate; 
    11831194 
     
    12061217   yytype_int16 *yyss1 = yyss; 
    12071218 
    1208  
    12091219   /* Each stack pointer address is followed by the size of the 
    12101220      data in use in that stack, in bytes.  This used to be a 
     
    12141224          &yyss1, yysize * sizeof (*yyssp), 
    12151225          &yyvs1, yysize * sizeof (*yyvsp), 
    1216  
    12171226          &yystacksize); 
    12181227 
     
    12371246   if (! yyptr) 
    12381247     goto yyexhaustedlab; 
    1239    YYSTACK_RELOCATE (yyss); 
    1240    YYSTACK_RELOCATE (yyvs); 
    1241  
     1248   YYSTACK_RELOCATE (yyss_alloc, yyss); 
     1249   YYSTACK_RELOCATE (yyvs_alloc, yyvs); 
    12421250#  undef YYSTACK_RELOCATE 
    12431251   if (yyss1 != yyssa) 
     
    12501258      yyvsp = yyvs + yysize - 1; 
    12511259 
    1252  
    12531260      YYDPRINTF ((stderr, "Stack size increased to %lu\n", 
    12541261        (unsigned long int) yystacksize)); 
     
    12591266 
    12601267  YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 
     1268 
     1269  if (yystate == YYFINAL) 
     1270    YYACCEPT; 
    12611271 
    12621272  goto yybackup; 
     
    12681278 
    12691279  /* 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.  */ 
    12731283  yyn = yypact[yystate]; 
    1274   if (yyn == YYPACT_NINF) 
     1284  if (yypact_value_is_default (yyn)) 
    12751285    goto yydefault; 
    12761286 
    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.  */ 
    12801290  if (yychar == YYEMPTY) 
    12811291    { 
     
    13031313  if (yyn <= 0) 
    13041314    { 
    1305       if (yyn == 0 || yyn == YYTABLE_NINF) 
    1306    goto yyerrlab; 
     1315      if (yytable_value_is_error (yyn)) 
     1316        goto yyerrlab; 
    13071317      yyn = -yyn; 
    13081318      goto yyreduce; 
    13091319    } 
    1310  
    1311   if (yyn == YYFINAL) 
    1312     YYACCEPT; 
    13131320 
    13141321  /* Count tokens shifted since error; after three, turn off error 
     
    13171324    yyerrstatus--; 
    13181325 
    1319   /* Shift the look-ahead token.  */ 
     1326  /* Shift the lookahead token.  */ 
    13201327  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 
    13211328 
    1322   /* Discard the shifted token unless it is eof.  */ 
    1323   if (yychar != YYEOF) 
    1324     yychar = YYEMPTY; 
     1329  /* Discard the shifted token.  */ 
     1330  yychar = YYEMPTY; 
    13251331 
    13261332  yystate = yyn; 
     1333  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 
    13271334  *++yyvsp = yylval; 
     1335  YY_IGNORE_MAYBE_UNINITIALIZED_END 
    13281336 
    13291337  goto yynewstate; 
     
    13621370    { 
    13631371        case 5: 
     1372/* Line 1807 of yacc.c  */ 
    13641373#line 76 "convert.y" 
    1365     { initdimprob(1,(yyvsp[(2) - (3)].na),"0","0"); ;} 
     1374    { initdimprob(1,(yyvsp[(2) - (3)].na),"0","0"); } 
    13661375    break; 
    13671376 
    13681377  case 6: 
     1378/* Line 1807 of yacc.c  */ 
    13691379#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"); } 
    13711381    break; 
    13721382 
    13731383  case 7: 
     1384/* Line 1807 of yacc.c  */ 
    13741385#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)); } 
    13761387    break; 
    13771388 
    13781389  case 8: 
     1390/* Line 1807 of yacc.c  */ 
    13791391#line 80 "convert.y" 
    13801392    { 
    13811393            listofmodules = Addtolistnom((yyvsp[(2) - (3)].na),listofmodules,0); 
    13821394            Addmoduletothelist((yyvsp[(2) - (3)].na)); 
    1383         ;} 
     1395        } 
    13841396    break; 
    13851397 
    13861398  case 9: 
     1399/* Line 1807 of yacc.c  */ 
    13871400#line 85 "convert.y" 
    13881401    { 
     
    14001413                exit(0); 
    14011414            } 
    1402         ;} 
     1415        } 
    14031416    break; 
    14041417 
    14051418  case 10: 
     1419/* Line 1807 of yacc.c  */ 
    14061420#line 101 "convert.y" 
    14071421    { 
    14081422            Add_NotGridDepend_Var_1((yyvsp[(3) - (4)].na)); 
    1409         ;} 
     1423        } 
    14101424    break; 
    14111425 
    14121426  case 11: 
     1427/* Line 1807 of yacc.c  */ 
    14131428#line 105 "convert.y" 
    14141429    { 
    14151430            if (!strcasecmp((yyvsp[(2) - (3)].na),"FIXED_GRIDS"))      fixedgrids = 1; 
    14161431            if (!strcasecmp((yyvsp[(2) - (3)].na),"ONLY_FIXED_GRIDS")) onlyfixedgrids = 1; 
    1417         ;} 
     1432        } 
    14181433    break; 
    14191434 
    14201435 
    1421 /* Line 1267 of yacc.c.  */ 
    1422 #line 1420 "convert.tab.c" 
     1436/* Line 1807 of yacc.c  */ 
     1437#line 1438 "convert.tab.c" 
    14231438      default: break; 
    14241439    } 
     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.  */ 
    14251451  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 
    14261452 
     
    14301456 
    14311457  *++yyvsp = yyval; 
    1432  
    14331458 
    14341459  /* Now `shift' the result of the reduction.  Determine what state 
     
    14511476`------------------------------------*/ 
    14521477yyerrlab: 
     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 
    14531482  /* If not already recovering from an error, report this error.  */ 
    14541483  if (!yyerrstatus) 
     
    14581487      yyerror (YY_("syntax error")); 
    14591488#else 
     1489# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 
     1490                                        yyssp, yytoken) 
    14601491      { 
    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; 
    14901517      } 
     1518# undef YYSYNTAX_ERROR 
    14911519#endif 
    14921520    } 
     
    14961524  if (yyerrstatus == 3) 
    14971525    { 
    1498       /* If just tried and failed to reuse look-ahead token after an 
     1526      /* If just tried and failed to reuse lookahead token after an 
    14991527    error, discard it.  */ 
    15001528 
     
    15131541    } 
    15141542 
    1515   /* Else will try to reuse look-ahead token after shifting the error 
     1543  /* Else will try to reuse lookahead token after shifting the error 
    15161544     token.  */ 
    15171545  goto yyerrlab1; 
     
    15471575    { 
    15481576      yyn = yypact[yystate]; 
    1549       if (yyn != YYPACT_NINF) 
     1577      if (!yypact_value_is_default (yyn)) 
    15501578   { 
    15511579     yyn += YYTERROR; 
     
    15701598    } 
    15711599 
    1572   if (yyn == YYFINAL) 
    1573     YYACCEPT; 
    1574  
     1600  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 
    15751601  *++yyvsp = yylval; 
     1602  YY_IGNORE_MAYBE_UNINITIALIZED_END 
    15761603 
    15771604 
     
    15971624  goto yyreturn; 
    15981625 
    1599 #ifndef yyoverflow 
     1626#if !defined yyoverflow || YYERROR_VERBOSE 
    16001627/*-------------------------------------------------. 
    16011628| yyexhaustedlab -- memory exhaustion comes here.  | 
     
    16081635 
    16091636yyreturn: 
    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    } 
    16131645  /* Do not reclaim the symbols of the rule which action triggered 
    16141646     this YYABORT or YYACCEPT.  */ 
     
    16341666 
    16351667 
     1668/* Line 2055 of yacc.c  */ 
    16361669#line 110 "convert.y" 
    16371670 
     
    16571690    int infreegiven ; 
    16581691    int infixedgiven ; 
    1659     int lengthmainfile; 
    16601692 
    16611693    char filetoparse[LONG_FNAME]; 
     
    16871719    tmpuselocallist = (listusemodule *) NULL; 
    16881720    List_ContainsSubroutine = (listnom *) NULL; 
     1721    List_Do_labels = (listname *) NULL; 
    16891722    oldfortran_out = (FILE *) NULL; 
    16901723 
    1691     if (argc < 2) print_usage(); 
    1692      
     1724    if ( argc < 2 ) 
     1725        print_usage(); 
     1726 
    16931727    strcpy(config_file, argv[1]); 
    16941728    strcpy(work_dir, "."); 
     
    17841818            strcpy(filetoparse, argv[i+1]); 
    17851819            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; 
    17971822        } 
    17981823        else if (!strcasecmp(argv[i], "-free")) 
     
    19271952    /* Build new subroutines                                                   */ 
    19281953    firstpass = 0; 
     1954    /* 
     1955    printf("**********************************\n"); 
     1956    printf("SECOND PASSES \n"); 
     1957    printf("**********************************\n"); 
     1958    */ 
    19291959    process_fortran(filetoparse); 
    19301960 
     
    19892019    return 0; 
    19902020} 
    1991  
    19922021#line 2 "convert.yy.c" 
    19932022 
Note: See TracChangeset for help on using the changeset viewer.