mirror of https://github.com/ecmwf/eccodes.git
ECC-1109: Upgrade versions of flex and bison
This commit is contained in:
parent
910a0bad7d
commit
739318e1a7
393
src/grib_lex.c
393
src/grib_lex.c
|
@ -1,6 +1,6 @@
|
|||
#line 2 "gribl.c"
|
||||
#line 1 "gribl.c"
|
||||
|
||||
#line 4 "gribl.c"
|
||||
#line 3 "gribl.c"
|
||||
|
||||
#define YY_INT_ALIGNED short int
|
||||
|
||||
|
@ -8,8 +8,8 @@
|
|||
|
||||
#define FLEX_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION 2
|
||||
#define YY_FLEX_MINOR_VERSION 5
|
||||
#define YY_FLEX_SUBMINOR_VERSION 37
|
||||
#define YY_FLEX_MINOR_VERSION 6
|
||||
#define YY_FLEX_SUBMINOR_VERSION 4
|
||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||
#define FLEX_BETA
|
||||
#endif
|
||||
|
@ -84,65 +84,61 @@ typedef unsigned int flex_uint32_t;
|
|||
#define UINT32_MAX (4294967295U)
|
||||
#endif
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
#define SIZE_MAX (~(size_t)0)
|
||||
#endif
|
||||
|
||||
#endif /* ! C99 */
|
||||
|
||||
#endif /* ! FLEXINT_H */
|
||||
|
||||
#ifdef __cplusplus
|
||||
/* begin standard C++ headers. */
|
||||
|
||||
/* The "const" storage-class-modifier is valid. */
|
||||
#define YY_USE_CONST
|
||||
|
||||
#else /* ! __cplusplus */
|
||||
|
||||
/* C99 requires __STDC__ to be defined as 1. */
|
||||
#if defined (__STDC__)
|
||||
|
||||
#define YY_USE_CONST
|
||||
|
||||
#endif /* defined (__STDC__) */
|
||||
#endif /* ! __cplusplus */
|
||||
|
||||
#ifdef YY_USE_CONST
|
||||
/* TODO: this is always defined, so inline it */
|
||||
#define grib_yyconst const
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ >= 3
|
||||
#define grib_yynoreturn __attribute__((__noreturn__))
|
||||
#else
|
||||
#define grib_yyconst
|
||||
#define grib_yynoreturn
|
||||
#endif
|
||||
|
||||
/* Returned upon end-of-file. */
|
||||
#define YY_NULL 0
|
||||
|
||||
/* Promotes a possibly negative, possibly signed char to an unsigned
|
||||
* integer for use as an array index. If the signed char is negative,
|
||||
* we want to instead treat it as an 8-bit unsigned char, hence the
|
||||
* double cast.
|
||||
/* Promotes a possibly negative, possibly signed char to an
|
||||
* integer in range [0..255] for use as an array index.
|
||||
*/
|
||||
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
|
||||
#define YY_SC_TO_UI(c) ((YY_CHAR) (c))
|
||||
|
||||
/* Enter a start condition. This macro really ought to take a parameter,
|
||||
* but we do it the disgusting crufty way forced on us by the ()-less
|
||||
* definition of BEGIN.
|
||||
*/
|
||||
#define BEGIN (grib_yy_start) = 1 + 2 *
|
||||
|
||||
/* Translate the current start state into a value that can be later handed
|
||||
* to BEGIN to return to the state. The YYSTATE alias is for lex
|
||||
* compatibility.
|
||||
*/
|
||||
#define YY_START (((grib_yy_start) - 1) / 2)
|
||||
#define YYSTATE YY_START
|
||||
|
||||
/* Action number for EOF rule of a given start state. */
|
||||
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
||||
|
||||
/* Special action meaning "start processing a new file". */
|
||||
#define YY_NEW_FILE grib_yyrestart(grib_yyin )
|
||||
|
||||
#define YY_NEW_FILE grib_yyrestart( grib_yyin )
|
||||
#define YY_END_OF_BUFFER_CHAR 0
|
||||
|
||||
/* Size of default input buffer. */
|
||||
#ifndef YY_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k.
|
||||
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
|
||||
* Ditto for the __ia64__ case accordingly.
|
||||
*/
|
||||
#define YY_BUF_SIZE 32768
|
||||
#else
|
||||
#define YY_BUF_SIZE 16384
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* The state buf must be large enough to hold one state per character in the main buffer.
|
||||
|
@ -159,7 +155,7 @@ typedef struct grib_yy_buffer_state *YY_BUFFER_STATE;
|
|||
typedef size_t grib_yy_size_t;
|
||||
#endif
|
||||
|
||||
extern grib_yy_size_t grib_yyleng;
|
||||
extern int grib_yyleng;
|
||||
|
||||
extern FILE *grib_yyin, *grib_yyout;
|
||||
|
||||
|
@ -168,6 +164,7 @@ extern FILE *grib_yyin, *grib_yyout;
|
|||
#define EOB_ACT_LAST_MATCH 2
|
||||
|
||||
#define YY_LESS_LINENO(n)
|
||||
#define YY_LINENO_REWIND_TO(ptr)
|
||||
|
||||
/* Return all but the first "n" matched characters back to the input stream. */
|
||||
#define grib_yyless(n) \
|
||||
|
@ -182,7 +179,6 @@ extern FILE *grib_yyin, *grib_yyout;
|
|||
YY_DO_BEFORE_ACTION; /* set up grib_yytext again */ \
|
||||
} \
|
||||
while ( 0 )
|
||||
|
||||
#define unput(c) grib_yyunput( c, (grib_yytext_ptr) )
|
||||
|
||||
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
||||
|
@ -253,7 +249,7 @@ struct grib_yy_buffer_state
|
|||
/* Stack of input buffers. */
|
||||
static size_t grib_yy_buffer_stack_top = 0; /**< index of top of stack. */
|
||||
static size_t grib_yy_buffer_stack_max = 0; /**< capacity of stack. */
|
||||
static YY_BUFFER_STATE * grib_yy_buffer_stack = 0; /**< Stack as an array. */
|
||||
static YY_BUFFER_STATE * grib_yy_buffer_stack = NULL; /**< Stack as an array. */
|
||||
|
||||
/* We provide macros for accessing buffer states in case in the
|
||||
* future we want to put the buffer states in a more general
|
||||
|
@ -264,7 +260,6 @@ static YY_BUFFER_STATE * grib_yy_buffer_stack = 0; /**< Stack as an array. */
|
|||
#define YY_CURRENT_BUFFER ( (grib_yy_buffer_stack) \
|
||||
? (grib_yy_buffer_stack)[(grib_yy_buffer_stack_top)] \
|
||||
: NULL)
|
||||
|
||||
/* Same as previous macro, but useful when we know that the buffer stack is not
|
||||
* NULL or when we need an lvalue. For internal use only.
|
||||
*/
|
||||
|
@ -273,10 +268,10 @@ static YY_BUFFER_STATE * grib_yy_buffer_stack = 0; /**< Stack as an array. */
|
|||
/* grib_yy_hold_char holds the character lost when grib_yytext is formed. */
|
||||
static char grib_yy_hold_char;
|
||||
static int grib_yy_n_chars; /* number of characters read into grib_yy_ch_buf */
|
||||
grib_yy_size_t grib_yyleng;
|
||||
int grib_yyleng;
|
||||
|
||||
/* Points to current character in buffer. */
|
||||
static char *grib_yy_c_buf_p = (char *) 0;
|
||||
static char *grib_yy_c_buf_p = NULL;
|
||||
static int grib_yy_init = 0; /* whether we need to initialize */
|
||||
static int grib_yy_start = 0; /* start state number */
|
||||
|
||||
|
@ -285,71 +280,68 @@ static int grib_yy_start = 0; /* start state number */
|
|||
*/
|
||||
static int grib_yy_did_buffer_switch_on_eof;
|
||||
|
||||
void grib_yyrestart (FILE *input_file );
|
||||
void grib_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer );
|
||||
YY_BUFFER_STATE grib_yy_create_buffer (FILE *file,int size );
|
||||
void grib_yy_delete_buffer (YY_BUFFER_STATE b );
|
||||
void grib_yy_flush_buffer (YY_BUFFER_STATE b );
|
||||
void grib_yypush_buffer_state (YY_BUFFER_STATE new_buffer );
|
||||
void grib_yypop_buffer_state (void );
|
||||
void grib_yyrestart ( FILE *input_file );
|
||||
void grib_yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
|
||||
YY_BUFFER_STATE grib_yy_create_buffer ( FILE *file, int size );
|
||||
void grib_yy_delete_buffer ( YY_BUFFER_STATE b );
|
||||
void grib_yy_flush_buffer ( YY_BUFFER_STATE b );
|
||||
void grib_yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
|
||||
void grib_yypop_buffer_state ( void );
|
||||
|
||||
static void grib_yyensure_buffer_stack (void );
|
||||
static void grib_yy_load_buffer_state (void );
|
||||
static void grib_yy_init_buffer (YY_BUFFER_STATE b,FILE *file );
|
||||
static void grib_yyensure_buffer_stack ( void );
|
||||
static void grib_yy_load_buffer_state ( void );
|
||||
static void grib_yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
|
||||
#define YY_FLUSH_BUFFER grib_yy_flush_buffer( YY_CURRENT_BUFFER )
|
||||
|
||||
#define YY_FLUSH_BUFFER grib_yy_flush_buffer(YY_CURRENT_BUFFER )
|
||||
YY_BUFFER_STATE grib_yy_scan_buffer ( char *base, grib_yy_size_t size );
|
||||
YY_BUFFER_STATE grib_yy_scan_string ( const char *grib_yy_str );
|
||||
YY_BUFFER_STATE grib_yy_scan_bytes ( const char *bytes, int len );
|
||||
|
||||
YY_BUFFER_STATE grib_yy_scan_buffer (char *base,grib_yy_size_t size );
|
||||
YY_BUFFER_STATE grib_yy_scan_string (grib_yyconst char *grib_yy_str );
|
||||
YY_BUFFER_STATE grib_yy_scan_bytes (grib_yyconst char *bytes,grib_yy_size_t len );
|
||||
|
||||
void *grib_yyalloc (grib_yy_size_t );
|
||||
void *grib_yyrealloc (void *,grib_yy_size_t );
|
||||
void grib_yyfree (void * );
|
||||
void *grib_yyalloc ( grib_yy_size_t );
|
||||
void *grib_yyrealloc ( void *, grib_yy_size_t );
|
||||
void grib_yyfree ( void * );
|
||||
|
||||
#define grib_yy_new_buffer grib_yy_create_buffer
|
||||
|
||||
#define grib_yy_set_interactive(is_interactive) \
|
||||
{ \
|
||||
if ( ! YY_CURRENT_BUFFER ){ \
|
||||
grib_yyensure_buffer_stack (); \
|
||||
YY_CURRENT_BUFFER_LVALUE = \
|
||||
grib_yy_create_buffer(grib_yyin,YY_BUF_SIZE ); \
|
||||
grib_yy_create_buffer( grib_yyin, YY_BUF_SIZE ); \
|
||||
} \
|
||||
YY_CURRENT_BUFFER_LVALUE->grib_yy_is_interactive = is_interactive; \
|
||||
}
|
||||
|
||||
#define grib_yy_set_bol(at_bol) \
|
||||
{ \
|
||||
if ( ! YY_CURRENT_BUFFER ){\
|
||||
grib_yyensure_buffer_stack (); \
|
||||
YY_CURRENT_BUFFER_LVALUE = \
|
||||
grib_yy_create_buffer(grib_yyin,YY_BUF_SIZE ); \
|
||||
grib_yy_create_buffer( grib_yyin, YY_BUF_SIZE ); \
|
||||
} \
|
||||
YY_CURRENT_BUFFER_LVALUE->grib_yy_at_bol = at_bol; \
|
||||
}
|
||||
|
||||
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->grib_yy_at_bol)
|
||||
|
||||
/* Begin user sect3 */
|
||||
typedef flex_uint8_t YY_CHAR;
|
||||
|
||||
typedef unsigned char YY_CHAR;
|
||||
|
||||
FILE *grib_yyin = (FILE *) 0, *grib_yyout = (FILE *) 0;
|
||||
FILE *grib_yyin = NULL, *grib_yyout = NULL;
|
||||
|
||||
typedef int grib_yy_state_type;
|
||||
|
||||
extern int grib_yylineno;
|
||||
|
||||
int grib_yylineno = 1;
|
||||
|
||||
extern char *grib_yytext;
|
||||
#ifdef grib_yytext_ptr
|
||||
#undef grib_yytext_ptr
|
||||
#endif
|
||||
#define grib_yytext_ptr grib_yytext
|
||||
|
||||
static grib_yy_state_type grib_yy_get_previous_state (void );
|
||||
static grib_yy_state_type grib_yy_try_NUL_trans (grib_yy_state_type current_state );
|
||||
static int grib_yy_get_next_buffer (void );
|
||||
static void grib_yy_fatal_error (grib_yyconst char msg[] );
|
||||
static grib_yy_state_type grib_yy_get_previous_state ( void );
|
||||
static grib_yy_state_type grib_yy_try_NUL_trans ( grib_yy_state_type current_state );
|
||||
static int grib_yy_get_next_buffer ( void );
|
||||
static void grib_yynoreturn grib_yy_fatal_error ( const char* msg );
|
||||
|
||||
/* Done after the current pattern has been matched and before the
|
||||
* corresponding action - sets up grib_yytext.
|
||||
|
@ -360,7 +352,6 @@ static void grib_yy_fatal_error (grib_yyconst char msg[] );
|
|||
(grib_yy_hold_char) = *grib_yy_cp; \
|
||||
*grib_yy_cp = '\0'; \
|
||||
(grib_yy_c_buf_p) = grib_yy_cp;
|
||||
|
||||
#define YY_NUM_RULES 138
|
||||
#define YY_END_OF_BUFFER 139
|
||||
/* This struct is not used in this scanner,
|
||||
|
@ -370,7 +361,7 @@ struct grib_yy_trans_info
|
|||
flex_int32_t grib_yy_verify;
|
||||
flex_int32_t grib_yy_nxt;
|
||||
};
|
||||
static grib_yyconst flex_int16_t grib_yy_accept[798] =
|
||||
static const flex_int16_t grib_yy_accept[798] =
|
||||
{ 0,
|
||||
135, 135, 139, 137, 135, 136, 12, 126, 134, 137,
|
||||
137, 137, 137, 129, 5, 137, 3, 128, 128, 128,
|
||||
|
@ -462,7 +453,7 @@ static grib_yyconst flex_int16_t grib_yy_accept[798] =
|
|||
|
||||
} ;
|
||||
|
||||
static grib_yyconst flex_int32_t grib_yy_ec[256] =
|
||||
static const YY_CHAR grib_yy_ec[256] =
|
||||
{ 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
||||
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
|
||||
|
@ -494,7 +485,7 @@ static grib_yyconst flex_int32_t grib_yy_ec[256] =
|
|||
1, 1, 1, 1, 1
|
||||
} ;
|
||||
|
||||
static grib_yyconst flex_int32_t grib_yy_meta[57] =
|
||||
static const YY_CHAR grib_yy_meta[57] =
|
||||
{ 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
||||
4, 5, 6, 6, 6, 6, 6, 6, 6, 1,
|
||||
|
@ -504,7 +495,7 @@ static grib_yyconst flex_int32_t grib_yy_meta[57] =
|
|||
8, 8, 8, 8, 1, 1
|
||||
} ;
|
||||
|
||||
static grib_yyconst flex_int16_t grib_yy_base[828] =
|
||||
static const flex_int16_t grib_yy_base[828] =
|
||||
{ 0,
|
||||
0, 0, 1944, 1945, 1941, 1945, 1921, 1945, 44, 1934,
|
||||
51, 58, 0, 69, 68, 1919, 1918, 81, 96, 76,
|
||||
|
@ -599,7 +590,7 @@ static grib_yyconst flex_int16_t grib_yy_base[828] =
|
|||
1876, 1880, 1888, 1893, 1894, 1902, 1903
|
||||
} ;
|
||||
|
||||
static grib_yyconst flex_int16_t grib_yy_def[828] =
|
||||
static const flex_int16_t grib_yy_def[828] =
|
||||
{ 0,
|
||||
797, 1, 797, 797, 797, 797, 797, 797, 797, 797,
|
||||
797, 797, 798, 799, 797, 797, 797, 800, 800, 19,
|
||||
|
@ -694,7 +685,7 @@ static grib_yyconst flex_int16_t grib_yy_def[828] =
|
|||
797, 797, 797, 797, 797, 797, 797
|
||||
} ;
|
||||
|
||||
static grib_yyconst flex_int16_t grib_yy_nxt[2002] =
|
||||
static const flex_int16_t grib_yy_nxt[2002] =
|
||||
{ 0,
|
||||
4, 5, 6, 7, 8, 9, 10, 8, 11, 11,
|
||||
12, 13, 14, 14, 14, 14, 14, 14, 14, 15,
|
||||
|
@ -919,7 +910,7 @@ static grib_yyconst flex_int16_t grib_yy_nxt[2002] =
|
|||
797
|
||||
} ;
|
||||
|
||||
static grib_yyconst flex_int16_t grib_yy_chk[2002] =
|
||||
static const flex_int16_t grib_yy_chk[2002] =
|
||||
{ 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
|
@ -1207,7 +1198,8 @@ void _grib_ignore_grib_yyunput_unused_error() { grib_yyunput(0,0); }
|
|||
#define GET_INPUT input
|
||||
#endif
|
||||
|
||||
#line 1211 "gribl.c"
|
||||
#line 1201 "gribl.c"
|
||||
#line 1202 "gribl.c"
|
||||
|
||||
#define INITIAL 0
|
||||
|
||||
|
@ -1223,36 +1215,36 @@ void _grib_ignore_grib_yyunput_unused_error() { grib_yyunput(0,0); }
|
|||
#define YY_EXTRA_TYPE void *
|
||||
#endif
|
||||
|
||||
static int grib_yy_init_globals (void );
|
||||
static int grib_yy_init_globals ( void );
|
||||
|
||||
/* Accessor methods to globals.
|
||||
These are made visible to non-reentrant scanners for convenience. */
|
||||
|
||||
int grib_yylex_destroy (void );
|
||||
int grib_yylex_destroy ( void );
|
||||
|
||||
int grib_yyget_debug (void );
|
||||
int grib_yyget_debug ( void );
|
||||
|
||||
void grib_yyset_debug (int debug_flag );
|
||||
void grib_yyset_debug ( int debug_flag );
|
||||
|
||||
YY_EXTRA_TYPE grib_yyget_extra (void );
|
||||
YY_EXTRA_TYPE grib_yyget_extra ( void );
|
||||
|
||||
void grib_yyset_extra (YY_EXTRA_TYPE user_defined );
|
||||
void grib_yyset_extra ( YY_EXTRA_TYPE user_defined );
|
||||
|
||||
FILE *grib_yyget_in (void );
|
||||
FILE *grib_yyget_in ( void );
|
||||
|
||||
void grib_yyset_in (FILE * in_str );
|
||||
void grib_yyset_in ( FILE * _in_str );
|
||||
|
||||
FILE *grib_yyget_out (void );
|
||||
FILE *grib_yyget_out ( void );
|
||||
|
||||
void grib_yyset_out (FILE * out_str );
|
||||
void grib_yyset_out ( FILE * _out_str );
|
||||
|
||||
grib_yy_size_t grib_yyget_leng (void );
|
||||
int grib_yyget_leng ( void );
|
||||
|
||||
char *grib_yyget_text (void );
|
||||
char *grib_yyget_text ( void );
|
||||
|
||||
int grib_yyget_lineno (void );
|
||||
int grib_yyget_lineno ( void );
|
||||
|
||||
void grib_yyset_lineno (int line_number );
|
||||
void grib_yyset_lineno ( int _line_number );
|
||||
|
||||
/* Macros after this point can all be overridden by user definitions in
|
||||
* section 1.
|
||||
|
@ -1260,35 +1252,43 @@ void grib_yyset_lineno (int line_number );
|
|||
|
||||
#ifndef YY_SKIP_YYWRAP
|
||||
#ifdef __cplusplus
|
||||
extern "C" int grib_yywrap (void );
|
||||
extern "C" int grib_yywrap ( void );
|
||||
#else
|
||||
extern int grib_yywrap (void );
|
||||
extern int grib_yywrap ( void );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void grib_yyunput (int c,char *buf_ptr );
|
||||
#ifndef YY_NO_UNPUT
|
||||
|
||||
void grib_yyunput ( int c, char *buf_ptr );
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef grib_yytext_ptr
|
||||
static void grib_yy_flex_strncpy (char *,grib_yyconst char *,int );
|
||||
static void grib_yy_flex_strncpy ( char *, const char *, int );
|
||||
#endif
|
||||
|
||||
#ifdef YY_NEED_STRLEN
|
||||
static int grib_yy_flex_strlen (grib_yyconst char * );
|
||||
static int grib_yy_flex_strlen ( const char * );
|
||||
#endif
|
||||
|
||||
#ifndef YY_NO_INPUT
|
||||
|
||||
#ifdef __cplusplus
|
||||
static int grib_yyinput (void );
|
||||
static int grib_yyinput ( void );
|
||||
#else
|
||||
static int input (void );
|
||||
static int input ( void );
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Amount of stuff to slurp up with each read. */
|
||||
#ifndef YY_READ_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k */
|
||||
#define YY_READ_BUF_SIZE 16384
|
||||
#else
|
||||
#define YY_READ_BUF_SIZE 8192
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* Copy whatever the last rule matched to the standard output. */
|
||||
|
@ -1296,7 +1296,7 @@ static int input (void );
|
|||
/* This used to be an fputs(), but since the string might contain NUL's,
|
||||
* we now use fwrite().
|
||||
*/
|
||||
#define ECHO do { if (fwrite( grib_yytext, grib_yyleng, 1, grib_yyout )) {} } while (0)
|
||||
#define ECHO do { if (fwrite( grib_yytext, (size_t) grib_yyleng, 1, grib_yyout )) {} } while (0)
|
||||
#endif
|
||||
|
||||
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
||||
|
@ -1307,7 +1307,7 @@ static int input (void );
|
|||
if ( YY_CURRENT_BUFFER_LVALUE->grib_yy_is_interactive ) \
|
||||
{ \
|
||||
int c = '*'; \
|
||||
size_t n; \
|
||||
int n; \
|
||||
for ( n = 0; n < max_size && \
|
||||
(c = getc( grib_yyin )) != EOF && c != '\n'; ++n ) \
|
||||
buf[n] = (char) c; \
|
||||
|
@ -1320,7 +1320,7 @@ static int input (void );
|
|||
else \
|
||||
{ \
|
||||
errno=0; \
|
||||
while ( (result = (int) fread(buf, 1, max_size, grib_yyin))==0 && ferror(grib_yyin)) \
|
||||
while ( (result = (int) fread(buf, 1, (grib_yy_size_t) max_size, grib_yyin)) == 0 && ferror(grib_yyin)) \
|
||||
{ \
|
||||
if( errno != EINTR) \
|
||||
{ \
|
||||
|
@ -1375,7 +1375,7 @@ extern int grib_yylex (void);
|
|||
|
||||
/* Code executed at the end of each rule. */
|
||||
#ifndef YY_BREAK
|
||||
#define YY_BREAK break;
|
||||
#define YY_BREAK /*LINTED*/break;
|
||||
#endif
|
||||
|
||||
#define YY_RULE_SETUP \
|
||||
|
@ -1385,15 +1385,9 @@ extern int grib_yylex (void);
|
|||
*/
|
||||
YY_DECL
|
||||
{
|
||||
register grib_yy_state_type grib_yy_current_state;
|
||||
register char *grib_yy_cp, *grib_yy_bp;
|
||||
register int grib_yy_act;
|
||||
|
||||
#line 71 "gribl.l"
|
||||
|
||||
|
||||
|
||||
#line 1397 "gribl.c"
|
||||
grib_yy_state_type grib_yy_current_state;
|
||||
char *grib_yy_cp, *grib_yy_bp;
|
||||
int grib_yy_act;
|
||||
|
||||
if ( !(grib_yy_init) )
|
||||
{
|
||||
|
@ -1415,13 +1409,20 @@ YY_DECL
|
|||
if ( ! YY_CURRENT_BUFFER ) {
|
||||
grib_yyensure_buffer_stack ();
|
||||
YY_CURRENT_BUFFER_LVALUE =
|
||||
grib_yy_create_buffer(grib_yyin,YY_BUF_SIZE );
|
||||
grib_yy_create_buffer( grib_yyin, YY_BUF_SIZE );
|
||||
}
|
||||
|
||||
grib_yy_load_buffer_state( );
|
||||
}
|
||||
|
||||
while ( 1 ) /* loops until end-of-file is reached */
|
||||
{
|
||||
#line 71 "gribl.l"
|
||||
|
||||
|
||||
|
||||
#line 1423 "gribl.c"
|
||||
|
||||
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
|
||||
{
|
||||
grib_yy_cp = (grib_yy_c_buf_p);
|
||||
|
||||
|
@ -1437,7 +1438,7 @@ YY_DECL
|
|||
grib_yy_match:
|
||||
do
|
||||
{
|
||||
register YY_CHAR grib_yy_c = grib_yy_ec[YY_SC_TO_UI(*grib_yy_cp)];
|
||||
YY_CHAR grib_yy_c = grib_yy_ec[YY_SC_TO_UI(*grib_yy_cp)] ;
|
||||
if ( grib_yy_accept[grib_yy_current_state] )
|
||||
{
|
||||
(grib_yy_last_accepting_state) = grib_yy_current_state;
|
||||
|
@ -1447,9 +1448,9 @@ grib_yy_match:
|
|||
{
|
||||
grib_yy_current_state = (int) grib_yy_def[grib_yy_current_state];
|
||||
if ( grib_yy_current_state >= 798 )
|
||||
grib_yy_c = grib_yy_meta[(unsigned int) grib_yy_c];
|
||||
grib_yy_c = grib_yy_meta[grib_yy_c];
|
||||
}
|
||||
grib_yy_current_state = grib_yy_nxt[grib_yy_base[grib_yy_current_state] + (flex_int16_t) grib_yy_c];
|
||||
grib_yy_current_state = grib_yy_nxt[grib_yy_base[grib_yy_current_state] + grib_yy_c];
|
||||
++grib_yy_cp;
|
||||
}
|
||||
while ( grib_yy_base[grib_yy_current_state] != 1945 );
|
||||
|
@ -2346,6 +2347,7 @@ case YY_STATE_EOF(INITIAL):
|
|||
"fatal flex scanner internal error--no action found" );
|
||||
} /* end of action switch */
|
||||
} /* end of scanning one token */
|
||||
} /* end of user's declarations */
|
||||
} /* end of grib_yylex */
|
||||
|
||||
/* grib_yy_get_next_buffer - try to read in a new buffer
|
||||
|
@ -2357,9 +2359,9 @@ case YY_STATE_EOF(INITIAL):
|
|||
*/
|
||||
static int grib_yy_get_next_buffer (void)
|
||||
{
|
||||
register char *dest = YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf;
|
||||
register char *source = (grib_yytext_ptr);
|
||||
register int number_to_move, i;
|
||||
char *dest = YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf;
|
||||
char *source = (grib_yytext_ptr);
|
||||
int number_to_move, i;
|
||||
int ret_val;
|
||||
|
||||
if ( (grib_yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf[(grib_yy_n_chars) + 1] )
|
||||
|
@ -2388,7 +2390,7 @@ static int grib_yy_get_next_buffer (void)
|
|||
/* Try to read more data. */
|
||||
|
||||
/* First move last chars to start of buffer. */
|
||||
number_to_move = (int) ((grib_yy_c_buf_p) - (grib_yytext_ptr)) - 1;
|
||||
number_to_move = (int) ((grib_yy_c_buf_p) - (grib_yytext_ptr) - 1);
|
||||
|
||||
for ( i = 0; i < number_to_move; ++i )
|
||||
*(dest++) = *(source++);
|
||||
|
@ -2415,7 +2417,7 @@ static int grib_yy_get_next_buffer (void)
|
|||
|
||||
if ( b->grib_yy_is_our_buffer )
|
||||
{
|
||||
grib_yy_size_t new_size = b->grib_yy_buf_size * 2;
|
||||
int new_size = b->grib_yy_buf_size * 2;
|
||||
|
||||
if ( new_size <= 0 )
|
||||
b->grib_yy_buf_size += b->grib_yy_buf_size / 8;
|
||||
|
@ -2424,11 +2426,12 @@ static int grib_yy_get_next_buffer (void)
|
|||
|
||||
b->grib_yy_ch_buf = (char *)
|
||||
/* Include room in for 2 EOB chars. */
|
||||
grib_yyrealloc((void *) b->grib_yy_ch_buf,b->grib_yy_buf_size + 2 );
|
||||
grib_yyrealloc( (void *) b->grib_yy_ch_buf,
|
||||
(grib_yy_size_t) (b->grib_yy_buf_size + 2) );
|
||||
}
|
||||
else
|
||||
/* Can't grow it, we don't own it. */
|
||||
b->grib_yy_ch_buf = 0;
|
||||
b->grib_yy_ch_buf = NULL;
|
||||
|
||||
if ( ! b->grib_yy_ch_buf )
|
||||
YY_FATAL_ERROR(
|
||||
|
@ -2436,7 +2439,7 @@ static int grib_yy_get_next_buffer (void)
|
|||
|
||||
(grib_yy_c_buf_p) = &b->grib_yy_ch_buf[grib_yy_c_buf_p_offset];
|
||||
|
||||
num_to_read = (int) YY_CURRENT_BUFFER_LVALUE->grib_yy_buf_size -
|
||||
num_to_read = YY_CURRENT_BUFFER_LVALUE->grib_yy_buf_size -
|
||||
number_to_move - 1;
|
||||
|
||||
}
|
||||
|
@ -2456,7 +2459,7 @@ static int grib_yy_get_next_buffer (void)
|
|||
if ( number_to_move == YY_MORE_ADJ )
|
||||
{
|
||||
ret_val = EOB_ACT_END_OF_FILE;
|
||||
grib_yyrestart(grib_yyin );
|
||||
grib_yyrestart( grib_yyin );
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -2470,12 +2473,15 @@ static int grib_yy_get_next_buffer (void)
|
|||
else
|
||||
ret_val = EOB_ACT_CONTINUE_SCAN;
|
||||
|
||||
if ((int) ((grib_yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->grib_yy_buf_size) {
|
||||
if (((grib_yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->grib_yy_buf_size) {
|
||||
/* Extend the array by 50%, plus the number we really need. */
|
||||
int new_size = (grib_yy_n_chars) + number_to_move + ((grib_yy_n_chars) >> 1);
|
||||
YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf = (char *) grib_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf,new_size );
|
||||
YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf = (char *) grib_yyrealloc(
|
||||
(void *) YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf, (grib_yy_size_t) new_size );
|
||||
if ( ! YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in grib_yy_get_next_buffer()" );
|
||||
/* "- 2" to take care of EOB's */
|
||||
YY_CURRENT_BUFFER_LVALUE->grib_yy_buf_size = (int) (new_size - 2);
|
||||
}
|
||||
|
||||
(grib_yy_n_chars) += number_to_move;
|
||||
|
@ -2491,14 +2497,14 @@ static int grib_yy_get_next_buffer (void)
|
|||
|
||||
static grib_yy_state_type grib_yy_get_previous_state (void)
|
||||
{
|
||||
register grib_yy_state_type grib_yy_current_state;
|
||||
register char *grib_yy_cp;
|
||||
grib_yy_state_type grib_yy_current_state;
|
||||
char *grib_yy_cp;
|
||||
|
||||
grib_yy_current_state = (grib_yy_start);
|
||||
|
||||
for ( grib_yy_cp = (grib_yytext_ptr) + YY_MORE_ADJ; grib_yy_cp < (grib_yy_c_buf_p); ++grib_yy_cp )
|
||||
{
|
||||
register YY_CHAR grib_yy_c = (*grib_yy_cp ? grib_yy_ec[YY_SC_TO_UI(*grib_yy_cp)] : 1);
|
||||
YY_CHAR grib_yy_c = (*grib_yy_cp ? grib_yy_ec[YY_SC_TO_UI(*grib_yy_cp)] : 1);
|
||||
if ( grib_yy_accept[grib_yy_current_state] )
|
||||
{
|
||||
(grib_yy_last_accepting_state) = grib_yy_current_state;
|
||||
|
@ -2508,9 +2514,9 @@ static int grib_yy_get_next_buffer (void)
|
|||
{
|
||||
grib_yy_current_state = (int) grib_yy_def[grib_yy_current_state];
|
||||
if ( grib_yy_current_state >= 798 )
|
||||
grib_yy_c = grib_yy_meta[(unsigned int) grib_yy_c];
|
||||
grib_yy_c = grib_yy_meta[grib_yy_c];
|
||||
}
|
||||
grib_yy_current_state = grib_yy_nxt[grib_yy_base[grib_yy_current_state] + (flex_int16_t) grib_yy_c];
|
||||
grib_yy_current_state = grib_yy_nxt[grib_yy_base[grib_yy_current_state] + grib_yy_c];
|
||||
}
|
||||
|
||||
return grib_yy_current_state;
|
||||
|
@ -2523,10 +2529,10 @@ static int grib_yy_get_next_buffer (void)
|
|||
*/
|
||||
static grib_yy_state_type grib_yy_try_NUL_trans (grib_yy_state_type grib_yy_current_state )
|
||||
{
|
||||
register int grib_yy_is_jam;
|
||||
register char *grib_yy_cp = (grib_yy_c_buf_p);
|
||||
int grib_yy_is_jam;
|
||||
char *grib_yy_cp = (grib_yy_c_buf_p);
|
||||
|
||||
register YY_CHAR grib_yy_c = 1;
|
||||
YY_CHAR grib_yy_c = 1;
|
||||
if ( grib_yy_accept[grib_yy_current_state] )
|
||||
{
|
||||
(grib_yy_last_accepting_state) = grib_yy_current_state;
|
||||
|
@ -2536,17 +2542,19 @@ static int grib_yy_get_next_buffer (void)
|
|||
{
|
||||
grib_yy_current_state = (int) grib_yy_def[grib_yy_current_state];
|
||||
if ( grib_yy_current_state >= 798 )
|
||||
grib_yy_c = grib_yy_meta[(unsigned int) grib_yy_c];
|
||||
grib_yy_c = grib_yy_meta[grib_yy_c];
|
||||
}
|
||||
grib_yy_current_state = grib_yy_nxt[grib_yy_base[grib_yy_current_state] + (flex_int16_t) grib_yy_c];
|
||||
grib_yy_current_state = grib_yy_nxt[grib_yy_base[grib_yy_current_state] + grib_yy_c];
|
||||
grib_yy_is_jam = (grib_yy_current_state == 797);
|
||||
|
||||
return grib_yy_is_jam ? 0 : grib_yy_current_state;
|
||||
}
|
||||
|
||||
void grib_yyunput (int c, register char * grib_yy_bp )
|
||||
#ifndef YY_NO_UNPUT
|
||||
|
||||
void grib_yyunput (int c, char * grib_yy_bp )
|
||||
{
|
||||
register char *grib_yy_cp;
|
||||
char *grib_yy_cp;
|
||||
|
||||
grib_yy_cp = (grib_yy_c_buf_p);
|
||||
|
||||
|
@ -2556,10 +2564,10 @@ static int grib_yy_get_next_buffer (void)
|
|||
if ( grib_yy_cp < YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf + 2 )
|
||||
{ /* need to shift things up to make room */
|
||||
/* +2 for EOB chars. */
|
||||
register int number_to_move = (grib_yy_n_chars) + 2;
|
||||
register char *dest = &YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf[
|
||||
int number_to_move = (grib_yy_n_chars) + 2;
|
||||
char *dest = &YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf[
|
||||
YY_CURRENT_BUFFER_LVALUE->grib_yy_buf_size + 2];
|
||||
register char *source =
|
||||
char *source =
|
||||
&YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf[number_to_move];
|
||||
|
||||
while ( source > YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf )
|
||||
|
@ -2581,6 +2589,8 @@ static int grib_yy_get_next_buffer (void)
|
|||
(grib_yy_c_buf_p) = grib_yy_cp;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef YY_NO_INPUT
|
||||
#ifdef __cplusplus
|
||||
static int grib_yyinput (void)
|
||||
|
@ -2605,7 +2615,7 @@ static int grib_yy_get_next_buffer (void)
|
|||
|
||||
else
|
||||
{ /* need more input */
|
||||
grib_yy_size_t offset = (grib_yy_c_buf_p) - (grib_yytext_ptr);
|
||||
int offset = (int) ((grib_yy_c_buf_p) - (grib_yytext_ptr));
|
||||
++(grib_yy_c_buf_p);
|
||||
|
||||
switch ( grib_yy_get_next_buffer( ) )
|
||||
|
@ -2622,14 +2632,14 @@ static int grib_yy_get_next_buffer (void)
|
|||
*/
|
||||
|
||||
/* Reset buffer status. */
|
||||
grib_yyrestart(grib_yyin );
|
||||
grib_yyrestart( grib_yyin );
|
||||
|
||||
/*FALLTHROUGH*/
|
||||
|
||||
case EOB_ACT_END_OF_FILE:
|
||||
{
|
||||
if ( grib_yywrap( ) )
|
||||
return EOF;
|
||||
return 0;
|
||||
|
||||
if ( ! (grib_yy_did_buffer_switch_on_eof) )
|
||||
YY_NEW_FILE;
|
||||
|
@ -2666,10 +2676,10 @@ static int grib_yy_get_next_buffer (void)
|
|||
if ( ! YY_CURRENT_BUFFER ){
|
||||
grib_yyensure_buffer_stack ();
|
||||
YY_CURRENT_BUFFER_LVALUE =
|
||||
grib_yy_create_buffer(grib_yyin,YY_BUF_SIZE );
|
||||
grib_yy_create_buffer( grib_yyin, YY_BUF_SIZE );
|
||||
}
|
||||
|
||||
grib_yy_init_buffer(YY_CURRENT_BUFFER,input_file );
|
||||
grib_yy_init_buffer( YY_CURRENT_BUFFER, input_file );
|
||||
grib_yy_load_buffer_state( );
|
||||
}
|
||||
|
||||
|
@ -2726,7 +2736,7 @@ static void grib_yy_load_buffer_state (void)
|
|||
{
|
||||
YY_BUFFER_STATE b;
|
||||
|
||||
b = (YY_BUFFER_STATE) grib_yyalloc(sizeof( struct grib_yy_buffer_state ) );
|
||||
b = (YY_BUFFER_STATE) grib_yyalloc( sizeof( struct grib_yy_buffer_state ) );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in grib_yy_create_buffer()" );
|
||||
|
||||
|
@ -2735,13 +2745,13 @@ static void grib_yy_load_buffer_state (void)
|
|||
/* grib_yy_ch_buf has to be 2 characters longer than the size given because
|
||||
* we need to put in 2 end-of-buffer characters.
|
||||
*/
|
||||
b->grib_yy_ch_buf = (char *) grib_yyalloc(b->grib_yy_buf_size + 2 );
|
||||
b->grib_yy_ch_buf = (char *) grib_yyalloc( (grib_yy_size_t) (b->grib_yy_buf_size + 2) );
|
||||
if ( ! b->grib_yy_ch_buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in grib_yy_create_buffer()" );
|
||||
|
||||
b->grib_yy_is_our_buffer = 1;
|
||||
|
||||
grib_yy_init_buffer(b,file );
|
||||
grib_yy_init_buffer( b, file );
|
||||
|
||||
return b;
|
||||
}
|
||||
|
@ -2760,9 +2770,9 @@ static void grib_yy_load_buffer_state (void)
|
|||
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
||||
|
||||
if ( b->grib_yy_is_our_buffer )
|
||||
grib_yyfree((void *) b->grib_yy_ch_buf );
|
||||
grib_yyfree( (void *) b->grib_yy_ch_buf );
|
||||
|
||||
grib_yyfree((void *) b );
|
||||
grib_yyfree( (void *) b );
|
||||
}
|
||||
|
||||
/* Initializes or reinitializes a buffer.
|
||||
|
@ -2774,7 +2784,7 @@ static void grib_yy_load_buffer_state (void)
|
|||
{
|
||||
int oerrno = errno;
|
||||
|
||||
grib_yy_flush_buffer(b );
|
||||
grib_yy_flush_buffer( b );
|
||||
|
||||
b->grib_yy_input_file = file;
|
||||
b->grib_yy_fill_buffer = 1;
|
||||
|
@ -2885,7 +2895,7 @@ static void grib_yyensure_buffer_stack (void)
|
|||
* scanner will even need a stack. We use 2 instead of 1 to avoid an
|
||||
* immediate realloc on the next call.
|
||||
*/
|
||||
num_to_alloc = 1;
|
||||
num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
|
||||
(grib_yy_buffer_stack) = (struct grib_yy_buffer_state**)grib_yyalloc
|
||||
(num_to_alloc * sizeof(struct grib_yy_buffer_state*)
|
||||
);
|
||||
|
@ -2902,7 +2912,7 @@ static void grib_yyensure_buffer_stack (void)
|
|||
if ((grib_yy_buffer_stack_top) >= ((grib_yy_buffer_stack_max)) - 1){
|
||||
|
||||
/* Increase the buffer to prepare for a possible push. */
|
||||
int grow_size = 8 /* arbitrary grow size */;
|
||||
grib_yy_size_t grow_size = 8 /* arbitrary grow size */;
|
||||
|
||||
num_to_alloc = (grib_yy_buffer_stack_max) + grow_size;
|
||||
(grib_yy_buffer_stack) = (struct grib_yy_buffer_state**)grib_yyrealloc
|
||||
|
@ -2932,23 +2942,23 @@ YY_BUFFER_STATE grib_yy_scan_buffer (char * base, grib_yy_size_t size )
|
|||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
||||
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
||||
/* They forgot to leave room for the EOB's. */
|
||||
return 0;
|
||||
return NULL;
|
||||
|
||||
b = (YY_BUFFER_STATE) grib_yyalloc(sizeof( struct grib_yy_buffer_state ) );
|
||||
b = (YY_BUFFER_STATE) grib_yyalloc( sizeof( struct grib_yy_buffer_state ) );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in grib_yy_scan_buffer()" );
|
||||
|
||||
b->grib_yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
|
||||
b->grib_yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
|
||||
b->grib_yy_buf_pos = b->grib_yy_ch_buf = base;
|
||||
b->grib_yy_is_our_buffer = 0;
|
||||
b->grib_yy_input_file = 0;
|
||||
b->grib_yy_input_file = NULL;
|
||||
b->grib_yy_n_chars = b->grib_yy_buf_size;
|
||||
b->grib_yy_is_interactive = 0;
|
||||
b->grib_yy_at_bol = 1;
|
||||
b->grib_yy_fill_buffer = 0;
|
||||
b->grib_yy_buffer_status = YY_BUFFER_NEW;
|
||||
|
||||
grib_yy_switch_to_buffer(b );
|
||||
grib_yy_switch_to_buffer( b );
|
||||
|
||||
return b;
|
||||
}
|
||||
|
@ -2961,10 +2971,10 @@ YY_BUFFER_STATE grib_yy_scan_buffer (char * base, grib_yy_size_t size )
|
|||
* @note If you want to scan bytes that may contain NUL values, then use
|
||||
* grib_yy_scan_bytes() instead.
|
||||
*/
|
||||
YY_BUFFER_STATE grib_yy_scan_string (grib_yyconst char * grib_yystr )
|
||||
YY_BUFFER_STATE grib_yy_scan_string (const char * grib_yystr )
|
||||
{
|
||||
|
||||
return grib_yy_scan_bytes(grib_yystr,(int) strlen(grib_yystr) );
|
||||
return grib_yy_scan_bytes( grib_yystr, (int) strlen(grib_yystr) );
|
||||
}
|
||||
|
||||
/** Setup the input buffer state to scan the given bytes. The next call to grib_yylex() will
|
||||
|
@ -2974,7 +2984,7 @@ YY_BUFFER_STATE grib_yy_scan_string (grib_yyconst char * grib_yystr )
|
|||
*
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
YY_BUFFER_STATE grib_yy_scan_bytes (grib_yyconst char * grib_yybytes, grib_yy_size_t _grib_yybytes_len )
|
||||
YY_BUFFER_STATE grib_yy_scan_bytes (const char * grib_yybytes, int _grib_yybytes_len )
|
||||
{
|
||||
YY_BUFFER_STATE b;
|
||||
char *buf;
|
||||
|
@ -2982,8 +2992,8 @@ YY_BUFFER_STATE grib_yy_scan_bytes (grib_yyconst char * grib_yybytes, grib_yy_s
|
|||
int i;
|
||||
|
||||
/* Get memory for full buffer, including space for trailing EOB's. */
|
||||
n = (grib_yy_size_t) _grib_yybytes_len + 2;
|
||||
buf = (char *) grib_yyalloc(n );
|
||||
n = (grib_yy_size_t) (_grib_yybytes_len + 2);
|
||||
buf = (char *) grib_yyalloc( n );
|
||||
if ( ! buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in grib_yy_scan_bytes()" );
|
||||
|
||||
|
@ -2992,7 +3002,7 @@ YY_BUFFER_STATE grib_yy_scan_bytes (grib_yyconst char * grib_yybytes, grib_yy_s
|
|||
|
||||
buf[_grib_yybytes_len] = buf[_grib_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
|
||||
|
||||
b = grib_yy_scan_buffer(buf,n );
|
||||
b = grib_yy_scan_buffer( buf, n );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "bad buffer in grib_yy_scan_bytes()" );
|
||||
|
||||
|
@ -3008,9 +3018,9 @@ YY_BUFFER_STATE grib_yy_scan_bytes (grib_yyconst char * grib_yybytes, grib_yy_s
|
|||
#define YY_EXIT_FAILURE 2
|
||||
#endif
|
||||
|
||||
static void grib_yy_fatal_error (grib_yyconst char* msg )
|
||||
static void grib_yynoreturn grib_yy_fatal_error (const char* msg )
|
||||
{
|
||||
(void) fprintf( stderr, "%s\n", msg );
|
||||
fprintf( stderr, "%s\n", msg );
|
||||
exit( YY_EXIT_FAILURE );
|
||||
}
|
||||
|
||||
|
@ -3061,7 +3071,7 @@ FILE *grib_yyget_out (void)
|
|||
/** Get the length of the current token.
|
||||
*
|
||||
*/
|
||||
grib_yy_size_t grib_yyget_leng (void)
|
||||
int grib_yyget_leng (void)
|
||||
{
|
||||
return grib_yyleng;
|
||||
}
|
||||
|
@ -3076,29 +3086,29 @@ char *grib_yyget_text (void)
|
|||
}
|
||||
|
||||
/** Set the current line number.
|
||||
* @param line_number
|
||||
* @param _line_number line number
|
||||
*
|
||||
*/
|
||||
void grib_yyset_lineno (int line_number )
|
||||
void grib_yyset_lineno (int _line_number )
|
||||
{
|
||||
|
||||
grib_yylineno = line_number;
|
||||
grib_yylineno = _line_number;
|
||||
}
|
||||
|
||||
/** Set the input stream. This does not discard the current
|
||||
* input buffer.
|
||||
* @param in_str A readable stream.
|
||||
* @param _in_str A readable stream.
|
||||
*
|
||||
* @see grib_yy_switch_to_buffer
|
||||
*/
|
||||
void grib_yyset_in (FILE * in_str )
|
||||
void grib_yyset_in (FILE * _in_str )
|
||||
{
|
||||
grib_yyin = in_str ;
|
||||
grib_yyin = _in_str ;
|
||||
}
|
||||
|
||||
void grib_yyset_out (FILE * out_str )
|
||||
void grib_yyset_out (FILE * _out_str )
|
||||
{
|
||||
grib_yyout = out_str ;
|
||||
grib_yyout = _out_str ;
|
||||
}
|
||||
|
||||
int grib_yyget_debug (void)
|
||||
|
@ -3106,9 +3116,9 @@ int grib_yyget_debug (void)
|
|||
return grib_yy_flex_debug;
|
||||
}
|
||||
|
||||
void grib_yyset_debug (int bdebug )
|
||||
void grib_yyset_debug (int _bdebug )
|
||||
{
|
||||
grib_yy_flex_debug = bdebug ;
|
||||
grib_yy_flex_debug = _bdebug ;
|
||||
}
|
||||
|
||||
static int grib_yy_init_globals (void)
|
||||
|
@ -3117,10 +3127,10 @@ static int grib_yy_init_globals (void)
|
|||
* This function is called from grib_yylex_destroy(), so don't allocate here.
|
||||
*/
|
||||
|
||||
(grib_yy_buffer_stack) = 0;
|
||||
(grib_yy_buffer_stack) = NULL;
|
||||
(grib_yy_buffer_stack_top) = 0;
|
||||
(grib_yy_buffer_stack_max) = 0;
|
||||
(grib_yy_c_buf_p) = (char *) 0;
|
||||
(grib_yy_c_buf_p) = NULL;
|
||||
(grib_yy_init) = 0;
|
||||
(grib_yy_start) = 0;
|
||||
|
||||
|
@ -3129,8 +3139,8 @@ static int grib_yy_init_globals (void)
|
|||
grib_yyin = stdin;
|
||||
grib_yyout = stdout;
|
||||
#else
|
||||
grib_yyin = (FILE *) 0;
|
||||
grib_yyout = (FILE *) 0;
|
||||
grib_yyin = NULL;
|
||||
grib_yyout = NULL;
|
||||
#endif
|
||||
|
||||
/* For future reference: Set errno on error, since we are called by
|
||||
|
@ -3145,7 +3155,7 @@ int grib_yylex_destroy (void)
|
|||
|
||||
/* Pop the buffer stack, destroying each element. */
|
||||
while(YY_CURRENT_BUFFER){
|
||||
grib_yy_delete_buffer(YY_CURRENT_BUFFER );
|
||||
grib_yy_delete_buffer( YY_CURRENT_BUFFER );
|
||||
YY_CURRENT_BUFFER_LVALUE = NULL;
|
||||
grib_yypop_buffer_state();
|
||||
}
|
||||
|
@ -3166,18 +3176,19 @@ int grib_yylex_destroy (void)
|
|||
*/
|
||||
|
||||
#ifndef grib_yytext_ptr
|
||||
static void grib_yy_flex_strncpy (char* s1, grib_yyconst char * s2, int n )
|
||||
static void grib_yy_flex_strncpy (char* s1, const char * s2, int n )
|
||||
{
|
||||
register int i;
|
||||
|
||||
int i;
|
||||
for ( i = 0; i < n; ++i )
|
||||
s1[i] = s2[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef YY_NEED_STRLEN
|
||||
static int grib_yy_flex_strlen (grib_yyconst char * s )
|
||||
static int grib_yy_flex_strlen (const char * s )
|
||||
{
|
||||
register int n;
|
||||
int n;
|
||||
for ( n = 0; s[n]; ++n )
|
||||
;
|
||||
|
||||
|
@ -3187,11 +3198,12 @@ static int grib_yy_flex_strlen (grib_yyconst char * s )
|
|||
|
||||
void *grib_yyalloc (grib_yy_size_t size )
|
||||
{
|
||||
return (void *) malloc( size );
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void *grib_yyrealloc (void * ptr, grib_yy_size_t size )
|
||||
{
|
||||
|
||||
/* The cast to (char *) in the following accommodates both
|
||||
* implementations that use char* generic pointers, and those
|
||||
* that use void* generic pointers. It works with the latter
|
||||
|
@ -3199,7 +3211,7 @@ void *grib_yyrealloc (void * ptr, grib_yy_size_t size )
|
|||
* any pointer type to void*, and deal with argument conversions
|
||||
* as though doing an assignment.
|
||||
*/
|
||||
return (void *) realloc( (char *) ptr, size );
|
||||
return realloc(ptr, size);
|
||||
}
|
||||
|
||||
void grib_yyfree (void * ptr )
|
||||
|
@ -3213,4 +3225,3 @@ void grib_yyfree (void * ptr )
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue