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/dev/LIB – NEMO

source: vendors/AGRIF/dev/LIB/main.c

Last change on this file was 14975, checked in by jchanut, 3 years ago

#2638, merge new AGRIF library into trunk

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