
#line 2 "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 yyncgenllex
#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 yyncgenllex
#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[540] =
    {   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,   41,   41,
        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[558] =
    {   0,
        0,    0,  443,  440,  378,  375,  428, 3131,   71, 3131,
       68,  381,   65,   66,  103,   89,  151,  372,   55,   65,
      207,   69,  114,  166,  161,  129,  256,  169,  191,  199,
      355,  175,  230,  233,  250,  264,  225,  267,  280,  275,
      287,  184,  341,  340,  311,  361,  356,    0, 3131,   83,
       88, 3131,  353,  348,  347,    0,  312,  357,  296,    0,
     3131,  368, 3131, 3131,    0,  336,  377,  262,  260,  256,
      282,   46,  123,  152,    0,  345,  393,  250,  246,  245,
      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,  243,  242,  298,  286, 3131,    0,
     3131,  281,  672,  280,  694,  701,  235,  720,  744,    0,
      653,  552,  760,  206,  205,  203,  198,  197, 3131,   78,
      118,  196,  195,  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,

      191, 3131,   89,    0, 3131,   40, 1030, 1068,  190,  189,
      184,  182,  179,  159,  979,  124, 3131,  141, 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,  201,  198, 3131,  146, 1339,
     1379,  133,  132,  130,  126,  119,  112, 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,  123,  103,   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[558] =
    {   0,
      539,    1,  540,  540,  541,  541,  539,  539,  539,  539,
      542,  543,  539,  544,  539,  545,  539,   17,  546,  546,
      546,  546,  546,  546,  546,  539,  546,  546,  546,  546,
       21,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  539,  539,  539,  547,  547,  548,  539,  539,
      542,  539,  542,  539,  549,   15,   17,  539,  539,   15,
      539,  539,  539,  539,  550,  551,  539,  539,  539,  539,
       17,  539,  539,  539,  552,  546,  539,  539,  539,  539,
      546,   21,   21,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,

      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  539,  539,  547,  547,  539,  548,
      539,  539,  539,  553,  539,  539,  539,  539,  539,  550,
      551,  554,  539,  539,  539,  539,  539,  539,  539,  539,
      555,  539,  539,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,

      539,  539,  539,  556,  539,  539,  557,  539,  539,  539,
      539,  539,  539,  539,  555,  539,  539,  539,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  539,  539,  539,  539,  557,
      539,  539,  539,  539,  539,  539,  539,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  539,  546,

      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  539,
      539,  539,  539,  539,  539,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  539,  546,
      546,  546,  546,  539,  546,  546,  546,  546,  546,  539,
      539,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  539,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,

      546,  546,  546,  539,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  539,  546,  546,  546,
      546,  546,  539,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,

      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,  546,  546,
      546,  546,  546,  546,  546,  546,  546,  546,    0,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539
    } ;

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,  149,   50,   76,   76,  268,
       58,   58,  269,   52,  268,   59,   64,   77,  404,  270,

       65,  266,  266,  266,  266,  266,  266,   77,  149,  149,
       53,   77,  385,   58,   58,   60,   60,   60,   60,   60,
       60,   60,   81,   84,   78,   79,   80,   61,   62,   63,
       53,   67,  149,   61,   78,   79,   80,  207,   78,   79,
       80,   91,   91,   91,   91,   91,   91,   91,  216,  361,
       61,   62,   63,   72,  217,  217,   77,   61,   68,   69,
       70,   56,  149,   71,   71,   71,   71,   71,   71,   71,
       85,  270,  216,   72,  149,  360,   58,   72,  217,  217,
      141,   73,  150,   78,   79,   80,  149,  325,   72,  149,
       74,   86,   75,   90,  207,   87,   72,  149,  324,   58,

      323,  270,  322,   77,  321,   73,  150,  320,   77,   76,
       88,   77,   72,  149,   74,   82,   82,   77,   89,   83,
       83,   83,   83,   83,   83,   83,   77,   66,  124,  107,
       78,   79,   80,   77,  100,   78,   79,   80,   78,   79,
       80,   77,  101,  103,   78,   79,   80,  277,  102,   77,
      141,  104,  276,   78,   79,   80,  105,  275,  207,   91,
       78,   79,   80,  218,   76,  214,   66,   77,   78,   79,
       80,  213,   77,  212,  141,   77,   78,   79,   80,   92,
       93,   94,   95,  114,  206,   96,  202,  202,   97,  109,
      108,   98,   77,   99,   78,   79,   80,  539,   77,   78,

       79,   80,   78,   79,   80,  128,   77,  110,  111,   77,
      201,   91,  112,  153,  152,  115,  113,   77,   76,   78,
       79,   80,   77,  539,  148,   78,   79,   80,  147,   77,
       66,  116,  119,   78,   79,   80,   78,   79,   80,  120,
      118,  121,  117,  122,   78,   79,   80,  142,  123,   78,
       79,   80,  137,  539,  131,  539,   78,   79,   80,  133,
      133,  133,  133,  133,  133,  135,  135,  129,  128,  136,
      136,  136,  136,  136,  136,  136,  138,  138,  143,  126,
      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,  125,   91,
       77,  106,   76,  539,   78,   79,   80,  158,  155,  157,
      156,  159,  154,   55,  155,   77,  161,  539,   78,   79,
       80,   78,   79,   80,  160,   76,   77,   78,   79,   80,
       77,  155,   49,  156,  162,   49,   77,   47,  155,   77,
       47,  539,   78,   79,   80,  539,   77,  539,  539,  539,
       76,  160,  539,   78,   79,   80,   77,   78,   79,   80,
      539,   77,  165,   78,   79,   80,   78,   79,   80,  539,
      163,  539,   77,   78,   79,   80,  164,  539,   77,  171,
      539,   77,  539,   78,   79,   80,  166,  539,   78,   79,

       80,  167,  539,  168,   77,  539,  169,  170,   77,   78,
       79,   80,  539,  539,  539,   78,   79,   80,   78,   79,
       80,   77,  539,  172,   77,  173,  539,   77,  539,  178,
      174,   78,   79,   80,   77,   78,   79,   80,   77,  539,
      539,  175,  176,   77,  177,  539,   77,  179,   78,   79,
       80,   78,   79,   80,   78,   79,   80,   77,  180,  181,
       77,   78,   79,   80,  182,   78,   79,   80,   77,  539,
       78,   79,   80,   78,   79,   80,   77,  539,  183,   77,
      186,  539,   77,  184,   78,   79,   80,   78,   79,   80,
       77,  185,  190,  187,  208,   78,   79,   80,   77,  539,

      539,   77,  189,   78,   79,   80,   78,   79,   80,   78,
       79,   80,  188,  160,   77,  539,  191,   78,   79,   80,
       77,  209,  210,  211,   77,   78,   79,   80,   78,   79,
       80,  539,   77,  539,  539,  192,  539,  539,  539,   77,
      194,   78,   79,   80,   77,  539,  539,   78,   79,   80,
      193,   78,   79,   80,   77,  539,  539,  539,  196,   78,
       79,   80,  195,   77,  142,  539,   78,   79,   80,  197,
       77,   78,   79,   80,  539,  198,   77,  539,  202,  199,
      539,   78,   79,   80,  203,  203,  203,  203,  203,  203,
       78,   79,   80,  539,  200,  143,  539,   78,   79,   80,

      539,   77,  539,   78,   79,   80,  136,  136,  136,  136,
      136,  136,  136,  136,  136,  136,  136,  136,  136,  136,
      539,  539,  144,  145,  146,  205,  539,   63,   78,   79,
       80,  205,  139,  139,  139,  139,  139,  139,  139,  539,
      539,  539,  539,  539,   77,  539,  539,  219,  205,   77,
       63,  539,  539,  539,  539,  205,  139,  139,  139,  139,
      139,  139,  139,  141,  141,  141,  141,  141,   61,  223,
       63,   78,   79,   80,   61,  539,   78,   79,   80,  141,
       77,  539,  220,  539,  539,   77,  539,  539,   77,  539,
      225,   61,  221,   63,   77,  222,  539,   77,   61,  539,

      539,  539,  141,   77,  224,  539,   77,   78,   79,   80,
      539,  227,   78,   79,   80,   78,   79,   80,   77,  539,
      539,   78,   79,   80,   78,   79,   80,  141,  539,   77,
       78,   79,   80,   78,   79,   80,  228,   77,  233,  226,
       77,  539,  229,   77,  539,   78,   79,   80,   77,  231,
      539,  234,  230,  539,  539,   77,   78,   79,   80,   77,
      539,  539,  235,  539,   78,   79,   80,   78,   79,   80,
       78,   79,   80,  232,   77,   78,   79,   80,   77,  539,
      539,   77,   78,   79,   80,  539,   78,   79,   80,   77,
      539,  236,   77,  539,  539,  237,  238,   77,  240,  539,

      539,   78,   79,   80,   77,   78,   79,   80,   78,   79,
       80,   77,  539,  239,  539,  539,   78,   79,   80,   78,
       79,   80,  241,   77,   78,   79,   80,  242,   77,  244,
      243,   78,   79,   80,   77,  249,  539,  245,   78,   79,
       80,   77,  539,  539,   77,  539,  247,  539,  539,  539,
       78,   79,   80,   77,  246,   78,   79,   80,  539,  539,
       77,   78,   79,   80,  539,  539,  250,   77,   78,   79,
       80,   78,   79,   80,  248,  251,   77,  539,  252,   77,
       78,   79,   80,  224,  539,   77,  539,   78,   79,   80,
      539,  255,   77,  539,   78,   79,   80,   77,  539,  539,

      539,  253,  254,   78,   79,   80,   78,   79,   80,  216,
      256,  539,   78,   79,   80,  539,  217,   77,  539,   78,
       79,   80,   77,  539,   78,   79,   80,  257,  259,   77,
      539,  539,   77,  216,  539,   77,  539,  539,  258,   77,
      217,  142,  539,  262,   78,   79,   80,  539,  539,   78,
       79,   80,  260,  539,  264,  261,   78,   79,   80,   78,
       79,   80,   78,   79,   80,   77,   78,   79,   80,   77,
      539,  539,  271,  539,  539,  263,   77,  539,  539,  265,
      207,  207,  207,  207,  207,  207,  207,   77,  278,  539,
       77,  539,   78,   79,   80,   77,   78,   79,   80,  272,

      273,  274,  281,   78,   79,   80,   77,  279,  539,  280,
      539,   77,  539,  539,   78,   79,   80,   78,   79,   80,
       77,  282,   78,   79,   80,  283,  539,  539,  539,   77,
      539,  539,   77,   78,   79,   80,   77,  539,   78,   79,
       80,  285,  284,   77,  539,  539,  539,   78,   79,   80,
      539,  539,  539,  286,   77,  539,   78,   79,   80,   78,
       79,   80,   77,   78,   79,   80,  287,   77,  539,  539,
       78,   79,   80,   77,  288,  290,   77,  539,  539,  291,
       77,   78,   79,   80,  539,   77,  293,  289,  539,   78,
       79,   80,  539,   77,   78,   79,   80,  539,  292,  294,

       78,   79,   80,   78,   79,   80,   77,   78,   79,   80,
       77,  296,   78,   79,   80,   77,  539,  295,   77,  539,
       78,   79,   80,  539,  297,   77,  299,  539,  539,   77,
      539,  539,   77,   78,   79,   80,   77,   78,   79,   80,
      298,  301,   78,   79,   80,   78,   79,   80,  304,   77,
      300,  539,   78,   79,   80,   77,   78,   79,   80,   78,
       79,   80,   77,   78,   79,   80,   77,  539,  306,   77,
      305,  539,  539,  539,   77,  302,   78,   79,   80,   77,
      539,  539,   78,   79,   80,  303,   77,  539,  539,   78,
       79,   80,   77,   78,   79,   80,   78,   79,   80,   77,

      308,   78,   79,   80,  307,   77,   78,   79,   80,   77,
      539,  539,   77,   78,   79,   80,  311,  314,  539,   78,
       79,   80,  539,  310,   77,  309,   78,   79,   80,   77,
      539,  539,   78,   79,   80,  313,   78,   79,   80,   78,
       79,   80,   77,  312,  539,  539,   77,  539,  315,   77,
      142,   78,   79,   80,  316,  539,   78,   79,   80,  539,
      539,   77,  317,  539,   77,  539,  319,  539,  539,   78,
       79,   80,  539,   78,   79,   80,   78,   79,   80,  318,
      539,  271,  270,  270,  270,  270,  270,  327,   78,   79,
       80,   78,   79,   80,  330,   77,  329,  539,  270,  539,

       77,  326,  539,   77,  539,  539,  539,   77,  272,  273,
      274,  539,   77,  328,  539,   77,  539,  539,  539,  539,
      539,  270,   78,   79,   80,  539,  331,   78,   79,   80,
       78,   79,   80,   77,   78,   79,   80,  332,  539,   78,
       79,   80,   78,   79,   80,   77,  270,  333,   77,  335,
      334,   77,  539,  539,   77,  539,  539,   77,  337,  539,
       78,   79,   80,  336,   77,  539,  338,   77,  539,  539,
      539,  539,   78,   79,   80,   78,   79,   80,   78,   79,
       80,   78,   79,   80,   78,   79,   80,  339,   77,  539,
      539,   78,   79,   80,   78,   79,   80,   77,  539,  539,

       77,  539,  539,  340,   77,  539,  539,  539,   77,  341,
      344,  343,   77,  539,  539,   78,   79,   80,   77,  539,
      342,   77,  539,  539,   78,   79,   80,   78,   79,   80,
      345,   78,   79,   80,   77,   78,   79,   80,   77,   78,
       79,   80,  346,   77,  348,   78,   79,   80,   78,   79,
       80,  349,   77,  347,  539,  539,  539,  539,  350,   77,
      539,   78,   79,   80,  539,   78,   79,   80,  329,   77,
       78,   79,   80,  539,   77,  539,  329,   77,  539,   78,
       79,   80,  539,  351,   77,  354,   78,   79,   80,  355,
      539,   77,  539,  539,   77,  539,   78,   79,   80,  352,

       77,   78,   79,   80,   78,   79,   80,  539,   77,  539,
      539,   78,   79,   80,  353,   77,  539,  539,   78,   79,
       80,   78,   79,   80,   77,  539,  539,   78,   79,   80,
       77,  539,  356,  539,   77,   78,   79,   80,   77,  539,
      539,   77,   78,   79,   80,  539,   77,  362,  357,  359,
       77,   78,   79,   80,  358,  363,   77,   78,   79,   80,
       77,   78,   79,   80,  539,   78,   79,   80,   78,   79,
       80,  539,   77,   78,   79,   80,  364,   78,   79,   80,
       77,  539,  365,   78,   79,   80,   77,   78,   79,   80,
      366,  367,   77,  539,  369,   77,  539,  539,   77,   78,

       79,   80,   77,  539,  370,  539,   77,   78,   79,   80,
      372,  539,  368,   78,   79,   80,  367,  539,   77,   78,
       79,   80,   78,   79,   80,   78,   79,   80,   77,   78,
       79,   80,   77,   78,   79,   80,   77,  371,  367,   77,
      539,  539,   77,  539,  376,   78,   79,   80,  373,  539,
       77,  367,  374,  539,  539,   78,   79,   80,   77,   78,
       79,   80,  375,   78,   79,   80,   78,   79,   80,   78,
       79,   80,   77,  539,  539,  377,   77,   78,   79,   80,
      539,   77,  539,  539,   77,   78,   79,   80,   77,  539,
      378,  379,   77,  539,  539,  539,  539,   77,  539,   78,

       79,   80,  380,   78,   79,   80,   77,  539,   78,   79,
       80,   78,   79,   80,   77,   78,   79,   80,  381,   78,
       79,   80,   77,  539,   78,   79,   80,   77,  382,  539,
      539,  539,   77,   78,   79,   80,  539,  539,   77,  539,
      539,   78,   79,   80,  384,  388,   77,  383,  539,   78,
       79,   80,  386,  221,   78,   79,   80,   77,  539,   78,
       79,   80,   77,  539,  539,   78,   79,   80,   77,  539,
      539,   77,  539,   78,   79,   80,   77,  539,  389,   77,
      387,  539,  390,  539,   78,   79,   80,  539,   77,   78,
       79,   80,  539,  391,  393,   78,   79,   80,   78,   79,

       80,   77,  539,   78,   79,   80,   78,   79,   80,   77,
      539,  539,   77,  392,  394,   78,   79,   80,  395,   77,
      539,  539,  539,  539,  539,   77,  539,  539,   78,   79,
       80,  367,  539,   77,  539,  539,   78,   79,   80,   78,
       79,   80,  539,  396,   77,  397,   78,   79,   80,  539,
      367,   77,   78,   79,   80,   77,  398,  539,   77,  539,
       78,   79,   80,   77,  539,  539,  539,  539,   77,  539,
      399,   78,   79,   80,  402,   77,  539,  539,   78,   79,
       80,  400,   78,   79,   80,   78,   79,   80,   77,  406,
       78,   79,   80,  401,  403,   78,   79,   80,   77,  539,

      539,   77,   78,   79,   80,  405,  408,   77,  221,  539,
      539,  539,  539,   77,  539,   78,   79,   80,   77,  539,
      539,  539,   77,  539,  539,   78,   79,   80,   78,   79,
       80,  539,   77,  539,   78,   79,   80,  407,  409,   77,
       78,   79,   80,  410,   77,   78,   79,   80,   77,   78,
       79,   80,   77,  539,  539,  412,   77,  411,  414,   78,
       79,   80,  413,   77,  539,  539,   78,   79,   80,   77,
      539,   78,   79,   80,   77,   78,   79,   80,  415,   78,
       79,   80,   77,   78,   79,   80,  539,   77,  416,  539,
       78,   79,   80,  398,   77,  539,   78,   79,   80,  406,

       77,   78,   79,   80,   77,  539,  539,   77,  539,   78,
       79,   80,   77,  418,   78,   79,   80,  421,  419,  417,
       77,   78,   79,   80,   77,  539,  367,   78,   79,   80,
      367,   78,   79,   80,   78,   79,   80,   77,  539,   78,
       79,   80,  539,  420,   77,  539,  539,   78,   79,   80,
      423,   78,   79,   80,  427,  424,   77,  422,  539,   77,
      539,  539,   77,  425,   78,   79,   80,  539,  539,  539,
       77,   78,   79,   80,   77,  539,  539,   77,  539,  367,
      539,  426,  539,   78,   79,   80,   78,   79,   80,   78,
       79,   80,   77,  367,  539,  433,   77,   78,   79,   80,

       77,   78,   79,   80,   78,   79,   80,   77,  539,  539,
      429,  539,   77,  539,  428,  367,  539,  539,   77,   78,
       79,   80,  430,   78,   79,   80,   77,   78,   79,   80,
      539,   77,  539,  539,   78,   79,   80,   77,  539,   78,
       79,   80,  432,  434,  431,   78,   79,   80,  539,  539,
       77,  539,  539,   78,   79,   80,  435,  539,   78,   79,
       80,   77,  539,  539,   78,   79,   80,   77,  438,  437,
       77,  539,  539,   77,  539,  539,  539,   78,   79,   80,
       77,  436,  539,  539,   77,  367,  442,  539,   78,   79,
       80,  539,   77,  539,   78,   79,   80,   78,   79,   80,

       78,   79,   80,  367,  439,   77,  441,   78,   79,   80,
       77,   78,   79,   80,   77,  539,  539,  539,  440,   78,
       79,   80,  539,  444,   77,  539,  539,  539,   77,  443,
      539,  539,   78,   79,   80,   77,  539,   78,   79,   80,
       77,   78,   79,   80,  539,  445,  446,   77,  539,  539,
      448,   78,   79,   80,   77,   78,   79,   80,   77,  449,
      539,  447,   78,   79,   80,   77,  539,   78,   79,   80,
      539,  539,  451,  450,   78,   79,   80,   77,  539,  453,
      452,   78,   79,   80,   77,   78,   79,   80,   77,  455,
      520,   77,   78,   79,   80,   77,  539,  459,  454,   77,

      460,  461,  539,   77,   78,   79,   80,   77,  456,  457,
       77,   78,   79,   80,  458,   78,   79,   80,   78,   79,
       80,   77,   78,   79,   80,   77,   78,   79,   80,   77,
       78,   79,   80,  539,   78,   79,   80,   78,   79,   80,
       77,  539,  539,  367,  539,   77,  462,  539,   78,   79,
       80,   77,   78,   79,   80,  464,   78,   79,   80,  539,
      539,  463,   77,  539,  465,   77,  539,   78,   79,   80,
      470,  539,   78,   79,   80,  466,   77,  539,   78,   79,
       80,   77,  539,  539,  468,  467,  539,   77,  539,   78,
       79,   80,   78,   79,   80,   77,  539,  539,  469,  539,

       77,  539,  473,   78,   79,   80,  471,   77,   78,   79,
       80,  539,   77,  472,   78,   79,   80,  477,  539,   77,
      539,  539,   78,   79,   80,  539,   77,   78,   79,   80,
      474,   77,  539,  478,   78,   79,   80,  475,   77,   78,
       79,   80,   77,  539,  539,  480,   78,   79,   80,   77,
      539,  539,  476,   78,   79,   80,  483,   77,   78,   79,
       80,   77,  485,  479,  481,   78,   79,   80,   77,   78,
       79,   80,   77,  482,  484,  539,   78,   79,   80,   77,
      539,  539,   77,  539,   78,   79,   80,  539,   78,   79,
       80,  539,  486,   77,  539,   78,   79,   80,   77,   78,

       79,   80,  539,  487,   77,  539,   78,   79,   80,   78,
       79,   80,  489,  539,  539,   77,  539,  539,  539,  488,
       78,   79,   80,  490,   77,   78,   79,   80,   77,  539,
      539,   78,   79,   80,   77,  539,  539,  491,  495,  539,
       77,  539,   78,   79,   80,  539,   77,  539,  492,  494,
       77,   78,   79,   80,  493,   78,   79,   80,   77,  539,
      496,   78,   79,   80,  497,   77,  539,   78,   79,   80,
       77,  539,  498,   78,   79,   80,   77,   78,   79,   80,
       77,  539,  539,  499,  539,   78,   79,   80,  500,  539,
      501,   77,   78,   79,   80,  539,   77,   78,   79,   80,

      504,  502,  503,   78,   79,   80,   77,   78,   79,   80,
      505,   77,  509,  539,   77,  539,  539,   77,   78,   79,
       80,  506,   77,   78,   79,   80,   77,  539,  507,   77,
      539,  508,  539,   78,   79,   80,  510,  539,   78,   79,
       80,   78,   79,   80,   78,   79,   80,   77,  539,   78,
       79,   80,   77,   78,   79,   80,   78,   79,   80,  516,
       77,  511,  512,   77,  517,  539,   77,  539,  515,  539,
       77,  539,  539,  539,   78,   79,   80,   77,  539,   78,
       79,   80,   77,  513,  518,  539,  514,   78,   79,   80,
       78,   79,   80,   78,   79,   80,  539,   78,   79,   80,

      539,  539,   77,  539,   78,   79,   80,   77,  539,   78,
       79,   80,  519,   77,  539,  539,   77,  521,  539,   77,
      539,  522,   77,  539,  523,  539,  524,   77,  539,   78,
       79,   80,  525,  539,   78,   79,   80,  526,   77,  539,
       78,   79,   80,   78,   79,   80,   78,   79,   80,   78,
       79,   80,   77,  539,   78,   79,   80,   77,  528,  539,
       77,  539,  527,   77,  530,   78,   79,   80,   77,  539,
      531,  539,  539,  539,   77,  539,  539,  529,   77,   78,
       79,   80,  367,  539,   78,   79,   80,   78,   79,   80,
       78,   79,   80,  367,   77,   78,   79,   80,  533,  534,

       77,   78,   79,   80,   77,   78,   79,   80,  532,   77,
      535,  539,  536,  539,   77,  539,  539,   77,  539,  537,
       77,   78,   79,   80,  539,  539,  539,   78,   79,   80,
      539,   78,   79,   80,  538,  539,   78,   79,   80,  367,
      539,   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,  539,   57,  539,
       57,  539,   57,   66,  539,  539,   66,  539,   66,   66,
       66,   66,   66,   76,   76,  539,   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,
      539,  132,  132,  132,  132,  132,  132,  132,  132,  132,
      132,  132,  132,  140,  539,  140,  140,  140,  140,  140,
      140,  140,  140,  140,  140,  140,  140,  141,  141,  141,
      141,  141,  141,  141,  141,  141,  151,  151,  151,  204,

      539,  539,  539,  539,  204,  204,  204,  207,  207,  207,
      207,  207,  215,  215,  215,  539,  539,  215,  267,  267,
      267,  270,  270,  270,  270,  270,  270,  270,  270,  270,
        7,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,

      539,  539,  539
    } ;

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,   72,   50,   82,   82,  206,
       13,   14,  206,   51,  404,   14,   16,   19,  385,  361,

       16,  203,  203,  203,  203,  203,  203,   20,  150,   72,
       11,   22,  360,   13,   14,   15,   15,   15,   15,   15,
       15,   15,   20,   22,   19,   19,   19,   15,   15,   15,
       51,   16,  150,   15,   20,   20,   20,  325,   22,   22,
       22,   26,   26,   26,   26,   26,   26,   26,  151,  324,
       15,   15,   15,   73,  216,  151,   23,   15,   16,   16,
       16,   17,   73,   17,   17,   17,   17,   17,   17,   17,
       23,  323,  151,   17,   74,  322,   17,   73,  216,  151,
      277,   17,   74,   23,   23,   23,   73,  276,   17,   74,
       17,   24,   17,   25,  275,   24,   17,   74,  274,   17,

      273,  272,  269,   25,  267,   17,   74,  266,   24,  218,
       24,   28,   17,   74,   17,   21,   21,   32,   24,   21,
       21,   21,   21,   21,   21,   21,   42,  214,   42,   32,
       25,   25,   25,   29,   28,   24,   24,   24,   28,   28,
       28,   30,   29,   30,   32,   32,   32,  213,   29,   21,
      212,   30,  211,   42,   42,   42,   30,  210,  209,  201,
       29,   29,   29,  153,  152,  148,  147,   37,   30,   30,
       30,  146,   33,  145,  144,   34,   21,   21,   21,   27,
       27,   27,   27,   37,  137,   27,  134,  132,   27,   34,
       33,   27,   35,   27,   37,   37,   37,  128,   27,   33,

       33,   33,   34,   34,   34,  127,   36,   35,   36,   38,
      126,  125,   36,   80,   79,   38,   36,   40,   78,   35,
       35,   35,   39,   71,   70,   27,   27,   27,   69,   41,
       68,   39,   41,   36,   36,   36,   38,   38,   38,   41,
       40,   41,   39,   41,   40,   40,   40,   66,   41,   39,
       39,   39,   59,   57,   54,   53,   41,   41,   41,   55,
       55,   55,   55,   55,   55,   58,   58,   47,   46,   58,
       58,   58,   58,   58,   58,   58,   62,   62,   66,   45,
       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,   44,   43,
       85,   31,   77,   18,   76,   76,   76,   85,   83,   84,
       83,   86,   81,   12,   83,   86,   88,    7,   81,   81,
       81,   84,   84,   84,   87,   77,   88,   85,   85,   85,
       91,   83,    6,   83,   90,    5,   87,    4,   83,   89,
        3,    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,  155,    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,  155,  155,
      155,  136,  138,  138,  138,  138,  138,  138,  138,    0,
        0,    0,    0,    0,  154,    0,    0,  154,  136,  156,
      136,    0,    0,    0,    0,  136,  139,  139,  139,  139,
      139,  139,  139,  143,  143,  143,  143,  143,  139,  159,
      139,  154,  154,  154,  139,    0,  156,  156,  156,  143,
      157,    0,  157,    0,    0,  158,    0,    0,  159,    0,
      162,  139,  158,  139,  160,  158,    0,  161,  139,    0,

        0,    0,  143,  162,  161,    0,  164,  157,  157,  157,
        0,  164,  158,  158,  158,  159,  159,  159,  163,    0,
        0,  160,  160,  160,  161,  161,  161,  143,    0,  165,
      162,  162,  162,  164,  164,  164,  165,  166,  170,  163,
      167,    0,  166,  168,    0,  163,  163,  163,  170,  168,
        0,  171,  167,    0,    0,  169,  165,  165,  165,  171,
        0,    0,  172,    0,  166,  166,  166,  167,  167,  167,
      168,  168,  168,  169,  174,  170,  170,  170,  172,    0,
        0,  175,  169,  169,  169,    0,  171,  171,  171,  173,
        0,  173,  177,    0,    0,  174,  175,  176,  177,    0,

        0,  174,  174,  174,  178,  172,  172,  172,  175,  175,
      175,  179,    0,  176,    0,    0,  173,  173,  173,  177,
      177,  177,  178,  181,  176,  176,  176,  179,  180,  181,
      180,  178,  178,  178,  182,  186,    0,  182,  179,  179,
      179,  183,    0,    0,  184,    0,  184,    0,    0,    0,
      181,  181,  181,  185,  183,  180,  180,  180,    0,    0,
      186,  182,  182,  182,    0,    0,  186,  187,  183,  183,
      183,  184,  184,  184,  185,  187,  188,    0,  189,  191,
      185,  185,  185,  188,    0,  190,    0,  186,  186,  186,
        0,  191,  192,    0,  187,  187,  187,  189,    0,    0,

        0,  189,  190,  188,  188,  188,  191,  191,  191,  215,
      192,    0,  190,  190,  190,    0,  215,  193,    0,  192,
      192,  192,  194,    0,  189,  189,  189,  193,  194,  197,
        0,    0,  195,  215,    0,  196,    0,    0,  193,  199,
      215,  207,    0,  197,  193,  193,  193,    0,    0,  194,
      194,  194,  195,    0,  199,  196,  197,  197,  197,  195,
      195,  195,  196,  196,  196,  198,  199,  199,  199,  200,
        0,    0,  207,    0,    0,  198,  219,    0,    0,  200,
      208,  208,  208,  208,  208,  208,  208,  220,  219,    0,
      221,    0,  198,  198,  198,  222,  200,  200,  200,  207,

      207,  207,  223,  219,  219,  219,  224,  220,    0,  222,
        0,  226,    0,    0,  220,  220,  220,  221,  221,  221,
      223,  225,  222,  222,  222,  226,    0,    0,    0,  228,
        0,    0,  225,  224,  224,  224,  227,    0,  226,  226,
      226,  228,  227,  229,    0,    0,    0,  223,  223,  223,
        0,    0,    0,  229,  230,    0,  228,  228,  228,  225,
      225,  225,  232,  227,  227,  227,  230,  231,    0,    0,
      229,  229,  229,  233,  230,  232,  235,    0,    0,  233,
      234,  230,  230,  230,    0,  236,  235,  231,    0,  232,
      232,  232,    0,  238,  231,  231,  231,    0,  234,  236,

      233,  233,  233,  235,  235,  235,  240,  234,  234,  234,
      237,  238,  236,  236,  236,  241,    0,  237,  239,    0,
      238,  238,  238,    0,  239,  242,  243,    0,    0,  245,
        0,    0,  246,  240,  240,  240,  244,  237,  237,  237,
      242,  245,  241,  241,  241,  239,  239,  239,  249,  243,
      244,    0,  242,  242,  242,  247,  245,  245,  245,  246,
      246,  246,  250,  244,  244,  244,  251,    0,  252,  248,
      250,    0,    0,    0,  249,  247,  243,  243,  243,  254,
        0,    0,  247,  247,  247,  248,  252,    0,    0,  250,
      250,  250,  255,  251,  251,  251,  248,  248,  248,  253,

      254,  249,  249,  249,  253,  256,  254,  254,  254,  257,
        0,    0,  258,  252,  252,  252,  258,  261,    0,  255,
      255,  255,    0,  257,  259,  256,  253,  253,  253,  260,
        0,    0,  256,  256,  256,  260,  257,  257,  257,  258,
      258,  258,  261,  259,    0,    0,  262,    0,  261,  263,
      270,  259,  259,  259,  262,    0,  260,  260,  260,    0,
        0,  264,  263,    0,  265,    0,  265,    0,    0,  261,
      261,  261,    0,  262,  262,  262,  263,  263,  263,  264,
        0,  270,  271,  271,  271,  271,  271,  279,  264,  264,
      264,  265,  265,  265,  282,  278,  281,    0,  271,    0,

      279,  278,    0,  280,    0,    0,    0,  282,  270,  270,
      270,    0,  281,  280,    0,  283,    0,    0,    0,    0,
        0,  271,  278,  278,  278,    0,  283,  279,  279,  279,
      280,  280,  280,  284,  282,  282,  282,  284,    0,  281,
      281,  281,  283,  283,  283,  285,  271,  285,  286,  287,
      286,  287,    0,    0,  289,    0,    0,  288,  289,    0,
      284,  284,  284,  288,  290,    0,  290,  291,    0,    0,
        0,    0,  285,  285,  285,  286,  286,  286,  287,  287,
      287,  289,  289,  289,  288,  288,  288,  291,  292,    0,
        0,  290,  290,  290,  291,  291,  291,  293,    0,    0,

      294,    0,    0,  292,  295,    0,    0,    0,  296,  293,
      296,  295,  297,    0,    0,  292,  292,  292,  302,    0,
      294,  298,    0,    0,  293,  293,  293,  294,  294,  294,
      297,  295,  295,  295,  300,  296,  296,  296,  301,  297,
      297,  297,  298,  304,  301,  302,  302,  302,  298,  298,
      298,  303,  305,  300,    0,    0,    0,    0,  305,  309,
        0,  300,  300,  300,    0,  301,  301,  301,  306,  307,
      304,  304,  304,    0,  303,    0,  307,  308,    0,  305,
      305,  305,    0,  308,  306,  312,  309,  309,  309,  314,
        0,  310,    0,    0,  311,    0,  307,  307,  307,  310,

      313,  303,  303,  303,  308,  308,  308,    0,  312,    0,
        0,  306,  306,  306,  311,  314,    0,    0,  310,  310,
      310,  311,  311,  311,  315,    0,    0,  313,  313,  313,
      316,    0,  315,    0,  318,  312,  312,  312,  317,    0,
        0,  327,  314,  314,  314,    0,  319,  326,  317,  319,
      329,  315,  315,  315,  318,  327,  328,  316,  316,  316,
      326,  318,  318,  318,    0,  317,  317,  317,  327,  327,
      327,    0,  332,  319,  319,  319,  328,  329,  329,  329,
      334,    0,  330,  328,  328,  328,  330,  326,  326,  326,
      331,  332,  333,    0,  334,  331,    0,    0,  336,  332,

      332,  332,  335,    0,  335,    0,  339,  334,  334,  334,
      339,    0,  333,  330,  330,  330,  336,    0,  338,  333,
      333,  333,  331,  331,  331,  336,  336,  336,  337,  335,
      335,  335,  340,  339,  339,  339,  344,  337,  338,  341,
        0,    0,  342,    0,  344,  338,  338,  338,  340,    0,
      343,  341,  342,    0,    0,  337,  337,  337,  348,  340,
      340,  340,  343,  344,  344,  344,  341,  341,  341,  342,
      342,  342,  345,    0,    0,  345,  346,  343,  343,  343,
        0,  347,    0,    0,  350,  348,  348,  348,  351,    0,
      346,  347,  352,    0,    0,    0,    0,  353,    0,  345,

      345,  345,  350,  346,  346,  346,  355,    0,  347,  347,
      347,  350,  350,  350,  358,  351,  351,  351,  353,  352,
      352,  352,  356,    0,  353,  353,  353,  357,  356,    0,
        0,    0,  359,  355,  355,  355,    0,    0,  362,    0,
        0,  358,  358,  358,  359,  365,  363,  357,    0,  356,
      356,  356,  362,  363,  357,  357,  357,  364,    0,  359,
      359,  359,  365,    0,    0,  362,  362,  362,  366,    0,
        0,  367,    0,  363,  363,  363,  368,    0,  366,  369,
      364,    0,  368,    0,  364,  364,  364,    0,  371,  365,
      365,  365,    0,  369,  371,  366,  366,  366,  367,  367,

      367,  370,    0,  368,  368,  368,  369,  369,  369,  372,
        0,    0,  373,  370,  372,  371,  371,  371,  373,  374,
        0,    0,    0,    0,    0,  375,    0,    0,  370,  370,
      370,  375,    0,  377,    0,    0,  372,  372,  372,  373,
      373,  373,    0,  374,  376,  377,  374,  374,  374,    0,
      376,  378,  375,  375,  375,  379,  378,    0,  380,    0,
      377,  377,  377,  381,    0,    0,    0,    0,  383,    0,
      379,  376,  376,  376,  383,  382,    0,    0,  378,  378,
      378,  381,  379,  379,  379,  380,  380,  380,  384,  388,
      381,  381,  381,  382,  384,  383,  383,  383,  386,    0,

        0,  387,  382,  382,  382,  386,  390,  388,  387,    0,
        0,    0,    0,  389,    0,  384,  384,  384,  390,    0,
        0,    0,  392,    0,    0,  386,  386,  386,  387,  387,
      387,    0,  391,    0,  388,  388,  388,  389,  391,  393,
      389,  389,  389,  392,  395,  390,  390,  390,  394,  392,
      392,  392,  396,    0,    0,  394,  398,  393,  396,  391,
      391,  391,  395,  397,    0,    0,  393,  393,  393,  401,
        0,  395,  395,  395,  399,  394,  394,  394,  397,  396,
      396,  396,  405,  398,  398,  398,    0,  400,  399,    0,
      397,  397,  397,  400,  402,    0,  401,  401,  401,  402,

      403,  399,  399,  399,  406,    0,    0,  407,    0,  405,
      405,  405,  408,  407,  400,  400,  400,  411,  408,  403,
      410,  402,  402,  402,  409,    0,  410,  403,  403,  403,
      412,  406,  406,  406,  407,  407,  407,  413,    0,  408,
      408,  408,    0,  409,  411,    0,    0,  410,  410,  410,
      414,  409,  409,  409,  417,  414,  412,  413,    0,  415,
        0,    0,  416,  415,  413,  413,  413,    0,    0,    0,
      414,  411,  411,  411,  418,    0,    0,  417,    0,  421,
        0,  416,    0,  412,  412,  412,  415,  415,  415,  416,
      416,  416,  419,  418,    0,  426,  420,  414,  414,  414,

      422,  418,  418,  418,  417,  417,  417,  421,    0,    0,
      422,    0,  423,    0,  419,  420,    0,    0,  426,  419,
      419,  419,  423,  420,  420,  420,  424,  422,  422,  422,
        0,  425,    0,    0,  421,  421,  421,  428,    0,  423,
      423,  423,  425,  428,  424,  426,  426,  426,    0,    0,
      429,    0,    0,  424,  424,  424,  429,    0,  425,  425,
      425,  430,    0,    0,  428,  428,  428,  431,  432,  431,
      432,    0,    0,  434,    0,    0,    0,  429,  429,  429,
      438,  430,    0,    0,  435,  434,  438,    0,  430,  430,
      430,    0,  437,    0,  431,  431,  431,  432,  432,  432,

      434,  434,  434,  435,  436,  440,  437,  438,  438,  438,
      436,  435,  435,  435,  439,    0,    0,    0,  436,  437,
      437,  437,    0,  440,  441,    0,    0,    0,  442,  439,
        0,    0,  440,  440,  440,  444,    0,  436,  436,  436,
      443,  439,  439,  439,    0,  441,  442,  445,    0,    0,
      444,  441,  441,  441,  446,  442,  442,  442,  447,  445,
        0,  443,  444,  444,  444,  448,    0,  443,  443,  443,
        0,    0,  447,  446,  445,  445,  445,  449,    0,  449,
      448,  446,  446,  446,  451,  447,  447,  447,  450,  451,
      517,  453,  448,  448,  448,  452,    0,  455,  450,  454,

      456,  457,    0,  517,  449,  449,  449,  455,  452,  453,
      456,  451,  451,  451,  454,  450,  450,  450,  453,  453,
      453,  457,  452,  452,  452,  459,  454,  454,  454,  458,
      517,  517,  517,    0,  455,  455,  455,  456,  456,  456,
      460,    0,    0,  458,    0,  461,  459,    0,  457,  457,
      457,  462,  459,  459,  459,  461,  458,  458,  458,    0,
        0,  460,  463,    0,  462,  464,    0,  460,  460,  460,
      467,    0,  461,  461,  461,  463,  467,    0,  462,  462,
      462,  465,    0,    0,  465,  464,    0,  470,    0,  463,
      463,  463,  464,  464,  464,  466,    0,    0,  466,    0,

      468,    0,  470,  467,  467,  467,  468,  469,  465,  465,
      465,    0,  471,  469,  470,  470,  470,  474,    0,  472,
        0,    0,  466,  466,  466,    0,  474,  468,  468,  468,
      471,  473,    0,  475,  469,  469,  469,  472,  477,  471,
      471,  471,  475,    0,    0,  477,  472,  472,  472,  476,
        0,    0,  473,  474,  474,  474,  480,  478,  473,  473,
      473,  480,  482,  476,  478,  477,  477,  477,  479,  475,
      475,  475,  482,  479,  481,    0,  476,  476,  476,  481,
        0,    0,  483,    0,  478,  478,  478,    0,  480,  480,
      480,    0,  483,  484,    0,  479,  479,  479,  485,  482,

      482,  482,    0,  484,  486,    0,  481,  481,  481,  483,
      483,  483,  486,    0,    0,  487,    0,    0,    0,  485,
      484,  484,  484,  487,  488,  485,  485,  485,  492,    0,
        0,  486,  486,  486,  489,    0,    0,  488,  492,    0,
      490,    0,  487,  487,  487,    0,  491,    0,  489,  491,
      493,  488,  488,  488,  490,  492,  492,  492,  494,    0,
      493,  489,  489,  489,  494,  495,    0,  490,  490,  490,
      497,    0,  495,  491,  491,  491,  496,  493,  493,  493,
      498,    0,    0,  496,    0,  494,  494,  494,  497,    0,
      498,  499,  495,  495,  495,    0,  501,  497,  497,  497,

      501,  499,  500,  496,  496,  496,  502,  498,  498,  498,
      502,  500,  506,    0,  503,    0,    0,  506,  499,  499,
      499,  503,  507,  501,  501,  501,  504,    0,  504,  505,
        0,  505,    0,  502,  502,  502,  507,    0,  500,  500,
      500,  503,  503,  503,  506,  506,  506,  508,    0,  507,
      507,  507,  509,  504,  504,  504,  505,  505,  505,  513,
      512,  508,  509,  510,  514,    0,  511,    0,  512,    0,
      515,    0,    0,    0,  508,  508,  508,  513,    0,  509,
      509,  509,  514,  510,  515,    0,  511,  512,  512,  512,
      510,  510,  510,  511,  511,  511,    0,  515,  515,  515,

        0,    0,  516,    0,  513,  513,  513,  518,    0,  514,
      514,  514,  516,  519,    0,    0,  520,  518,    0,  521,
        0,  519,  522,    0,  520,    0,  521,  523,    0,  516,
      516,  516,  522,    0,  518,  518,  518,  523,  525,    0,
      519,  519,  519,  520,  520,  520,  521,  521,  521,  522,
      522,  522,  524,    0,  523,  523,  523,  526,  525,    0,
      527,    0,  524,  528,  527,  525,  525,  525,  530,    0,
      530,    0,    0,    0,  529,    0,    0,  526,  532,  524,
      524,  524,  528,    0,  526,  526,  526,  527,  527,  527,
      528,  528,  528,  529,  531,  530,  530,  530,  532,  533,

      534,  529,  529,  529,  535,  532,  532,  532,  531,  536,
      534,    0,  535,    0,  537,    0,    0,  533,    0,  536,
      538,  531,  531,  531,    0,    0,    0,  534,  534,  534,
        0,  535,  535,  535,  537,    0,  536,  536,  536,  538,
        0,  537,  537,  537,  533,  533,  533,  538,  538,  538,
      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,  542,
      542,  542,  542,  542,  542,  542,  542,  542,  542,  542,
      542,  542,  543,  543,  543,  543,  543,  543,  543,  543,

      543,  543,  543,  543,  543,  543,  544,    0,  544,    0,
      544,    0,  544,  545,    0,    0,  545,    0,  545,  545,
      545,  545,  545,  546,  546,    0,  546,  546,  546,  546,
      546,  546,  547,  547,  547,  547,  547,  547,  547,  547,
      547,  547,  547,  547,  547,  547,  548,  548,  548,  548,
      548,  548,  548,  548,  548,  548,  548,  548,  548,  549,
        0,  549,  549,  549,  549,  549,  549,  549,  549,  549,
      549,  549,  549,  550,    0,  550,  550,  550,  550,  550,
      550,  550,  550,  550,  550,  550,  550,  551,  551,  551,
      551,  551,  551,  551,  551,  551,  552,  552,  552,  553,

        0,    0,    0,    0,  553,  553,  553,  554,  554,  554,
      554,  554,  555,  555,  555,    0,    0,  555,  556,  556,
      556,  557,  557,  557,  557,  557,  557,  557,  557,  557,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,

      539,  539,  539
    } ;

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 1734 "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 1777 "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 1998 "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 >= 540 )
					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,(size_t)(yyleng-2),!ISIDENT,&s);
			if(len < 0) {
			    snprintf(errstr, sizeof(errstr),"Illegal character: %s",yytext);
			    yyerror(errstr);
			}
			bbClear(lextext);
			bbAppendn(lextext,s,(size_t)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,(size_t)len);
	        if((len % 2) == 1) bbAppend(lextext,'0');
		bbNull(lextext);
		/* convert all chars to lower case */
		for(p=bbContents(lextext);*p;p++) *p = (char)tolower((int)*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,(size_t)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,(size_t)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"
{
		    char c;
		    char* p; char* q;
		    /* copy the trimmed name */
		    bbClear(lextext);
		    bbAppendn(lextext,(char*)yytext,(size_t)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; size_t len;
		    len = strlen(yytext);
		    len = (size_t)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.
		*/
		    size_t 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;
		size_t slen = strlen(yytext);
		char* stag = NULL;
	        int tag = NC_NAT;
		char* hex = yytext+2; /* point to first true hex digit */
		size_t 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 = (unsigned int)(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 = (signed char)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 = (signed char)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 2627 "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 >= 540 )
				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 >= 540 )
			yy_c = yy_meta[yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
	yy_is_jam = (yy_current_state == 539);

		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 = (int)(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];
    size_t slen = strlen(text);
    size_t 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;
}

