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.
main.c in branches/2017/dev_r8126_UKMO_AGRIF_vert_interp/NEMOGCM/EXTERNAL/AGRIF/LIB – NEMO

source: branches/2017/dev_r8126_UKMO_AGRIF_vert_interp/NEMOGCM/EXTERNAL/AGRIF/LIB/main.c @ 8139

Last change on this file since 8139 was 8139, checked in by timgraham, 7 years ago

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

  • Property svn:keywords set to Id
File size: 112.8 KB
Line 
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
8   it under the terms of the GNU General Public License as published by
9   the Free Software Foundation, either version 3 of the License, or
10   (at your option) any later version.
11   
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License for more details.
16   
17   You should have received a copy of the GNU General Public License
18   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20/* As a special exception, you may create a larger work that contains
21   part or all of the Bison parser skeleton and distribute that work
22   under terms of your choice, so long as that work isn't itself a
23   parser generator using the skeleton or a modified version thereof
24   as a parser skeleton.  Alternatively, if you modify or redistribute
25   the parser skeleton itself, you may (at your option) remove this
26   special exception, which will cause the skeleton and the resulting
27   Bison output files to be licensed under the GNU General Public
28   License without this special exception.
29   
30   This special exception was added by the Free Software Foundation in
31   version 2.2 of Bison.  */
32
33/* C LALR(1) parser skeleton written by Richard Stallman, by
34   simplifying the original so-called "semantic" parser.  */
35
36/* All symbols defined below should begin with yy or YY, to avoid
37   infringing on user name space.  This should be done even for local
38   variables, as they might otherwise be expanded by user macros.
39   There are some unavoidable exceptions within include files to
40   define necessary library symbols; they are noted "INFRINGES ON
41   USER NAME SPACE" below.  */
42
43/* Identify Bison output.  */
44#define YYBISON 1
45
46/* Bison version.  */
47#define YYBISON_VERSION "2.7"
48
49/* Skeleton name.  */
50#define YYSKELETON_NAME "yacc.c"
51
52/* Pure parsers.  */
53#define YYPURE 0
54
55/* Push parsers.  */
56#define YYPUSH 0
57
58/* Pull parsers.  */
59#define YYPULL 1
60
61
62/* Substitute the variable and function names.  */
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
117
118/* Tokens.  */
119#ifndef YYTOKENTYPE
120# define YYTOKENTYPE
121   /* Put the tokens into the symbol table, so that GDB and other debuggers
122      know about them.  */
123   enum yytokentype {
124     TOK_SEP = 258,
125     TOK_KIND = 259,
126     TOK_EQUAL = 260,
127     TOK_USE = 261,
128     TOK_MODULEMAIN = 262,
129     TOK_NOTGRIDDEP = 263,
130     TOK_USEITEM = 264,
131     TOK_NAME = 265,
132     TOK_CSTINT = 266,
133     TOK_PROBTYPE = 267
134   };
135#endif
136
137
138#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
139typedef union YYSTYPE
140{
141/* Line 387 of yacc.c  */
142#line 52 "convert.y"
143
144    char na[LONG_M];
145
146
147/* Line 387 of yacc.c  */
148#line 149 "convert.tab.c"
149} YYSTYPE;
150# define YYSTYPE_IS_TRIVIAL 1
151# define yystype YYSTYPE /* obsolescent; will be withdrawn */
152# define YYSTYPE_IS_DECLARED 1
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 */
170
171
172
173/* Copy the second part of user declarations.  */
174
175/* Line 390 of yacc.c  */
176#line 177 "convert.tab.c"
177
178#ifdef short
179# undef short
180#endif
181
182#ifdef YYTYPE_UINT8
183typedef YYTYPE_UINT8 yytype_uint8;
184#else
185typedef unsigned char yytype_uint8;
186#endif
187
188#ifdef YYTYPE_INT8
189typedef YYTYPE_INT8 yytype_int8;
190#elif (defined __STDC__ || defined __C99__FUNC__ \
191     || defined __cplusplus || defined _MSC_VER)
192typedef signed char yytype_int8;
193#else
194typedef short int yytype_int8;
195#endif
196
197#ifdef YYTYPE_UINT16
198typedef YYTYPE_UINT16 yytype_uint16;
199#else
200typedef unsigned short int yytype_uint16;
201#endif
202
203#ifdef YYTYPE_INT16
204typedef YYTYPE_INT16 yytype_int16;
205#else
206typedef short int yytype_int16;
207#endif
208
209#ifndef YYSIZE_T
210# ifdef __SIZE_TYPE__
211#  define YYSIZE_T __SIZE_TYPE__
212# elif defined size_t
213#  define YYSIZE_T size_t
214# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
215     || defined __cplusplus || defined _MSC_VER)
216#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
217#  define YYSIZE_T size_t
218# else
219#  define YYSIZE_T unsigned int
220# endif
221#endif
222
223#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
224
225#ifndef YY_
226# if defined YYENABLE_NLS && YYENABLE_NLS
227#  if ENABLE_NLS
228#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
229#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
230#  endif
231# endif
232# ifndef YY_
233#  define YY_(Msgid) Msgid
234# endif
235#endif
236
237/* Suppress unused-variable warnings by "using" E.  */
238#if ! defined lint || defined __GNUC__
239# define YYUSE(E) ((void) (E))
240#else
241# define YYUSE(E) /* empty */
242#endif
243
244/* Identity function, used to suppress warnings about constant conditions.  */
245#ifndef lint
246# define YYID(N) (N)
247#else
248#if (defined __STDC__ || defined __C99__FUNC__ \
249     || defined __cplusplus || defined _MSC_VER)
250static int
251YYID (int yyi)
252#else
253static int
254YYID (yyi)
255    int yyi;
256#endif
257{
258  return yyi;
259}
260#endif
261
262#if ! defined yyoverflow || YYERROR_VERBOSE
263
264/* The parser invokes alloca or malloc; define the necessary symbols.  */
265
266# ifdef YYSTACK_USE_ALLOCA
267#  if YYSTACK_USE_ALLOCA
268#   ifdef __GNUC__
269#    define YYSTACK_ALLOC __builtin_alloca
270#   elif defined __BUILTIN_VA_ARG_INCR
271#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
272#   elif defined _AIX
273#    define YYSTACK_ALLOC __alloca
274#   elif defined _MSC_VER
275#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
276#    define alloca _alloca
277#   else
278#    define YYSTACK_ALLOC alloca
279#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
280     || defined __cplusplus || defined _MSC_VER)
281#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
282      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
283#     ifndef EXIT_SUCCESS
284#      define EXIT_SUCCESS 0
285#     endif
286#    endif
287#   endif
288#  endif
289# endif
290
291# ifdef YYSTACK_ALLOC
292   /* Pacify GCC's `empty if-body' warning.  */
293#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
294#  ifndef YYSTACK_ALLOC_MAXIMUM
295    /* The OS might guarantee only one guard page at the bottom of the stack,
296       and a page size can be as small as 4096 bytes.  So we cannot safely
297       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
298       to allow for a few compiler-allocated temporary stack slots.  */
299#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
300#  endif
301# else
302#  define YYSTACK_ALLOC YYMALLOC
303#  define YYSTACK_FREE YYFREE
304#  ifndef YYSTACK_ALLOC_MAXIMUM
305#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
306#  endif
307#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
308       && ! ((defined YYMALLOC || defined malloc) \
309        && (defined YYFREE || defined free)))
310#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
311#   ifndef EXIT_SUCCESS
312#    define EXIT_SUCCESS 0
313#   endif
314#  endif
315#  ifndef YYMALLOC
316#   define YYMALLOC malloc
317#   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
318     || defined __cplusplus || defined _MSC_VER)
319void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
320#   endif
321#  endif
322#  ifndef YYFREE
323#   define YYFREE free
324#   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
325     || defined __cplusplus || defined _MSC_VER)
326void free (void *); /* INFRINGES ON USER NAME SPACE */
327#   endif
328#  endif
329# endif
330#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
331
332
333#if (! defined yyoverflow \
334     && (! defined __cplusplus \
335    || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
336
337/* A type that is properly aligned for any stack member.  */
338union yyalloc
339{
340  yytype_int16 yyss_alloc;
341  YYSTYPE yyvs_alloc;
342};
343
344/* The size of the maximum gap between one aligned stack and the next.  */
345# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
346
347/* The size of an array large to enough to hold all stacks, each with
348   N elements.  */
349# define YYSTACK_BYTES(N) \
350     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
351      + YYSTACK_GAP_MAXIMUM)
352
353# define YYCOPY_NEEDED 1
354
355/* Relocate STACK from its old location to the new one.  The
356   local variables YYSIZE and YYSTACKSIZE give the old and new number of
357   elements in the stack, and YYPTR gives the new location of the
358   stack.  Advance YYPTR to a properly aligned location for the next
359   stack.  */
360# define YYSTACK_RELOCATE(Stack_alloc, Stack)            \
361    do                           \
362      {                          \
363   YYSIZE_T yynewbytes;                \
364   YYCOPY (&yyptr->Stack_alloc, Stack, yysize);       \
365   Stack = &yyptr->Stack_alloc;              \
366   yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
367   yyptr += yynewbytes / sizeof (*yyptr);          \
368      }                          \
369    while (YYID (0))
370
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 */
392
393/* YYFINAL -- State number of the termination state.  */
394#define YYFINAL  2
395/* YYLAST -- Last index in YYTABLE.  */
396#define YYLAST   29
397
398/* YYNTOKENS -- Number of terminals.  */
399#define YYNTOKENS  16
400/* YYNNTS -- Number of nonterminals.  */
401#define YYNNTS  3
402/* YYNRULES -- Number of rules.  */
403#define YYNRULES  11
404/* YYNRULES -- Number of states.  */
405#define YYNSTATES  29
406
407/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
408#define YYUNDEFTOK  2
409#define YYMAXUTOK   267
410
411#define YYTRANSLATE(YYX)                  \
412  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
413
414/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
415static const yytype_uint8 yytranslate[] =
416{
417       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
418      15,     2,     2,     2,     2,     2,     2,     2,     2,     2,
419       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
420       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
421       2,     2,     2,     2,    13,     2,     2,     2,     2,     2,
422       2,     2,     2,     2,     2,     2,     2,     2,     2,    14,
423       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
424       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
425       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
426       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
427       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
428       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
429       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
430       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
431       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
432       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
433       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
434       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
435       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
436       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
437       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
438       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
439       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
440       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
441       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
442       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
443       5,     6,     7,     8,     9,    10,    11,    12
444};
445
446#if YYDEBUG
447/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
448   YYRHS.  */
449static const yytype_uint8 yyprhs[] =
450{
451       0,     0,     3,     4,     7,     9,    13,    19,    27,    31,
452      37,    42
453};
454
455/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
456static const yytype_int8 yyrhs[] =
457{
458      17,     0,    -1,    -1,    17,    18,    -1,    15,    -1,    12,
459      10,    14,    -1,    12,    10,    13,    10,    14,    -1,    12,
460      10,    13,    10,    13,    10,    14,    -1,     7,    10,    14,
461      -1,     4,    10,     5,    11,    14,    -1,     8,     3,    10,
462      14,    -1,     6,     9,    14,    -1
463};
464
465/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
466static const yytype_uint8 yyrline[] =
467{
468       0,    71,    71,    72,    75,    76,    77,    78,    79,    84,
469     100,   104
470};
471#endif
472
473#if YYDEBUG || YYERROR_VERBOSE || 0
474/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
475   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
476static const char *const yytname[] =
477{
478  "$end", "error", "$undefined", "TOK_SEP", "TOK_KIND", "TOK_EQUAL",
479  "TOK_USE", "TOK_MODULEMAIN", "TOK_NOTGRIDDEP", "TOK_USEITEM", "TOK_NAME",
480  "TOK_CSTINT", "TOK_PROBTYPE", "','", "';'", "'\\n'", "$accept", "input",
481  "line", YY_NULL
482};
483#endif
484
485# ifdef YYPRINT
486/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
487   token YYLEX-NUM.  */
488static const yytype_uint16 yytoknum[] =
489{
490       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
491     265,   266,   267,    44,    59,    10
492};
493# endif
494
495/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
496static const yytype_uint8 yyr1[] =
497{
498       0,    16,    17,    17,    18,    18,    18,    18,    18,    18,
499      18,    18
500};
501
502/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
503static const yytype_uint8 yyr2[] =
504{
505       0,     2,     0,     2,     1,     3,     5,     7,     3,     5,
506       4,     3
507};
508
509/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
510   Performed when YYTABLE doesn't specify something else to do.  Zero
511   means the default is an error.  */
512static const yytype_uint8 yydefact[] =
513{
514       2,     0,     1,     0,     0,     0,     0,     0,     4,     3,
515       0,     0,     0,     0,     0,     0,    11,     8,     0,     0,
516       5,     0,    10,     0,     9,     0,     6,     0,     7
517};
518
519/* YYDEFGOTO[NTERM-NUM].  */
520static const yytype_int8 yydefgoto[] =
521{
522      -1,     1,     9
523};
524
525/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
526   STATE-NUM.  */
527#define YYPACT_NINF -13
528static const yytype_int8 yypact[] =
529{
530     -13,     0,   -13,    -7,     2,    -5,    10,     4,   -13,   -13,
531      11,     3,     5,     8,   -12,     9,   -13,   -13,     7,    12,
532     -13,    13,   -13,    -4,   -13,    14,   -13,    15,   -13
533};
534
535/* YYPGOTO[NTERM-NUM].  */
536static const yytype_int8 yypgoto[] =
537{
538     -13,   -13,   -13
539};
540
541/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
542   positive, shift that token.  If negative, reduce the rule which
543   number is the opposite.  If YYTABLE_NINF, syntax error.  */
544#define YYTABLE_NINF -1
545static const yytype_uint8 yytable[] =
546{
547       2,    19,    20,    10,     3,    12,     4,     5,     6,    25,
548      26,    11,     7,    13,    14,     8,    15,    16,    18,    17,
549      21,    22,    23,     0,    27,     0,     0,    24,     0,    28
550};
551
552#define yypact_value_is_default(Yystate) \
553  (!!((Yystate) == (-13)))
554
555#define yytable_value_is_error(Yytable_value) \
556  YYID (0)
557
558static const yytype_int8 yycheck[] =
559{
560       0,    13,    14,    10,     4,    10,     6,     7,     8,    13,
561      14,     9,    12,     3,    10,    15,     5,    14,    10,    14,
562      11,    14,    10,    -1,    10,    -1,    -1,    14,    -1,    14
563};
564
565/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
566   symbol of state STATE-NUM.  */
567static const yytype_uint8 yystos[] =
568{
569       0,    17,     0,     4,     6,     7,     8,    12,    15,    18,
570      10,     9,    10,     3,    10,     5,    14,    14,    10,    13,
571      14,    11,    14,    10,    14,    13,    14,    10,    14
572};
573
574#define yyerrok      (yyerrstatus = 0)
575#define yyclearin (yychar = YYEMPTY)
576#define YYEMPTY      (-2)
577#define YYEOF     0
578
579#define YYACCEPT  goto yyacceptlab
580#define YYABORT      goto yyabortlab
581#define YYERROR      goto yyerrorlab
582
583
584/* Like YYERROR except do call yyerror.  This remains here temporarily
585   to ease the transition to the new meaning of YYERROR, for GCC.
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.  */
590
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
598
599#define YYRECOVERING()  (!!yyerrstatus)
600
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    {                                                           \
613      yyerror (YY_("syntax error: cannot back up")); \
614      YYERROR;                   \
615    }                      \
616while (YYID (0))
617
618/* Error token number */
619#define YYTERROR  1
620#define YYERRCODE 256
621
622
623/* This macro is provided for backward compatibility. */
624#ifndef YY_LOCATION_PRINT
625# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
626#endif
627
628
629/* YYLEX -- calling `yylex' with the right arguments.  */
630#ifdef YYLEX_PARAM
631# define YYLEX yylex (YYLEX_PARAM)
632#else
633# define YYLEX yylex ()
634#endif
635
636/* Enable debugging if requested.  */
637#if YYDEBUG
638
639# ifndef YYFPRINTF
640#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
641#  define YYFPRINTF fprintf
642# endif
643
644# define YYDPRINTF(Args)         \
645do {                 \
646  if (yydebug)             \
647    YYFPRINTF Args;           \
648} while (YYID (0))
649
650# define YY_SYMBOL_PRINT(Title, Type, Value, Location)           \
651do {                            \
652  if (yydebug)                        \
653    {                           \
654      YYFPRINTF (stderr, "%s ", Title);                 \
655      yy_symbol_print (stderr,                    \
656        Type, Value); \
657      YYFPRINTF (stderr, "\n");                   \
658    }                           \
659} while (YYID (0))
660
661
662/*--------------------------------.
663| Print this symbol on YYOUTPUT.  |
664`--------------------------------*/
665
666/*ARGSUSED*/
667#if (defined __STDC__ || defined __C99__FUNC__ \
668     || defined __cplusplus || defined _MSC_VER)
669static void
670yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
671#else
672static void
673yy_symbol_value_print (yyoutput, yytype, yyvaluep)
674    FILE *yyoutput;
675    int yytype;
676    YYSTYPE const * const yyvaluep;
677#endif
678{
679  FILE *yyo = yyoutput;
680  YYUSE (yyo);
681  if (!yyvaluep)
682    return;
683# ifdef YYPRINT
684  if (yytype < YYNTOKENS)
685    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
686# else
687  YYUSE (yyoutput);
688# endif
689  switch (yytype)
690    {
691      default:
692        break;
693    }
694}
695
696
697/*--------------------------------.
698| Print this symbol on YYOUTPUT.  |
699`--------------------------------*/
700
701#if (defined __STDC__ || defined __C99__FUNC__ \
702     || defined __cplusplus || defined _MSC_VER)
703static void
704yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
705#else
706static void
707yy_symbol_print (yyoutput, yytype, yyvaluep)
708    FILE *yyoutput;
709    int yytype;
710    YYSTYPE const * const yyvaluep;
711#endif
712{
713  if (yytype < YYNTOKENS)
714    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
715  else
716    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
717
718  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
719  YYFPRINTF (yyoutput, ")");
720}
721
722/*------------------------------------------------------------------.
723| yy_stack_print -- Print the state stack from its BOTTOM up to its |
724| TOP (included).                                                   |
725`------------------------------------------------------------------*/
726
727#if (defined __STDC__ || defined __C99__FUNC__ \
728     || defined __cplusplus || defined _MSC_VER)
729static void
730yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
731#else
732static void
733yy_stack_print (yybottom, yytop)
734    yytype_int16 *yybottom;
735    yytype_int16 *yytop;
736#endif
737{
738  YYFPRINTF (stderr, "Stack now");
739  for (; yybottom <= yytop; yybottom++)
740    {
741      int yybot = *yybottom;
742      YYFPRINTF (stderr, " %d", yybot);
743    }
744  YYFPRINTF (stderr, "\n");
745}
746
747# define YY_STACK_PRINT(Bottom, Top)            \
748do {                       \
749  if (yydebug)                   \
750    yy_stack_print ((Bottom), (Top));           \
751} while (YYID (0))
752
753
754/*------------------------------------------------.
755| Report that the YYRULE is going to be reduced.  |
756`------------------------------------------------*/
757
758#if (defined __STDC__ || defined __C99__FUNC__ \
759     || defined __cplusplus || defined _MSC_VER)
760static void
761yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
762#else
763static void
764yy_reduce_print (yyvsp, yyrule)
765    YYSTYPE *yyvsp;
766    int yyrule;
767#endif
768{
769  int yynrhs = yyr2[yyrule];
770  int yyi;
771  unsigned long int yylno = yyrline[yyrule];
772  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
773        yyrule - 1, yylno);
774  /* The symbols being reduced.  */
775  for (yyi = 0; yyi < yynrhs; yyi++)
776    {
777      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
778      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
779             &(yyvsp[(yyi + 1) - (yynrhs)])
780                         );
781      YYFPRINTF (stderr, "\n");
782    }
783}
784
785# define YY_REDUCE_PRINT(Rule)      \
786do {              \
787  if (yydebug)          \
788    yy_reduce_print (yyvsp, Rule); \
789} while (YYID (0))
790
791/* Nonzero means print parse trace.  It is left uninitialized so that
792   multiple parsers can coexist.  */
793int yydebug;
794#else /* !YYDEBUG */
795# define YYDPRINTF(Args)
796# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
797# define YY_STACK_PRINT(Bottom, Top)
798# define YY_REDUCE_PRINT(Rule)
799#endif /* !YYDEBUG */
800
801
802/* YYINITDEPTH -- initial size of the parser's stacks.  */
803#ifndef  YYINITDEPTH
804# define YYINITDEPTH 200
805#endif
806
807/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
808   if the built-in stack extension method is used).
809
810   Do not make this value too large; the results are undefined if
811   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
812   evaluated with infinite-precision integer arithmetic.  */
813
814#ifndef YYMAXDEPTH
815# define YYMAXDEPTH 10000
816#endif
817
818
819#if YYERROR_VERBOSE
820
821# ifndef yystrlen
822#  if defined __GLIBC__ && defined _STRING_H
823#   define yystrlen strlen
824#  else
825/* Return the length of YYSTR.  */
826#if (defined __STDC__ || defined __C99__FUNC__ \
827     || defined __cplusplus || defined _MSC_VER)
828static YYSIZE_T
829yystrlen (const char *yystr)
830#else
831static YYSIZE_T
832yystrlen (yystr)
833    const char *yystr;
834#endif
835{
836  YYSIZE_T yylen;
837  for (yylen = 0; yystr[yylen]; yylen++)
838    continue;
839  return yylen;
840}
841#  endif
842# endif
843
844# ifndef yystpcpy
845#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
846#   define yystpcpy stpcpy
847#  else
848/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
849   YYDEST.  */
850#if (defined __STDC__ || defined __C99__FUNC__ \
851     || defined __cplusplus || defined _MSC_VER)
852static char *
853yystpcpy (char *yydest, const char *yysrc)
854#else
855static char *
856yystpcpy (yydest, yysrc)
857    char *yydest;
858    const char *yysrc;
859#endif
860{
861  char *yyd = yydest;
862  const char *yys = yysrc;
863
864  while ((*yyd++ = *yys++) != '\0')
865    continue;
866
867  return yyd - 1;
868}
869#  endif
870# endif
871
872# ifndef yytnamerr
873/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
874   quotes and backslashes, so that it's suitable for yyerror.  The
875   heuristic is that double-quoting is unnecessary unless the string
876   contains an apostrophe, a comma, or backslash (other than
877   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
878   null, do not copy; instead, return the length of what the result
879   would have been.  */
880static YYSIZE_T
881yytnamerr (char *yyres, const char *yystr)
882{
883  if (*yystr == '"')
884    {
885      YYSIZE_T yyn = 0;
886      char const *yyp = yystr;
887
888      for (;;)
889   switch (*++yyp)
890     {
891     case '\'':
892     case ',':
893       goto do_not_strip_quotes;
894
895     case '\\':
896       if (*++yyp != '\\')
897         goto do_not_strip_quotes;
898       /* Fall through.  */
899     default:
900       if (yyres)
901         yyres[yyn] = *yyp;
902       yyn++;
903       break;
904
905     case '"':
906       if (yyres)
907         yyres[yyn] = '\0';
908       return yyn;
909     }
910    do_not_strip_quotes: ;
911    }
912
913  if (! yyres)
914    return yystrlen (yystr);
915
916  return yystpcpy (yyres, yystr) - yyres;
917}
918# endif
919
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)
971    {
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        }
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;
1057}
1058#endif /* YYERROR_VERBOSE */
1059
1060/*-----------------------------------------------.
1061| Release the memory associated to this symbol.  |
1062`-----------------------------------------------*/
1063
1064/*ARGSUSED*/
1065#if (defined __STDC__ || defined __C99__FUNC__ \
1066     || defined __cplusplus || defined _MSC_VER)
1067static void
1068yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1069#else
1070static void
1071yydestruct (yymsg, yytype, yyvaluep)
1072    const char *yymsg;
1073    int yytype;
1074    YYSTYPE *yyvaluep;
1075#endif
1076{
1077  YYUSE (yyvaluep);
1078
1079  if (!yymsg)
1080    yymsg = "Deleting";
1081  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1082
1083  switch (yytype)
1084    {
1085
1086      default:
1087        break;
1088    }
1089}
1090
1091
1092
1093
1094/* The lookahead symbol.  */
1095int yychar;
1096
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);
1108
1109/* Number of syntax errors so far.  */
1110int yynerrs;
1111
1112
1113/*----------.
1114| yyparse.  |
1115`----------*/
1116
1117#ifdef YYPARSE_PARAM
1118#if (defined __STDC__ || defined __C99__FUNC__ \
1119     || defined __cplusplus || defined _MSC_VER)
1120int
1121yyparse (void *YYPARSE_PARAM)
1122#else
1123int
1124yyparse (YYPARSE_PARAM)
1125    void *YYPARSE_PARAM;
1126#endif
1127#else /* ! YYPARSE_PARAM */
1128#if (defined __STDC__ || defined __C99__FUNC__ \
1129     || defined __cplusplus || defined _MSC_VER)
1130int
1131yyparse (void)
1132#else
1133int
1134yyparse ()
1135
1136#endif
1137#endif
1138{
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
1162  int yyn;
1163  int yyresult;
1164  /* Lookahead token as an internal (translated) token number.  */
1165  int yytoken = 0;
1166  /* The variables used to return semantic value and location from the
1167     action routines.  */
1168  YYSTYPE yyval;
1169
1170#if YYERROR_VERBOSE
1171  /* Buffer for error messages, and its allocated size.  */
1172  char yymsgbuf[128];
1173  char *yymsg = yymsgbuf;
1174  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1175#endif
1176
1177#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1178
1179  /* The number of symbols on the RHS of the reduced rule.
1180     Keep to zero when no symbol should be popped.  */
1181  int yylen = 0;
1182
1183  yyssp = yyss = yyssa;
1184  yyvsp = yyvs = yyvsa;
1185  yystacksize = YYINITDEPTH;
1186
1187  YYDPRINTF ((stderr, "Starting parse\n"));
1188
1189  yystate = 0;
1190  yyerrstatus = 0;
1191  yynerrs = 0;
1192  yychar = YYEMPTY; /* Cause a token to be read.  */
1193  goto yysetstate;
1194
1195/*------------------------------------------------------------.
1196| yynewstate -- Push a new state, which is found in yystate.  |
1197`------------------------------------------------------------*/
1198 yynewstate:
1199  /* In all cases, when you get here, the value and location stacks
1200     have just been pushed.  So pushing a state here evens the stacks.  */
1201  yyssp++;
1202
1203 yysetstate:
1204  *yyssp = yystate;
1205
1206  if (yyss + yystacksize - 1 <= yyssp)
1207    {
1208      /* Get the current used size of the three stacks, in elements.  */
1209      YYSIZE_T yysize = yyssp - yyss + 1;
1210
1211#ifdef yyoverflow
1212      {
1213   /* Give user a chance to reallocate the stack.  Use copies of
1214      these so that the &'s don't force the real ones into
1215      memory.  */
1216   YYSTYPE *yyvs1 = yyvs;
1217   yytype_int16 *yyss1 = yyss;
1218
1219   /* Each stack pointer address is followed by the size of the
1220      data in use in that stack, in bytes.  This used to be a
1221      conditional around just the two extra args, but that might
1222      be undefined if yyoverflow is a macro.  */
1223   yyoverflow (YY_("memory exhausted"),
1224          &yyss1, yysize * sizeof (*yyssp),
1225          &yyvs1, yysize * sizeof (*yyvsp),
1226          &yystacksize);
1227
1228   yyss = yyss1;
1229   yyvs = yyvs1;
1230      }
1231#else /* no yyoverflow */
1232# ifndef YYSTACK_RELOCATE
1233      goto yyexhaustedlab;
1234# else
1235      /* Extend the stack our own way.  */
1236      if (YYMAXDEPTH <= yystacksize)
1237   goto yyexhaustedlab;
1238      yystacksize *= 2;
1239      if (YYMAXDEPTH < yystacksize)
1240   yystacksize = YYMAXDEPTH;
1241
1242      {
1243   yytype_int16 *yyss1 = yyss;
1244   union yyalloc *yyptr =
1245     (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1246   if (! yyptr)
1247     goto yyexhaustedlab;
1248   YYSTACK_RELOCATE (yyss_alloc, yyss);
1249   YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1250#  undef YYSTACK_RELOCATE
1251   if (yyss1 != yyssa)
1252     YYSTACK_FREE (yyss1);
1253      }
1254# endif
1255#endif /* no yyoverflow */
1256
1257      yyssp = yyss + yysize - 1;
1258      yyvsp = yyvs + yysize - 1;
1259
1260      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1261        (unsigned long int) yystacksize));
1262
1263      if (yyss + yystacksize - 1 <= yyssp)
1264   YYABORT;
1265    }
1266
1267  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1268
1269  if (yystate == YYFINAL)
1270    YYACCEPT;
1271
1272  goto yybackup;
1273
1274/*-----------.
1275| yybackup.  |
1276`-----------*/
1277yybackup:
1278
1279  /* Do appropriate processing given the current state.  Read a
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.  */
1283  yyn = yypact[yystate];
1284  if (yypact_value_is_default (yyn))
1285    goto yydefault;
1286
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.  */
1290  if (yychar == YYEMPTY)
1291    {
1292      YYDPRINTF ((stderr, "Reading a token: "));
1293      yychar = YYLEX;
1294    }
1295
1296  if (yychar <= YYEOF)
1297    {
1298      yychar = yytoken = YYEOF;
1299      YYDPRINTF ((stderr, "Now at end of input.\n"));
1300    }
1301  else
1302    {
1303      yytoken = YYTRANSLATE (yychar);
1304      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1305    }
1306
1307  /* If the proper action on seeing token YYTOKEN is to reduce or to
1308     detect an error, take that action.  */
1309  yyn += yytoken;
1310  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1311    goto yydefault;
1312  yyn = yytable[yyn];
1313  if (yyn <= 0)
1314    {
1315      if (yytable_value_is_error (yyn))
1316        goto yyerrlab;
1317      yyn = -yyn;
1318      goto yyreduce;
1319    }
1320
1321  /* Count tokens shifted since error; after three, turn off error
1322     status.  */
1323  if (yyerrstatus)
1324    yyerrstatus--;
1325
1326  /* Shift the lookahead token.  */
1327  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1328
1329  /* Discard the shifted token.  */
1330  yychar = YYEMPTY;
1331
1332  yystate = yyn;
1333  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1334  *++yyvsp = yylval;
1335  YY_IGNORE_MAYBE_UNINITIALIZED_END
1336
1337  goto yynewstate;
1338
1339
1340/*-----------------------------------------------------------.
1341| yydefault -- do the default action for the current state.  |
1342`-----------------------------------------------------------*/
1343yydefault:
1344  yyn = yydefact[yystate];
1345  if (yyn == 0)
1346    goto yyerrlab;
1347  goto yyreduce;
1348
1349
1350/*-----------------------------.
1351| yyreduce -- Do a reduction.  |
1352`-----------------------------*/
1353yyreduce:
1354  /* yyn is the number of a rule to reduce with.  */
1355  yylen = yyr2[yyn];
1356
1357  /* If YYLEN is nonzero, implement the default value of the action:
1358     `$$ = $1'.
1359
1360     Otherwise, the following line sets YYVAL to garbage.
1361     This behavior is undocumented and Bison
1362     users should not rely upon it.  Assigning to YYVAL
1363     unconditionally makes the parser a bit smaller, and it avoids a
1364     GCC warning that YYVAL may be used uninitialized.  */
1365  yyval = yyvsp[1-yylen];
1366
1367
1368  YY_REDUCE_PRINT (yyn);
1369  switch (yyn)
1370    {
1371        case 5:
1372/* Line 1807 of yacc.c  */
1373#line 76 "convert.y"
1374    { initdimprob(1,(yyvsp[(2) - (3)].na),"0","0"); }
1375    break;
1376
1377  case 6:
1378/* Line 1807 of yacc.c  */
1379#line 77 "convert.y"
1380    { initdimprob(2,(yyvsp[(2) - (5)].na), (yyvsp[(4) - (5)].na),"0"); }
1381    break;
1382
1383  case 7:
1384/* Line 1807 of yacc.c  */
1385#line 78 "convert.y"
1386    { initdimprob(3,(yyvsp[(2) - (7)].na), (yyvsp[(4) - (7)].na), (yyvsp[(6) - (7)].na)); }
1387    break;
1388
1389  case 8:
1390/* Line 1807 of yacc.c  */
1391#line 80 "convert.y"
1392    {
1393            listofmodules = Addtolistnom((yyvsp[(2) - (3)].na),listofmodules,0);
1394            Addmoduletothelist((yyvsp[(2) - (3)].na));
1395        }
1396    break;
1397
1398  case 9:
1399/* Line 1807 of yacc.c  */
1400#line 85 "convert.y"
1401    {
1402            if (!strcasecmp((yyvsp[(4) - (5)].na),"4"))
1403            {
1404                listofkind = Addtolistnom((yyvsp[(2) - (5)].na),listofkind,4);
1405            }
1406            else if (!strcasecmp((yyvsp[(4) - (5)].na),"8"))
1407            {
1408                listofkind = Addtolistnom((yyvsp[(2) - (5)].na),listofkind,8);
1409            }
1410            else
1411            {
1412                printf("##\n## Unknown kind type : %s (must be 4 or 8)\n##",(yyvsp[(4) - (5)].na));
1413                exit(0);
1414            }
1415        }
1416    break;
1417
1418  case 10:
1419/* Line 1807 of yacc.c  */
1420#line 101 "convert.y"
1421    {
1422            Add_NotGridDepend_Var_1((yyvsp[(3) - (4)].na));
1423        }
1424    break;
1425
1426  case 11:
1427/* Line 1807 of yacc.c  */
1428#line 105 "convert.y"
1429    {
1430            if (!strcasecmp((yyvsp[(2) - (3)].na),"FIXED_GRIDS"))      fixedgrids = 1;
1431            if (!strcasecmp((yyvsp[(2) - (3)].na),"ONLY_FIXED_GRIDS")) onlyfixedgrids = 1;
1432        }
1433    break;
1434
1435
1436/* Line 1807 of yacc.c  */
1437#line 1438 "convert.tab.c"
1438      default: break;
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.  */
1451  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1452
1453  YYPOPSTACK (yylen);
1454  yylen = 0;
1455  YY_STACK_PRINT (yyss, yyssp);
1456
1457  *++yyvsp = yyval;
1458
1459  /* Now `shift' the result of the reduction.  Determine what state
1460     that goes to, based on the state we popped back to and the rule
1461     number reduced by.  */
1462
1463  yyn = yyr1[yyn];
1464
1465  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1466  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1467    yystate = yytable[yystate];
1468  else
1469    yystate = yydefgoto[yyn - YYNTOKENS];
1470
1471  goto yynewstate;
1472
1473
1474/*------------------------------------.
1475| yyerrlab -- here on detecting error |
1476`------------------------------------*/
1477yyerrlab:
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
1482  /* If not already recovering from an error, report this error.  */
1483  if (!yyerrstatus)
1484    {
1485      ++yynerrs;
1486#if ! YYERROR_VERBOSE
1487      yyerror (YY_("syntax error"));
1488#else
1489# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1490                                        yyssp, yytoken)
1491      {
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;
1517      }
1518# undef YYSYNTAX_ERROR
1519#endif
1520    }
1521
1522
1523
1524  if (yyerrstatus == 3)
1525    {
1526      /* If just tried and failed to reuse lookahead token after an
1527    error, discard it.  */
1528
1529      if (yychar <= YYEOF)
1530   {
1531     /* Return failure if at end of input.  */
1532     if (yychar == YYEOF)
1533       YYABORT;
1534   }
1535      else
1536   {
1537     yydestruct ("Error: discarding",
1538            yytoken, &yylval);
1539     yychar = YYEMPTY;
1540   }
1541    }
1542
1543  /* Else will try to reuse lookahead token after shifting the error
1544     token.  */
1545  goto yyerrlab1;
1546
1547
1548/*---------------------------------------------------.
1549| yyerrorlab -- error raised explicitly by YYERROR.  |
1550`---------------------------------------------------*/
1551yyerrorlab:
1552
1553  /* Pacify compilers like GCC when the user code never invokes
1554     YYERROR and the label yyerrorlab therefore never appears in user
1555     code.  */
1556  if (/*CONSTCOND*/ 0)
1557     goto yyerrorlab;
1558
1559  /* Do not reclaim the symbols of the rule which action triggered
1560     this YYERROR.  */
1561  YYPOPSTACK (yylen);
1562  yylen = 0;
1563  YY_STACK_PRINT (yyss, yyssp);
1564  yystate = *yyssp;
1565  goto yyerrlab1;
1566
1567
1568/*-------------------------------------------------------------.
1569| yyerrlab1 -- common code for both syntax error and YYERROR.  |
1570`-------------------------------------------------------------*/
1571yyerrlab1:
1572  yyerrstatus = 3;   /* Each real token shifted decrements this.  */
1573
1574  for (;;)
1575    {
1576      yyn = yypact[yystate];
1577      if (!yypact_value_is_default (yyn))
1578   {
1579     yyn += YYTERROR;
1580     if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1581       {
1582         yyn = yytable[yyn];
1583         if (0 < yyn)
1584      break;
1585       }
1586   }
1587
1588      /* Pop the current state because it cannot handle the error token.  */
1589      if (yyssp == yyss)
1590   YYABORT;
1591
1592
1593      yydestruct ("Error: popping",
1594        yystos[yystate], yyvsp);
1595      YYPOPSTACK (1);
1596      yystate = *yyssp;
1597      YY_STACK_PRINT (yyss, yyssp);
1598    }
1599
1600  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1601  *++yyvsp = yylval;
1602  YY_IGNORE_MAYBE_UNINITIALIZED_END
1603
1604
1605  /* Shift the error token.  */
1606  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1607
1608  yystate = yyn;
1609  goto yynewstate;
1610
1611
1612/*-------------------------------------.
1613| yyacceptlab -- YYACCEPT comes here.  |
1614`-------------------------------------*/
1615yyacceptlab:
1616  yyresult = 0;
1617  goto yyreturn;
1618
1619/*-----------------------------------.
1620| yyabortlab -- YYABORT comes here.  |
1621`-----------------------------------*/
1622yyabortlab:
1623  yyresult = 1;
1624  goto yyreturn;
1625
1626#if !defined yyoverflow || YYERROR_VERBOSE
1627/*-------------------------------------------------.
1628| yyexhaustedlab -- memory exhaustion comes here.  |
1629`-------------------------------------------------*/
1630yyexhaustedlab:
1631  yyerror (YY_("memory exhausted"));
1632  yyresult = 2;
1633  /* Fall through.  */
1634#endif
1635
1636yyreturn:
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    }
1645  /* Do not reclaim the symbols of the rule which action triggered
1646     this YYABORT or YYACCEPT.  */
1647  YYPOPSTACK (yylen);
1648  YY_STACK_PRINT (yyss, yyssp);
1649  while (yyssp != yyss)
1650    {
1651      yydestruct ("Cleanup: popping",
1652        yystos[*yyssp], yyvsp);
1653      YYPOPSTACK (1);
1654    }
1655#ifndef yyoverflow
1656  if (yyss != yyssa)
1657    YYSTACK_FREE (yyss);
1658#endif
1659#if YYERROR_VERBOSE
1660  if (yymsg != yymsgbuf)
1661    YYSTACK_FREE (yymsg);
1662#endif
1663  /* Make sure YYID is used.  */
1664  return YYID (yyresult);
1665}
1666
1667
1668/* Line 2055 of yacc.c  */
1669#line 110 "convert.y"
1670
1671
1672void print_usage()
1673{
1674    printf("usage : conv <config_file> -convfile  <FILENAME>\n");
1675    printf(" [-workdir <directory>] [-incdir <directory>]\n");
1676    printf(" [-comdirin   <directory>] [-comdirout <directory>]\n");
1677    printf(" [-convfile  <FILENAME>] [-SubloopScalar] [-SubloopScalar1] \n");
1678    printf(" [-free|-fixed]\n");
1679    exit(0);
1680}
1681
1682int main(int argc,char *argv[])
1683{
1684    extern FILE * convert_in ;
1685    FILE *dependglobaloutput;
1686    int i;
1687    listnom *parcours;
1688    listvar *newvar;
1689    int stylegiven = 0;
1690    int infreegiven ;
1691    int infixedgiven ;
1692
1693    char filetoparse[LONG_FNAME];
1694
1695/******************************************************************************/
1696/*  1-  Variables initialization                                              */
1697/******************************************************************************/
1698    List_Global_Var = (listvar *) NULL;
1699    List_GlobalParameter_Var = (listvar *) NULL;
1700    List_Common_Var = (listvar *) NULL;
1701    List_Allocate_Var = (listallocate *) NULL;
1702    List_SubroutineWhereAgrifUsed = (listnom *) NULL;
1703    List_Subroutine_For_Alloc = (listnom *) NULL;
1704    List_Include = (listusemodule *) NULL;
1705    List_NameOfModuleUsed = (listusemodule *) NULL;
1706    listofmoduletmp = (listusemodule *) NULL;
1707    List_SubroutineDeclaration_Var = (listvar *) NULL;
1708    List_UsedInSubroutine_Var = (listvar *) NULL;
1709    List_NotGridDepend_Var = (listvar *) NULL;
1710    Listofavailableindices = (listindice *) NULL;
1711    Listofavailableindices_glob = (listindice **) calloc(NB_CAT_VARIABLES,sizeof(listindice *));
1712    List_CouplePointed_Var = (listvarpointtovar *) NULL;
1713    List_ModuleUsed_Var = (listvar *) NULL;
1714    List_ModuleUsedInModuleUsed_Var = (listvar *) NULL;
1715    List_GlobParamModuleUsed_Var = (listparameter *) NULL;
1716    List_GlobParamModuleUsedInModuleUsed_Var = (listparameter *) NULL;
1717    List_SubroutineArgument_Var = (listvar *) NULL;
1718    List_FunctionType_Var = (listvar *) NULL;
1719    tmpuselocallist = (listusemodule *) NULL;
1720    List_ContainsSubroutine = (listnom *) NULL;
1721    List_Do_labels = (listname *) NULL;
1722    oldfortran_out = (FILE *) NULL;
1723
1724    if ( argc < 2 )
1725        print_usage();
1726
1727    strcpy(config_file, argv[1]);
1728    strcpy(work_dir, ".");
1729    strcpy(input_dir, ".");
1730    strcpy(output_dir, "AGRIF_MODELFILES");
1731    strcpy(include_dir, "AGRIF_INC");
1732    strcpy(filetoparse, "");
1733    strcpy(subofagrifinitgrids, "");
1734    strcpy(meetagrifinitgrids, "");
1735    strcpy(mpiinitvar, "");
1736
1737    length_last = 0 ;
1738    length_first = 0 ;
1739    length_v_vallengspec = 0 ;
1740    length_v_commoninfile = 0 ;
1741    length_v_precision = 0 ;
1742    length_v_IntentSpec = 0 ;
1743    length_v_initialvalue = 0 ;
1744    length_v_readedlistdimension = 0 ;
1745    length_a_nomvar = 0 ;
1746    length_toprintglob = 0 ;
1747    length_tmpvargridname = 0 ;
1748    length_ligne_Subloop = 0 ;
1749    length_toprint_utilagrif = 0 ;
1750    length_toprinttmp_utilchar = 0 ;
1751    length_ligne_writedecl = 0 ;
1752    length_newname_toamr = 0 ;
1753    length_newname_writedecl = 0 ;
1754    length_ligne_toamr = 0 ;
1755    length_tmpligne_writedecl = 0 ;
1756    value_char_size = 0 ;
1757    value_char_size1 = 0 ;
1758    value_char_size2 = 0 ;
1759    value_char_size3 = 0 ;
1760    inallocate = 0;
1761    infixed = 1;
1762    infree  = 0;
1763
1764    onlyfixedgrids=0;
1765    fixedgrids=0;
1766    InAgrifParentDef = 0;
1767    IndicenbmaillesX=0;
1768    IndicenbmaillesY=0;
1769    IndicenbmaillesZ=0;
1770    created_dimensionlist = 1;
1771    /* current indice in the table tabvars             */
1772    for ( i=0 ; i<NB_CAT_VARIABLES ; i++)
1773    {
1774        indicemaxtabvars[i] = 0;
1775    }
1776    SubloopScalar = 0;
1777    todebug = 0;
1778    retour77 = 1 ;
1779    shouldincludempif = 0 ;
1780
1781    Read_val_max();
1782
1783/******************************************************************************/
1784/*  2-  Program arguments                                                     */
1785/******************************************************************************/
1786
1787    if ( (convert_in=fopen(config_file,"r")) == NULL )
1788    {
1789        printf("##\n## ERROR: the configuration file '%s' doesn't exist.\n##\n", config_file);
1790        print_usage();
1791    }
1792
1793    i=2;
1794    while ( i < argc )
1795    {
1796        if (!strcasecmp(argv[i], "-workdir"))
1797        {
1798            strcpy(work_dir,argv[i+1]);
1799            i++;
1800        }
1801        else if (!strcasecmp(argv[i], "-incdir"))
1802        {
1803            strcpy(include_dir,argv[i+1]);
1804            i++;
1805        }
1806        else if (!strcasecmp(argv[i], "-comdirin")) /* input directory           */
1807        {
1808            strcpy(input_dir,argv[i+1]);
1809            i++;
1810        }
1811        else if (!strcasecmp(argv[i], "-comdirout")) /* output directory         */
1812        {
1813            strcpy(output_dir,argv[i+1]);
1814            i++;
1815        }
1816        else if (!strcasecmp(argv[i], "-convfile")) /* file to parse             */
1817        {
1818            strcpy(filetoparse, argv[i+1]);
1819            i++;
1820            infree  = (strstr(filetoparse, ".f90") != NULL) || (strstr(filetoparse, ".F90") != NULL);
1821            infixed = ! infree;
1822        }
1823        else if (!strcasecmp(argv[i], "-free"))
1824        {
1825            stylegiven = 1;
1826            infreegiven  = 1 ;
1827            infixedgiven = 0;
1828        }
1829        else if (!strcasecmp(argv[i], "-fixed"))
1830        {
1831            stylegiven = 1;
1832            infreegiven  = 0;
1833            infixedgiven = 1;
1834        }
1835        else if (!strcasecmp(argv[i], "-SubloopScalar"))
1836        {
1837            SubloopScalar = 1 ;
1838        }
1839        else if (!strcasecmp(argv[i], "-SubloopScalar1"))
1840        {
1841            SubloopScalar = 2 ;
1842        }
1843        else if (!strcasecmp(argv[i], "-todebug"))
1844        {
1845            todebug = 1 ;
1846        }
1847        else if (!strcasecmp(argv[i],"-rm")) { }
1848        else
1849        {
1850            printf("##\n## Unkwon option : %s\n##\n", argv[i]);
1851            exit(0);
1852        }
1853        i++;
1854    }
1855    // Check input file
1856    if ( strlen(filetoparse) == 0 )         // -convfile has not been specified
1857    {
1858        printf("##\n## ERROR: please provide a file to parse with -convfile.\n##\n");
1859        print_usage();
1860    }
1861    // Setup input & output directories
1862    if ( strcasecmp(work_dir, ".") != 0 )   // -workdir has been changed...
1863    {
1864        if ( strcasecmp(input_dir,  ".") == 0 )                 // ...and -comdirin  has NOT been changed
1865        {
1866            strcpy(input_dir, work_dir);
1867        }
1868        if ( strcasecmp(output_dir, "AGRIF_MODELFILES") == 0 )  // ...and -comdirout has NOT been changed
1869        {
1870            sprintf(output_dir, "%s/%s", work_dir, "AGRIF_MODELFILES");
1871        }
1872        if ( strcasecmp(include_dir, "AGRIF_INC") == 0 )        // ...and -incdir    has NOT been changed
1873        {
1874            sprintf(include_dir, "%s/%s", work_dir, "AGRIF_INC");
1875        }
1876    }
1877    if (stylegiven == 1)
1878    {
1879        infree  = infreegiven;
1880        infixed = infixedgiven;
1881    }
1882
1883/******************************************************************************/
1884/*  3-  Parsing of the conv file <name>.in                                    */
1885/******************************************************************************/
1886
1887    if ( strstr(filetoparse, ".f90") || strstr(filetoparse, ".F90") ) retour77 = 0;
1888
1889    convert_parse();
1890
1891/******************************************************************************/
1892/*  4-  Preparation of the file parsing                                       */
1893/******************************************************************************/
1894
1895    sprintf(dependfilename, "%s/.dependglobal_agrif", work_dir);
1896    /*                                                                         */
1897    if ( (dependglobaloutput=fopen(dependfilename, "r")) != NULL )
1898    {
1899        for (i=0;i<NB_CAT_VARIABLES;i++)
1900        {
1901            fscanf(dependglobaloutput,"%d\n",&indicemaxtabvars[i]);
1902        }
1903        fclose(dependglobaloutput);
1904    }
1905    Readthedependavailablefile();
1906    /* Read the .dependnbxnby file which contains indices of nbmaillsX, nbmailleY and nbmailleZ */
1907    Readthedependnbxnbyfile();
1908    Read_Subroutine_For_Alloc();
1909
1910/******************************************************************************/
1911/*  5-  Parsing of the input file (2 times)                                   */
1912/******************************************************************************/
1913
1914    /* Record all variables in list                                            */
1915    firstpass = 1;
1916    process_fortran(filetoparse);
1917
1918    CompleteThelistvarindoloop();
1919    /* Read list of module used                                                */
1920    RecordUseModulesVariables();
1921    /* Read list of module used in module used                                 */
1922    RecordUseModulesUseModulesVariables();
1923    /* Save variables are considered as globals ones                           */
1924    Update_List_Global_Var_From_List_Save_Var();
1925    /* Update all lists                                                        */
1926    ListUpdate();
1927
1928    Clean_List_Global_Var();
1929    /* Indice tabvars identification                                           */
1930    IndiceTabvarsIdentification();
1931    /* Update all lists                                                        */
1932    ListUpdate();
1933    /* The allocation subroutine is necessary ????                             */
1934    New_Allocate_Subroutine_Is_Necessary();
1935    /* The allocation subroutine is necessary for common list                  */
1936    New_Allocate_Subroutine_For_Common_Is_Necessary();
1937    /* Sort List_SubroutineArgument_Var                                        */
1938    Sort_List_SubroutineArgument_Var();
1939    /* Clean all lists                                                         */
1940    ListClean();
1941    /* Update Indice of List_UsedInSubroutine_Var from module used             */
1942    List_UsedInSubroutine_Var_Update_From_Module_Used();
1943    /* Update List_SubroutineWhereAgrifUsed                                    */
1944    UpdateList_SubroutineWhereAgrifUsed();
1945    /* Update List_UsedInSubroutine_Var with v_readedlistdimension             */
1946    UpdateList_UsedInSubroutine_With_dimension();
1947
1948    ModifyThelistvarindoloop();
1949    UpdateListDeclarationWithDimensionList();
1950    GiveTypeOfVariables();
1951
1952    /* Build new subroutines                                                   */
1953    firstpass = 0;
1954    /*
1955    printf("**********************************\n");
1956    printf("SECOND PASSES \n");
1957    printf("**********************************\n");
1958    */
1959    process_fortran(filetoparse);
1960
1961    newvar = (listvar *) NULL;
1962
1963    while ( newvar )
1964    {
1965        printf("++++ %s %d %s %s %s\n",
1966            newvar->var->v_nomvar,
1967            newvar->var->v_nbdim,
1968            newvar->var->v_subroutinename,
1969            newvar->var->v_modulename,
1970            newvar->var->v_typevar);
1971        newvar = newvar->suiv;
1972    }
1973
1974/******************************************************************************/
1975/*  6-  Write informations in output files                                    */
1976/******************************************************************************/
1977
1978    /* Write the .dependglobal_agrif file which contain the max indice         */
1979    /*    of the tabvars table                                                 */
1980    sprintf(dependfilename, "%s/.dependglobal_agrif", work_dir);
1981    dependglobaloutput = fopen(dependfilename, "w");
1982    for (i=0;i<NB_CAT_VARIABLES;i++)
1983    {
1984        fprintf(dependglobaloutput,"%d\n",indicemaxtabvars[i]);
1985    }
1986    fclose(dependglobaloutput);
1987    /* Write the list of available indice                                      */
1988    Writethedependavailablefile();
1989    /* Write the .dependnbxnby file which contains indices of nbmaillsX,       */
1990    /*    nbmailleY and nbmailleZ                                              */
1991    Writethedependnbxnbyfile();
1992    /* Write the .depend<namefile> file which contain general informations     */
1993    /*    about variable of this file                                          */
1994    parcours = List_NameOfModule;
1995    while( parcours )
1996    {
1997        Writethedependlistofmoduleused(parcours->o_nom);
1998        WritedependParameterList(parcours->o_nom);
1999        Writethedependfile(parcours->o_nom,List_Global_Var);
2000        parcours=parcours->suiv;
2001    }
2002    parcours = List_NameOfCommon;
2003    while( parcours )
2004    {
2005        Writethedependfile(parcours->o_nom,List_Common_Var);
2006        parcours=parcours->suiv;
2007    }
2008    Write_Subroutine_For_Alloc();
2009
2010/******************************************************************************/
2011/*  7-  Create files in AGRIF_INC directory                                   */
2012/******************************************************************************/
2013
2014    creefichieramr();
2015
2016    Write_val_max();
2017
2018    if ( todebug == 1 ) printf("Out of CONV \n");
2019    return 0;
2020}
2021#line 2 "convert.yy.c"
2022
2023#line 4 "convert.yy.c"
2024
2025#define  YY_INT_ALIGNED short int
2026
2027/* A lexical scanner generated by flex */
2028
2029#define yy_create_buffer convert__create_buffer
2030#define yy_delete_buffer convert__delete_buffer
2031#define yy_flex_debug convert__flex_debug
2032#define yy_init_buffer convert__init_buffer
2033#define yy_flush_buffer convert__flush_buffer
2034#define yy_load_buffer_state convert__load_buffer_state
2035#define yy_switch_to_buffer convert__switch_to_buffer
2036#define yyin convert_in
2037#define yyleng convert_leng
2038#define yylex convert_lex
2039#define yylineno convert_lineno
2040#define yyout convert_out
2041#define yyrestart convert_restart
2042#define yytext convert_text
2043#define yywrap convert_wrap
2044#define yyalloc convert_alloc
2045#define yyrealloc convert_realloc
2046#define yyfree convert_free
2047
2048#define FLEX_SCANNER
2049#define YY_FLEX_MAJOR_VERSION 2
2050#define YY_FLEX_MINOR_VERSION 5
2051#define YY_FLEX_SUBMINOR_VERSION 35
2052#if YY_FLEX_SUBMINOR_VERSION > 0
2053#define FLEX_BETA
2054#endif
2055
2056/* First, we deal with  platform-specific or compiler-specific issues. */
2057
2058/* begin standard C headers. */
2059#include <stdio.h>
2060#include <string.h>
2061#include <errno.h>
2062#include <stdlib.h>
2063
2064/* end standard C headers. */
2065
2066/* flex integer type definitions */
2067
2068#ifndef FLEXINT_H
2069#define FLEXINT_H
2070
2071/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
2072
2073#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
2074
2075/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
2076 * if you want the limit (max/min) macros for int types.
2077 */
2078#ifndef __STDC_LIMIT_MACROS
2079#define __STDC_LIMIT_MACROS 1
2080#endif
2081
2082#include <inttypes.h>
2083typedef int8_t flex_int8_t;
2084typedef uint8_t flex_uint8_t;
2085typedef int16_t flex_int16_t;
2086typedef uint16_t flex_uint16_t;
2087typedef int32_t flex_int32_t;
2088typedef uint32_t flex_uint32_t;
2089typedef uint64_t flex_uint64_t;
2090#else
2091typedef signed char flex_int8_t;
2092typedef short int flex_int16_t;
2093typedef int flex_int32_t;
2094typedef unsigned char flex_uint8_t; 
2095typedef unsigned short int flex_uint16_t;
2096typedef unsigned int flex_uint32_t;
2097#endif /* ! C99 */
2098
2099/* Limits of integral types. */
2100#ifndef INT8_MIN
2101#define INT8_MIN               (-128)
2102#endif
2103#ifndef INT16_MIN
2104#define INT16_MIN              (-32767-1)
2105#endif
2106#ifndef INT32_MIN
2107#define INT32_MIN              (-2147483647-1)
2108#endif
2109#ifndef INT8_MAX
2110#define INT8_MAX               (127)
2111#endif
2112#ifndef INT16_MAX
2113#define INT16_MAX              (32767)
2114#endif
2115#ifndef INT32_MAX
2116#define INT32_MAX              (2147483647)
2117#endif
2118#ifndef UINT8_MAX
2119#define UINT8_MAX              (255U)
2120#endif
2121#ifndef UINT16_MAX
2122#define UINT16_MAX             (65535U)
2123#endif
2124#ifndef UINT32_MAX
2125#define UINT32_MAX             (4294967295U)
2126#endif
2127
2128#endif /* ! FLEXINT_H */
2129
2130#ifdef __cplusplus
2131
2132/* The "const" storage-class-modifier is valid. */
2133#define YY_USE_CONST
2134
2135#else /* ! __cplusplus */
2136
2137/* C99 requires __STDC__ to be defined as 1. */
2138#if defined (__STDC__)
2139
2140#define YY_USE_CONST
2141
2142#endif   /* defined (__STDC__) */
2143#endif   /* ! __cplusplus */
2144
2145#ifdef YY_USE_CONST
2146#define yyconst const
2147#else
2148#define yyconst
2149#endif
2150
2151/* Returned upon end-of-file. */
2152#define YY_NULL 0
2153
2154/* Promotes a possibly negative, possibly signed char to an unsigned
2155 * integer for use as an array index.  If the signed char is negative,
2156 * we want to instead treat it as an 8-bit unsigned char, hence the
2157 * double cast.
2158 */
2159#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
2160
2161/* Enter a start condition.  This macro really ought to take a parameter,
2162 * but we do it the disgusting crufty way forced on us by the ()-less
2163 * definition of BEGIN.
2164 */
2165#define BEGIN (yy_start) = 1 + 2 *
2166
2167/* Translate the current start state into a value that can be later handed
2168 * to BEGIN to return to the state.  The YYSTATE alias is for lex
2169 * compatibility.
2170 */
2171#define YY_START (((yy_start) - 1) / 2)
2172#define YYSTATE YY_START
2173
2174/* Action number for EOF rule of a given start state. */
2175#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
2176
2177/* Special action meaning "start processing a new file". */
2178#define YY_NEW_FILE convert_restart(convert_in  )
2179
2180#define YY_END_OF_BUFFER_CHAR 0
2181
2182/* Size of default input buffer. */
2183#ifndef YY_BUF_SIZE
2184#define YY_BUF_SIZE 16384
2185#endif
2186
2187/* The state buf must be large enough to hold one state per character in the main buffer.
2188 */
2189#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
2190
2191#ifndef YY_TYPEDEF_YY_BUFFER_STATE
2192#define YY_TYPEDEF_YY_BUFFER_STATE
2193typedef struct yy_buffer_state *YY_BUFFER_STATE;
2194#endif
2195
2196#ifndef YY_TYPEDEF_YY_SIZE_T
2197#define YY_TYPEDEF_YY_SIZE_T
2198typedef size_t yy_size_t;
2199#endif
2200
2201extern yy_size_t convert_leng;
2202
2203extern FILE *convert_in, *convert_out;
2204
2205#define EOB_ACT_CONTINUE_SCAN 0
2206#define EOB_ACT_END_OF_FILE 1
2207#define EOB_ACT_LAST_MATCH 2
2208
2209    #define YY_LESS_LINENO(n)
2210   
2211/* Return all but the first "n" matched characters back to the input stream. */
2212#define yyless(n) \
2213   do \
2214      { \
2215      /* Undo effects of setting up convert_text. */ \
2216        int yyless_macro_arg = (n); \
2217        YY_LESS_LINENO(yyless_macro_arg);\
2218      *yy_cp = (yy_hold_char); \
2219      YY_RESTORE_YY_MORE_OFFSET \
2220      (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
2221      YY_DO_BEFORE_ACTION; /* set up convert_text again */ \
2222      } \
2223   while ( 0 )
2224
2225#define unput(c) yyunput( c, (yytext_ptr)  )
2226
2227#ifndef YY_STRUCT_YY_BUFFER_STATE
2228#define YY_STRUCT_YY_BUFFER_STATE
2229struct yy_buffer_state
2230   {
2231   FILE *yy_input_file;
2232
2233   char *yy_ch_buf;     /* input buffer */
2234   char *yy_buf_pos;    /* current position in input buffer */
2235
2236   /* Size of input buffer in bytes, not including room for EOB
2237    * characters.
2238    */
2239   yy_size_t yy_buf_size;
2240
2241   /* Number of characters read into yy_ch_buf, not including EOB
2242    * characters.
2243    */
2244   yy_size_t yy_n_chars;
2245
2246   /* Whether we "own" the buffer - i.e., we know we created it,
2247    * and can realloc() it to grow it, and should free() it to
2248    * delete it.
2249    */
2250   int yy_is_our_buffer;
2251
2252   /* Whether this is an "interactive" input source; if so, and
2253    * if we're using stdio for input, then we want to use getc()
2254    * instead of fread(), to make sure we stop fetching input after
2255    * each newline.
2256    */
2257   int yy_is_interactive;
2258
2259   /* Whether we're considered to be at the beginning of a line.
2260    * If so, '^' rules will be active on the next match, otherwise
2261    * not.
2262    */
2263   int yy_at_bol;
2264
2265    int yy_bs_lineno; /**< The line count. */
2266    int yy_bs_column; /**< The column count. */
2267   
2268   /* Whether to try to fill the input buffer when we reach the
2269    * end of it.
2270    */
2271   int yy_fill_buffer;
2272
2273   int yy_buffer_status;
2274
2275#define YY_BUFFER_NEW 0
2276#define YY_BUFFER_NORMAL 1
2277   /* When an EOF's been seen but there's still some text to process
2278    * then we mark the buffer as YY_EOF_PENDING, to indicate that we
2279    * shouldn't try reading from the input source any more.  We might
2280    * still have a bunch of tokens to match, though, because of
2281    * possible backing-up.
2282    *
2283    * When we actually see the EOF, we change the status to "new"
2284    * (via convert_restart()), so that the user can continue scanning by
2285    * just pointing convert_in at a new input file.
2286    */
2287#define YY_BUFFER_EOF_PENDING 2
2288
2289   };
2290#endif /* !YY_STRUCT_YY_BUFFER_STATE */
2291
2292/* Stack of input buffers. */
2293static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
2294static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
2295static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
2296
2297/* We provide macros for accessing buffer states in case in the
2298 * future we want to put the buffer states in a more general
2299 * "scanner state".
2300 *
2301 * Returns the top of the stack, or NULL.
2302 */
2303#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
2304                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
2305                          : NULL)
2306
2307/* Same as previous macro, but useful when we know that the buffer stack is not
2308 * NULL or when we need an lvalue. For internal use only.
2309 */
2310#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
2311
2312/* yy_hold_char holds the character lost when convert_text is formed. */
2313static char yy_hold_char;
2314static yy_size_t yy_n_chars;     /* number of characters read into yy_ch_buf */
2315yy_size_t convert_leng;
2316
2317/* Points to current character in buffer. */
2318static char *yy_c_buf_p = (char *) 0;
2319static int yy_init = 0;    /* whether we need to initialize */
2320static int yy_start = 0;   /* start state number */
2321
2322/* Flag which is used to allow convert_wrap()'s to do buffer switches
2323 * instead of setting up a fresh convert_in.  A bit of a hack ...
2324 */
2325static int yy_did_buffer_switch_on_eof;
2326
2327void convert_restart (FILE *input_file  );
2328void convert__switch_to_buffer (YY_BUFFER_STATE new_buffer  );
2329YY_BUFFER_STATE convert__create_buffer (FILE *file,int size  );
2330void convert__delete_buffer (YY_BUFFER_STATE b  );
2331void convert__flush_buffer (YY_BUFFER_STATE b  );
2332void convert_push_buffer_state (YY_BUFFER_STATE new_buffer  );
2333void convert_pop_buffer_state (void );
2334
2335static void convert_ensure_buffer_stack (void );
2336static void convert__load_buffer_state (void );
2337static void convert__init_buffer (YY_BUFFER_STATE b,FILE *file  );
2338
2339#define YY_FLUSH_BUFFER convert__flush_buffer(YY_CURRENT_BUFFER )
2340
2341YY_BUFFER_STATE convert__scan_buffer (char *base,yy_size_t size  );
2342YY_BUFFER_STATE convert__scan_string (yyconst char *yy_str  );
2343YY_BUFFER_STATE convert__scan_bytes (yyconst char *bytes,yy_size_t len  );
2344
2345void *convert_alloc (yy_size_t  );
2346void *convert_realloc (void *,yy_size_t  );
2347void convert_free (void *  );
2348
2349#define yy_new_buffer convert__create_buffer
2350
2351#define yy_set_interactive(is_interactive) \
2352   { \
2353   if ( ! YY_CURRENT_BUFFER ){ \
2354        convert_ensure_buffer_stack (); \
2355      YY_CURRENT_BUFFER_LVALUE =    \
2356            convert__create_buffer(convert_in,YY_BUF_SIZE ); \
2357   } \
2358   YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
2359   }
2360
2361#define yy_set_bol(at_bol) \
2362   { \
2363   if ( ! YY_CURRENT_BUFFER ){\
2364        convert_ensure_buffer_stack (); \
2365      YY_CURRENT_BUFFER_LVALUE =    \
2366            convert__create_buffer(convert_in,YY_BUF_SIZE ); \
2367   } \
2368   YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
2369   }
2370
2371#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
2372
2373/* Begin user sect3 */
2374
2375#define convert_wrap(n) 1
2376#define YY_SKIP_YYWRAP
2377
2378typedef unsigned char YY_CHAR;
2379
2380FILE *convert_in = (FILE *) 0, *convert_out = (FILE *) 0;
2381
2382typedef int yy_state_type;
2383
2384extern int convert_lineno;
2385
2386int convert_lineno = 1;
2387
2388extern char *convert_text;
2389#define yytext_ptr convert_text
2390
2391static yy_state_type yy_get_previous_state (void );
2392static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
2393static int yy_get_next_buffer (void );
2394static void yy_fatal_error (yyconst char msg[]  );
2395
2396/* Done after the current pattern has been matched and before the
2397 * corresponding action - sets up convert_text.
2398 */
2399#define YY_DO_BEFORE_ACTION \
2400   (yytext_ptr) = yy_bp; \
2401   convert_leng = (yy_size_t) (yy_cp - yy_bp); \
2402   (yy_hold_char) = *yy_cp; \
2403   *yy_cp = '\0'; \
2404   (yy_c_buf_p) = yy_cp;
2405
2406#define YY_NUM_RULES 15
2407#define YY_END_OF_BUFFER 16
2408/* This struct is not used in this scanner,
2409   but its presence is necessary. */
2410struct yy_trans_info
2411   {
2412   flex_int32_t yy_verify;
2413   flex_int32_t yy_nxt;
2414   };
2415static yyconst flex_int16_t yy_accept[84] =
2416    {   0,
2417        0,    0,    0,    0,   16,   15,   14,   13,   15,   12,
2418       11,   11,   11,   11,   12,    7,   10,   10,   10,   10,
2419       10,   10,   10,   14,    0,    4,   11,    9,    9,    9,
2420        5,   10,   10,   10,   10,   10,   10,   10,   10,    8,
2421       10,   10,   10,   10,   10,    3,   10,    6,   10,   10,
2422       10,   10,   10,   10,   10,   10,   10,   10,   10,   10,
2423       10,   10,   10,   10,   10,   10,   10,   10,   10,   10,
2424       10,   10,    2,   10,   10,   10,    1,   10,   10,   10,
2425       10,    8,    0
2426    } ;
2427
2428static yyconst flex_int32_t yy_ec[256] =
2429    {   0,
2430        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
2431        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2432        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2433        1,    2,    1,    1,    1,    1,    4,    1,    1,    5,
2434        6,    1,    1,    7,    1,    1,    1,    8,    9,   10,
2435       11,    8,    8,    8,   12,    8,    8,   13,   14,    1,
2436       15,    1,    1,    1,   16,   17,   17,   18,   19,   20,
2437       21,   17,   22,   17,   23,   24,   25,   26,   27,   28,
2438       17,   29,   30,   31,   32,   17,   17,   33,   34,   17,
2439       35,    1,   36,    1,   37,    1,   38,   17,   17,   39,
2440
2441       40,   41,   42,   17,   43,   17,   44,   45,   46,   47,
2442       48,   49,   17,   50,   51,   52,   53,   17,   17,   54,
2443       55,   17,    1,    1,    1,    1,    1,    1,    1,    1,
2444        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2445        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2446        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2447        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2448        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2449        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2450        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2451
2452        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2453        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2454        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2455        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2456        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2457        1,    1,    1,    1,    1
2458    } ;
2459
2460static yyconst flex_int32_t yy_meta[56] =
2461    {   0,
2462        1,    1,    2,    1,    1,    1,    1,    3,    3,    3,
2463        3,    3,    1,    1,    1,    3,    3,    3,    3,    3,
2464        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
2465        3,    3,    3,    3,    1,    1,    3,    3,    3,    3,
2466        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
2467        3,    3,    3,    3,    3
2468    } ;
2469
2470static yyconst flex_int16_t yy_base[86] =
2471    {   0,
2472        0,    0,    0,    0,  192,  194,  186,  194,  176,  194,
2473       48,   53,   58,   69,  164,  194,    0,   60,   51,   47,
2474       49,   67,   55,  173,  170,  169,   90,  194,  194,  194,
2475      194,    0,  160,   53,   62,   58,   66,   62,   74,    0,
2476       85,   95,   94,   82,  101,    0,  101,    0,   91,  134,
2477       96,  133,  100,  103,   99,  105,  109,  106,  102,  101,
2478      113,   99,  115,  113,  119,  127,  123,  139,  130,  142,
2479      137,  132,    0,   81,  144,  143,    0,  136,  144,  150,
2480      139,    0,  194,  190,   81
2481    } ;
2482
2483static yyconst flex_int16_t yy_def[86] =
2484    {   0,
2485       83,    1,    1,    1,   83,   83,   83,   83,   84,   83,
2486       83,   83,   83,   83,   83,   83,   85,   85,   85,   85,
2487       85,   85,   85,   83,   84,   84,   83,   83,   83,   83,
2488       83,   85,   85,   85,   85,   85,   85,   85,   85,   85,
2489       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
2490       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
2491       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
2492       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
2493       85,   85,    0,   83,   83
2494    } ;
2495
2496static yyconst flex_int16_t yy_nxt[250] =
2497    {   0,
2498        6,    7,    8,    9,   10,   10,   10,   11,   12,   13,
2499       14,   11,   15,   10,   16,   17,   17,   17,   17,   18,
2500       17,   17,   19,   17,   17,   20,   21,   22,   17,   17,
2501       17,   23,   17,   17,   10,   10,   17,   17,   17,   17,
2502       18,   17,   17,   19,   17,   17,   20,   21,   22,   17,
2503       17,   17,   23,   17,   17,   27,   27,   27,   27,   27,
2504       27,   27,   27,   27,   27,   27,   27,   27,   27,   27,
2505       28,   33,   35,   36,   37,   29,   27,   27,   27,   27,
2506       27,   34,   38,   32,   39,   41,   30,   42,   43,   44,
2507       45,   28,   46,   35,   36,   37,   29,   27,   27,   27,
2508
2509       27,   27,   34,   47,   38,   39,   41,   30,   42,   43,
2510       44,   45,   48,   46,   49,   50,   51,   76,   52,   53,
2511       55,   57,   58,   59,   47,   60,   61,   62,   63,   64,
2512       65,   66,   67,   48,   68,   49,   50,   69,   51,   52,
2513       53,   55,   57,   58,   59,   70,   60,   61,   62,   63,
2514       64,   65,   66,   67,   71,   68,   72,   73,   69,   74,
2515       75,   40,   77,   78,   79,   80,   70,   81,   82,   56,
2516       54,   40,   26,   26,   24,   71,   31,   72,   73,   26,
2517       74,   75,   40,   77,   78,   79,   80,   24,   81,   82,
2518       25,   83,   25,    5,   83,   83,   83,   83,   83,   83,
2519
2520       83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
2521       83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
2522       83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
2523       83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
2524       83,   83,   83,   83,   83,   83,   83,   83,   83
2525    } ;
2526
2527static yyconst flex_int16_t yy_chk[250] =
2528    {   0,
2529        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2530        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2531        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2532        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2533        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
2534        1,    1,    1,    1,    1,   11,   11,   11,   11,   11,
2535       12,   12,   12,   12,   12,   13,   13,   13,   13,   13,
2536       12,   18,   19,   20,   21,   13,   14,   14,   14,   14,
2537       14,   18,   22,   85,   23,   34,   14,   35,   36,   37,
2538       38,   12,   39,   19,   20,   21,   13,   27,   27,   27,
2539
2540       27,   27,   18,   41,   22,   23,   34,   14,   35,   36,
2541       37,   38,   42,   39,   43,   44,   45,   74,   47,   49,
2542       51,   53,   54,   55,   41,   56,   57,   58,   59,   60,
2543       61,   62,   63,   42,   64,   43,   44,   65,   45,   47,
2544       49,   51,   53,   54,   55,   66,   56,   57,   58,   59,
2545       60,   61,   62,   63,   67,   64,   68,   69,   65,   70,
2546       71,   72,   75,   76,   78,   79,   66,   80,   81,   52,
2547       50,   33,   26,   25,   24,   67,   15,   68,   69,    9,
2548       70,   71,   72,   75,   76,   78,   79,    7,   80,   81,
2549       84,    5,   84,   83,   83,   83,   83,   83,   83,   83,
2550
2551       83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
2552       83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
2553       83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
2554       83,   83,   83,   83,   83,   83,   83,   83,   83,   83,
2555       83,   83,   83,   83,   83,   83,   83,   83,   83
2556    } ;
2557
2558static yy_state_type yy_last_accepting_state;
2559static char *yy_last_accepting_cpos;
2560
2561extern int convert__flex_debug;
2562int convert__flex_debug = 0;
2563
2564/* The intent behind this definition is that it'll catch
2565 * any uses of REJECT which flex missed.
2566 */
2567#define REJECT reject_used_but_not_detected
2568#define yymore() yymore_used_but_not_detected
2569#define YY_MORE_ADJ 0
2570#define YY_RESTORE_YY_MORE_OFFSET
2571char *convert_text;
2572#line 1 "convert.lex"
2573/******************************************************************************/
2574/*                                                                            */
2575/*     CONV (converter) for Agrif (Adaptive Grid Refinement In Fortran)       */
2576/*                                                                            */
2577/* Copyright or   or Copr. Laurent Debreu (Laurent.Debreu@imag.fr)            */
2578/*                        Cyril Mazauric (Cyril_Mazauric@yahoo.fr)            */
2579/* This software is governed by the CeCILL-C license under French law and     */
2580/* abiding by the rules of distribution of free software.  You can  use,      */
2581/* modify and/ or redistribute the software under the terms of the CeCILL-C   */
2582/* license as circulated by CEA, CNRS and INRIA at the following URL          */
2583/* "http://www.cecill.info".                                                  */
2584/*                                                                            */
2585/* As a counterpart to the access to the source code and  rights to copy,     */
2586/* modify and redistribute granted by the license, users are provided only    */
2587/* with a limited warranty  and the software's author,  the holder of the     */
2588/* economic rights,  and the successive licensors  have only  limited         */
2589/* liability.                                                                 */
2590/*                                                                            */
2591/* In this respect, the user's attention is drawn to the risks associated     */
2592/* with loading,  using,  modifying and/or developing or reproducing the      */
2593/* software by the user in light of its specific status of free software,     */
2594/* that may mean  that it is complicated to manipulate,  and  that  also      */
2595/* therefore means  that it is reserved for developers  and  experienced      */
2596/* professionals having in-depth computer knowledge. Users are therefore      */
2597/* encouraged to load and test the software's suitability as regards their    */
2598/* requirements in conditions enabling the security of their systems and/or   */
2599/* data to be ensured and,  more generally, to use and operate it in the      */
2600/* same conditions as regards security.                                       */
2601/*                                                                            */
2602/* The fact that you are presently reading this means that you have had       */
2603/* knowledge of the CeCILL-C license and that you accept its terms.           */
2604/******************************************************************************/
2605/* version 1.7                                                                */
2606/******************************************************************************/
2607
2608#line 40 "convert.lex"
2609#include <math.h>
2610#include <stdlib.h>
2611#include <string.h>
2612
2613#define YY_NO_INPUT
2614#line 595 "convert.yy.c"
2615
2616#define INITIAL 0
2617#define character 1
2618
2619#ifndef YY_NO_UNISTD_H
2620/* Special case for "unistd.h", since it is non-ANSI. We include it way
2621 * down here because we want the user's section 1 to have been scanned first.
2622 * The user has a chance to override it with an option.
2623 */
2624#include <unistd.h>
2625#endif
2626
2627#ifndef YY_EXTRA_TYPE
2628#define YY_EXTRA_TYPE void *
2629#endif
2630
2631static int yy_init_globals (void );
2632
2633/* Accessor methods to globals.
2634   These are made visible to non-reentrant scanners for convenience. */
2635
2636int convert_lex_destroy (void );
2637
2638int convert_get_debug (void );
2639
2640void convert_set_debug (int debug_flag  );
2641
2642YY_EXTRA_TYPE convert_get_extra (void );
2643
2644void convert_set_extra (YY_EXTRA_TYPE user_defined  );
2645
2646FILE *convert_get_in (void );
2647
2648void convert_set_in  (FILE * in_str  );
2649
2650FILE *convert_get_out (void );
2651
2652void convert_set_out  (FILE * out_str  );
2653
2654yy_size_t convert_get_leng (void );
2655
2656char *convert_get_text (void );
2657
2658int convert_get_lineno (void );
2659
2660void convert_set_lineno (int line_number  );
2661
2662/* Macros after this point can all be overridden by user definitions in
2663 * section 1.
2664 */
2665
2666#ifndef YY_SKIP_YYWRAP
2667#ifdef __cplusplus
2668extern "C" int convert_wrap (void );
2669#else
2670extern int convert_wrap (void );
2671#endif
2672#endif
2673
2674    static void yyunput (int c,char *buf_ptr  );
2675   
2676#ifndef yytext_ptr
2677static void yy_flex_strncpy (char *,yyconst char *,int );
2678#endif
2679
2680#ifdef YY_NEED_STRLEN
2681static int yy_flex_strlen (yyconst char * );
2682#endif
2683
2684#ifndef YY_NO_INPUT
2685
2686#ifdef __cplusplus
2687static int yyinput (void );
2688#else
2689static int input (void );
2690#endif
2691
2692#endif
2693
2694/* Amount of stuff to slurp up with each read. */
2695#ifndef YY_READ_BUF_SIZE
2696#define YY_READ_BUF_SIZE 8192
2697#endif
2698
2699/* Copy whatever the last rule matched to the standard output. */
2700#ifndef ECHO
2701/* This used to be an fputs(), but since the string might contain NUL's,
2702 * we now use fwrite().
2703 */
2704#define ECHO fwrite( convert_text, convert_leng, 1, convert_out )
2705#endif
2706
2707/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
2708 * is returned in "result".
2709 */
2710#ifndef YY_INPUT
2711#define YY_INPUT(buf,result,max_size) \
2712   if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
2713      { \
2714      int c = '*'; \
2715      yy_size_t n; \
2716      for ( n = 0; n < max_size && \
2717              (c = getc( convert_in )) != EOF && c != '\n'; ++n ) \
2718         buf[n] = (char) c; \
2719      if ( c == '\n' ) \
2720         buf[n++] = (char) c; \
2721      if ( c == EOF && ferror( convert_in ) ) \
2722         YY_FATAL_ERROR( "input in flex scanner failed" ); \
2723      result = n; \
2724      } \
2725   else \
2726      { \
2727      errno=0; \
2728      while ( (result = fread(buf, 1, max_size, convert_in))==0 && ferror(convert_in)) \
2729         { \
2730         if( errno != EINTR) \
2731            { \
2732            YY_FATAL_ERROR( "input in flex scanner failed" ); \
2733            break; \
2734            } \
2735         errno=0; \
2736         clearerr(convert_in); \
2737         } \
2738      }\
2739\
2740
2741#endif
2742
2743/* No semi-colon after return; correct usage is to write "yyterminate();" -
2744 * we don't want an extra ';' after the "return" because that will cause
2745 * some compilers to complain about unreachable statements.
2746 */
2747#ifndef yyterminate
2748#define yyterminate() return YY_NULL
2749#endif
2750
2751/* Number of entries by which start-condition stack grows. */
2752#ifndef YY_START_STACK_INCR
2753#define YY_START_STACK_INCR 25
2754#endif
2755
2756/* Report a fatal error. */
2757#ifndef YY_FATAL_ERROR
2758#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
2759#endif
2760
2761/* end tables serialization structures and prototypes */
2762
2763/* Default declaration of generated scanner - a define so the user can
2764 * easily add parameters.
2765 */
2766#ifndef YY_DECL
2767#define YY_DECL_IS_OURS 1
2768
2769extern int convert_lex (void);
2770
2771#define YY_DECL int convert_lex (void)
2772#endif /* !YY_DECL */
2773
2774/* Code executed at the beginning of each rule, after convert_text and convert_leng
2775 * have been set up.
2776 */
2777#ifndef YY_USER_ACTION
2778#define YY_USER_ACTION
2779#endif
2780
2781/* Code executed at the end of each rule. */
2782#ifndef YY_BREAK
2783#define YY_BREAK break;
2784#endif
2785
2786#define YY_RULE_SETUP \
2787   YY_USER_ACTION
2788
2789/** The main scanner function which does all the work.
2790 */
2791YY_DECL
2792{
2793   register yy_state_type yy_current_state;
2794   register char *yy_cp, *yy_bp;
2795   register int yy_act;
2796   
2797#line 54 "convert.lex"
2798
2799#line 780 "convert.yy.c"
2800
2801   if ( !(yy_init) )
2802      {
2803      (yy_init) = 1;
2804
2805#ifdef YY_USER_INIT
2806      YY_USER_INIT;
2807#endif
2808
2809      if ( ! (yy_start) )
2810         (yy_start) = 1;   /* first start state */
2811
2812      if ( ! convert_in )
2813         convert_in = stdin;
2814
2815      if ( ! convert_out )
2816         convert_out = stdout;
2817
2818      if ( ! YY_CURRENT_BUFFER ) {
2819         convert_ensure_buffer_stack ();
2820         YY_CURRENT_BUFFER_LVALUE =
2821            convert__create_buffer(convert_in,YY_BUF_SIZE );
2822      }
2823
2824      convert__load_buffer_state( );
2825      }
2826
2827   while ( 1 )    /* loops until end-of-file is reached */
2828      {
2829      yy_cp = (yy_c_buf_p);
2830
2831      /* Support of convert_text. */
2832      *yy_cp = (yy_hold_char);
2833
2834      /* yy_bp points to the position in yy_ch_buf of the start of
2835       * the current run.
2836       */
2837      yy_bp = yy_cp;
2838
2839      yy_current_state = (yy_start);
2840yy_match:
2841      do
2842         {
2843         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
2844         if ( yy_accept[yy_current_state] )
2845            {
2846            (yy_last_accepting_state) = yy_current_state;
2847            (yy_last_accepting_cpos) = yy_cp;
2848            }
2849         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2850            {
2851            yy_current_state = (int) yy_def[yy_current_state];
2852            if ( yy_current_state >= 84 )
2853               yy_c = yy_meta[(unsigned int) yy_c];
2854            }
2855         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2856         ++yy_cp;
2857         }
2858      while ( yy_base[yy_current_state] != 194 );
2859
2860yy_find_action:
2861      yy_act = yy_accept[yy_current_state];
2862      if ( yy_act == 0 )
2863         { /* have to back up */
2864         yy_cp = (yy_last_accepting_cpos);
2865         yy_current_state = (yy_last_accepting_state);
2866         yy_act = yy_accept[yy_current_state];
2867         }
2868
2869      YY_DO_BEFORE_ACTION;
2870
2871do_action:  /* This label is used only to access EOF actions. */
2872
2873      switch ( yy_act )
2874   { /* beginning of action switch */
2875         case 0: /* must back up */
2876         /* undo the effects of YY_DO_BEFORE_ACTION */
2877         *yy_cp = (yy_hold_char);
2878         yy_cp = (yy_last_accepting_cpos);
2879         yy_current_state = (yy_last_accepting_state);
2880         goto yy_find_action;
2881
2882case 1:
2883YY_RULE_SETUP
2884#line 55 "convert.lex"
2885{ return TOK_MODULEMAIN; } /* name of the module                      */
2886   YY_BREAK
2887case 2:
2888YY_RULE_SETUP
2889#line 56 "convert.lex"
2890{ return TOK_NOTGRIDDEP; } /* variable which are not grid dependent   */
2891   YY_BREAK
2892case 3:
2893YY_RULE_SETUP
2894#line 57 "convert.lex"
2895{ return TOK_USE; }
2896   YY_BREAK
2897case 4:
2898YY_RULE_SETUP
2899#line 58 "convert.lex"
2900{ }
2901   YY_BREAK
2902case 5:
2903YY_RULE_SETUP
2904#line 59 "convert.lex"
2905{ return TOK_SEP; }
2906   YY_BREAK
2907case 6:
2908YY_RULE_SETUP
2909#line 60 "convert.lex"
2910{ return TOK_KIND; }
2911   YY_BREAK
2912case 7:
2913YY_RULE_SETUP
2914#line 61 "convert.lex"
2915{ return TOK_EQUAL; }
2916   YY_BREAK
2917case 8:
2918YY_RULE_SETUP
2919#line 62 "convert.lex"
2920{ strcpy(yylval.na,convert_text); return TOK_USEITEM;  }
2921   YY_BREAK
2922case 9:
2923YY_RULE_SETUP
2924#line 63 "convert.lex"
2925{ strcpy(yylval.na,convert_text); return TOK_PROBTYPE; }  /* dimension of the problem */
2926   YY_BREAK
2927case 10:
2928YY_RULE_SETUP
2929#line 64 "convert.lex"
2930{ strcpy(yylval.na,convert_text); return TOK_NAME; }
2931   YY_BREAK
2932case 11:
2933YY_RULE_SETUP
2934#line 65 "convert.lex"
2935{ strcpy(yylval.na,convert_text); return TOK_CSTINT; }
2936   YY_BREAK
2937case 12:
2938YY_RULE_SETUP
2939#line 66 "convert.lex"
2940{ return (int) *convert_text; }
2941   YY_BREAK
2942case 13:
2943/* rule 13 can match eol */
2944YY_RULE_SETUP
2945#line 67 "convert.lex"
2946{ line_num++; return (int) *convert_text; }
2947   YY_BREAK
2948case 14:
2949YY_RULE_SETUP
2950#line 68 "convert.lex"
2951;
2952   YY_BREAK
2953case 15:
2954YY_RULE_SETUP
2955#line 69 "convert.lex"
2956ECHO;
2957   YY_BREAK
2958#line 939 "convert.yy.c"
2959case YY_STATE_EOF(INITIAL):
2960case YY_STATE_EOF(character):
2961   yyterminate();
2962
2963   case YY_END_OF_BUFFER:
2964      {
2965      /* Amount of text matched not including the EOB char. */
2966      int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2967
2968      /* Undo the effects of YY_DO_BEFORE_ACTION. */
2969      *yy_cp = (yy_hold_char);
2970      YY_RESTORE_YY_MORE_OFFSET
2971
2972      if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2973         {
2974         /* We're scanning a new file or input source.  It's
2975          * possible that this happened because the user
2976          * just pointed convert_in at a new source and called
2977          * convert_lex().  If so, then we have to assure
2978          * consistency between YY_CURRENT_BUFFER and our
2979          * globals.  Here is the right place to do so, because
2980          * this is the first action (other than possibly a
2981          * back-up) that will match for the new input source.
2982          */
2983         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2984         YY_CURRENT_BUFFER_LVALUE->yy_input_file = convert_in;
2985         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2986         }
2987
2988      /* Note that here we test for yy_c_buf_p "<=" to the position
2989       * of the first EOB in the buffer, since yy_c_buf_p will
2990       * already have been incremented past the NUL character
2991       * (since all states make transitions on EOB to the
2992       * end-of-buffer state).  Contrast this with the test
2993       * in input().
2994       */
2995      if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2996         { /* This was really a NUL. */
2997         yy_state_type yy_next_state;
2998
2999         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
3000
3001         yy_current_state = yy_get_previous_state(  );
3002
3003         /* Okay, we're now positioned to make the NUL
3004          * transition.  We couldn't have
3005          * yy_get_previous_state() go ahead and do it
3006          * for us because it doesn't know how to deal
3007          * with the possibility of jamming (and we don't
3008          * want to build jamming into it because then it
3009          * will run more slowly).
3010          */
3011
3012         yy_next_state = yy_try_NUL_trans( yy_current_state );
3013
3014         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3015
3016         if ( yy_next_state )
3017            {
3018            /* Consume the NUL. */
3019            yy_cp = ++(yy_c_buf_p);
3020            yy_current_state = yy_next_state;
3021            goto yy_match;
3022            }
3023
3024         else
3025            {
3026            yy_cp = (yy_c_buf_p);
3027            goto yy_find_action;
3028            }
3029         }
3030
3031      else switch ( yy_get_next_buffer(  ) )
3032         {
3033         case EOB_ACT_END_OF_FILE:
3034            {
3035            (yy_did_buffer_switch_on_eof) = 0;
3036
3037            if ( convert_wrap( ) )
3038               {
3039               /* Note: because we've taken care in
3040                * yy_get_next_buffer() to have set up
3041                * convert_text, we can now set up
3042                * yy_c_buf_p so that if some total
3043                * hoser (like flex itself) wants to
3044                * call the scanner after we return the
3045                * YY_NULL, it'll still work - another
3046                * YY_NULL will get returned.
3047                */
3048               (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
3049
3050               yy_act = YY_STATE_EOF(YY_START);
3051               goto do_action;
3052               }
3053
3054            else
3055               {
3056               if ( ! (yy_did_buffer_switch_on_eof) )
3057                  YY_NEW_FILE;
3058               }
3059            break;
3060            }
3061
3062         case EOB_ACT_CONTINUE_SCAN:
3063            (yy_c_buf_p) =
3064               (yytext_ptr) + yy_amount_of_matched_text;
3065
3066            yy_current_state = yy_get_previous_state(  );
3067
3068            yy_cp = (yy_c_buf_p);
3069            yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3070            goto yy_match;
3071
3072         case EOB_ACT_LAST_MATCH:
3073            (yy_c_buf_p) =
3074            &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
3075
3076            yy_current_state = yy_get_previous_state(  );
3077
3078            yy_cp = (yy_c_buf_p);
3079            yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3080            goto yy_find_action;
3081         }
3082      break;
3083      }
3084
3085   default:
3086      YY_FATAL_ERROR(
3087         "fatal flex scanner internal error--no action found" );
3088   } /* end of action switch */
3089      } /* end of scanning one token */
3090} /* end of convert_lex */
3091
3092/* yy_get_next_buffer - try to read in a new buffer
3093 *
3094 * Returns a code representing an action:
3095 * EOB_ACT_LAST_MATCH -
3096 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
3097 * EOB_ACT_END_OF_FILE - end of file
3098 */
3099static int yy_get_next_buffer (void)
3100{
3101      register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
3102   register char *source = (yytext_ptr);
3103   register int number_to_move, i;
3104   int ret_val;
3105
3106   if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
3107      YY_FATAL_ERROR(
3108      "fatal flex scanner internal error--end of buffer missed" );
3109
3110   if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
3111      { /* Don't try to fill the buffer, so this is an EOF. */
3112      if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
3113         {
3114         /* We matched a single character, the EOB, so
3115          * treat this as a final EOF.
3116          */
3117         return EOB_ACT_END_OF_FILE;
3118         }
3119
3120      else
3121         {
3122         /* We matched some text prior to the EOB, first
3123          * process it.
3124          */
3125         return EOB_ACT_LAST_MATCH;
3126         }
3127      }
3128
3129   /* Try to read more data. */
3130
3131   /* First move last chars to start of buffer. */
3132   number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
3133
3134   for ( i = 0; i < number_to_move; ++i )
3135      *(dest++) = *(source++);
3136
3137   if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
3138      /* don't do the read, it's not guaranteed to return an EOF,
3139       * just force an EOF
3140       */
3141      YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
3142
3143   else
3144      {
3145         yy_size_t num_to_read =
3146         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
3147
3148      while ( num_to_read <= 0 )
3149         { /* Not enough room in the buffer - grow it. */
3150
3151         /* just a shorter name for the current buffer */
3152         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
3153
3154         int yy_c_buf_p_offset =
3155            (int) ((yy_c_buf_p) - b->yy_ch_buf);
3156
3157         if ( b->yy_is_our_buffer )
3158            {
3159            yy_size_t new_size = b->yy_buf_size * 2;
3160
3161            if ( new_size <= 0 )
3162               b->yy_buf_size += b->yy_buf_size / 8;
3163            else
3164               b->yy_buf_size *= 2;
3165
3166            b->yy_ch_buf = (char *)
3167               /* Include room in for 2 EOB chars. */
3168               convert_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
3169            }
3170         else
3171            /* Can't grow it, we don't own it. */
3172            b->yy_ch_buf = 0;
3173
3174         if ( ! b->yy_ch_buf )
3175            YY_FATAL_ERROR(
3176            "fatal error - scanner input buffer overflow" );
3177
3178         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
3179
3180         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
3181                  number_to_move - 1;
3182
3183         }
3184
3185      if ( num_to_read > YY_READ_BUF_SIZE )
3186         num_to_read = YY_READ_BUF_SIZE;
3187
3188      /* Read in more data. */
3189      YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
3190         (yy_n_chars), num_to_read );
3191
3192      YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3193      }
3194
3195   if ( (yy_n_chars) == 0 )
3196      {
3197      if ( number_to_move == YY_MORE_ADJ )
3198         {
3199         ret_val = EOB_ACT_END_OF_FILE;
3200         convert_restart(convert_in  );
3201         }
3202
3203      else
3204         {
3205         ret_val = EOB_ACT_LAST_MATCH;
3206         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
3207            YY_BUFFER_EOF_PENDING;
3208         }
3209      }
3210
3211   else
3212      ret_val = EOB_ACT_CONTINUE_SCAN;
3213
3214   if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
3215      /* Extend the array by 50%, plus the number we really need. */
3216      yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
3217      YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) convert_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
3218      if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3219         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
3220   }
3221
3222   (yy_n_chars) += number_to_move;
3223   YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
3224   YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
3225
3226   (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
3227
3228   return ret_val;
3229}
3230
3231/* yy_get_previous_state - get the state just before the EOB char was reached */
3232
3233    static yy_state_type yy_get_previous_state (void)
3234{
3235   register yy_state_type yy_current_state;
3236   register char *yy_cp;
3237   
3238   yy_current_state = (yy_start);
3239
3240   for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
3241      {
3242      register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
3243      if ( yy_accept[yy_current_state] )
3244         {
3245         (yy_last_accepting_state) = yy_current_state;
3246         (yy_last_accepting_cpos) = yy_cp;
3247         }
3248      while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3249         {
3250         yy_current_state = (int) yy_def[yy_current_state];
3251         if ( yy_current_state >= 84 )
3252            yy_c = yy_meta[(unsigned int) yy_c];
3253         }
3254      yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3255      }
3256
3257   return yy_current_state;
3258}
3259
3260/* yy_try_NUL_trans - try to make a transition on the NUL character
3261 *
3262 * synopsis
3263 * next_state = yy_try_NUL_trans( current_state );
3264 */
3265    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
3266{
3267   register int yy_is_jam;
3268      register char *yy_cp = (yy_c_buf_p);
3269
3270   register YY_CHAR yy_c = 1;
3271   if ( yy_accept[yy_current_state] )
3272      {
3273      (yy_last_accepting_state) = yy_current_state;
3274      (yy_last_accepting_cpos) = yy_cp;
3275      }
3276   while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3277      {
3278      yy_current_state = (int) yy_def[yy_current_state];
3279      if ( yy_current_state >= 84 )
3280         yy_c = yy_meta[(unsigned int) yy_c];
3281      }
3282   yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3283   yy_is_jam = (yy_current_state == 83);
3284
3285   return yy_is_jam ? 0 : yy_current_state;
3286}
3287
3288    static void yyunput (int c, register char * yy_bp )
3289{
3290   register char *yy_cp;
3291   
3292    yy_cp = (yy_c_buf_p);
3293
3294   /* undo effects of setting up convert_text */
3295   *yy_cp = (yy_hold_char);
3296
3297   if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3298      { /* need to shift things up to make room */
3299      /* +2 for EOB chars. */
3300      register yy_size_t number_to_move = (yy_n_chars) + 2;
3301      register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
3302               YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
3303      register char *source =
3304            &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
3305
3306      while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3307         *--dest = *--source;
3308
3309      yy_cp += (int) (dest - source);
3310      yy_bp += (int) (dest - source);
3311      YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
3312         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
3313
3314      if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3315         YY_FATAL_ERROR( "flex scanner push-back overflow" );
3316      }
3317
3318   *--yy_cp = (char) c;
3319
3320   (yytext_ptr) = yy_bp;
3321   (yy_hold_char) = *yy_cp;
3322   (yy_c_buf_p) = yy_cp;
3323}
3324
3325#ifndef YY_NO_INPUT
3326#ifdef __cplusplus
3327    static int yyinput (void)
3328#else
3329    static int input  (void)
3330#endif
3331
3332{
3333   int c;
3334   
3335   *(yy_c_buf_p) = (yy_hold_char);
3336
3337   if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
3338      {
3339      /* yy_c_buf_p now points to the character we want to return.
3340       * If this occurs *before* the EOB characters, then it's a
3341       * valid NUL; if not, then we've hit the end of the buffer.
3342       */
3343      if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3344         /* This was really a NUL. */
3345         *(yy_c_buf_p) = '\0';
3346
3347      else
3348         { /* need more input */
3349         yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
3350         ++(yy_c_buf_p);
3351
3352         switch ( yy_get_next_buffer(  ) )
3353            {
3354            case EOB_ACT_LAST_MATCH:
3355               /* This happens because yy_g_n_b()
3356                * sees that we've accumulated a
3357                * token and flags that we need to
3358                * try matching the token before
3359                * proceeding.  But for input(),
3360                * there's no matching to consider.
3361                * So convert the EOB_ACT_LAST_MATCH
3362                * to EOB_ACT_END_OF_FILE.
3363                */
3364
3365               /* Reset buffer status. */
3366               convert_restart(convert_in );
3367
3368               /*FALLTHROUGH*/
3369
3370            case EOB_ACT_END_OF_FILE:
3371               {
3372               if ( convert_wrap( ) )
3373                  return 0;
3374
3375               if ( ! (yy_did_buffer_switch_on_eof) )
3376                  YY_NEW_FILE;
3377#ifdef __cplusplus
3378               return yyinput();
3379#else
3380               return input();
3381#endif
3382               }
3383
3384            case EOB_ACT_CONTINUE_SCAN:
3385               (yy_c_buf_p) = (yytext_ptr) + offset;
3386               break;
3387            }
3388         }
3389      }
3390
3391   c = *(unsigned char *) (yy_c_buf_p);   /* cast for 8-bit char's */
3392   *(yy_c_buf_p) = '\0';   /* preserve convert_text */
3393   (yy_hold_char) = *++(yy_c_buf_p);
3394
3395   return c;
3396}
3397#endif   /* ifndef YY_NO_INPUT */
3398
3399/** Immediately switch to a different input stream.
3400 * @param input_file A readable stream.
3401 *
3402 * @note This function does not reset the start condition to @c INITIAL .
3403 */
3404    void convert_restart  (FILE * input_file )
3405{
3406   
3407   if ( ! YY_CURRENT_BUFFER ){
3408        convert_ensure_buffer_stack ();
3409      YY_CURRENT_BUFFER_LVALUE =
3410            convert__create_buffer(convert_in,YY_BUF_SIZE );
3411   }
3412
3413   convert__init_buffer(YY_CURRENT_BUFFER,input_file );
3414   convert__load_buffer_state( );
3415}
3416
3417/** Switch to a different input buffer.
3418 * @param new_buffer The new input buffer.
3419 *
3420 */
3421    void convert__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
3422{
3423   
3424   /* TODO. We should be able to replace this entire function body
3425    * with
3426    *    convert_pop_buffer_state();
3427    *    convert_push_buffer_state(new_buffer);
3428     */
3429   convert_ensure_buffer_stack ();
3430   if ( YY_CURRENT_BUFFER == new_buffer )
3431      return;
3432
3433   if ( YY_CURRENT_BUFFER )
3434      {
3435      /* Flush out information for old buffer. */
3436      *(yy_c_buf_p) = (yy_hold_char);
3437      YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3438      YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3439      }
3440
3441   YY_CURRENT_BUFFER_LVALUE = new_buffer;
3442   convert__load_buffer_state( );
3443
3444   /* We don't actually know whether we did this switch during
3445    * EOF (convert_wrap()) processing, but the only time this flag
3446    * is looked at is after convert_wrap() is called, so it's safe
3447    * to go ahead and always set it.
3448    */
3449   (yy_did_buffer_switch_on_eof) = 1;
3450}
3451
3452static void convert__load_buffer_state  (void)
3453{
3454      (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3455   (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3456   convert_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3457   (yy_hold_char) = *(yy_c_buf_p);
3458}
3459
3460/** Allocate and initialize an input buffer state.
3461 * @param file A readable stream.
3462 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3463 *
3464 * @return the allocated buffer state.
3465 */
3466    YY_BUFFER_STATE convert__create_buffer  (FILE * file, int  size )
3467{
3468   YY_BUFFER_STATE b;
3469   
3470   b = (YY_BUFFER_STATE) convert_alloc(sizeof( struct yy_buffer_state )  );
3471   if ( ! b )
3472      YY_FATAL_ERROR( "out of dynamic memory in convert__create_buffer()" );
3473
3474   b->yy_buf_size = size;
3475
3476   /* yy_ch_buf has to be 2 characters longer than the size given because
3477    * we need to put in 2 end-of-buffer characters.
3478    */
3479   b->yy_ch_buf = (char *) convert_alloc(b->yy_buf_size + 2  );
3480   if ( ! b->yy_ch_buf )
3481      YY_FATAL_ERROR( "out of dynamic memory in convert__create_buffer()" );
3482
3483   b->yy_is_our_buffer = 1;
3484
3485   convert__init_buffer(b,file );
3486
3487   return b;
3488}
3489
3490/** Destroy the buffer.
3491 * @param b a buffer created with convert__create_buffer()
3492 *
3493 */
3494    void convert__delete_buffer (YY_BUFFER_STATE  b )
3495{
3496   
3497   if ( ! b )
3498      return;
3499
3500   if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3501      YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3502
3503   if ( b->yy_is_our_buffer )
3504      convert_free((void *) b->yy_ch_buf  );
3505
3506   convert_free((void *) b  );
3507}
3508
3509#ifndef __cplusplus
3510extern int isatty (int );
3511#endif /* __cplusplus */
3512   
3513/* Initializes or reinitializes a buffer.
3514 * This function is sometimes called more than once on the same buffer,
3515 * such as during a convert_restart() or at EOF.
3516 */
3517    static void convert__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
3518
3519{
3520   int oerrno = errno;
3521   
3522   convert__flush_buffer(b );
3523
3524   b->yy_input_file = file;
3525   b->yy_fill_buffer = 1;
3526
3527    /* If b is the current buffer, then convert__init_buffer was _probably_
3528     * called from convert_restart() or through yy_get_next_buffer.
3529     * In that case, we don't want to reset the lineno or column.
3530     */
3531    if (b != YY_CURRENT_BUFFER){
3532        b->yy_bs_lineno = 1;
3533        b->yy_bs_column = 0;
3534    }
3535
3536        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3537   
3538   errno = oerrno;
3539}
3540
3541/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3542 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3543 *
3544 */
3545    void convert__flush_buffer (YY_BUFFER_STATE  b )
3546{
3547      if ( ! b )
3548      return;
3549
3550   b->yy_n_chars = 0;
3551
3552   /* We always need two end-of-buffer characters.  The first causes
3553    * a transition to the end-of-buffer state.  The second causes
3554    * a jam in that state.
3555    */
3556   b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3557   b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3558
3559   b->yy_buf_pos = &b->yy_ch_buf[0];
3560
3561   b->yy_at_bol = 1;
3562   b->yy_buffer_status = YY_BUFFER_NEW;
3563
3564   if ( b == YY_CURRENT_BUFFER )
3565      convert__load_buffer_state( );
3566}
3567
3568/** Pushes the new state onto the stack. The new state becomes
3569 *  the current state. This function will allocate the stack
3570 *  if necessary.
3571 *  @param new_buffer The new state.
3572 * 
3573 */
3574void convert_push_buffer_state (YY_BUFFER_STATE new_buffer )
3575{
3576      if (new_buffer == NULL)
3577      return;
3578
3579   convert_ensure_buffer_stack();
3580
3581   /* This block is copied from convert__switch_to_buffer. */
3582   if ( YY_CURRENT_BUFFER )
3583      {
3584      /* Flush out information for old buffer. */
3585      *(yy_c_buf_p) = (yy_hold_char);
3586      YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3587      YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3588      }
3589
3590   /* Only push if top exists. Otherwise, replace top. */
3591   if (YY_CURRENT_BUFFER)
3592      (yy_buffer_stack_top)++;
3593   YY_CURRENT_BUFFER_LVALUE = new_buffer;
3594
3595   /* copied from convert__switch_to_buffer. */
3596   convert__load_buffer_state( );
3597   (yy_did_buffer_switch_on_eof) = 1;
3598}
3599
3600/** Removes and deletes the top of the stack, if present.
3601 *  The next element becomes the new top.
3602 * 
3603 */
3604void convert_pop_buffer_state (void)
3605{
3606      if (!YY_CURRENT_BUFFER)
3607      return;
3608
3609   convert__delete_buffer(YY_CURRENT_BUFFER );
3610   YY_CURRENT_BUFFER_LVALUE = NULL;
3611   if ((yy_buffer_stack_top) > 0)
3612      --(yy_buffer_stack_top);
3613
3614   if (YY_CURRENT_BUFFER) {
3615      convert__load_buffer_state( );
3616      (yy_did_buffer_switch_on_eof) = 1;
3617   }
3618}
3619
3620/* Allocates the stack if it does not exist.
3621 *  Guarantees space for at least one push.
3622 */
3623static void convert_ensure_buffer_stack (void)
3624{
3625   yy_size_t num_to_alloc;
3626   
3627   if (!(yy_buffer_stack)) {
3628
3629      /* First allocation is just for 2 elements, since we don't know if this
3630       * scanner will even need a stack. We use 2 instead of 1 to avoid an
3631       * immediate realloc on the next call.
3632         */
3633      num_to_alloc = 1;
3634      (yy_buffer_stack) = (struct yy_buffer_state**)convert_alloc
3635                        (num_to_alloc * sizeof(struct yy_buffer_state*)
3636                        );
3637      if ( ! (yy_buffer_stack) )
3638         YY_FATAL_ERROR( "out of dynamic memory in convert_ensure_buffer_stack()" );
3639                         
3640      memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3641           
3642      (yy_buffer_stack_max) = num_to_alloc;
3643      (yy_buffer_stack_top) = 0;
3644      return;
3645   }
3646
3647   if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3648
3649      /* Increase the buffer to prepare for a possible push. */
3650      int grow_size = 8 /* arbitrary grow size */;
3651
3652      num_to_alloc = (yy_buffer_stack_max) + grow_size;
3653      (yy_buffer_stack) = (struct yy_buffer_state**)convert_realloc
3654                        ((yy_buffer_stack),
3655                        num_to_alloc * sizeof(struct yy_buffer_state*)
3656                        );
3657      if ( ! (yy_buffer_stack) )
3658         YY_FATAL_ERROR( "out of dynamic memory in convert_ensure_buffer_stack()" );
3659
3660      /* zero only the new slots.*/
3661      memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3662      (yy_buffer_stack_max) = num_to_alloc;
3663   }
3664}
3665
3666/** Setup the input buffer state to scan directly from a user-specified character buffer.
3667 * @param base the character buffer
3668 * @param size the size in bytes of the character buffer
3669 *
3670 * @return the newly allocated buffer state object.
3671 */
3672YY_BUFFER_STATE convert__scan_buffer  (char * base, yy_size_t  size )
3673{
3674   YY_BUFFER_STATE b;
3675   
3676   if ( size < 2 ||
3677        base[size-2] != YY_END_OF_BUFFER_CHAR ||
3678        base[size-1] != YY_END_OF_BUFFER_CHAR )
3679      /* They forgot to leave room for the EOB's. */
3680      return 0;
3681
3682   b = (YY_BUFFER_STATE) convert_alloc(sizeof( struct yy_buffer_state )  );
3683   if ( ! b )
3684      YY_FATAL_ERROR( "out of dynamic memory in convert__scan_buffer()" );
3685
3686   b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
3687   b->yy_buf_pos = b->yy_ch_buf = base;
3688   b->yy_is_our_buffer = 0;
3689   b->yy_input_file = 0;
3690   b->yy_n_chars = b->yy_buf_size;
3691   b->yy_is_interactive = 0;
3692   b->yy_at_bol = 1;
3693   b->yy_fill_buffer = 0;
3694   b->yy_buffer_status = YY_BUFFER_NEW;
3695
3696   convert__switch_to_buffer();
3697
3698   return b;
3699}
3700
3701/** Setup the input buffer state to scan a string. The next call to convert_lex() will
3702 * scan from a @e copy of @a str.
3703 * @param yystr a NUL-terminated string to scan
3704 *
3705 * @return the newly allocated buffer state object.
3706 * @note If you want to scan bytes that may contain NUL values, then use
3707 *       convert__scan_bytes() instead.
3708 */
3709YY_BUFFER_STATE convert__scan_string (yyconst char * yystr )
3710{
3711   
3712   return convert__scan_bytes(yystr,strlen(yystr) );
3713}
3714
3715/** Setup the input buffer state to scan the given bytes. The next call to convert_lex() will
3716 * scan from a @e copy of @a bytes.
3717 * @param bytes the byte buffer to scan
3718 * @param len the number of bytes in the buffer pointed to by @a bytes.
3719 *
3720 * @return the newly allocated buffer state object.
3721 */
3722YY_BUFFER_STATE convert__scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
3723{
3724   YY_BUFFER_STATE b;
3725   char *buf;
3726   yy_size_t n, i;
3727   
3728   /* Get memory for full buffer, including space for trailing EOB's. */
3729   n = _yybytes_len + 2;
3730   buf = (char *) convert_alloc();
3731   if ( ! buf )
3732      YY_FATAL_ERROR( "out of dynamic memory in convert__scan_bytes()" );
3733
3734   for ( i = 0; i < _yybytes_len; ++i )
3735      buf[i] = yybytes[i];
3736
3737   buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3738
3739   b = convert__scan_buffer(buf,n );
3740   if ( ! b )
3741      YY_FATAL_ERROR( "bad buffer in convert__scan_bytes()" );
3742
3743   /* It's okay to grow etc. this buffer, and we should throw it
3744    * away when we're done.
3745    */
3746   b->yy_is_our_buffer = 1;
3747
3748   return b;
3749}
3750
3751#ifndef YY_EXIT_FAILURE
3752#define YY_EXIT_FAILURE 2
3753#endif
3754
3755static void yy_fatal_error (yyconst char* msg )
3756{
3757      (void) fprintf( stderr, "%s\n", msg );
3758   exit( YY_EXIT_FAILURE );
3759}
3760
3761/* Redefine yyless() so it works in section 3 code. */
3762
3763#undef yyless
3764#define yyless(n) \
3765   do \
3766      { \
3767      /* Undo effects of setting up convert_text. */ \
3768        int yyless_macro_arg = (n); \
3769        YY_LESS_LINENO(yyless_macro_arg);\
3770      convert_text[convert_leng] = (yy_hold_char); \
3771      (yy_c_buf_p) = convert_text + yyless_macro_arg; \
3772      (yy_hold_char) = *(yy_c_buf_p); \
3773      *(yy_c_buf_p) = '\0'; \
3774      convert_leng = yyless_macro_arg; \
3775      } \
3776   while ( 0 )
3777
3778/* Accessor  methods (get/set functions) to struct members. */
3779
3780/** Get the current line number.
3781 *
3782 */
3783int convert_get_lineno  (void)
3784{
3785       
3786    return convert_lineno;
3787}
3788
3789/** Get the input stream.
3790 *
3791 */
3792FILE *convert_get_in  (void)
3793{
3794        return convert_in;
3795}
3796
3797/** Get the output stream.
3798 *
3799 */
3800FILE *convert_get_out  (void)
3801{
3802        return convert_out;
3803}
3804
3805/** Get the length of the current token.
3806 *
3807 */
3808yy_size_t convert_get_leng  (void)
3809{
3810        return convert_leng;
3811}
3812
3813/** Get the current token.
3814 *
3815 */
3816
3817char *convert_get_text  (void)
3818{
3819        return convert_text;
3820}
3821
3822/** Set the current line number.
3823 * @param line_number
3824 *
3825 */
3826void convert_set_lineno (int  line_number )
3827{
3828   
3829    convert_lineno = line_number;
3830}
3831
3832/** Set the input stream. This does not discard the current
3833 * input buffer.
3834 * @param in_str A readable stream.
3835 *
3836 * @see convert__switch_to_buffer
3837 */
3838void convert_set_in (FILE *  in_str )
3839{
3840        convert_in = in_str ;
3841}
3842
3843void convert_set_out (FILE *  out_str )
3844{
3845        convert_out = out_str ;
3846}
3847
3848int convert_get_debug  (void)
3849{
3850        return convert__flex_debug;
3851}
3852
3853void convert_set_debug (int  bdebug )
3854{
3855        convert__flex_debug = bdebug ;
3856}
3857
3858static int yy_init_globals (void)
3859{
3860        /* Initialization is the same as for the non-reentrant scanner.
3861     * This function is called from convert_lex_destroy(), so don't allocate here.
3862     */
3863
3864    (yy_buffer_stack) = 0;
3865    (yy_buffer_stack_top) = 0;
3866    (yy_buffer_stack_max) = 0;
3867    (yy_c_buf_p) = (char *) 0;
3868    (yy_init) = 0;
3869    (yy_start) = 0;
3870
3871/* Defined in main.c */
3872#ifdef YY_STDINIT
3873    convert_in = stdin;
3874    convert_out = stdout;
3875#else
3876    convert_in = (FILE *) 0;
3877    convert_out = (FILE *) 0;
3878#endif
3879
3880    /* For future reference: Set errno on error, since we are called by
3881     * convert_lex_init()
3882     */
3883    return 0;
3884}
3885
3886/* convert_lex_destroy is for both reentrant and non-reentrant scanners. */
3887int convert_lex_destroy  (void)
3888{
3889   
3890    /* Pop the buffer stack, destroying each element. */
3891   while(YY_CURRENT_BUFFER){
3892      convert__delete_buffer(YY_CURRENT_BUFFER  );
3893      YY_CURRENT_BUFFER_LVALUE = NULL;
3894      convert_pop_buffer_state();
3895   }
3896
3897   /* Destroy the stack itself. */
3898   convert_free((yy_buffer_stack) );
3899   (yy_buffer_stack) = NULL;
3900
3901    /* Reset the globals. This is important in a non-reentrant scanner so the next time
3902     * convert_lex() is called, initialization will occur. */
3903    yy_init_globals( );
3904
3905    return 0;
3906}
3907
3908/*
3909 * Internal utility routines.
3910 */
3911
3912#ifndef yytext_ptr
3913static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3914{
3915   register int i;
3916   for ( i = 0; i < n; ++i )
3917      s1[i] = s2[i];
3918}
3919#endif
3920
3921#ifdef YY_NEED_STRLEN
3922static int yy_flex_strlen (yyconst char * s )
3923{
3924   register int n;
3925   for ( n = 0; s[n]; ++n )
3926      ;
3927
3928   return n;
3929}
3930#endif
3931
3932void *convert_alloc (yy_size_t  size )
3933{
3934   return (void *) malloc( size );
3935}
3936
3937void *convert_realloc  (void * ptr, yy_size_t  size )
3938{
3939   /* The cast to (char *) in the following accommodates both
3940    * implementations that use char* generic pointers, and those
3941    * that use void* generic pointers.  It works with the latter
3942    * because both ANSI C and C++ allow castless assignment from
3943    * any pointer type to void*, and deal with argument conversions
3944    * as though doing an assignment.
3945    */
3946   return (void *) realloc( (char *) ptr, size );
3947}
3948
3949void convert_free (void * ptr )
3950{
3951   free( (char *) ptr );   /* see convert_realloc() for (char *) cast */
3952}
3953
3954#define YYTABLES_NAME "yytables"
3955
3956#line 69 "convert.lex"
3957
3958
3959
Note: See TracBrowser for help on using the repository browser.