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

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

Ignore:
Timestamp:
2014-09-19T16:21:37+02:00 (10 years ago)
Author:
rblod
Message:

Update AGRIF internal routines and conv on branch dev_r4765_CNRS_agrif

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4765_CNRS_agrif/NEMOGCM/EXTERNAL/AGRIF/LIB/main.c

    r4147 r4779  
    5656#define YYPUSH 0 
    5757 
    58 /* Pull parsers.  */ 
    59 #define YYPULL 1 
    60  
    61  
     58/* Substitute the variable and function names.  */ 
     59#define yyparse convert_parse 
     60#define yylex   convert_lex 
     61#define yyerror convert_error 
     62#define yylval  convert_lval 
     63#define yychar  convert_char 
     64#define yydebug convert_debug 
     65#define yynerrs convert_nerrs 
     66 
     67 
     68/* Tokens.  */ 
     69#ifndef YYTOKENTYPE 
     70# define YYTOKENTYPE 
     71   /* Put the tokens into the symbol table, so that GDB and other debuggers 
     72      know about them.  */ 
     73   enum yytokentype { 
     74     TOK_SEP = 258, 
     75     TOK_KIND = 259, 
     76     TOK_EQUAL = 260, 
     77     TOK_USE = 261, 
     78     TOK_MODULEMAIN = 262, 
     79     TOK_NOTGRIDDEP = 263, 
     80     TOK_USEITEM = 264, 
     81     TOK_NAME = 265, 
     82     TOK_CSTINT = 266, 
     83     TOK_PROBTYPE = 267 
     84   }; 
     85#endif 
     86/* Tokens.  */ 
     87#define TOK_SEP 258 
     88#define TOK_KIND 259 
     89#define TOK_EQUAL 260 
     90#define TOK_USE 261 
     91#define TOK_MODULEMAIN 262 
     92#define TOK_NOTGRIDDEP 263 
     93#define TOK_USEITEM 264 
     94#define TOK_NAME 265 
     95#define TOK_CSTINT 266 
     96#define TOK_PROBTYPE 267 
    6297 
    6398 
     
    71106#include "decl.h" 
    72107 
    73 /* Line 371 of yacc.c  */ 
    74 #line 75 "convert.tab.c" 
    75  
    76 # ifndef YY_NULL 
    77 #  if defined __cplusplus && 201103L <= __cplusplus 
    78 #   define YY_NULL nullptr 
    79 #  else 
    80 #   define YY_NULL 0 
    81 #  endif 
    82 # endif 
     108int line_num=1; 
     109extern FILE * convert_in; 
     110 
     111int convert_error(const char *s) 
     112{ 
     113    printf("##\n## ERROR in conv: '%s' (line %d, file: %s)\n##\n", s, line_num, config_file); 
     114    exit(0); 
     115} 
     116 
     117 
     118 
     119/* Enabling traces.  */ 
     120#ifndef YYDEBUG 
     121# define YYDEBUG 1 
     122#endif 
    83123 
    84124/* Enabling verbose error messages.  */ 
     
    118158#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 
    119159typedef union YYSTYPE 
    120 { 
    121 /* Line 387 of yacc.c  */ 
    122 #line 42 "convert.y" 
    123  
    124        int ival; 
    125        char na[LONG_C]; 
    126        listnom * ln; 
    127         
    128  
    129 /* Line 387 of yacc.c  */ 
    130 #line 131 "convert.tab.c" 
    131 } YYSTYPE; 
    132 # define YYSTYPE_IS_TRIVIAL 1 
     160#line 52 "convert.y" 
     161 
     162    char na[LONG_M]; 
     163} 
     164/* Line 193 of yacc.c.  */ 
     165#line 149 "convert.tab.c" 
     166   YYSTYPE; 
    133167# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 
    134168# define YYSTYPE_IS_DECLARED 1 
     
    157191/* Line 390 of yacc.c  */ 
    158192#line 159 "convert.tab.c" 
     193 
     194/* Line 216 of yacc.c.  */ 
     195#line 162 "convert.tab.c" 
    159196 
    160197#ifdef short 
     
    385422#define YYFINAL  2 
    386423/* YYLAST -- Last index in YYTABLE.  */ 
    387 #define YYLAST   23 
     424#define YYLAST   29 
    388425 
    389426/* YYNTOKENS -- Number of terminals.  */ 
    390 #define YYNTOKENS  18 
     427#define YYNTOKENS  16 
    391428/* YYNNTS -- Number of nonterminals.  */ 
    392429#define YYNNTS  3 
    393430/* YYNRULES -- Number of rules.  */ 
    394 #define YYNRULES  10 
     431#define YYNRULES  11 
    395432/* YYNRULES -- Number of states.  */ 
    396 #define YYNSTATES  24 
     433#define YYNSTATES  29 
    397434 
    398435/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */ 
    399436#define YYUNDEFTOK  2 
    400 #define YYMAXUTOK   264 
     437#define YYMAXUTOK   267 
    401438 
    402439#define YYTRANSLATE(YYX)                  \ 
     
    407444{ 
    408445       0,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
    409       17,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
     446      15,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
    410447       2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
    411448       2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
    412       13,    14,     2,     2,    10,     2,     2,     2,     2,     2, 
    413        2,     2,     2,     2,     2,     2,     2,     2,    12,    11, 
     449       2,     2,     2,     2,    13,     2,     2,     2,     2,     2, 
     450       2,     2,     2,     2,     2,     2,     2,     2,     2,    14, 
    414451       2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
    415452       2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
    416453       2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
    417        2,    15,     2,    16,     2,     2,     2,     2,     2,     2, 
     454       2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
    418455       2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
    419456       2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
     
    432469       2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
    433470       2,     2,     2,     2,     2,     2,     1,     2,     3,     4, 
    434        5,     6,     7,     8,     9 
     471       5,     6,     7,     8,     9,    10,    11,    12 
    435472}; 
    436473 
     
    441478{ 
    442479       0,     0,     3,     4,     7,     9,    13,    19,    27,    31, 
    443       36 
     480      37,    42 
    444481}; 
    445482 
     
    447484static const yytype_int8 yyrhs[] = 
    448485{ 
    449       19,     0,    -1,    -1,    19,    20,    -1,    17,    -1,     9, 
    450        8,    11,    -1,     9,     8,    10,     8,    11,    -1,     9, 
    451        8,    10,     8,    10,     8,    11,    -1,     5,     8,    11, 
    452       -1,     6,     3,     8,    11,    -1,     4,     7,    11,    -1 
     486      17,     0,    -1,    -1,    17,    18,    -1,    15,    -1,    12, 
     487      10,    14,    -1,    12,    10,    13,    10,    14,    -1,    12, 
     488      10,    13,    10,    13,    10,    14,    -1,     7,    10,    14, 
     489      -1,     4,    10,     5,    11,    14,    -1,     8,     3,    10, 
     490      14,    -1,     6,     9,    14,    -1 
    453491}; 
    454492 
     
    456494static const yytype_uint8 yyrline[] = 
    457495{ 
    458        0,    63,    63,    64,    66,    67,    68,    69,    71,    74, 
    459       75 
     496       0,    71,    71,    72,    75,    76,    77,    78,    79,    84, 
     497     100,   104 
    460498}; 
    461499#endif 
     
    466504static const char *const yytname[] = 
    467505{ 
    468   "$end", "error", "$undefined", "TOK_SEP", "TOK_USE", "TOK_MODULEMAIN", 
    469   "TOK_NOTGRIDDEP", "TOK_USEITEM", "TOK_NAME", "TOK_PROBTYPE", "','", 
    470   "';'", "':'", "'('", "')'", "'['", "']'", "'\\n'", "$accept", "input", 
     506  "$end", "error", "$undefined", "TOK_SEP", "TOK_KIND", "TOK_EQUAL", 
     507  "TOK_USE", "TOK_MODULEMAIN", "TOK_NOTGRIDDEP", "TOK_USEITEM", "TOK_NAME", 
     508  "TOK_CSTINT", "TOK_PROBTYPE", "','", "';'", "'\\n'", "$accept", "input", 
    471509  "line", YY_NULL 
    472510}; 
     
    479517{ 
    480518       0,   256,   257,   258,   259,   260,   261,   262,   263,   264, 
    481       44,    59,    58,    40,    41,    91,    93,    10 
     519     265,   266,   267,    44,    59,    10 
    482520}; 
    483521# endif 
     
    486524static const yytype_uint8 yyr1[] = 
    487525{ 
    488        0,    18,    19,    19,    20,    20,    20,    20,    20,    20, 
    489       20 
     526       0,    16,    17,    17,    18,    18,    18,    18,    18,    18, 
     527      18,    18 
    490528}; 
    491529 
     
    493531static const yytype_uint8 yyr2[] = 
    494532{ 
    495        0,     2,     0,     2,     1,     3,     5,     7,     3,     4, 
    496        3 
     533       0,     2,     0,     2,     1,     3,     5,     7,     3,     5, 
     534       4,     3 
    497535}; 
    498536 
     
    502540static const yytype_uint8 yydefact[] = 
    503541{ 
    504        2,     0,     1,     0,     0,     0,     0,     4,     3,     0, 
    505        0,     0,     0,    10,     8,     0,     0,     5,     9,     0, 
    506        0,     6,     0,     7 
     542       2,     0,     1,     0,     0,     0,     0,     0,     4,     3, 
     543       0,     0,     0,     0,     0,     0,    11,     8,     0,     0, 
     544       5,     0,    10,     0,     9,     0,     6,     0,     7 
    507545}; 
    508546 
     
    510548static const yytype_int8 yydefgoto[] = 
    511549{ 
    512       -1,     1,     8 
     550      -1,     1,     9 
    513551}; 
    514552 
    515553/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 
    516554   STATE-NUM.  */ 
    517 #define YYPACT_NINF -10 
     555#define YYPACT_NINF -13 
    518556static const yytype_int8 yypact[] = 
    519557{ 
    520      -10,     0,   -10,    -4,     2,     8,     4,   -10,   -10,     3, 
    521        5,     7,    -9,   -10,   -10,     9,    10,   -10,   -10,    -3, 
    522       11,   -10,    12,   -10 
     558     -13,     0,   -13,    -7,     2,    -5,    10,     4,   -13,   -13, 
     559      11,     3,     5,     8,   -12,     9,   -13,   -13,     7,    12, 
     560     -13,    13,   -13,    -4,   -13,    14,   -13,    15,   -13 
    523561}; 
    524562 
     
    526564static const yytype_int8 yypgoto[] = 
    527565{ 
    528      -10,   -10,   -10 
     566     -13,   -13,   -13 
    529567}; 
    530568 
     
    535573static const yytype_uint8 yytable[] = 
    536574{ 
    537        2,    16,    17,     9,     3,     4,     5,    20,    21,     6, 
    538       10,    11,    12,     0,    13,    15,    14,     7,    19,    22, 
    539       18,     0,     0,    23 
     575       2,    19,    20,    10,     3,    12,     4,     5,     6,    25, 
     576      26,    11,     7,    13,    14,     8,    15,    16,    18,    17, 
     577      21,    22,    23,     0,    27,     0,     0,    24,     0,    28 
    540578}; 
    541579 
     
    548586static const yytype_int8 yycheck[] = 
    549587{ 
    550        0,    10,    11,     7,     4,     5,     6,    10,    11,     9, 
    551        8,     3,     8,    -1,    11,     8,    11,    17,     8,     8, 
    552       11,    -1,    -1,    11 
     588       0,    13,    14,    10,     4,    10,     6,     7,     8,    13, 
     589      14,     9,    12,     3,    10,    15,     5,    14,    10,    14, 
     590      11,    14,    10,    -1,    10,    -1,    -1,    14,    -1,    14 
    553591}; 
    554592 
     
    557595static const yytype_uint8 yystos[] = 
    558596{ 
    559        0,    19,     0,     4,     5,     6,     9,    17,    20,     7, 
    560        8,     3,     8,    11,    11,     8,    10,    11,    11,     8, 
    561       10,    11,     8,    11 
     597       0,    17,     0,     4,     6,     7,     8,    12,    15,    18, 
     598      10,     9,    10,     3,    10,     5,    14,    14,    10,    13, 
     599      14,    11,    14,    10,    14,    13,    14,    10,    14 
    562600}; 
    563601 
     
    13511389    { 
    13521390        case 5: 
    1353 /* Line 1787 of yacc.c  */ 
    1354 #line 67 "convert.y" 
    1355     {initdimprob(1,(yyvsp[(2) - (3)].na),"0","0");} 
     1391#line 76 "convert.y" 
     1392    { initdimprob(1,(yyvsp[(2) - (3)].na),"0","0"); ;} 
    13561393    break; 
    13571394 
    13581395  case 6: 
    1359 /* Line 1787 of yacc.c  */ 
    1360 #line 68 "convert.y" 
    1361     {initdimprob(2,(yyvsp[(2) - (5)].na), (yyvsp[(4) - (5)].na),"0");} 
     1396#line 77 "convert.y" 
     1397    { initdimprob(2,(yyvsp[(2) - (5)].na), (yyvsp[(4) - (5)].na),"0"); ;} 
    13621398    break; 
    13631399 
    13641400  case 7: 
    1365 /* Line 1787 of yacc.c  */ 
    1366 #line 70 "convert.y" 
    1367     {initdimprob(3,(yyvsp[(2) - (7)].na), (yyvsp[(4) - (7)].na), (yyvsp[(6) - (7)].na));} 
     1401#line 78 "convert.y" 
     1402    { initdimprob(3,(yyvsp[(2) - (7)].na), (yyvsp[(4) - (7)].na), (yyvsp[(6) - (7)].na)); ;} 
    13681403    break; 
    13691404 
    13701405  case 8: 
    1371 /* Line 1787 of yacc.c  */ 
    1372 #line 72 "convert.y" 
    1373     {listofmodules = Addtolistnom((yyvsp[(2) - (3)].na),listofmodules,0); 
    1374                                                         Addmoduletothelist((yyvsp[(2) - (3)].na));} 
     1406#line 80 "convert.y" 
     1407    { 
     1408            listofmodules = Addtolistnom((yyvsp[(2) - (3)].na),listofmodules,0); 
     1409            Addmoduletothelist((yyvsp[(2) - (3)].na)); 
     1410        ;} 
    13751411    break; 
    13761412 
    13771413  case 9: 
    1378 /* Line 1787 of yacc.c  */ 
    1379 #line 74 "convert.y" 
    1380     {Add_NotGridDepend_Var_1((yyvsp[(3) - (4)].na));} 
     1414#line 85 "convert.y" 
     1415    { 
     1416            if (!strcasecmp((yyvsp[(4) - (5)].na),"4")) 
     1417            { 
     1418                listofkind = Addtolistnom((yyvsp[(2) - (5)].na),listofkind,4); 
     1419            } 
     1420            else if (!strcasecmp((yyvsp[(4) - (5)].na),"8")) 
     1421            { 
     1422                listofkind = Addtolistnom((yyvsp[(2) - (5)].na),listofkind,8); 
     1423            } 
     1424            else 
     1425            { 
     1426                printf("##\n## Unknown kind type : %s (must be 4 or 8)\n##",(yyvsp[(4) - (5)].na)); 
     1427                exit(0); 
     1428            } 
     1429        ;} 
    13811430    break; 
    13821431 
    13831432  case 10: 
    1384 /* Line 1787 of yacc.c  */ 
    1385 #line 75 "convert.y" 
     1433#line 101 "convert.y" 
    13861434    { 
    1387                                     if (!strcasecmp((yyvsp[(2) - (3)].na),"FIXED_GRIDS")) 
    1388                                                                  fixedgrids=1; 
    1389                                     if (!strcasecmp((yyvsp[(2) - (3)].na),"ONLY_FIXED_GRIDS")) 
    1390                                                              onlyfixedgrids=1; 
    1391                                  } 
     1435            Add_NotGridDepend_Var_1((yyvsp[(3) - (4)].na)); 
     1436        ;} 
    13921437    break; 
    13931438 
    1394  
    1395 /* Line 1787 of yacc.c  */ 
    1396 #line 1397 "convert.tab.c" 
     1439  case 11: 
     1440#line 105 "convert.y" 
     1441    { 
     1442            if (!strcasecmp((yyvsp[(2) - (3)].na),"FIXED_GRIDS"))      fixedgrids = 1; 
     1443            if (!strcasecmp((yyvsp[(2) - (3)].na),"ONLY_FIXED_GRIDS")) onlyfixedgrids = 1; 
     1444        ;} 
     1445    break; 
     1446 
     1447 
     1448/* Line 1267 of yacc.c.  */ 
     1449#line 1420 "convert.tab.c" 
    13971450      default: break; 
    13981451    } 
     
    16251678 
    16261679 
    1627 /* Line 2050 of yacc.c  */ 
    1628 #line 82 "convert.y" 
    1629  
     1680#line 110 "convert.y" 
     1681 
     1682 
     1683void print_usage() 
     1684{ 
     1685    printf("usage : conv <config_file> -convfile  <FILENAME>\n"); 
     1686    printf(" [-workdir <directory>] [-incdir <directory>]\n"); 
     1687    printf(" [-comdirin   <directory>] [-comdirout <directory>]\n"); 
     1688    printf(" [-convfile  <FILENAME>] [-SubloopScalar] [-SubloopScalar1] \n"); 
     1689    printf(" [-free|-fixed]\n"); 
     1690    exit(0); 
     1691} 
    16301692 
    16311693int main(int argc,char *argv[]) 
    16321694{ 
    1633    extern FILE * yyin ; 
    1634    FILE *dependglobaloutput; 
    1635    int i; 
    1636    listnom *parcours; 
    1637    listvar *newvar; 
    1638    int stylegiven = 0; 
    1639    int infreegiven ; 
    1640    int infixedgiven ; 
    1641    int lengthmainfile; 
    1642  
    1643    if (argc < 2) 
    1644    { 
    1645        printf("usage : conv <file> [-rm] [-incdir <directory>] \n"); 
    1646        printf(" [-comdirin   <directory>] [-comdirout <directory>]\n"); 
    1647        printf(" [-convfile  <FILENAME >] -SubloopScalar -SubloopScalar1 \n"); 
    1648        printf(" [-free|-fixed]\n"); 
    1649        exit(0); 
    1650    } 
     1695    extern FILE * convert_in ; 
     1696    FILE *dependglobaloutput; 
     1697    int i; 
     1698    listnom *parcours; 
     1699    listvar *newvar; 
     1700    int stylegiven = 0; 
     1701    int infreegiven ; 
     1702    int infixedgiven ; 
     1703    int lengthmainfile; 
     1704 
     1705    char filetoparse[LONG_FNAME]; 
     1706 
    16511707/******************************************************************************/ 
    16521708/*  1-  Variables initialization                                              */ 
    16531709/******************************************************************************/ 
    1654    List_Global_Var=(listvar *)NULL; 
    1655    List_GlobalParameter_Var=(listvar *)NULL; 
    1656    List_Allocate_Var=(listallocate *)NULL; 
    1657    List_Common_Var=(listvar *)NULL; 
    1658    List_SubroutineWhereAgrifUsed=(listnom *)NULL; 
    1659    List_Subroutine_For_Alloc=(listnom *)NULL; 
    1660    List_Include=(listusemodule *)NULL; 
    1661    List_NameOfModuleUsed=(listusemodule *)NULL; 
    1662    listofmoduletmp=(listusemodule *)NULL; 
    1663    List_SubroutineDeclaration_Var=(listvar *)NULL; 
    1664    List_UsedInSubroutine_Var=(listvar *)NULL; 
    1665    List_NotGridDepend_Var=(listvar *)NULL; 
    1666    Listofavailableindices=(listindice *)NULL; 
    1667    List_CouplePointed_Var=(listvarpointtovar *)NULL; 
    1668    List_ModuleUsed_Var = (listvar *)NULL; 
    1669    List_ModuleUsedInModuleUsed_Var = (listvar *)NULL; 
    1670    List_GlobParamModuleUsed_Var = (listparameter *)NULL; 
    1671    List_GlobParamModuleUsedInModuleUsed_Var = (listparameter *)NULL; 
    1672    List_SubroutineArgument_Var = (listvar *)NULL; 
    1673    List_FunctionType_Var = (listvar *)NULL; 
    1674    tmpuselocallist = (listusemodule *)NULL; 
    1675    List_ContainsSubroutine = (listnom *)NULL; 
    1676    oldfortranout = (FILE *)NULL; 
    1677  
    1678    strcpy(mainfile,argv[1]); 
    1679    strcpy(nomdir,"AGRIF_INC"); 
    1680    strcpy(commondirin,"."); 
    1681    strcpy(commondirout,"."); 
    1682    strcpy(filetoparse," "); 
    1683    strcpy(subofagrifinitgrids,""); 
    1684    strcpy(meetagrifinitgrids,""); 
    1685    strcpy(mpiinitvar,""); 
    1686  
    1687    length_last = 0 ; 
    1688    length_first = 0 ; 
    1689    length_v_typevar = 0 ; 
    1690    length_v_nomvar = 0 ; 
    1691    length_v_dimchar = 0 ; 
    1692    length_v_modulename = 0 ; 
    1693    length_v_commonname = 0 ; 
    1694    length_v_vallengspec = 0 ; 
    1695    length_v_nameinttypename = 0 ; 
    1696    length_v_commoninfile = 0 ; 
    1697    length_v_subroutinename = 0 ; 
    1698    length_v_precision = 0 ; 
    1699    length_v_IntentSpec = 0 ; 
    1700    length_v_initialvalue = 0 ; 
    1701    length_v_readedlistdimension = 0 ; 
    1702    length_u_usemodule = 0 ; 
    1703    length_u_charusemodule = 0 ; 
    1704    length_u_cursubroutine = 0 ; 
    1705    length_u_modulename = 0 ; 
    1706    length_n_name = 0 ; 
    1707    length_c_namevar = 0 ; 
    1708    length_c_namepointedvar = 0 ; 
    1709    length_o_nom = 0 ; 
    1710    length_o_module = 0 ; 
    1711    length_a_nomvar = 0 ; 
    1712    length_a_subroutine = 0 ; 
    1713    length_a_module = 0 ; 
    1714    length_t_usemodule = 0 ; 
    1715    length_t_cursubroutine = 0 ; 
    1716    length_curfilename = 0 ; 
    1717    length_nomfileoutput = 0 ; 
    1718    length_motparse = 0 ; 
    1719    length_mainfile = 0 ; 
    1720    length_nomdir = 0 ; 
    1721    length_commondirout = 0 ; 
    1722    length_commondirin = 0 ; 
    1723    length_filetoparse = 0 ; 
    1724    length_curbuf = 0 ; 
    1725    length_toprintglob = 0 ; 
    1726    length_tmpvargridname = 0 ; 
    1727    length_ligne_Subloop = 0 ; 
    1728    length_lvargridname_toamr = 0 ; 
    1729    length_toprint_utilagrif = 0 ; 
    1730    length_toprinttmp_utilchar = 0 ; 
    1731    length_ligne_writedecl = 0 ; 
    1732    length_newname_toamr = 0 ; 
    1733    length_newname_writedecl = 0 ; 
    1734    length_ligne_toamr = 0 ; 
    1735    length_tmpligne_writedecl = 0 ; 
    1736    value_char_size = 0 ; 
    1737    value_char_size1 = 0 ; 
    1738    value_char_size2 = 0 ; 
    1739    value_char_size3 = 0 ; 
    1740    inallocate = 0; 
    1741    infixed = 1; 
    1742    infree  = 0; 
    1743  
    1744    checkexistcommon=1; 
    1745    todebug=0; 
    1746    onlyfixedgrids=0; 
    1747    fixedgrids=0; 
    1748    InAgrifParentDef = 0; 
    1749    IndicenbmaillesX=0; 
    1750    IndicenbmaillesY=0; 
    1751    IndicenbmaillesZ=0; 
    1752    created_dimensionlist = 1; 
    1753    indicemaxtabvars = 0;   /* current indice in the table tabvars             */ 
    1754    SubloopScalar = 0; 
    1755    todebug = 0; 
    1756    todebugfree = 0; 
    1757    retour77 = 1 ; 
    1758    mark = 0 ; 
    1759    shouldincludempif = 0 ; 
    1760    Read_val_max(); 
     1710    List_Global_Var = (listvar *) NULL; 
     1711    List_GlobalParameter_Var = (listvar *) NULL; 
     1712    List_Common_Var = (listvar *) NULL; 
     1713    List_Allocate_Var = (listallocate *) NULL; 
     1714    List_SubroutineWhereAgrifUsed = (listnom *) NULL; 
     1715    List_Subroutine_For_Alloc = (listnom *) NULL; 
     1716    List_Include = (listusemodule *) NULL; 
     1717    List_NameOfModuleUsed = (listusemodule *) NULL; 
     1718    listofmoduletmp = (listusemodule *) NULL; 
     1719    List_SubroutineDeclaration_Var = (listvar *) NULL; 
     1720    List_UsedInSubroutine_Var = (listvar *) NULL; 
     1721    List_NotGridDepend_Var = (listvar *) NULL; 
     1722    Listofavailableindices = (listindice *) NULL; 
     1723    Listofavailableindices_glob = (listindice **) calloc(NB_CAT_VARIABLES,sizeof(listindice *)); 
     1724    List_CouplePointed_Var = (listvarpointtovar *) NULL; 
     1725    List_ModuleUsed_Var = (listvar *) NULL; 
     1726    List_ModuleUsedInModuleUsed_Var = (listvar *) NULL; 
     1727    List_GlobParamModuleUsed_Var = (listparameter *) NULL; 
     1728    List_GlobParamModuleUsedInModuleUsed_Var = (listparameter *) NULL; 
     1729    List_SubroutineArgument_Var = (listvar *) NULL; 
     1730    List_FunctionType_Var = (listvar *) NULL; 
     1731    tmpuselocallist = (listusemodule *) NULL; 
     1732    List_ContainsSubroutine = (listnom *) NULL; 
     1733    oldfortran_out = (FILE *) NULL; 
     1734 
     1735    if (argc < 2) print_usage(); 
     1736     
     1737    strcpy(config_file, argv[1]); 
     1738    strcpy(work_dir, "."); 
     1739    strcpy(input_dir, "."); 
     1740    strcpy(output_dir, "AGRIF_MODELFILES"); 
     1741    strcpy(include_dir, "AGRIF_INC"); 
     1742    strcpy(filetoparse, ""); 
     1743    strcpy(subofagrifinitgrids, ""); 
     1744    strcpy(meetagrifinitgrids, ""); 
     1745    strcpy(mpiinitvar, ""); 
     1746 
     1747    length_last = 0 ; 
     1748    length_first = 0 ; 
     1749    length_v_vallengspec = 0 ; 
     1750    length_v_commoninfile = 0 ; 
     1751    length_v_precision = 0 ; 
     1752    length_v_IntentSpec = 0 ; 
     1753    length_v_initialvalue = 0 ; 
     1754    length_v_readedlistdimension = 0 ; 
     1755    length_a_nomvar = 0 ; 
     1756    length_toprintglob = 0 ; 
     1757    length_tmpvargridname = 0 ; 
     1758    length_ligne_Subloop = 0 ; 
     1759    length_toprint_utilagrif = 0 ; 
     1760    length_toprinttmp_utilchar = 0 ; 
     1761    length_ligne_writedecl = 0 ; 
     1762    length_newname_toamr = 0 ; 
     1763    length_newname_writedecl = 0 ; 
     1764    length_ligne_toamr = 0 ; 
     1765    length_tmpligne_writedecl = 0 ; 
     1766    value_char_size = 0 ; 
     1767    value_char_size1 = 0 ; 
     1768    value_char_size2 = 0 ; 
     1769    value_char_size3 = 0 ; 
     1770    inallocate = 0; 
     1771    infixed = 1; 
     1772    infree  = 0; 
     1773 
     1774    onlyfixedgrids=0; 
     1775    fixedgrids=0; 
     1776    InAgrifParentDef = 0; 
     1777    IndicenbmaillesX=0; 
     1778    IndicenbmaillesY=0; 
     1779    IndicenbmaillesZ=0; 
     1780    created_dimensionlist = 1; 
     1781    /* current indice in the table tabvars             */ 
     1782    for ( i=0 ; i<NB_CAT_VARIABLES ; i++) 
     1783    { 
     1784        indicemaxtabvars[i] = 0; 
     1785    } 
     1786    SubloopScalar = 0; 
     1787    todebug = 0; 
     1788    retour77 = 1 ; 
     1789    shouldincludempif = 0 ; 
     1790 
     1791    Read_val_max(); 
     1792 
    17611793/******************************************************************************/ 
    17621794/*  2-  Program arguments                                                     */ 
    17631795/******************************************************************************/ 
    17641796 
    1765    if ((yyin=fopen(argv[1],"r"))==NULL) 
    1766    { 
    1767       printf("the file %s doesn't exist \n",argv[1]); 
    1768       exit(0); 
    1769    } 
    1770  
    1771    i=2; 
    1772    while (i<argc) 
    1773    { 
    1774       if (!strcasecmp(argv[i],"-incdir")) 
    1775       { 
    1776          strcpy(nomdir,argv[i+1]); 
    1777          i++; 
    1778       } 
    1779       else if (!strcasecmp(argv[i],"-comdirin")) /* input directory           */ 
    1780       { 
    1781          strcpy(commondirin,argv[i+1]); 
    1782          i++; 
    1783       } 
    1784       else if (!strcasecmp(argv[i],"-comdirout")) /* output directory         */ 
    1785       { 
    1786          strcpy(commondirout,argv[i+1]); 
    1787          i++; 
    1788       } 
    1789       else if (!strcasecmp(argv[i],"-convfile")) /* file to parse             */ 
    1790       { 
    1791          strcpy(filetoparse,argv[i+1]); 
    1792          i++; 
    1793          lengthmainfile = strlen(filetoparse); 
    1794          if (!strcasecmp(&filetoparse[lengthmainfile-4],".f90")) 
    1795          { 
    1796          infixed = 0; 
    1797          infree = 1; 
    1798          } 
    1799          else 
    1800          { 
    1801          infixed = 1; 
    1802          infree = 0; 
    1803          } 
    1804       } 
    1805       else if (!strcasecmp(argv[i],"-free")) /* file to parse        */ 
    1806       { 
    1807          stylegiven = 1; 
    1808          infreegiven  = 1 ; 
    1809          infixedgiven = 0; 
    1810       }    
    1811       else if (!strcasecmp(argv[i],"-fixed")) /* file to parse        */ 
    1812       { 
    1813          stylegiven = 1; 
    1814          infreegiven  = 0; 
    1815          infixedgiven = 1; 
    1816       }          
    1817       else if (!strcasecmp(argv[i],"-SubloopScalar")) /* file to parse        */ 
    1818       { 
    1819          SubloopScalar = 1 ; 
    1820       } 
    1821       else if (!strcasecmp(argv[i],"-SubloopScalar1")) /* file to parse       */ 
    1822       { 
    1823          SubloopScalar = 2 ; 
    1824       } 
    1825       else if (!strcasecmp(argv[i],"-todebug")) /* file to parse       */ 
    1826       { 
    1827          todebug = 1 ; 
    1828       } 
    1829       else if (!strcasecmp(argv[i],"-mark")) /* file to parse       */ 
    1830       { 
    1831          mark = 1 ; 
    1832       } 
    1833       else if (!strcasecmp(argv[i],"-todebugfree")) /* file to parse       */ 
    1834       { 
    1835          todebugfree = 1 ; 
    1836       } 
    1837       else if (!strcasecmp(argv[i],"-rm")) 
    1838       { 
    1839          checkexistcommon=0; 
    1840       } 
    1841       else 
    1842       { 
    1843          printf("Unkwon option : %s\n",argv[i]); 
    1844          exit(0); 
    1845       } 
    1846       i++; 
    1847    } 
    1848  
    1849    if (stylegiven == 1)  
    1850    { 
    1851    infree = infreegiven; 
    1852    infixed = infixedgiven;    
    1853    } 
    1854    Save_Length(nomdir,34); 
    1855    Save_Length(commondirout,35); 
    1856    Save_Length(commondirin,36); 
    1857    Save_Length(filetoparse,37); 
     1797    if ( (convert_in=fopen(config_file,"r")) == NULL ) 
     1798    { 
     1799        printf("##\n## ERROR: the configuration file '%s' doesn't exist.\n##\n", config_file); 
     1800        print_usage(); 
     1801    } 
     1802 
     1803    i=2; 
     1804    while ( i < argc ) 
     1805    { 
     1806        if (!strcasecmp(argv[i], "-workdir")) 
     1807        { 
     1808            strcpy(work_dir,argv[i+1]); 
     1809            i++; 
     1810        } 
     1811        else if (!strcasecmp(argv[i], "-incdir")) 
     1812        { 
     1813            strcpy(include_dir,argv[i+1]); 
     1814            i++; 
     1815        } 
     1816        else if (!strcasecmp(argv[i], "-comdirin")) /* input directory           */ 
     1817        { 
     1818            strcpy(input_dir,argv[i+1]); 
     1819            i++; 
     1820        } 
     1821        else if (!strcasecmp(argv[i], "-comdirout")) /* output directory         */ 
     1822        { 
     1823            strcpy(output_dir,argv[i+1]); 
     1824            i++; 
     1825        } 
     1826        else if (!strcasecmp(argv[i], "-convfile")) /* file to parse             */ 
     1827        { 
     1828            strcpy(filetoparse, argv[i+1]); 
     1829            i++; 
     1830            lengthmainfile = strlen(filetoparse); 
     1831            if (!strcasecmp(&filetoparse[lengthmainfile-4], ".f90")) 
     1832            { 
     1833                infixed = 0; 
     1834                infree = 1; 
     1835            } 
     1836            else 
     1837            { 
     1838                infixed = 1; 
     1839                infree = 0; 
     1840            } 
     1841        } 
     1842        else if (!strcasecmp(argv[i], "-free")) 
     1843        { 
     1844            stylegiven = 1; 
     1845            infreegiven  = 1 ; 
     1846            infixedgiven = 0; 
     1847        } 
     1848        else if (!strcasecmp(argv[i], "-fixed")) 
     1849        { 
     1850            stylegiven = 1; 
     1851            infreegiven  = 0; 
     1852            infixedgiven = 1; 
     1853        } 
     1854        else if (!strcasecmp(argv[i], "-SubloopScalar")) 
     1855        { 
     1856            SubloopScalar = 1 ; 
     1857        } 
     1858        else if (!strcasecmp(argv[i], "-SubloopScalar1")) 
     1859        { 
     1860            SubloopScalar = 2 ; 
     1861        } 
     1862        else if (!strcasecmp(argv[i], "-todebug")) 
     1863        { 
     1864            todebug = 1 ; 
     1865        } 
     1866        else if (!strcasecmp(argv[i],"-rm")) { } 
     1867        else 
     1868        { 
     1869            printf("##\n## Unkwon option : %s\n##\n", argv[i]); 
     1870            exit(0); 
     1871        } 
     1872        i++; 
     1873    } 
     1874    // Check input file 
     1875    if ( strlen(filetoparse) == 0 )         // -convfile has not been specified 
     1876    { 
     1877        printf("##\n## ERROR: please provide a file to parse with -convfile.\n##\n"); 
     1878        print_usage(); 
     1879    } 
     1880    // Setup input & output directories 
     1881    if ( strcasecmp(work_dir, ".") != 0 )   // -workdir has been changed... 
     1882    { 
     1883        if ( strcasecmp(input_dir,  ".") == 0 )                 // ...and -comdirin  has NOT been changed 
     1884        { 
     1885            strcpy(input_dir, work_dir); 
     1886        } 
     1887        if ( strcasecmp(output_dir, "AGRIF_MODELFILES") == 0 )  // ...and -comdirout has NOT been changed 
     1888        { 
     1889            sprintf(output_dir, "%s/%s", work_dir, "AGRIF_MODELFILES"); 
     1890        } 
     1891        if ( strcasecmp(include_dir, "AGRIF_INC") == 0 )        // ...and -incdir    has NOT been changed 
     1892        { 
     1893            sprintf(include_dir, "%s/%s", work_dir, "AGRIF_INC"); 
     1894        } 
     1895    } 
     1896    if (stylegiven == 1) 
     1897    { 
     1898        infree  = infreegiven; 
     1899        infixed = infixedgiven; 
     1900    } 
    18581901 
    18591902/******************************************************************************/ 
    1860 /*  3-  Parsing of the  conv file <name>.in                                   */ 
     1903/*  3-  Parsing of the conv file <name>.in                                    */ 
    18611904/******************************************************************************/ 
    18621905 
    1863    if ((yyin=fopen(argv[1],"r"))==NULL) 
    1864    { 
    1865        printf("the file %s doesn't exist \n",argv[1]); 
    1866        exit(0); 
    1867    } 
    1868    strcpy(mainfile,argv[1]); 
    1869    Save_Length(mainfile,33); 
    1870  
    1871    if ( strstr(filetoparse,".f90") || 
    1872         strstr(filetoparse,".F90") ) retour77 = 0; 
    1873  
    1874    yyparse(); 
     1906    if ( strstr(filetoparse, ".f90") || strstr(filetoparse, ".F90") ) retour77 = 0; 
     1907 
     1908    convert_parse(); 
    18751909 
    18761910/******************************************************************************/ 
    18771911/*  4-  Preparation of the file parsing                                       */ 
    18781912/******************************************************************************/ 
    1879    if ((yyin=fopen(filetoparse,"r"))==NULL) /* Is the file to parse exist ?   */ 
    1880    { 
    1881       printf("the file %s doesn't exist \n",filetoparse); 
    1882       exit(0); 
    1883    } 
    1884    /* mainfile : the name of the file to parse                                */ 
    1885    strcpy(mainfile,filetoparse); 
    1886    /*                                                                         */ 
    1887    if ((dependglobaloutput=fopen(".dependglobal_agrif","r"))!=NULL) 
    1888    { 
    1889       fscanf(dependglobaloutput,"%d\n",&indicemaxtabvars); 
    1890       fclose(dependglobaloutput); 
    1891    } 
    1892    Readthedependavailablefile(); 
    1893    /* Read the .dependnbxnby file which contains indices of nbmaillsX,        */ 
    1894    /*    nbmailleY and nbmailleZ                                              */ 
    1895    Readthedependnbxnbyfile(); 
    1896    Read_Subroutine_For_Alloc(); 
     1913 
     1914    sprintf(dependfilename, "%s/.dependglobal_agrif", work_dir); 
     1915    /*                                                                         */ 
     1916    if ( (dependglobaloutput=fopen(dependfilename, "r")) != NULL ) 
     1917    { 
     1918        for (i=0;i<NB_CAT_VARIABLES;i++) 
     1919        { 
     1920            fscanf(dependglobaloutput,"%d\n",&indicemaxtabvars[i]); 
     1921        } 
     1922        fclose(dependglobaloutput); 
     1923    } 
     1924    Readthedependavailablefile(); 
     1925    /* Read the .dependnbxnby file which contains indices of nbmaillsX, nbmailleY and nbmailleZ */ 
     1926    Readthedependnbxnbyfile(); 
     1927    Read_Subroutine_For_Alloc(); 
     1928 
    18971929/******************************************************************************/ 
    18981930/*  5-  Parsing of the input file (2 times)                                   */ 
    18991931/******************************************************************************/ 
    1900    /* Record all variable in list                                             */ 
    1901    firstpass = 1; 
    1902    processfortran(filetoparse); 
    1903    /*                                                                         */ 
    1904    CompleteThelistvarindoloop(); 
    1905    /* Read list of module used                                                */ 
    1906    RecordUseModulesVariables(); 
    1907    /* Read list of module used in module used                                 */ 
    1908    RecordUseModulesUseModulesVariables(); 
    1909    /* Save variables are considered as globals ones                           */ 
    1910    Update_List_Global_Var_From_List_Save_Var(); 
    1911    /* Update all lists                                                        */ 
    1912    ListUpdate(); 
    1913    /*                                                                         */ 
    1914    Clean_List_Global_Var(); 
    1915    /* Indice tabvars identification                                           */ 
    1916    IndiceTabvarsIdentification(); 
    1917    /* Update all lists                                                        */ 
    1918    ListUpdate(); 
    1919    /* The allocation subroutine is necessary ????                             */ 
    1920    New_Allocate_Subroutine_Is_Necessary(); 
    1921    /* The allocation subroutine is necessary for common list                  */ 
    1922    New_Allocate_Subroutine_For_Common_Is_Necessary(); 
    1923    /* Sort List_SubroutineArgument_Var                                        */ 
    1924    Sort_List_SubroutineArgument_Var(); 
    1925    /* Clean all lists                                                         */ 
    1926    ListClean(); 
    1927    /* Update Indice of List_UsedInSubroutine_Var from module used             */ 
    1928    List_UsedInSubroutine_Var_Update_From_Module_Used(); 
    1929    /* Update List_SubroutineWhereAgrifUsed                                    */ 
    1930    UpdateList_SubroutineWhereAgrifUsed(); 
    1931    /* Update List_UsedInSubroutine_Var with v_readedlistdimension             */ 
    1932    UpdateList_UsedInSubroutine_With_dimension();; 
    1933    /*                                                                         */ 
    1934    ModifyThelistvarindoloop(); 
    1935    /*                                                                         */ 
    1936    UpdateListDeclarationWithDimensionList(); 
    1937    /*                                                                         */ 
    1938    GiveTypeOfVariables(); 
    1939    Affiche(); 
    1940    /* Build new subroutines                                                   */ 
    1941    firstpass = 0; 
    1942    processfortran(filetoparse); 
    1943  
    1944    newvar = (listvar *)NULL; 
    1945 /*newvar = List_Global_Var; */ 
    1946    while ( newvar ) 
    1947    { 
    1948       printf("++++ %s %d %s %s %s\n", 
    1949       newvar->var->v_nomvar, 
    1950       newvar->var->v_nbdim, 
    1951       newvar->var->v_subroutinename, 
    1952       newvar->var->v_modulename, 
    1953       newvar->var->v_typevar 
    1954              ); 
    1955       newvar = newvar->suiv; 
    1956    } 
     1932 
     1933    /* Record all variables in list                                            */ 
     1934    firstpass = 1; 
     1935    process_fortran(filetoparse); 
     1936 
     1937    CompleteThelistvarindoloop(); 
     1938    /* Read list of module used                                                */ 
     1939    RecordUseModulesVariables(); 
     1940    /* Read list of module used in module used                                 */ 
     1941    RecordUseModulesUseModulesVariables(); 
     1942    /* Save variables are considered as globals ones                           */ 
     1943    Update_List_Global_Var_From_List_Save_Var(); 
     1944    /* Update all lists                                                        */ 
     1945    ListUpdate(); 
     1946 
     1947    Clean_List_Global_Var(); 
     1948    /* Indice tabvars identification                                           */ 
     1949    IndiceTabvarsIdentification(); 
     1950    /* Update all lists                                                        */ 
     1951    ListUpdate(); 
     1952    /* The allocation subroutine is necessary ????                             */ 
     1953    New_Allocate_Subroutine_Is_Necessary(); 
     1954    /* The allocation subroutine is necessary for common list                  */ 
     1955    New_Allocate_Subroutine_For_Common_Is_Necessary(); 
     1956    /* Sort List_SubroutineArgument_Var                                        */ 
     1957    Sort_List_SubroutineArgument_Var(); 
     1958    /* Clean all lists                                                         */ 
     1959    ListClean(); 
     1960    /* Update Indice of List_UsedInSubroutine_Var from module used             */ 
     1961    List_UsedInSubroutine_Var_Update_From_Module_Used(); 
     1962    /* Update List_SubroutineWhereAgrifUsed                                    */ 
     1963    UpdateList_SubroutineWhereAgrifUsed(); 
     1964    /* Update List_UsedInSubroutine_Var with v_readedlistdimension             */ 
     1965    UpdateList_UsedInSubroutine_With_dimension(); 
     1966 
     1967    ModifyThelistvarindoloop(); 
     1968    UpdateListDeclarationWithDimensionList(); 
     1969    GiveTypeOfVariables(); 
     1970 
     1971    /* Build new subroutines                                                   */ 
     1972    firstpass = 0; 
     1973    process_fortran(filetoparse); 
     1974 
     1975    newvar = (listvar *) NULL; 
     1976 
     1977    while ( newvar ) 
     1978    { 
     1979        printf("++++ %s %d %s %s %s\n", 
     1980            newvar->var->v_nomvar, 
     1981            newvar->var->v_nbdim, 
     1982            newvar->var->v_subroutinename, 
     1983            newvar->var->v_modulename, 
     1984            newvar->var->v_typevar); 
     1985        newvar = newvar->suiv; 
     1986    } 
     1987 
    19571988/******************************************************************************/ 
    19581989/*  6-  Write informations in output files                                    */ 
    19591990/******************************************************************************/ 
    19601991 
    1961    /* Write the .dependglobal_agrif file which contain the max indice         */ 
    1962    /*    of the tabvars table                                                 */ 
    1963    dependglobaloutput = fopen(".dependglobal_agrif","w"); 
    1964    fprintf(dependglobaloutput,"%d\n",indicemaxtabvars); 
    1965    fclose(dependglobaloutput); 
    1966    /* Write the list of available indice                                      */ 
    1967    Writethedependavailablefile(); 
    1968    /* Write the .dependnbxnby file which contains indices of nbmaillsX,       */ 
    1969    /*    nbmailleY and nbmailleZ                                              */ 
    1970    Writethedependnbxnbyfile(); 
    1971    /* Write the .depend<namefile> file which contain general informations     */ 
    1972    /*    about variable of this file                                          */ 
    1973    parcours = List_NameOfModule; 
    1974    while( parcours ) 
    1975    { 
    1976       Writethedependlistofmoduleused(parcours->o_nom); 
    1977       WritedependParameterList(parcours->o_nom); 
    1978       Writethedependfile(parcours->o_nom,List_Global_Var); 
    1979       parcours=parcours->suiv; 
    1980    } 
    1981    parcours = List_NameOfCommon; 
    1982    while( parcours ) 
    1983    { 
    1984       Writethedependfile(parcours->o_nom,List_Common_Var); 
    1985       parcours=parcours->suiv; 
    1986    } 
    1987    Write_Subroutine_For_Alloc(); 
     1992    /* Write the .dependglobal_agrif file which contain the max indice         */ 
     1993    /*    of the tabvars table                                                 */ 
     1994    sprintf(dependfilename, "%s/.dependglobal_agrif", work_dir); 
     1995    dependglobaloutput = fopen(dependfilename, "w"); 
     1996    for (i=0;i<NB_CAT_VARIABLES;i++) 
     1997    { 
     1998        fprintf(dependglobaloutput,"%d\n",indicemaxtabvars[i]); 
     1999    } 
     2000    fclose(dependglobaloutput); 
     2001    /* Write the list of available indice                                      */ 
     2002    Writethedependavailablefile(); 
     2003    /* Write the .dependnbxnby file which contains indices of nbmaillsX,       */ 
     2004    /*    nbmailleY and nbmailleZ                                              */ 
     2005    Writethedependnbxnbyfile(); 
     2006    /* Write the .depend<namefile> file which contain general informations     */ 
     2007    /*    about variable of this file                                          */ 
     2008    parcours = List_NameOfModule; 
     2009    while( parcours ) 
     2010    { 
     2011        Writethedependlistofmoduleused(parcours->o_nom); 
     2012        WritedependParameterList(parcours->o_nom); 
     2013        Writethedependfile(parcours->o_nom,List_Global_Var); 
     2014        parcours=parcours->suiv; 
     2015    } 
     2016    parcours = List_NameOfCommon; 
     2017    while( parcours ) 
     2018    { 
     2019        Writethedependfile(parcours->o_nom,List_Common_Var); 
     2020        parcours=parcours->suiv; 
     2021    } 
     2022    Write_Subroutine_For_Alloc(); 
     2023 
    19882024/******************************************************************************/ 
    19892025/*  7-  Create files in AGRIF_INC directory                                   */ 
    19902026/******************************************************************************/ 
    1991    creefichieramr(NameTamponfile); 
    1992  
    1993    Write_val_max(); 
    1994  
    1995    if ( todebug == 1 ) printf("Out of CONV \n"); 
    1996    return 0; 
     2027 
     2028    creefichieramr(); 
     2029 
     2030    Write_val_max(); 
     2031 
     2032    if ( todebug == 1 ) printf("Out of CONV \n"); 
     2033    return 0; 
    19972034} 
    19982035#line 2 "convert.yy.c" 
     
    20032040 
    20042041/* A lexical scanner generated by flex */ 
     2042 
     2043#define yy_create_buffer convert__create_buffer 
     2044#define yy_delete_buffer convert__delete_buffer 
     2045#define yy_flex_debug convert__flex_debug 
     2046#define yy_init_buffer convert__init_buffer 
     2047#define yy_flush_buffer convert__flush_buffer 
     2048#define yy_load_buffer_state convert__load_buffer_state 
     2049#define yy_switch_to_buffer convert__switch_to_buffer 
     2050#define yyin convert_in 
     2051#define yyleng convert_leng 
     2052#define yylex convert_lex 
     2053#define yylineno convert_lineno 
     2054#define yyout convert_out 
     2055#define yyrestart convert_restart 
     2056#define yytext convert_text 
     2057#define yywrap convert_wrap 
     2058#define yyalloc convert_alloc 
     2059#define yyrealloc convert_realloc 
     2060#define yyfree convert_free 
    20052061 
    20062062#define FLEX_SCANNER 
     
    20452101typedef int32_t flex_int32_t; 
    20462102typedef uint32_t flex_uint32_t; 
     2103typedef uint64_t flex_uint64_t; 
    20472104#else 
    20482105typedef signed char flex_int8_t; 
     
    21342191 
    21352192/* Special action meaning "start processing a new file". */ 
    2136 #define YY_NEW_FILE yyrestart(yyin  ) 
     2193#define YY_NEW_FILE convert_restart(convert_in  ) 
    21372194 
    21382195#define YY_END_OF_BUFFER_CHAR 0 
     
    21572214#endif 
    21582215 
    2159 extern yy_size_t yyleng; 
    2160  
    2161 extern FILE *yyin, *yyout; 
     2216extern yy_size_t convert_leng; 
     2217 
     2218extern FILE *convert_in, *convert_out; 
    21622219 
    21632220#define EOB_ACT_CONTINUE_SCAN 0 
     
    21712228   do \ 
    21722229      { \ 
    2173       /* Undo effects of setting up yytext. */ \ 
     2230      /* Undo effects of setting up convert_text. */ \ 
    21742231        int yyless_macro_arg = (n); \ 
    21752232        YY_LESS_LINENO(yyless_macro_arg);\ 
     
    21772234      YY_RESTORE_YY_MORE_OFFSET \ 
    21782235      (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 
    2179       YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 
     2236      YY_DO_BEFORE_ACTION; /* set up convert_text again */ \ 
    21802237      } \ 
    21812238   while ( 0 ) 
     
    22402297    * 
    22412298    * When we actually see the EOF, we change the status to "new" 
    2242     * (via yyrestart()), so that the user can continue scanning by 
    2243     * just pointing yyin at a new input file. 
     2299    * (via convert_restart()), so that the user can continue scanning by 
     2300    * just pointing convert_in at a new input file. 
    22442301    */ 
    22452302#define YY_BUFFER_EOF_PENDING 2 
     
    22682325#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 
    22692326 
    2270 /* yy_hold_char holds the character lost when yytext is formed. */ 
     2327/* yy_hold_char holds the character lost when convert_text is formed. */ 
    22712328static char yy_hold_char; 
    22722329static yy_size_t yy_n_chars;     /* number of characters read into yy_ch_buf */ 
    2273 yy_size_t yyleng; 
     2330yy_size_t convert_leng; 
    22742331 
    22752332/* Points to current character in buffer. */ 
     
    22782335static int yy_start = 0;   /* start state number */ 
    22792336 
    2280 /* Flag which is used to allow yywrap()'s to do buffer switches 
    2281  * instead of setting up a fresh yyin.  A bit of a hack ... 
     2337/* Flag which is used to allow convert_wrap()'s to do buffer switches 
     2338 * instead of setting up a fresh convert_in.  A bit of a hack ... 
    22822339 */ 
    22832340static int yy_did_buffer_switch_on_eof; 
    22842341 
    2285 void yyrestart (FILE *input_file  ); 
    2286 void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  ); 
    2287 YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  ); 
    2288 void yy_delete_buffer (YY_BUFFER_STATE b  ); 
    2289 void yy_flush_buffer (YY_BUFFER_STATE b  ); 
    2290 void yypush_buffer_state (YY_BUFFER_STATE new_buffer  ); 
    2291 void yypop_buffer_state (void ); 
    2292  
    2293 static void yyensure_buffer_stack (void ); 
    2294 static void yy_load_buffer_state (void ); 
    2295 static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  ); 
    2296  
    2297 #define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) 
    2298  
    2299 YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  ); 
    2300 YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  ); 
    2301 YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len  ); 
    2302  
    2303 void *yyalloc (yy_size_t  ); 
    2304 void *yyrealloc (void *,yy_size_t  ); 
    2305 void yyfree (void *  ); 
    2306  
    2307 #define yy_new_buffer yy_create_buffer 
     2342void convert_restart (FILE *input_file  ); 
     2343void convert__switch_to_buffer (YY_BUFFER_STATE new_buffer  ); 
     2344YY_BUFFER_STATE convert__create_buffer (FILE *file,int size  ); 
     2345void convert__delete_buffer (YY_BUFFER_STATE b  ); 
     2346void convert__flush_buffer (YY_BUFFER_STATE b  ); 
     2347void convert_push_buffer_state (YY_BUFFER_STATE new_buffer  ); 
     2348void convert_pop_buffer_state (void ); 
     2349 
     2350static void convert_ensure_buffer_stack (void ); 
     2351static void convert__load_buffer_state (void ); 
     2352static void convert__init_buffer (YY_BUFFER_STATE b,FILE *file  ); 
     2353 
     2354#define YY_FLUSH_BUFFER convert__flush_buffer(YY_CURRENT_BUFFER ) 
     2355 
     2356YY_BUFFER_STATE convert__scan_buffer (char *base,yy_size_t size  ); 
     2357YY_BUFFER_STATE convert__scan_string (yyconst char *yy_str  ); 
     2358YY_BUFFER_STATE convert__scan_bytes (yyconst char *bytes,yy_size_t len  ); 
     2359 
     2360void *convert_alloc (yy_size_t  ); 
     2361void *convert_realloc (void *,yy_size_t  ); 
     2362void convert_free (void *  ); 
     2363 
     2364#define yy_new_buffer convert__create_buffer 
    23082365 
    23092366#define yy_set_interactive(is_interactive) \ 
    23102367   { \ 
    23112368   if ( ! YY_CURRENT_BUFFER ){ \ 
    2312         yyensure_buffer_stack (); \ 
     2369        convert_ensure_buffer_stack (); \ 
    23132370      YY_CURRENT_BUFFER_LVALUE =    \ 
    2314             yy_create_buffer(yyin,YY_BUF_SIZE ); \ 
     2371            convert__create_buffer(convert_in,YY_BUF_SIZE ); \ 
    23152372   } \ 
    23162373   YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 
     
    23202377   { \ 
    23212378   if ( ! YY_CURRENT_BUFFER ){\ 
    2322         yyensure_buffer_stack (); \ 
     2379        convert_ensure_buffer_stack (); \ 
    23232380      YY_CURRENT_BUFFER_LVALUE =    \ 
    2324             yy_create_buffer(yyin,YY_BUF_SIZE ); \ 
     2381            convert__create_buffer(convert_in,YY_BUF_SIZE ); \ 
    23252382   } \ 
    23262383   YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 
     
    23312388/* Begin user sect3 */ 
    23322389 
     2390#define convert_wrap(n) 1 
     2391#define YY_SKIP_YYWRAP 
     2392 
    23332393typedef unsigned char YY_CHAR; 
    23342394 
    2335 FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 
     2395FILE *convert_in = (FILE *) 0, *convert_out = (FILE *) 0; 
    23362396 
    23372397typedef int yy_state_type; 
    23382398 
    2339 extern int yylineno; 
    2340  
    2341 int yylineno = 1; 
    2342  
    2343 extern char *yytext; 
    2344 #define yytext_ptr yytext 
     2399extern int convert_lineno; 
     2400 
     2401int convert_lineno = 1; 
     2402 
     2403extern char *convert_text; 
     2404#define yytext_ptr convert_text 
    23452405 
    23462406static yy_state_type yy_get_previous_state (void ); 
     
    23502410 
    23512411/* Done after the current pattern has been matched and before the 
    2352  * corresponding action - sets up yytext. 
     2412 * corresponding action - sets up convert_text. 
    23532413 */ 
    23542414#define YY_DO_BEFORE_ACTION \ 
    23552415   (yytext_ptr) = yy_bp; \ 
    2356    yyleng = (size_t) (yy_cp - yy_bp); \ 
     2416   convert_leng = (yy_size_t) (yy_cp - yy_bp); \ 
    23572417   (yy_hold_char) = *yy_cp; \ 
    23582418   *yy_cp = '\0'; \ 
    23592419   (yy_c_buf_p) = yy_cp; 
    23602420 
    2361 #define YY_NUM_RULES 12 
    2362 #define YY_END_OF_BUFFER 13 
     2421#define YY_NUM_RULES 15 
     2422#define YY_END_OF_BUFFER 16 
    23632423/* This struct is not used in this scanner, 
    23642424   but its presence is necessary. */ 
     
    23682428   flex_int32_t yy_nxt; 
    23692429   }; 
    2370 static yyconst flex_int16_t yy_accept[77] = 
     2430static yyconst flex_int16_t yy_accept[84] = 
    23712431    {   0, 
    2372         0,    0,    0,    0,   13,   12,   11,   10,   12,    9, 
    2373        12,   12,   12,    9,    8,    8,    8,    8,    8,    8, 
    2374        11,    0,    4,    7,    7,    7,    5,    8,    8,    8, 
    2375         8,    8,    8,    8,    6,    8,    8,    8,    8,    3, 
    2376         8,    8,    8,    8,    8,    8,    8,    8,    8,    8, 
    2377         8,    8,    8,    8,    8,    8,    8,    8,    8,    8, 
    2378         8,    8,    8,    8,    8,    2,    8,    8,    8,    1, 
    2379         8,    8,    8,    8,    6,    0 
     2432        0,    0,    0,    0,   16,   15,   14,   13,   15,   12, 
     2433       11,   11,   11,   11,   12,    7,   10,   10,   10,   10, 
     2434       10,   10,   10,   14,    0,    4,   11,    9,    9,    9, 
     2435        5,   10,   10,   10,   10,   10,   10,   10,   10,    8, 
     2436       10,   10,   10,   10,   10,    3,   10,    6,   10,   10, 
     2437       10,   10,   10,   10,   10,   10,   10,   10,   10,   10, 
     2438       10,   10,   10,   10,   10,   10,   10,   10,   10,   10, 
     2439       10,   10,    2,   10,   10,   10,    1,   10,   10,   10, 
     2440       10,    8,    0 
    23802441    } ; 
    23812442 
     
    23882449        6,    1,    1,    7,    1,    1,    1,    8,    9,   10, 
    23892450       11,    8,    8,    8,   12,    8,    8,   13,   14,    1, 
    2390         1,    1,    1,    1,   15,   16,   16,   17,   18,   19, 
    2391        20,   16,   21,   16,   16,   22,   23,   24,   25,   26, 
    2392        16,   27,   28,   29,   30,   16,   16,   31,   32,   16, 
    2393        33,    1,   34,    1,   35,    1,   36,   16,   16,   37, 
    2394  
    2395        38,   39,   40,   16,   41,   16,   16,   42,   43,   44, 
    2396        45,   46,   16,   47,   48,   49,   50,   16,   16,   51, 
    2397        52,   16,    1,    1,    1,    1,    1,    1,    1,    1, 
     2451       15,    1,    1,    1,   16,   17,   17,   18,   19,   20, 
     2452       21,   17,   22,   17,   23,   24,   25,   26,   27,   28, 
     2453       17,   29,   30,   31,   32,   17,   17,   33,   34,   17, 
     2454       35,    1,   36,    1,   37,    1,   38,   17,   17,   39, 
     2455 
     2456       40,   41,   42,   17,   43,   17,   44,   45,   46,   47, 
     2457       48,   49,   17,   50,   51,   52,   53,   17,   17,   54, 
     2458       55,   17,    1,    1,    1,    1,    1,    1,    1,    1, 
    23982459        1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
    23992460        1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
     
    24122473    } ; 
    24132474 
    2414 static yyconst flex_int32_t yy_meta[53] = 
     2475static yyconst flex_int32_t yy_meta[56] = 
    24152476    {   0, 
    24162477        1,    1,    2,    1,    1,    1,    1,    3,    3,    3, 
    2417         3,    3,    1,    1,    3,    3,    3,    3,    3,    3, 
     2478        3,    3,    1,    1,    1,    3,    3,    3,    3,    3, 
    24182479        3,    3,    3,    3,    3,    3,    3,    3,    3,    3, 
    2419         3,    3,    1,    1,    3,    3,    3,    3,    3,    3, 
     2480        3,    3,    3,    3,    1,    1,    3,    3,    3,    3, 
    24202481        3,    3,    3,    3,    3,    3,    3,    3,    3,    3, 
    2421         3,    3 
     2482        3,    3,    3,    3,    3 
    24222483    } ; 
    24232484 
    2424 static yyconst flex_int16_t yy_base[79] = 
     2485static yyconst flex_int16_t yy_base[86] = 
    24252486    {   0, 
    2426         0,    0,    0,    0,  150,  164,  147,  164,  144,  164, 
    2427        36,   37,   38,  134,    0,   44,   32,   34,   44,   33, 
    2428       144,  141,  140,  164,  164,  164,  164,    0,  131,   31, 
    2429        34,   42,   39,   49,    0,   50,   49,   38,   56,    0, 
    2430        59,   52,  107,   68,  106,   72,   75,   72,   77,   81, 
    2431        79,   76,   75,   86,   73,   88,   85,   89,   90,   79, 
    2432        93,   86,   99,   97,  103,    0,   37,  115,  114,    0, 
    2433       108,  116,  121,  112,    0,  164,  160,   57 
     2487        0,    0,    0,    0,  192,  194,  186,  194,  176,  194, 
     2488       48,   53,   58,   69,  164,  194,    0,   60,   51,   47, 
     2489       49,   67,   55,  173,  170,  169,   90,  194,  194,  194, 
     2490      194,    0,  160,   53,   62,   58,   66,   62,   74,    0, 
     2491       85,   95,   94,   82,  101,    0,  101,    0,   91,  134, 
     2492       96,  133,  100,  103,   99,  105,  109,  106,  102,  101, 
     2493      113,   99,  115,  113,  119,  127,  123,  139,  130,  142, 
     2494      137,  132,    0,   81,  144,  143,    0,  136,  144,  150, 
     2495      139,    0,  194,  190,   81 
    24342496    } ; 
    24352497 
    2436 static yyconst flex_int16_t yy_def[79] = 
     2498static yyconst flex_int16_t yy_def[86] = 
    24372499    {   0, 
    2438        76,    1,    1,    1,   76,   76,   76,   76,   77,   76, 
    2439        76,   76,   76,   76,   78,   78,   78,   78,   78,   78, 
    2440        76,   77,   77,   76,   76,   76,   76,   78,   78,   78, 
    2441        78,   78,   78,   78,   78,   78,   78,   78,   78,   78, 
    2442        78,   78,   78,   78,   78,   78,   78,   78,   78,   78, 
    2443        78,   78,   78,   78,   78,   78,   78,   78,   78,   78, 
    2444        78,   78,   78,   78,   78,   78,   78,   78,   78,   78, 
    2445        78,   78,   78,   78,   78,    0,   76,   76 
     2500       83,    1,    1,    1,   83,   83,   83,   83,   84,   83, 
     2501       83,   83,   83,   83,   83,   83,   85,   85,   85,   85, 
     2502       85,   85,   85,   83,   84,   84,   83,   83,   83,   83, 
     2503       83,   85,   85,   85,   85,   85,   85,   85,   85,   85, 
     2504       85,   85,   85,   85,   85,   85,   85,   85,   85,   85, 
     2505       85,   85,   85,   85,   85,   85,   85,   85,   85,   85, 
     2506       85,   85,   85,   85,   85,   85,   85,   85,   85,   85, 
     2507       85,   85,   85,   85,   85,   85,   85,   85,   85,   85, 
     2508       85,   85,    0,   83,   83 
    24462509    } ; 
    24472510 
    2448 static yyconst flex_int16_t yy_nxt[217] = 
     2511static yyconst flex_int16_t yy_nxt[250] = 
    24492512    {   0, 
    2450         6,    7,    8,    9,   10,   10,   10,    6,   11,   12, 
    2451        13,    6,   14,   10,   15,   15,   15,   15,   16,   15, 
    2452        15,   15,   15,   17,   18,   19,   15,   15,   15,   20, 
    2453        15,   15,   10,   10,   15,   15,   15,   15,   16,   15, 
    2454        15,   15,   15,   17,   18,   19,   15,   15,   15,   20, 
    2455        15,   15,   24,   25,   26,   29,   31,   32,   33,   28, 
    2456        34,   36,   37,   38,   30,   39,   40,   41,   42,   43, 
    2457        44,   69,   24,   25,   26,   45,   31,   32,   46,   33, 
    2458        34,   36,   37,   38,   30,   39,   40,   41,   42,   43, 
    2459        48,   44,   50,   51,   52,   45,   53,   54,   46,   55, 
    2460  
    2461        56,   57,   58,   59,   60,   61,   62,   63,   64,   65, 
    2462        48,   66,   50,   51,   52,   67,   53,   54,   68,   55, 
    2463        56,   57,   58,   59,   60,   61,   62,   63,   64,   65, 
    2464        35,   66,   70,   71,   72,   67,   73,   74,   68,   75, 
    2465        49,   47,   35,   23,   23,   21,   27,   23,   21,   76, 
    2466        35,   76,   70,   71,   72,   76,   73,   74,   76,   75, 
    2467        22,   76,   22,    5,   76,   76,   76,   76,   76,   76, 
    2468        76,   76,   76,   76,   76,   76,   76,   76,   76,   76, 
    2469        76,   76,   76,   76,   76,   76,   76,   76,   76,   76, 
    2470        76,   76,   76,   76,   76,   76,   76,   76,   76,   76, 
    2471  
    2472        76,   76,   76,   76,   76,   76,   76,   76,   76,   76, 
    2473        76,   76,   76,   76,   76,   76 
     2513        6,    7,    8,    9,   10,   10,   10,   11,   12,   13, 
     2514       14,   11,   15,   10,   16,   17,   17,   17,   17,   18, 
     2515       17,   17,   19,   17,   17,   20,   21,   22,   17,   17, 
     2516       17,   23,   17,   17,   10,   10,   17,   17,   17,   17, 
     2517       18,   17,   17,   19,   17,   17,   20,   21,   22,   17, 
     2518       17,   17,   23,   17,   17,   27,   27,   27,   27,   27, 
     2519       27,   27,   27,   27,   27,   27,   27,   27,   27,   27, 
     2520       28,   33,   35,   36,   37,   29,   27,   27,   27,   27, 
     2521       27,   34,   38,   32,   39,   41,   30,   42,   43,   44, 
     2522       45,   28,   46,   35,   36,   37,   29,   27,   27,   27, 
     2523 
     2524       27,   27,   34,   47,   38,   39,   41,   30,   42,   43, 
     2525       44,   45,   48,   46,   49,   50,   51,   76,   52,   53, 
     2526       55,   57,   58,   59,   47,   60,   61,   62,   63,   64, 
     2527       65,   66,   67,   48,   68,   49,   50,   69,   51,   52, 
     2528       53,   55,   57,   58,   59,   70,   60,   61,   62,   63, 
     2529       64,   65,   66,   67,   71,   68,   72,   73,   69,   74, 
     2530       75,   40,   77,   78,   79,   80,   70,   81,   82,   56, 
     2531       54,   40,   26,   26,   24,   71,   31,   72,   73,   26, 
     2532       74,   75,   40,   77,   78,   79,   80,   24,   81,   82, 
     2533       25,   83,   25,    5,   83,   83,   83,   83,   83,   83, 
     2534 
     2535       83,   83,   83,   83,   83,   83,   83,   83,   83,   83, 
     2536       83,   83,   83,   83,   83,   83,   83,   83,   83,   83, 
     2537       83,   83,   83,   83,   83,   83,   83,   83,   83,   83, 
     2538       83,   83,   83,   83,   83,   83,   83,   83,   83,   83, 
     2539       83,   83,   83,   83,   83,   83,   83,   83,   83 
    24742540    } ; 
    24752541 
    2476 static yyconst flex_int16_t yy_chk[217] = 
     2542static yyconst flex_int16_t yy_chk[250] = 
    24772543    {   0, 
    24782544        1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
     
    24812547        1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
    24822548        1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
    2483         1,    1,   11,   12,   13,   16,   17,   18,   19,   78, 
    2484        20,   30,   31,   32,   16,   33,   34,   36,   37,   38, 
    2485        39,   67,   11,   12,   13,   41,   17,   18,   42,   19, 
    2486        20,   30,   31,   32,   16,   33,   34,   36,   37,   38, 
    2487        44,   39,   46,   47,   48,   41,   49,   50,   42,   51, 
    2488  
    2489        52,   53,   54,   55,   56,   57,   58,   59,   60,   61, 
    2490        44,   62,   46,   47,   48,   63,   49,   50,   64,   51, 
    2491        52,   53,   54,   55,   56,   57,   58,   59,   60,   61, 
    2492        65,   62,   68,   69,   71,   63,   72,   73,   64,   74, 
    2493        45,   43,   29,   23,   22,   21,   14,    9,    7,    5, 
    2494        65,    0,   68,   69,   71,    0,   72,   73,    0,   74, 
    2495        77,    0,   77,   76,   76,   76,   76,   76,   76,   76, 
    2496        76,   76,   76,   76,   76,   76,   76,   76,   76,   76, 
    2497        76,   76,   76,   76,   76,   76,   76,   76,   76,   76, 
    2498        76,   76,   76,   76,   76,   76,   76,   76,   76,   76, 
    2499  
    2500        76,   76,   76,   76,   76,   76,   76,   76,   76,   76, 
    2501        76,   76,   76,   76,   76,   76 
     2549        1,    1,    1,    1,    1,   11,   11,   11,   11,   11, 
     2550       12,   12,   12,   12,   12,   13,   13,   13,   13,   13, 
     2551       12,   18,   19,   20,   21,   13,   14,   14,   14,   14, 
     2552       14,   18,   22,   85,   23,   34,   14,   35,   36,   37, 
     2553       38,   12,   39,   19,   20,   21,   13,   27,   27,   27, 
     2554 
     2555       27,   27,   18,   41,   22,   23,   34,   14,   35,   36, 
     2556       37,   38,   42,   39,   43,   44,   45,   74,   47,   49, 
     2557       51,   53,   54,   55,   41,   56,   57,   58,   59,   60, 
     2558       61,   62,   63,   42,   64,   43,   44,   65,   45,   47, 
     2559       49,   51,   53,   54,   55,   66,   56,   57,   58,   59, 
     2560       60,   61,   62,   63,   67,   64,   68,   69,   65,   70, 
     2561       71,   72,   75,   76,   78,   79,   66,   80,   81,   52, 
     2562       50,   33,   26,   25,   24,   67,   15,   68,   69,    9, 
     2563       70,   71,   72,   75,   76,   78,   79,    7,   80,   81, 
     2564       84,    5,   84,   83,   83,   83,   83,   83,   83,   83, 
     2565 
     2566       83,   83,   83,   83,   83,   83,   83,   83,   83,   83, 
     2567       83,   83,   83,   83,   83,   83,   83,   83,   83,   83, 
     2568       83,   83,   83,   83,   83,   83,   83,   83,   83,   83, 
     2569       83,   83,   83,   83,   83,   83,   83,   83,   83,   83, 
     2570       83,   83,   83,   83,   83,   83,   83,   83,   83 
    25022571    } ; 
    25032572 
     
    25052574static char *yy_last_accepting_cpos; 
    25062575 
    2507 extern int yy_flex_debug; 
    2508 int yy_flex_debug = 0; 
     2576extern int convert__flex_debug; 
     2577int convert__flex_debug = 0; 
    25092578 
    25102579/* The intent behind this definition is that it'll catch 
     
    25152584#define YY_MORE_ADJ 0 
    25162585#define YY_RESTORE_YY_MORE_OFFSET 
    2517 char *yytext; 
     2586char *convert_text; 
    25182587#line 1 "convert.lex" 
    25192588/******************************************************************************/ 
     
    25522621/******************************************************************************/ 
    25532622 
    2554 #line 37 "convert.lex" 
     2623#line 40 "convert.lex" 
    25552624#include <math.h> 
    25562625#include <stdlib.h> 
    25572626#include <string.h> 
    2558 int line_num=1; 
    2559 extern FILE * yyin; 
    2560 #define MAX_INCLUDE_DEPTH 30 
    2561 YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; 
    2562 #line 566 "convert.yy.c" 
     2627 
     2628#define YY_NO_INPUT 
     2629#line 595 "convert.yy.c" 
    25632630 
    25642631#define INITIAL 0 
     
    25822649   These are made visible to non-reentrant scanners for convenience. */ 
    25832650 
    2584 int yylex_destroy (void ); 
    2585  
    2586 int yyget_debug (void ); 
    2587  
    2588 void yyset_debug (int debug_flag  ); 
    2589  
    2590 YY_EXTRA_TYPE yyget_extra (void ); 
    2591  
    2592 void yyset_extra (YY_EXTRA_TYPE user_defined  ); 
    2593  
    2594 FILE *yyget_in (void ); 
    2595  
    2596 void yyset_in  (FILE * in_str  ); 
    2597  
    2598 FILE *yyget_out (void ); 
    2599  
    2600 void yyset_out  (FILE * out_str  ); 
    2601  
    2602 yy_size_t yyget_leng (void ); 
    2603  
    2604 char *yyget_text (void ); 
    2605  
    2606 int yyget_lineno (void ); 
    2607  
    2608 void yyset_lineno (int line_number  ); 
     2651int convert_lex_destroy (void ); 
     2652 
     2653int convert_get_debug (void ); 
     2654 
     2655void convert_set_debug (int debug_flag  ); 
     2656 
     2657YY_EXTRA_TYPE convert_get_extra (void ); 
     2658 
     2659void convert_set_extra (YY_EXTRA_TYPE user_defined  ); 
     2660 
     2661FILE *convert_get_in (void ); 
     2662 
     2663void convert_set_in  (FILE * in_str  ); 
     2664 
     2665FILE *convert_get_out (void ); 
     2666 
     2667void convert_set_out  (FILE * out_str  ); 
     2668 
     2669yy_size_t convert_get_leng (void ); 
     2670 
     2671char *convert_get_text (void ); 
     2672 
     2673int convert_get_lineno (void ); 
     2674 
     2675void convert_set_lineno (int line_number  ); 
    26092676 
    26102677/* Macros after this point can all be overridden by user definitions in 
     
    26142681#ifndef YY_SKIP_YYWRAP 
    26152682#ifdef __cplusplus 
    2616 extern "C" int yywrap (void ); 
     2683extern "C" int convert_wrap (void ); 
    26172684#else 
    2618 extern int yywrap (void ); 
     2685extern int convert_wrap (void ); 
    26192686#endif 
    26202687#endif 
     
    26502717 * we now use fwrite(). 
    26512718 */ 
    2652 #define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) 
     2719#define ECHO fwrite( convert_text, convert_leng, 1, convert_out ) 
    26532720#endif 
    26542721 
     
    26632730      size_t n; \ 
    26642731      for ( n = 0; n < max_size && \ 
    2665               (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 
     2732              (c = getc( convert_in )) != EOF && c != '\n'; ++n ) \ 
    26662733         buf[n] = (char) c; \ 
    26672734      if ( c == '\n' ) \ 
    26682735         buf[n++] = (char) c; \ 
    2669       if ( c == EOF && ferror( yyin ) ) \ 
     2736      if ( c == EOF && ferror( convert_in ) ) \ 
    26702737         YY_FATAL_ERROR( "input in flex scanner failed" ); \ 
    26712738      result = n; \ 
     
    26742741      { \ 
    26752742      errno=0; \ 
    2676       while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 
     2743      while ( (result = fread(buf, 1, max_size, convert_in))==0 && ferror(convert_in)) \ 
    26772744         { \ 
    26782745         if( errno != EINTR) \ 
     
    26822749            } \ 
    26832750         errno=0; \ 
    2684          clearerr(yyin); \ 
     2751         clearerr(convert_in); \ 
    26852752         } \ 
    26862753      }\ 
     
    27152782#define YY_DECL_IS_OURS 1 
    27162783 
    2717 extern int yylex (void); 
    2718  
    2719 #define YY_DECL int yylex (void) 
     2784extern int convert_lex (void); 
     2785 
     2786#define YY_DECL int convert_lex (void) 
    27202787#endif /* !YY_DECL */ 
    27212788 
    2722 /* Code executed at the beginning of each rule, after yytext and yyleng 
     2789/* Code executed at the beginning of each rule, after convert_text and convert_leng 
    27232790 * have been set up. 
    27242791 */ 
     
    27432810   register int yy_act; 
    27442811     
    2745 #line 55 "convert.lex" 
    2746  
    2747 #line 751 "convert.yy.c" 
     2812#line 54 "convert.lex" 
     2813 
     2814#line 780 "convert.yy.c" 
    27482815 
    27492816   if ( !(yy_init) ) 
     
    27582825         (yy_start) = 1;   /* first start state */ 
    27592826 
    2760       if ( ! yyin ) 
    2761          yyin = stdin; 
    2762  
    2763       if ( ! yyout ) 
    2764          yyout = stdout; 
     2827      if ( ! convert_in ) 
     2828         convert_in = stdin; 
     2829 
     2830      if ( ! convert_out ) 
     2831         convert_out = stdout; 
    27652832 
    27662833      if ( ! YY_CURRENT_BUFFER ) { 
    2767          yyensure_buffer_stack (); 
     2834         convert_ensure_buffer_stack (); 
    27682835         YY_CURRENT_BUFFER_LVALUE = 
    2769             yy_create_buffer(yyin,YY_BUF_SIZE ); 
     2836            convert__create_buffer(convert_in,YY_BUF_SIZE ); 
    27702837      } 
    27712838 
    2772       yy_load_buffer_state( ); 
     2839      convert__load_buffer_state( ); 
    27732840      } 
    27742841 
     
    27772844      yy_cp = (yy_c_buf_p); 
    27782845 
    2779       /* Support of yytext. */ 
     2846      /* Support of convert_text. */ 
    27802847      *yy_cp = (yy_hold_char); 
    27812848 
     
    27982865            { 
    27992866            yy_current_state = (int) yy_def[yy_current_state]; 
    2800             if ( yy_current_state >= 77 ) 
     2867            if ( yy_current_state >= 84 ) 
    28012868               yy_c = yy_meta[(unsigned int) yy_c]; 
    28022869            } 
     
    28042871         ++yy_cp; 
    28052872         } 
    2806       while ( yy_base[yy_current_state] != 164 ); 
     2873      while ( yy_base[yy_current_state] != 194 ); 
    28072874 
    28082875yy_find_action: 
     
    28302897case 1: 
    28312898YY_RULE_SETUP 
    2832 #line 56 "convert.lex" 
    2833 return TOK_MODULEMAIN; /* name of the module                      */ 
     2899#line 55 "convert.lex" 
     2900{ return TOK_MODULEMAIN; } /* name of the module                      */ 
    28342901   YY_BREAK 
    28352902case 2: 
    28362903YY_RULE_SETUP 
    2837 #line 57 "convert.lex" 
    2838 return TOK_NOTGRIDDEP; /* variable which are not grid dependent   */ 
     2904#line 56 "convert.lex" 
     2905{ return TOK_NOTGRIDDEP; } /* variable which are not grid dependent   */ 
    28392906   YY_BREAK 
    28402907case 3: 
    28412908YY_RULE_SETUP 
    2842 #line 58 "convert.lex" 
    2843 return TOK_USE; 
     2909#line 57 "convert.lex" 
     2910{ return TOK_USE; } 
    28442911   YY_BREAK 
    28452912case 4: 
    28462913YY_RULE_SETUP 
    2847 #line 59 "convert.lex" 
    2848 {} 
     2914#line 58 "convert.lex" 
     2915{ } 
    28492916   YY_BREAK 
    28502917case 5: 
    28512918YY_RULE_SETUP 
    2852 #line 60 "convert.lex" 
    2853 return TOK_SEP; 
     2919#line 59 "convert.lex" 
     2920{ return TOK_SEP; } 
    28542921   YY_BREAK 
    28552922case 6: 
    28562923YY_RULE_SETUP 
    2857 #line 61 "convert.lex" 
    2858 {strcpy(yylval.na,yytext); return TOK_USEITEM;} 
     2924#line 60 "convert.lex" 
     2925{ return TOK_KIND; } 
    28592926   YY_BREAK 
    28602927case 7: 
    28612928YY_RULE_SETUP 
    2862 #line 62 "convert.lex" 
    2863 {strcpy(yylval.na,yytext); return TOK_PROBTYPE;} 
     2929#line 61 "convert.lex" 
     2930{ return TOK_EQUAL; } 
    28642931   YY_BREAK 
    2865 /* dimension of the problem                */ 
    28662932case 8: 
    28672933YY_RULE_SETUP 
    2868 #line 64 "convert.lex" 
    2869 {strcpy(yylval.na,yytext); return TOK_NAME;} 
     2934#line 62 "convert.lex" 
     2935{ strcpy(yylval.na,convert_text); return TOK_USEITEM;  } 
    28702936   YY_BREAK 
    28712937case 9: 
    28722938YY_RULE_SETUP 
    2873 #line 65 "convert.lex" 
    2874 {return (int) *yytext;} 
     2939#line 63 "convert.lex" 
     2940{ strcpy(yylval.na,convert_text); return TOK_PROBTYPE; }  /* dimension of the problem */ 
    28752941   YY_BREAK 
    28762942case 10: 
    2877 /* rule 10 can match eol */ 
    28782943YY_RULE_SETUP 
    2879 #line 66 "convert.lex" 
    2880 {line_num++;return (int) *yytext;} 
     2944#line 64 "convert.lex" 
     2945{ strcpy(yylval.na,convert_text); return TOK_NAME; } 
    28812946   YY_BREAK 
    28822947case 11: 
    28832948YY_RULE_SETUP 
    2884 #line 67 "convert.lex" 
    2885 ; 
     2949#line 65 "convert.lex" 
     2950{ strcpy(yylval.na,convert_text); return TOK_CSTINT; } 
    28862951   YY_BREAK 
    28872952case 12: 
    28882953YY_RULE_SETUP 
     2954#line 66 "convert.lex" 
     2955{ return (int) *convert_text; } 
     2956   YY_BREAK 
     2957case 13: 
     2958/* rule 13 can match eol */ 
     2959YY_RULE_SETUP 
     2960#line 67 "convert.lex" 
     2961{ line_num++; return (int) *convert_text; } 
     2962   YY_BREAK 
     2963case 14: 
     2964YY_RULE_SETUP 
    28892965#line 68 "convert.lex" 
     2966; 
     2967   YY_BREAK 
     2968case 15: 
     2969YY_RULE_SETUP 
     2970#line 69 "convert.lex" 
    28902971ECHO; 
    28912972   YY_BREAK 
    2892 #line 896 "convert.yy.c" 
     2973#line 939 "convert.yy.c" 
    28932974case YY_STATE_EOF(INITIAL): 
    28942975case YY_STATE_EOF(character): 
     
    29082989         /* We're scanning a new file or input source.  It's 
    29092990          * possible that this happened because the user 
    2910           * just pointed yyin at a new source and called 
    2911           * yylex().  If so, then we have to assure 
     2991          * just pointed convert_in at a new source and called 
     2992          * convert_lex().  If so, then we have to assure 
    29122993          * consistency between YY_CURRENT_BUFFER and our 
    29132994          * globals.  Here is the right place to do so, because 
     
    29162997          */ 
    29172998         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 
    2918          YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; 
     2999         YY_CURRENT_BUFFER_LVALUE->yy_input_file = convert_in; 
    29193000         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 
    29203001         } 
     
    29693050            (yy_did_buffer_switch_on_eof) = 0; 
    29703051 
    2971             if ( yywrap( ) ) 
     3052            if ( convert_wrap( ) ) 
    29723053               { 
    29733054               /* Note: because we've taken care in 
    29743055                * yy_get_next_buffer() to have set up 
    2975                 * yytext, we can now set up 
     3056                * convert_text, we can now set up 
    29763057                * yy_c_buf_p so that if some total 
    29773058                * hoser (like flex itself) wants to 
     
    30223103   } /* end of action switch */ 
    30233104      } /* end of scanning one token */ 
    3024 } /* end of yylex */ 
     3105} /* end of convert_lex */ 
    30253106 
    30263107/* yy_get_next_buffer - try to read in a new buffer 
     
    31003181            b->yy_ch_buf = (char *) 
    31013182               /* Include room in for 2 EOB chars. */ 
    3102                yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  ); 
     3183               convert_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  ); 
    31033184            } 
    31043185         else 
     
    31323213         { 
    31333214         ret_val = EOB_ACT_END_OF_FILE; 
    3134          yyrestart(yyin  ); 
     3215         convert_restart(convert_in  ); 
    31353216         } 
    31363217 
     
    31493230      /* Extend the array by 50%, plus the number we really need. */ 
    31503231      yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); 
    3151       YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  ); 
     3232      YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) convert_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size  ); 
    31523233      if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 
    31533234         YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); 
     
    31833264         { 
    31843265         yy_current_state = (int) yy_def[yy_current_state]; 
    3185          if ( yy_current_state >= 77 ) 
     3266         if ( yy_current_state >= 84 ) 
    31863267            yy_c = yy_meta[(unsigned int) yy_c]; 
    31873268         } 
     
    32113292      { 
    32123293      yy_current_state = (int) yy_def[yy_current_state]; 
    3213       if ( yy_current_state >= 77 ) 
     3294      if ( yy_current_state >= 84 ) 
    32143295         yy_c = yy_meta[(unsigned int) yy_c]; 
    32153296      } 
    32163297   yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; 
    3217    yy_is_jam = (yy_current_state == 76); 
     3298   yy_is_jam = (yy_current_state == 83); 
    32183299 
    32193300      return yy_is_jam ? 0 : yy_current_state; 
     
    32263307    yy_cp = (yy_c_buf_p); 
    32273308 
    3228    /* undo effects of setting up yytext */ 
     3309   /* undo effects of setting up convert_text */ 
    32293310   *yy_cp = (yy_hold_char); 
    32303311 
     
    32983379 
    32993380               /* Reset buffer status. */ 
    3300                yyrestart(yyin ); 
     3381               convert_restart(convert_in ); 
    33013382 
    33023383               /*FALLTHROUGH*/ 
     
    33043385            case EOB_ACT_END_OF_FILE: 
    33053386               { 
    3306                if ( yywrap( ) ) 
     3387               if ( convert_wrap( ) ) 
    33073388                  return EOF; 
    33083389 
     
    33243405 
    33253406   c = *(unsigned char *) (yy_c_buf_p);   /* cast for 8-bit char's */ 
    3326    *(yy_c_buf_p) = '\0';   /* preserve yytext */ 
     3407   *(yy_c_buf_p) = '\0';   /* preserve convert_text */ 
    33273408   (yy_hold_char) = *++(yy_c_buf_p); 
    33283409 
     
    33363417 * @note This function does not reset the start condition to @c INITIAL . 
    33373418 */ 
    3338     void yyrestart  (FILE * input_file ) 
     3419    void convert_restart  (FILE * input_file ) 
    33393420{ 
    33403421     
    33413422   if ( ! YY_CURRENT_BUFFER ){ 
    3342         yyensure_buffer_stack (); 
     3423        convert_ensure_buffer_stack (); 
    33433424      YY_CURRENT_BUFFER_LVALUE = 
    3344             yy_create_buffer(yyin,YY_BUF_SIZE ); 
     3425            convert__create_buffer(convert_in,YY_BUF_SIZE ); 
    33453426   } 
    33463427 
    3347    yy_init_buffer(YY_CURRENT_BUFFER,input_file ); 
    3348    yy_load_buffer_state( ); 
     3428   convert__init_buffer(YY_CURRENT_BUFFER,input_file ); 
     3429   convert__load_buffer_state( ); 
    33493430} 
    33503431 
     
    33533434 *  
    33543435 */ 
    3355     void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer ) 
     3436    void convert__switch_to_buffer  (YY_BUFFER_STATE  new_buffer ) 
    33563437{ 
    33573438     
    33583439   /* TODO. We should be able to replace this entire function body 
    33593440    * with 
    3360     *    yypop_buffer_state(); 
    3361     *    yypush_buffer_state(new_buffer); 
     3441    *    convert_pop_buffer_state(); 
     3442    *    convert_push_buffer_state(new_buffer); 
    33623443     */ 
    3363    yyensure_buffer_stack (); 
     3444   convert_ensure_buffer_stack (); 
    33643445   if ( YY_CURRENT_BUFFER == new_buffer ) 
    33653446      return; 
     
    33743455 
    33753456   YY_CURRENT_BUFFER_LVALUE = new_buffer; 
    3376    yy_load_buffer_state( ); 
     3457   convert__load_buffer_state( ); 
    33773458 
    33783459   /* We don't actually know whether we did this switch during 
    3379     * EOF (yywrap()) processing, but the only time this flag 
    3380     * is looked at is after yywrap() is called, so it's safe 
     3460    * EOF (convert_wrap()) processing, but the only time this flag 
     3461    * is looked at is after convert_wrap() is called, so it's safe 
    33813462    * to go ahead and always set it. 
    33823463    */ 
     
    33843465} 
    33853466 
    3386 static void yy_load_buffer_state  (void) 
     3467static void convert__load_buffer_state  (void) 
    33873468{ 
    33883469      (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 
    33893470   (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 
    3390    yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 
     3471   convert_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 
    33913472   (yy_hold_char) = *(yy_c_buf_p); 
    33923473} 
     
    33983479 * @return the allocated buffer state. 
    33993480 */ 
    3400     YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size ) 
     3481    YY_BUFFER_STATE convert__create_buffer  (FILE * file, int  size ) 
    34013482{ 
    34023483   YY_BUFFER_STATE b; 
    34033484     
    3404    b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  ); 
     3485   b = (YY_BUFFER_STATE) convert_alloc(sizeof( struct yy_buffer_state )  ); 
    34053486   if ( ! b ) 
    3406       YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 
     3487      YY_FATAL_ERROR( "out of dynamic memory in convert__create_buffer()" ); 
    34073488 
    34083489   b->yy_buf_size = size; 
     
    34113492    * we need to put in 2 end-of-buffer characters. 
    34123493    */ 
    3413    b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2  ); 
     3494   b->yy_ch_buf = (char *) convert_alloc(b->yy_buf_size + 2  ); 
    34143495   if ( ! b->yy_ch_buf ) 
    3415       YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 
     3496      YY_FATAL_ERROR( "out of dynamic memory in convert__create_buffer()" ); 
    34163497 
    34173498   b->yy_is_our_buffer = 1; 
    34183499 
    3419    yy_init_buffer(b,file ); 
     3500   convert__init_buffer(b,file ); 
    34203501 
    34213502   return b; 
     
    34233504 
    34243505/** Destroy the buffer. 
    3425  * @param b a buffer created with yy_create_buffer() 
     3506 * @param b a buffer created with convert__create_buffer() 
    34263507 *  
    34273508 */ 
    3428     void yy_delete_buffer (YY_BUFFER_STATE  b ) 
     3509    void convert__delete_buffer (YY_BUFFER_STATE  b ) 
    34293510{ 
    34303511     
     
    34363517 
    34373518   if ( b->yy_is_our_buffer ) 
    3438       yyfree((void *) b->yy_ch_buf  ); 
    3439  
    3440    yyfree((void *) b  ); 
     3519      convert_free((void *) b->yy_ch_buf  ); 
     3520 
     3521   convert_free((void *) b  ); 
    34413522} 
    34423523 
    34433524/* Initializes or reinitializes a buffer. 
    34443525 * This function is sometimes called more than once on the same buffer, 
    3445  * such as during a yyrestart() or at EOF. 
     3526 * such as during a convert_restart() or at EOF. 
    34463527 */ 
    3447     static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file ) 
     3528    static void convert__init_buffer  (YY_BUFFER_STATE  b, FILE * file ) 
    34483529 
    34493530{ 
    34503531   int oerrno = errno; 
    34513532     
    3452    yy_flush_buffer(b ); 
     3533   convert__flush_buffer(b ); 
    34533534 
    34543535   b->yy_input_file = file; 
    34553536   b->yy_fill_buffer = 1; 
    34563537 
    3457     /* If b is the current buffer, then yy_init_buffer was _probably_ 
    3458      * called from yyrestart() or through yy_get_next_buffer. 
     3538    /* If b is the current buffer, then convert__init_buffer was _probably_ 
     3539     * called from convert_restart() or through yy_get_next_buffer. 
    34593540     * In that case, we don't want to reset the lineno or column. 
    34603541     */ 
     
    34733554 *  
    34743555 */ 
    3475     void yy_flush_buffer (YY_BUFFER_STATE  b ) 
     3556    void convert__flush_buffer (YY_BUFFER_STATE  b ) 
    34763557{ 
    34773558      if ( ! b ) 
     
    34933574 
    34943575   if ( b == YY_CURRENT_BUFFER ) 
    3495       yy_load_buffer_state( ); 
     3576      convert__load_buffer_state( ); 
    34963577} 
    34973578 
     
    35023583 *   
    35033584 */ 
    3504 void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) 
     3585void convert_push_buffer_state (YY_BUFFER_STATE new_buffer ) 
    35053586{ 
    35063587      if (new_buffer == NULL) 
    35073588      return; 
    35083589 
    3509    yyensure_buffer_stack(); 
    3510  
    3511    /* This block is copied from yy_switch_to_buffer. */ 
     3590   convert_ensure_buffer_stack(); 
     3591 
     3592   /* This block is copied from convert__switch_to_buffer. */ 
    35123593   if ( YY_CURRENT_BUFFER ) 
    35133594      { 
     
    35233604   YY_CURRENT_BUFFER_LVALUE = new_buffer; 
    35243605 
    3525    /* copied from yy_switch_to_buffer. */ 
    3526    yy_load_buffer_state( ); 
     3606   /* copied from convert__switch_to_buffer. */ 
     3607   convert__load_buffer_state( ); 
    35273608   (yy_did_buffer_switch_on_eof) = 1; 
    35283609} 
     
    35323613 *   
    35333614 */ 
    3534 void yypop_buffer_state (void) 
     3615void convert_pop_buffer_state (void) 
    35353616{ 
    35363617      if (!YY_CURRENT_BUFFER) 
    35373618      return; 
    35383619 
    3539    yy_delete_buffer(YY_CURRENT_BUFFER ); 
     3620   convert__delete_buffer(YY_CURRENT_BUFFER ); 
    35403621   YY_CURRENT_BUFFER_LVALUE = NULL; 
    35413622   if ((yy_buffer_stack_top) > 0) 
     
    35433624 
    35443625   if (YY_CURRENT_BUFFER) { 
    3545       yy_load_buffer_state( ); 
     3626      convert__load_buffer_state( ); 
    35463627      (yy_did_buffer_switch_on_eof) = 1; 
    35473628   } 
     
    35513632 *  Guarantees space for at least one push. 
    35523633 */ 
    3553 static void yyensure_buffer_stack (void) 
     3634static void convert_ensure_buffer_stack (void) 
    35543635{ 
    35553636   yy_size_t num_to_alloc; 
     
    35623643         */ 
    35633644      num_to_alloc = 1; 
    3564       (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc 
     3645      (yy_buffer_stack) = (struct yy_buffer_state**)convert_alloc 
    35653646                        (num_to_alloc * sizeof(struct yy_buffer_state*) 
    35663647                        ); 
    35673648      if ( ! (yy_buffer_stack) ) 
    3568          YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 
     3649         YY_FATAL_ERROR( "out of dynamic memory in convert_ensure_buffer_stack()" ); 
    35693650                           
    35703651      memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 
     
    35813662 
    35823663      num_to_alloc = (yy_buffer_stack_max) + grow_size; 
    3583       (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc 
     3664      (yy_buffer_stack) = (struct yy_buffer_state**)convert_realloc 
    35843665                        ((yy_buffer_stack), 
    35853666                        num_to_alloc * sizeof(struct yy_buffer_state*) 
    35863667                        ); 
    35873668      if ( ! (yy_buffer_stack) ) 
    3588          YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); 
     3669         YY_FATAL_ERROR( "out of dynamic memory in convert_ensure_buffer_stack()" ); 
    35893670 
    35903671      /* zero only the new slots.*/ 
     
    36003681 * @return the newly allocated buffer state object.  
    36013682 */ 
    3602 YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size ) 
     3683YY_BUFFER_STATE convert__scan_buffer  (char * base, yy_size_t  size ) 
    36033684{ 
    36043685   YY_BUFFER_STATE b; 
     
    36103691      return 0; 
    36113692 
    3612    b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  ); 
     3693   b = (YY_BUFFER_STATE) convert_alloc(sizeof( struct yy_buffer_state )  ); 
    36133694   if ( ! b ) 
    3614       YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 
     3695      YY_FATAL_ERROR( "out of dynamic memory in convert__scan_buffer()" ); 
    36153696 
    36163697   b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ 
     
    36243705   b->yy_buffer_status = YY_BUFFER_NEW; 
    36253706 
    3626    yy_switch_to_buffer(b  ); 
     3707   convert__switch_to_buffer(b  ); 
    36273708 
    36283709   return b; 
    36293710} 
    36303711 
    3631 /** Setup the input buffer state to scan a string. The next call to yylex() will 
     3712/** Setup the input buffer state to scan a string. The next call to convert_lex() will 
    36323713 * scan from a @e copy of @a str. 
    36333714 * @param yystr a NUL-terminated string to scan 
     
    36353716 * @return the newly allocated buffer state object. 
    36363717 * @note If you want to scan bytes that may contain NUL values, then use 
    3637  *       yy_scan_bytes() instead. 
     3718 *       convert__scan_bytes() instead. 
    36383719 */ 
    3639 YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) 
     3720YY_BUFFER_STATE convert__scan_string (yyconst char * yystr ) 
    36403721{ 
    36413722     
    3642    return yy_scan_bytes(yystr,strlen(yystr) ); 
    3643 } 
    3644  
    3645 /** Setup the input buffer state to scan the given bytes. The next call to yylex() will 
     3723   return convert__scan_bytes(yystr,strlen(yystr) ); 
     3724} 
     3725 
     3726/** Setup the input buffer state to scan the given bytes. The next call to convert_lex() will 
    36463727 * scan from a @e copy of @a bytes. 
    36473728 * @param yybytes the byte buffer to scan 
     
    36503731 * @return the newly allocated buffer state object. 
    36513732 */ 
    3652 YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len ) 
     3733YY_BUFFER_STATE convert__scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len ) 
    36533734{ 
    36543735   YY_BUFFER_STATE b; 
     
    36593740   /* Get memory for full buffer, including space for trailing EOB's. */ 
    36603741   n = _yybytes_len + 2; 
    3661    buf = (char *) yyalloc(n  ); 
     3742   buf = (char *) convert_alloc(n  ); 
    36623743   if ( ! buf ) 
    3663       YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 
     3744      YY_FATAL_ERROR( "out of dynamic memory in convert__scan_bytes()" ); 
    36643745 
    36653746   for ( i = 0; i < _yybytes_len; ++i ) 
     
    36683749   buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; 
    36693750 
    3670    b = yy_scan_buffer(buf,n ); 
     3751   b = convert__scan_buffer(buf,n ); 
    36713752   if ( ! b ) 
    3672       YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 
     3753      YY_FATAL_ERROR( "bad buffer in convert__scan_bytes()" ); 
    36733754 
    36743755   /* It's okay to grow etc. this buffer, and we should throw it 
     
    36963777   do \ 
    36973778      { \ 
    3698       /* Undo effects of setting up yytext. */ \ 
     3779      /* Undo effects of setting up convert_text. */ \ 
    36993780        int yyless_macro_arg = (n); \ 
    37003781        YY_LESS_LINENO(yyless_macro_arg);\ 
    3701       yytext[yyleng] = (yy_hold_char); \ 
    3702       (yy_c_buf_p) = yytext + yyless_macro_arg; \ 
     3782      convert_text[convert_leng] = (yy_hold_char); \ 
     3783      (yy_c_buf_p) = convert_text + yyless_macro_arg; \ 
    37033784      (yy_hold_char) = *(yy_c_buf_p); \ 
    37043785      *(yy_c_buf_p) = '\0'; \ 
    3705       yyleng = yyless_macro_arg; \ 
     3786      convert_leng = yyless_macro_arg; \ 
    37063787      } \ 
    37073788   while ( 0 ) 
     
    37123793 *  
    37133794 */ 
    3714 int yyget_lineno  (void) 
     3795int convert_get_lineno  (void) 
    37153796{ 
    37163797         
    3717     return yylineno; 
     3798    return convert_lineno; 
    37183799} 
    37193800 
     
    37213802 *  
    37223803 */ 
    3723 FILE *yyget_in  (void) 
    3724 { 
    3725         return yyin; 
     3804FILE *convert_get_in  (void) 
     3805{ 
     3806        return convert_in; 
    37263807} 
    37273808 
     
    37293810 *  
    37303811 */ 
    3731 FILE *yyget_out  (void) 
    3732 { 
    3733         return yyout; 
     3812FILE *convert_get_out  (void) 
     3813{ 
     3814        return convert_out; 
    37343815} 
    37353816 
     
    37373818 *  
    37383819 */ 
    3739 yy_size_t yyget_leng  (void) 
    3740 { 
    3741         return yyleng; 
     3820yy_size_t convert_get_leng  (void) 
     3821{ 
     3822        return convert_leng; 
    37423823} 
    37433824 
     
    37463827 */ 
    37473828 
    3748 char *yyget_text  (void) 
    3749 { 
    3750         return yytext; 
     3829char *convert_get_text  (void) 
     3830{ 
     3831        return convert_text; 
    37513832} 
    37523833 
     
    37553836 *  
    37563837 */ 
    3757 void yyset_lineno (int  line_number ) 
     3838void convert_set_lineno (int  line_number ) 
    37583839{ 
    37593840     
    3760     yylineno = line_number; 
     3841    convert_lineno = line_number; 
    37613842} 
    37623843 
     
    37653846 * @param in_str A readable stream. 
    37663847 *  
    3767  * @see yy_switch_to_buffer 
     3848 * @see convert__switch_to_buffer 
    37683849 */ 
    3769 void yyset_in (FILE *  in_str ) 
    3770 { 
    3771         yyin = in_str ; 
    3772 } 
    3773  
    3774 void yyset_out (FILE *  out_str ) 
    3775 { 
    3776         yyout = out_str ; 
    3777 } 
    3778  
    3779 int yyget_debug  (void) 
    3780 { 
    3781         return yy_flex_debug; 
    3782 } 
    3783  
    3784 void yyset_debug (int  bdebug ) 
    3785 { 
    3786         yy_flex_debug = bdebug ; 
     3850void convert_set_in (FILE *  in_str ) 
     3851{ 
     3852        convert_in = in_str ; 
     3853} 
     3854 
     3855void convert_set_out (FILE *  out_str ) 
     3856{ 
     3857        convert_out = out_str ; 
     3858} 
     3859 
     3860int convert_get_debug  (void) 
     3861{ 
     3862        return convert__flex_debug; 
     3863} 
     3864 
     3865void convert_set_debug (int  bdebug ) 
     3866{ 
     3867        convert__flex_debug = bdebug ; 
    37873868} 
    37883869 
     
    37903871{ 
    37913872        /* Initialization is the same as for the non-reentrant scanner. 
    3792      * This function is called from yylex_destroy(), so don't allocate here. 
     3873     * This function is called from convert_lex_destroy(), so don't allocate here. 
    37933874     */ 
    37943875 
     
    38023883/* Defined in main.c */ 
    38033884#ifdef YY_STDINIT 
    3804     yyin = stdin; 
    3805     yyout = stdout; 
     3885    convert_in = stdin; 
     3886    convert_out = stdout; 
    38063887#else 
    3807     yyin = (FILE *) 0; 
    3808     yyout = (FILE *) 0; 
     3888    convert_in = (FILE *) 0; 
     3889    convert_out = (FILE *) 0; 
    38093890#endif 
    38103891 
    38113892    /* For future reference: Set errno on error, since we are called by 
    3812      * yylex_init() 
     3893     * convert_lex_init() 
    38133894     */ 
    38143895    return 0; 
    38153896} 
    38163897 
    3817 /* yylex_destroy is for both reentrant and non-reentrant scanners. */ 
    3818 int yylex_destroy  (void) 
     3898/* convert_lex_destroy is for both reentrant and non-reentrant scanners. */ 
     3899int convert_lex_destroy  (void) 
    38193900{ 
    38203901     
    38213902    /* Pop the buffer stack, destroying each element. */ 
    38223903   while(YY_CURRENT_BUFFER){ 
    3823       yy_delete_buffer(YY_CURRENT_BUFFER  ); 
     3904      convert__delete_buffer(YY_CURRENT_BUFFER  ); 
    38243905      YY_CURRENT_BUFFER_LVALUE = NULL; 
    3825       yypop_buffer_state(); 
     3906      convert_pop_buffer_state(); 
    38263907   } 
    38273908 
    38283909   /* Destroy the stack itself. */ 
    3829    yyfree((yy_buffer_stack) ); 
     3910   convert_free((yy_buffer_stack) ); 
    38303911   (yy_buffer_stack) = NULL; 
    38313912 
    38323913    /* Reset the globals. This is important in a non-reentrant scanner so the next time 
    3833      * yylex() is called, initialization will occur. */ 
     3914     * convert_lex() is called, initialization will occur. */ 
    38343915    yy_init_globals( ); 
    38353916 
     
    38613942#endif 
    38623943 
    3863 void *yyalloc (yy_size_t  size ) 
     3944void *convert_alloc (yy_size_t  size ) 
    38643945{ 
    38653946   return (void *) malloc( size ); 
    38663947} 
    38673948 
    3868 void *yyrealloc  (void * ptr, yy_size_t  size ) 
     3949void *convert_realloc  (void * ptr, yy_size_t  size ) 
    38693950{ 
    38703951   /* The cast to (char *) in the following accommodates both 
     
    38783959} 
    38793960 
    3880 void yyfree (void * ptr ) 
    3881 { 
    3882    free( (char *) ptr );   /* see yyrealloc() for (char *) cast */ 
     3961void convert_free (void * ptr ) 
     3962{ 
     3963   free( (char *) ptr );   /* see convert_realloc() for (char *) cast */ 
    38833964} 
    38843965 
    38853966#define YYTABLES_NAME "yytables" 
    38863967 
    3887 #line 68 "convert.lex" 
    3888  
    3889  
    3890  
    3891  
    3892 int yywrap() 
    3893 { 
    3894 } 
    3895  
    3896  
    3897 yyerror(char *s) 
    3898 { 
    3899 if (!strcasecmp(curfile,mainfile)) 
    3900 { 
    3901    printf("Dans convert %s line %d, fichier %s\n",s,line_num,curfile); 
    3902 } 
    3903 else 
    3904 { 
    3905    printf("Dans convert %s line %d, fichier %s\n",s,line_num,curfile); 
    3906 } 
    3907 exit(0); 
    3908 } 
    3909  
     3968#line 69 "convert.lex" 
     3969 
     3970 
     3971 
Note: See TracChangeset for help on using the changeset viewer.