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
289
src/grib_lex.c
289
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
|
#define YY_INT_ALIGNED short int
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@
|
||||||
|
|
||||||
#define FLEX_SCANNER
|
#define FLEX_SCANNER
|
||||||
#define YY_FLEX_MAJOR_VERSION 2
|
#define YY_FLEX_MAJOR_VERSION 2
|
||||||
#define YY_FLEX_MINOR_VERSION 5
|
#define YY_FLEX_MINOR_VERSION 6
|
||||||
#define YY_FLEX_SUBMINOR_VERSION 37
|
#define YY_FLEX_SUBMINOR_VERSION 4
|
||||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||||
#define FLEX_BETA
|
#define FLEX_BETA
|
||||||
#endif
|
#endif
|
||||||
|
@ -84,65 +84,61 @@ typedef unsigned int flex_uint32_t;
|
||||||
#define UINT32_MAX (4294967295U)
|
#define UINT32_MAX (4294967295U)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef SIZE_MAX
|
||||||
|
#define SIZE_MAX (~(size_t)0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* ! C99 */
|
#endif /* ! C99 */
|
||||||
|
|
||||||
#endif /* ! FLEXINT_H */
|
#endif /* ! FLEXINT_H */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
/* begin standard C++ headers. */
|
||||||
|
|
||||||
/* The "const" storage-class-modifier is valid. */
|
/* TODO: this is always defined, so inline it */
|
||||||
#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
|
|
||||||
#define grib_yyconst const
|
#define grib_yyconst const
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && __GNUC__ >= 3
|
||||||
|
#define grib_yynoreturn __attribute__((__noreturn__))
|
||||||
#else
|
#else
|
||||||
#define grib_yyconst
|
#define grib_yynoreturn
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Returned upon end-of-file. */
|
/* Returned upon end-of-file. */
|
||||||
#define YY_NULL 0
|
#define YY_NULL 0
|
||||||
|
|
||||||
/* Promotes a possibly negative, possibly signed char to an unsigned
|
/* Promotes a possibly negative, possibly signed char to an
|
||||||
* integer for use as an array index. If the signed char is negative,
|
* integer in range [0..255] for use as an array index.
|
||||||
* we want to instead treat it as an 8-bit unsigned char, hence the
|
|
||||||
* double cast.
|
|
||||||
*/
|
*/
|
||||||
#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,
|
/* 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
|
* but we do it the disgusting crufty way forced on us by the ()-less
|
||||||
* definition of BEGIN.
|
* definition of BEGIN.
|
||||||
*/
|
*/
|
||||||
#define BEGIN (grib_yy_start) = 1 + 2 *
|
#define BEGIN (grib_yy_start) = 1 + 2 *
|
||||||
|
|
||||||
/* Translate the current start state into a value that can be later handed
|
/* 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
|
* to BEGIN to return to the state. The YYSTATE alias is for lex
|
||||||
* compatibility.
|
* compatibility.
|
||||||
*/
|
*/
|
||||||
#define YY_START (((grib_yy_start) - 1) / 2)
|
#define YY_START (((grib_yy_start) - 1) / 2)
|
||||||
#define YYSTATE YY_START
|
#define YYSTATE YY_START
|
||||||
|
|
||||||
/* Action number for EOF rule of a given start state. */
|
/* Action number for EOF rule of a given start state. */
|
||||||
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
||||||
|
|
||||||
/* Special action meaning "start processing a new file". */
|
/* 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
|
#define YY_END_OF_BUFFER_CHAR 0
|
||||||
|
|
||||||
/* Size of default input buffer. */
|
/* Size of default input buffer. */
|
||||||
#ifndef YY_BUF_SIZE
|
#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
|
#define YY_BUF_SIZE 16384
|
||||||
|
#endif /* __ia64__ */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The state buf must be large enough to hold one state per character in the main buffer.
|
/* 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;
|
typedef size_t grib_yy_size_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern grib_yy_size_t grib_yyleng;
|
extern int grib_yyleng;
|
||||||
|
|
||||||
extern FILE *grib_yyin, *grib_yyout;
|
extern FILE *grib_yyin, *grib_yyout;
|
||||||
|
|
||||||
|
@ -168,6 +164,7 @@ extern FILE *grib_yyin, *grib_yyout;
|
||||||
#define EOB_ACT_LAST_MATCH 2
|
#define EOB_ACT_LAST_MATCH 2
|
||||||
|
|
||||||
#define YY_LESS_LINENO(n)
|
#define YY_LESS_LINENO(n)
|
||||||
|
#define YY_LINENO_REWIND_TO(ptr)
|
||||||
|
|
||||||
/* Return all but the first "n" matched characters back to the input stream. */
|
/* Return all but the first "n" matched characters back to the input stream. */
|
||||||
#define grib_yyless(n) \
|
#define grib_yyless(n) \
|
||||||
|
@ -182,7 +179,6 @@ extern FILE *grib_yyin, *grib_yyout;
|
||||||
YY_DO_BEFORE_ACTION; /* set up grib_yytext again */ \
|
YY_DO_BEFORE_ACTION; /* set up grib_yytext again */ \
|
||||||
} \
|
} \
|
||||||
while ( 0 )
|
while ( 0 )
|
||||||
|
|
||||||
#define unput(c) grib_yyunput( c, (grib_yytext_ptr) )
|
#define unput(c) grib_yyunput( c, (grib_yytext_ptr) )
|
||||||
|
|
||||||
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
||||||
|
@ -253,7 +249,7 @@ struct grib_yy_buffer_state
|
||||||
/* Stack of input buffers. */
|
/* 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_top = 0; /**< index of top of stack. */
|
||||||
static size_t grib_yy_buffer_stack_max = 0; /**< capacity 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
|
/* We provide macros for accessing buffer states in case in the
|
||||||
* future we want to put the buffer states in a more general
|
* 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) \
|
#define YY_CURRENT_BUFFER ( (grib_yy_buffer_stack) \
|
||||||
? (grib_yy_buffer_stack)[(grib_yy_buffer_stack_top)] \
|
? (grib_yy_buffer_stack)[(grib_yy_buffer_stack_top)] \
|
||||||
: NULL)
|
: NULL)
|
||||||
|
|
||||||
/* Same as previous macro, but useful when we know that the buffer stack is not
|
/* 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.
|
* 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. */
|
/* grib_yy_hold_char holds the character lost when grib_yytext is formed. */
|
||||||
static char grib_yy_hold_char;
|
static char grib_yy_hold_char;
|
||||||
static int grib_yy_n_chars; /* number of characters read into grib_yy_ch_buf */
|
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. */
|
/* 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_init = 0; /* whether we need to initialize */
|
||||||
static int grib_yy_start = 0; /* start state number */
|
static int grib_yy_start = 0; /* start state number */
|
||||||
|
|
||||||
|
@ -296,19 +291,17 @@ void grib_yypop_buffer_state (void );
|
||||||
static void grib_yyensure_buffer_stack ( void );
|
static void grib_yyensure_buffer_stack ( void );
|
||||||
static void grib_yy_load_buffer_state ( void );
|
static void grib_yy_load_buffer_state ( void );
|
||||||
static void grib_yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
|
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_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_string ( const char *grib_yy_str );
|
||||||
YY_BUFFER_STATE grib_yy_scan_bytes (grib_yyconst char *bytes,grib_yy_size_t len );
|
YY_BUFFER_STATE grib_yy_scan_bytes ( const char *bytes, int len );
|
||||||
|
|
||||||
void *grib_yyalloc ( grib_yy_size_t );
|
void *grib_yyalloc ( grib_yy_size_t );
|
||||||
void *grib_yyrealloc ( void *, grib_yy_size_t );
|
void *grib_yyrealloc ( void *, grib_yy_size_t );
|
||||||
void grib_yyfree ( void * );
|
void grib_yyfree ( void * );
|
||||||
|
|
||||||
#define grib_yy_new_buffer grib_yy_create_buffer
|
#define grib_yy_new_buffer grib_yy_create_buffer
|
||||||
|
|
||||||
#define grib_yy_set_interactive(is_interactive) \
|
#define grib_yy_set_interactive(is_interactive) \
|
||||||
{ \
|
{ \
|
||||||
if ( ! YY_CURRENT_BUFFER ){ \
|
if ( ! YY_CURRENT_BUFFER ){ \
|
||||||
|
@ -318,7 +311,6 @@ void grib_yyfree (void * );
|
||||||
} \
|
} \
|
||||||
YY_CURRENT_BUFFER_LVALUE->grib_yy_is_interactive = is_interactive; \
|
YY_CURRENT_BUFFER_LVALUE->grib_yy_is_interactive = is_interactive; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define grib_yy_set_bol(at_bol) \
|
#define grib_yy_set_bol(at_bol) \
|
||||||
{ \
|
{ \
|
||||||
if ( ! YY_CURRENT_BUFFER ){\
|
if ( ! YY_CURRENT_BUFFER ){\
|
||||||
|
@ -328,28 +320,28 @@ void grib_yyfree (void * );
|
||||||
} \
|
} \
|
||||||
YY_CURRENT_BUFFER_LVALUE->grib_yy_at_bol = at_bol; \
|
YY_CURRENT_BUFFER_LVALUE->grib_yy_at_bol = at_bol; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->grib_yy_at_bol)
|
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->grib_yy_at_bol)
|
||||||
|
|
||||||
/* Begin user sect3 */
|
/* Begin user sect3 */
|
||||||
|
typedef flex_uint8_t YY_CHAR;
|
||||||
|
|
||||||
typedef unsigned char YY_CHAR;
|
FILE *grib_yyin = NULL, *grib_yyout = NULL;
|
||||||
|
|
||||||
FILE *grib_yyin = (FILE *) 0, *grib_yyout = (FILE *) 0;
|
|
||||||
|
|
||||||
typedef int grib_yy_state_type;
|
typedef int grib_yy_state_type;
|
||||||
|
|
||||||
extern int grib_yylineno;
|
extern int grib_yylineno;
|
||||||
|
|
||||||
int grib_yylineno = 1;
|
int grib_yylineno = 1;
|
||||||
|
|
||||||
extern char *grib_yytext;
|
extern char *grib_yytext;
|
||||||
|
#ifdef grib_yytext_ptr
|
||||||
|
#undef grib_yytext_ptr
|
||||||
|
#endif
|
||||||
#define grib_yytext_ptr grib_yytext
|
#define grib_yytext_ptr grib_yytext
|
||||||
|
|
||||||
static grib_yy_state_type grib_yy_get_previous_state ( void );
|
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 grib_yy_state_type grib_yy_try_NUL_trans ( grib_yy_state_type current_state );
|
||||||
static int grib_yy_get_next_buffer ( void );
|
static int grib_yy_get_next_buffer ( void );
|
||||||
static void grib_yy_fatal_error (grib_yyconst char msg[] );
|
static void grib_yynoreturn grib_yy_fatal_error ( const char* msg );
|
||||||
|
|
||||||
/* Done after the current pattern has been matched and before the
|
/* Done after the current pattern has been matched and before the
|
||||||
* corresponding action - sets up grib_yytext.
|
* 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_hold_char) = *grib_yy_cp; \
|
||||||
*grib_yy_cp = '\0'; \
|
*grib_yy_cp = '\0'; \
|
||||||
(grib_yy_c_buf_p) = grib_yy_cp;
|
(grib_yy_c_buf_p) = grib_yy_cp;
|
||||||
|
|
||||||
#define YY_NUM_RULES 138
|
#define YY_NUM_RULES 138
|
||||||
#define YY_END_OF_BUFFER 139
|
#define YY_END_OF_BUFFER 139
|
||||||
/* This struct is not used in this scanner,
|
/* 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_verify;
|
||||||
flex_int32_t grib_yy_nxt;
|
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,
|
{ 0,
|
||||||
135, 135, 139, 137, 135, 136, 12, 126, 134, 137,
|
135, 135, 139, 137, 135, 136, 12, 126, 134, 137,
|
||||||
137, 137, 137, 129, 5, 137, 3, 128, 128, 128,
|
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,
|
{ 0,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
||||||
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
|
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
|
1, 1, 1, 1, 1
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static grib_yyconst flex_int32_t grib_yy_meta[57] =
|
static const YY_CHAR grib_yy_meta[57] =
|
||||||
{ 0,
|
{ 0,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
||||||
4, 5, 6, 6, 6, 6, 6, 6, 6, 1,
|
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
|
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, 0, 1944, 1945, 1941, 1945, 1921, 1945, 44, 1934,
|
0, 0, 1944, 1945, 1941, 1945, 1921, 1945, 44, 1934,
|
||||||
51, 58, 0, 69, 68, 1919, 1918, 81, 96, 76,
|
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
|
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,
|
{ 0,
|
||||||
797, 1, 797, 797, 797, 797, 797, 797, 797, 797,
|
797, 1, 797, 797, 797, 797, 797, 797, 797, 797,
|
||||||
797, 797, 798, 799, 797, 797, 797, 800, 800, 19,
|
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
|
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,
|
{ 0,
|
||||||
4, 5, 6, 7, 8, 9, 10, 8, 11, 11,
|
4, 5, 6, 7, 8, 9, 10, 8, 11, 11,
|
||||||
12, 13, 14, 14, 14, 14, 14, 14, 14, 15,
|
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
|
797
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
static grib_yyconst flex_int16_t grib_yy_chk[2002] =
|
static const flex_int16_t grib_yy_chk[2002] =
|
||||||
{ 0,
|
{ 0,
|
||||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
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
|
#define GET_INPUT input
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#line 1211 "gribl.c"
|
#line 1201 "gribl.c"
|
||||||
|
#line 1202 "gribl.c"
|
||||||
|
|
||||||
#define INITIAL 0
|
#define INITIAL 0
|
||||||
|
|
||||||
|
@ -1240,19 +1232,19 @@ 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
|
/* Macros after this point can all be overridden by user definitions in
|
||||||
* section 1.
|
* section 1.
|
||||||
|
@ -1266,18 +1258,21 @@ extern int grib_yywrap (void );
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef YY_NO_UNPUT
|
||||||
|
|
||||||
void grib_yyunput ( int c, char *buf_ptr );
|
void grib_yyunput ( int c, char *buf_ptr );
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef grib_yytext_ptr
|
#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
|
#endif
|
||||||
|
|
||||||
#ifdef YY_NEED_STRLEN
|
#ifdef YY_NEED_STRLEN
|
||||||
static int grib_yy_flex_strlen (grib_yyconst char * );
|
static int grib_yy_flex_strlen ( const char * );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef YY_NO_INPUT
|
#ifndef YY_NO_INPUT
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
static int grib_yyinput ( void );
|
static int grib_yyinput ( void );
|
||||||
#else
|
#else
|
||||||
|
@ -1288,7 +1283,12 @@ static int input (void );
|
||||||
|
|
||||||
/* Amount of stuff to slurp up with each read. */
|
/* Amount of stuff to slurp up with each read. */
|
||||||
#ifndef YY_READ_BUF_SIZE
|
#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
|
#define YY_READ_BUF_SIZE 8192
|
||||||
|
#endif /* __ia64__ */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Copy whatever the last rule matched to the standard output. */
|
/* 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,
|
/* This used to be an fputs(), but since the string might contain NUL's,
|
||||||
* we now use fwrite().
|
* 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
|
#endif
|
||||||
|
|
||||||
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
/* 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 ) \
|
if ( YY_CURRENT_BUFFER_LVALUE->grib_yy_is_interactive ) \
|
||||||
{ \
|
{ \
|
||||||
int c = '*'; \
|
int c = '*'; \
|
||||||
size_t n; \
|
int n; \
|
||||||
for ( n = 0; n < max_size && \
|
for ( n = 0; n < max_size && \
|
||||||
(c = getc( grib_yyin )) != EOF && c != '\n'; ++n ) \
|
(c = getc( grib_yyin )) != EOF && c != '\n'; ++n ) \
|
||||||
buf[n] = (char) c; \
|
buf[n] = (char) c; \
|
||||||
|
@ -1320,7 +1320,7 @@ static int input (void );
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
errno=0; \
|
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) \
|
if( errno != EINTR) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -1375,7 +1375,7 @@ extern int grib_yylex (void);
|
||||||
|
|
||||||
/* Code executed at the end of each rule. */
|
/* Code executed at the end of each rule. */
|
||||||
#ifndef YY_BREAK
|
#ifndef YY_BREAK
|
||||||
#define YY_BREAK break;
|
#define YY_BREAK /*LINTED*/break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define YY_RULE_SETUP \
|
#define YY_RULE_SETUP \
|
||||||
|
@ -1385,15 +1385,9 @@ extern int grib_yylex (void);
|
||||||
*/
|
*/
|
||||||
YY_DECL
|
YY_DECL
|
||||||
{
|
{
|
||||||
register grib_yy_state_type grib_yy_current_state;
|
grib_yy_state_type grib_yy_current_state;
|
||||||
register char *grib_yy_cp, *grib_yy_bp;
|
char *grib_yy_cp, *grib_yy_bp;
|
||||||
register int grib_yy_act;
|
int grib_yy_act;
|
||||||
|
|
||||||
#line 71 "gribl.l"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#line 1397 "gribl.c"
|
|
||||||
|
|
||||||
if ( !(grib_yy_init) )
|
if ( !(grib_yy_init) )
|
||||||
{
|
{
|
||||||
|
@ -1421,7 +1415,14 @@ YY_DECL
|
||||||
grib_yy_load_buffer_state( );
|
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);
|
grib_yy_cp = (grib_yy_c_buf_p);
|
||||||
|
|
||||||
|
@ -1437,7 +1438,7 @@ YY_DECL
|
||||||
grib_yy_match:
|
grib_yy_match:
|
||||||
do
|
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] )
|
if ( grib_yy_accept[grib_yy_current_state] )
|
||||||
{
|
{
|
||||||
(grib_yy_last_accepting_state) = 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];
|
grib_yy_current_state = (int) grib_yy_def[grib_yy_current_state];
|
||||||
if ( grib_yy_current_state >= 798 )
|
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;
|
++grib_yy_cp;
|
||||||
}
|
}
|
||||||
while ( grib_yy_base[grib_yy_current_state] != 1945 );
|
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" );
|
"fatal flex scanner internal error--no action found" );
|
||||||
} /* end of action switch */
|
} /* end of action switch */
|
||||||
} /* end of scanning one token */
|
} /* end of scanning one token */
|
||||||
|
} /* end of user's declarations */
|
||||||
} /* end of grib_yylex */
|
} /* end of grib_yylex */
|
||||||
|
|
||||||
/* grib_yy_get_next_buffer - try to read in a new buffer
|
/* 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)
|
static int grib_yy_get_next_buffer (void)
|
||||||
{
|
{
|
||||||
register char *dest = YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf;
|
char *dest = YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf;
|
||||||
register char *source = (grib_yytext_ptr);
|
char *source = (grib_yytext_ptr);
|
||||||
register int number_to_move, i;
|
int number_to_move, i;
|
||||||
int ret_val;
|
int ret_val;
|
||||||
|
|
||||||
if ( (grib_yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf[(grib_yy_n_chars) + 1] )
|
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. */
|
/* Try to read more data. */
|
||||||
|
|
||||||
/* First move last chars to start of buffer. */
|
/* 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 )
|
for ( i = 0; i < number_to_move; ++i )
|
||||||
*(dest++) = *(source++);
|
*(dest++) = *(source++);
|
||||||
|
@ -2415,7 +2417,7 @@ static int grib_yy_get_next_buffer (void)
|
||||||
|
|
||||||
if ( b->grib_yy_is_our_buffer )
|
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 )
|
if ( new_size <= 0 )
|
||||||
b->grib_yy_buf_size += b->grib_yy_buf_size / 8;
|
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 *)
|
b->grib_yy_ch_buf = (char *)
|
||||||
/* Include room in for 2 EOB chars. */
|
/* 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
|
else
|
||||||
/* Can't grow it, we don't own it. */
|
/* 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 )
|
if ( ! b->grib_yy_ch_buf )
|
||||||
YY_FATAL_ERROR(
|
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];
|
(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;
|
number_to_move - 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2470,12 +2473,15 @@ static int grib_yy_get_next_buffer (void)
|
||||||
else
|
else
|
||||||
ret_val = EOB_ACT_CONTINUE_SCAN;
|
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. */
|
/* 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);
|
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 )
|
if ( ! YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf )
|
||||||
YY_FATAL_ERROR( "out of dynamic memory in grib_yy_get_next_buffer()" );
|
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;
|
(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)
|
static grib_yy_state_type grib_yy_get_previous_state (void)
|
||||||
{
|
{
|
||||||
register grib_yy_state_type grib_yy_current_state;
|
grib_yy_state_type grib_yy_current_state;
|
||||||
register char *grib_yy_cp;
|
char *grib_yy_cp;
|
||||||
|
|
||||||
grib_yy_current_state = (grib_yy_start);
|
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 )
|
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] )
|
if ( grib_yy_accept[grib_yy_current_state] )
|
||||||
{
|
{
|
||||||
(grib_yy_last_accepting_state) = 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];
|
grib_yy_current_state = (int) grib_yy_def[grib_yy_current_state];
|
||||||
if ( grib_yy_current_state >= 798 )
|
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;
|
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 )
|
static grib_yy_state_type grib_yy_try_NUL_trans (grib_yy_state_type grib_yy_current_state )
|
||||||
{
|
{
|
||||||
register int grib_yy_is_jam;
|
int grib_yy_is_jam;
|
||||||
register char *grib_yy_cp = (grib_yy_c_buf_p);
|
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] )
|
if ( grib_yy_accept[grib_yy_current_state] )
|
||||||
{
|
{
|
||||||
(grib_yy_last_accepting_state) = 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];
|
grib_yy_current_state = (int) grib_yy_def[grib_yy_current_state];
|
||||||
if ( grib_yy_current_state >= 798 )
|
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);
|
grib_yy_is_jam = (grib_yy_current_state == 797);
|
||||||
|
|
||||||
return grib_yy_is_jam ? 0 : grib_yy_current_state;
|
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);
|
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 )
|
if ( grib_yy_cp < YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf + 2 )
|
||||||
{ /* need to shift things up to make room */
|
{ /* need to shift things up to make room */
|
||||||
/* +2 for EOB chars. */
|
/* +2 for EOB chars. */
|
||||||
register int number_to_move = (grib_yy_n_chars) + 2;
|
int number_to_move = (grib_yy_n_chars) + 2;
|
||||||
register char *dest = &YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf[
|
char *dest = &YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf[
|
||||||
YY_CURRENT_BUFFER_LVALUE->grib_yy_buf_size + 2];
|
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];
|
&YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf[number_to_move];
|
||||||
|
|
||||||
while ( source > YY_CURRENT_BUFFER_LVALUE->grib_yy_ch_buf )
|
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;
|
(grib_yy_c_buf_p) = grib_yy_cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef YY_NO_INPUT
|
#ifndef YY_NO_INPUT
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
static int grib_yyinput (void)
|
static int grib_yyinput (void)
|
||||||
|
@ -2605,7 +2615,7 @@ static int grib_yy_get_next_buffer (void)
|
||||||
|
|
||||||
else
|
else
|
||||||
{ /* need more input */
|
{ /* 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);
|
++(grib_yy_c_buf_p);
|
||||||
|
|
||||||
switch ( grib_yy_get_next_buffer( ) )
|
switch ( grib_yy_get_next_buffer( ) )
|
||||||
|
@ -2629,7 +2639,7 @@ static int grib_yy_get_next_buffer (void)
|
||||||
case EOB_ACT_END_OF_FILE:
|
case EOB_ACT_END_OF_FILE:
|
||||||
{
|
{
|
||||||
if ( grib_yywrap( ) )
|
if ( grib_yywrap( ) )
|
||||||
return EOF;
|
return 0;
|
||||||
|
|
||||||
if ( ! (grib_yy_did_buffer_switch_on_eof) )
|
if ( ! (grib_yy_did_buffer_switch_on_eof) )
|
||||||
YY_NEW_FILE;
|
YY_NEW_FILE;
|
||||||
|
@ -2735,7 +2745,7 @@ static void grib_yy_load_buffer_state (void)
|
||||||
/* grib_yy_ch_buf has to be 2 characters longer than the size given because
|
/* 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.
|
* 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 )
|
if ( ! b->grib_yy_ch_buf )
|
||||||
YY_FATAL_ERROR( "out of dynamic memory in grib_yy_create_buffer()" );
|
YY_FATAL_ERROR( "out of dynamic memory in grib_yy_create_buffer()" );
|
||||||
|
|
||||||
|
@ -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
|
* scanner will even need a stack. We use 2 instead of 1 to avoid an
|
||||||
* immediate realloc on the next call.
|
* 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
|
(grib_yy_buffer_stack) = (struct grib_yy_buffer_state**)grib_yyalloc
|
||||||
(num_to_alloc * sizeof(struct grib_yy_buffer_state*)
|
(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){
|
if ((grib_yy_buffer_stack_top) >= ((grib_yy_buffer_stack_max)) - 1){
|
||||||
|
|
||||||
/* Increase the buffer to prepare for a possible push. */
|
/* 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;
|
num_to_alloc = (grib_yy_buffer_stack_max) + grow_size;
|
||||||
(grib_yy_buffer_stack) = (struct grib_yy_buffer_state**)grib_yyrealloc
|
(grib_yy_buffer_stack) = (struct grib_yy_buffer_state**)grib_yyrealloc
|
||||||
|
@ -2932,16 +2942,16 @@ YY_BUFFER_STATE grib_yy_scan_buffer (char * base, grib_yy_size_t size )
|
||||||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
base[size-2] != YY_END_OF_BUFFER_CHAR ||
|
||||||
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
base[size-1] != YY_END_OF_BUFFER_CHAR )
|
||||||
/* They forgot to leave room for the EOB's. */
|
/* 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 )
|
if ( ! b )
|
||||||
YY_FATAL_ERROR( "out of dynamic memory in grib_yy_scan_buffer()" );
|
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_buf_pos = b->grib_yy_ch_buf = base;
|
||||||
b->grib_yy_is_our_buffer = 0;
|
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_n_chars = b->grib_yy_buf_size;
|
||||||
b->grib_yy_is_interactive = 0;
|
b->grib_yy_is_interactive = 0;
|
||||||
b->grib_yy_at_bol = 1;
|
b->grib_yy_at_bol = 1;
|
||||||
|
@ -2961,7 +2971,7 @@ 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
|
* @note If you want to scan bytes that may contain NUL values, then use
|
||||||
* grib_yy_scan_bytes() instead.
|
* 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) );
|
||||||
|
@ -2974,7 +2984,7 @@ YY_BUFFER_STATE grib_yy_scan_string (grib_yyconst char * grib_yystr )
|
||||||
*
|
*
|
||||||
* @return the newly allocated buffer state object.
|
* @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;
|
YY_BUFFER_STATE b;
|
||||||
char *buf;
|
char *buf;
|
||||||
|
@ -2982,7 +2992,7 @@ YY_BUFFER_STATE grib_yy_scan_bytes (grib_yyconst char * grib_yybytes, grib_yy_s
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Get memory for full buffer, including space for trailing EOB's. */
|
/* Get memory for full buffer, including space for trailing EOB's. */
|
||||||
n = (grib_yy_size_t) _grib_yybytes_len + 2;
|
n = (grib_yy_size_t) (_grib_yybytes_len + 2);
|
||||||
buf = (char *) grib_yyalloc( n );
|
buf = (char *) grib_yyalloc( n );
|
||||||
if ( ! buf )
|
if ( ! buf )
|
||||||
YY_FATAL_ERROR( "out of dynamic memory in grib_yy_scan_bytes()" );
|
YY_FATAL_ERROR( "out of dynamic memory 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
|
#define YY_EXIT_FAILURE 2
|
||||||
#endif
|
#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 );
|
exit( YY_EXIT_FAILURE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3061,7 +3071,7 @@ FILE *grib_yyget_out (void)
|
||||||
/** Get the length of the current token.
|
/** Get the length of the current token.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
grib_yy_size_t grib_yyget_leng (void)
|
int grib_yyget_leng (void)
|
||||||
{
|
{
|
||||||
return grib_yyleng;
|
return grib_yyleng;
|
||||||
}
|
}
|
||||||
|
@ -3076,29 +3086,29 @@ char *grib_yyget_text (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set the current line number.
|
/** 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
|
/** Set the input stream. This does not discard the current
|
||||||
* input buffer.
|
* input buffer.
|
||||||
* @param in_str A readable stream.
|
* @param _in_str A readable stream.
|
||||||
*
|
*
|
||||||
* @see grib_yy_switch_to_buffer
|
* @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)
|
int grib_yyget_debug (void)
|
||||||
|
@ -3106,9 +3116,9 @@ int grib_yyget_debug (void)
|
||||||
return grib_yy_flex_debug;
|
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)
|
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.
|
* 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_top) = 0;
|
||||||
(grib_yy_buffer_stack_max) = 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_init) = 0;
|
||||||
(grib_yy_start) = 0;
|
(grib_yy_start) = 0;
|
||||||
|
|
||||||
|
@ -3129,8 +3139,8 @@ static int grib_yy_init_globals (void)
|
||||||
grib_yyin = stdin;
|
grib_yyin = stdin;
|
||||||
grib_yyout = stdout;
|
grib_yyout = stdout;
|
||||||
#else
|
#else
|
||||||
grib_yyin = (FILE *) 0;
|
grib_yyin = NULL;
|
||||||
grib_yyout = (FILE *) 0;
|
grib_yyout = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* For future reference: Set errno on error, since we are called by
|
/* For future reference: Set errno on error, since we are called by
|
||||||
|
@ -3166,18 +3176,19 @@ int grib_yylex_destroy (void)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef grib_yytext_ptr
|
#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 )
|
for ( i = 0; i < n; ++i )
|
||||||
s1[i] = s2[i];
|
s1[i] = s2[i];
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef YY_NEED_STRLEN
|
#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 )
|
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 )
|
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 )
|
void *grib_yyrealloc (void * ptr, grib_yy_size_t size )
|
||||||
{
|
{
|
||||||
|
|
||||||
/* The cast to (char *) in the following accommodates both
|
/* The cast to (char *) in the following accommodates both
|
||||||
* implementations that use char* generic pointers, and those
|
* implementations that use char* generic pointers, and those
|
||||||
* that use void* generic pointers. It works with the latter
|
* 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
|
* any pointer type to void*, and deal with argument conversions
|
||||||
* as though doing an assignment.
|
* as though doing an assignment.
|
||||||
*/
|
*/
|
||||||
return (void *) realloc( (char *) ptr, size );
|
return realloc(ptr, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void grib_yyfree (void * ptr )
|
void grib_yyfree (void * ptr )
|
||||||
|
@ -3213,4 +3225,3 @@ void grib_yyfree (void * ptr )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue