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 vendors/AGRIF/CMEMS_2020/LIB – NEMO

source: vendors/AGRIF/CMEMS_2020/LIB/main.c @ 10088

Last change on this file since 10088 was 10088, checked in by rblod, 6 years ago

update conv

  • 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 <stdlib.h>
2610#include <string.h>
2611
2612#define YY_NO_INPUT
2613#line 595 "convert.yy.c"
2614
2615#define INITIAL 0
2616#define character 1
2617
2618#ifndef YY_NO_UNISTD_H
2619/* Special case for "unistd.h", since it is non-ANSI. We include it way
2620 * down here because we want the user's section 1 to have been scanned first.
2621 * The user has a chance to override it with an option.
2622 */
2623#include <unistd.h>
2624#endif
2625
2626#ifndef YY_EXTRA_TYPE
2627#define YY_EXTRA_TYPE void *
2628#endif
2629
2630static int yy_init_globals (void );
2631
2632/* Accessor methods to globals.
2633   These are made visible to non-reentrant scanners for convenience. */
2634
2635int convert_lex_destroy (void );
2636
2637int convert_get_debug (void );
2638
2639void convert_set_debug (int debug_flag  );
2640
2641YY_EXTRA_TYPE convert_get_extra (void );
2642
2643void convert_set_extra (YY_EXTRA_TYPE user_defined  );
2644
2645FILE *convert_get_in (void );
2646
2647void convert_set_in  (FILE * in_str  );
2648
2649FILE *convert_get_out (void );
2650
2651void convert_set_out  (FILE * out_str  );
2652
2653yy_size_t convert_get_leng (void );
2654
2655char *convert_get_text (void );
2656
2657int convert_get_lineno (void );
2658
2659void convert_set_lineno (int line_number  );
2660
2661/* Macros after this point can all be overridden by user definitions in
2662 * section 1.
2663 */
2664
2665#ifndef YY_SKIP_YYWRAP
2666#ifdef __cplusplus
2667extern "C" int convert_wrap (void );
2668#else
2669extern int convert_wrap (void );
2670#endif
2671#endif
2672
2673    static void yyunput (int c,char *buf_ptr  );
2674   
2675#ifndef yytext_ptr
2676static void yy_flex_strncpy (char *,yyconst char *,int );
2677#endif
2678
2679#ifdef YY_NEED_STRLEN
2680static int yy_flex_strlen (yyconst char * );
2681#endif
2682
2683#ifndef YY_NO_INPUT
2684
2685#ifdef __cplusplus
2686static int yyinput (void );
2687#else
2688static int input (void );
2689#endif
2690
2691#endif
2692
2693/* Amount of stuff to slurp up with each read. */
2694#ifndef YY_READ_BUF_SIZE
2695#define YY_READ_BUF_SIZE 8192
2696#endif
2697
2698/* Copy whatever the last rule matched to the standard output. */
2699#ifndef ECHO
2700/* This used to be an fputs(), but since the string might contain NUL's,
2701 * we now use fwrite().
2702 */
2703#define ECHO fwrite( convert_text, convert_leng, 1, convert_out )
2704#endif
2705
2706/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
2707 * is returned in "result".
2708 */
2709#ifndef YY_INPUT
2710#define YY_INPUT(buf,result,max_size) \
2711   if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
2712      { \
2713      int c = '*'; \
2714      yy_size_t n; \
2715      for ( n = 0; n < max_size && \
2716              (c = getc( convert_in )) != EOF && c != '\n'; ++n ) \
2717         buf[n] = (char) c; \
2718      if ( c == '\n' ) \
2719         buf[n++] = (char) c; \
2720      if ( c == EOF && ferror( convert_in ) ) \
2721         YY_FATAL_ERROR( "input in flex scanner failed" ); \
2722      result = n; \
2723      } \
2724   else \
2725      { \
2726      errno=0; \
2727      while ( (result = fread(buf, 1, max_size, convert_in))==0 && ferror(convert_in)) \
2728         { \
2729         if( errno != EINTR) \
2730            { \
2731            YY_FATAL_ERROR( "input in flex scanner failed" ); \
2732            break; \
2733            } \
2734         errno=0; \
2735         clearerr(convert_in); \
2736         } \
2737      }\
2738\
2739
2740#endif
2741
2742/* No semi-colon after return; correct usage is to write "yyterminate();" -
2743 * we don't want an extra ';' after the "return" because that will cause
2744 * some compilers to complain about unreachable statements.
2745 */
2746#ifndef yyterminate
2747#define yyterminate() return YY_NULL
2748#endif
2749
2750/* Number of entries by which start-condition stack grows. */
2751#ifndef YY_START_STACK_INCR
2752#define YY_START_STACK_INCR 25
2753#endif
2754
2755/* Report a fatal error. */
2756#ifndef YY_FATAL_ERROR
2757#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
2758#endif
2759
2760/* end tables serialization structures and prototypes */
2761
2762/* Default declaration of generated scanner - a define so the user can
2763 * easily add parameters.
2764 */
2765#ifndef YY_DECL
2766#define YY_DECL_IS_OURS 1
2767
2768extern int convert_lex (void);
2769
2770#define YY_DECL int convert_lex (void)
2771#endif /* !YY_DECL */
2772
2773/* Code executed at the beginning of each rule, after convert_text and convert_leng
2774 * have been set up.
2775 */
2776#ifndef YY_USER_ACTION
2777#define YY_USER_ACTION
2778#endif
2779
2780/* Code executed at the end of each rule. */
2781#ifndef YY_BREAK
2782#define YY_BREAK break;
2783#endif
2784
2785#define YY_RULE_SETUP \
2786   YY_USER_ACTION
2787
2788/** The main scanner function which does all the work.
2789 */
2790YY_DECL
2791{
2792   register yy_state_type yy_current_state;
2793   register char *yy_cp, *yy_bp;
2794   register int yy_act;
2795   
2796#line 54 "convert.lex"
2797
2798#line 780 "convert.yy.c"
2799
2800   if ( !(yy_init) )
2801      {
2802      (yy_init) = 1;
2803
2804#ifdef YY_USER_INIT
2805      YY_USER_INIT;
2806#endif
2807
2808      if ( ! (yy_start) )
2809         (yy_start) = 1;   /* first start state */
2810
2811      if ( ! convert_in )
2812         convert_in = stdin;
2813
2814      if ( ! convert_out )
2815         convert_out = stdout;
2816
2817      if ( ! YY_CURRENT_BUFFER ) {
2818         convert_ensure_buffer_stack ();
2819         YY_CURRENT_BUFFER_LVALUE =
2820            convert__create_buffer(convert_in,YY_BUF_SIZE );
2821      }
2822
2823      convert__load_buffer_state( );
2824      }
2825
2826   while ( 1 )    /* loops until end-of-file is reached */
2827      {
2828      yy_cp = (yy_c_buf_p);
2829
2830      /* Support of convert_text. */
2831      *yy_cp = (yy_hold_char);
2832
2833      /* yy_bp points to the position in yy_ch_buf of the start of
2834       * the current run.
2835       */
2836      yy_bp = yy_cp;
2837
2838      yy_current_state = (yy_start);
2839yy_match:
2840      do
2841         {
2842         register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
2843         if ( yy_accept[yy_current_state] )
2844            {
2845            (yy_last_accepting_state) = yy_current_state;
2846            (yy_last_accepting_cpos) = yy_cp;
2847            }
2848         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2849            {
2850            yy_current_state = (int) yy_def[yy_current_state];
2851            if ( yy_current_state >= 84 )
2852               yy_c = yy_meta[(unsigned int) yy_c];
2853            }
2854         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2855         ++yy_cp;
2856         }
2857      while ( yy_base[yy_current_state] != 194 );
2858
2859yy_find_action:
2860      yy_act = yy_accept[yy_current_state];
2861      if ( yy_act == 0 )
2862         { /* have to back up */
2863         yy_cp = (yy_last_accepting_cpos);
2864         yy_current_state = (yy_last_accepting_state);
2865         yy_act = yy_accept[yy_current_state];
2866         }
2867
2868      YY_DO_BEFORE_ACTION;
2869
2870do_action:  /* This label is used only to access EOF actions. */
2871
2872      switch ( yy_act )
2873   { /* beginning of action switch */
2874         case 0: /* must back up */
2875         /* undo the effects of YY_DO_BEFORE_ACTION */
2876         *yy_cp = (yy_hold_char);
2877         yy_cp = (yy_last_accepting_cpos);
2878         yy_current_state = (yy_last_accepting_state);
2879         goto yy_find_action;
2880
2881case 1:
2882YY_RULE_SETUP
2883#line 55 "convert.lex"
2884{ return TOK_MODULEMAIN; } /* name of the module                      */
2885   YY_BREAK
2886case 2:
2887YY_RULE_SETUP
2888#line 56 "convert.lex"
2889{ return TOK_NOTGRIDDEP; } /* variable which are not grid dependent   */
2890   YY_BREAK
2891case 3:
2892YY_RULE_SETUP
2893#line 57 "convert.lex"
2894{ return TOK_USE; }
2895   YY_BREAK
2896case 4:
2897YY_RULE_SETUP
2898#line 58 "convert.lex"
2899{ }
2900   YY_BREAK
2901case 5:
2902YY_RULE_SETUP
2903#line 59 "convert.lex"
2904{ return TOK_SEP; }
2905   YY_BREAK
2906case 6:
2907YY_RULE_SETUP
2908#line 60 "convert.lex"
2909{ return TOK_KIND; }
2910   YY_BREAK
2911case 7:
2912YY_RULE_SETUP
2913#line 61 "convert.lex"
2914{ return TOK_EQUAL; }
2915   YY_BREAK
2916case 8:
2917YY_RULE_SETUP
2918#line 62 "convert.lex"
2919{ strcpy(yylval.na,convert_text); return TOK_USEITEM;  }
2920   YY_BREAK
2921case 9:
2922YY_RULE_SETUP
2923#line 63 "convert.lex"
2924{ strcpy(yylval.na,convert_text); return TOK_PROBTYPE; }  /* dimension of the problem */
2925   YY_BREAK
2926case 10:
2927YY_RULE_SETUP
2928#line 64 "convert.lex"
2929{ strcpy(yylval.na,convert_text); return TOK_NAME; }
2930   YY_BREAK
2931case 11:
2932YY_RULE_SETUP
2933#line 65 "convert.lex"
2934{ strcpy(yylval.na,convert_text); return TOK_CSTINT; }
2935   YY_BREAK
2936case 12:
2937YY_RULE_SETUP
2938#line 66 "convert.lex"
2939{ return (int) *convert_text; }
2940   YY_BREAK
2941case 13:
2942/* rule 13 can match eol */
2943YY_RULE_SETUP
2944#line 67 "convert.lex"
2945{ line_num++; return (int) *convert_text; }
2946   YY_BREAK
2947case 14:
2948YY_RULE_SETUP
2949#line 68 "convert.lex"
2950;
2951   YY_BREAK
2952case 15:
2953YY_RULE_SETUP
2954#line 69 "convert.lex"
2955ECHO;
2956   YY_BREAK
2957#line 939 "convert.yy.c"
2958case YY_STATE_EOF(INITIAL):
2959case YY_STATE_EOF(character):
2960   yyterminate();
2961
2962   case YY_END_OF_BUFFER:
2963      {
2964      /* Amount of text matched not including the EOB char. */
2965      int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
2966
2967      /* Undo the effects of YY_DO_BEFORE_ACTION. */
2968      *yy_cp = (yy_hold_char);
2969      YY_RESTORE_YY_MORE_OFFSET
2970
2971      if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
2972         {
2973         /* We're scanning a new file or input source.  It's
2974          * possible that this happened because the user
2975          * just pointed convert_in at a new source and called
2976          * convert_lex().  If so, then we have to assure
2977          * consistency between YY_CURRENT_BUFFER and our
2978          * globals.  Here is the right place to do so, because
2979          * this is the first action (other than possibly a
2980          * back-up) that will match for the new input source.
2981          */
2982         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
2983         YY_CURRENT_BUFFER_LVALUE->yy_input_file = convert_in;
2984         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
2985         }
2986
2987      /* Note that here we test for yy_c_buf_p "<=" to the position
2988       * of the first EOB in the buffer, since yy_c_buf_p will
2989       * already have been incremented past the NUL character
2990       * (since all states make transitions on EOB to the
2991       * end-of-buffer state).  Contrast this with the test
2992       * in input().
2993       */
2994      if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
2995         { /* This was really a NUL. */
2996         yy_state_type yy_next_state;
2997
2998         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
2999
3000         yy_current_state = yy_get_previous_state(  );
3001
3002         /* Okay, we're now positioned to make the NUL
3003          * transition.  We couldn't have
3004          * yy_get_previous_state() go ahead and do it
3005          * for us because it doesn't know how to deal
3006          * with the possibility of jamming (and we don't
3007          * want to build jamming into it because then it
3008          * will run more slowly).
3009          */
3010
3011         yy_next_state = yy_try_NUL_trans( yy_current_state );
3012
3013         yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3014
3015         if ( yy_next_state )
3016            {
3017            /* Consume the NUL. */
3018            yy_cp = ++(yy_c_buf_p);
3019            yy_current_state = yy_next_state;
3020            goto yy_match;
3021            }
3022
3023         else
3024            {
3025            yy_cp = (yy_c_buf_p);
3026            goto yy_find_action;
3027            }
3028         }
3029
3030      else switch ( yy_get_next_buffer(  ) )
3031         {
3032         case EOB_ACT_END_OF_FILE:
3033            {
3034            (yy_did_buffer_switch_on_eof) = 0;
3035
3036            if ( convert_wrap( ) )
3037               {
3038               /* Note: because we've taken care in
3039                * yy_get_next_buffer() to have set up
3040                * convert_text, we can now set up
3041                * yy_c_buf_p so that if some total
3042                * hoser (like flex itself) wants to
3043                * call the scanner after we return the
3044                * YY_NULL, it'll still work - another
3045                * YY_NULL will get returned.
3046                */
3047               (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
3048
3049               yy_act = YY_STATE_EOF(YY_START);
3050               goto do_action;
3051               }
3052
3053            else
3054               {
3055               if ( ! (yy_did_buffer_switch_on_eof) )
3056                  YY_NEW_FILE;
3057               }
3058            break;
3059            }
3060
3061         case EOB_ACT_CONTINUE_SCAN:
3062            (yy_c_buf_p) =
3063               (yytext_ptr) + yy_amount_of_matched_text;
3064
3065            yy_current_state = yy_get_previous_state(  );
3066
3067            yy_cp = (yy_c_buf_p);
3068            yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3069            goto yy_match;
3070
3071         case EOB_ACT_LAST_MATCH:
3072            (yy_c_buf_p) =
3073            &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
3074
3075            yy_current_state = yy_get_previous_state(  );
3076
3077            yy_cp = (yy_c_buf_p);
3078            yy_bp = (yytext_ptr) + YY_MORE_ADJ;
3079            goto yy_find_action;
3080         }
3081      break;
3082      }
3083
3084   default:
3085      YY_FATAL_ERROR(
3086         "fatal flex scanner internal error--no action found" );
3087   } /* end of action switch */
3088      } /* end of scanning one token */
3089} /* end of convert_lex */
3090
3091/* yy_get_next_buffer - try to read in a new buffer
3092 *
3093 * Returns a code representing an action:
3094 * EOB_ACT_LAST_MATCH -
3095 * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
3096 * EOB_ACT_END_OF_FILE - end of file
3097 */
3098static int yy_get_next_buffer (void)
3099{
3100      register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
3101   register char *source = (yytext_ptr);
3102   register int number_to_move, i;
3103   int ret_val;
3104
3105   if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
3106      YY_FATAL_ERROR(
3107      "fatal flex scanner internal error--end of buffer missed" );
3108
3109   if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
3110      { /* Don't try to fill the buffer, so this is an EOF. */
3111      if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
3112         {
3113         /* We matched a single character, the EOB, so
3114          * treat this as a final EOF.
3115          */
3116         return EOB_ACT_END_OF_FILE;
3117         }
3118
3119      else
3120         {
3121         /* We matched some text prior to the EOB, first
3122          * process it.
3123          */
3124         return EOB_ACT_LAST_MATCH;
3125         }
3126      }
3127
3128   /* Try to read more data. */
3129
3130   /* First move last chars to start of buffer. */
3131   number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
3132
3133   for ( i = 0; i < number_to_move; ++i )
3134      *(dest++) = *(source++);
3135
3136   if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
3137      /* don't do the read, it's not guaranteed to return an EOF,
3138       * just force an EOF
3139       */
3140      YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
3141
3142   else
3143      {
3144         yy_size_t num_to_read =
3145         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
3146
3147      while ( num_to_read <= 0 )
3148         { /* Not enough room in the buffer - grow it. */
3149
3150         /* just a shorter name for the current buffer */
3151         YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
3152
3153         int yy_c_buf_p_offset =
3154            (int) ((yy_c_buf_p) - b->yy_ch_buf);
3155
3156         if ( b->yy_is_our_buffer )
3157            {
3158            yy_size_t new_size = b->yy_buf_size * 2;
3159
3160            if ( new_size <= 0 )
3161               b->yy_buf_size += b->yy_buf_size / 8;
3162            else
3163               b->yy_buf_size *= 2;
3164
3165            b->yy_ch_buf = (char *)
3166               /* Include room in for 2 EOB chars. */
3167               convert_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  );
3168            }
3169         else
3170            /* Can't grow it, we don't own it. */
3171            b->yy_ch_buf = 0;
3172
3173         if ( ! b->yy_ch_buf )
3174            YY_FATAL_ERROR(
3175            "fatal error - scanner input buffer overflow" );
3176
3177         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
3178
3179         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
3180                  number_to_move - 1;
3181
3182         }
3183
3184      if ( num_to_read > YY_READ_BUF_SIZE )
3185         num_to_read = YY_READ_BUF_SIZE;
3186
3187      /* Read in more data. */
3188      YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
3189         (yy_n_chars), num_to_read );
3190
3191      YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3192      }
3193
3194   if ( (yy_n_chars) == 0 )
3195      {
3196      if ( number_to_move == YY_MORE_ADJ )
3197         {
3198         ret_val = EOB_ACT_END_OF_FILE;
3199         convert_restart(convert_in  );
3200         }
3201
3202      else
3203         {
3204         ret_val = EOB_ACT_LAST_MATCH;
3205         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
3206            YY_BUFFER_EOF_PENDING;
3207         }
3208      }
3209
3210   else
3211      ret_val = EOB_ACT_CONTINUE_SCAN;
3212
3213   if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
3214      /* Extend the array by 50%, plus the number we really need. */
3215      yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
3216      YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) convert_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  );
3217      if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3218         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
3219   }
3220
3221   (yy_n_chars) += number_to_move;
3222   YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
3223   YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
3224
3225   (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
3226
3227   return ret_val;
3228}
3229
3230/* yy_get_previous_state - get the state just before the EOB char was reached */
3231
3232    static yy_state_type yy_get_previous_state (void)
3233{
3234   register yy_state_type yy_current_state;
3235   register char *yy_cp;
3236   
3237   yy_current_state = (yy_start);
3238
3239   for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
3240      {
3241      register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
3242      if ( yy_accept[yy_current_state] )
3243         {
3244         (yy_last_accepting_state) = yy_current_state;
3245         (yy_last_accepting_cpos) = yy_cp;
3246         }
3247      while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3248         {
3249         yy_current_state = (int) yy_def[yy_current_state];
3250         if ( yy_current_state >= 84 )
3251            yy_c = yy_meta[(unsigned int) yy_c];
3252         }
3253      yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3254      }
3255
3256   return yy_current_state;
3257}
3258
3259/* yy_try_NUL_trans - try to make a transition on the NUL character
3260 *
3261 * synopsis
3262 * next_state = yy_try_NUL_trans( current_state );
3263 */
3264    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
3265{
3266   register int yy_is_jam;
3267      register char *yy_cp = (yy_c_buf_p);
3268
3269   register YY_CHAR yy_c = 1;
3270   if ( yy_accept[yy_current_state] )
3271      {
3272      (yy_last_accepting_state) = yy_current_state;
3273      (yy_last_accepting_cpos) = yy_cp;
3274      }
3275   while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
3276      {
3277      yy_current_state = (int) yy_def[yy_current_state];
3278      if ( yy_current_state >= 84 )
3279         yy_c = yy_meta[(unsigned int) yy_c];
3280      }
3281   yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
3282   yy_is_jam = (yy_current_state == 83);
3283
3284   return yy_is_jam ? 0 : yy_current_state;
3285}
3286
3287    static void yyunput (int c, register char * yy_bp )
3288{
3289   register char *yy_cp;
3290   
3291    yy_cp = (yy_c_buf_p);
3292
3293   /* undo effects of setting up convert_text */
3294   *yy_cp = (yy_hold_char);
3295
3296   if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3297      { /* need to shift things up to make room */
3298      /* +2 for EOB chars. */
3299      register yy_size_t number_to_move = (yy_n_chars) + 2;
3300      register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
3301               YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
3302      register char *source =
3303            &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
3304
3305      while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
3306         *--dest = *--source;
3307
3308      yy_cp += (int) (dest - source);
3309      yy_bp += (int) (dest - source);
3310      YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
3311         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
3312
3313      if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
3314         YY_FATAL_ERROR( "flex scanner push-back overflow" );
3315      }
3316
3317   *--yy_cp = (char) c;
3318
3319   (yytext_ptr) = yy_bp;
3320   (yy_hold_char) = *yy_cp;
3321   (yy_c_buf_p) = yy_cp;
3322}
3323
3324#ifndef YY_NO_INPUT
3325#ifdef __cplusplus
3326    static int yyinput (void)
3327#else
3328    static int input  (void)
3329#endif
3330
3331{
3332   int c;
3333   
3334   *(yy_c_buf_p) = (yy_hold_char);
3335
3336   if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
3337      {
3338      /* yy_c_buf_p now points to the character we want to return.
3339       * If this occurs *before* the EOB characters, then it's a
3340       * valid NUL; if not, then we've hit the end of the buffer.
3341       */
3342      if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
3343         /* This was really a NUL. */
3344         *(yy_c_buf_p) = '\0';
3345
3346      else
3347         { /* need more input */
3348         yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
3349         ++(yy_c_buf_p);
3350
3351         switch ( yy_get_next_buffer(  ) )
3352            {
3353            case EOB_ACT_LAST_MATCH:
3354               /* This happens because yy_g_n_b()
3355                * sees that we've accumulated a
3356                * token and flags that we need to
3357                * try matching the token before
3358                * proceeding.  But for input(),
3359                * there's no matching to consider.
3360                * So convert the EOB_ACT_LAST_MATCH
3361                * to EOB_ACT_END_OF_FILE.
3362                */
3363
3364               /* Reset buffer status. */
3365               convert_restart(convert_in );
3366
3367               /*FALLTHROUGH*/
3368
3369            case EOB_ACT_END_OF_FILE:
3370               {
3371               if ( convert_wrap( ) )
3372                  return 0;
3373
3374               if ( ! (yy_did_buffer_switch_on_eof) )
3375                  YY_NEW_FILE;
3376#ifdef __cplusplus
3377               return yyinput();
3378#else
3379               return input();
3380#endif
3381               }
3382
3383            case EOB_ACT_CONTINUE_SCAN:
3384               (yy_c_buf_p) = (yytext_ptr) + offset;
3385               break;
3386            }
3387         }
3388      }
3389
3390   c = *(unsigned char *) (yy_c_buf_p);   /* cast for 8-bit char's */
3391   *(yy_c_buf_p) = '\0';   /* preserve convert_text */
3392   (yy_hold_char) = *++(yy_c_buf_p);
3393
3394   return c;
3395}
3396#endif   /* ifndef YY_NO_INPUT */
3397
3398/** Immediately switch to a different input stream.
3399 * @param input_file A readable stream.
3400 *
3401 * @note This function does not reset the start condition to @c INITIAL .
3402 */
3403    void convert_restart  (FILE * input_file )
3404{
3405   
3406   if ( ! YY_CURRENT_BUFFER ){
3407        convert_ensure_buffer_stack ();
3408      YY_CURRENT_BUFFER_LVALUE =
3409            convert__create_buffer(convert_in,YY_BUF_SIZE );
3410   }
3411
3412   convert__init_buffer(YY_CURRENT_BUFFER,input_file );
3413   convert__load_buffer_state( );
3414}
3415
3416/** Switch to a different input buffer.
3417 * @param new_buffer The new input buffer.
3418 *
3419 */
3420    void convert__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
3421{
3422   
3423   /* TODO. We should be able to replace this entire function body
3424    * with
3425    *    convert_pop_buffer_state();
3426    *    convert_push_buffer_state(new_buffer);
3427     */
3428   convert_ensure_buffer_stack ();
3429   if ( YY_CURRENT_BUFFER == new_buffer )
3430      return;
3431
3432   if ( YY_CURRENT_BUFFER )
3433      {
3434      /* Flush out information for old buffer. */
3435      *(yy_c_buf_p) = (yy_hold_char);
3436      YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3437      YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3438      }
3439
3440   YY_CURRENT_BUFFER_LVALUE = new_buffer;
3441   convert__load_buffer_state( );
3442
3443   /* We don't actually know whether we did this switch during
3444    * EOF (convert_wrap()) processing, but the only time this flag
3445    * is looked at is after convert_wrap() is called, so it's safe
3446    * to go ahead and always set it.
3447    */
3448   (yy_did_buffer_switch_on_eof) = 1;
3449}
3450
3451static void convert__load_buffer_state  (void)
3452{
3453      (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
3454   (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
3455   convert_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
3456   (yy_hold_char) = *(yy_c_buf_p);
3457}
3458
3459/** Allocate and initialize an input buffer state.
3460 * @param file A readable stream.
3461 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
3462 *
3463 * @return the allocated buffer state.
3464 */
3465    YY_BUFFER_STATE convert__create_buffer  (FILE * file, int  size )
3466{
3467   YY_BUFFER_STATE b;
3468   
3469   b = (YY_BUFFER_STATE) convert_alloc(sizeof( struct yy_buffer_state )  );
3470   if ( ! b )
3471      YY_FATAL_ERROR( "out of dynamic memory in convert__create_buffer()" );
3472
3473   b->yy_buf_size = size;
3474
3475   /* yy_ch_buf has to be 2 characters longer than the size given because
3476    * we need to put in 2 end-of-buffer characters.
3477    */
3478   b->yy_ch_buf = (char *) convert_alloc(b->yy_buf_size + 2  );
3479   if ( ! b->yy_ch_buf )
3480      YY_FATAL_ERROR( "out of dynamic memory in convert__create_buffer()" );
3481
3482   b->yy_is_our_buffer = 1;
3483
3484   convert__init_buffer(b,file );
3485
3486   return b;
3487}
3488
3489/** Destroy the buffer.
3490 * @param b a buffer created with convert__create_buffer()
3491 *
3492 */
3493    void convert__delete_buffer (YY_BUFFER_STATE  b )
3494{
3495   
3496   if ( ! b )
3497      return;
3498
3499   if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
3500      YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
3501
3502   if ( b->yy_is_our_buffer )
3503      convert_free((void *) b->yy_ch_buf  );
3504
3505   convert_free((void *) b  );
3506}
3507
3508#ifndef __cplusplus
3509extern int isatty (int );
3510#endif /* __cplusplus */
3511   
3512/* Initializes or reinitializes a buffer.
3513 * This function is sometimes called more than once on the same buffer,
3514 * such as during a convert_restart() or at EOF.
3515 */
3516    static void convert__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
3517
3518{
3519   int oerrno = errno;
3520   
3521   convert__flush_buffer(b );
3522
3523   b->yy_input_file = file;
3524   b->yy_fill_buffer = 1;
3525
3526    /* If b is the current buffer, then convert__init_buffer was _probably_
3527     * called from convert_restart() or through yy_get_next_buffer.
3528     * In that case, we don't want to reset the lineno or column.
3529     */
3530    if (b != YY_CURRENT_BUFFER){
3531        b->yy_bs_lineno = 1;
3532        b->yy_bs_column = 0;
3533    }
3534
3535        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3536   
3537   errno = oerrno;
3538}
3539
3540/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
3541 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
3542 *
3543 */
3544    void convert__flush_buffer (YY_BUFFER_STATE  b )
3545{
3546      if ( ! b )
3547      return;
3548
3549   b->yy_n_chars = 0;
3550
3551   /* We always need two end-of-buffer characters.  The first causes
3552    * a transition to the end-of-buffer state.  The second causes
3553    * a jam in that state.
3554    */
3555   b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3556   b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3557
3558   b->yy_buf_pos = &b->yy_ch_buf[0];
3559
3560   b->yy_at_bol = 1;
3561   b->yy_buffer_status = YY_BUFFER_NEW;
3562
3563   if ( b == YY_CURRENT_BUFFER )
3564      convert__load_buffer_state( );
3565}
3566
3567/** Pushes the new state onto the stack. The new state becomes
3568 *  the current state. This function will allocate the stack
3569 *  if necessary.
3570 *  @param new_buffer The new state.
3571 * 
3572 */
3573void convert_push_buffer_state (YY_BUFFER_STATE new_buffer )
3574{
3575      if (new_buffer == NULL)
3576      return;
3577
3578   convert_ensure_buffer_stack();
3579
3580   /* This block is copied from convert__switch_to_buffer. */
3581   if ( YY_CURRENT_BUFFER )
3582      {
3583      /* Flush out information for old buffer. */
3584      *(yy_c_buf_p) = (yy_hold_char);
3585      YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
3586      YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
3587      }
3588
3589   /* Only push if top exists. Otherwise, replace top. */
3590   if (YY_CURRENT_BUFFER)
3591      (yy_buffer_stack_top)++;
3592   YY_CURRENT_BUFFER_LVALUE = new_buffer;
3593
3594   /* copied from convert__switch_to_buffer. */
3595   convert__load_buffer_state( );
3596   (yy_did_buffer_switch_on_eof) = 1;
3597}
3598
3599/** Removes and deletes the top of the stack, if present.
3600 *  The next element becomes the new top.
3601 * 
3602 */
3603void convert_pop_buffer_state (void)
3604{
3605      if (!YY_CURRENT_BUFFER)
3606      return;
3607
3608   convert__delete_buffer(YY_CURRENT_BUFFER );
3609   YY_CURRENT_BUFFER_LVALUE = NULL;
3610   if ((yy_buffer_stack_top) > 0)
3611      --(yy_buffer_stack_top);
3612
3613   if (YY_CURRENT_BUFFER) {
3614      convert__load_buffer_state( );
3615      (yy_did_buffer_switch_on_eof) = 1;
3616   }
3617}
3618
3619/* Allocates the stack if it does not exist.
3620 *  Guarantees space for at least one push.
3621 */
3622static void convert_ensure_buffer_stack (void)
3623{
3624   yy_size_t num_to_alloc;
3625   
3626   if (!(yy_buffer_stack)) {
3627
3628      /* First allocation is just for 2 elements, since we don't know if this
3629       * scanner will even need a stack. We use 2 instead of 1 to avoid an
3630       * immediate realloc on the next call.
3631         */
3632      num_to_alloc = 1;
3633      (yy_buffer_stack) = (struct yy_buffer_state**)convert_alloc
3634                        (num_to_alloc * sizeof(struct yy_buffer_state*)
3635                        );
3636      if ( ! (yy_buffer_stack) )
3637         YY_FATAL_ERROR( "out of dynamic memory in convert_ensure_buffer_stack()" );
3638                         
3639      memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
3640           
3641      (yy_buffer_stack_max) = num_to_alloc;
3642      (yy_buffer_stack_top) = 0;
3643      return;
3644   }
3645
3646   if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
3647
3648      /* Increase the buffer to prepare for a possible push. */
3649      int grow_size = 8 /* arbitrary grow size */;
3650
3651      num_to_alloc = (yy_buffer_stack_max) + grow_size;
3652      (yy_buffer_stack) = (struct yy_buffer_state**)convert_realloc
3653                        ((yy_buffer_stack),
3654                        num_to_alloc * sizeof(struct yy_buffer_state*)
3655                        );
3656      if ( ! (yy_buffer_stack) )
3657         YY_FATAL_ERROR( "out of dynamic memory in convert_ensure_buffer_stack()" );
3658
3659      /* zero only the new slots.*/
3660      memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
3661      (yy_buffer_stack_max) = num_to_alloc;
3662   }
3663}
3664
3665/** Setup the input buffer state to scan directly from a user-specified character buffer.
3666 * @param base the character buffer
3667 * @param size the size in bytes of the character buffer
3668 *
3669 * @return the newly allocated buffer state object.
3670 */
3671YY_BUFFER_STATE convert__scan_buffer  (char * base, yy_size_t  size )
3672{
3673   YY_BUFFER_STATE b;
3674   
3675   if ( size < 2 ||
3676        base[size-2] != YY_END_OF_BUFFER_CHAR ||
3677        base[size-1] != YY_END_OF_BUFFER_CHAR )
3678      /* They forgot to leave room for the EOB's. */
3679      return 0;
3680
3681   b = (YY_BUFFER_STATE) convert_alloc(sizeof( struct yy_buffer_state )  );
3682   if ( ! b )
3683      YY_FATAL_ERROR( "out of dynamic memory in convert__scan_buffer()" );
3684
3685   b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
3686   b->yy_buf_pos = b->yy_ch_buf = base;
3687   b->yy_is_our_buffer = 0;
3688   b->yy_input_file = 0;
3689   b->yy_n_chars = b->yy_buf_size;
3690   b->yy_is_interactive = 0;
3691   b->yy_at_bol = 1;
3692   b->yy_fill_buffer = 0;
3693   b->yy_buffer_status = YY_BUFFER_NEW;
3694
3695   convert__switch_to_buffer();
3696
3697   return b;
3698}
3699
3700/** Setup the input buffer state to scan a string. The next call to convert_lex() will
3701 * scan from a @e copy of @a str.
3702 * @param yystr a NUL-terminated string to scan
3703 *
3704 * @return the newly allocated buffer state object.
3705 * @note If you want to scan bytes that may contain NUL values, then use
3706 *       convert__scan_bytes() instead.
3707 */
3708YY_BUFFER_STATE convert__scan_string (yyconst char * yystr )
3709{
3710   
3711   return convert__scan_bytes(yystr,strlen(yystr) );
3712}
3713
3714/** Setup the input buffer state to scan the given bytes. The next call to convert_lex() will
3715 * scan from a @e copy of @a bytes.
3716 * @param bytes the byte buffer to scan
3717 * @param len the number of bytes in the buffer pointed to by @a bytes.
3718 *
3719 * @return the newly allocated buffer state object.
3720 */
3721YY_BUFFER_STATE convert__scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
3722{
3723   YY_BUFFER_STATE b;
3724   char *buf;
3725   yy_size_t n, i;
3726   
3727   /* Get memory for full buffer, including space for trailing EOB's. */
3728   n = _yybytes_len + 2;
3729   buf = (char *) convert_alloc();
3730   if ( ! buf )
3731      YY_FATAL_ERROR( "out of dynamic memory in convert__scan_bytes()" );
3732
3733   for ( i = 0; i < _yybytes_len; ++i )
3734      buf[i] = yybytes[i];
3735
3736   buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
3737
3738   b = convert__scan_buffer(buf,n );
3739   if ( ! b )
3740      YY_FATAL_ERROR( "bad buffer in convert__scan_bytes()" );
3741
3742   /* It's okay to grow etc. this buffer, and we should throw it
3743    * away when we're done.
3744    */
3745   b->yy_is_our_buffer = 1;
3746
3747   return b;
3748}
3749
3750#ifndef YY_EXIT_FAILURE
3751#define YY_EXIT_FAILURE 2
3752#endif
3753
3754static void yy_fatal_error (yyconst char* msg )
3755{
3756      (void) fprintf( stderr, "%s\n", msg );
3757   exit( YY_EXIT_FAILURE );
3758}
3759
3760/* Redefine yyless() so it works in section 3 code. */
3761
3762#undef yyless
3763#define yyless(n) \
3764   do \
3765      { \
3766      /* Undo effects of setting up convert_text. */ \
3767        int yyless_macro_arg = (n); \
3768        YY_LESS_LINENO(yyless_macro_arg);\
3769      convert_text[convert_leng] = (yy_hold_char); \
3770      (yy_c_buf_p) = convert_text + yyless_macro_arg; \
3771      (yy_hold_char) = *(yy_c_buf_p); \
3772      *(yy_c_buf_p) = '\0'; \
3773      convert_leng = yyless_macro_arg; \
3774      } \
3775   while ( 0 )
3776
3777/* Accessor  methods (get/set functions) to struct members. */
3778
3779/** Get the current line number.
3780 *
3781 */
3782int convert_get_lineno  (void)
3783{
3784       
3785    return convert_lineno;
3786}
3787
3788/** Get the input stream.
3789 *
3790 */
3791FILE *convert_get_in  (void)
3792{
3793        return convert_in;
3794}
3795
3796/** Get the output stream.
3797 *
3798 */
3799FILE *convert_get_out  (void)
3800{
3801        return convert_out;
3802}
3803
3804/** Get the length of the current token.
3805 *
3806 */
3807yy_size_t convert_get_leng  (void)
3808{
3809        return convert_leng;
3810}
3811
3812/** Get the current token.
3813 *
3814 */
3815
3816char *convert_get_text  (void)
3817{
3818        return convert_text;
3819}
3820
3821/** Set the current line number.
3822 * @param line_number
3823 *
3824 */
3825void convert_set_lineno (int  line_number )
3826{
3827   
3828    convert_lineno = line_number;
3829}
3830
3831/** Set the input stream. This does not discard the current
3832 * input buffer.
3833 * @param in_str A readable stream.
3834 *
3835 * @see convert__switch_to_buffer
3836 */
3837void convert_set_in (FILE *  in_str )
3838{
3839        convert_in = in_str ;
3840}
3841
3842void convert_set_out (FILE *  out_str )
3843{
3844        convert_out = out_str ;
3845}
3846
3847int convert_get_debug  (void)
3848{
3849        return convert__flex_debug;
3850}
3851
3852void convert_set_debug (int  bdebug )
3853{
3854        convert__flex_debug = bdebug ;
3855}
3856
3857static int yy_init_globals (void)
3858{
3859        /* Initialization is the same as for the non-reentrant scanner.
3860     * This function is called from convert_lex_destroy(), so don't allocate here.
3861     */
3862
3863    (yy_buffer_stack) = 0;
3864    (yy_buffer_stack_top) = 0;
3865    (yy_buffer_stack_max) = 0;
3866    (yy_c_buf_p) = (char *) 0;
3867    (yy_init) = 0;
3868    (yy_start) = 0;
3869
3870/* Defined in main.c */
3871#ifdef YY_STDINIT
3872    convert_in = stdin;
3873    convert_out = stdout;
3874#else
3875    convert_in = (FILE *) 0;
3876    convert_out = (FILE *) 0;
3877#endif
3878
3879    /* For future reference: Set errno on error, since we are called by
3880     * convert_lex_init()
3881     */
3882    return 0;
3883}
3884
3885/* convert_lex_destroy is for both reentrant and non-reentrant scanners. */
3886int convert_lex_destroy  (void)
3887{
3888   
3889    /* Pop the buffer stack, destroying each element. */
3890   while(YY_CURRENT_BUFFER){
3891      convert__delete_buffer(YY_CURRENT_BUFFER  );
3892      YY_CURRENT_BUFFER_LVALUE = NULL;
3893      convert_pop_buffer_state();
3894   }
3895
3896   /* Destroy the stack itself. */
3897   convert_free((yy_buffer_stack) );
3898   (yy_buffer_stack) = NULL;
3899
3900    /* Reset the globals. This is important in a non-reentrant scanner so the next time
3901     * convert_lex() is called, initialization will occur. */
3902    yy_init_globals( );
3903
3904    return 0;
3905}
3906
3907/*
3908 * Internal utility routines.
3909 */
3910
3911#ifndef yytext_ptr
3912static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
3913{
3914   register int i;
3915   for ( i = 0; i < n; ++i )
3916      s1[i] = s2[i];
3917}
3918#endif
3919
3920#ifdef YY_NEED_STRLEN
3921static int yy_flex_strlen (yyconst char * s )
3922{
3923   register int n;
3924   for ( n = 0; s[n]; ++n )
3925      ;
3926
3927   return n;
3928}
3929#endif
3930
3931void *convert_alloc (yy_size_t  size )
3932{
3933   return (void *) malloc( size );
3934}
3935
3936void *convert_realloc  (void * ptr, yy_size_t  size )
3937{
3938   /* The cast to (char *) in the following accommodates both
3939    * implementations that use char* generic pointers, and those
3940    * that use void* generic pointers.  It works with the latter
3941    * because both ANSI C and C++ allow castless assignment from
3942    * any pointer type to void*, and deal with argument conversions
3943    * as though doing an assignment.
3944    */
3945   return (void *) realloc( (char *) ptr, size );
3946}
3947
3948void convert_free (void * ptr )
3949{
3950   free( (char *) ptr );   /* see convert_realloc() for (char *) cast */
3951}
3952
3953#define YYTABLES_NAME "yytables"
3954
3955#line 69 "convert.lex"
3956
3957
3958
Note: See TracBrowser for help on using the repository browser.