mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-21 08:39:46 +08:00
dfc2ac7296
In all these cases the size of the buffer can be computed with sizeof.
3958 lines
126 KiB
C
3958 lines
126 KiB
C
|
|
#line 3 "ncgenl.c"
|
|
|
|
#define YY_INT_ALIGNED short int
|
|
|
|
/* A lexical scanner generated by flex */
|
|
|
|
#define yy_create_buffer ncg_create_buffer
|
|
#define yy_delete_buffer ncg_delete_buffer
|
|
#define yy_scan_buffer ncg_scan_buffer
|
|
#define yy_scan_string ncg_scan_string
|
|
#define yy_scan_bytes ncg_scan_bytes
|
|
#define yy_init_buffer ncg_init_buffer
|
|
#define yy_flush_buffer ncg_flush_buffer
|
|
#define yy_load_buffer_state ncg_load_buffer_state
|
|
#define yy_switch_to_buffer ncg_switch_to_buffer
|
|
#define yypush_buffer_state ncgpush_buffer_state
|
|
#define yypop_buffer_state ncgpop_buffer_state
|
|
#define yyensure_buffer_stack ncgensure_buffer_stack
|
|
#define yy_flex_debug ncg_flex_debug
|
|
#define yyin ncgin
|
|
#define yyleng ncgleng
|
|
#define yylex ncglex
|
|
#define yylineno ncglineno
|
|
#define yyout ncgout
|
|
#define yyrestart ncgrestart
|
|
#define yytext ncgtext
|
|
#define yywrap ncgwrap
|
|
#define yyalloc ncgalloc
|
|
#define yyrealloc ncgrealloc
|
|
#define yyfree ncgfree
|
|
|
|
#define FLEX_SCANNER
|
|
#define YY_FLEX_MAJOR_VERSION 2
|
|
#define YY_FLEX_MINOR_VERSION 6
|
|
#define YY_FLEX_SUBMINOR_VERSION 4
|
|
#if YY_FLEX_SUBMINOR_VERSION > 0
|
|
#define FLEX_BETA
|
|
#endif
|
|
|
|
#ifdef yy_create_buffer
|
|
#define ncg_create_buffer_ALREADY_DEFINED
|
|
#else
|
|
#define yy_create_buffer ncg_create_buffer
|
|
#endif
|
|
|
|
#ifdef yy_delete_buffer
|
|
#define ncg_delete_buffer_ALREADY_DEFINED
|
|
#else
|
|
#define yy_delete_buffer ncg_delete_buffer
|
|
#endif
|
|
|
|
#ifdef yy_scan_buffer
|
|
#define ncg_scan_buffer_ALREADY_DEFINED
|
|
#else
|
|
#define yy_scan_buffer ncg_scan_buffer
|
|
#endif
|
|
|
|
#ifdef yy_scan_string
|
|
#define ncg_scan_string_ALREADY_DEFINED
|
|
#else
|
|
#define yy_scan_string ncg_scan_string
|
|
#endif
|
|
|
|
#ifdef yy_scan_bytes
|
|
#define ncg_scan_bytes_ALREADY_DEFINED
|
|
#else
|
|
#define yy_scan_bytes ncg_scan_bytes
|
|
#endif
|
|
|
|
#ifdef yy_init_buffer
|
|
#define ncg_init_buffer_ALREADY_DEFINED
|
|
#else
|
|
#define yy_init_buffer ncg_init_buffer
|
|
#endif
|
|
|
|
#ifdef yy_flush_buffer
|
|
#define ncg_flush_buffer_ALREADY_DEFINED
|
|
#else
|
|
#define yy_flush_buffer ncg_flush_buffer
|
|
#endif
|
|
|
|
#ifdef yy_load_buffer_state
|
|
#define ncg_load_buffer_state_ALREADY_DEFINED
|
|
#else
|
|
#define yy_load_buffer_state ncg_load_buffer_state
|
|
#endif
|
|
|
|
#ifdef yy_switch_to_buffer
|
|
#define ncg_switch_to_buffer_ALREADY_DEFINED
|
|
#else
|
|
#define yy_switch_to_buffer ncg_switch_to_buffer
|
|
#endif
|
|
|
|
#ifdef yypush_buffer_state
|
|
#define ncgpush_buffer_state_ALREADY_DEFINED
|
|
#else
|
|
#define yypush_buffer_state ncgpush_buffer_state
|
|
#endif
|
|
|
|
#ifdef yypop_buffer_state
|
|
#define ncgpop_buffer_state_ALREADY_DEFINED
|
|
#else
|
|
#define yypop_buffer_state ncgpop_buffer_state
|
|
#endif
|
|
|
|
#ifdef yyensure_buffer_stack
|
|
#define ncgensure_buffer_stack_ALREADY_DEFINED
|
|
#else
|
|
#define yyensure_buffer_stack ncgensure_buffer_stack
|
|
#endif
|
|
|
|
#ifdef yylex
|
|
#define ncglex_ALREADY_DEFINED
|
|
#else
|
|
#define yylex ncglex
|
|
#endif
|
|
|
|
#ifdef yyrestart
|
|
#define ncgrestart_ALREADY_DEFINED
|
|
#else
|
|
#define yyrestart ncgrestart
|
|
#endif
|
|
|
|
#ifdef yylex_init
|
|
#define ncglex_init_ALREADY_DEFINED
|
|
#else
|
|
#define yylex_init ncglex_init
|
|
#endif
|
|
|
|
#ifdef yylex_init_extra
|
|
#define ncglex_init_extra_ALREADY_DEFINED
|
|
#else
|
|
#define yylex_init_extra ncglex_init_extra
|
|
#endif
|
|
|
|
#ifdef yylex_destroy
|
|
#define ncglex_destroy_ALREADY_DEFINED
|
|
#else
|
|
#define yylex_destroy ncglex_destroy
|
|
#endif
|
|
|
|
#ifdef yyget_debug
|
|
#define ncgget_debug_ALREADY_DEFINED
|
|
#else
|
|
#define yyget_debug ncgget_debug
|
|
#endif
|
|
|
|
#ifdef yyset_debug
|
|
#define ncgset_debug_ALREADY_DEFINED
|
|
#else
|
|
#define yyset_debug ncgset_debug
|
|
#endif
|
|
|
|
#ifdef yyget_extra
|
|
#define ncgget_extra_ALREADY_DEFINED
|
|
#else
|
|
#define yyget_extra ncgget_extra
|
|
#endif
|
|
|
|
#ifdef yyset_extra
|
|
#define ncgset_extra_ALREADY_DEFINED
|
|
#else
|
|
#define yyset_extra ncgset_extra
|
|
#endif
|
|
|
|
#ifdef yyget_in
|
|
#define ncgget_in_ALREADY_DEFINED
|
|
#else
|
|
#define yyget_in ncgget_in
|
|
#endif
|
|
|
|
#ifdef yyset_in
|
|
#define ncgset_in_ALREADY_DEFINED
|
|
#else
|
|
#define yyset_in ncgset_in
|
|
#endif
|
|
|
|
#ifdef yyget_out
|
|
#define ncgget_out_ALREADY_DEFINED
|
|
#else
|
|
#define yyget_out ncgget_out
|
|
#endif
|
|
|
|
#ifdef yyset_out
|
|
#define ncgset_out_ALREADY_DEFINED
|
|
#else
|
|
#define yyset_out ncgset_out
|
|
#endif
|
|
|
|
#ifdef yyget_leng
|
|
#define ncgget_leng_ALREADY_DEFINED
|
|
#else
|
|
#define yyget_leng ncgget_leng
|
|
#endif
|
|
|
|
#ifdef yyget_text
|
|
#define ncgget_text_ALREADY_DEFINED
|
|
#else
|
|
#define yyget_text ncgget_text
|
|
#endif
|
|
|
|
#ifdef yyget_lineno
|
|
#define ncgget_lineno_ALREADY_DEFINED
|
|
#else
|
|
#define yyget_lineno ncgget_lineno
|
|
#endif
|
|
|
|
#ifdef yyset_lineno
|
|
#define ncgset_lineno_ALREADY_DEFINED
|
|
#else
|
|
#define yyset_lineno ncgset_lineno
|
|
#endif
|
|
|
|
#ifdef yywrap
|
|
#define ncgwrap_ALREADY_DEFINED
|
|
#else
|
|
#define yywrap ncgwrap
|
|
#endif
|
|
|
|
#ifdef yyalloc
|
|
#define ncgalloc_ALREADY_DEFINED
|
|
#else
|
|
#define yyalloc ncgalloc
|
|
#endif
|
|
|
|
#ifdef yyrealloc
|
|
#define ncgrealloc_ALREADY_DEFINED
|
|
#else
|
|
#define yyrealloc ncgrealloc
|
|
#endif
|
|
|
|
#ifdef yyfree
|
|
#define ncgfree_ALREADY_DEFINED
|
|
#else
|
|
#define yyfree ncgfree
|
|
#endif
|
|
|
|
#ifdef yytext
|
|
#define ncgtext_ALREADY_DEFINED
|
|
#else
|
|
#define yytext ncgtext
|
|
#endif
|
|
|
|
#ifdef yyleng
|
|
#define ncgleng_ALREADY_DEFINED
|
|
#else
|
|
#define yyleng ncgleng
|
|
#endif
|
|
|
|
#ifdef yyin
|
|
#define ncgin_ALREADY_DEFINED
|
|
#else
|
|
#define yyin ncgin
|
|
#endif
|
|
|
|
#ifdef yyout
|
|
#define ncgout_ALREADY_DEFINED
|
|
#else
|
|
#define yyout ncgout
|
|
#endif
|
|
|
|
#ifdef yy_flex_debug
|
|
#define ncg_flex_debug_ALREADY_DEFINED
|
|
#else
|
|
#define yy_flex_debug ncg_flex_debug
|
|
#endif
|
|
|
|
#ifdef yylineno
|
|
#define ncglineno_ALREADY_DEFINED
|
|
#else
|
|
#define yylineno ncglineno
|
|
#endif
|
|
|
|
/* First, we deal with platform-specific or compiler-specific issues. */
|
|
|
|
/* begin standard C headers. */
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <errno.h>
|
|
#include <stdlib.h>
|
|
|
|
/* end standard C headers. */
|
|
|
|
/* flex integer type definitions */
|
|
|
|
#ifndef FLEXINT_H
|
|
#define FLEXINT_H
|
|
|
|
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
|
|
|
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
|
|
|
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
|
* if you want the limit (max/min) macros for int types.
|
|
*/
|
|
#ifndef __STDC_LIMIT_MACROS
|
|
#define __STDC_LIMIT_MACROS 1
|
|
#endif
|
|
|
|
#include <inttypes.h>
|
|
typedef int8_t flex_int8_t;
|
|
typedef uint8_t flex_uint8_t;
|
|
typedef int16_t flex_int16_t;
|
|
typedef uint16_t flex_uint16_t;
|
|
typedef int32_t flex_int32_t;
|
|
typedef uint32_t flex_uint32_t;
|
|
#else
|
|
typedef signed char flex_int8_t;
|
|
typedef short int flex_int16_t;
|
|
typedef int flex_int32_t;
|
|
typedef unsigned char flex_uint8_t;
|
|
typedef unsigned short int flex_uint16_t;
|
|
typedef unsigned int flex_uint32_t;
|
|
|
|
/* Limits of integral types. */
|
|
#ifndef INT8_MIN
|
|
#define INT8_MIN (-128)
|
|
#endif
|
|
#ifndef INT16_MIN
|
|
#define INT16_MIN (-32767-1)
|
|
#endif
|
|
#ifndef INT32_MIN
|
|
#define INT32_MIN (-2147483647-1)
|
|
#endif
|
|
#ifndef INT8_MAX
|
|
#define INT8_MAX (127)
|
|
#endif
|
|
#ifndef INT16_MAX
|
|
#define INT16_MAX (32767)
|
|
#endif
|
|
#ifndef INT32_MAX
|
|
#define INT32_MAX (2147483647)
|
|
#endif
|
|
#ifndef UINT8_MAX
|
|
#define UINT8_MAX (255U)
|
|
#endif
|
|
#ifndef UINT16_MAX
|
|
#define UINT16_MAX (65535U)
|
|
#endif
|
|
#ifndef UINT32_MAX
|
|
#define UINT32_MAX (4294967295U)
|
|
#endif
|
|
|
|
#ifndef SIZE_MAX
|
|
#define SIZE_MAX (~(size_t)0)
|
|
#endif
|
|
|
|
#endif /* ! C99 */
|
|
|
|
#endif /* ! FLEXINT_H */
|
|
|
|
/* begin standard C++ headers. */
|
|
|
|
/* TODO: this is always defined, so inline it */
|
|
#define yyconst const
|
|
|
|
#if defined(__GNUC__) && __GNUC__ >= 3
|
|
#define yynoreturn __attribute__((__noreturn__))
|
|
#else
|
|
#define yynoreturn
|
|
#endif
|
|
|
|
/* Returned upon end-of-file. */
|
|
#define YY_NULL 0
|
|
|
|
/* 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) ((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 (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 (((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 yyrestart( 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.
|
|
*/
|
|
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
|
|
|
|
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
|
|
#define YY_TYPEDEF_YY_BUFFER_STATE
|
|
typedef struct yy_buffer_state *YY_BUFFER_STATE;
|
|
#endif
|
|
|
|
#ifndef YY_TYPEDEF_YY_SIZE_T
|
|
#define YY_TYPEDEF_YY_SIZE_T
|
|
typedef size_t yy_size_t;
|
|
#endif
|
|
|
|
extern int yyleng;
|
|
|
|
extern FILE *yyin, *yyout;
|
|
|
|
#define EOB_ACT_CONTINUE_SCAN 0
|
|
#define EOB_ACT_END_OF_FILE 1
|
|
#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 yyless(n) \
|
|
do \
|
|
{ \
|
|
/* Undo effects of setting up yytext. */ \
|
|
int yyless_macro_arg = (n); \
|
|
YY_LESS_LINENO(yyless_macro_arg);\
|
|
*yy_cp = (yy_hold_char); \
|
|
YY_RESTORE_YY_MORE_OFFSET \
|
|
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
|
|
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
|
|
} \
|
|
while ( 0 )
|
|
#define unput(c) yyunput( c, (yytext_ptr) )
|
|
|
|
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
|
#define YY_STRUCT_YY_BUFFER_STATE
|
|
struct yy_buffer_state
|
|
{
|
|
FILE *yy_input_file;
|
|
|
|
char *yy_ch_buf; /* input buffer */
|
|
char *yy_buf_pos; /* current position in input buffer */
|
|
|
|
/* Size of input buffer in bytes, not including room for EOB
|
|
* characters.
|
|
*/
|
|
int yy_buf_size;
|
|
|
|
/* Number of characters read into yy_ch_buf, not including EOB
|
|
* characters.
|
|
*/
|
|
int yy_n_chars;
|
|
|
|
/* Whether we "own" the buffer - i.e., we know we created it,
|
|
* and can realloc() it to grow it, and should free() it to
|
|
* delete it.
|
|
*/
|
|
int yy_is_our_buffer;
|
|
|
|
/* Whether this is an "interactive" input source; if so, and
|
|
* if we're using stdio for input, then we want to use getc()
|
|
* instead of fread(), to make sure we stop fetching input after
|
|
* each newline.
|
|
*/
|
|
int yy_is_interactive;
|
|
|
|
/* Whether we're considered to be at the beginning of a line.
|
|
* If so, '^' rules will be active on the next match, otherwise
|
|
* not.
|
|
*/
|
|
int yy_at_bol;
|
|
|
|
int yy_bs_lineno; /**< The line count. */
|
|
int yy_bs_column; /**< The column count. */
|
|
|
|
/* Whether to try to fill the input buffer when we reach the
|
|
* end of it.
|
|
*/
|
|
int yy_fill_buffer;
|
|
|
|
int yy_buffer_status;
|
|
|
|
#define YY_BUFFER_NEW 0
|
|
#define YY_BUFFER_NORMAL 1
|
|
/* When an EOF's been seen but there's still some text to process
|
|
* then we mark the buffer as YY_EOF_PENDING, to indicate that we
|
|
* shouldn't try reading from the input source any more. We might
|
|
* still have a bunch of tokens to match, though, because of
|
|
* possible backing-up.
|
|
*
|
|
* When we actually see the EOF, we change the status to "new"
|
|
* (via yyrestart()), so that the user can continue scanning by
|
|
* just pointing yyin at a new input file.
|
|
*/
|
|
#define YY_BUFFER_EOF_PENDING 2
|
|
|
|
};
|
|
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
|
|
|
|
/* Stack of input buffers. */
|
|
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
|
|
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
|
|
static YY_BUFFER_STATE * 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
|
|
* "scanner state".
|
|
*
|
|
* Returns the top of the stack, or NULL.
|
|
*/
|
|
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
|
|
? (yy_buffer_stack)[(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.
|
|
*/
|
|
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
|
|
|
|
/* yy_hold_char holds the character lost when yytext is formed. */
|
|
static char yy_hold_char;
|
|
static int yy_n_chars; /* number of characters read into yy_ch_buf */
|
|
int yyleng;
|
|
|
|
/* Points to current character in buffer. */
|
|
static char *yy_c_buf_p = NULL;
|
|
static int yy_init = 0; /* whether we need to initialize */
|
|
static int yy_start = 0; /* start state number */
|
|
|
|
/* Flag which is used to allow yywrap()'s to do buffer switches
|
|
* instead of setting up a fresh yyin. A bit of a hack ...
|
|
*/
|
|
static int yy_did_buffer_switch_on_eof;
|
|
|
|
void yyrestart ( FILE *input_file );
|
|
void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer );
|
|
YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size );
|
|
void yy_delete_buffer ( YY_BUFFER_STATE b );
|
|
void yy_flush_buffer ( YY_BUFFER_STATE b );
|
|
void yypush_buffer_state ( YY_BUFFER_STATE new_buffer );
|
|
void yypop_buffer_state ( void );
|
|
|
|
static void yyensure_buffer_stack ( void );
|
|
static void yy_load_buffer_state ( void );
|
|
static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
|
|
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
|
|
|
|
YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
|
|
YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
|
|
YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
|
|
|
|
void *yyalloc ( yy_size_t );
|
|
void *yyrealloc ( void *, yy_size_t );
|
|
void yyfree ( void * );
|
|
|
|
#define yy_new_buffer yy_create_buffer
|
|
#define yy_set_interactive(is_interactive) \
|
|
{ \
|
|
if ( ! YY_CURRENT_BUFFER ){ \
|
|
yyensure_buffer_stack (); \
|
|
YY_CURRENT_BUFFER_LVALUE = \
|
|
yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
|
} \
|
|
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
|
|
}
|
|
#define yy_set_bol(at_bol) \
|
|
{ \
|
|
if ( ! YY_CURRENT_BUFFER ){\
|
|
yyensure_buffer_stack (); \
|
|
YY_CURRENT_BUFFER_LVALUE = \
|
|
yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
|
} \
|
|
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
|
|
}
|
|
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
|
|
|
|
/* Begin user sect3 */
|
|
typedef flex_uint8_t YY_CHAR;
|
|
|
|
FILE *yyin = NULL, *yyout = NULL;
|
|
|
|
typedef int yy_state_type;
|
|
|
|
extern int yylineno;
|
|
int yylineno = 1;
|
|
|
|
extern char *yytext;
|
|
#ifdef yytext_ptr
|
|
#undef yytext_ptr
|
|
#endif
|
|
#define yytext_ptr yytext
|
|
|
|
static yy_state_type yy_get_previous_state ( void );
|
|
static yy_state_type yy_try_NUL_trans ( yy_state_type current_state );
|
|
static int yy_get_next_buffer ( void );
|
|
static void yynoreturn yy_fatal_error ( const char* msg );
|
|
|
|
/* Done after the current pattern has been matched and before the
|
|
* corresponding action - sets up yytext.
|
|
*/
|
|
#define YY_DO_BEFORE_ACTION \
|
|
(yytext_ptr) = yy_bp; \
|
|
yyleng = (int) (yy_cp - yy_bp); \
|
|
(yy_hold_char) = *yy_cp; \
|
|
*yy_cp = '\0'; \
|
|
(yy_c_buf_p) = yy_cp;
|
|
#define YY_NUM_RULES 54
|
|
#define YY_END_OF_BUFFER 55
|
|
/* This struct is not used in this scanner,
|
|
but its presence is necessary. */
|
|
struct yy_trans_info
|
|
{
|
|
flex_int32_t yy_verify;
|
|
flex_int32_t yy_nxt;
|
|
};
|
|
static const flex_int16_t yy_accept[538] =
|
|
{ 0,
|
|
0, 0, 51, 51, 0, 0, 55, 53, 1, 49,
|
|
53, 53, 53, 53, 43, 37, 41, 41, 40, 40,
|
|
40, 40, 40, 40, 40, 53, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 53, 53, 53, 51, 54, 39, 54, 1,
|
|
0, 3, 0, 0, 0, 43, 41, 0, 0, 43,
|
|
43, 0, 44, 50, 2, 37, 0, 0, 0, 0,
|
|
41, 41, 41, 41, 0, 40, 0, 0, 0, 0,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 0, 0, 51, 0, 52, 39,
|
|
45, 0, 0, 0, 0, 43, 0, 0, 43, 2,
|
|
37, 0, 0, 0, 0, 0, 0, 0, 4, 0,
|
|
0, 40, 40, 40, 40, 40, 40, 36, 33, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 13, 40, 33, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 0, 48,
|
|
|
|
0, 0, 43, 0, 37, 0, 0, 0, 0, 0,
|
|
0, 0, 4, 42, 42, 0, 40, 40, 34, 40,
|
|
40, 35, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 11, 10, 40,
|
|
40, 40, 40, 6, 40, 40, 40, 40, 21, 40,
|
|
40, 40, 20, 40, 40, 40, 40, 40, 16, 40,
|
|
40, 40, 40, 0, 0, 34, 0, 37, 0, 0,
|
|
0, 0, 0, 0, 0, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 29, 40, 40, 8,
|
|
|
|
40, 17, 40, 40, 40, 40, 12, 40, 40, 40,
|
|
14, 40, 40, 23, 40, 40, 40, 46, 47, 0,
|
|
0, 0, 0, 40, 40, 40, 31, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 9, 30, 40, 7, 19,
|
|
5, 26, 18, 40, 40, 15, 40, 0, 0, 40,
|
|
40, 40, 40, 40, 38, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 22, 40, 40,
|
|
40, 40, 0, 40, 32, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 5, 40, 40, 24, 40,
|
|
|
|
40, 32, 32, 25, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 28, 40, 40, 40, 40, 40,
|
|
27, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
|
|
40, 40, 40, 40, 40, 40, 0
|
|
} ;
|
|
|
|
static const YY_CHAR yy_ec[256] =
|
|
{ 0,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
|
1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
|
1, 4, 5, 6, 5, 5, 5, 5, 7, 5,
|
|
5, 8, 9, 5, 10, 11, 12, 13, 14, 15,
|
|
16, 17, 14, 18, 14, 19, 19, 20, 5, 5,
|
|
5, 5, 5, 21, 22, 23, 24, 25, 26, 27,
|
|
28, 29, 30, 29, 29, 31, 32, 33, 34, 35,
|
|
36, 37, 38, 39, 40, 41, 29, 42, 29, 29,
|
|
5, 43, 5, 5, 44, 5, 45, 46, 47, 48,
|
|
|
|
49, 50, 51, 52, 53, 29, 54, 55, 56, 57,
|
|
58, 59, 60, 61, 62, 63, 64, 65, 29, 42,
|
|
66, 67, 68, 5, 5, 5, 1, 69, 69, 69,
|
|
69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
|
|
69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
|
|
69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
|
|
69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
|
|
69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
|
|
69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
|
|
69, 70, 70, 70, 70, 70, 70, 70, 70, 70,
|
|
|
|
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
|
|
70, 70, 70, 70, 1, 1, 1, 1, 1, 1,
|
|
1, 1, 1, 71, 71, 71, 71, 71, 71, 71,
|
|
71, 71, 71, 71, 71, 71, 71, 71, 71, 72,
|
|
72, 72, 72, 72, 72, 72, 72, 1, 1, 1,
|
|
1, 1, 1, 1, 1
|
|
} ;
|
|
|
|
static const YY_CHAR yy_meta[73] =
|
|
{ 0,
|
|
1, 1, 2, 1, 1, 1, 3, 4, 5, 5,
|
|
6, 7, 8, 8, 8, 8, 8, 8, 8, 1,
|
|
5, 9, 9, 9, 9, 10, 9, 11, 11, 12,
|
|
13, 11, 11, 11, 11, 11, 11, 13, 11, 11,
|
|
11, 11, 11, 11, 9, 9, 9, 9, 10, 9,
|
|
11, 11, 11, 11, 13, 11, 11, 11, 11, 11,
|
|
11, 13, 11, 11, 11, 11, 11, 14, 1, 11,
|
|
11, 11
|
|
} ;
|
|
|
|
static const flex_int16_t yy_base[556] =
|
|
{ 0,
|
|
0, 0, 406, 404, 342, 341, 380, 3131, 71, 3131,
|
|
68, 326, 65, 66, 103, 89, 151, 326, 55, 65,
|
|
207, 69, 114, 166, 161, 129, 256, 169, 191, 199,
|
|
299, 175, 230, 233, 250, 264, 225, 267, 280, 275,
|
|
287, 184, 286, 285, 284, 323, 317, 0, 3131, 83,
|
|
88, 3131, 322, 317, 347, 0, 277, 357, 258, 0,
|
|
3131, 368, 3131, 3131, 0, 336, 377, 245, 243, 242,
|
|
264, 3131, 55, 152, 0, 345, 393, 229, 219, 218,
|
|
359, 79, 394, 362, 368, 383, 404, 394, 407, 414,
|
|
398, 429, 424, 440, 449, 446, 466, 462, 479, 482,
|
|
|
|
485, 492, 496, 504, 501, 515, 526, 534, 518, 537,
|
|
556, 540, 559, 548, 572, 578, 590, 582, 597, 602,
|
|
612, 621, 628, 634, 216, 206, 266, 260, 3131, 0,
|
|
3131, 260, 672, 259, 694, 701, 215, 720, 744, 0,
|
|
653, 552, 760, 195, 191, 190, 189, 184, 118, 182,
|
|
179, 702, 659, 707, 738, 743, 746, 752, 755, 761,
|
|
776, 764, 787, 795, 798, 801, 813, 806, 817, 836,
|
|
847, 832, 839, 855, 850, 862, 869, 886, 881, 892,
|
|
899, 902, 911, 918, 925, 934, 955, 943, 937, 950,
|
|
975, 980, 990, 993, 987, 1023, 997, 1027, 159, 3131,
|
|
|
|
89, 0, 3131, 40, 1030, 1068, 141, 139, 136, 134,
|
|
133, 132, 979, 78, 3131, 130, 1034, 1045, 1048, 1053,
|
|
1078, 1064, 1090, 1069, 1094, 1087, 1101, 1112, 1125, 1120,
|
|
1131, 1138, 1134, 1143, 1168, 1151, 1176, 1164, 1173, 1183,
|
|
1207, 1194, 1187, 1190, 1213, 1227, 1232, 1220, 1224, 1244,
|
|
1257, 1237, 1250, 1263, 1267, 1270, 1282, 1287, 1300, 1304,
|
|
1307, 1319, 1322, 188, 181, 3131, 130, 1339, 1379, 112,
|
|
110, 109, 107, 103, 94, 1353, 1358, 1361, 1370, 1365,
|
|
1373, 1391, 1403, 1406, 1409, 1415, 1412, 1422, 1425, 1446,
|
|
1455, 1458, 1462, 1466, 1470, 1479, 3131, 1492, 1496, 1476,
|
|
|
|
1532, 1501, 1510, 1542, 1527, 1535, 1517, 1549, 1552, 1566,
|
|
1558, 1573, 1582, 1588, 1596, 1592, 1604, 3131, 3131, 102,
|
|
85, 81, 69, 1618, 1599, 1614, 1608, 1644, 1653, 1630,
|
|
1650, 1638, 1660, 1656, 1686, 1676, 1664, 1690, 1697, 1700,
|
|
1708, 1694, 1730, 1734, 1739, 1716, 3131, 1742, 1746, 1750,
|
|
1755, 3131, 1764, 1780, 1785, 1772, 1790, 50, 31, 1796,
|
|
1804, 1815, 1820, 1826, 1829, 1834, 1837, 1859, 1846, 1867,
|
|
1870, 1877, 1883, 1902, 1891, 1909, 1913, 1916, 1921, 1933,
|
|
1926, 1946, 33, 1956, 1959, 1965, 1971, 1976, 1990, 1980,
|
|
1997, 2006, 2002, 2010, 2021, 2014, 2032, 2045, 2027, 2052,
|
|
|
|
2058, 45, 2040, 2062, 2065, 2070, 2082, 2078, 2102, 2114,
|
|
2095, 2128, 2117, 2120, 2135, 2132, 2150, 2154, 2165, 2158,
|
|
2170, 2184, 2189, 2176, 3131, 2195, 2208, 2219, 2225, 2228,
|
|
3131, 2231, 2242, 2268, 2250, 2238, 2272, 2263, 2282, 2286,
|
|
2298, 2293, 2305, 2312, 2316, 2323, 2335, 2346, 2342, 2353,
|
|
2349, 2357, 2365, 2368, 2379, 2387, 2383, 2398, 2403, 2409,
|
|
2420, 2423, 2439, 2453, 2434, 2458, 2465, 2445, 2470, 2477,
|
|
2489, 2484, 2500, 2507, 2496, 2515, 2526, 2519, 2537, 2530,
|
|
2540, 2551, 2556, 2562, 2573, 2582, 2592, 2598, 2604, 2586,
|
|
2608, 2616, 2623, 2634, 2628, 2638, 2649, 2669, 2654, 2664,
|
|
|
|
2672, 2684, 2687, 2675, 2680, 2705, 2710, 2721, 2724, 2718,
|
|
2735, 2740, 2728, 2760, 2361, 2765, 2771, 2774, 2777, 2780,
|
|
2785, 2810, 2796, 2815, 2818, 2821, 2832, 2826, 2852, 2836,
|
|
2875, 2858, 2862, 2867, 2872, 2878, 3131, 2950, 2964, 2978,
|
|
2992, 3001, 3010, 3019, 3032, 3046, 3059, 3073, 3083, 3089,
|
|
3097, 3099, 3105, 3111, 3117
|
|
} ;
|
|
|
|
static const flex_int16_t yy_def[556] =
|
|
{ 0,
|
|
537, 1, 538, 538, 539, 539, 537, 537, 537, 537,
|
|
540, 541, 537, 542, 537, 543, 537, 17, 544, 544,
|
|
544, 544, 544, 544, 544, 537, 544, 544, 544, 544,
|
|
21, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 537, 537, 537, 545, 545, 546, 537, 537,
|
|
540, 537, 540, 537, 547, 15, 17, 537, 537, 15,
|
|
537, 537, 537, 537, 548, 549, 537, 537, 537, 537,
|
|
17, 537, 537, 537, 550, 544, 537, 537, 537, 537,
|
|
544, 21, 21, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 537, 537, 545, 545, 537, 546,
|
|
537, 537, 537, 551, 537, 537, 537, 537, 537, 548,
|
|
549, 552, 537, 537, 537, 537, 537, 537, 553, 537,
|
|
537, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 537, 537,
|
|
|
|
537, 554, 537, 537, 555, 537, 537, 537, 537, 537,
|
|
537, 537, 553, 537, 537, 537, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 537, 537, 537, 537, 555, 537, 537,
|
|
537, 537, 537, 537, 537, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 537, 544, 544, 544,
|
|
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 537, 537, 537,
|
|
537, 537, 537, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 537, 544, 544, 544,
|
|
544, 537, 544, 544, 544, 544, 544, 537, 537, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 537, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
|
|
544, 537, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 537, 544, 544, 544, 544, 544,
|
|
537, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 544, 544, 544, 544,
|
|
544, 544, 544, 544, 544, 544, 0, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537
|
|
} ;
|
|
|
|
static const flex_int16_t yy_nxt[3204] =
|
|
{ 0,
|
|
8, 9, 10, 9, 8, 11, 12, 8, 13, 14,
|
|
15, 16, 17, 18, 18, 18, 18, 18, 18, 8,
|
|
8, 19, 19, 19, 20, 21, 22, 19, 19, 23,
|
|
19, 19, 24, 19, 19, 19, 19, 19, 19, 25,
|
|
19, 19, 26, 27, 19, 28, 29, 30, 31, 32,
|
|
33, 19, 34, 19, 35, 19, 36, 37, 19, 19,
|
|
38, 39, 40, 41, 42, 19, 19, 8, 8, 43,
|
|
44, 45, 50, 52, 50, 56, 56, 57, 57, 57,
|
|
57, 57, 57, 57, 50, 72, 50, 76, 76, 266,
|
|
58, 58, 267, 52, 266, 59, 64, 77, 402, 268,
|
|
|
|
65, 264, 264, 264, 264, 264, 264, 77, 215, 72,
|
|
53, 77, 383, 58, 58, 60, 60, 60, 60, 60,
|
|
60, 60, 81, 84, 78, 79, 80, 61, 62, 63,
|
|
53, 67, 215, 61, 78, 79, 80, 205, 78, 79,
|
|
80, 91, 91, 91, 91, 91, 91, 91, 214, 359,
|
|
61, 62, 63, 268, 358, 215, 77, 61, 68, 69,
|
|
70, 56, 141, 71, 71, 71, 71, 71, 71, 71,
|
|
85, 323, 214, 72, 72, 205, 58, 322, 321, 215,
|
|
268, 73, 73, 78, 79, 80, 320, 319, 72, 72,
|
|
74, 86, 75, 90, 318, 87, 72, 72, 76, 58,
|
|
|
|
66, 275, 141, 77, 274, 73, 73, 273, 77, 205,
|
|
88, 77, 72, 72, 74, 82, 82, 77, 89, 83,
|
|
83, 83, 83, 83, 83, 83, 77, 91, 124, 107,
|
|
78, 79, 80, 77, 100, 78, 79, 80, 78, 79,
|
|
80, 77, 101, 103, 78, 79, 80, 216, 102, 77,
|
|
76, 104, 212, 78, 79, 80, 105, 66, 211, 210,
|
|
78, 79, 80, 141, 204, 200, 200, 77, 78, 79,
|
|
80, 537, 77, 128, 199, 77, 78, 79, 80, 92,
|
|
93, 94, 95, 114, 91, 96, 151, 150, 97, 109,
|
|
108, 98, 77, 99, 78, 79, 80, 76, 77, 78,
|
|
|
|
79, 80, 78, 79, 80, 537, 77, 110, 111, 77,
|
|
148, 147, 112, 66, 137, 115, 113, 77, 537, 78,
|
|
79, 80, 77, 131, 537, 78, 79, 80, 129, 77,
|
|
128, 116, 119, 78, 79, 80, 78, 79, 80, 120,
|
|
118, 121, 117, 122, 78, 79, 80, 142, 123, 78,
|
|
79, 80, 126, 125, 91, 106, 78, 79, 80, 133,
|
|
133, 133, 133, 133, 133, 135, 135, 537, 55, 136,
|
|
136, 136, 136, 136, 136, 136, 138, 138, 143, 537,
|
|
139, 139, 139, 139, 139, 139, 139, 77, 134, 66,
|
|
66, 66, 66, 66, 66, 66, 76, 76, 76, 76,
|
|
|
|
76, 77, 76, 76, 77, 144, 145, 146, 49, 49,
|
|
77, 47, 76, 47, 78, 79, 80, 156, 153, 155,
|
|
154, 157, 152, 537, 153, 77, 159, 537, 78, 79,
|
|
80, 78, 79, 80, 158, 76, 77, 78, 79, 80,
|
|
77, 153, 537, 154, 160, 537, 77, 537, 153, 77,
|
|
537, 537, 78, 79, 80, 537, 77, 537, 537, 537,
|
|
76, 158, 537, 78, 79, 80, 77, 78, 79, 80,
|
|
537, 77, 163, 78, 79, 80, 78, 79, 80, 537,
|
|
161, 537, 77, 78, 79, 80, 162, 537, 77, 169,
|
|
537, 77, 537, 78, 79, 80, 164, 537, 78, 79,
|
|
|
|
80, 165, 537, 166, 77, 537, 167, 168, 77, 78,
|
|
79, 80, 537, 537, 537, 78, 79, 80, 78, 79,
|
|
80, 77, 537, 170, 77, 171, 537, 77, 537, 176,
|
|
172, 78, 79, 80, 77, 78, 79, 80, 77, 537,
|
|
537, 173, 174, 77, 175, 537, 77, 177, 78, 79,
|
|
80, 78, 79, 80, 78, 79, 80, 77, 178, 179,
|
|
77, 78, 79, 80, 180, 78, 79, 80, 77, 537,
|
|
78, 79, 80, 78, 79, 80, 77, 537, 181, 77,
|
|
184, 537, 77, 182, 78, 79, 80, 78, 79, 80,
|
|
77, 183, 188, 185, 206, 78, 79, 80, 77, 537,
|
|
|
|
537, 77, 187, 78, 79, 80, 78, 79, 80, 78,
|
|
79, 80, 186, 158, 77, 537, 189, 78, 79, 80,
|
|
77, 207, 208, 209, 77, 78, 79, 80, 78, 79,
|
|
80, 537, 77, 537, 537, 190, 537, 537, 537, 77,
|
|
192, 78, 79, 80, 77, 537, 537, 78, 79, 80,
|
|
191, 78, 79, 80, 77, 537, 537, 537, 194, 78,
|
|
79, 80, 193, 77, 142, 537, 78, 79, 80, 195,
|
|
77, 78, 79, 80, 537, 196, 77, 537, 200, 197,
|
|
537, 78, 79, 80, 201, 201, 201, 201, 201, 201,
|
|
78, 79, 80, 537, 198, 143, 537, 78, 79, 80,
|
|
|
|
537, 77, 537, 78, 79, 80, 136, 136, 136, 136,
|
|
136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
|
|
537, 537, 144, 145, 146, 203, 537, 63, 78, 79,
|
|
80, 203, 139, 139, 139, 139, 139, 139, 139, 537,
|
|
537, 537, 537, 537, 77, 537, 537, 217, 203, 77,
|
|
63, 537, 537, 537, 537, 203, 139, 139, 139, 139,
|
|
139, 139, 139, 141, 141, 141, 141, 141, 61, 221,
|
|
63, 78, 79, 80, 61, 537, 78, 79, 80, 141,
|
|
77, 537, 218, 537, 537, 77, 537, 537, 77, 537,
|
|
223, 61, 219, 63, 77, 220, 537, 77, 61, 537,
|
|
|
|
537, 537, 141, 77, 222, 537, 77, 78, 79, 80,
|
|
537, 225, 78, 79, 80, 78, 79, 80, 77, 537,
|
|
537, 78, 79, 80, 78, 79, 80, 141, 537, 77,
|
|
78, 79, 80, 78, 79, 80, 226, 77, 231, 224,
|
|
77, 537, 227, 77, 537, 78, 79, 80, 77, 229,
|
|
537, 232, 228, 537, 537, 77, 78, 79, 80, 77,
|
|
537, 537, 233, 537, 78, 79, 80, 78, 79, 80,
|
|
78, 79, 80, 230, 77, 78, 79, 80, 77, 537,
|
|
537, 77, 78, 79, 80, 537, 78, 79, 80, 77,
|
|
537, 234, 77, 537, 537, 235, 236, 77, 238, 537,
|
|
|
|
537, 78, 79, 80, 77, 78, 79, 80, 78, 79,
|
|
80, 77, 537, 237, 537, 537, 78, 79, 80, 78,
|
|
79, 80, 239, 77, 78, 79, 80, 240, 77, 242,
|
|
241, 78, 79, 80, 77, 247, 537, 243, 78, 79,
|
|
80, 77, 537, 537, 77, 537, 245, 537, 537, 537,
|
|
78, 79, 80, 77, 244, 78, 79, 80, 537, 537,
|
|
77, 78, 79, 80, 537, 537, 248, 77, 78, 79,
|
|
80, 78, 79, 80, 246, 249, 77, 537, 250, 77,
|
|
78, 79, 80, 222, 537, 77, 537, 78, 79, 80,
|
|
537, 253, 77, 537, 78, 79, 80, 77, 537, 537,
|
|
|
|
537, 251, 252, 78, 79, 80, 78, 79, 80, 214,
|
|
254, 537, 78, 79, 80, 537, 215, 77, 537, 78,
|
|
79, 80, 77, 537, 78, 79, 80, 255, 257, 77,
|
|
537, 537, 77, 214, 537, 77, 537, 537, 256, 77,
|
|
215, 142, 537, 260, 78, 79, 80, 537, 537, 78,
|
|
79, 80, 258, 537, 262, 259, 78, 79, 80, 78,
|
|
79, 80, 78, 79, 80, 77, 78, 79, 80, 77,
|
|
537, 537, 269, 537, 537, 261, 77, 537, 537, 263,
|
|
205, 205, 205, 205, 205, 205, 205, 77, 276, 537,
|
|
77, 537, 78, 79, 80, 77, 78, 79, 80, 270,
|
|
|
|
271, 272, 279, 78, 79, 80, 77, 277, 537, 278,
|
|
537, 77, 537, 537, 78, 79, 80, 78, 79, 80,
|
|
77, 280, 78, 79, 80, 281, 537, 537, 537, 77,
|
|
537, 537, 77, 78, 79, 80, 77, 537, 78, 79,
|
|
80, 283, 282, 77, 537, 537, 537, 78, 79, 80,
|
|
537, 537, 537, 284, 77, 537, 78, 79, 80, 78,
|
|
79, 80, 77, 78, 79, 80, 285, 77, 537, 537,
|
|
78, 79, 80, 77, 286, 288, 77, 537, 537, 289,
|
|
77, 78, 79, 80, 537, 77, 291, 287, 537, 78,
|
|
79, 80, 537, 77, 78, 79, 80, 537, 290, 292,
|
|
|
|
78, 79, 80, 78, 79, 80, 77, 78, 79, 80,
|
|
77, 294, 78, 79, 80, 77, 537, 293, 77, 537,
|
|
78, 79, 80, 537, 295, 77, 297, 537, 537, 77,
|
|
537, 537, 77, 78, 79, 80, 77, 78, 79, 80,
|
|
296, 299, 78, 79, 80, 78, 79, 80, 302, 77,
|
|
298, 537, 78, 79, 80, 77, 78, 79, 80, 78,
|
|
79, 80, 77, 78, 79, 80, 77, 537, 304, 77,
|
|
303, 537, 537, 537, 77, 300, 78, 79, 80, 77,
|
|
537, 537, 78, 79, 80, 301, 77, 537, 537, 78,
|
|
79, 80, 77, 78, 79, 80, 78, 79, 80, 77,
|
|
|
|
306, 78, 79, 80, 305, 77, 78, 79, 80, 77,
|
|
537, 537, 77, 78, 79, 80, 309, 312, 537, 78,
|
|
79, 80, 537, 308, 77, 307, 78, 79, 80, 77,
|
|
537, 537, 78, 79, 80, 311, 78, 79, 80, 78,
|
|
79, 80, 77, 310, 537, 537, 77, 537, 313, 77,
|
|
142, 78, 79, 80, 314, 537, 78, 79, 80, 537,
|
|
537, 77, 315, 537, 77, 537, 317, 537, 537, 78,
|
|
79, 80, 537, 78, 79, 80, 78, 79, 80, 316,
|
|
537, 269, 268, 268, 268, 268, 268, 325, 78, 79,
|
|
80, 78, 79, 80, 328, 77, 327, 537, 268, 537,
|
|
|
|
77, 324, 537, 77, 537, 537, 537, 77, 270, 271,
|
|
272, 537, 77, 326, 537, 77, 537, 537, 537, 537,
|
|
537, 268, 78, 79, 80, 537, 329, 78, 79, 80,
|
|
78, 79, 80, 77, 78, 79, 80, 330, 537, 78,
|
|
79, 80, 78, 79, 80, 77, 268, 331, 77, 333,
|
|
332, 77, 537, 537, 77, 537, 537, 77, 335, 537,
|
|
78, 79, 80, 334, 77, 537, 336, 77, 537, 537,
|
|
537, 537, 78, 79, 80, 78, 79, 80, 78, 79,
|
|
80, 78, 79, 80, 78, 79, 80, 337, 77, 537,
|
|
537, 78, 79, 80, 78, 79, 80, 77, 537, 537,
|
|
|
|
77, 537, 537, 338, 77, 537, 537, 537, 77, 339,
|
|
342, 341, 77, 537, 537, 78, 79, 80, 77, 537,
|
|
340, 77, 537, 537, 78, 79, 80, 78, 79, 80,
|
|
343, 78, 79, 80, 77, 78, 79, 80, 77, 78,
|
|
79, 80, 344, 77, 346, 78, 79, 80, 78, 79,
|
|
80, 347, 77, 345, 537, 537, 537, 537, 348, 77,
|
|
537, 78, 79, 80, 537, 78, 79, 80, 327, 77,
|
|
78, 79, 80, 537, 77, 537, 327, 77, 537, 78,
|
|
79, 80, 537, 349, 77, 352, 78, 79, 80, 353,
|
|
537, 77, 537, 537, 77, 537, 78, 79, 80, 350,
|
|
|
|
77, 78, 79, 80, 78, 79, 80, 537, 77, 537,
|
|
537, 78, 79, 80, 351, 77, 537, 537, 78, 79,
|
|
80, 78, 79, 80, 77, 537, 537, 78, 79, 80,
|
|
77, 537, 354, 537, 77, 78, 79, 80, 77, 537,
|
|
537, 77, 78, 79, 80, 537, 77, 360, 355, 357,
|
|
77, 78, 79, 80, 356, 361, 77, 78, 79, 80,
|
|
77, 78, 79, 80, 537, 78, 79, 80, 78, 79,
|
|
80, 537, 77, 78, 79, 80, 362, 78, 79, 80,
|
|
77, 537, 363, 78, 79, 80, 77, 78, 79, 80,
|
|
364, 365, 77, 537, 367, 77, 537, 537, 77, 78,
|
|
|
|
79, 80, 77, 537, 368, 537, 77, 78, 79, 80,
|
|
370, 537, 366, 78, 79, 80, 365, 537, 77, 78,
|
|
79, 80, 78, 79, 80, 78, 79, 80, 77, 78,
|
|
79, 80, 77, 78, 79, 80, 77, 369, 365, 77,
|
|
537, 537, 77, 537, 374, 78, 79, 80, 371, 537,
|
|
77, 365, 372, 537, 537, 78, 79, 80, 77, 78,
|
|
79, 80, 373, 78, 79, 80, 78, 79, 80, 78,
|
|
79, 80, 77, 537, 537, 375, 77, 78, 79, 80,
|
|
537, 77, 537, 537, 77, 78, 79, 80, 77, 537,
|
|
376, 377, 77, 537, 537, 537, 537, 77, 537, 78,
|
|
|
|
79, 80, 378, 78, 79, 80, 77, 537, 78, 79,
|
|
80, 78, 79, 80, 77, 78, 79, 80, 379, 78,
|
|
79, 80, 77, 537, 78, 79, 80, 77, 380, 537,
|
|
537, 537, 77, 78, 79, 80, 537, 537, 77, 537,
|
|
537, 78, 79, 80, 382, 386, 77, 381, 537, 78,
|
|
79, 80, 384, 219, 78, 79, 80, 77, 537, 78,
|
|
79, 80, 77, 537, 537, 78, 79, 80, 77, 537,
|
|
537, 77, 537, 78, 79, 80, 77, 537, 387, 77,
|
|
385, 537, 388, 537, 78, 79, 80, 537, 77, 78,
|
|
79, 80, 537, 389, 391, 78, 79, 80, 78, 79,
|
|
|
|
80, 77, 537, 78, 79, 80, 78, 79, 80, 77,
|
|
537, 537, 77, 390, 392, 78, 79, 80, 393, 77,
|
|
537, 537, 537, 537, 537, 77, 537, 537, 78, 79,
|
|
80, 365, 537, 77, 537, 537, 78, 79, 80, 78,
|
|
79, 80, 537, 394, 77, 395, 78, 79, 80, 537,
|
|
365, 77, 78, 79, 80, 77, 396, 537, 77, 537,
|
|
78, 79, 80, 77, 537, 537, 537, 537, 77, 537,
|
|
397, 78, 79, 80, 400, 77, 537, 537, 78, 79,
|
|
80, 398, 78, 79, 80, 78, 79, 80, 77, 404,
|
|
78, 79, 80, 399, 401, 78, 79, 80, 77, 537,
|
|
|
|
537, 77, 78, 79, 80, 403, 406, 77, 219, 537,
|
|
537, 537, 537, 77, 537, 78, 79, 80, 77, 537,
|
|
537, 537, 77, 537, 537, 78, 79, 80, 78, 79,
|
|
80, 537, 77, 537, 78, 79, 80, 405, 407, 77,
|
|
78, 79, 80, 408, 77, 78, 79, 80, 77, 78,
|
|
79, 80, 77, 537, 537, 410, 77, 409, 412, 78,
|
|
79, 80, 411, 77, 537, 537, 78, 79, 80, 77,
|
|
537, 78, 79, 80, 77, 78, 79, 80, 413, 78,
|
|
79, 80, 77, 78, 79, 80, 537, 77, 414, 537,
|
|
78, 79, 80, 396, 77, 537, 78, 79, 80, 404,
|
|
|
|
77, 78, 79, 80, 77, 537, 537, 77, 537, 78,
|
|
79, 80, 77, 416, 78, 79, 80, 419, 417, 415,
|
|
77, 78, 79, 80, 77, 537, 365, 78, 79, 80,
|
|
365, 78, 79, 80, 78, 79, 80, 77, 537, 78,
|
|
79, 80, 537, 418, 77, 537, 537, 78, 79, 80,
|
|
421, 78, 79, 80, 425, 422, 77, 420, 537, 77,
|
|
537, 537, 77, 423, 78, 79, 80, 537, 537, 537,
|
|
77, 78, 79, 80, 77, 537, 537, 77, 537, 365,
|
|
537, 424, 537, 78, 79, 80, 78, 79, 80, 78,
|
|
79, 80, 77, 365, 537, 431, 77, 78, 79, 80,
|
|
|
|
77, 78, 79, 80, 78, 79, 80, 77, 537, 537,
|
|
427, 537, 77, 537, 426, 365, 537, 537, 77, 78,
|
|
79, 80, 428, 78, 79, 80, 77, 78, 79, 80,
|
|
537, 77, 537, 537, 78, 79, 80, 77, 537, 78,
|
|
79, 80, 430, 432, 429, 78, 79, 80, 537, 537,
|
|
77, 537, 537, 78, 79, 80, 433, 537, 78, 79,
|
|
80, 77, 537, 537, 78, 79, 80, 77, 436, 435,
|
|
77, 537, 537, 77, 537, 537, 537, 78, 79, 80,
|
|
77, 434, 537, 537, 77, 365, 440, 537, 78, 79,
|
|
80, 537, 77, 537, 78, 79, 80, 78, 79, 80,
|
|
|
|
78, 79, 80, 365, 437, 77, 439, 78, 79, 80,
|
|
77, 78, 79, 80, 77, 537, 537, 537, 438, 78,
|
|
79, 80, 537, 442, 77, 537, 537, 537, 77, 441,
|
|
537, 537, 78, 79, 80, 77, 537, 78, 79, 80,
|
|
77, 78, 79, 80, 537, 443, 444, 77, 537, 537,
|
|
446, 78, 79, 80, 77, 78, 79, 80, 77, 447,
|
|
537, 445, 78, 79, 80, 77, 537, 78, 79, 80,
|
|
537, 537, 449, 448, 78, 79, 80, 77, 537, 451,
|
|
450, 78, 79, 80, 77, 78, 79, 80, 77, 453,
|
|
518, 77, 78, 79, 80, 77, 537, 457, 452, 77,
|
|
|
|
458, 459, 537, 77, 78, 79, 80, 77, 454, 455,
|
|
77, 78, 79, 80, 456, 78, 79, 80, 78, 79,
|
|
80, 77, 78, 79, 80, 77, 78, 79, 80, 77,
|
|
78, 79, 80, 537, 78, 79, 80, 78, 79, 80,
|
|
77, 537, 537, 365, 537, 77, 460, 537, 78, 79,
|
|
80, 77, 78, 79, 80, 462, 78, 79, 80, 537,
|
|
537, 461, 77, 537, 463, 77, 537, 78, 79, 80,
|
|
468, 537, 78, 79, 80, 464, 77, 537, 78, 79,
|
|
80, 77, 537, 537, 466, 465, 537, 77, 537, 78,
|
|
79, 80, 78, 79, 80, 77, 537, 537, 467, 537,
|
|
|
|
77, 537, 471, 78, 79, 80, 469, 77, 78, 79,
|
|
80, 537, 77, 470, 78, 79, 80, 475, 537, 77,
|
|
537, 537, 78, 79, 80, 537, 77, 78, 79, 80,
|
|
472, 77, 537, 476, 78, 79, 80, 473, 77, 78,
|
|
79, 80, 77, 537, 537, 478, 78, 79, 80, 77,
|
|
537, 537, 474, 78, 79, 80, 481, 77, 78, 79,
|
|
80, 77, 483, 477, 479, 78, 79, 80, 77, 78,
|
|
79, 80, 77, 480, 482, 537, 78, 79, 80, 77,
|
|
537, 537, 77, 537, 78, 79, 80, 537, 78, 79,
|
|
80, 537, 484, 77, 537, 78, 79, 80, 77, 78,
|
|
|
|
79, 80, 537, 485, 77, 537, 78, 79, 80, 78,
|
|
79, 80, 487, 537, 537, 77, 537, 537, 537, 486,
|
|
78, 79, 80, 488, 77, 78, 79, 80, 77, 537,
|
|
537, 78, 79, 80, 77, 537, 537, 489, 493, 537,
|
|
77, 537, 78, 79, 80, 537, 77, 537, 490, 492,
|
|
77, 78, 79, 80, 491, 78, 79, 80, 77, 537,
|
|
494, 78, 79, 80, 495, 77, 537, 78, 79, 80,
|
|
77, 537, 496, 78, 79, 80, 77, 78, 79, 80,
|
|
77, 537, 537, 497, 537, 78, 79, 80, 498, 537,
|
|
499, 77, 78, 79, 80, 537, 77, 78, 79, 80,
|
|
|
|
502, 500, 501, 78, 79, 80, 77, 78, 79, 80,
|
|
503, 77, 507, 537, 77, 537, 537, 77, 78, 79,
|
|
80, 504, 77, 78, 79, 80, 77, 537, 505, 77,
|
|
537, 506, 537, 78, 79, 80, 508, 537, 78, 79,
|
|
80, 78, 79, 80, 78, 79, 80, 77, 537, 78,
|
|
79, 80, 77, 78, 79, 80, 78, 79, 80, 514,
|
|
77, 509, 510, 77, 515, 537, 77, 537, 513, 537,
|
|
77, 537, 537, 537, 78, 79, 80, 77, 537, 78,
|
|
79, 80, 77, 511, 516, 537, 512, 78, 79, 80,
|
|
78, 79, 80, 78, 79, 80, 537, 78, 79, 80,
|
|
|
|
537, 537, 77, 537, 78, 79, 80, 77, 537, 78,
|
|
79, 80, 517, 77, 537, 537, 77, 519, 537, 77,
|
|
537, 520, 77, 537, 521, 537, 522, 77, 537, 78,
|
|
79, 80, 523, 537, 78, 79, 80, 524, 77, 537,
|
|
78, 79, 80, 78, 79, 80, 78, 79, 80, 78,
|
|
79, 80, 77, 537, 78, 79, 80, 77, 526, 537,
|
|
77, 537, 525, 77, 528, 78, 79, 80, 77, 537,
|
|
529, 537, 537, 537, 77, 537, 537, 527, 77, 78,
|
|
79, 80, 365, 537, 78, 79, 80, 78, 79, 80,
|
|
78, 79, 80, 365, 77, 78, 79, 80, 531, 532,
|
|
|
|
77, 78, 79, 80, 77, 78, 79, 80, 530, 77,
|
|
533, 537, 534, 537, 77, 537, 537, 77, 537, 535,
|
|
77, 78, 79, 80, 537, 537, 537, 78, 79, 80,
|
|
537, 78, 79, 80, 536, 537, 78, 79, 80, 365,
|
|
537, 78, 79, 80, 78, 79, 80, 78, 79, 80,
|
|
46, 46, 46, 46, 46, 46, 46, 46, 46, 46,
|
|
46, 46, 46, 46, 48, 48, 48, 48, 48, 48,
|
|
48, 48, 48, 48, 48, 48, 48, 48, 51, 51,
|
|
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
|
|
51, 51, 54, 54, 54, 54, 54, 54, 54, 54,
|
|
|
|
54, 54, 54, 54, 54, 54, 57, 537, 57, 537,
|
|
57, 537, 57, 66, 537, 537, 66, 537, 66, 66,
|
|
66, 66, 66, 76, 76, 537, 76, 76, 76, 76,
|
|
76, 76, 127, 127, 127, 127, 127, 127, 127, 127,
|
|
127, 127, 127, 127, 127, 127, 130, 130, 130, 130,
|
|
130, 130, 130, 130, 130, 130, 130, 130, 130, 132,
|
|
537, 132, 132, 132, 132, 132, 132, 132, 132, 132,
|
|
132, 132, 132, 140, 537, 140, 140, 140, 140, 140,
|
|
140, 140, 140, 140, 140, 140, 140, 141, 141, 141,
|
|
141, 141, 141, 141, 141, 141, 149, 149, 149, 202,
|
|
|
|
537, 537, 537, 537, 202, 202, 202, 205, 205, 205,
|
|
205, 205, 213, 213, 213, 537, 537, 213, 265, 265,
|
|
265, 268, 268, 268, 268, 268, 268, 268, 268, 268,
|
|
7, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
|
|
537, 537, 537
|
|
} ;
|
|
|
|
static const flex_int16_t yy_chk[3204] =
|
|
{ 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,
|
|
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, 9, 11, 9, 13, 14, 13, 13, 13,
|
|
13, 13, 13, 13, 50, 73, 50, 82, 82, 204,
|
|
13, 14, 204, 51, 402, 14, 16, 19, 383, 359,
|
|
|
|
16, 201, 201, 201, 201, 201, 201, 20, 214, 73,
|
|
11, 22, 358, 13, 14, 15, 15, 15, 15, 15,
|
|
15, 15, 20, 22, 19, 19, 19, 15, 15, 15,
|
|
51, 16, 214, 15, 20, 20, 20, 323, 22, 22,
|
|
22, 26, 26, 26, 26, 26, 26, 26, 149, 322,
|
|
15, 15, 15, 321, 320, 149, 23, 15, 16, 16,
|
|
16, 17, 275, 17, 17, 17, 17, 17, 17, 17,
|
|
23, 274, 149, 17, 74, 273, 17, 272, 271, 149,
|
|
270, 17, 74, 23, 23, 23, 267, 265, 17, 74,
|
|
17, 24, 17, 25, 264, 24, 17, 74, 216, 17,
|
|
|
|
212, 211, 210, 25, 209, 17, 74, 208, 24, 207,
|
|
24, 28, 17, 74, 17, 21, 21, 32, 24, 21,
|
|
21, 21, 21, 21, 21, 21, 42, 199, 42, 32,
|
|
25, 25, 25, 29, 28, 24, 24, 24, 28, 28,
|
|
28, 30, 29, 30, 32, 32, 32, 151, 29, 21,
|
|
150, 30, 148, 42, 42, 42, 30, 147, 146, 145,
|
|
29, 29, 29, 144, 137, 134, 132, 37, 30, 30,
|
|
30, 128, 33, 127, 126, 34, 21, 21, 21, 27,
|
|
27, 27, 27, 37, 125, 27, 80, 79, 27, 34,
|
|
33, 27, 35, 27, 37, 37, 37, 78, 27, 33,
|
|
|
|
33, 33, 34, 34, 34, 71, 36, 35, 36, 38,
|
|
70, 69, 36, 68, 59, 38, 36, 40, 57, 35,
|
|
35, 35, 39, 54, 53, 27, 27, 27, 47, 41,
|
|
46, 39, 41, 36, 36, 36, 38, 38, 38, 41,
|
|
40, 41, 39, 41, 40, 40, 40, 66, 41, 39,
|
|
39, 39, 45, 44, 43, 31, 41, 41, 41, 55,
|
|
55, 55, 55, 55, 55, 58, 58, 18, 12, 58,
|
|
58, 58, 58, 58, 58, 58, 62, 62, 66, 7,
|
|
62, 62, 62, 62, 62, 62, 62, 76, 55, 67,
|
|
67, 67, 67, 67, 67, 67, 77, 77, 77, 77,
|
|
|
|
77, 81, 83, 83, 84, 66, 66, 66, 6, 5,
|
|
85, 4, 77, 3, 76, 76, 76, 85, 83, 84,
|
|
83, 86, 81, 0, 83, 86, 88, 0, 81, 81,
|
|
81, 84, 84, 84, 87, 77, 88, 85, 85, 85,
|
|
91, 83, 0, 83, 90, 0, 87, 0, 83, 89,
|
|
0, 0, 86, 86, 86, 0, 90, 0, 0, 0,
|
|
77, 89, 0, 88, 88, 88, 93, 91, 91, 91,
|
|
0, 92, 93, 87, 87, 87, 89, 89, 89, 0,
|
|
92, 0, 94, 90, 90, 90, 92, 0, 96, 97,
|
|
0, 95, 0, 93, 93, 93, 94, 0, 92, 92,
|
|
|
|
92, 95, 0, 95, 98, 0, 95, 96, 97, 94,
|
|
94, 94, 0, 0, 0, 96, 96, 96, 95, 95,
|
|
95, 99, 0, 97, 100, 98, 0, 101, 0, 101,
|
|
99, 98, 98, 98, 102, 97, 97, 97, 103, 0,
|
|
0, 99, 99, 105, 100, 0, 104, 102, 99, 99,
|
|
99, 100, 100, 100, 101, 101, 101, 106, 103, 104,
|
|
109, 102, 102, 102, 105, 103, 103, 103, 107, 0,
|
|
105, 105, 105, 104, 104, 104, 108, 0, 106, 110,
|
|
109, 0, 112, 107, 106, 106, 106, 109, 109, 109,
|
|
114, 108, 114, 110, 142, 107, 107, 107, 111, 0,
|
|
|
|
0, 113, 112, 108, 108, 108, 110, 110, 110, 112,
|
|
112, 112, 111, 113, 115, 0, 115, 114, 114, 114,
|
|
116, 142, 142, 142, 118, 111, 111, 111, 113, 113,
|
|
113, 0, 117, 0, 0, 116, 0, 0, 0, 119,
|
|
118, 115, 115, 115, 120, 0, 0, 116, 116, 116,
|
|
117, 118, 118, 118, 121, 0, 0, 0, 120, 117,
|
|
117, 117, 119, 122, 141, 0, 119, 119, 119, 121,
|
|
123, 120, 120, 120, 0, 122, 124, 0, 133, 123,
|
|
0, 121, 121, 121, 133, 133, 133, 133, 133, 133,
|
|
122, 122, 122, 0, 124, 141, 0, 123, 123, 123,
|
|
|
|
0, 153, 0, 124, 124, 124, 135, 135, 135, 135,
|
|
135, 135, 135, 136, 136, 136, 136, 136, 136, 136,
|
|
0, 0, 141, 141, 141, 136, 0, 136, 153, 153,
|
|
153, 136, 138, 138, 138, 138, 138, 138, 138, 0,
|
|
0, 0, 0, 0, 152, 0, 0, 152, 136, 154,
|
|
136, 0, 0, 0, 0, 136, 139, 139, 139, 139,
|
|
139, 139, 139, 143, 143, 143, 143, 143, 139, 157,
|
|
139, 152, 152, 152, 139, 0, 154, 154, 154, 143,
|
|
155, 0, 155, 0, 0, 156, 0, 0, 157, 0,
|
|
160, 139, 156, 139, 158, 156, 0, 159, 139, 0,
|
|
|
|
0, 0, 143, 160, 159, 0, 162, 155, 155, 155,
|
|
0, 162, 156, 156, 156, 157, 157, 157, 161, 0,
|
|
0, 158, 158, 158, 159, 159, 159, 143, 0, 163,
|
|
160, 160, 160, 162, 162, 162, 163, 164, 168, 161,
|
|
165, 0, 164, 166, 0, 161, 161, 161, 168, 166,
|
|
0, 169, 165, 0, 0, 167, 163, 163, 163, 169,
|
|
0, 0, 170, 0, 164, 164, 164, 165, 165, 165,
|
|
166, 166, 166, 167, 172, 168, 168, 168, 170, 0,
|
|
0, 173, 167, 167, 167, 0, 169, 169, 169, 171,
|
|
0, 171, 175, 0, 0, 172, 173, 174, 175, 0,
|
|
|
|
0, 172, 172, 172, 176, 170, 170, 170, 173, 173,
|
|
173, 177, 0, 174, 0, 0, 171, 171, 171, 175,
|
|
175, 175, 176, 179, 174, 174, 174, 177, 178, 179,
|
|
178, 176, 176, 176, 180, 184, 0, 180, 177, 177,
|
|
177, 181, 0, 0, 182, 0, 182, 0, 0, 0,
|
|
179, 179, 179, 183, 181, 178, 178, 178, 0, 0,
|
|
184, 180, 180, 180, 0, 0, 184, 185, 181, 181,
|
|
181, 182, 182, 182, 183, 185, 186, 0, 187, 189,
|
|
183, 183, 183, 186, 0, 188, 0, 184, 184, 184,
|
|
0, 189, 190, 0, 185, 185, 185, 187, 0, 0,
|
|
|
|
0, 187, 188, 186, 186, 186, 189, 189, 189, 213,
|
|
190, 0, 188, 188, 188, 0, 213, 191, 0, 190,
|
|
190, 190, 192, 0, 187, 187, 187, 191, 192, 195,
|
|
0, 0, 193, 213, 0, 194, 0, 0, 191, 197,
|
|
213, 205, 0, 195, 191, 191, 191, 0, 0, 192,
|
|
192, 192, 193, 0, 197, 194, 195, 195, 195, 193,
|
|
193, 193, 194, 194, 194, 196, 197, 197, 197, 198,
|
|
0, 0, 205, 0, 0, 196, 217, 0, 0, 198,
|
|
206, 206, 206, 206, 206, 206, 206, 218, 217, 0,
|
|
219, 0, 196, 196, 196, 220, 198, 198, 198, 205,
|
|
|
|
205, 205, 221, 217, 217, 217, 222, 218, 0, 220,
|
|
0, 224, 0, 0, 218, 218, 218, 219, 219, 219,
|
|
221, 223, 220, 220, 220, 224, 0, 0, 0, 226,
|
|
0, 0, 223, 222, 222, 222, 225, 0, 224, 224,
|
|
224, 226, 225, 227, 0, 0, 0, 221, 221, 221,
|
|
0, 0, 0, 227, 228, 0, 226, 226, 226, 223,
|
|
223, 223, 230, 225, 225, 225, 228, 229, 0, 0,
|
|
227, 227, 227, 231, 228, 230, 233, 0, 0, 231,
|
|
232, 228, 228, 228, 0, 234, 233, 229, 0, 230,
|
|
230, 230, 0, 236, 229, 229, 229, 0, 232, 234,
|
|
|
|
231, 231, 231, 233, 233, 233, 238, 232, 232, 232,
|
|
235, 236, 234, 234, 234, 239, 0, 235, 237, 0,
|
|
236, 236, 236, 0, 237, 240, 241, 0, 0, 243,
|
|
0, 0, 244, 238, 238, 238, 242, 235, 235, 235,
|
|
240, 243, 239, 239, 239, 237, 237, 237, 247, 241,
|
|
242, 0, 240, 240, 240, 245, 243, 243, 243, 244,
|
|
244, 244, 248, 242, 242, 242, 249, 0, 250, 246,
|
|
248, 0, 0, 0, 247, 245, 241, 241, 241, 252,
|
|
0, 0, 245, 245, 245, 246, 250, 0, 0, 248,
|
|
248, 248, 253, 249, 249, 249, 246, 246, 246, 251,
|
|
|
|
252, 247, 247, 247, 251, 254, 252, 252, 252, 255,
|
|
0, 0, 256, 250, 250, 250, 256, 259, 0, 253,
|
|
253, 253, 0, 255, 257, 254, 251, 251, 251, 258,
|
|
0, 0, 254, 254, 254, 258, 255, 255, 255, 256,
|
|
256, 256, 259, 257, 0, 0, 260, 0, 259, 261,
|
|
268, 257, 257, 257, 260, 0, 258, 258, 258, 0,
|
|
0, 262, 261, 0, 263, 0, 263, 0, 0, 259,
|
|
259, 259, 0, 260, 260, 260, 261, 261, 261, 262,
|
|
0, 268, 269, 269, 269, 269, 269, 277, 262, 262,
|
|
262, 263, 263, 263, 280, 276, 279, 0, 269, 0,
|
|
|
|
277, 276, 0, 278, 0, 0, 0, 280, 268, 268,
|
|
268, 0, 279, 278, 0, 281, 0, 0, 0, 0,
|
|
0, 269, 276, 276, 276, 0, 281, 277, 277, 277,
|
|
278, 278, 278, 282, 280, 280, 280, 282, 0, 279,
|
|
279, 279, 281, 281, 281, 283, 269, 283, 284, 285,
|
|
284, 285, 0, 0, 287, 0, 0, 286, 287, 0,
|
|
282, 282, 282, 286, 288, 0, 288, 289, 0, 0,
|
|
0, 0, 283, 283, 283, 284, 284, 284, 285, 285,
|
|
285, 287, 287, 287, 286, 286, 286, 289, 290, 0,
|
|
0, 288, 288, 288, 289, 289, 289, 291, 0, 0,
|
|
|
|
292, 0, 0, 290, 293, 0, 0, 0, 294, 291,
|
|
294, 293, 295, 0, 0, 290, 290, 290, 300, 0,
|
|
292, 296, 0, 0, 291, 291, 291, 292, 292, 292,
|
|
295, 293, 293, 293, 298, 294, 294, 294, 299, 295,
|
|
295, 295, 296, 302, 299, 300, 300, 300, 296, 296,
|
|
296, 301, 303, 298, 0, 0, 0, 0, 303, 307,
|
|
0, 298, 298, 298, 0, 299, 299, 299, 304, 305,
|
|
302, 302, 302, 0, 301, 0, 305, 306, 0, 303,
|
|
303, 303, 0, 306, 304, 310, 307, 307, 307, 312,
|
|
0, 308, 0, 0, 309, 0, 305, 305, 305, 308,
|
|
|
|
311, 301, 301, 301, 306, 306, 306, 0, 310, 0,
|
|
0, 304, 304, 304, 309, 312, 0, 0, 308, 308,
|
|
308, 309, 309, 309, 313, 0, 0, 311, 311, 311,
|
|
314, 0, 313, 0, 316, 310, 310, 310, 315, 0,
|
|
0, 325, 312, 312, 312, 0, 317, 324, 315, 317,
|
|
327, 313, 313, 313, 316, 325, 326, 314, 314, 314,
|
|
324, 316, 316, 316, 0, 315, 315, 315, 325, 325,
|
|
325, 0, 330, 317, 317, 317, 326, 327, 327, 327,
|
|
332, 0, 328, 326, 326, 326, 328, 324, 324, 324,
|
|
329, 330, 331, 0, 332, 329, 0, 0, 334, 330,
|
|
|
|
330, 330, 333, 0, 333, 0, 337, 332, 332, 332,
|
|
337, 0, 331, 328, 328, 328, 334, 0, 336, 331,
|
|
331, 331, 329, 329, 329, 334, 334, 334, 335, 333,
|
|
333, 333, 338, 337, 337, 337, 342, 335, 336, 339,
|
|
0, 0, 340, 0, 342, 336, 336, 336, 338, 0,
|
|
341, 339, 340, 0, 0, 335, 335, 335, 346, 338,
|
|
338, 338, 341, 342, 342, 342, 339, 339, 339, 340,
|
|
340, 340, 343, 0, 0, 343, 344, 341, 341, 341,
|
|
0, 345, 0, 0, 348, 346, 346, 346, 349, 0,
|
|
344, 345, 350, 0, 0, 0, 0, 351, 0, 343,
|
|
|
|
343, 343, 348, 344, 344, 344, 353, 0, 345, 345,
|
|
345, 348, 348, 348, 356, 349, 349, 349, 351, 350,
|
|
350, 350, 354, 0, 351, 351, 351, 355, 354, 0,
|
|
0, 0, 357, 353, 353, 353, 0, 0, 360, 0,
|
|
0, 356, 356, 356, 357, 363, 361, 355, 0, 354,
|
|
354, 354, 360, 361, 355, 355, 355, 362, 0, 357,
|
|
357, 357, 363, 0, 0, 360, 360, 360, 364, 0,
|
|
0, 365, 0, 361, 361, 361, 366, 0, 364, 367,
|
|
362, 0, 366, 0, 362, 362, 362, 0, 369, 363,
|
|
363, 363, 0, 367, 369, 364, 364, 364, 365, 365,
|
|
|
|
365, 368, 0, 366, 366, 366, 367, 367, 367, 370,
|
|
0, 0, 371, 368, 370, 369, 369, 369, 371, 372,
|
|
0, 0, 0, 0, 0, 373, 0, 0, 368, 368,
|
|
368, 373, 0, 375, 0, 0, 370, 370, 370, 371,
|
|
371, 371, 0, 372, 374, 375, 372, 372, 372, 0,
|
|
374, 376, 373, 373, 373, 377, 376, 0, 378, 0,
|
|
375, 375, 375, 379, 0, 0, 0, 0, 381, 0,
|
|
377, 374, 374, 374, 381, 380, 0, 0, 376, 376,
|
|
376, 379, 377, 377, 377, 378, 378, 378, 382, 386,
|
|
379, 379, 379, 380, 382, 381, 381, 381, 384, 0,
|
|
|
|
0, 385, 380, 380, 380, 384, 388, 386, 385, 0,
|
|
0, 0, 0, 387, 0, 382, 382, 382, 388, 0,
|
|
0, 0, 390, 0, 0, 384, 384, 384, 385, 385,
|
|
385, 0, 389, 0, 386, 386, 386, 387, 389, 391,
|
|
387, 387, 387, 390, 393, 388, 388, 388, 392, 390,
|
|
390, 390, 394, 0, 0, 392, 396, 391, 394, 389,
|
|
389, 389, 393, 395, 0, 0, 391, 391, 391, 399,
|
|
0, 393, 393, 393, 397, 392, 392, 392, 395, 394,
|
|
394, 394, 403, 396, 396, 396, 0, 398, 397, 0,
|
|
395, 395, 395, 398, 400, 0, 399, 399, 399, 400,
|
|
|
|
401, 397, 397, 397, 404, 0, 0, 405, 0, 403,
|
|
403, 403, 406, 405, 398, 398, 398, 409, 406, 401,
|
|
408, 400, 400, 400, 407, 0, 408, 401, 401, 401,
|
|
410, 404, 404, 404, 405, 405, 405, 411, 0, 406,
|
|
406, 406, 0, 407, 409, 0, 0, 408, 408, 408,
|
|
412, 407, 407, 407, 415, 412, 410, 411, 0, 413,
|
|
0, 0, 414, 413, 411, 411, 411, 0, 0, 0,
|
|
412, 409, 409, 409, 416, 0, 0, 415, 0, 419,
|
|
0, 414, 0, 410, 410, 410, 413, 413, 413, 414,
|
|
414, 414, 417, 416, 0, 424, 418, 412, 412, 412,
|
|
|
|
420, 416, 416, 416, 415, 415, 415, 419, 0, 0,
|
|
420, 0, 421, 0, 417, 418, 0, 0, 424, 417,
|
|
417, 417, 421, 418, 418, 418, 422, 420, 420, 420,
|
|
0, 423, 0, 0, 419, 419, 419, 426, 0, 421,
|
|
421, 421, 423, 426, 422, 424, 424, 424, 0, 0,
|
|
427, 0, 0, 422, 422, 422, 427, 0, 423, 423,
|
|
423, 428, 0, 0, 426, 426, 426, 429, 430, 429,
|
|
430, 0, 0, 432, 0, 0, 0, 427, 427, 427,
|
|
436, 428, 0, 0, 433, 432, 436, 0, 428, 428,
|
|
428, 0, 435, 0, 429, 429, 429, 430, 430, 430,
|
|
|
|
432, 432, 432, 433, 434, 438, 435, 436, 436, 436,
|
|
434, 433, 433, 433, 437, 0, 0, 0, 434, 435,
|
|
435, 435, 0, 438, 439, 0, 0, 0, 440, 437,
|
|
0, 0, 438, 438, 438, 442, 0, 434, 434, 434,
|
|
441, 437, 437, 437, 0, 439, 440, 443, 0, 0,
|
|
442, 439, 439, 439, 444, 440, 440, 440, 445, 443,
|
|
0, 441, 442, 442, 442, 446, 0, 441, 441, 441,
|
|
0, 0, 445, 444, 443, 443, 443, 447, 0, 447,
|
|
446, 444, 444, 444, 449, 445, 445, 445, 448, 449,
|
|
515, 451, 446, 446, 446, 450, 0, 453, 448, 452,
|
|
|
|
454, 455, 0, 515, 447, 447, 447, 453, 450, 451,
|
|
454, 449, 449, 449, 452, 448, 448, 448, 451, 451,
|
|
451, 455, 450, 450, 450, 457, 452, 452, 452, 456,
|
|
515, 515, 515, 0, 453, 453, 453, 454, 454, 454,
|
|
458, 0, 0, 456, 0, 459, 457, 0, 455, 455,
|
|
455, 460, 457, 457, 457, 459, 456, 456, 456, 0,
|
|
0, 458, 461, 0, 460, 462, 0, 458, 458, 458,
|
|
465, 0, 459, 459, 459, 461, 465, 0, 460, 460,
|
|
460, 463, 0, 0, 463, 462, 0, 468, 0, 461,
|
|
461, 461, 462, 462, 462, 464, 0, 0, 464, 0,
|
|
|
|
466, 0, 468, 465, 465, 465, 466, 467, 463, 463,
|
|
463, 0, 469, 467, 468, 468, 468, 472, 0, 470,
|
|
0, 0, 464, 464, 464, 0, 472, 466, 466, 466,
|
|
469, 471, 0, 473, 467, 467, 467, 470, 475, 469,
|
|
469, 469, 473, 0, 0, 475, 470, 470, 470, 474,
|
|
0, 0, 471, 472, 472, 472, 478, 476, 471, 471,
|
|
471, 478, 480, 474, 476, 475, 475, 475, 477, 473,
|
|
473, 473, 480, 477, 479, 0, 474, 474, 474, 479,
|
|
0, 0, 481, 0, 476, 476, 476, 0, 478, 478,
|
|
478, 0, 481, 482, 0, 477, 477, 477, 483, 480,
|
|
|
|
480, 480, 0, 482, 484, 0, 479, 479, 479, 481,
|
|
481, 481, 484, 0, 0, 485, 0, 0, 0, 483,
|
|
482, 482, 482, 485, 486, 483, 483, 483, 490, 0,
|
|
0, 484, 484, 484, 487, 0, 0, 486, 490, 0,
|
|
488, 0, 485, 485, 485, 0, 489, 0, 487, 489,
|
|
491, 486, 486, 486, 488, 490, 490, 490, 492, 0,
|
|
491, 487, 487, 487, 492, 493, 0, 488, 488, 488,
|
|
495, 0, 493, 489, 489, 489, 494, 491, 491, 491,
|
|
496, 0, 0, 494, 0, 492, 492, 492, 495, 0,
|
|
496, 497, 493, 493, 493, 0, 499, 495, 495, 495,
|
|
|
|
499, 497, 498, 494, 494, 494, 500, 496, 496, 496,
|
|
500, 498, 504, 0, 501, 0, 0, 504, 497, 497,
|
|
497, 501, 505, 499, 499, 499, 502, 0, 502, 503,
|
|
0, 503, 0, 500, 500, 500, 505, 0, 498, 498,
|
|
498, 501, 501, 501, 504, 504, 504, 506, 0, 505,
|
|
505, 505, 507, 502, 502, 502, 503, 503, 503, 511,
|
|
510, 506, 507, 508, 512, 0, 509, 0, 510, 0,
|
|
513, 0, 0, 0, 506, 506, 506, 511, 0, 507,
|
|
507, 507, 512, 508, 513, 0, 509, 510, 510, 510,
|
|
508, 508, 508, 509, 509, 509, 0, 513, 513, 513,
|
|
|
|
0, 0, 514, 0, 511, 511, 511, 516, 0, 512,
|
|
512, 512, 514, 517, 0, 0, 518, 516, 0, 519,
|
|
0, 517, 520, 0, 518, 0, 519, 521, 0, 514,
|
|
514, 514, 520, 0, 516, 516, 516, 521, 523, 0,
|
|
517, 517, 517, 518, 518, 518, 519, 519, 519, 520,
|
|
520, 520, 522, 0, 521, 521, 521, 524, 523, 0,
|
|
525, 0, 522, 526, 525, 523, 523, 523, 528, 0,
|
|
528, 0, 0, 0, 527, 0, 0, 524, 530, 522,
|
|
522, 522, 526, 0, 524, 524, 524, 525, 525, 525,
|
|
526, 526, 526, 527, 529, 528, 528, 528, 530, 531,
|
|
|
|
532, 527, 527, 527, 533, 530, 530, 530, 529, 534,
|
|
532, 0, 533, 0, 535, 0, 0, 531, 0, 534,
|
|
536, 529, 529, 529, 0, 0, 0, 532, 532, 532,
|
|
0, 533, 533, 533, 535, 0, 534, 534, 534, 536,
|
|
0, 535, 535, 535, 531, 531, 531, 536, 536, 536,
|
|
538, 538, 538, 538, 538, 538, 538, 538, 538, 538,
|
|
538, 538, 538, 538, 539, 539, 539, 539, 539, 539,
|
|
539, 539, 539, 539, 539, 539, 539, 539, 540, 540,
|
|
540, 540, 540, 540, 540, 540, 540, 540, 540, 540,
|
|
540, 540, 541, 541, 541, 541, 541, 541, 541, 541,
|
|
|
|
541, 541, 541, 541, 541, 541, 542, 0, 542, 0,
|
|
542, 0, 542, 543, 0, 0, 543, 0, 543, 543,
|
|
543, 543, 543, 544, 544, 0, 544, 544, 544, 544,
|
|
544, 544, 545, 545, 545, 545, 545, 545, 545, 545,
|
|
545, 545, 545, 545, 545, 545, 546, 546, 546, 546,
|
|
546, 546, 546, 546, 546, 546, 546, 546, 546, 547,
|
|
0, 547, 547, 547, 547, 547, 547, 547, 547, 547,
|
|
547, 547, 547, 548, 0, 548, 548, 548, 548, 548,
|
|
548, 548, 548, 548, 548, 548, 548, 549, 549, 549,
|
|
549, 549, 549, 549, 549, 549, 550, 550, 550, 551,
|
|
|
|
0, 0, 0, 0, 551, 551, 551, 552, 552, 552,
|
|
552, 552, 553, 553, 553, 0, 0, 553, 554, 554,
|
|
554, 555, 555, 555, 555, 555, 555, 555, 555, 555,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
537, 537, 537, 537, 537, 537, 537, 537, 537, 537,
|
|
|
|
537, 537, 537
|
|
} ;
|
|
|
|
static yy_state_type yy_last_accepting_state;
|
|
static char *yy_last_accepting_cpos;
|
|
|
|
extern int yy_flex_debug;
|
|
int yy_flex_debug = 0;
|
|
|
|
/* The intent behind this definition is that it'll catch
|
|
* any uses of REJECT which flex missed.
|
|
*/
|
|
#define REJECT reject_used_but_not_detected
|
|
#define yymore() yymore_used_but_not_detected
|
|
#define YY_MORE_ADJ 0
|
|
#define YY_RESTORE_YY_MORE_OFFSET
|
|
char *yytext;
|
|
#line 1 "ncgen.l"
|
|
#line 2 "ncgen.l"
|
|
/*********************************************************************
|
|
* Copyright 1993, UCAR/Unidata
|
|
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
|
|
* $Id: ncgen.l,v 1.24 2009/09/25 18:22:35 dmh Exp $
|
|
*********************************************************************/
|
|
|
|
/* Problems:
|
|
1. We assume the input is true utf8.
|
|
Unfortunately, we may actually get iso-latin-8859-1.
|
|
This means that there will be ambiguity about the characters
|
|
in the range 128-255 because they will look like n-byte unicode
|
|
when they are 1-byte 8859 characters. Because of our encoding,
|
|
8859 characters above 128 will be handles as n-byte utf8 and so
|
|
will probably not lex correctly.
|
|
Solution: assume utf8 and note in the documentation that
|
|
ISO8859 is specifically unsupported.
|
|
2. The netcdf function NC_check_name in string.c must be modified to
|
|
conform to the use of UTF8.
|
|
3. We actually have three tests for UTF8 of increasing correctness
|
|
(in the sense that the least correct will allow some sequences that
|
|
are technically illegal UTF8).
|
|
The tests are derived from the table at
|
|
http://www.w3.org/2005/03/23-lex-U
|
|
We include lexical definitions for all three, but use the second version.
|
|
4. Single character constants enclosed in '...' cannot be
|
|
utf-8, so we assume they are by default encoded using the 1-byte
|
|
subset of utf-8. It turns out that this subset is in fact
|
|
equivalent to US-Ascii (7-bit).
|
|
We could use ISO-8859-1, but that conflicts with UTF-8 above value 127.
|
|
*/
|
|
|
|
/* lex specification for tokens for ncgen */
|
|
|
|
/* Fill value used by ncdump from version 2.4 and later. Should match
|
|
definition of FILL_STRING in ../ncdump/vardata.h */
|
|
|
|
#include "ncgen.h"
|
|
#include "ncgeny.h"
|
|
#include "isnan.h"
|
|
|
|
#define FILL_STRING "_"
|
|
#define XDR_INT32_MIN (-2147483647-1)
|
|
#define XDR_INT32_MAX 2147483647
|
|
#define XDR_INT64_MIN (-9223372036854775807LL-1)
|
|
#define XDR_INT64_MAX (9223372036854775807LL)
|
|
|
|
#undef DEBUG
|
|
#ifdef DEBUG
|
|
static int MIN_BYTE = NC_MIN_BYTE;
|
|
static int MIN_SHORT = NC_MIN_SHORT;
|
|
static int MIN_INT = NC_MIN_INT;
|
|
static int MAX_BYTE = NC_MAX_BYTE;
|
|
static int MAX_SHORT = NC_MAX_SHORT;
|
|
static int MAX_INT = NC_MAX_INT;
|
|
static int MAX_UBYTE = NC_MAX_UBYTE;
|
|
static int MAX_USHORT = NC_MAX_USHORT;
|
|
static unsigned int MAX_UINT = NC_MAX_UINT;
|
|
|
|
#undef NC_MIN_BYTE
|
|
#undef NC_MIN_SHORT
|
|
#undef NC_MIN_INT
|
|
#undef NC_MAX_BYTE
|
|
#undef NC_MAX_SHORT
|
|
#undef NC_MAX_INT
|
|
#undef NC_MAX_UBYTE
|
|
#undef NC_MAX_USHORT
|
|
#undef NC_MAX_UINT
|
|
|
|
#define NC_MIN_BYTE MIN_BYTE
|
|
#define NC_MIN_SHORT MIN_SHORT
|
|
#define NC_MIN_INT MIN_INT
|
|
#define NC_MAX_BYTE MAX_BYTE
|
|
#define NC_MAX_SHORT MAX_SHORT
|
|
#define NC_MAX_INT MAX_INT
|
|
#define NC_MAX_UBYTE MAX_UBYTE
|
|
#define NC_MAX_USHORT MAX_USHORT
|
|
#define NC_MAX_UINT MAX_UINT
|
|
#endif
|
|
|
|
#define TAGCHARS "BbSsLlUu"
|
|
|
|
#define tstdecimal(ch) ((ch) >= '0' && (ch) <= '9')
|
|
#define tstoctal(ch) ((ch) == '0')
|
|
|
|
/*Mnemonics*/
|
|
#define ISIDENT 1
|
|
|
|
/* Define a fake constant indicating that
|
|
no tag was specified */
|
|
#define NC_NOTAG (-1)
|
|
|
|
char errstr[100]; /* for short error messages */
|
|
|
|
int lineno; /* line number for error messages */
|
|
Bytebuffer* lextext; /* name or string with escapes removed */
|
|
|
|
#define YY_BREAK /* defining as nothing eliminates unreachable
|
|
statement warnings from flex output,
|
|
but make sure every action ends with
|
|
"return" or "break"! */
|
|
|
|
int specialconstants; /* 1 if nan, nanf, infinity, etc is used */
|
|
double double_val; /* last double value read */
|
|
float float_val; /* last float value read */
|
|
long long int64_val; /* last int64 value read */
|
|
int int32_val; /* last int32 value read */
|
|
short int16_val; /* last short value read */
|
|
unsigned long long uint64_val; /* last int64 value read */
|
|
unsigned int uint32_val; /* last int32 value read */
|
|
unsigned short uint16_val; /* last short value read */
|
|
char char_val; /* last char value read */
|
|
signed char byte_val; /* last byte value read */
|
|
unsigned char ubyte_val; /* last byte value read */
|
|
|
|
/* Forward */
|
|
static Symbol* makepath(char* text);
|
|
static int lexdebug(int);
|
|
static unsigned long long parseULL(int radix, char* text, int*);
|
|
static nc_type downconvert(unsigned long long uint64, int*, int, int);
|
|
static int tagmatch(nc_type nct, int tag);
|
|
static int nct2lexeme(nc_type nct);
|
|
static int collecttag(char* text, char** stagp);
|
|
static int identcheck(int token);
|
|
|
|
struct Specialtoken specials[] = {
|
|
{"_FillValue",_FILLVALUE,_FILLVALUE_FLAG},
|
|
{"_Format",_FORMAT,_FORMAT_FLAG},
|
|
{"_Storage",_STORAGE,_STORAGE_FLAG},
|
|
{"_ChunkSizes",_CHUNKSIZES,_CHUNKSIZES_FLAG},
|
|
{"_Fletcher32",_FLETCHER32,_FLETCHER32_FLAG},
|
|
{"_DeflateLevel",_DEFLATELEVEL,_DEFLATE_FLAG},
|
|
{"_Shuffle",_SHUFFLE,_SHUFFLE_FLAG},
|
|
{"_Endianness",_ENDIANNESS,_ENDIAN_FLAG},
|
|
{"_NoFill",_NOFILL,_NOFILL_FLAG},
|
|
{"_NCProperties",_NCPROPS,_NCPROPS_FLAG},
|
|
{"_IsNetcdf4",_ISNETCDF4,_ISNETCDF4_FLAG},
|
|
{"_SuperblockVersion",_SUPERBLOCK,_SUPERBLOCK_FLAG},
|
|
{"_Filter",_FILTER,_FILTER_FLAG},
|
|
{"_Codecs",_CODECS,_CODECS_FLAG},
|
|
{"_QuantizeBitGroomNumberOfSignificantDigits",_QUANTIZEBG,_QUANTIZEBG_FLAG},
|
|
{"_QuantizeGranularBitRoundNumberOfSignificantDigits",_QUANTIZEGBR,_QUANTIZEGBR_FLAG},
|
|
{"_QuantizeBitRoundNumberOfSignificantDigits",_QUANTIZEBR,_QUANTIZEBR_FLAG},
|
|
{NULL,0} /* null terminate */
|
|
};
|
|
|
|
#line 1735 "ncgenl.c"
|
|
|
|
/* The most correct (validating) version of UTF8 character set
|
|
(Taken from: http://www.w3.org/2005/03/23-lex-U)
|
|
|
|
The lines of the expression cover the UTF8 characters as follows:
|
|
1. non-overlong 2-byte
|
|
2. excluding overlongs
|
|
3. straight 3-byte
|
|
4. excluding surrogates
|
|
5. straight 3-byte
|
|
6. planes 1-3
|
|
7. planes 4-15
|
|
8. plane 16
|
|
|
|
UTF8 ([\xC2-\xDF][\x80-\xBF]) \
|
|
| (\xE0[\xA0-\xBF][\x80-\xBF]) \
|
|
| ([\xE1-\xEC][\x80-\xBF][\x80-\xBF]) \
|
|
| (\xED[\x80-\x9F][\x80-\xBF]) \
|
|
| ([\xEE-\xEF][\x80-\xBF][\x80-\xBF]) \
|
|
| (\xF0[\x90-\xBF][\x80-\xBF][\x80-\xBF]) \
|
|
| ([\xF1-\xF3][\x80-\xBF][\x80-\xBF][\x80-\xBF]) \
|
|
| (\xF4[\x80-\x8F][\x80-\xBF][\x80-\xBF]) \
|
|
|
|
*/
|
|
/* Wish there was some way to ifdef lex files */
|
|
/*The most relaxed version of UTF8 (not used)
|
|
UTF8 ([\xC0-\xD6].)|([\xE0-\xEF]..)|([\xF0-\xF7]...)
|
|
*/
|
|
/*The partially relaxed version of UTF8, and the one used here */
|
|
/* The old definition of ID
|
|
ID ([A-Za-z_]|{UTF8})([A-Z.@#\[\]a-z_0-9+-]|{UTF8})*
|
|
*/
|
|
/* Don't permit control characters or '/' in names, but other special
|
|
chars OK if escaped. Note that to preserve backwards
|
|
compatibility, none of the characters _.@+- should be escaped, as
|
|
they were previously permitted in names without escaping. */
|
|
/* New definition to conform to a subset of string.c */
|
|
/* Capture a datasetidentifier */
|
|
/* DATASETID ([a-zA-Z0-9!#$%&*:;<=>?/^|~_.@+-]|{UTF8})* */
|
|
/* Note: this definition of string will work for utf8 as well,
|
|
although it is a very relaxed definition
|
|
*/
|
|
#line 1778 "ncgenl.c"
|
|
|
|
#define INITIAL 0
|
|
#define ST_C_COMMENT 1
|
|
#define TEXT 2
|
|
|
|
#ifndef YY_NO_UNISTD_H
|
|
/* Special case for "unistd.h", since it is non-ANSI. We include it way
|
|
* down here because we want the user's section 1 to have been scanned first.
|
|
* The user has a chance to override it with an option.
|
|
*/
|
|
#include <unistd.h>
|
|
#endif
|
|
|
|
#ifndef YY_EXTRA_TYPE
|
|
#define YY_EXTRA_TYPE void *
|
|
#endif
|
|
|
|
static int yy_init_globals ( void );
|
|
|
|
/* Accessor methods to globals.
|
|
These are made visible to non-reentrant scanners for convenience. */
|
|
|
|
int yylex_destroy ( void );
|
|
|
|
int yyget_debug ( void );
|
|
|
|
void yyset_debug ( int debug_flag );
|
|
|
|
YY_EXTRA_TYPE yyget_extra ( void );
|
|
|
|
void yyset_extra ( YY_EXTRA_TYPE user_defined );
|
|
|
|
FILE *yyget_in ( void );
|
|
|
|
void yyset_in ( FILE * _in_str );
|
|
|
|
FILE *yyget_out ( void );
|
|
|
|
void yyset_out ( FILE * _out_str );
|
|
|
|
int yyget_leng ( void );
|
|
|
|
char *yyget_text ( void );
|
|
|
|
int yyget_lineno ( void );
|
|
|
|
void yyset_lineno ( int _line_number );
|
|
|
|
/* Macros after this point can all be overridden by user definitions in
|
|
* section 1.
|
|
*/
|
|
|
|
#ifndef YY_SKIP_YYWRAP
|
|
#ifdef __cplusplus
|
|
extern "C" int yywrap ( void );
|
|
#else
|
|
extern int yywrap ( void );
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef YY_NO_UNPUT
|
|
|
|
static void yyunput ( int c, char *buf_ptr );
|
|
|
|
#endif
|
|
|
|
#ifndef yytext_ptr
|
|
static void yy_flex_strncpy ( char *, const char *, int );
|
|
#endif
|
|
|
|
#ifdef YY_NEED_STRLEN
|
|
static int yy_flex_strlen ( const char * );
|
|
#endif
|
|
|
|
#ifndef YY_NO_INPUT
|
|
#ifdef __cplusplus
|
|
static int yyinput ( void );
|
|
#else
|
|
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. */
|
|
#ifndef ECHO
|
|
/* This used to be an fputs(), but since the string might contain NUL's,
|
|
* we now use fwrite().
|
|
*/
|
|
#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0)
|
|
#endif
|
|
|
|
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
|
* is returned in "result".
|
|
*/
|
|
#ifndef YY_INPUT
|
|
#define YY_INPUT(buf,result,max_size) \
|
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
|
{ \
|
|
int c = '*'; \
|
|
int n; \
|
|
for ( n = 0; n < max_size && \
|
|
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
|
|
buf[n] = (char) c; \
|
|
if ( c == '\n' ) \
|
|
buf[n++] = (char) c; \
|
|
if ( c == EOF && ferror( yyin ) ) \
|
|
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
|
result = n; \
|
|
} \
|
|
else \
|
|
{ \
|
|
errno=0; \
|
|
while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
|
|
{ \
|
|
if( errno != EINTR) \
|
|
{ \
|
|
YY_FATAL_ERROR( "input in flex scanner failed" ); \
|
|
break; \
|
|
} \
|
|
errno=0; \
|
|
clearerr(yyin); \
|
|
} \
|
|
}\
|
|
\
|
|
|
|
#endif
|
|
|
|
/* No semi-colon after return; correct usage is to write "yyterminate();" -
|
|
* we don't want an extra ';' after the "return" because that will cause
|
|
* some compilers to complain about unreachable statements.
|
|
*/
|
|
#ifndef yyterminate
|
|
#define yyterminate() return YY_NULL
|
|
#endif
|
|
|
|
/* Number of entries by which start-condition stack grows. */
|
|
#ifndef YY_START_STACK_INCR
|
|
#define YY_START_STACK_INCR 25
|
|
#endif
|
|
|
|
/* Report a fatal error. */
|
|
#ifndef YY_FATAL_ERROR
|
|
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
|
|
#endif
|
|
|
|
/* end tables serialization structures and prototypes */
|
|
|
|
/* Default declaration of generated scanner - a define so the user can
|
|
* easily add parameters.
|
|
*/
|
|
#ifndef YY_DECL
|
|
#define YY_DECL_IS_OURS 1
|
|
|
|
extern int yylex (void);
|
|
|
|
#define YY_DECL int yylex (void)
|
|
#endif /* !YY_DECL */
|
|
|
|
/* Code executed at the beginning of each rule, after yytext and yyleng
|
|
* have been set up.
|
|
*/
|
|
#ifndef YY_USER_ACTION
|
|
#define YY_USER_ACTION
|
|
#endif
|
|
|
|
/* Code executed at the end of each rule. */
|
|
#ifndef YY_BREAK
|
|
#define YY_BREAK /*LINTED*/break;
|
|
#endif
|
|
|
|
#define YY_RULE_SETUP \
|
|
YY_USER_ACTION
|
|
|
|
/** The main scanner function which does all the work.
|
|
*/
|
|
YY_DECL
|
|
{
|
|
yy_state_type yy_current_state;
|
|
char *yy_cp, *yy_bp;
|
|
int yy_act;
|
|
|
|
if ( !(yy_init) )
|
|
{
|
|
(yy_init) = 1;
|
|
|
|
#ifdef YY_USER_INIT
|
|
YY_USER_INIT;
|
|
#endif
|
|
|
|
if ( ! (yy_start) )
|
|
(yy_start) = 1; /* first start state */
|
|
|
|
if ( ! yyin )
|
|
yyin = stdin;
|
|
|
|
if ( ! yyout )
|
|
yyout = stdout;
|
|
|
|
if ( ! YY_CURRENT_BUFFER ) {
|
|
yyensure_buffer_stack ();
|
|
YY_CURRENT_BUFFER_LVALUE =
|
|
yy_create_buffer( yyin, YY_BUF_SIZE );
|
|
}
|
|
|
|
yy_load_buffer_state( );
|
|
}
|
|
|
|
{
|
|
#line 226 "ncgen.l"
|
|
|
|
#line 1999 "ncgenl.c"
|
|
|
|
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
|
|
{
|
|
yy_cp = (yy_c_buf_p);
|
|
|
|
/* Support of yytext. */
|
|
*yy_cp = (yy_hold_char);
|
|
|
|
/* yy_bp points to the position in yy_ch_buf of the start of
|
|
* the current run.
|
|
*/
|
|
yy_bp = yy_cp;
|
|
|
|
yy_current_state = (yy_start);
|
|
yy_match:
|
|
do
|
|
{
|
|
YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
|
|
if ( yy_accept[yy_current_state] )
|
|
{
|
|
(yy_last_accepting_state) = yy_current_state;
|
|
(yy_last_accepting_cpos) = yy_cp;
|
|
}
|
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
{
|
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
if ( yy_current_state >= 538 )
|
|
yy_c = yy_meta[yy_c];
|
|
}
|
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
|
++yy_cp;
|
|
}
|
|
while ( yy_base[yy_current_state] != 3131 );
|
|
|
|
yy_find_action:
|
|
yy_act = yy_accept[yy_current_state];
|
|
if ( yy_act == 0 )
|
|
{ /* have to back up */
|
|
yy_cp = (yy_last_accepting_cpos);
|
|
yy_current_state = (yy_last_accepting_state);
|
|
yy_act = yy_accept[yy_current_state];
|
|
}
|
|
|
|
YY_DO_BEFORE_ACTION;
|
|
|
|
do_action: /* This label is used only to access EOF actions. */
|
|
|
|
switch ( yy_act )
|
|
{ /* beginning of action switch */
|
|
case 0: /* must back up */
|
|
/* undo the effects of YY_DO_BEFORE_ACTION */
|
|
*yy_cp = (yy_hold_char);
|
|
yy_cp = (yy_last_accepting_cpos);
|
|
yy_current_state = (yy_last_accepting_state);
|
|
goto yy_find_action;
|
|
|
|
case 1:
|
|
YY_RULE_SETUP
|
|
#line 227 "ncgen.l"
|
|
{ /* whitespace */
|
|
break;
|
|
}
|
|
YY_BREAK
|
|
case 2:
|
|
YY_RULE_SETUP
|
|
#line 231 "ncgen.l"
|
|
{ /* comment */
|
|
break;
|
|
}
|
|
YY_BREAK
|
|
case 3:
|
|
/* rule 3 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 235 "ncgen.l"
|
|
{int len; char* s = NULL;
|
|
/* In netcdf4, this will be used in a variety
|
|
of places, so only remove escapes */
|
|
/*
|
|
if(yyleng > MAXTRST) {
|
|
yyerror("string too long, truncated\n");
|
|
yytext[MAXTRST-1] = '\0';
|
|
}
|
|
*/
|
|
len = unescape((char *)yytext+1,yyleng-2,!ISIDENT,&s);
|
|
if(len < 0) {
|
|
snprintf(errstr,sizeof(errstr),"Illegal character: %s",yytext);
|
|
yyerror(errstr);
|
|
}
|
|
bbClear(lextext);
|
|
bbAppendn(lextext,s,len);
|
|
bbNull(lextext);
|
|
if(s) efree(s);
|
|
return lexdebug(TERMSTRING);
|
|
}
|
|
YY_BREAK
|
|
case 4:
|
|
YY_RULE_SETUP
|
|
#line 256 "ncgen.l"
|
|
{ /* drop leading 0x; pad to even number of chars */
|
|
char* p = yytext+2;
|
|
int len = yyleng - 2;
|
|
bbClear(lextext);
|
|
bbAppendn(lextext,p,len);
|
|
if((len % 2) == 1) bbAppend(lextext,'0');
|
|
bbNull(lextext);
|
|
/* convert all chars to lower case */
|
|
for(p=bbContents(lextext);(int)*p;p++) *p = tolower(*p);
|
|
return lexdebug(OPAQUESTRING);
|
|
}
|
|
YY_BREAK
|
|
case 5:
|
|
YY_RULE_SETUP
|
|
#line 268 "ncgen.l"
|
|
{return lexdebug(COMPOUND);}
|
|
YY_BREAK
|
|
case 6:
|
|
YY_RULE_SETUP
|
|
#line 269 "ncgen.l"
|
|
{return lexdebug(ENUM);}
|
|
YY_BREAK
|
|
case 7:
|
|
YY_RULE_SETUP
|
|
#line 270 "ncgen.l"
|
|
{return lexdebug(OPAQUE_);}
|
|
YY_BREAK
|
|
case 8:
|
|
YY_RULE_SETUP
|
|
#line 272 "ncgen.l"
|
|
{return lexdebug(FLOAT_K);}
|
|
YY_BREAK
|
|
case 9:
|
|
YY_RULE_SETUP
|
|
#line 273 "ncgen.l"
|
|
{return lexdebug(DOUBLE_K);}
|
|
YY_BREAK
|
|
case 10:
|
|
YY_RULE_SETUP
|
|
#line 274 "ncgen.l"
|
|
{return lexdebug(CHAR_K);}
|
|
YY_BREAK
|
|
case 11:
|
|
YY_RULE_SETUP
|
|
#line 275 "ncgen.l"
|
|
{return lexdebug(BYTE_K);}
|
|
YY_BREAK
|
|
case 12:
|
|
YY_RULE_SETUP
|
|
#line 276 "ncgen.l"
|
|
{return lexdebug(SHORT_K);}
|
|
YY_BREAK
|
|
case 13:
|
|
YY_RULE_SETUP
|
|
#line 277 "ncgen.l"
|
|
{return lexdebug(INT_K);}
|
|
YY_BREAK
|
|
case 14:
|
|
YY_RULE_SETUP
|
|
#line 278 "ncgen.l"
|
|
{return lexdebug(identcheck(UBYTE_K));}
|
|
YY_BREAK
|
|
case 15:
|
|
YY_RULE_SETUP
|
|
#line 279 "ncgen.l"
|
|
{return lexdebug(identcheck(USHORT_K));}
|
|
YY_BREAK
|
|
case 16:
|
|
YY_RULE_SETUP
|
|
#line 280 "ncgen.l"
|
|
{return lexdebug(identcheck(UINT_K));}
|
|
YY_BREAK
|
|
case 17:
|
|
YY_RULE_SETUP
|
|
#line 281 "ncgen.l"
|
|
{return lexdebug(identcheck(INT64_K));}
|
|
YY_BREAK
|
|
case 18:
|
|
YY_RULE_SETUP
|
|
#line 282 "ncgen.l"
|
|
{return lexdebug(identcheck(UINT64_K));}
|
|
YY_BREAK
|
|
case 19:
|
|
YY_RULE_SETUP
|
|
#line 283 "ncgen.l"
|
|
{return lexdebug(identcheck(STRING_K));}
|
|
YY_BREAK
|
|
case 20:
|
|
YY_RULE_SETUP
|
|
#line 285 "ncgen.l"
|
|
{return lexdebug(FLOAT_K);}
|
|
YY_BREAK
|
|
case 21:
|
|
YY_RULE_SETUP
|
|
#line 286 "ncgen.l"
|
|
{return lexdebug(INT_K);}
|
|
YY_BREAK
|
|
case 22:
|
|
YY_RULE_SETUP
|
|
#line 287 "ncgen.l"
|
|
{return lexdebug(INT_K);}
|
|
YY_BREAK
|
|
case 23:
|
|
YY_RULE_SETUP
|
|
#line 288 "ncgen.l"
|
|
{return lexdebug(identcheck(UINT_K));}
|
|
YY_BREAK
|
|
case 24:
|
|
YY_RULE_SETUP
|
|
#line 289 "ncgen.l"
|
|
{return lexdebug(identcheck(UINT_K));}
|
|
YY_BREAK
|
|
case 25:
|
|
YY_RULE_SETUP
|
|
#line 292 "ncgen.l"
|
|
{int32_val = -1;
|
|
return lexdebug(NC_UNLIMITED_K);}
|
|
YY_BREAK
|
|
case 26:
|
|
YY_RULE_SETUP
|
|
#line 295 "ncgen.l"
|
|
{return lexdebug(TYPES);}
|
|
YY_BREAK
|
|
case 27:
|
|
YY_RULE_SETUP
|
|
#line 296 "ncgen.l"
|
|
{return lexdebug(DIMENSIONS);}
|
|
YY_BREAK
|
|
case 28:
|
|
YY_RULE_SETUP
|
|
#line 297 "ncgen.l"
|
|
{return lexdebug(VARIABLES);}
|
|
YY_BREAK
|
|
case 29:
|
|
YY_RULE_SETUP
|
|
#line 298 "ncgen.l"
|
|
{return lexdebug(DATA);}
|
|
YY_BREAK
|
|
case 30:
|
|
YY_RULE_SETUP
|
|
#line 299 "ncgen.l"
|
|
{return lexdebug(GROUP);}
|
|
YY_BREAK
|
|
case 31:
|
|
YY_RULE_SETUP
|
|
#line 301 "ncgen.l"
|
|
{BEGIN(TEXT);return lexdebug(NETCDF);}
|
|
YY_BREAK
|
|
case 32:
|
|
YY_RULE_SETUP
|
|
#line 303 "ncgen.l"
|
|
{ /* missing value (pre-2.4 backward compatibility) */
|
|
if (yytext[0] == '-') {
|
|
double_val = -INFINITY;
|
|
} else {
|
|
double_val = INFINITY;
|
|
}
|
|
specialconstants = 1;
|
|
return lexdebug(DOUBLE_CONST);
|
|
}
|
|
YY_BREAK
|
|
case 33:
|
|
YY_RULE_SETUP
|
|
#line 312 "ncgen.l"
|
|
{ /* missing value (pre-2.4 backward compatibility) */
|
|
double_val = NAN;
|
|
specialconstants = 1;
|
|
return lexdebug(DOUBLE_CONST);
|
|
}
|
|
YY_BREAK
|
|
case 34:
|
|
YY_RULE_SETUP
|
|
#line 318 "ncgen.l"
|
|
{/* missing value (pre-2.4 backward compatibility)*/
|
|
if (yytext[0] == '-') {
|
|
float_val = -INFINITYF;
|
|
} else {
|
|
float_val = INFINITYF;
|
|
}
|
|
specialconstants = 1;
|
|
return lexdebug(FLOAT_CONST);
|
|
}
|
|
YY_BREAK
|
|
case 35:
|
|
YY_RULE_SETUP
|
|
#line 327 "ncgen.l"
|
|
{ /* missing value (pre-2.4 backward compatibility) */
|
|
float_val = NANF;
|
|
specialconstants = 1;
|
|
return lexdebug(FLOAT_CONST);
|
|
}
|
|
YY_BREAK
|
|
case 36:
|
|
YY_RULE_SETUP
|
|
#line 333 "ncgen.l"
|
|
{
|
|
#ifdef USE_NETCDF4
|
|
if(l_flag == L_C || l_flag == L_BINARY)
|
|
return lexdebug(NIL);
|
|
yyerror("NIL only allowed for netcdf-4 and for -lc or -lb");
|
|
#else
|
|
yyerror("NIL only allowed for netcdf-4 and for -lc or -lb");
|
|
#endif
|
|
}
|
|
YY_BREAK
|
|
case 37:
|
|
YY_RULE_SETUP
|
|
#line 343 "ncgen.l"
|
|
{
|
|
bbClear(lextext);
|
|
bbAppendn(lextext,(char*)yytext,yyleng+1); /* include null */
|
|
bbNull(lextext);
|
|
yylval.sym = makepath(bbContents(lextext));
|
|
return lexdebug(PATH);
|
|
}
|
|
YY_BREAK
|
|
case 38:
|
|
YY_RULE_SETUP
|
|
#line 352 "ncgen.l"
|
|
{struct Specialtoken* st;
|
|
bbClear(lextext);
|
|
bbAppendn(lextext,(char*)yytext,yyleng+1); /* include null */
|
|
bbNull(lextext);
|
|
for(st=specials;st->name;st++) {
|
|
if(strcmp(bbContents(lextext),st->name)==0) {return lexdebug(st->token);}
|
|
}
|
|
return 0;
|
|
}
|
|
YY_BREAK
|
|
case 39:
|
|
/* rule 39 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 362 "ncgen.l"
|
|
{
|
|
int c;
|
|
char* p; char* q;
|
|
/* copy the trimmed name */
|
|
bbClear(lextext);
|
|
bbAppendn(lextext,(char*)yytext,yyleng+1); /* include null */
|
|
bbNull(lextext);
|
|
p = bbContents(lextext);
|
|
q = p;
|
|
while((c=*p++)) {if(c > ' ') *q++ = c;}
|
|
*q = '\0';
|
|
if(datasetname == NULL)
|
|
datasetname = bbDup(lextext);
|
|
BEGIN(INITIAL);
|
|
return lexdebug(DATASETID);
|
|
}
|
|
YY_BREAK
|
|
case 40:
|
|
YY_RULE_SETUP
|
|
#line 379 "ncgen.l"
|
|
{ char* id = NULL; int len;
|
|
len = strlen(yytext);
|
|
len = unescape(yytext,len,ISIDENT,&id);
|
|
if(NCSTREQ(id, FILL_STRING)) {
|
|
efree(id);
|
|
return lexdebug(FILLMARKER);
|
|
}
|
|
yylval.sym = install(id);
|
|
efree(id);
|
|
return lexdebug(IDENT);
|
|
}
|
|
YY_BREAK
|
|
case 41:
|
|
YY_RULE_SETUP
|
|
#line 391 "ncgen.l"
|
|
{
|
|
/*
|
|
We need to try to see what size of integer ((u)int).
|
|
Technically, the user should specify, but...
|
|
If out of any integer range, then complain
|
|
Also, if the digits begin with 0, then assume octal.
|
|
*/
|
|
int slen = strlen(ncgtext);
|
|
char* stag = NULL;
|
|
int tag = NC_NAT;
|
|
int isneg = 0;
|
|
int c = ncgtext[0];
|
|
int fail = 0;
|
|
nc_type nct = 0;
|
|
char* pos = NULL;
|
|
int hasU = 0;
|
|
int radix = 10;
|
|
|
|
pos = ncgtext;
|
|
|
|
/* capture the tag string */
|
|
tag = collecttag(pos,&stag);
|
|
if(tag == NC_NAT) {
|
|
snprintf(errstr,sizeof(errstr),"Illegal integer suffix: %s",stag);
|
|
yyerror(errstr);
|
|
goto done;
|
|
}
|
|
|
|
/* drop the tag from the input text */
|
|
ncgtext[slen - strlen(stag)] = '\0';
|
|
hasU = isuinttype(tag);
|
|
|
|
/* Capture the sign, if any */
|
|
isneg = (c == '-');
|
|
/* skip leading sign */
|
|
if(c == '-' || c == '+')
|
|
pos++;
|
|
|
|
c = pos[0];
|
|
if(tstoctal(c))
|
|
radix = 8;
|
|
else
|
|
radix = 10;
|
|
|
|
if(isneg && hasU) {
|
|
snprintf(errstr,sizeof(errstr),"Unsigned integer cannot be signed: %s",ncgtext);
|
|
yyerror(errstr);
|
|
goto done;
|
|
}
|
|
uint64_val = parseULL(radix, pos,&fail);
|
|
if(fail) {
|
|
snprintf(errstr,sizeof(errstr),"integer constant out of range: %s",ncgtext);
|
|
yyerror(errstr);
|
|
goto done;
|
|
}
|
|
/* Down convert to smallest possible range */
|
|
nct = downconvert(uint64_val,&tag,isneg,hasU);
|
|
switch (k_flag) {
|
|
case NC_FORMAT_64BIT_DATA:
|
|
case NC_FORMAT_NETCDF4:
|
|
return lexdebug(nct2lexeme(nct));
|
|
case NC_FORMAT_CLASSIC:
|
|
case NC_FORMAT_64BIT_OFFSET:
|
|
case NC_FORMAT_NETCDF4_CLASSIC:
|
|
if(nct > NC_INT) {
|
|
snprintf(errstr,sizeof(errstr),"Illegal integer constant for classic format: %s",ncgtext);
|
|
yyerror(errstr);
|
|
goto done;
|
|
}
|
|
}
|
|
|
|
if(!tagmatch(nct,tag)) {
|
|
semwarn(lineno,"Warning: Integer out of range for tag: %s; tag treated as changed.",ncgtext);
|
|
}
|
|
return lexdebug(nct2lexeme(nct));
|
|
done: return 0;
|
|
}
|
|
YY_BREAK
|
|
case 42:
|
|
YY_RULE_SETUP
|
|
#line 469 "ncgen.l"
|
|
{
|
|
int c;
|
|
int token = 0;
|
|
int slen = strlen(yytext);
|
|
char* stag = NULL;
|
|
int tag = NC_NAT;
|
|
char* hex = yytext+2; /* point to first true hex digit */
|
|
int xlen = (slen - 3); /* true hex length */
|
|
|
|
yytext[slen-1] = '\0';
|
|
/* capture the tag string */
|
|
tag = collecttag(yytext,&stag);
|
|
if(tag == NC_NAT) {
|
|
snprintf(errstr,sizeof(errstr),"Illegal integer suffix: %s",stag);
|
|
yyerror(errstr);
|
|
//goto done;
|
|
return 0;
|
|
}
|
|
yytext[slen - strlen(stag)] = '\0';
|
|
if(xlen > 16) { /* truncate hi order digits */
|
|
hex += (xlen - 16);
|
|
}
|
|
/* convert to an unsigned long long */
|
|
uint64_val = 0;
|
|
while((c=*hex++)) {
|
|
unsigned int hexdigit = (c <= '9'?(c-'0'):(c-'a')+0xa);
|
|
uint64_val = ((uint64_val << 4) | hexdigit);
|
|
}
|
|
switch (tag) {
|
|
case NC_USHORT:
|
|
uint16_val = (unsigned short)uint64_val;
|
|
token = USHORT_CONST;
|
|
break;
|
|
case NC_UINT:
|
|
token = UINT_CONST;
|
|
break;
|
|
case NC_UINT64:
|
|
token = UINT64_CONST;
|
|
break;
|
|
default: /* should never happen */
|
|
if (sscanf((char*)yytext, "%i", &uint32_val) != 1) {
|
|
snprintf(errstr,sizeof(errstr),"bad unsigned int constant: %s",(char*)yytext);
|
|
yyerror(errstr);
|
|
}
|
|
token = UINT_CONST;
|
|
}
|
|
return lexdebug(token);
|
|
}
|
|
YY_BREAK
|
|
case 43:
|
|
YY_RULE_SETUP
|
|
#line 517 "ncgen.l"
|
|
{
|
|
if (sscanf((char*)yytext, "%le", &double_val) != 1) {
|
|
snprintf(errstr,sizeof(errstr),"bad long or double constant: %s",(char*)yytext);
|
|
yyerror(errstr);
|
|
}
|
|
return lexdebug(DOUBLE_CONST);
|
|
}
|
|
YY_BREAK
|
|
case 44:
|
|
YY_RULE_SETUP
|
|
#line 524 "ncgen.l"
|
|
{
|
|
if (sscanf((char*)yytext, "%e", &float_val) != 1) {
|
|
snprintf(errstr,sizeof(errstr),"bad float constant: %s",(char*)yytext);
|
|
yyerror(errstr);
|
|
}
|
|
return lexdebug(FLOAT_CONST);
|
|
}
|
|
YY_BREAK
|
|
case 45:
|
|
/* rule 45 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 531 "ncgen.l"
|
|
{
|
|
(void) sscanf((char*)&yytext[1],"%c",&byte_val);
|
|
return lexdebug(BYTE_CONST);
|
|
}
|
|
YY_BREAK
|
|
case 46:
|
|
YY_RULE_SETUP
|
|
#line 535 "ncgen.l"
|
|
{
|
|
int oct = unescapeoct(&yytext[2]);
|
|
if(oct < 0) {
|
|
snprintf(errstr,sizeof(errstr),"bad octal character constant: %s",(char*)yytext);
|
|
yyerror(errstr);
|
|
}
|
|
byte_val = (unsigned int)oct;
|
|
return lexdebug(BYTE_CONST);
|
|
}
|
|
YY_BREAK
|
|
case 47:
|
|
YY_RULE_SETUP
|
|
#line 544 "ncgen.l"
|
|
{
|
|
int hex = unescapehex(&yytext[3]);
|
|
if(byte_val < 0) {
|
|
snprintf(errstr,sizeof(errstr),"bad hex character constant: %s",(char*)yytext);
|
|
yyerror(errstr);
|
|
}
|
|
byte_val = (unsigned int)hex;
|
|
return lexdebug(BYTE_CONST);
|
|
}
|
|
YY_BREAK
|
|
case 48:
|
|
YY_RULE_SETUP
|
|
#line 553 "ncgen.l"
|
|
{
|
|
switch ((char)yytext[2]) {
|
|
case 'a': byte_val = '\007'; break; /* not everyone under-
|
|
* stands '\a' yet */
|
|
case 'b': byte_val = '\b'; break;
|
|
case 'f': byte_val = '\f'; break;
|
|
case 'n': byte_val = '\n'; break;
|
|
case 'r': byte_val = '\r'; break;
|
|
case 't': byte_val = '\t'; break;
|
|
case 'v': byte_val = '\v'; break;
|
|
case '0' : byte_val = '\0'; break;
|
|
case '\\': byte_val = '\\'; break;
|
|
case '?': byte_val = '\177'; break;
|
|
case '\'': byte_val = '\''; break;
|
|
default: byte_val = (char)yytext[2];
|
|
}
|
|
return lexdebug(BYTE_CONST);
|
|
}
|
|
YY_BREAK
|
|
case 49:
|
|
/* rule 49 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 572 "ncgen.l"
|
|
{
|
|
lineno++ ;
|
|
break;
|
|
}
|
|
YY_BREAK
|
|
case 50:
|
|
YY_RULE_SETUP
|
|
#line 577 "ncgen.l"
|
|
{/*initial*/
|
|
BEGIN(ST_C_COMMENT);
|
|
break;
|
|
}
|
|
YY_BREAK
|
|
case 51:
|
|
/* rule 51 can match eol */
|
|
YY_RULE_SETUP
|
|
#line 582 "ncgen.l"
|
|
{/* continuation */
|
|
break;
|
|
}
|
|
YY_BREAK
|
|
case 52:
|
|
YY_RULE_SETUP
|
|
#line 586 "ncgen.l"
|
|
{/* final */
|
|
BEGIN(INITIAL);
|
|
break;
|
|
}
|
|
YY_BREAK
|
|
case YY_STATE_EOF(ST_C_COMMENT):
|
|
#line 591 "ncgen.l"
|
|
{/* final, error */
|
|
fprintf(stderr,"unterminated /**/ comment");
|
|
BEGIN(INITIAL);
|
|
break;
|
|
}
|
|
YY_BREAK
|
|
case 53:
|
|
YY_RULE_SETUP
|
|
#line 597 "ncgen.l"
|
|
{/* Note: this next rule will not work for UTF8 characters */
|
|
return lexdebug(yytext[0]) ;
|
|
}
|
|
YY_BREAK
|
|
case 54:
|
|
YY_RULE_SETUP
|
|
#line 600 "ncgen.l"
|
|
ECHO;
|
|
YY_BREAK
|
|
#line 2628 "ncgenl.c"
|
|
case YY_STATE_EOF(INITIAL):
|
|
case YY_STATE_EOF(TEXT):
|
|
yyterminate();
|
|
|
|
case YY_END_OF_BUFFER:
|
|
{
|
|
/* Amount of text matched not including the EOB char. */
|
|
int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
|
|
|
|
/* Undo the effects of YY_DO_BEFORE_ACTION. */
|
|
*yy_cp = (yy_hold_char);
|
|
YY_RESTORE_YY_MORE_OFFSET
|
|
|
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
|
|
{
|
|
/* We're scanning a new file or input source. It's
|
|
* possible that this happened because the user
|
|
* just pointed yyin at a new source and called
|
|
* yylex(). If so, then we have to assure
|
|
* consistency between YY_CURRENT_BUFFER and our
|
|
* globals. Here is the right place to do so, because
|
|
* this is the first action (other than possibly a
|
|
* back-up) that will match for the new input source.
|
|
*/
|
|
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
|
|
YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
|
|
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
|
|
}
|
|
|
|
/* Note that here we test for yy_c_buf_p "<=" to the position
|
|
* of the first EOB in the buffer, since yy_c_buf_p will
|
|
* already have been incremented past the NUL character
|
|
* (since all states make transitions on EOB to the
|
|
* end-of-buffer state). Contrast this with the test
|
|
* in input().
|
|
*/
|
|
if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
|
|
{ /* This was really a NUL. */
|
|
yy_state_type yy_next_state;
|
|
|
|
(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
|
|
|
|
yy_current_state = yy_get_previous_state( );
|
|
|
|
/* Okay, we're now positioned to make the NUL
|
|
* transition. We couldn't have
|
|
* yy_get_previous_state() go ahead and do it
|
|
* for us because it doesn't know how to deal
|
|
* with the possibility of jamming (and we don't
|
|
* want to build jamming into it because then it
|
|
* will run more slowly).
|
|
*/
|
|
|
|
yy_next_state = yy_try_NUL_trans( yy_current_state );
|
|
|
|
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
|
|
|
if ( yy_next_state )
|
|
{
|
|
/* Consume the NUL. */
|
|
yy_cp = ++(yy_c_buf_p);
|
|
yy_current_state = yy_next_state;
|
|
goto yy_match;
|
|
}
|
|
|
|
else
|
|
{
|
|
yy_cp = (yy_c_buf_p);
|
|
goto yy_find_action;
|
|
}
|
|
}
|
|
|
|
else switch ( yy_get_next_buffer( ) )
|
|
{
|
|
case EOB_ACT_END_OF_FILE:
|
|
{
|
|
(yy_did_buffer_switch_on_eof) = 0;
|
|
|
|
if ( yywrap( ) )
|
|
{
|
|
/* Note: because we've taken care in
|
|
* yy_get_next_buffer() to have set up
|
|
* yytext, we can now set up
|
|
* yy_c_buf_p so that if some total
|
|
* hoser (like flex itself) wants to
|
|
* call the scanner after we return the
|
|
* YY_NULL, it'll still work - another
|
|
* YY_NULL will get returned.
|
|
*/
|
|
(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
|
|
|
|
yy_act = YY_STATE_EOF(YY_START);
|
|
goto do_action;
|
|
}
|
|
|
|
else
|
|
{
|
|
if ( ! (yy_did_buffer_switch_on_eof) )
|
|
YY_NEW_FILE;
|
|
}
|
|
break;
|
|
}
|
|
|
|
case EOB_ACT_CONTINUE_SCAN:
|
|
(yy_c_buf_p) =
|
|
(yytext_ptr) + yy_amount_of_matched_text;
|
|
|
|
yy_current_state = yy_get_previous_state( );
|
|
|
|
yy_cp = (yy_c_buf_p);
|
|
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
|
goto yy_match;
|
|
|
|
case EOB_ACT_LAST_MATCH:
|
|
(yy_c_buf_p) =
|
|
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
|
|
|
|
yy_current_state = yy_get_previous_state( );
|
|
|
|
yy_cp = (yy_c_buf_p);
|
|
yy_bp = (yytext_ptr) + YY_MORE_ADJ;
|
|
goto yy_find_action;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default:
|
|
YY_FATAL_ERROR(
|
|
"fatal flex scanner internal error--no action found" );
|
|
} /* end of action switch */
|
|
} /* end of scanning one token */
|
|
} /* end of user's declarations */
|
|
} /* end of yylex */
|
|
|
|
/* yy_get_next_buffer - try to read in a new buffer
|
|
*
|
|
* Returns a code representing an action:
|
|
* EOB_ACT_LAST_MATCH -
|
|
* EOB_ACT_CONTINUE_SCAN - continue scanning from current position
|
|
* EOB_ACT_END_OF_FILE - end of file
|
|
*/
|
|
static int yy_get_next_buffer (void)
|
|
{
|
|
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
|
|
char *source = (yytext_ptr);
|
|
int number_to_move, i;
|
|
int ret_val;
|
|
|
|
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
|
|
YY_FATAL_ERROR(
|
|
"fatal flex scanner internal error--end of buffer missed" );
|
|
|
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
|
|
{ /* Don't try to fill the buffer, so this is an EOF. */
|
|
if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
|
|
{
|
|
/* We matched a single character, the EOB, so
|
|
* treat this as a final EOF.
|
|
*/
|
|
return EOB_ACT_END_OF_FILE;
|
|
}
|
|
|
|
else
|
|
{
|
|
/* We matched some text prior to the EOB, first
|
|
* process it.
|
|
*/
|
|
return EOB_ACT_LAST_MATCH;
|
|
}
|
|
}
|
|
|
|
/* Try to read more data. */
|
|
|
|
/* First move last chars to start of buffer. */
|
|
number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);
|
|
|
|
for ( i = 0; i < number_to_move; ++i )
|
|
*(dest++) = *(source++);
|
|
|
|
if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
|
|
/* don't do the read, it's not guaranteed to return an EOF,
|
|
* just force an EOF
|
|
*/
|
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
|
|
|
|
else
|
|
{
|
|
int num_to_read =
|
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
|
|
|
|
while ( num_to_read <= 0 )
|
|
{ /* Not enough room in the buffer - grow it. */
|
|
|
|
/* just a shorter name for the current buffer */
|
|
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
|
|
|
|
int yy_c_buf_p_offset =
|
|
(int) ((yy_c_buf_p) - b->yy_ch_buf);
|
|
|
|
if ( b->yy_is_our_buffer )
|
|
{
|
|
int new_size = b->yy_buf_size * 2;
|
|
|
|
if ( new_size <= 0 )
|
|
b->yy_buf_size += b->yy_buf_size / 8;
|
|
else
|
|
b->yy_buf_size *= 2;
|
|
|
|
b->yy_ch_buf = (char *)
|
|
/* Include room in for 2 EOB chars. */
|
|
yyrealloc( (void *) b->yy_ch_buf,
|
|
(yy_size_t) (b->yy_buf_size + 2) );
|
|
}
|
|
else
|
|
/* Can't grow it, we don't own it. */
|
|
b->yy_ch_buf = NULL;
|
|
|
|
if ( ! b->yy_ch_buf )
|
|
YY_FATAL_ERROR(
|
|
"fatal error - scanner input buffer overflow" );
|
|
|
|
(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
|
|
|
|
num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
|
|
number_to_move - 1;
|
|
|
|
}
|
|
|
|
if ( num_to_read > YY_READ_BUF_SIZE )
|
|
num_to_read = YY_READ_BUF_SIZE;
|
|
|
|
/* Read in more data. */
|
|
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
|
|
(yy_n_chars), num_to_read );
|
|
|
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
|
}
|
|
|
|
if ( (yy_n_chars) == 0 )
|
|
{
|
|
if ( number_to_move == YY_MORE_ADJ )
|
|
{
|
|
ret_val = EOB_ACT_END_OF_FILE;
|
|
yyrestart( yyin );
|
|
}
|
|
|
|
else
|
|
{
|
|
ret_val = EOB_ACT_LAST_MATCH;
|
|
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
|
|
YY_BUFFER_EOF_PENDING;
|
|
}
|
|
}
|
|
|
|
else
|
|
ret_val = EOB_ACT_CONTINUE_SCAN;
|
|
|
|
if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
|
/* Extend the array by 50%, plus the number we really need. */
|
|
int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
|
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
|
|
(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
|
|
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
|
|
/* "- 2" to take care of EOB's */
|
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
|
|
}
|
|
|
|
(yy_n_chars) += number_to_move;
|
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
|
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
|
|
|
|
(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
|
|
|
|
return ret_val;
|
|
}
|
|
|
|
/* yy_get_previous_state - get the state just before the EOB char was reached */
|
|
|
|
static yy_state_type yy_get_previous_state (void)
|
|
{
|
|
yy_state_type yy_current_state;
|
|
char *yy_cp;
|
|
|
|
yy_current_state = (yy_start);
|
|
|
|
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
|
|
{
|
|
YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
|
|
if ( yy_accept[yy_current_state] )
|
|
{
|
|
(yy_last_accepting_state) = yy_current_state;
|
|
(yy_last_accepting_cpos) = yy_cp;
|
|
}
|
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
{
|
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
if ( yy_current_state >= 538 )
|
|
yy_c = yy_meta[yy_c];
|
|
}
|
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
|
}
|
|
|
|
return yy_current_state;
|
|
}
|
|
|
|
/* yy_try_NUL_trans - try to make a transition on the NUL character
|
|
*
|
|
* synopsis
|
|
* next_state = yy_try_NUL_trans( current_state );
|
|
*/
|
|
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
|
|
{
|
|
int yy_is_jam;
|
|
char *yy_cp = (yy_c_buf_p);
|
|
|
|
YY_CHAR yy_c = 1;
|
|
if ( yy_accept[yy_current_state] )
|
|
{
|
|
(yy_last_accepting_state) = yy_current_state;
|
|
(yy_last_accepting_cpos) = yy_cp;
|
|
}
|
|
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
|
|
{
|
|
yy_current_state = (int) yy_def[yy_current_state];
|
|
if ( yy_current_state >= 538 )
|
|
yy_c = yy_meta[yy_c];
|
|
}
|
|
yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
|
|
yy_is_jam = (yy_current_state == 537);
|
|
|
|
return yy_is_jam ? 0 : yy_current_state;
|
|
}
|
|
|
|
#ifndef YY_NO_UNPUT
|
|
|
|
static void yyunput (int c, char * yy_bp )
|
|
{
|
|
char *yy_cp;
|
|
|
|
yy_cp = (yy_c_buf_p);
|
|
|
|
/* undo effects of setting up yytext */
|
|
*yy_cp = (yy_hold_char);
|
|
|
|
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
|
|
{ /* need to shift things up to make room */
|
|
/* +2 for EOB chars. */
|
|
int number_to_move = (yy_n_chars) + 2;
|
|
char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
|
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
|
|
char *source =
|
|
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
|
|
|
|
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
|
*--dest = *--source;
|
|
|
|
yy_cp += (int) (dest - source);
|
|
yy_bp += (int) (dest - source);
|
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars =
|
|
(yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size;
|
|
|
|
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
|
|
YY_FATAL_ERROR( "flex scanner push-back overflow" );
|
|
}
|
|
|
|
*--yy_cp = (char) c;
|
|
|
|
(yytext_ptr) = yy_bp;
|
|
(yy_hold_char) = *yy_cp;
|
|
(yy_c_buf_p) = yy_cp;
|
|
}
|
|
|
|
#endif
|
|
|
|
#ifndef YY_NO_INPUT
|
|
#ifdef __cplusplus
|
|
static int yyinput (void)
|
|
#else
|
|
static int input (void)
|
|
#endif
|
|
|
|
{
|
|
int c;
|
|
|
|
*(yy_c_buf_p) = (yy_hold_char);
|
|
|
|
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
|
|
{
|
|
/* yy_c_buf_p now points to the character we want to return.
|
|
* If this occurs *before* the EOB characters, then it's a
|
|
* valid NUL; if not, then we've hit the end of the buffer.
|
|
*/
|
|
if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
|
|
/* This was really a NUL. */
|
|
*(yy_c_buf_p) = '\0';
|
|
|
|
else
|
|
{ /* need more input */
|
|
int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
|
|
++(yy_c_buf_p);
|
|
|
|
switch ( yy_get_next_buffer( ) )
|
|
{
|
|
case EOB_ACT_LAST_MATCH:
|
|
/* This happens because yy_g_n_b()
|
|
* sees that we've accumulated a
|
|
* token and flags that we need to
|
|
* try matching the token before
|
|
* proceeding. But for input(),
|
|
* there's no matching to consider.
|
|
* So convert the EOB_ACT_LAST_MATCH
|
|
* to EOB_ACT_END_OF_FILE.
|
|
*/
|
|
|
|
/* Reset buffer status. */
|
|
yyrestart( yyin );
|
|
|
|
/*FALLTHROUGH*/
|
|
|
|
case EOB_ACT_END_OF_FILE:
|
|
{
|
|
if ( yywrap( ) )
|
|
return 0;
|
|
|
|
if ( ! (yy_did_buffer_switch_on_eof) )
|
|
YY_NEW_FILE;
|
|
#ifdef __cplusplus
|
|
return yyinput();
|
|
#else
|
|
return input();
|
|
#endif
|
|
}
|
|
|
|
case EOB_ACT_CONTINUE_SCAN:
|
|
(yy_c_buf_p) = (yytext_ptr) + offset;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
|
|
*(yy_c_buf_p) = '\0'; /* preserve yytext */
|
|
(yy_hold_char) = *++(yy_c_buf_p);
|
|
|
|
return c;
|
|
}
|
|
#endif /* ifndef YY_NO_INPUT */
|
|
|
|
/** Immediately switch to a different input stream.
|
|
* @param input_file A readable stream.
|
|
*
|
|
* @note This function does not reset the start condition to @c INITIAL .
|
|
*/
|
|
void yyrestart (FILE * input_file )
|
|
{
|
|
|
|
if ( ! YY_CURRENT_BUFFER ){
|
|
yyensure_buffer_stack ();
|
|
YY_CURRENT_BUFFER_LVALUE =
|
|
yy_create_buffer( yyin, YY_BUF_SIZE );
|
|
}
|
|
|
|
yy_init_buffer( YY_CURRENT_BUFFER, input_file );
|
|
yy_load_buffer_state( );
|
|
}
|
|
|
|
/** Switch to a different input buffer.
|
|
* @param new_buffer The new input buffer.
|
|
*
|
|
*/
|
|
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
|
|
{
|
|
|
|
/* TODO. We should be able to replace this entire function body
|
|
* with
|
|
* yypop_buffer_state();
|
|
* yypush_buffer_state(new_buffer);
|
|
*/
|
|
yyensure_buffer_stack ();
|
|
if ( YY_CURRENT_BUFFER == new_buffer )
|
|
return;
|
|
|
|
if ( YY_CURRENT_BUFFER )
|
|
{
|
|
/* Flush out information for old buffer. */
|
|
*(yy_c_buf_p) = (yy_hold_char);
|
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
|
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
|
}
|
|
|
|
YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
|
yy_load_buffer_state( );
|
|
|
|
/* We don't actually know whether we did this switch during
|
|
* EOF (yywrap()) processing, but the only time this flag
|
|
* is looked at is after yywrap() is called, so it's safe
|
|
* to go ahead and always set it.
|
|
*/
|
|
(yy_did_buffer_switch_on_eof) = 1;
|
|
}
|
|
|
|
static void yy_load_buffer_state (void)
|
|
{
|
|
(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
|
|
(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
|
|
yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
|
|
(yy_hold_char) = *(yy_c_buf_p);
|
|
}
|
|
|
|
/** Allocate and initialize an input buffer state.
|
|
* @param file A readable stream.
|
|
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
|
|
*
|
|
* @return the allocated buffer state.
|
|
*/
|
|
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
|
|
{
|
|
YY_BUFFER_STATE b;
|
|
|
|
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
|
|
if ( ! b )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
|
|
|
b->yy_buf_size = size;
|
|
|
|
/* 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->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
|
|
if ( ! b->yy_ch_buf )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
|
|
|
b->yy_is_our_buffer = 1;
|
|
|
|
yy_init_buffer( b, file );
|
|
|
|
return b;
|
|
}
|
|
|
|
/** Destroy the buffer.
|
|
* @param b a buffer created with yy_create_buffer()
|
|
*
|
|
*/
|
|
void yy_delete_buffer (YY_BUFFER_STATE b )
|
|
{
|
|
|
|
if ( ! b )
|
|
return;
|
|
|
|
if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
|
|
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
|
|
|
if ( b->yy_is_our_buffer )
|
|
yyfree( (void *) b->yy_ch_buf );
|
|
|
|
yyfree( (void *) b );
|
|
}
|
|
|
|
/* Initializes or reinitializes a buffer.
|
|
* This function is sometimes called more than once on the same buffer,
|
|
* such as during a yyrestart() or at EOF.
|
|
*/
|
|
static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file )
|
|
|
|
{
|
|
int oerrno = errno;
|
|
|
|
yy_flush_buffer( b );
|
|
|
|
b->yy_input_file = file;
|
|
b->yy_fill_buffer = 1;
|
|
|
|
/* If b is the current buffer, then yy_init_buffer was _probably_
|
|
* called from yyrestart() or through yy_get_next_buffer.
|
|
* In that case, we don't want to reset the lineno or column.
|
|
*/
|
|
if (b != YY_CURRENT_BUFFER){
|
|
b->yy_bs_lineno = 1;
|
|
b->yy_bs_column = 0;
|
|
}
|
|
|
|
b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
|
|
|
|
errno = oerrno;
|
|
}
|
|
|
|
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
|
|
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
|
|
*
|
|
*/
|
|
void yy_flush_buffer (YY_BUFFER_STATE b )
|
|
{
|
|
if ( ! b )
|
|
return;
|
|
|
|
b->yy_n_chars = 0;
|
|
|
|
/* We always need two end-of-buffer characters. The first causes
|
|
* a transition to the end-of-buffer state. The second causes
|
|
* a jam in that state.
|
|
*/
|
|
b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
|
|
b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
|
|
|
|
b->yy_buf_pos = &b->yy_ch_buf[0];
|
|
|
|
b->yy_at_bol = 1;
|
|
b->yy_buffer_status = YY_BUFFER_NEW;
|
|
|
|
if ( b == YY_CURRENT_BUFFER )
|
|
yy_load_buffer_state( );
|
|
}
|
|
|
|
/** Pushes the new state onto the stack. The new state becomes
|
|
* the current state. This function will allocate the stack
|
|
* if necessary.
|
|
* @param new_buffer The new state.
|
|
*
|
|
*/
|
|
void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
|
|
{
|
|
if (new_buffer == NULL)
|
|
return;
|
|
|
|
yyensure_buffer_stack();
|
|
|
|
/* This block is copied from yy_switch_to_buffer. */
|
|
if ( YY_CURRENT_BUFFER )
|
|
{
|
|
/* Flush out information for old buffer. */
|
|
*(yy_c_buf_p) = (yy_hold_char);
|
|
YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
|
|
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
|
|
}
|
|
|
|
/* Only push if top exists. Otherwise, replace top. */
|
|
if (YY_CURRENT_BUFFER)
|
|
(yy_buffer_stack_top)++;
|
|
YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
|
|
|
/* copied from yy_switch_to_buffer. */
|
|
yy_load_buffer_state( );
|
|
(yy_did_buffer_switch_on_eof) = 1;
|
|
}
|
|
|
|
/** Removes and deletes the top of the stack, if present.
|
|
* The next element becomes the new top.
|
|
*
|
|
*/
|
|
void yypop_buffer_state (void)
|
|
{
|
|
if (!YY_CURRENT_BUFFER)
|
|
return;
|
|
|
|
yy_delete_buffer(YY_CURRENT_BUFFER );
|
|
YY_CURRENT_BUFFER_LVALUE = NULL;
|
|
if ((yy_buffer_stack_top) > 0)
|
|
--(yy_buffer_stack_top);
|
|
|
|
if (YY_CURRENT_BUFFER) {
|
|
yy_load_buffer_state( );
|
|
(yy_did_buffer_switch_on_eof) = 1;
|
|
}
|
|
}
|
|
|
|
/* Allocates the stack if it does not exist.
|
|
* Guarantees space for at least one push.
|
|
*/
|
|
static void yyensure_buffer_stack (void)
|
|
{
|
|
yy_size_t num_to_alloc;
|
|
|
|
if (!(yy_buffer_stack)) {
|
|
|
|
/* First allocation is just for 2 elements, since we don't know if this
|
|
* 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; /* After all that talk, this was set to 1 anyways... */
|
|
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
|
|
(num_to_alloc * sizeof(struct yy_buffer_state*)
|
|
);
|
|
if ( ! (yy_buffer_stack) )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
|
|
|
|
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
|
|
|
|
(yy_buffer_stack_max) = num_to_alloc;
|
|
(yy_buffer_stack_top) = 0;
|
|
return;
|
|
}
|
|
|
|
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
|
|
|
|
/* Increase the buffer to prepare for a possible push. */
|
|
yy_size_t grow_size = 8 /* arbitrary grow size */;
|
|
|
|
num_to_alloc = (yy_buffer_stack_max) + grow_size;
|
|
(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
|
|
((yy_buffer_stack),
|
|
num_to_alloc * sizeof(struct yy_buffer_state*)
|
|
);
|
|
if ( ! (yy_buffer_stack) )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
|
|
|
|
/* zero only the new slots.*/
|
|
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
|
|
(yy_buffer_stack_max) = num_to_alloc;
|
|
}
|
|
}
|
|
|
|
/** Setup the input buffer state to scan directly from a user-specified character buffer.
|
|
* @param base the character buffer
|
|
* @param size the size in bytes of the character buffer
|
|
*
|
|
* @return the newly allocated buffer state object.
|
|
*/
|
|
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
|
|
{
|
|
YY_BUFFER_STATE b;
|
|
|
|
if ( size < 2 ||
|
|
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 NULL;
|
|
|
|
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
|
|
if ( ! b )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
|
|
|
|
b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */
|
|
b->yy_buf_pos = b->yy_ch_buf = base;
|
|
b->yy_is_our_buffer = 0;
|
|
b->yy_input_file = NULL;
|
|
b->yy_n_chars = b->yy_buf_size;
|
|
b->yy_is_interactive = 0;
|
|
b->yy_at_bol = 1;
|
|
b->yy_fill_buffer = 0;
|
|
b->yy_buffer_status = YY_BUFFER_NEW;
|
|
|
|
yy_switch_to_buffer( b );
|
|
|
|
return b;
|
|
}
|
|
|
|
/** Setup the input buffer state to scan a string. The next call to yylex() will
|
|
* scan from a @e copy of @a str.
|
|
* @param yystr a NUL-terminated string to scan
|
|
*
|
|
* @return the newly allocated buffer state object.
|
|
* @note If you want to scan bytes that may contain NUL values, then use
|
|
* yy_scan_bytes() instead.
|
|
*/
|
|
YY_BUFFER_STATE yy_scan_string (const char * yystr )
|
|
{
|
|
|
|
return yy_scan_bytes( yystr, (int) strlen(yystr) );
|
|
}
|
|
|
|
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
|
|
* scan from a @e copy of @a bytes.
|
|
* @param yybytes the byte buffer to scan
|
|
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
|
*
|
|
* @return the newly allocated buffer state object.
|
|
*/
|
|
YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
|
|
{
|
|
YY_BUFFER_STATE b;
|
|
char *buf;
|
|
yy_size_t n;
|
|
int i;
|
|
|
|
/* Get memory for full buffer, including space for trailing EOB's. */
|
|
n = (yy_size_t) (_yybytes_len + 2);
|
|
buf = (char *) yyalloc( n );
|
|
if ( ! buf )
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
|
|
|
|
for ( i = 0; i < _yybytes_len; ++i )
|
|
buf[i] = yybytes[i];
|
|
|
|
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
|
|
|
|
b = yy_scan_buffer( buf, n );
|
|
if ( ! b )
|
|
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
|
|
|
|
/* It's okay to grow etc. this buffer, and we should throw it
|
|
* away when we're done.
|
|
*/
|
|
b->yy_is_our_buffer = 1;
|
|
|
|
return b;
|
|
}
|
|
|
|
#ifndef YY_EXIT_FAILURE
|
|
#define YY_EXIT_FAILURE 2
|
|
#endif
|
|
|
|
static void yynoreturn yy_fatal_error (const char* msg )
|
|
{
|
|
fprintf( stderr, "%s\n", msg );
|
|
exit( YY_EXIT_FAILURE );
|
|
}
|
|
|
|
/* Redefine yyless() so it works in section 3 code. */
|
|
|
|
#undef yyless
|
|
#define yyless(n) \
|
|
do \
|
|
{ \
|
|
/* Undo effects of setting up yytext. */ \
|
|
int yyless_macro_arg = (n); \
|
|
YY_LESS_LINENO(yyless_macro_arg);\
|
|
yytext[yyleng] = (yy_hold_char); \
|
|
(yy_c_buf_p) = yytext + yyless_macro_arg; \
|
|
(yy_hold_char) = *(yy_c_buf_p); \
|
|
*(yy_c_buf_p) = '\0'; \
|
|
yyleng = yyless_macro_arg; \
|
|
} \
|
|
while ( 0 )
|
|
|
|
/* Accessor methods (get/set functions) to struct members. */
|
|
|
|
/** Get the current line number.
|
|
*
|
|
*/
|
|
int yyget_lineno (void)
|
|
{
|
|
|
|
return yylineno;
|
|
}
|
|
|
|
/** Get the input stream.
|
|
*
|
|
*/
|
|
FILE *yyget_in (void)
|
|
{
|
|
return yyin;
|
|
}
|
|
|
|
/** Get the output stream.
|
|
*
|
|
*/
|
|
FILE *yyget_out (void)
|
|
{
|
|
return yyout;
|
|
}
|
|
|
|
/** Get the length of the current token.
|
|
*
|
|
*/
|
|
int yyget_leng (void)
|
|
{
|
|
return yyleng;
|
|
}
|
|
|
|
/** Get the current token.
|
|
*
|
|
*/
|
|
|
|
char *yyget_text (void)
|
|
{
|
|
return yytext;
|
|
}
|
|
|
|
/** Set the current line number.
|
|
* @param _line_number line number
|
|
*
|
|
*/
|
|
void yyset_lineno (int _line_number )
|
|
{
|
|
|
|
yylineno = _line_number;
|
|
}
|
|
|
|
/** Set the input stream. This does not discard the current
|
|
* input buffer.
|
|
* @param _in_str A readable stream.
|
|
*
|
|
* @see yy_switch_to_buffer
|
|
*/
|
|
void yyset_in (FILE * _in_str )
|
|
{
|
|
yyin = _in_str ;
|
|
}
|
|
|
|
void yyset_out (FILE * _out_str )
|
|
{
|
|
yyout = _out_str ;
|
|
}
|
|
|
|
int yyget_debug (void)
|
|
{
|
|
return yy_flex_debug;
|
|
}
|
|
|
|
void yyset_debug (int _bdebug )
|
|
{
|
|
yy_flex_debug = _bdebug ;
|
|
}
|
|
|
|
static int yy_init_globals (void)
|
|
{
|
|
/* Initialization is the same as for the non-reentrant scanner.
|
|
* This function is called from yylex_destroy(), so don't allocate here.
|
|
*/
|
|
|
|
(yy_buffer_stack) = NULL;
|
|
(yy_buffer_stack_top) = 0;
|
|
(yy_buffer_stack_max) = 0;
|
|
(yy_c_buf_p) = NULL;
|
|
(yy_init) = 0;
|
|
(yy_start) = 0;
|
|
|
|
/* Defined in main.c */
|
|
#ifdef YY_STDINIT
|
|
yyin = stdin;
|
|
yyout = stdout;
|
|
#else
|
|
yyin = NULL;
|
|
yyout = NULL;
|
|
#endif
|
|
|
|
/* For future reference: Set errno on error, since we are called by
|
|
* yylex_init()
|
|
*/
|
|
return 0;
|
|
}
|
|
|
|
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
|
|
int yylex_destroy (void)
|
|
{
|
|
|
|
/* Pop the buffer stack, destroying each element. */
|
|
while(YY_CURRENT_BUFFER){
|
|
yy_delete_buffer( YY_CURRENT_BUFFER );
|
|
YY_CURRENT_BUFFER_LVALUE = NULL;
|
|
yypop_buffer_state();
|
|
}
|
|
|
|
/* Destroy the stack itself. */
|
|
yyfree((yy_buffer_stack) );
|
|
(yy_buffer_stack) = NULL;
|
|
|
|
/* Reset the globals. This is important in a non-reentrant scanner so the next time
|
|
* yylex() is called, initialization will occur. */
|
|
yy_init_globals( );
|
|
|
|
return 0;
|
|
}
|
|
|
|
/*
|
|
* Internal utility routines.
|
|
*/
|
|
|
|
#ifndef yytext_ptr
|
|
static void yy_flex_strncpy (char* s1, const char * s2, int n )
|
|
{
|
|
|
|
int i;
|
|
for ( i = 0; i < n; ++i )
|
|
s1[i] = s2[i];
|
|
}
|
|
#endif
|
|
|
|
#ifdef YY_NEED_STRLEN
|
|
static int yy_flex_strlen (const char * s )
|
|
{
|
|
int n;
|
|
for ( n = 0; s[n]; ++n )
|
|
;
|
|
|
|
return n;
|
|
}
|
|
#endif
|
|
|
|
void *yyalloc (yy_size_t size )
|
|
{
|
|
return malloc(size);
|
|
}
|
|
|
|
void *yyrealloc (void * ptr, 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
|
|
* because both ANSI C and C++ allow castless assignment from
|
|
* any pointer type to void*, and deal with argument conversions
|
|
* as though doing an assignment.
|
|
*/
|
|
return realloc(ptr, size);
|
|
}
|
|
|
|
void yyfree (void * ptr )
|
|
{
|
|
free( (char *) ptr ); /* see yyrealloc() for (char *) cast */
|
|
}
|
|
|
|
#define YYTABLES_NAME "yytables"
|
|
|
|
#line 600 "ncgen.l"
|
|
|
|
static int
|
|
lexdebug(int token)
|
|
{
|
|
if(debug >= 2)
|
|
{
|
|
fprintf(stderr,"Token=%d |%s| line=%d\n",token,yytext,lineno);
|
|
}
|
|
return token;
|
|
}
|
|
|
|
int
|
|
lex_init(void)
|
|
{
|
|
lineno = 1;
|
|
lextext = bbNew();
|
|
if(0) unput(0); /* keep -Wall quiet */
|
|
return 0;
|
|
}
|
|
|
|
static Symbol*
|
|
makepath(char* text0)
|
|
{
|
|
/* Create a reference symbol.
|
|
Convert path to a sequence of symbols.
|
|
Use last name as symbol name (with root group reference ('/') as exception).
|
|
*/
|
|
Symbol* refsym = NULL;
|
|
/* walk the path converting to a sequence of symbols */
|
|
if(strcmp(text0,"/")==0) {
|
|
/* special case of root reference */
|
|
refsym = rootgroup;
|
|
} else {
|
|
List* prefix = listnew();
|
|
/* split the text into IDENT chunks, convert to symbols */
|
|
Symbol* container = rootgroup;
|
|
char *ident, *p, *match;
|
|
char* text = estrdup(text0);
|
|
int lastident;
|
|
|
|
ident=text+1; p=ident; /* skip leading '/' */
|
|
lastident = 0;
|
|
do {
|
|
match = esc_strchr(p,'/',0);
|
|
lastident = (*match == '\0');
|
|
*match='\0';
|
|
(void)unescape(p,strlen(p),ISIDENT,&ident);
|
|
refsym = lookupingroup(NC_GRP,ident,container);
|
|
if(!lastident) {
|
|
if(refsym == NULL) {
|
|
snprintf(errstr,sizeof(errstr),"Undefined or forward referenced group: %s",ident);
|
|
yyerror(errstr);
|
|
refsym = rootgroup;
|
|
} else
|
|
listpush(prefix,(void*)refsym);
|
|
} else {/* lasiident is true */
|
|
refsym = install(ident); /* create as symbol */
|
|
refsym->objectclass = NC_GRP;/* tentative */
|
|
refsym->ref.is_ref = 1;
|
|
refsym->container = container;
|
|
refsym->subnodes = listnew();
|
|
}
|
|
container = refsym;
|
|
p = (lastident?match:match+1);
|
|
if(ident) efree(ident);
|
|
} while(!lastident);
|
|
refsym->prefix = prefix;
|
|
efree(text);
|
|
}
|
|
return refsym;
|
|
}
|
|
|
|
/*
|
|
Parse a simple string of digits into an unsigned long long
|
|
Return the value.
|
|
*/
|
|
static unsigned long long
|
|
parseULL(int radix, char* text, int* failp)
|
|
{
|
|
char* endptr;
|
|
unsigned long long uint64 = 0;
|
|
|
|
errno = 0; endptr = NULL;
|
|
#ifdef HAVE_STRTOULL
|
|
uint64 = strtoull(text,&endptr,radix);
|
|
if(errno == ERANGE) {
|
|
if(failp) *failp = ERANGE;
|
|
return 0;
|
|
}
|
|
#else /*!defined HAVE_STRTOULL*/
|
|
/* Have no useful way to detect out of range */
|
|
if(radix == 8)
|
|
sscanf((char*)text, "%llo", &uint64);
|
|
else
|
|
sscanf((char*)text, "%llu", &uint64);
|
|
#endif /*!defined HAVE_STRTOULL*/
|
|
return uint64;
|
|
}
|
|
|
|
|
|
/**
|
|
Given the raw bits, the sign char, the tag, and hasU
|
|
fill in the appropriate *_val field
|
|
and return the type.
|
|
Note that we cannot return unsigned types if running pure netcdf classic.
|
|
The rule is to pick the smallest enclosing type.
|
|
|
|
The rule used here is that the tag (the suffix, if any)
|
|
always takes precedence and the value is modified to conform
|
|
if possible, otherwise out-of-range is signalled.
|
|
For historical reasons (ncgen3), values that fit as unsigned
|
|
are acceptable for the signed tag and conversion is attempted;
|
|
e.g. 65535s; is legal and is return as a negative short.
|
|
*/
|
|
static nc_type
|
|
downconvert(unsigned long long uint64, int* tagp, int isneg, int hasU)
|
|
{
|
|
nc_type nct = NC_NAT;
|
|
int tag = *tagp;
|
|
int bit63set = (uint64 >> 63);
|
|
long long int64 = *((long long*)&uint64);
|
|
|
|
if(isneg && hasU) {
|
|
return (*tagp = NC_NAT);
|
|
}
|
|
/* To simplify the code, we look for special case of NC_UINT64
|
|
constants that will not fit into an NC_INT64 constant.
|
|
*/
|
|
if(tag == NC_UINT64 && bit63set) {
|
|
uint64_val = uint64;
|
|
return tag;
|
|
}
|
|
/* At this point we need deal only with int64 value */
|
|
/* Apply the isneg */
|
|
if(isneg)
|
|
int64 = - int64;
|
|
|
|
if(tag == NC_NOTAG) {
|
|
/* If we have no other info, then assume NC_(U)INT(64) */
|
|
if(int64 >= NC_MIN_INT && int64 <= NC_MAX_INT) {
|
|
nct = (tag = NC_INT);
|
|
int32_val = (signed int)int64;
|
|
} else if(int64 >= 0 && int64 <= NC_MAX_UINT) {
|
|
nct = (tag = NC_UINT);
|
|
uint32_val = (unsigned int)int64;
|
|
} else if(int64 < 0) {
|
|
nct = (tag = NC_INT64);
|
|
int64_val = (signed long long)int64;
|
|
} else {
|
|
nct = (tag = NC_UINT64);
|
|
uint64_val = (unsigned long long)int64;
|
|
}
|
|
goto done;
|
|
}
|
|
if(isuinttype(tag) && int64 < 0)
|
|
goto outofrange;
|
|
switch (tag) {
|
|
case NC_UBYTE:
|
|
if(int64 <= NC_MAX_UBYTE) {
|
|
nct = NC_UBYTE;
|
|
ubyte_val = (unsigned char)int64;
|
|
} else
|
|
goto outofrange;
|
|
break;
|
|
case NC_USHORT:
|
|
if(int64 <= NC_MAX_USHORT) {
|
|
nct = NC_USHORT;
|
|
uint16_val = (unsigned short)int64;
|
|
} else
|
|
goto outofrange;
|
|
break;
|
|
case NC_UINT:
|
|
if(int64 <= NC_MAX_UINT) {
|
|
nct = NC_UINT;
|
|
uint32_val = (unsigned int)int64;
|
|
} else
|
|
goto outofrange;
|
|
break;
|
|
case NC_UINT64:
|
|
if(int64 <= NC_MAX_UINT64) {
|
|
nct = NC_UINT64;
|
|
uint64_val = uint64;
|
|
} else
|
|
goto outofrange;
|
|
break;
|
|
case NC_INT64:
|
|
nct = NC_INT64;
|
|
int64_val = int64;
|
|
break;
|
|
case NC_BYTE:
|
|
nct = NC_BYTE;
|
|
byte_val = (signed char)int64;
|
|
break;
|
|
case NC_SHORT:
|
|
nct = NC_SHORT;
|
|
int16_val = (signed short)int64;
|
|
break;
|
|
case NC_INT:
|
|
nct = NC_INT;
|
|
int32_val = (signed int)int64;
|
|
break;
|
|
default:
|
|
goto outofrange;
|
|
}
|
|
|
|
done:
|
|
*tagp = tag;
|
|
return nct;
|
|
outofrange:
|
|
yyerror("Value out of range");
|
|
return NC_NAT;
|
|
}
|
|
|
|
static int
|
|
nct2lexeme(nc_type nct)
|
|
{
|
|
switch(nct) {
|
|
case NC_BYTE: return BYTE_CONST;
|
|
case NC_CHAR: return CHAR_CONST;
|
|
case NC_SHORT: return SHORT_CONST;
|
|
case NC_INT: return INT_CONST;
|
|
case NC_UBYTE: return UBYTE_CONST;
|
|
case NC_USHORT: return USHORT_CONST;
|
|
case NC_UINT: return UINT_CONST;
|
|
case NC_INT64: return INT64_CONST;
|
|
case NC_UINT64: return UINT64_CONST;
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
static int
|
|
tagmatch(nc_type nct, int tag)
|
|
{
|
|
if(tag == NC_NAT || tag == NC_NOTAG)
|
|
return 1;
|
|
return nct == tag;
|
|
}
|
|
|
|
/* capture the tag string */
|
|
static int
|
|
collecttag(char* text, char** stagp)
|
|
{
|
|
char* stag0;
|
|
#define MAXTAGLEN 3
|
|
char stag[MAXTAGLEN+1];
|
|
int slen = strlen(text);
|
|
int staglen;
|
|
int tag = NC_NAT;
|
|
int hasU = 0;
|
|
|
|
for(stag0 = text+(slen-1);stag0 > 0;stag0--) {
|
|
if(strchr(TAGCHARS,*stag0) == NULL) {stag0++; break;}
|
|
}
|
|
if(stagp) *stagp = stag0;
|
|
staglen = strlen(stag0);
|
|
if(staglen == 0)
|
|
return NC_NOTAG;
|
|
if(staglen > MAXTAGLEN)
|
|
return tag;
|
|
strncpy(stag,stag0,sizeof(stag));
|
|
stag[MAXTAGLEN] = '\0';
|
|
if(stag[0] == 'U' || stag[0] == 'u') {
|
|
hasU = 1;
|
|
memmove(stag,stag+1,MAXTAGLEN);
|
|
staglen--;
|
|
} else if(stag[staglen-1] == 'U' || stag[staglen-1] == 'u') {
|
|
hasU = 1;
|
|
staglen--;
|
|
stag[staglen] = '\0';
|
|
}
|
|
if(strlen(stag) == 0 && hasU) {
|
|
tag = NC_UINT;
|
|
} else if(strlen(stag) == 1) {
|
|
switch (stag[0]) {
|
|
case 'B': case 'b': tag = (hasU ? NC_UBYTE : NC_BYTE); break;
|
|
case 'S': case 's': tag = (hasU ? NC_USHORT : NC_SHORT); break;
|
|
case 'L': case 'l': tag = (hasU ? NC_UINT : NC_INT); break;
|
|
default: break;
|
|
}
|
|
} else if(strcasecmp(stag,"ll") == 0) {
|
|
tag = (hasU ? NC_UINT64 : NC_INT64);
|
|
}
|
|
if(tag == NC_NAT) {
|
|
if(strlen(stag) > 0)
|
|
return tag;
|
|
tag = NC_NAT;
|
|
}
|
|
return tag;
|
|
}
|
|
|
|
static Symbol*
|
|
identkeyword(const Symbol* kw)
|
|
{
|
|
Symbol* sym = NULL;
|
|
sym = install(kw->name);
|
|
return sym;
|
|
}
|
|
|
|
static int
|
|
identcheck(int token)
|
|
{
|
|
switch (token) {
|
|
case UBYTE_K:
|
|
case USHORT_K:
|
|
case UINT_K:
|
|
case INT64_K:
|
|
case UINT64_K:
|
|
if(k_flag != NC_FORMAT_NETCDF4 && k_flag != NC_FORMAT_64BIT_DATA) {
|
|
yylval.sym = install(yytext);
|
|
token = IDENT;
|
|
}
|
|
break;
|
|
case STRING_K:
|
|
if(k_flag != NC_FORMAT_NETCDF4) {
|
|
yylval.sym = install(yytext);
|
|
token = IDENT;
|
|
}
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
return token;
|
|
}
|
|
|