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 1200 for trunk/AGRIF/LIB/main.c – NEMO

Ignore:
Timestamp:
2008-09-24T15:05:20+02:00 (16 years ago)
Author:
rblod
Message:

Adapt Agrif to the new SBC and correct several bugs for agrif (restart writing and reading), see ticket #133
Note : this fix does not work yet on NEC computerq (sxf90/360)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/AGRIF/LIB/main.c

    r774 r1200  
    195195   listnom *parcours; 
    196196   listvar *newvar; 
     197   int stylegiven = 0; 
     198   int infreegiven ; 
     199   int infixedgiven ; 
     200   int lengthmainfile; 
    197201 
    198202   if (argc < 2) 
     
    201205       printf(" [-comdirin   <directory>] [-comdirout <directory>]\n"); 
    202206       printf(" [-convfile  <FILENAME >] -SubloopScalar -SubloopScalar1 \n"); 
     207       printf(" [-free|-fixed]\n"); 
    203208       exit(0); 
    204209   } 
     
    228233   tmpuselocallist = (listusemodule *)NULL; 
    229234   List_ContainsSubroutine = (listnom *)NULL; 
     235   oldfortranout = (FILE *)NULL; 
    230236 
    231237   strcpy(mainfile,argv[1]); 
     
    291297   value_char_size2 = 0 ; 
    292298   value_char_size3 = 0 ; 
     299   inallocate = 0; 
     300   infixed = 1; 
     301   infree  = 0; 
    293302 
    294303   checkexistcommon=1; 
     
    341350         strcpy(filetoparse,argv[i+1]); 
    342351         i++; 
     352         lengthmainfile = strlen(filetoparse); 
     353         if (!strcasecmp(&filetoparse[lengthmainfile-4],".f90")) 
     354         { 
     355         infixed = 0; 
     356         infree = 1; 
     357         } 
     358         else 
     359         { 
     360         infixed = 1; 
     361         infree = 0; 
     362         } 
    343363      } 
     364      else if (!strcasecmp(argv[i],"-free")) /* file to parse        */ 
     365      { 
     366         stylegiven = 1; 
     367         infreegiven  = 1 ; 
     368         infixedgiven = 0; 
     369      }    
     370      else if (!strcasecmp(argv[i],"-fixed")) /* file to parse        */ 
     371      { 
     372         stylegiven = 1; 
     373         infreegiven  = 0; 
     374         infixedgiven = 1; 
     375      }          
    344376      else if (!strcasecmp(argv[i],"-SubloopScalar")) /* file to parse        */ 
    345377      { 
     
    374406   } 
    375407 
     408   if (stylegiven == 1)  
     409   { 
     410   infree = infreegiven; 
     411   infixed = infixedgiven;    
     412   } 
    376413   Save_Length(nomdir,34); 
    377414   Save_Length(commondirout,35); 
     
    518555   return 0; 
    519556} 
    520 #line 521 "y.tab.c" 
     557#line 558 "y.tab.c" 
    521558/* allocate initial stack or double stack size, up to YYMAXDEPTH */ 
    522559static int yygrowstack(void) 
     
    726763                                 } 
    727764break; 
    728 #line 729 "y.tab.c" 
     765#line 766 "y.tab.c" 
    729766    } 
    730767    yyssp -= yym; 
     
    787824} 
    788825#line 2 "convert.yy.c" 
     826 
     827#line 4 "convert.yy.c" 
     828 
     829#define  YY_INT_ALIGNED short int 
     830 
    789831/* A lexical scanner generated by flex */ 
    790  
    791 /* Scanner skeleton version: 
    792  * $Header: /cvs/root/flex/flex/skel.c,v 1.2 2004/05/07 00:28:17 jkh Exp $ 
    793  */ 
    794832 
    795833#define FLEX_SCANNER 
    796834#define YY_FLEX_MAJOR_VERSION 2 
    797835#define YY_FLEX_MINOR_VERSION 5 
    798  
     836#define YY_FLEX_SUBMINOR_VERSION 33 
     837#if YY_FLEX_SUBMINOR_VERSION > 0 
     838#define FLEX_BETA 
     839#endif 
     840 
     841/* First, we deal with  platform-specific or compiler-specific issues. */ 
     842 
     843/* begin standard C headers. */ 
    799844#include <stdio.h> 
    800  
    801  
    802 /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ 
    803 #ifdef c_plusplus 
    804 #ifndef __cplusplus 
    805 #define __cplusplus 
    806 #endif 
    807 #endif 
    808  
     845#include <string.h> 
     846#include <errno.h> 
     847#include <stdlib.h> 
     848 
     849/* end standard C headers. */ 
     850 
     851/* flex integer type definitions */ 
     852 
     853#ifndef FLEXINT_H 
     854#define FLEXINT_H 
     855 
     856/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ 
     857 
     858#if __STDC_VERSION__ >= 199901L 
     859 
     860/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, 
     861 * if you want the limit (max/min) macros for int types.  
     862 */ 
     863#ifndef __STDC_LIMIT_MACROS 
     864#define __STDC_LIMIT_MACROS 1 
     865#endif 
     866 
     867#include <inttypes.h> 
     868typedef int8_t flex_int8_t; 
     869typedef uint8_t flex_uint8_t; 
     870typedef int16_t flex_int16_t; 
     871typedef uint16_t flex_uint16_t; 
     872typedef int32_t flex_int32_t; 
     873typedef uint32_t flex_uint32_t; 
     874#else 
     875typedef signed char flex_int8_t; 
     876typedef short int flex_int16_t; 
     877typedef int flex_int32_t; 
     878typedef unsigned char flex_uint8_t;  
     879typedef unsigned short int flex_uint16_t; 
     880typedef unsigned int flex_uint32_t; 
     881#endif /* ! C99 */ 
     882 
     883/* Limits of integral types. */ 
     884#ifndef INT8_MIN 
     885#define INT8_MIN               (-128) 
     886#endif 
     887#ifndef INT16_MIN 
     888#define INT16_MIN              (-32767-1) 
     889#endif 
     890#ifndef INT32_MIN 
     891#define INT32_MIN              (-2147483647-1) 
     892#endif 
     893#ifndef INT8_MAX 
     894#define INT8_MAX               (127) 
     895#endif 
     896#ifndef INT16_MAX 
     897#define INT16_MAX              (32767) 
     898#endif 
     899#ifndef INT32_MAX 
     900#define INT32_MAX              (2147483647) 
     901#endif 
     902#ifndef UINT8_MAX 
     903#define UINT8_MAX              (255U) 
     904#endif 
     905#ifndef UINT16_MAX 
     906#define UINT16_MAX             (65535U) 
     907#endif 
     908#ifndef UINT32_MAX 
     909#define UINT32_MAX             (4294967295U) 
     910#endif 
     911 
     912#endif /* ! FLEXINT_H */ 
    809913 
    810914#ifdef __cplusplus 
    811  
    812 #include <stdlib.h> 
    813 #include <unistd.h> 
    814  
    815 /* Use prototypes in function declarations. */ 
    816 #define YY_USE_PROTOS 
    817915 
    818916/* The "const" storage-class-modifier is valid. */ 
     
    823921#if __STDC__ 
    824922 
    825 #define YY_USE_PROTOS 
    826923#define YY_USE_CONST 
    827924 
    828925#endif   /* __STDC__ */ 
    829926#endif   /* ! __cplusplus */ 
    830  
    831 #ifdef __TURBOC__ 
    832  #pragma warn -rch 
    833  #pragma warn -use 
    834 #include <io.h> 
    835 #include <stdlib.h> 
    836 #define YY_USE_CONST 
    837 #define YY_USE_PROTOS 
    838 #endif 
    839927 
    840928#ifdef YY_USE_CONST 
     
    844932#endif 
    845933 
    846  
    847 #ifdef YY_USE_PROTOS 
    848 #define YY_PROTO(proto) proto 
    849 #else 
    850 #define YY_PROTO(proto) () 
    851 #endif 
    852  
    853934/* Returned upon end-of-file. */ 
    854935#define YY_NULL 0 
     
    865946 * definition of BEGIN. 
    866947 */ 
    867 #define BEGIN yy_start = 1 + 2 * 
     948#define BEGIN (yy_start) = 1 + 2 * 
    868949 
    869950/* Translate the current start state into a value that can be later handed 
     
    871952 * compatibility. 
    872953 */ 
    873 #define YY_START ((yy_start - 1) / 2) 
     954#define YY_START (((yy_start) - 1) / 2) 
    874955#define YYSTATE YY_START 
    875956 
     
    878959 
    879960/* Special action meaning "start processing a new file". */ 
    880 #define YY_NEW_FILE yyrestart( yyin ) 
     961#define YY_NEW_FILE yyrestart(yyin ) 
    881962 
    882963#define YY_END_OF_BUFFER_CHAR 0 
    883964 
    884965/* Size of default input buffer. */ 
     966#ifndef YY_BUF_SIZE 
    885967#define YY_BUF_SIZE 16384 
    886  
     968#endif 
     969 
     970/* The state buf must be large enough to hold one state per character in the main buffer. 
     971 */ 
     972#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) 
     973 
     974#ifndef YY_TYPEDEF_YY_BUFFER_STATE 
     975#define YY_TYPEDEF_YY_BUFFER_STATE 
    887976typedef struct yy_buffer_state *YY_BUFFER_STATE; 
     977#endif 
    888978 
    889979extern int yyleng; 
     980 
    890981extern FILE *yyin, *yyout; 
    891982 
     
    894985#define EOB_ACT_LAST_MATCH 2 
    895986 
    896 /* The funky do-while in the following #define is used to turn the definition 
    897  * int a single C statement (which needs a semi-colon terminator).  This 
    898  * avoids problems with code like: 
    899  * 
    900  *    if ( condition_holds ) 
    901  *    yyless( 5 ); 
    902  * else 
    903  *    do_something_else(); 
    904  * 
    905  * Prior to using the do-while the compiler would get upset at the 
    906  * "else" because it interpreted the "if" statement as being all 
    907  * done when it reached the ';' after the yyless() call. 
    908  */ 
    909  
    910 /* Return all but the first 'n' matched characters back to the input stream. */ 
    911  
     987    #define YY_LESS_LINENO(n) 
     988     
     989/* Return all but the first "n" matched characters back to the input stream. */ 
    912990#define yyless(n) \ 
    913991   do \ 
    914992      { \ 
    915993      /* Undo effects of setting up yytext. */ \ 
    916       *yy_cp = yy_hold_char; \ 
     994        int yyless_macro_arg = (n); \ 
     995        YY_LESS_LINENO(yyless_macro_arg);\ 
     996      *yy_cp = (yy_hold_char); \ 
    917997      YY_RESTORE_YY_MORE_OFFSET \ 
    918       yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ 
     998      (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ 
    919999      YY_DO_BEFORE_ACTION; /* set up yytext again */ \ 
    9201000      } \ 
    9211001   while ( 0 ) 
    9221002 
    923 #define unput(c) yyunput( c, yytext_ptr ) 
     1003#define unput(c) yyunput( c, (yytext_ptr) ) 
    9241004 
    9251005/* The following is because we cannot portably get our hands on size_t 
     
    9271007 * flex-generated scanners to compile on their own). 
    9281008 */ 
     1009 
     1010#ifndef YY_TYPEDEF_YY_SIZE_T 
     1011#define YY_TYPEDEF_YY_SIZE_T 
    9291012typedef unsigned int yy_size_t; 
    930  
    931  
     1013#endif 
     1014 
     1015#ifndef YY_STRUCT_YY_BUFFER_STATE 
     1016#define YY_STRUCT_YY_BUFFER_STATE 
    9321017struct yy_buffer_state 
    9331018   { 
     
    9661051   int yy_at_bol; 
    9671052 
     1053    int yy_bs_lineno; /**< The line count. */ 
     1054    int yy_bs_column; /**< The column count. */ 
     1055     
    9681056   /* Whether to try to fill the input buffer when we reach the 
    9691057    * end of it. 
     
    9721060 
    9731061   int yy_buffer_status; 
     1062 
    9741063#define YY_BUFFER_NEW 0 
    9751064#define YY_BUFFER_NORMAL 1 
     
    9851074    */ 
    9861075#define YY_BUFFER_EOF_PENDING 2 
     1076 
    9871077   }; 
    988  
    989 static YY_BUFFER_STATE yy_current_buffer = 0; 
     1078#endif /* !YY_STRUCT_YY_BUFFER_STATE */ 
     1079 
     1080/* Stack of input buffers. */ 
     1081static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ 
     1082static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ 
     1083static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ 
    9901084 
    9911085/* We provide macros for accessing buffer states in case in the 
    9921086 * future we want to put the buffer states in a more general 
    9931087 * "scanner state". 
    994  */ 
    995 #define YY_CURRENT_BUFFER yy_current_buffer 
    996  
     1088 * 
     1089 * Returns the top of the stack, or NULL. 
     1090 */ 
     1091#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ 
     1092                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ 
     1093                          : NULL) 
     1094 
     1095/* Same as previous macro, but useful when we know that the buffer stack is not 
     1096 * NULL or when we need an lvalue. For internal use only. 
     1097 */ 
     1098#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] 
    9971099 
    9981100/* yy_hold_char holds the character lost when yytext is formed. */ 
    9991101static char yy_hold_char; 
    1000  
    10011102static int yy_n_chars;     /* number of characters read into yy_ch_buf */ 
    1002  
    1003  
    10041103int yyleng; 
    10051104 
    10061105/* Points to current character in buffer. */ 
    10071106static char *yy_c_buf_p = (char *) 0; 
    1008 static int yy_init = 1;    /* whether we need to initialize */ 
     1107static int yy_init = 0;    /* whether we need to initialize */ 
    10091108static int yy_start = 0;   /* start state number */ 
    10101109 
     
    10141113static int yy_did_buffer_switch_on_eof; 
    10151114 
    1016 void yyrestart YY_PROTO(( FILE *input_file )); 
    1017  
    1018 void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); 
    1019 void yy_load_buffer_state YY_PROTO(( void )); 
    1020 YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); 
    1021 void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); 
    1022 void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); 
    1023 void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); 
    1024 #define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) 
    1025  
    1026 YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); 
    1027 YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); 
    1028 YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); 
    1029  
    1030 static void *yy_flex_alloc YY_PROTO(( yy_size_t )); 
    1031 static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); 
    1032 static void yy_flex_free YY_PROTO(( void * )); 
     1115void yyrestart (FILE *input_file  ); 
     1116void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  ); 
     1117YY_BUFFER_STATE yy_create_buffer (FILE *file,int size  ); 
     1118void yy_delete_buffer (YY_BUFFER_STATE b  ); 
     1119void yy_flush_buffer (YY_BUFFER_STATE b  ); 
     1120void yypush_buffer_state (YY_BUFFER_STATE new_buffer  ); 
     1121void yypop_buffer_state (void ); 
     1122 
     1123static void yyensure_buffer_stack (void ); 
     1124static void yy_load_buffer_state (void ); 
     1125static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file  ); 
     1126 
     1127#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) 
     1128 
     1129YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size  ); 
     1130YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str  ); 
     1131YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len  ); 
     1132 
     1133void *yyalloc (yy_size_t  ); 
     1134void *yyrealloc (void *,yy_size_t  ); 
     1135void yyfree (void *  ); 
    10331136 
    10341137#define yy_new_buffer yy_create_buffer 
     
    10361139#define yy_set_interactive(is_interactive) \ 
    10371140   { \ 
    1038    if ( ! yy_current_buffer ) \ 
    1039       yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 
    1040    yy_current_buffer->yy_is_interactive = is_interactive; \ 
     1141   if ( ! YY_CURRENT_BUFFER ){ \ 
     1142        yyensure_buffer_stack (); \ 
     1143      YY_CURRENT_BUFFER_LVALUE =    \ 
     1144            yy_create_buffer(yyin,YY_BUF_SIZE ); \ 
     1145   } \ 
     1146   YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ 
    10411147   } 
    10421148 
    10431149#define yy_set_bol(at_bol) \ 
    10441150   { \ 
    1045    if ( ! yy_current_buffer ) \ 
    1046       yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ 
    1047    yy_current_buffer->yy_at_bol = at_bol; \ 
     1151   if ( ! YY_CURRENT_BUFFER ){\ 
     1152        yyensure_buffer_stack (); \ 
     1153      YY_CURRENT_BUFFER_LVALUE =    \ 
     1154            yy_create_buffer(yyin,YY_BUF_SIZE ); \ 
     1155   } \ 
     1156   YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ 
    10481157   } 
    10491158 
    1050 #define YY_AT_BOL() (yy_current_buffer->yy_at_bol) 
     1159#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) 
     1160 
     1161/* Begin user sect3 */ 
    10511162 
    10521163typedef unsigned char YY_CHAR; 
     1164 
    10531165FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; 
     1166 
    10541167typedef int yy_state_type; 
     1168 
     1169extern int yylineno; 
     1170 
     1171int yylineno = 1; 
     1172 
    10551173extern char *yytext; 
    10561174#define yytext_ptr yytext 
    10571175 
    1058 static yy_state_type yy_get_previous_state YY_PROTO(( void )); 
    1059 static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); 
    1060 static int yy_get_next_buffer YY_PROTO(( void )); 
    1061 static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); 
     1176static yy_state_type yy_get_previous_state (void ); 
     1177static yy_state_type yy_try_NUL_trans (yy_state_type current_state  ); 
     1178static int yy_get_next_buffer (void ); 
     1179static void yy_fatal_error (yyconst char msg[]  ); 
    10621180 
    10631181/* Done after the current pattern has been matched and before the 
     
    10651183 */ 
    10661184#define YY_DO_BEFORE_ACTION \ 
    1067    yytext_ptr = yy_bp; \ 
    1068    yyleng = (int) (yy_cp - yy_bp); \ 
    1069    yy_hold_char = *yy_cp; \ 
     1185   (yytext_ptr) = yy_bp; \ 
     1186   yyleng = (size_t) (yy_cp - yy_bp); \ 
     1187   (yy_hold_char) = *yy_cp; \ 
    10701188   *yy_cp = '\0'; \ 
    1071    yy_c_buf_p = yy_cp; 
     1189   (yy_c_buf_p) = yy_cp; 
    10721190 
    10731191#define YY_NUM_RULES 12 
    10741192#define YY_END_OF_BUFFER 13 
    1075 static yyconst short int yy_accept[74] = 
     1193/* This struct is not used in this scanner, 
     1194   but its presence is necessary. */ 
     1195struct yy_trans_info 
     1196   { 
     1197   flex_int32_t yy_verify; 
     1198   flex_int32_t yy_nxt; 
     1199   }; 
     1200static yyconst flex_int16_t yy_accept[74] = 
    10761201    {   0, 
    10771202        0,    0,    0,    0,   13,   12,   11,   10,   12,    9, 
     
    10851210    } ; 
    10861211 
    1087 static yyconst int yy_ec[256] = 
     1212static yyconst flex_int32_t yy_ec[256] = 
    10881213    {   0, 
    10891214        1,    1,    1,    1,    1,    1,    1,    1,    2,    3, 
     
    11171242    } ; 
    11181243 
    1119 static yyconst int yy_meta[36] = 
     1244static yyconst flex_int32_t yy_meta[36] = 
    11201245    {   0, 
    11211246        1,    1,    2,    1,    1,    1,    1,    3,    3,    3, 
     
    11251250    } ; 
    11261251 
    1127 static yyconst short int yy_base[76] = 
     1252static yyconst flex_int16_t yy_base[76] = 
    11281253    {   0, 
    11291254        0,    0,    0,    0,   96,   97,   93,   97,   90,   97, 
     
    11371262    } ; 
    11381263 
    1139 static yyconst short int yy_def[76] = 
     1264static yyconst flex_int16_t yy_def[76] = 
    11401265    {   0, 
    11411266       73,    1,    1,    1,   73,   73,   73,   73,   74,   73, 
     
    11491274    } ; 
    11501275 
    1151 static yyconst short int yy_nxt[133] = 
     1276static yyconst flex_int16_t yy_nxt[133] = 
    11521277    {   0, 
    11531278        6,    7,    8,    9,   10,   10,   10,    6,   11,   12, 
     
    11681293    } ; 
    11691294 
    1170 static yyconst short int yy_chk[133] = 
     1295static yyconst flex_int16_t yy_chk[133] = 
    11711296    {   0, 
    11721297        1,    1,    1,    1,    1,    1,    1,    1,    1,    1, 
     
    11901315static char *yy_last_accepting_cpos; 
    11911316 
     1317extern int yy_flex_debug; 
     1318int yy_flex_debug = 0; 
     1319 
    11921320/* The intent behind this definition is that it'll catch 
    11931321 * any uses of REJECT which flex missed. 
     
    11991327char *yytext; 
    12001328#line 1 "convert.lex" 
    1201 #define INITIAL 0 
    12021329/******************************************************************************/ 
    12031330/*                                                                            */ 
     
    12341361/* version 1.7                                                                */ 
    12351362/******************************************************************************/ 
    1236 #define character 1 
    12371363 
    12381364#line 37 "convert.lex" 
     
    12441370#define MAX_INCLUDE_DEPTH 30 
    12451371YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; 
    1246 #line 460 "convert.yy.c" 
     1372#line 549 "convert.yy.c" 
     1373 
     1374#define INITIAL 0 
     1375#define character 1 
     1376 
     1377#ifndef YY_NO_UNISTD_H 
     1378/* Special case for "unistd.h", since it is non-ANSI. We include it way 
     1379 * down here because we want the user's section 1 to have been scanned first. 
     1380 * The user has a chance to override it with an option. 
     1381 */ 
     1382#include <unistd.h> 
     1383#endif 
     1384 
     1385#ifndef YY_EXTRA_TYPE 
     1386#define YY_EXTRA_TYPE void * 
     1387#endif 
     1388 
     1389static int yy_init_globals (void ); 
    12471390 
    12481391/* Macros after this point can all be overridden by user definitions in 
     
    12521395#ifndef YY_SKIP_YYWRAP 
    12531396#ifdef __cplusplus 
    1254 extern "C" int yywrap YY_PROTO(( void )); 
     1397extern "C" int yywrap (void ); 
    12551398#else 
    1256 extern int yywrap YY_PROTO(( void )); 
    1257 #endif 
    1258 #endif 
    1259  
    1260 #ifndef YY_NO_UNPUT 
    1261 static void yyunput YY_PROTO(( int c, char *buf_ptr )); 
    1262 #endif 
    1263  
     1399extern int yywrap (void ); 
     1400#endif 
     1401#endif 
     1402 
     1403    static void yyunput (int c,char *buf_ptr  ); 
     1404     
    12641405#ifndef yytext_ptr 
    1265 static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); 
     1406static void yy_flex_strncpy (char *,yyconst char *,int ); 
    12661407#endif 
    12671408 
    12681409#ifdef YY_NEED_STRLEN 
    1269 static int yy_flex_strlen YY_PROTO(( yyconst char * )); 
     1410static int yy_flex_strlen (yyconst char * ); 
    12701411#endif 
    12711412 
    12721413#ifndef YY_NO_INPUT 
     1414 
    12731415#ifdef __cplusplus 
    1274 static int yyinput YY_PROTO(( void )); 
     1416static int yyinput (void ); 
    12751417#else 
    1276 static int input YY_PROTO(( void )); 
    1277 #endif 
    1278 #endif 
    1279  
    1280 #if YY_STACK_USED 
    1281 static int yy_start_stack_ptr = 0; 
    1282 static int yy_start_stack_depth = 0; 
    1283 static int *yy_start_stack = 0; 
    1284 #ifndef YY_NO_PUSH_STATE 
    1285 static void yy_push_state YY_PROTO(( int new_state )); 
    1286 #endif 
    1287 #ifndef YY_NO_POP_STATE 
    1288 static void yy_pop_state YY_PROTO(( void )); 
    1289 #endif 
    1290 #ifndef YY_NO_TOP_STATE 
    1291 static int yy_top_state YY_PROTO(( void )); 
    1292 #endif 
    1293  
    1294 #else 
    1295 #define YY_NO_PUSH_STATE 1 
    1296 #define YY_NO_POP_STATE 1 
    1297 #define YY_NO_TOP_STATE 1 
    1298 #endif 
    1299  
    1300 #ifdef YY_MALLOC_DECL 
    1301 YY_MALLOC_DECL 
    1302 #else 
    1303 #if __STDC__ 
    1304 #ifndef __cplusplus 
    1305 #include <stdlib.h> 
    1306 #endif 
    1307 #else 
    1308 /* Just try to get by without declaring the routines.  This will fail 
    1309  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) 
    1310  * or sizeof(void*) != sizeof(int). 
    1311  */ 
    1312 #endif 
     1418static int input (void ); 
     1419#endif 
     1420 
    13131421#endif 
    13141422 
     
    13191427 
    13201428/* Copy whatever the last rule matched to the standard output. */ 
    1321  
    13221429#ifndef ECHO 
    13231430/* This used to be an fputs(), but since the string might contain NUL's, 
     
    13321439#ifndef YY_INPUT 
    13331440#define YY_INPUT(buf,result,max_size) \ 
    1334    if ( yy_current_buffer->yy_is_interactive ) \ 
     1441   if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ 
    13351442      { \ 
    1336       int c = '*', n; \ 
     1443      int c = '*'; \ 
     1444      size_t n; \ 
    13371445      for ( n = 0; n < max_size && \ 
    13381446              (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ 
     
    13441452      result = n; \ 
    13451453      } \ 
    1346    else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ 
    1347         && ferror( yyin ) ) \ 
    1348       YY_FATAL_ERROR( "input in flex scanner failed" ); 
     1454   else \ 
     1455      { \ 
     1456      errno=0; \ 
     1457      while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ 
     1458         { \ 
     1459         if( errno != EINTR) \ 
     1460            { \ 
     1461            YY_FATAL_ERROR( "input in flex scanner failed" ); \ 
     1462            break; \ 
     1463            } \ 
     1464         errno=0; \ 
     1465         clearerr(yyin); \ 
     1466         } \ 
     1467      }\ 
     1468\ 
     1469 
    13491470#endif 
    13501471 
     
    13671488#endif 
    13681489 
     1490/* end tables serialization structures and prototypes */ 
     1491 
    13691492/* Default declaration of generated scanner - a define so the user can 
    13701493 * easily add parameters. 
    13711494 */ 
    13721495#ifndef YY_DECL 
    1373 #define YY_DECL int yylex YY_PROTO(( void )) 
    1374 #endif 
     1496#define YY_DECL_IS_OURS 1 
     1497 
     1498extern int yylex (void); 
     1499 
     1500#define YY_DECL int yylex (void) 
     1501#endif /* !YY_DECL */ 
    13751502 
    13761503/* Code executed at the beginning of each rule, after yytext and yyleng 
     
    13891516   YY_USER_ACTION 
    13901517 
     1518/** The main scanner function which does all the work. 
     1519 */ 
    13911520YY_DECL 
    1392    { 
     1521{ 
    13931522   register yy_state_type yy_current_state; 
    13941523   register char *yy_cp, *yy_bp; 
    13951524   register int yy_act; 
    1396  
     1525     
    13971526#line 55 "convert.lex" 
    13981527 
    1399 #line 613 "convert.yy.c" 
    1400  
    1401    if ( yy_init ) 
     1528#line 705 "convert.yy.c" 
     1529 
     1530   if ( !(yy_init) ) 
    14021531      { 
    1403       yy_init = 0; 
     1532      (yy_init) = 1; 
    14041533 
    14051534#ifdef YY_USER_INIT 
     
    14071536#endif 
    14081537 
    1409       if ( ! yy_start ) 
    1410          yy_start = 1;  /* first start state */ 
     1538      if ( ! (yy_start) ) 
     1539         (yy_start) = 1;   /* first start state */ 
    14111540 
    14121541      if ( ! yyin ) 
     
    14161545         yyout = stdout; 
    14171546 
    1418       if ( ! yy_current_buffer ) 
    1419          yy_current_buffer = 
    1420             yy_create_buffer( yyin, YY_BUF_SIZE ); 
    1421  
    1422       yy_load_buffer_state(); 
     1547      if ( ! YY_CURRENT_BUFFER ) { 
     1548         yyensure_buffer_stack (); 
     1549         YY_CURRENT_BUFFER_LVALUE = 
     1550            yy_create_buffer(yyin,YY_BUF_SIZE ); 
     1551      } 
     1552 
     1553      yy_load_buffer_state( ); 
    14231554      } 
    14241555 
    14251556   while ( 1 )    /* loops until end-of-file is reached */ 
    14261557      { 
    1427       yy_cp = yy_c_buf_p; 
     1558      yy_cp = (yy_c_buf_p); 
    14281559 
    14291560      /* Support of yytext. */ 
    1430       *yy_cp = yy_hold_char; 
     1561      *yy_cp = (yy_hold_char); 
    14311562 
    14321563      /* yy_bp points to the position in yy_ch_buf of the start of 
     
    14351566      yy_bp = yy_cp; 
    14361567 
    1437       yy_current_state = yy_start; 
     1568      yy_current_state = (yy_start); 
    14381569yy_match: 
    14391570      do 
     
    14421573         if ( yy_accept[yy_current_state] ) 
    14431574            { 
    1444             yy_last_accepting_state = yy_current_state; 
    1445             yy_last_accepting_cpos = yy_cp; 
     1575            (yy_last_accepting_state) = yy_current_state; 
     1576            (yy_last_accepting_cpos) = yy_cp; 
    14461577            } 
    14471578         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 
     
    14601591      if ( yy_act == 0 ) 
    14611592         { /* have to back up */ 
    1462          yy_cp = yy_last_accepting_cpos; 
    1463          yy_current_state = yy_last_accepting_state; 
     1593         yy_cp = (yy_last_accepting_cpos); 
     1594         yy_current_state = (yy_last_accepting_state); 
    14641595         yy_act = yy_accept[yy_current_state]; 
    14651596         } 
     
    14671598      YY_DO_BEFORE_ACTION; 
    14681599 
    1469  
    14701600do_action:  /* This label is used only to access EOF actions. */ 
    1471  
    14721601 
    14731602      switch ( yy_act ) 
     
    14751604         case 0: /* must back up */ 
    14761605         /* undo the effects of YY_DO_BEFORE_ACTION */ 
    1477          *yy_cp = yy_hold_char; 
    1478          yy_cp = yy_last_accepting_cpos; 
    1479          yy_current_state = yy_last_accepting_state; 
     1606         *yy_cp = (yy_hold_char); 
     1607         yy_cp = (yy_last_accepting_cpos); 
     1608         yy_current_state = (yy_last_accepting_state); 
    14801609         goto yy_find_action; 
    14811610 
     
    15271656   YY_BREAK 
    15281657case 10: 
     1658/* rule 10 can match eol */ 
    15291659YY_RULE_SETUP 
    15301660#line 66 "convert.lex" 
     
    15411671ECHO; 
    15421672   YY_BREAK 
    1543 #line 757 "convert.yy.c" 
     1673#line 850 "convert.yy.c" 
    15441674case YY_STATE_EOF(INITIAL): 
    15451675case YY_STATE_EOF(character): 
     
    15491679      { 
    15501680      /* Amount of text matched not including the EOB char. */ 
    1551       int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; 
     1681      int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; 
    15521682 
    15531683      /* Undo the effects of YY_DO_BEFORE_ACTION. */ 
    1554       *yy_cp = yy_hold_char; 
     1684      *yy_cp = (yy_hold_char); 
    15551685      YY_RESTORE_YY_MORE_OFFSET 
    15561686 
    1557       if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) 
     1687      if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) 
    15581688         { 
    15591689         /* We're scanning a new file or input source.  It's 
     
    15611691          * just pointed yyin at a new source and called 
    15621692          * yylex().  If so, then we have to assure 
    1563           * consistency between yy_current_buffer and our 
     1693          * consistency between YY_CURRENT_BUFFER and our 
    15641694          * globals.  Here is the right place to do so, because 
    15651695          * this is the first action (other than possibly a 
    15661696          * back-up) that will match for the new input source. 
    15671697          */ 
    1568          yy_n_chars = yy_current_buffer->yy_n_chars; 
    1569          yy_current_buffer->yy_input_file = yyin; 
    1570          yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; 
     1698         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 
     1699         YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; 
     1700         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; 
    15711701         } 
    15721702 
     
    15781708       * in input(). 
    15791709       */ 
    1580       if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 
     1710      if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 
    15811711         { /* This was really a NUL. */ 
    15821712         yy_state_type yy_next_state; 
    15831713 
    1584          yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; 
    1585  
    1586          yy_current_state = yy_get_previous_state(); 
     1714         (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; 
     1715 
     1716         yy_current_state = yy_get_previous_state(  ); 
    15871717 
    15881718         /* Okay, we're now positioned to make the NUL 
     
    15971727         yy_next_state = yy_try_NUL_trans( yy_current_state ); 
    15981728 
    1599          yy_bp = yytext_ptr + YY_MORE_ADJ; 
     1729         yy_bp = (yytext_ptr) + YY_MORE_ADJ; 
    16001730 
    16011731         if ( yy_next_state ) 
    16021732            { 
    16031733            /* Consume the NUL. */ 
    1604             yy_cp = ++yy_c_buf_p; 
     1734            yy_cp = ++(yy_c_buf_p); 
    16051735            yy_current_state = yy_next_state; 
    16061736            goto yy_match; 
     
    16091739         else 
    16101740            { 
    1611             yy_cp = yy_c_buf_p; 
     1741            yy_cp = (yy_c_buf_p); 
    16121742            goto yy_find_action; 
    16131743            } 
    16141744         } 
    16151745 
    1616       else switch ( yy_get_next_buffer() ) 
     1746      else switch ( yy_get_next_buffer(  ) ) 
    16171747         { 
    16181748         case EOB_ACT_END_OF_FILE: 
    16191749            { 
    1620             yy_did_buffer_switch_on_eof = 0; 
    1621  
    1622             if ( yywrap() ) 
     1750            (yy_did_buffer_switch_on_eof) = 0; 
     1751 
     1752            if ( yywrap( ) ) 
    16231753               { 
    16241754               /* Note: because we've taken care in 
     
    16311761                * YY_NULL will get returned. 
    16321762                */ 
    1633                yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; 
     1763               (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; 
    16341764 
    16351765               yy_act = YY_STATE_EOF(YY_START); 
     
    16391769            else 
    16401770               { 
    1641                if ( ! yy_did_buffer_switch_on_eof ) 
     1771               if ( ! (yy_did_buffer_switch_on_eof) ) 
    16421772                  YY_NEW_FILE; 
    16431773               } 
     
    16461776 
    16471777         case EOB_ACT_CONTINUE_SCAN: 
    1648             yy_c_buf_p = 
    1649                yytext_ptr + yy_amount_of_matched_text; 
    1650  
    1651             yy_current_state = yy_get_previous_state(); 
    1652  
    1653             yy_cp = yy_c_buf_p; 
    1654             yy_bp = yytext_ptr + YY_MORE_ADJ; 
     1778            (yy_c_buf_p) = 
     1779               (yytext_ptr) + yy_amount_of_matched_text; 
     1780 
     1781            yy_current_state = yy_get_previous_state(  ); 
     1782 
     1783            yy_cp = (yy_c_buf_p); 
     1784            yy_bp = (yytext_ptr) + YY_MORE_ADJ; 
    16551785            goto yy_match; 
    16561786 
    16571787         case EOB_ACT_LAST_MATCH: 
    1658             yy_c_buf_p = 
    1659             &yy_current_buffer->yy_ch_buf[yy_n_chars]; 
    1660  
    1661             yy_current_state = yy_get_previous_state(); 
    1662  
    1663             yy_cp = yy_c_buf_p; 
    1664             yy_bp = yytext_ptr + YY_MORE_ADJ; 
     1788            (yy_c_buf_p) = 
     1789            &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; 
     1790 
     1791            yy_current_state = yy_get_previous_state(  ); 
     1792 
     1793            yy_cp = (yy_c_buf_p); 
     1794            yy_bp = (yytext_ptr) + YY_MORE_ADJ; 
    16651795            goto yy_find_action; 
    16661796         } 
     
    16731803   } /* end of action switch */ 
    16741804      } /* end of scanning one token */ 
    1675    } /* end of yylex */ 
    1676  
     1805} /* end of yylex */ 
    16771806 
    16781807/* yy_get_next_buffer - try to read in a new buffer 
     
    16831812 * EOB_ACT_END_OF_FILE - end of file 
    16841813 */ 
    1685  
    1686 static int yy_get_next_buffer() 
    1687    { 
    1688    register char *dest = yy_current_buffer->yy_ch_buf; 
    1689    register char *source = yytext_ptr; 
     1814static int yy_get_next_buffer (void) 
     1815{ 
     1816      register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; 
     1817   register char *source = (yytext_ptr); 
    16901818   register int number_to_move, i; 
    16911819   int ret_val; 
    16921820 
    1693    if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) 
     1821   if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) 
    16941822      YY_FATAL_ERROR( 
    16951823      "fatal flex scanner internal error--end of buffer missed" ); 
    16961824 
    1697    if ( yy_current_buffer->yy_fill_buffer == 0 ) 
     1825   if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) 
    16981826      { /* Don't try to fill the buffer, so this is an EOF. */ 
    1699       if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) 
     1827      if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) 
    17001828         { 
    17011829         /* We matched a single character, the EOB, so 
     
    17171845 
    17181846   /* First move last chars to start of buffer. */ 
    1719    number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; 
     1847   number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; 
    17201848 
    17211849   for ( i = 0; i < number_to_move; ++i ) 
    17221850      *(dest++) = *(source++); 
    17231851 
    1724    if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 
     1852   if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) 
    17251853      /* don't do the read, it's not guaranteed to return an EOF, 
    17261854       * just force an EOF 
    17271855       */ 
    1728       yy_current_buffer->yy_n_chars = yy_n_chars = 0; 
     1856      YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; 
    17291857 
    17301858   else 
    17311859      { 
    1732       int num_to_read = 
    1733          yy_current_buffer->yy_buf_size - number_to_move - 1; 
     1860         int num_to_read = 
     1861         YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; 
    17341862 
    17351863      while ( num_to_read <= 0 ) 
    17361864         { /* Not enough room in the buffer - grow it. */ 
    1737 #ifdef YY_USES_REJECT 
    1738          YY_FATAL_ERROR( 
    1739 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); 
    1740 #else 
    17411865 
    17421866         /* just a shorter name for the current buffer */ 
    1743          YY_BUFFER_STATE b = yy_current_buffer; 
     1867         YY_BUFFER_STATE b = YY_CURRENT_BUFFER; 
    17441868 
    17451869         int yy_c_buf_p_offset = 
    1746             (int) (yy_c_buf_p - b->yy_ch_buf); 
     1870            (int) ((yy_c_buf_p) - b->yy_ch_buf); 
    17471871 
    17481872         if ( b->yy_is_our_buffer ) 
     
    17571881            b->yy_ch_buf = (char *) 
    17581882               /* Include room in for 2 EOB chars. */ 
    1759                yy_flex_realloc( (void *) b->yy_ch_buf, 
    1760                       b->yy_buf_size + 2 ); 
     1883               yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2  ); 
    17611884            } 
    17621885         else 
     
    17681891            "fatal error - scanner input buffer overflow" ); 
    17691892 
    1770          yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; 
    1771  
    1772          num_to_read = yy_current_buffer->yy_buf_size - 
     1893         (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; 
     1894 
     1895         num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - 
    17731896                  number_to_move - 1; 
    1774 #endif 
     1897 
    17751898         } 
    17761899 
     
    17791902 
    17801903      /* Read in more data. */ 
    1781       YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), 
    1782          yy_n_chars, num_to_read ); 
    1783  
    1784       yy_current_buffer->yy_n_chars = yy_n_chars; 
     1904      YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), 
     1905         (yy_n_chars), num_to_read ); 
     1906 
     1907      YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 
    17851908      } 
    17861909 
    1787    if ( yy_n_chars == 0 ) 
     1910   if ( (yy_n_chars) == 0 ) 
    17881911      { 
    17891912      if ( number_to_move == YY_MORE_ADJ ) 
    17901913         { 
    17911914         ret_val = EOB_ACT_END_OF_FILE; 
    1792          yyrestart( yyin ); 
     1915         yyrestart(yyin ); 
    17931916         } 
    17941917 
     
    17961919         { 
    17971920         ret_val = EOB_ACT_LAST_MATCH; 
    1798          yy_current_buffer->yy_buffer_status = 
     1921         YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = 
    17991922            YY_BUFFER_EOF_PENDING; 
    18001923         } 
     
    18041927      ret_val = EOB_ACT_CONTINUE_SCAN; 
    18051928 
    1806    yy_n_chars += number_to_move; 
    1807    yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; 
    1808    yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; 
    1809  
    1810    yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; 
     1929   (yy_n_chars) += number_to_move; 
     1930   YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; 
     1931   YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; 
     1932 
     1933   (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; 
    18111934 
    18121935   return ret_val; 
    1813    } 
    1814  
     1936} 
    18151937 
    18161938/* yy_get_previous_state - get the state just before the EOB char was reached */ 
    18171939 
    1818 static yy_state_type yy_get_previous_state() 
    1819    { 
     1940    static yy_state_type yy_get_previous_state (void) 
     1941{ 
    18201942   register yy_state_type yy_current_state; 
    18211943   register char *yy_cp; 
    1822  
    1823    yy_current_state = yy_start; 
    1824  
    1825    for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) 
     1944     
     1945   yy_current_state = (yy_start); 
     1946 
     1947   for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) 
    18261948      { 
    18271949      register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); 
    18281950      if ( yy_accept[yy_current_state] ) 
    18291951         { 
    1830          yy_last_accepting_state = yy_current_state; 
    1831          yy_last_accepting_cpos = yy_cp; 
     1952         (yy_last_accepting_state) = yy_current_state; 
     1953         (yy_last_accepting_cpos) = yy_cp; 
    18321954         } 
    18331955      while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 
     
    18411963 
    18421964   return yy_current_state; 
    1843    } 
    1844  
     1965} 
    18451966 
    18461967/* yy_try_NUL_trans - try to make a transition on the NUL character 
     
    18491970 * next_state = yy_try_NUL_trans( current_state ); 
    18501971 */ 
    1851  
    1852 #ifdef YY_USE_PROTOS 
    1853 static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) 
    1854 #else 
    1855 static yy_state_type yy_try_NUL_trans( yy_current_state ) 
    1856 yy_state_type yy_current_state; 
    1857 #endif 
    1858    { 
     1972    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state ) 
     1973{ 
    18591974   register int yy_is_jam; 
    1860    register char *yy_cp = yy_c_buf_p; 
     1975      register char *yy_cp = (yy_c_buf_p); 
    18611976 
    18621977   register YY_CHAR yy_c = 1; 
    18631978   if ( yy_accept[yy_current_state] ) 
    18641979      { 
    1865       yy_last_accepting_state = yy_current_state; 
    1866       yy_last_accepting_cpos = yy_cp; 
     1980      (yy_last_accepting_state) = yy_current_state; 
     1981      (yy_last_accepting_cpos) = yy_cp; 
    18671982      } 
    18681983   while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) 
     
    18761991 
    18771992   return yy_is_jam ? 0 : yy_current_state; 
    1878    } 
    1879  
    1880  
    1881 #ifndef YY_NO_UNPUT 
    1882 #ifdef YY_USE_PROTOS 
    1883 static void yyunput( int c, register char *yy_bp ) 
    1884 #else 
    1885 static void yyunput( c, yy_bp ) 
    1886 int c; 
    1887 register char *yy_bp; 
    1888 #endif 
    1889    { 
    1890    register char *yy_cp = yy_c_buf_p; 
     1993} 
     1994 
     1995    static void yyunput (int c, register char * yy_bp ) 
     1996{ 
     1997   register char *yy_cp; 
     1998     
     1999    yy_cp = (yy_c_buf_p); 
    18912000 
    18922001   /* undo effects of setting up yytext */ 
    1893    *yy_cp = yy_hold_char; 
    1894  
    1895    if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 
     2002   *yy_cp = (yy_hold_char); 
     2003 
     2004   if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 
    18962005      { /* need to shift things up to make room */ 
    18972006      /* +2 for EOB chars. */ 
    1898       register int number_to_move = yy_n_chars + 2; 
    1899       register char *dest = &yy_current_buffer->yy_ch_buf[ 
    1900                yy_current_buffer->yy_buf_size + 2]; 
     2007      register int number_to_move = (yy_n_chars) + 2; 
     2008      register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ 
     2009               YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; 
    19012010      register char *source = 
    1902             &yy_current_buffer->yy_ch_buf[number_to_move]; 
    1903  
    1904       while ( source > yy_current_buffer->yy_ch_buf ) 
     2011            &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; 
     2012 
     2013      while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) 
    19052014         *--dest = *--source; 
    19062015 
    19072016      yy_cp += (int) (dest - source); 
    19082017      yy_bp += (int) (dest - source); 
    1909       yy_current_buffer->yy_n_chars = 
    1910          yy_n_chars = yy_current_buffer->yy_buf_size; 
    1911  
    1912       if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) 
     2018      YY_CURRENT_BUFFER_LVALUE->yy_n_chars = 
     2019         (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; 
     2020 
     2021      if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) 
    19132022         YY_FATAL_ERROR( "flex scanner push-back overflow" ); 
    19142023      } 
     
    19162025   *--yy_cp = (char) c; 
    19172026 
    1918  
    1919    yytext_ptr = yy_bp; 
    1920    yy_hold_char = *yy_cp; 
    1921    yy_c_buf_p = yy_cp; 
    1922    } 
    1923 #endif   /* ifndef YY_NO_UNPUT */ 
    1924  
    1925  
     2027   (yytext_ptr) = yy_bp; 
     2028   (yy_hold_char) = *yy_cp; 
     2029   (yy_c_buf_p) = yy_cp; 
     2030} 
     2031 
     2032#ifndef YY_NO_INPUT 
    19262033#ifdef __cplusplus 
    1927 static int yyinput() 
     2034    static int yyinput (void) 
    19282035#else 
    1929 static int input() 
    1930 #endif 
    1931    { 
     2036    static int input  (void) 
     2037#endif 
     2038 
     2039{ 
    19322040   int c; 
    1933  
    1934    *yy_c_buf_p = yy_hold_char; 
    1935  
    1936    if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) 
     2041     
     2042   *(yy_c_buf_p) = (yy_hold_char); 
     2043 
     2044   if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) 
    19372045      { 
    19382046      /* yy_c_buf_p now points to the character we want to return. 
     
    19402048       * valid NUL; if not, then we've hit the end of the buffer. 
    19412049       */ 
    1942       if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) 
     2050      if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) 
    19432051         /* This was really a NUL. */ 
    1944          *yy_c_buf_p = '\0'; 
     2052         *(yy_c_buf_p) = '\0'; 
    19452053 
    19462054      else 
    19472055         { /* need more input */ 
    1948          int offset = yy_c_buf_p - yytext_ptr; 
    1949          ++yy_c_buf_p; 
    1950  
    1951          switch ( yy_get_next_buffer() ) 
     2056         int offset = (yy_c_buf_p) - (yytext_ptr); 
     2057         ++(yy_c_buf_p); 
     2058 
     2059         switch ( yy_get_next_buffer(  ) ) 
    19522060            { 
    19532061            case EOB_ACT_LAST_MATCH: 
     
    19632071 
    19642072               /* Reset buffer status. */ 
    1965                yyrestart( yyin ); 
    1966  
    1967                /* fall through */ 
     2073               yyrestart(yyin ); 
     2074 
     2075               /*FALLTHROUGH*/ 
    19682076 
    19692077            case EOB_ACT_END_OF_FILE: 
    19702078               { 
    1971                if ( yywrap() ) 
    1972                   return EOF; 
    1973  
    1974                if ( ! yy_did_buffer_switch_on_eof ) 
     2079               if ( yywrap( ) ) 
     2080                  return 0; 
     2081 
     2082               if ( ! (yy_did_buffer_switch_on_eof) ) 
    19752083                  YY_NEW_FILE; 
    19762084#ifdef __cplusplus 
     
    19822090 
    19832091            case EOB_ACT_CONTINUE_SCAN: 
    1984                yy_c_buf_p = yytext_ptr + offset; 
     2092               (yy_c_buf_p) = (yytext_ptr) + offset; 
    19852093               break; 
    19862094            } 
     
    19882096      } 
    19892097 
    1990    c = *(unsigned char *) yy_c_buf_p;  /* cast for 8-bit char's */ 
    1991    *yy_c_buf_p = '\0';  /* preserve yytext */ 
    1992    yy_hold_char = *++yy_c_buf_p; 
    1993  
     2098   c = *(unsigned char *) (yy_c_buf_p);   /* cast for 8-bit char's */ 
     2099   *(yy_c_buf_p) = '\0';   /* preserve yytext */ 
     2100   (yy_hold_char) = *++(yy_c_buf_p); 
    19942101 
    19952102   return c; 
     2103} 
     2104#endif   /* ifndef YY_NO_INPUT */ 
     2105 
     2106/** Immediately switch to a different input stream. 
     2107 * @param input_file A readable stream. 
     2108 *  
     2109 * @note This function does not reset the start condition to @c INITIAL . 
     2110 */ 
     2111    void yyrestart  (FILE * input_file ) 
     2112{ 
     2113     
     2114   if ( ! YY_CURRENT_BUFFER ){ 
     2115        yyensure_buffer_stack (); 
     2116      YY_CURRENT_BUFFER_LVALUE = 
     2117            yy_create_buffer(yyin,YY_BUF_SIZE ); 
    19962118   } 
    19972119 
    1998  
    1999 #ifdef YY_USE_PROTOS 
    2000 void yyrestart( FILE *input_file ) 
    2001 #else 
    2002 void yyrestart( input_file ) 
    2003 FILE *input_file; 
    2004 #endif 
    2005    { 
    2006    if ( ! yy_current_buffer ) 
    2007       yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); 
    2008  
    2009    yy_init_buffer( yy_current_buffer, input_file ); 
    2010    yy_load_buffer_state(); 
    2011    } 
    2012  
    2013  
    2014 #ifdef YY_USE_PROTOS 
    2015 void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) 
    2016 #else 
    2017 void yy_switch_to_buffer( new_buffer ) 
    2018 YY_BUFFER_STATE new_buffer; 
    2019 #endif 
    2020    { 
    2021    if ( yy_current_buffer == new_buffer ) 
     2120   yy_init_buffer(YY_CURRENT_BUFFER,input_file ); 
     2121   yy_load_buffer_state( ); 
     2122} 
     2123 
     2124/** Switch to a different input buffer. 
     2125 * @param new_buffer The new input buffer. 
     2126 *  
     2127 */ 
     2128    void yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer ) 
     2129{ 
     2130     
     2131   /* TODO. We should be able to replace this entire function body 
     2132    * with 
     2133    *    yypop_buffer_state(); 
     2134    *    yypush_buffer_state(new_buffer); 
     2135     */ 
     2136   yyensure_buffer_stack (); 
     2137   if ( YY_CURRENT_BUFFER == new_buffer ) 
    20222138      return; 
    20232139 
    2024    if ( yy_current_buffer ) 
     2140   if ( YY_CURRENT_BUFFER ) 
    20252141      { 
    20262142      /* Flush out information for old buffer. */ 
    2027       *yy_c_buf_p = yy_hold_char; 
    2028       yy_current_buffer->yy_buf_pos = yy_c_buf_p; 
    2029       yy_current_buffer->yy_n_chars = yy_n_chars; 
     2143      *(yy_c_buf_p) = (yy_hold_char); 
     2144      YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 
     2145      YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 
    20302146      } 
    20312147 
    2032    yy_current_buffer = new_buffer; 
    2033    yy_load_buffer_state(); 
     2148   YY_CURRENT_BUFFER_LVALUE = new_buffer; 
     2149   yy_load_buffer_state( ); 
    20342150 
    20352151   /* We don't actually know whether we did this switch during 
     
    20382154    * to go ahead and always set it. 
    20392155    */ 
    2040    yy_did_buffer_switch_on_eof = 1; 
    2041    } 
    2042  
    2043  
    2044 #ifdef YY_USE_PROTOS 
    2045 void yy_load_buffer_state( void ) 
    2046 #else 
    2047 void yy_load_buffer_state() 
    2048 #endif 
    2049    { 
    2050    yy_n_chars = yy_current_buffer->yy_n_chars; 
    2051    yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; 
    2052    yyin = yy_current_buffer->yy_input_file; 
    2053    yy_hold_char = *yy_c_buf_p; 
    2054    } 
    2055  
    2056  
    2057 #ifdef YY_USE_PROTOS 
    2058 YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) 
    2059 #else 
    2060 YY_BUFFER_STATE yy_create_buffer( file, size ) 
    2061 FILE *file; 
    2062 int size; 
    2063 #endif 
    2064    { 
     2156   (yy_did_buffer_switch_on_eof) = 1; 
     2157} 
     2158 
     2159static void yy_load_buffer_state  (void) 
     2160{ 
     2161      (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; 
     2162   (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; 
     2163   yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; 
     2164   (yy_hold_char) = *(yy_c_buf_p); 
     2165} 
     2166 
     2167/** Allocate and initialize an input buffer state. 
     2168 * @param file A readable stream. 
     2169 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. 
     2170 *  
     2171 * @return the allocated buffer state. 
     2172 */ 
     2173    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size ) 
     2174{ 
    20652175   YY_BUFFER_STATE b; 
    2066  
    2067    b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 
     2176     
     2177   b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 
    20682178   if ( ! b ) 
    20692179      YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 
     
    20742184    * we need to put in 2 end-of-buffer characters. 
    20752185    */ 
    2076    b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); 
     2186   b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); 
    20772187   if ( ! b->yy_ch_buf ) 
    20782188      YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); 
     
    20802190   b->yy_is_our_buffer = 1; 
    20812191 
    2082    yy_init_buffer( b, file ); 
     2192   yy_init_buffer(b,file ); 
    20832193 
    20842194   return b; 
    2085    } 
    2086  
    2087  
    2088 #ifdef YY_USE_PROTOS 
    2089 void yy_delete_buffer( YY_BUFFER_STATE b ) 
    2090 #else 
    2091 void yy_delete_buffer( b ) 
    2092 YY_BUFFER_STATE b; 
    2093 #endif 
    2094    { 
     2195} 
     2196 
     2197/** Destroy the buffer. 
     2198 * @param b a buffer created with yy_create_buffer() 
     2199 *  
     2200 */ 
     2201    void yy_delete_buffer (YY_BUFFER_STATE  b ) 
     2202{ 
     2203     
    20952204   if ( ! b ) 
    20962205      return; 
    20972206 
    2098    if ( b == yy_current_buffer ) 
    2099       yy_current_buffer = (YY_BUFFER_STATE) 0; 
     2207   if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ 
     2208      YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; 
    21002209 
    21012210   if ( b->yy_is_our_buffer ) 
    2102       yy_flex_free( (void *) b->yy_ch_buf ); 
    2103  
    2104    yy_flex_free( (void *) b ); 
    2105    } 
    2106  
    2107  
    2108 #ifndef YY_ALWAYS_INTERACTIVE 
    2109 #ifndef YY_NEVER_INTERACTIVE 
    2110 extern int isatty YY_PROTO(( int )); 
    2111 #endif 
    2112 #endif 
    2113  
    2114 #ifdef YY_USE_PROTOS 
    2115 void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) 
    2116 #else 
    2117 void yy_init_buffer( b, file ) 
    2118 YY_BUFFER_STATE b; 
    2119 FILE *file; 
    2120 #endif 
    2121  
    2122  
    2123    { 
    2124    yy_flush_buffer( b ); 
     2211      yyfree((void *) b->yy_ch_buf  ); 
     2212 
     2213   yyfree((void *) b  ); 
     2214} 
     2215 
     2216#ifndef __cplusplus 
     2217extern int isatty (int ); 
     2218#endif /* __cplusplus */ 
     2219     
     2220/* Initializes or reinitializes a buffer. 
     2221 * This function is sometimes called more than once on the same buffer, 
     2222 * such as during a yyrestart() or at EOF. 
     2223 */ 
     2224    static void yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file ) 
     2225 
     2226{ 
     2227   int oerrno = errno; 
     2228     
     2229   yy_flush_buffer(b ); 
    21252230 
    21262231   b->yy_input_file = file; 
    21272232   b->yy_fill_buffer = 1; 
    21282233 
    2129 #if YY_ALWAYS_INTERACTIVE 
    2130    b->yy_is_interactive = 1; 
    2131 #else 
    2132 #if YY_NEVER_INTERACTIVE 
    2133    b->yy_is_interactive = 0; 
    2134 #else 
    2135    b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 
    2136 #endif 
    2137 #endif 
    2138    } 
    2139  
    2140  
    2141 #ifdef YY_USE_PROTOS 
    2142 void yy_flush_buffer( YY_BUFFER_STATE b ) 
    2143 #else 
    2144 void yy_flush_buffer( b ) 
    2145 YY_BUFFER_STATE b; 
    2146 #endif 
    2147  
    2148    { 
    2149    if ( ! b ) 
     2234    /* If b is the current buffer, then yy_init_buffer was _probably_ 
     2235     * called from yyrestart() or through yy_get_next_buffer. 
     2236     * In that case, we don't want to reset the lineno or column. 
     2237     */ 
     2238    if (b != YY_CURRENT_BUFFER){ 
     2239        b->yy_bs_lineno = 1; 
     2240        b->yy_bs_column = 0; 
     2241    } 
     2242 
     2243        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; 
     2244     
     2245   errno = oerrno; 
     2246} 
     2247 
     2248/** Discard all buffered characters. On the next scan, YY_INPUT will be called. 
     2249 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. 
     2250 *  
     2251 */ 
     2252    void yy_flush_buffer (YY_BUFFER_STATE  b ) 
     2253{ 
     2254      if ( ! b ) 
    21502255      return; 
    21512256 
     
    21642269   b->yy_buffer_status = YY_BUFFER_NEW; 
    21652270 
    2166    if ( b == yy_current_buffer ) 
    2167       yy_load_buffer_state(); 
     2271   if ( b == YY_CURRENT_BUFFER ) 
     2272      yy_load_buffer_state( ); 
     2273} 
     2274 
     2275/** Pushes the new state onto the stack. The new state becomes 
     2276 *  the current state. This function will allocate the stack 
     2277 *  if necessary. 
     2278 *  @param new_buffer The new state. 
     2279 *   
     2280 */ 
     2281void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) 
     2282{ 
     2283      if (new_buffer == NULL) 
     2284      return; 
     2285 
     2286   yyensure_buffer_stack(); 
     2287 
     2288   /* This block is copied from yy_switch_to_buffer. */ 
     2289   if ( YY_CURRENT_BUFFER ) 
     2290      { 
     2291      /* Flush out information for old buffer. */ 
     2292      *(yy_c_buf_p) = (yy_hold_char); 
     2293      YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); 
     2294      YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); 
     2295      } 
     2296 
     2297   /* Only push if top exists. Otherwise, replace top. */ 
     2298   if (YY_CURRENT_BUFFER) 
     2299      (yy_buffer_stack_top)++; 
     2300   YY_CURRENT_BUFFER_LVALUE = new_buffer; 
     2301 
     2302   /* copied from yy_switch_to_buffer. */ 
     2303   yy_load_buffer_state( ); 
     2304   (yy_did_buffer_switch_on_eof) = 1; 
     2305} 
     2306 
     2307/** Removes and deletes the top of the stack, if present. 
     2308 *  The next element becomes the new top. 
     2309 *   
     2310 */ 
     2311void yypop_buffer_state (void) 
     2312{ 
     2313      if (!YY_CURRENT_BUFFER) 
     2314      return; 
     2315 
     2316   yy_delete_buffer(YY_CURRENT_BUFFER ); 
     2317   YY_CURRENT_BUFFER_LVALUE = NULL; 
     2318   if ((yy_buffer_stack_top) > 0) 
     2319      --(yy_buffer_stack_top); 
     2320 
     2321   if (YY_CURRENT_BUFFER) { 
     2322      yy_load_buffer_state( ); 
     2323      (yy_did_buffer_switch_on_eof) = 1; 
    21682324   } 
    2169  
    2170  
    2171 #ifndef YY_NO_SCAN_BUFFER 
    2172 #ifdef YY_USE_PROTOS 
    2173 YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) 
    2174 #else 
    2175 YY_BUFFER_STATE yy_scan_buffer( base, size ) 
    2176 char *base; 
    2177 yy_size_t size; 
    2178 #endif 
    2179    { 
     2325} 
     2326 
     2327/* Allocates the stack if it does not exist. 
     2328 *  Guarantees space for at least one push. 
     2329 */ 
     2330static void yyensure_buffer_stack (void) 
     2331{ 
     2332   int num_to_alloc; 
     2333     
     2334   if (!(yy_buffer_stack)) { 
     2335 
     2336      /* First allocation is just for 2 elements, since we don't know if this 
     2337       * scanner will even need a stack. We use 2 instead of 1 to avoid an 
     2338       * immediate realloc on the next call. 
     2339         */ 
     2340      num_to_alloc = 1; 
     2341      (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc 
     2342                        (num_to_alloc * sizeof(struct yy_buffer_state*) 
     2343                        ); 
     2344       
     2345      memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); 
     2346             
     2347      (yy_buffer_stack_max) = num_to_alloc; 
     2348      (yy_buffer_stack_top) = 0; 
     2349      return; 
     2350   } 
     2351 
     2352   if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ 
     2353 
     2354      /* Increase the buffer to prepare for a possible push. */ 
     2355      int grow_size = 8 /* arbitrary grow size */; 
     2356 
     2357      num_to_alloc = (yy_buffer_stack_max) + grow_size; 
     2358      (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc 
     2359                        ((yy_buffer_stack), 
     2360                        num_to_alloc * sizeof(struct yy_buffer_state*) 
     2361                        ); 
     2362 
     2363      /* zero only the new slots.*/ 
     2364      memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); 
     2365      (yy_buffer_stack_max) = num_to_alloc; 
     2366   } 
     2367} 
     2368 
     2369/** Setup the input buffer state to scan directly from a user-specified character buffer. 
     2370 * @param base the character buffer 
     2371 * @param size the size in bytes of the character buffer 
     2372 *  
     2373 * @return the newly allocated buffer state object.  
     2374 */ 
     2375YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size ) 
     2376{ 
    21802377   YY_BUFFER_STATE b; 
    2181  
     2378     
    21822379   if ( size < 2 || 
    21832380        base[size-2] != YY_END_OF_BUFFER_CHAR || 
     
    21862383      return 0; 
    21872384 
    2188    b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); 
     2385   b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); 
    21892386   if ( ! b ) 
    21902387      YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); 
     
    22002397   b->yy_buffer_status = YY_BUFFER_NEW; 
    22012398 
    2202    yy_switch_to_buffer( b ); 
     2399   yy_switch_to_buffer(b ); 
    22032400 
    22042401   return b; 
    2205    } 
    2206 #endif 
    2207  
    2208  
    2209 #ifndef YY_NO_SCAN_STRING 
    2210 #ifdef YY_USE_PROTOS 
    2211 YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) 
    2212 #else 
    2213 YY_BUFFER_STATE yy_scan_string( yy_str ) 
    2214 yyconst char *yy_str; 
    2215 #endif 
    2216    { 
    2217    int len; 
    2218    for ( len = 0; yy_str[len]; ++len ) 
    2219       ; 
    2220  
    2221    return yy_scan_bytes( yy_str, len ); 
    2222    } 
    2223 #endif 
    2224  
    2225  
    2226 #ifndef YY_NO_SCAN_BYTES 
    2227 #ifdef YY_USE_PROTOS 
    2228 YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) 
    2229 #else 
    2230 YY_BUFFER_STATE yy_scan_bytes( bytes, len ) 
    2231 yyconst char *bytes; 
    2232 int len; 
    2233 #endif 
    2234    { 
     2402} 
     2403 
     2404/** Setup the input buffer state to scan a string. The next call to yylex() will 
     2405 * scan from a @e copy of @a str. 
     2406 * @param str a NUL-terminated string to scan 
     2407 *  
     2408 * @return the newly allocated buffer state object. 
     2409 * @note If you want to scan bytes that may contain NUL values, then use 
     2410 *       yy_scan_bytes() instead. 
     2411 */ 
     2412YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) 
     2413{ 
     2414     
     2415   return yy_scan_bytes(yystr,strlen(yystr) ); 
     2416} 
     2417 
     2418/** Setup the input buffer state to scan the given bytes. The next call to yylex() will 
     2419 * scan from a @e copy of @a bytes. 
     2420 * @param bytes the byte buffer to scan 
     2421 * @param len the number of bytes in the buffer pointed to by @a bytes. 
     2422 *  
     2423 * @return the newly allocated buffer state object. 
     2424 */ 
     2425YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len ) 
     2426{ 
    22352427   YY_BUFFER_STATE b; 
    22362428   char *buf; 
    22372429   yy_size_t n; 
    22382430   int i; 
    2239  
     2431     
    22402432   /* Get memory for full buffer, including space for trailing EOB's. */ 
    2241    n = len + 2; 
    2242    buf = (char *) yy_flex_alloc( n ); 
     2433   n = _yybytes_len + 2; 
     2434   buf = (char *) yyalloc(n ); 
    22432435   if ( ! buf ) 
    22442436      YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); 
    22452437 
    2246    for ( i = 0; i < len; ++i ) 
    2247       buf[i] = bytes[i]; 
    2248  
    2249    buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; 
    2250  
    2251    b = yy_scan_buffer( buf, n ); 
     2438   for ( i = 0; i < _yybytes_len; ++i ) 
     2439      buf[i] = yybytes[i]; 
     2440 
     2441   buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; 
     2442 
     2443   b = yy_scan_buffer(buf,n ); 
    22522444   if ( ! b ) 
    22532445      YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); 
     
    22592451 
    22602452   return b; 
    2261    } 
    2262 #endif 
    2263  
    2264  
    2265 #ifndef YY_NO_PUSH_STATE 
    2266 #ifdef YY_USE_PROTOS 
    2267 static void yy_push_state( int new_state ) 
    2268 #else 
    2269 static void yy_push_state( new_state ) 
    2270 int new_state; 
    2271 #endif 
    2272    { 
    2273    if ( yy_start_stack_ptr >= yy_start_stack_depth ) 
    2274       { 
    2275       yy_size_t new_size; 
    2276  
    2277       yy_start_stack_depth += YY_START_STACK_INCR; 
    2278       new_size = yy_start_stack_depth * sizeof( int ); 
    2279  
    2280       if ( ! yy_start_stack ) 
    2281          yy_start_stack = (int *) yy_flex_alloc( new_size ); 
    2282  
    2283       else 
    2284          yy_start_stack = (int *) yy_flex_realloc( 
    2285                (void *) yy_start_stack, new_size ); 
    2286  
    2287       if ( ! yy_start_stack ) 
    2288          YY_FATAL_ERROR( 
    2289          "out of memory expanding start-condition stack" ); 
    2290       } 
    2291  
    2292    yy_start_stack[yy_start_stack_ptr++] = YY_START; 
    2293  
    2294    BEGIN(new_state); 
    2295    } 
    2296 #endif 
    2297  
    2298  
    2299 #ifndef YY_NO_POP_STATE 
    2300 static void yy_pop_state() 
    2301    { 
    2302    if ( --yy_start_stack_ptr < 0 ) 
    2303       YY_FATAL_ERROR( "start-condition stack underflow" ); 
    2304  
    2305    BEGIN(yy_start_stack[yy_start_stack_ptr]); 
    2306    } 
    2307 #endif 
    2308  
    2309  
    2310 #ifndef YY_NO_TOP_STATE 
    2311 static int yy_top_state() 
    2312    { 
    2313    return yy_start_stack[yy_start_stack_ptr - 1]; 
    2314    } 
    2315 #endif 
     2453} 
    23162454 
    23172455#ifndef YY_EXIT_FAILURE 
     
    23192457#endif 
    23202458 
    2321 #ifdef YY_USE_PROTOS 
    2322 static void yy_fatal_error( yyconst char msg[] ) 
    2323 #else 
    2324 static void yy_fatal_error( msg ) 
    2325 char msg[]; 
    2326 #endif 
    2327    { 
    2328    (void) fprintf( stderr, "%s\n", msg ); 
     2459static void yy_fatal_error (yyconst char* msg ) 
     2460{ 
     2461      (void) fprintf( stderr, "%s\n", msg ); 
    23292462   exit( YY_EXIT_FAILURE ); 
    2330    } 
    2331  
    2332  
     2463} 
    23332464 
    23342465/* Redefine yyless() so it works in section 3 code. */ 
     
    23392470      { \ 
    23402471      /* Undo effects of setting up yytext. */ \ 
    2341       yytext[yyleng] = yy_hold_char; \ 
    2342       yy_c_buf_p = yytext + n; \ 
    2343       yy_hold_char = *yy_c_buf_p; \ 
    2344       *yy_c_buf_p = '\0'; \ 
    2345       yyleng = n; \ 
     2472        int yyless_macro_arg = (n); \ 
     2473        YY_LESS_LINENO(yyless_macro_arg);\ 
     2474      yytext[yyleng] = (yy_hold_char); \ 
     2475      (yy_c_buf_p) = yytext + yyless_macro_arg; \ 
     2476      (yy_hold_char) = *(yy_c_buf_p); \ 
     2477      *(yy_c_buf_p) = '\0'; \ 
     2478      yyleng = yyless_macro_arg; \ 
    23462479      } \ 
    23472480   while ( 0 ) 
    23482481 
    2349  
    2350 /* Internal utility routines. */ 
     2482/* Accessor  methods (get/set functions) to struct members. */ 
     2483 
     2484/** Get the current line number. 
     2485 *  
     2486 */ 
     2487int yyget_lineno  (void) 
     2488{ 
     2489         
     2490    return yylineno; 
     2491} 
     2492 
     2493/** Get the input stream. 
     2494 *  
     2495 */ 
     2496FILE *yyget_in  (void) 
     2497{ 
     2498        return yyin; 
     2499} 
     2500 
     2501/** Get the output stream. 
     2502 *  
     2503 */ 
     2504FILE *yyget_out  (void) 
     2505{ 
     2506        return yyout; 
     2507} 
     2508 
     2509/** Get the length of the current token. 
     2510 *  
     2511 */ 
     2512int yyget_leng  (void) 
     2513{ 
     2514        return yyleng; 
     2515} 
     2516 
     2517/** Get the current token. 
     2518 *  
     2519 */ 
     2520 
     2521char *yyget_text  (void) 
     2522{ 
     2523        return yytext; 
     2524} 
     2525 
     2526/** Set the current line number. 
     2527 * @param line_number 
     2528 *  
     2529 */ 
     2530void yyset_lineno (int  line_number ) 
     2531{ 
     2532     
     2533    yylineno = line_number; 
     2534} 
     2535 
     2536/** Set the input stream. This does not discard the current 
     2537 * input buffer. 
     2538 * @param in_str A readable stream. 
     2539 *  
     2540 * @see yy_switch_to_buffer 
     2541 */ 
     2542void yyset_in (FILE *  in_str ) 
     2543{ 
     2544        yyin = in_str ; 
     2545} 
     2546 
     2547void yyset_out (FILE *  out_str ) 
     2548{ 
     2549        yyout = out_str ; 
     2550} 
     2551 
     2552int yyget_debug  (void) 
     2553{ 
     2554        return yy_flex_debug; 
     2555} 
     2556 
     2557void yyset_debug (int  bdebug ) 
     2558{ 
     2559        yy_flex_debug = bdebug ; 
     2560} 
     2561 
     2562static int yy_init_globals (void) 
     2563{ 
     2564        /* Initialization is the same as for the non-reentrant scanner. 
     2565     * This function is called from yylex_destroy(), so don't allocate here. 
     2566     */ 
     2567 
     2568    (yy_buffer_stack) = 0; 
     2569    (yy_buffer_stack_top) = 0; 
     2570    (yy_buffer_stack_max) = 0; 
     2571    (yy_c_buf_p) = (char *) 0; 
     2572    (yy_init) = 0; 
     2573    (yy_start) = 0; 
     2574 
     2575/* Defined in main.c */ 
     2576#ifdef YY_STDINIT 
     2577    yyin = stdin; 
     2578    yyout = stdout; 
     2579#else 
     2580    yyin = (FILE *) 0; 
     2581    yyout = (FILE *) 0; 
     2582#endif 
     2583 
     2584    /* For future reference: Set errno on error, since we are called by 
     2585     * yylex_init() 
     2586     */ 
     2587    return 0; 
     2588} 
     2589 
     2590/* yylex_destroy is for both reentrant and non-reentrant scanners. */ 
     2591int yylex_destroy  (void) 
     2592{ 
     2593     
     2594    /* Pop the buffer stack, destroying each element. */ 
     2595   while(YY_CURRENT_BUFFER){ 
     2596      yy_delete_buffer(YY_CURRENT_BUFFER  ); 
     2597      YY_CURRENT_BUFFER_LVALUE = NULL; 
     2598      yypop_buffer_state(); 
     2599   } 
     2600 
     2601   /* Destroy the stack itself. */ 
     2602   yyfree((yy_buffer_stack) ); 
     2603   (yy_buffer_stack) = NULL; 
     2604 
     2605    /* Reset the globals. This is important in a non-reentrant scanner so the next time 
     2606     * yylex() is called, initialization will occur. */ 
     2607    yy_init_globals( ); 
     2608 
     2609    return 0; 
     2610} 
     2611 
     2612/* 
     2613 * Internal utility routines. 
     2614 */ 
    23512615 
    23522616#ifndef yytext_ptr 
    2353 #ifdef YY_USE_PROTOS 
    2354 static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) 
    2355 #else 
    2356 static void yy_flex_strncpy( s1, s2, n ) 
    2357 char *s1; 
    2358 yyconst char *s2; 
    2359 int n; 
    2360 #endif 
    2361    { 
     2617static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) 
     2618{ 
    23622619   register int i; 
    23632620   for ( i = 0; i < n; ++i ) 
    23642621      s1[i] = s2[i]; 
    2365    } 
     2622} 
    23662623#endif 
    23672624 
    23682625#ifdef YY_NEED_STRLEN 
    2369 #ifdef YY_USE_PROTOS 
    2370 static int yy_flex_strlen( yyconst char *s ) 
    2371 #else 
    2372 static int yy_flex_strlen( s ) 
    2373 yyconst char *s; 
    2374 #endif 
    2375    { 
     2626static int yy_flex_strlen (yyconst char * s ) 
     2627{ 
    23762628   register int n; 
    23772629   for ( n = 0; s[n]; ++n ) 
     
    23792631 
    23802632   return n; 
    2381    } 
    2382 #endif 
    2383  
    2384  
    2385 #ifdef YY_USE_PROTOS 
    2386 static void *yy_flex_alloc( yy_size_t size ) 
    2387 #else 
    2388 static void *yy_flex_alloc( size ) 
    2389 yy_size_t size; 
    2390 #endif 
    2391    { 
     2633} 
     2634#endif 
     2635 
     2636void *yyalloc (yy_size_t  size ) 
     2637{ 
    23922638   return (void *) malloc( size ); 
    2393    } 
    2394  
    2395 #ifdef YY_USE_PROTOS 
    2396 static void *yy_flex_realloc( void *ptr, yy_size_t size ) 
    2397 #else 
    2398 static void *yy_flex_realloc( ptr, size ) 
    2399 void *ptr; 
    2400 yy_size_t size; 
    2401 #endif 
    2402    { 
     2639} 
     2640 
     2641void *yyrealloc  (void * ptr, yy_size_t  size ) 
     2642{ 
    24032643   /* The cast to (char *) in the following accommodates both 
    24042644    * implementations that use char* generic pointers, and those 
     
    24092649    */ 
    24102650   return (void *) realloc( (char *) ptr, size ); 
    2411    } 
    2412  
    2413 #ifdef YY_USE_PROTOS 
    2414 static void yy_flex_free( void *ptr ) 
    2415 #else 
    2416 static void yy_flex_free( ptr ) 
    2417 void *ptr; 
    2418 #endif 
    2419    { 
    2420    free( ptr ); 
    2421    } 
    2422  
    2423 #if YY_MAIN 
    2424 int main() 
    2425    { 
    2426    yylex(); 
    2427    return 0; 
    2428    } 
    2429 #endif 
     2651} 
     2652 
     2653void yyfree (void * ptr ) 
     2654{ 
     2655   free( (char *) ptr );   /* see yyrealloc() for (char *) cast */ 
     2656} 
     2657 
     2658#define YYTABLES_NAME "yytables" 
     2659 
    24302660#line 68 "convert.lex" 
    24312661 
    24322662 
    24332663 
     2664 
    24342665int yywrap() 
    24352666{ 
     
    24492680exit(0); 
    24502681} 
     2682 
Note: See TracChangeset for help on using the changeset viewer.