
#line 2 "ncap_lex.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define yy_create_buffer nco_yy_create_buffer
#define yy_delete_buffer nco_yy_delete_buffer
#define yy_scan_buffer nco_yy_scan_buffer
#define yy_scan_string nco_yy_scan_string
#define yy_scan_bytes nco_yy_scan_bytes
#define yy_init_buffer nco_yy_init_buffer
#define yy_flush_buffer nco_yy_flush_buffer
#define yy_load_buffer_state nco_yy_load_buffer_state
#define yy_switch_to_buffer nco_yy_switch_to_buffer
#define yypush_buffer_state nco_yypush_buffer_state
#define yypop_buffer_state nco_yypop_buffer_state
#define yyensure_buffer_stack nco_yyensure_buffer_stack
#define yy_flex_debug nco_yy_flex_debug
#define yyin nco_yyin
#define yyleng nco_yyleng
#define yylex nco_yylex
#define yylineno nco_yylineno
#define yyout nco_yyout
#define yyrestart nco_yyrestart
#define yytext nco_yytext
#define yywrap nco_yywrap
#define yyalloc nco_yyalloc
#define yyrealloc nco_yyrealloc
#define yyfree nco_yyfree

#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 nco_yy_create_buffer_ALREADY_DEFINED
#else
#define yy_create_buffer nco_yy_create_buffer
#endif

#ifdef yy_delete_buffer
#define nco_yy_delete_buffer_ALREADY_DEFINED
#else
#define yy_delete_buffer nco_yy_delete_buffer
#endif

#ifdef yy_scan_buffer
#define nco_yy_scan_buffer_ALREADY_DEFINED
#else
#define yy_scan_buffer nco_yy_scan_buffer
#endif

#ifdef yy_scan_string
#define nco_yy_scan_string_ALREADY_DEFINED
#else
#define yy_scan_string nco_yy_scan_string
#endif

#ifdef yy_scan_bytes
#define nco_yy_scan_bytes_ALREADY_DEFINED
#else
#define yy_scan_bytes nco_yy_scan_bytes
#endif

#ifdef yy_init_buffer
#define nco_yy_init_buffer_ALREADY_DEFINED
#else
#define yy_init_buffer nco_yy_init_buffer
#endif

#ifdef yy_flush_buffer
#define nco_yy_flush_buffer_ALREADY_DEFINED
#else
#define yy_flush_buffer nco_yy_flush_buffer
#endif

#ifdef yy_load_buffer_state
#define nco_yy_load_buffer_state_ALREADY_DEFINED
#else
#define yy_load_buffer_state nco_yy_load_buffer_state
#endif

#ifdef yy_switch_to_buffer
#define nco_yy_switch_to_buffer_ALREADY_DEFINED
#else
#define yy_switch_to_buffer nco_yy_switch_to_buffer
#endif

#ifdef yypush_buffer_state
#define nco_yypush_buffer_state_ALREADY_DEFINED
#else
#define yypush_buffer_state nco_yypush_buffer_state
#endif

#ifdef yypop_buffer_state
#define nco_yypop_buffer_state_ALREADY_DEFINED
#else
#define yypop_buffer_state nco_yypop_buffer_state
#endif

#ifdef yyensure_buffer_stack
#define nco_yyensure_buffer_stack_ALREADY_DEFINED
#else
#define yyensure_buffer_stack nco_yyensure_buffer_stack
#endif

#ifdef yylex
#define nco_yylex_ALREADY_DEFINED
#else
#define yylex nco_yylex
#endif

#ifdef yyrestart
#define nco_yyrestart_ALREADY_DEFINED
#else
#define yyrestart nco_yyrestart
#endif

#ifdef yylex_init
#define nco_yylex_init_ALREADY_DEFINED
#else
#define yylex_init nco_yylex_init
#endif

#ifdef yylex_init_extra
#define nco_yylex_init_extra_ALREADY_DEFINED
#else
#define yylex_init_extra nco_yylex_init_extra
#endif

#ifdef yylex_destroy
#define nco_yylex_destroy_ALREADY_DEFINED
#else
#define yylex_destroy nco_yylex_destroy
#endif

#ifdef yyget_debug
#define nco_yyget_debug_ALREADY_DEFINED
#else
#define yyget_debug nco_yyget_debug
#endif

#ifdef yyset_debug
#define nco_yyset_debug_ALREADY_DEFINED
#else
#define yyset_debug nco_yyset_debug
#endif

#ifdef yyget_extra
#define nco_yyget_extra_ALREADY_DEFINED
#else
#define yyget_extra nco_yyget_extra
#endif

#ifdef yyset_extra
#define nco_yyset_extra_ALREADY_DEFINED
#else
#define yyset_extra nco_yyset_extra
#endif

#ifdef yyget_in
#define nco_yyget_in_ALREADY_DEFINED
#else
#define yyget_in nco_yyget_in
#endif

#ifdef yyset_in
#define nco_yyset_in_ALREADY_DEFINED
#else
#define yyset_in nco_yyset_in
#endif

#ifdef yyget_out
#define nco_yyget_out_ALREADY_DEFINED
#else
#define yyget_out nco_yyget_out
#endif

#ifdef yyset_out
#define nco_yyset_out_ALREADY_DEFINED
#else
#define yyset_out nco_yyset_out
#endif

#ifdef yyget_leng
#define nco_yyget_leng_ALREADY_DEFINED
#else
#define yyget_leng nco_yyget_leng
#endif

#ifdef yyget_text
#define nco_yyget_text_ALREADY_DEFINED
#else
#define yyget_text nco_yyget_text
#endif

#ifdef yyget_lineno
#define nco_yyget_lineno_ALREADY_DEFINED
#else
#define yyget_lineno nco_yyget_lineno
#endif

#ifdef yyset_lineno
#define nco_yyset_lineno_ALREADY_DEFINED
#else
#define yyset_lineno nco_yyset_lineno
#endif

#ifdef yywrap
#define nco_yywrap_ALREADY_DEFINED
#else
#define yywrap nco_yywrap
#endif

#ifdef yyalloc
#define nco_yyalloc_ALREADY_DEFINED
#else
#define yyalloc nco_yyalloc
#endif

#ifdef yyrealloc
#define nco_yyrealloc_ALREADY_DEFINED
#else
#define yyrealloc nco_yyrealloc
#endif

#ifdef yyfree
#define nco_yyfree_ALREADY_DEFINED
#else
#define yyfree nco_yyfree
#endif

#ifdef yytext
#define nco_yytext_ALREADY_DEFINED
#else
#define yytext nco_yytext
#endif

#ifdef yyleng
#define nco_yyleng_ALREADY_DEFINED
#else
#define yyleng nco_yyleng
#endif

#ifdef yyin
#define nco_yyin_ALREADY_DEFINED
#else
#define yyin nco_yyin
#endif

#ifdef yyout
#define nco_yyout_ALREADY_DEFINED
#else
#define yyout nco_yyout
#endif

#ifdef yy_flex_debug
#define nco_yy_flex_debug_ALREADY_DEFINED
#else
#define yy_flex_debug nco_yy_flex_debug
#endif

#ifdef yylineno
#define nco_yylineno_ALREADY_DEFINED
#else
#define yylineno nco_yylineno
#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 71
#define YY_END_OF_BUFFER 72
/* 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_acclist[412] =
    {   0,
        9,    9,    2,    2,   72,   70,   71,   13,   70,   71,
       12,   71,   70,   71,   70,   71,   70,   71,   70,   71,
       70,   71,   16,   70,   71,   70,   71,   20,   70,   71,
       69,   70,   71,   66,   70,   71,   68,   70,   71,   67,
       70,   71,   57,   70,   71,16438,   57,   70,   71,16438,
       57,   70,   71,16438,   57,   70,   71,16438,   57,   70,
       71,16438,   57,   70,   71,16438,   57,   70,   71,16438,
       57,   70,   71,16438,   57,   70,   71,16438,   57,   70,
       71,16438,   57,   70,   71,16438,   57,   70,   71,16438,
       57,   70,   71,16438,   57,   70,   71,16438,   57,   70,

       71,16438,   70,   71,    6,   71,    5,   71,    6,   71,
       71,    9,   71,    9,   71,   71,   71,    3,   71,    2,
       71,   71,   71,   71,   13,   63,   15,   60,    8,   16,
       16,   17,    4,   14,   16,   20,   24,   20,   22,   21,
       20,   21,   64,   62,   65, 8246,   57,16438,   56,   16,
       57,16438,   57,16438,   57,16438,   57,16438,   57,16438,
       57,16438,   57,16438,   57,16438,   57,16438,   57,16438,
       27,   57,16438,   57,16438,   57,16438,   57,16438,   57,
    16438,   57,16438,   57,16438,   57,16438,   57,16438,   57,
    16438,   57,16438,   57,16438,   57,16438,   57,16438,   57,

    16438,   57,16438,   61,    7,    9,    9,    9,   10,    3,
        2,   58,   59,   16,   14,   16,   18,   25,   21,   23,
       21,   55,   16,   57,16438,   17,   57,16438,   57,16438,
       57,16438,   57,16438,   57,16438,   57,16438,   57,16438,
       57,16438,   57,16438,   57,16438,   57,16438,   57,16438,
       57,16438,   57,16438,   57,16438,   57,16438,   57,16438,
       57,16438,   57,16438,   57,16438,   57,16438,   57,16438,
       57,16438,   57,16438,   57,16438,   11,   16,   19,   55,
       53,   57,16438,   30, 8246,   57,16438,   32, 8246,   57,
    16438,   57,16438,   57,16438,   57,16438,   57,16438,   57,

    16438,   44, 8246,   57,16438,   57,16438,   34, 8246,   33,
     8246,   57,16438,   36, 8246,   38, 8246,   57,16438,   57,
    16438,   35, 8246,   57,16438,   57,16438,   57,16438,   39,
     8246,   57,16438,   57,16438,   51, 8246,   52, 8246,   57,
    16438,   57,16438,   57,16438,   57,16438,   57,16438,   43,
     8246,   37, 8246,   28,   57,16438,   57,16438,   57,16438,
       47, 8246,   57,16438,   57,16438,   57,16438,   57,16438,
       57,16438,   41, 8246,   57,16438,   57,16438,   48, 8246,
       45, 8246,   50, 8246,   57,16438,   57,16438,   57,16438,
       31, 8246,   42, 8246,   57,16438,   57,16438,   49, 8246,

       40, 8246,   46, 8246,    1,   26,   57,16438,   29,   57,
    16438
    } ;

static const flex_int16_t yy_accept[264] =
    {   0,
        1,    1,    1,    1,    1,    2,    3,    4,    5,    5,
        5,    5,    5,    6,    8,   11,   13,   15,   17,   19,
       21,   23,   26,   28,   31,   34,   37,   40,   43,   47,
       51,   55,   59,   63,   67,   71,   75,   79,   83,   87,
       91,   95,   99,  103,  105,  107,  109,  111,  112,  114,
      116,  117,  118,  120,  122,  123,  124,  125,  126,  127,
      127,  128,  128,  129,  130,  131,  132,  132,  133,  134,
      135,  136,  137,  138,  138,  139,  140,  141,  142,  143,
      144,  145,  146,  146,  147,  149,  149,  150,  150,  153,
      155,  157,  159,  161,  163,  165,  167,  169,  171,  174,

      176,  178,  180,  182,  184,  186,  188,  190,  192,  194,
      196,  198,  200,  202,  204,  205,  206,  206,  206,  207,
      208,  209,  209,  210,  211,  212,  212,  213,  213,  214,
      214,  214,  215,  216,  217,  218,  219,  220,  221,  222,
      223,  226,  229,  231,  233,  235,  237,  239,  241,  243,
      245,  247,  249,  251,  253,  255,  257,  259,  261,  263,
      265,  267,  269,  271,  273,  275,  277,  278,  278,  279,
      280,  281,  284,  284,  286,  288,  288,  290,  292,  294,
      296,  298,  300,  302,  302,  304,  306,  308,  308,  310,
      310,  312,  314,  314,  316,  316,  318,  320,  322,  322,

      324,  326,  328,  330,  330,  332,  334,  334,  336,  336,
      338,  338,  340,  342,  344,  346,  348,  350,  350,  352,
      352,  354,  357,  359,  361,  361,  363,  365,  367,  369,
      369,  371,  373,  373,  375,  377,  379,  379,  381,  381,
      383,  383,  385,  387,  389,  391,  391,  391,  393,  393,
      395,  397,  399,  399,  401,  401,  403,  403,  405,  406,
      409,  412,  412
    } ;

static const YY_CHAR yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    4,    5,    6,    7,    1,    1,    8,    1,    9,
       10,   11,   12,    1,   12,   13,   14,   15,   16,   17,
       15,   18,   15,   19,   15,   15,   15,    1,   20,   21,
       22,   23,    1,   24,   25,   26,   25,   27,   28,   29,
       25,   25,   30,   25,   25,   31,   32,   25,   25,   33,
       25,   25,   34,   25,   35,   25,   25,   25,   25,   25,
       36,    1,   37,    1,   38,    1,   39,   40,   41,   42,

       43,   44,   45,   46,   47,   25,   48,   49,   50,   51,
       52,   53,   25,   54,   55,   56,   57,   58,   59,   60,
       61,   62,    1,   63,    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,    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
    } ;

static const YY_CHAR yy_meta[64] =
    {   0,
        1,    2,    3,    4,    1,    1,    1,    1,    5,    1,
        1,    1,    1,    1,    6,    6,    6,    6,    6,    1,
        1,    1,    1,    5,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    5,    1,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
        7,    7,    1
    } ;

static const flex_int16_t yy_base[276] =
    {   0,
        0,    0,   61,   62,   64,   67,   72,   80,  271,  260,
      259,  258,  287, 1051,   75, 1051,  264,   82,  232,  267,
      259,   90,   75,  127, 1051,  243,  224,  221,   86,  181,
       87,  155,   88,   90,  111,  179,  165,  156,  198,  214,
      215,  216,  223,  179, 1051, 1051,  215,   90,  169,  127,
      184,  212,    0,   96, 1051,  100,  113,  150, 1051,  145,
     1051,  159, 1051, 1051,    0, 1051,  265, 1051, 1051,    0,
        0,    0, 1051,  273,  173, 1051,  210,  137,  126, 1051,
     1051, 1051,  226, 1051,  289,    0, 1051,  284,  285,  300,
      302,  306,  319,  313,  335,  336,  337,  343,  344,  361,

      372,  374,  378,  395,  382,  396,  403,  417,  424,  434,
      438,  440,  442,  448, 1051, 1051,  175,  163,  317,  477,
      254,  158,  211,    0,  258,  230, 1051,  268, 1051,  116,
      481,  486,    0,  521, 1051, 1051,  125, 1051,   89,    0,
      483,  505,  523,  507,  540,  542,  551,  553,  564,  575,
      581,  577,  599,  606,  612,  615,  616,  622,  623,  625,
      629,  646,  653,  660,  662,  664, 1051,   79, 1051, 1051,
        0,  671,  245, 1051,  681,  260, 1051,  688,  697,  699,
      706,  716,  722,  347, 1051,  723,  725,  407, 1051,  431,
     1051,  741,  450, 1051,  452, 1051,  747,  760,  459, 1051,

      763,  766,  764,  473, 1051,  777,   56,  785,  479, 1051,
      514, 1051,  806,  788,  810,  814,  816,  516, 1051,  517,
     1051,  823,  824,  832,  552, 1051,  849,  853,  857,   60,
      860,  866,  563, 1051,  870,  874,  565, 1051,  663, 1051,
      672, 1051,  883,  891,  900,   44,  674, 1051,  709, 1051,
      908,  914,  710, 1051,  734, 1051,  735, 1051, 1051,  916,
      917, 1051,  974,  981,  988,  995, 1002, 1006, 1013, 1020,
     1027, 1034, 1041,   73, 1043
    } ;

static const flex_int16_t yy_def[276] =
    {   0,
      262,    1,  263,  263,  264,  264,  265,  265,  266,  266,
      266,  266,  262,  262,  262,  262,  262,  267,  262,  262,
      262,  262,  262,  262,  262,  262,  262,  262,  268,  268,
      268,  268,  268,  268,  268,  268,  268,  268,  268,  268,
      268,  268,  268,  262,  262,  262,  262,  269,  269,  262,
      269,  262,  270,  262,  262,  271,  272,  262,  262,  267,
      262,  262,  262,  262,   22,  262,  262,  262,  262,  273,
       22,   24,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  262,  268,  274,  262,  262,   30,  268,
      268,  268,  268,  268,  268,  268,  268,  268,  268,  268,

      268,  268,  268,  268,  268,  268,  268,  268,  268,  268,
      268,  268,  268,  268,  262,  262,  269,  262,  269,  262,
      262,  262,  269,  270,  262,  271,  262,  272,  262,  262,
      262,  262,  273,  262,  262,  262,  262,  262,  262,  275,
      268,  268,  268,  268,  268,  268,  268,  268,  268,  268,
      268,  268,  268,  268,  268,  268,  268,  268,  268,  268,
      268,  268,  268,  268,  268,  268,  262,  262,  262,  262,
      275,  268,  262,  262,  268,  262,  262,  268,  268,  268,
      268,  268,  268,  262,  262,  268,  268,  262,  262,  262,
      262,  268,  262,  262,  262,  262,  268,  268,  262,  262,

      268,  268,  268,  262,  262,  268,  262,  268,  262,  262,
      262,  262,  268,  268,  268,  268,  268,  262,  262,  262,
      262,  268,  268,  268,  262,  262,  268,  268,  268,  262,
      268,  268,  262,  262,  268,  268,  262,  262,  262,  262,
      262,  262,  268,  268,  268,  262,  262,  262,  262,  262,
      268,  268,  262,  262,  262,  262,  262,  262,  262,  268,
      268,    0,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  262,  262
    } ;

static const flex_int16_t yy_nxt[1115] =
    {   0,
       14,   15,   16,   15,   17,   18,   19,   20,   21,   14,
       14,   14,   22,   23,   24,   24,   24,   24,   24,   25,
       26,   27,   28,   14,   29,   29,   29,   30,   29,   29,
       29,   31,   29,   29,   29,   14,   14,   29,   32,   33,
       34,   35,   30,   36,   29,   29,   37,   29,   38,   39,
       29,   29,   40,   29,   41,   42,   43,   29,   29,   29,
       29,   29,   44,   46,   46,   49,   50,   49,   49,   50,
       49,   47,   47,   54,   55,   54,   58,   51,   58,  140,
       51,   54,   55,   54,   61,   69,  259,   61,   70,   83,
       83,   83,  118,   83,   84,   84,   84,  125,   84,  125,

       52,  246,  127,   52,   65,   65,   65,   65,   65,   86,
       86,   86,  230,   86,   83,  129,   66,   67,   68,   84,
       66,   87,   87,   87,   90,   87,  118,  207,  121,  121,
      121,   66,   67,   68,   86,   95,  127,  170,   66,   71,
      122,   72,   72,   72,   72,   72,   87,   61,   94,  129,
       61,   58,   73,   58,   74,  170,  168,   75,   83,   83,
       76,   77,   96,   84,   84,  136,   73,  167,   83,   74,
      119,  120,  119,   84,  139,   78,  122,  118,   86,   86,
      138,   76,   83,   79,   83,  135,  118,   84,   86,   84,
       87,   87,   88,  123,   91,   89,   89,   89,   89,   89,

       87,   83,   86,  135,   86,  118,   84,  101,   99,  130,
       92,  118,   93,  118,   87,  100,   87,   83,   83,   83,
      118,   86,   84,   84,   84,  122,   83,   97,  116,   83,
       98,   84,  127,   87,   84,  136,  102,   86,   86,   86,
      137,  115,   82,  138,  103,   81,   86,  118,  173,   87,
       87,   87,  104,  174,  105,  121,  121,  121,   87,  125,
      108,  125,  110,  176,   80,  106,  127,  107,  177,  111,
      129,  109,   64,  112,   63,  113,  131,  114,   62,  132,
      132,  132,  132,  132,   88,   59,  262,  134,  134,  134,
      134,  134,   83,   57,   57,   56,  262,   84,  134,  134,

      134,  134,  134,   83,  129,   83,   56,  262,   84,   83,
       84,  141,   86,  142,   84,  141,   83,  262,  119,  120,
      119,   84,   83,   86,   87,   86,  141,   84,  142,   86,
      262,  262,  143,  141,  262,   87,   86,   87,   83,   83,
       83,   87,   86,   84,   84,   84,   83,   83,   87,  262,
      184,   84,   84,  118,   87,  185,  144,  145,   86,   86,
       86,  262,  262,  146,   83,  262,   86,   86,  147,   84,
       87,   87,   87,  148,  262,   83,  262,   83,   87,   87,
       84,   83,   84,  262,   86,   83,   84,  262,  150,  262,
       84,  262,  149,  262,  151,   86,   87,   86,   83,   83,

      262,   86,  262,   84,   84,   86,   83,   87,  262,   87,
      188,   84,  262,   87,  262,  189,  152,   87,   86,   86,
       83,  262,  153,  262,  262,   84,   86,   83,  155,  157,
       87,   87,   84,  154,  190,  156,  262,   83,   87,  191,
       86,   83,   84,   83,  262,   83,   84,   86,   84,  159,
       84,   83,   87,  193,  158,  195,   84,   86,  194,   87,
      196,   86,  199,   86,  262,   86,  262,  200,  160,   87,
      262,   86,  161,   87,  262,   87,  204,   87,  121,  121,
      121,  205,  209,   87,  262,  262,   83,  210,  163,  165,
      122,   84,  164,  166,  162,  132,  132,  132,  132,  132,

      132,  132,  132,  132,  132,  262,   86,  262,   83,  262,
      173,  262,   66,   84,   68,  174,   66,  211,   87,  218,
      220,  262,  212,  262,  219,  221,   83,   66,   86,   68,
       86,   84,  262,  262,   66,  134,  134,  134,  134,  134,
       87,  262,   87,   83,  262,  176,   86,  169,   84,   68,
      177,  169,  172,  262,   83,  225,   83,  262,   87,   84,
      226,   84,  169,   86,   68,   86,  233,   83,  237,  169,
      262,  234,   84,  238,   86,   87,   86,   87,   83,  262,
      184,  262,  262,   84,   83,  185,   87,   86,   87,   84,
      262,  262,  262,  178,  175,  186,  182,  183,   86,   87,

       86,  262,   83,  180,   86,  262,  179,   84,  262,  188,
       87,  262,   87,  181,  189,  190,   87,  262,   83,  193,
      191,  262,   86,   84,  194,  195,   83,  262,   83,   86,
      196,   84,  199,   84,   87,   86,  262,  200,   86,   86,
      262,   87,  262,  187,  262,   86,   86,   87,   86,   83,
       87,   87,   86,  262,   84,  262,   83,   87,   87,  262,
       87,   84,  192,   83,   87,  204,  239,   83,   84,   86,
      205,  240,   84,  197,   83,  241,   86,  247,  198,   84,
      242,   87,  248,   86,   83,   86,  262,   86,   87,   84,
      262,  209,  262,  262,   86,   87,  210,   87,  203,   87,

      211,  201,   83,  262,   86,  212,   87,   84,  202,   83,
      262,   86,  249,  253,   84,  206,   87,  250,  254,   83,
       86,  262,   86,   87,   84,   83,   83,  262,  218,   86,
       84,   84,   87,  219,   87,  262,  208,  255,  257,   86,
      217,   87,  256,  258,  220,   86,   86,  213,   86,  221,
       83,   87,  262,  215,  262,   84,  262,   87,   87,  216,
       87,  214,  262,   83,   86,  262,   83,   83,   84,  225,
       86,   84,   84,  262,  226,  262,   87,  262,  262,  262,
       83,  262,   87,   86,  227,   84,   86,   86,   83,   86,
      262,  233,  262,   84,  262,   87,  234,  262,   87,   87,

       86,   87,  222,  262,  228,  224,  262,  262,   86,   83,
      262,   86,   87,   83,   84,  223,  262,   83,   84,  237,
       87,  262,   84,   87,  238,  262,   83,  239,  262,   86,
      229,   84,  240,   86,  262,  241,  262,   86,  231,   86,
      242,   87,  262,  262,  262,   87,   86,   86,  232,   87,
      262,   87,   83,  262,  262,   86,   83,   84,   87,   87,
       83,   84,  262,  247,  262,   84,  243,   87,  248,  249,
      262,  235,   86,   83,  250,  236,   86,   83,   84,  262,
       86,  262,   84,   86,   87,  262,  253,  262,   87,   86,
      262,  254,   87,   86,  255,   87,  262,   86,  262,  256,

      244,   87,  262,  257,  262,   87,   86,  262,  258,   87,
      262,   83,  245,  262,   86,  262,   84,   83,   87,   83,
       83,  262,   84,   86,   84,   84,   87,  262,  262,  262,
      251,   86,  262,  262,  252,   87,  262,   86,  262,   86,
       86,  262,  262,   87,  262,  262,  262,  262,  262,   87,
      262,   87,   87,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  262,  262,  262,  262,  260,  262,  262,
      262,  262,  262,  261,   45,   45,   45,   45,   45,   45,
       45,   48,   48,   48,   48,   48,   48,   48,   53,   53,
       53,   53,   53,   53,   53,   55,   55,   55,   55,   55,

       55,   55,   60,   60,   60,   60,   60,   60,   60,   85,
       85,   85,   85,  117,  117,  117,  117,  117,  117,  117,
      124,  262,  262,  262,  124,  124,  124,  126,  126,  126,
      126,  126,  126,  126,  128,  128,  128,  128,  128,  128,
      128,  133,  133,  262,  133,  133,  133,  133,  171,  171,
       13,  262,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  262,  262,  262,  262,  262,  262,  262,

      262,  262,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  262
    } ;

static const flex_int16_t yy_chk[1115] =
    {   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,    3,    4,    5,    5,    5,    6,    6,
        6,    3,    4,    7,    7,    7,   15,    5,   15,  274,
        6,    8,    8,    8,   18,   23,  246,   18,   23,   29,
       31,   33,   48,   34,   29,   31,   33,   54,   34,   54,

        5,  230,   56,    6,   22,   22,   22,   22,   22,   29,
       31,   33,  207,   34,   35,   57,   22,   22,   22,   35,
       22,   29,   31,   33,   31,   34,   48,  168,   50,   50,
       50,   22,   22,   22,   35,   34,   56,  139,   22,   24,
       50,   24,   24,   24,   24,   24,   35,   60,   33,   57,
       60,   58,   24,   58,   24,  137,  130,   24,   32,   38,
       24,   24,   35,   32,   38,   79,   24,  122,   37,   24,
       49,   49,   49,   37,   79,   24,  118,  117,   32,   38,
       79,   24,   36,   24,   30,   78,   51,   36,   37,   30,
       32,   38,   30,   51,   32,   30,   30,   30,   30,   30,

       37,   39,   36,   75,   30,   49,   39,   38,   37,   62,
       32,  117,   32,  123,   36,   37,   30,   40,   41,   42,
       51,   39,   40,   41,   42,   52,   43,   36,   47,   83,
       36,   43,  126,   39,   83,   77,   39,   40,   41,   42,
       77,   44,   28,   77,   39,   27,   43,  123,  173,   40,
       41,   42,   40,  173,   40,  121,  121,  121,   43,  125,
       41,  125,   43,  176,   26,   40,  126,   40,  176,   43,
      128,   42,   21,   43,   20,   43,   67,   43,   19,   67,
       67,   67,   67,   67,   74,   17,   13,   74,   74,   74,
       74,   74,   85,   12,   11,   10,   89,   85,   88,   88,

       88,   88,   88,   90,  128,   91,    9,    0,   90,   92,
       91,   89,   85,   89,   92,   89,   94,    0,  119,  119,
      119,   94,   93,   90,   85,   91,   89,   93,   89,   92,
        0,    0,   90,   89,    0,   90,   94,   91,   95,   96,
       97,   92,   93,   95,   96,   97,   98,   99,   94,    0,
      184,   98,   99,  119,   93,  184,   91,   92,   95,   96,
       97,    0,    0,   93,  100,    0,   98,   99,   94,  100,
       95,   96,   97,   95,    0,  101,    0,  102,   98,   99,
      101,  103,  102,    0,  100,  105,  103,    0,   97,    0,
      105,    0,   96,    0,   98,  101,  100,  102,  104,  106,

        0,  103,    0,  104,  106,  105,  107,  101,    0,  102,
      188,  107,    0,  103,    0,  188,  100,  105,  104,  106,
      108,    0,  101,    0,    0,  108,  107,  109,  103,  105,
      104,  106,  109,  102,  190,  104,    0,  110,  107,  190,
      108,  111,  110,  112,    0,  113,  111,  109,  112,  107,
      113,  114,  108,  193,  106,  195,  114,  110,  193,  109,
      195,  111,  199,  112,    0,  113,    0,  199,  108,  110,
        0,  114,  109,  111,    0,  112,  204,  113,  120,  120,
      120,  204,  209,  114,    0,    0,  141,  209,  111,  113,
      120,  141,  112,  114,  110,  131,  131,  131,  131,  131,

      132,  132,  132,  132,  132,    0,  141,    0,  142,    0,
      144,    0,  132,  142,  132,  144,  132,  211,  141,  218,
      220,    0,  211,    0,  218,  220,  143,  132,  142,  132,
      144,  143,    0,    0,  132,  134,  134,  134,  134,  134,
      142,    0,  144,  145,    0,  146,  143,  134,  145,  134,
      146,  134,  143,    0,  147,  225,  148,    0,  143,  147,
      225,  148,  134,  145,  134,  146,  233,  149,  237,  134,
        0,  233,  149,  237,  147,  145,  148,  146,  150,    0,
      152,    0,    0,  150,  151,  152,  147,  149,  148,  151,
        0,    0,    0,  147,  145,  152,  151,  151,  150,  149,

      152,    0,  153,  149,  151,    0,  148,  153,    0,  154,
      150,    0,  152,  150,  154,  155,  151,    0,  156,  157,
      155,    0,  153,  156,  157,  158,  159,    0,  160,  154,
      158,  159,  161,  160,  153,  155,    0,  161,  156,  157,
        0,  154,    0,  153,    0,  158,  159,  155,  160,  162,
      156,  157,  161,    0,  162,    0,  163,  158,  159,    0,
      160,  163,  156,  164,  161,  165,  239,  166,  164,  162,
      165,  239,  166,  159,  172,  241,  163,  247,  160,  172,
      241,  162,  247,  164,  175,  165,    0,  166,  163,  175,
        0,  178,    0,    0,  172,  164,  178,  165,  164,  166,

      179,  162,  180,    0,  175,  179,  172,  180,  163,  181,
        0,  178,  249,  253,  181,  166,  175,  249,  253,  182,
      179,    0,  180,  178,  182,  183,  186,    0,  187,  181,
      183,  186,  179,  187,  180,    0,  175,  255,  257,  182,
      186,  181,  255,  257,  192,  183,  186,  180,  187,  192,
      197,  182,    0,  182,    0,  197,    0,  183,  186,  183,
      187,  181,    0,  198,  192,    0,  201,  203,  198,  202,
      197,  201,  203,    0,  202,    0,  192,    0,    0,    0,
      206,    0,  197,  198,  202,  206,  201,  203,  208,  202,
        0,  214,    0,  208,    0,  198,  214,    0,  201,  203,

      206,  202,  197,    0,  203,  201,    0,    0,  208,  213,
        0,  214,  206,  215,  213,  198,    0,  216,  215,  217,
      208,    0,  216,  214,  217,    0,  222,  223,    0,  213,
      206,  222,  223,  215,    0,  224,    0,  216,  208,  217,
      224,  213,    0,    0,    0,  215,  222,  223,  213,  216,
        0,  217,  227,    0,    0,  224,  228,  227,  222,  223,
      229,  228,    0,  231,    0,  229,  227,  224,  231,  232,
        0,  215,  227,  235,  232,  216,  228,  236,  235,    0,
      229,    0,  236,  231,  227,    0,  243,    0,  228,  232,
        0,  243,  229,  235,  244,  231,    0,  236,    0,  244,

      228,  232,    0,  245,    0,  235,  243,    0,  245,  236,
        0,  251,  229,    0,  244,    0,  251,  252,  243,  260,
      261,    0,  252,  245,  260,  261,  244,    0,    0,    0,
      235,  251,    0,    0,  236,  245,    0,  252,    0,  260,
      261,    0,    0,  251,    0,    0,    0,    0,    0,  252,
        0,  260,  261,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,  251,    0,    0,
        0,    0,    0,  252,  263,  263,  263,  263,  263,  263,
      263,  264,  264,  264,  264,  264,  264,  264,  265,  265,
      265,  265,  265,  265,  265,  266,  266,  266,  266,  266,

      266,  266,  267,  267,  267,  267,  267,  267,  267,  268,
      268,  268,  268,  269,  269,  269,  269,  269,  269,  269,
      270,    0,    0,    0,  270,  270,  270,  271,  271,  271,
      271,  271,  271,  271,  272,  272,  272,  272,  272,  272,
      272,  273,  273,    0,  273,  273,  273,  273,  275,  275,
      262,  262,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  262,  262,  262,  262,  262,  262,  262,

      262,  262,  262,  262,  262,  262,  262,  262,  262,  262,
      262,  262,  262,  262
    } ;

extern int yy_flex_debug;
int yy_flex_debug = 0;

static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
static char *yy_full_match;
static int yy_lp;
static int yy_looking_for_trail_begin = 0;
static int yy_full_lp;
static int *yy_full_state;
#define YY_TRAILING_MASK 0x2000
#define YY_TRAILING_HEAD_MASK 0x4000
#define REJECT \
{ \
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
(yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
(yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
++(yy_lp); \
goto find_rule; \
}

#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
#line 2 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
  /* Everything from here to closing brace is placed at top of lexer */

  /* Purpose: Token generator for ncap parser */

  /* Copyright (C) 1995--2013 Charlie Zender
     
   License: 3-Clause BSD License
   The full license text is at http://www.gnu.org/copyleft/gpl.html 
   and in the file nco/doc/LICENSE in the NCO source distribution.
   
   You are permitted to link NCO with the HDF, netCDF, OPeNDAP, and UDUnits
   libraries and to distribute the resulting executables under the terms 
   of the BSD, but in addition obeying the extra stipulations of the 
   HDF, netCDF, OPeNDAP, and UDUnits licenses.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
   See the 3-Clause BSD License for more details.
   
   The original author of this software, Charlie Zender, seeks to improve
   it with your suggestions, contributions, bug-reports, and patches.
   Please contact the NCO project at http://nco.sf.net or write to
   Charlie Zender
   Department of Earth System Science
   University of California, Irvine
   Irvine, CA 92697-3100 */

  /* Example lexers:
     /data/zender/ora/lexyacc/ch3-05.l
     GCC lexer is hard-coded in C for speed, but is easy to read:
     ../src/gcc-3.x.x/c-lex.c
     Unidata ${DATA}/tmp/netcdf-3.5.1-beta10/src/ncgen/ncgen.l */

  /* Usage:
     scp ~/nco/src/nco/ncap_lex.l goldhill.cgd.ucar.edu:nco/src/nco
     scp ~/nco/src/nco/ncap_lex.l krein.math.uci.edu:nco/src/nco

     flex --stdout ~/nco/src/nco/ncap_lex.l > ~/nco/src/nco/ncap_lex.c
     flex --header-file=${HOME}/nco/src/nco/ncap_lex.h --stdout ~/nco/src/nco/ncap_lex.l > ~/nco/src/nco/ncap_lex.c
     NB: flex with -Cf or -CF not -I if this scanner will not be interactive */

  /* Standard header files */
#include <assert.h> /* assert() debugging macro */
#include <limits.h> /* Integer representation, INT_MIN, INT_MAX... */
#include <math.h> /* sin cos cos sin 3.14159 */
#include <stdio.h> /* stderr, FILE, NULL, etc. */
#include <stdlib.h> /* abs, getopt, malloc, strtol */
#include <string.h> /* strdup */

  /* 3rd party vendors */
#include <netcdf.h> /* netCDF definitions and C library */
#include "nco_netcdf.h" /* NCO wrappers for netCDF C library */

  /* Headers specific to this program */
#include "ncap_utl.h" /* netCDF arithmetic processor-specific definitions (symbol table, ...) */
  //#include "ncap_yacc.h" /* Symbol definitions from parser */

  /* We want yylex() errors to skip current line rather than stop execution
     We do this by provoking error in parser by returning unrecognized token
     This causes parser to read up to next ';'
     To avoid having two error messages we prefix error message to yyerror with '#'
     This causes yyerror to print current error and skip next error
     fxm: Hackish, but I see no other way */ 

/* NCO prototypes yylex() in three separate places---Ensure that all prototypes agree!
   The alternative, prototyping yylex() once in ncap.h, requires YY*STYPE (ncap_yacc.h) too
   That is unappealing since we want ncap.h segregable from parser and scanner dependencies
   (Asterisks inserted into token names in comments so that cpp does not expand token)
   1. Top of ncap_lex.l via YY*DECL token
      Define YY*DECL token so yylex() accepts re-entrant arguments (Flex p. 12, Bison p. 60) 
      Use YY*DECL on line following its definition to make prototype visible in ncap_lex.c
      This quiets a compiler warning
   2. Top of ncap_yacc.y via YY*DECL token
      Required to quiet compiler warning (see additional comments in ncap_yacc.y)
   3. In ncap_lex.l ncap_ntl_scn() declaration
      Required for ncap_ntl_scn() call to yylex() (additional comments in ncap_ntl_scn()) */

#define YY_DECL int yylex(YYSTYPE *lval_ptr,prs_sct *prs_arg)
  YY_DECL;

#if (defined(__GNUC__) || defined(__INTEL_COMPILER)) && !defined(__PATHCC__) && !defined(PGI_CC) && (defined(ENABLE_DEBUG_CUSTOM) || defined(ENABLE_OPTIMIZE_CUSTOM))
  /* CEWI fxm 20040110 Prototype functions that cause warnings with pedantic GCC compiling
     Portability of this entire section is questionable, so enclose in ifdef GCC
     We already assume lexer is Flex since AT&T lex does not understand <EOF> rules
     Thus prototyping following Flex-specific functions adds no additional assumptions
     See also 20040112 thread in comp.compilers */
  /* Implicit declaration warnings: -D_POSIX_SOURCE also avoids fileno warning */
  int fileno(FILE *); /* fixes: warning: implicit declaration of function `fileno', -D_POSIX_SOURCE also avoids this warning */
  /* int yy_flex_realloc(void *,size_t); *//* fixes: warning: implicit declaration of function `yy_flex_realloc'. Is this obsolete? Other versions of flex on Linux seem to want void * yy_flex_realloc(void *,size_t), which actually makes more sense given that it is a realloc() function */
  /* 20050318: Fedora Core 2 flex 2.5.4 gcc 3.4.2 This prototype causes 
     error: conflicting types for 'yy_flex_realloc' */
  /* Missing prototypes warnings: Triggered by -Wmissing-prototypes */
  FILE *yyget_in(void); /* fixes: warning: no previous prototype for `yyget_in' */
  FILE *yyget_out(void); /* fixes: warning: no previous prototype for `yyget_out' */
  char *yyget_text(void); /* fixes: warning: no previous prototype for `yyget_text' */
  int yyget_debug(void); /* fixes: warning: no previous prototype for `yyget_debug' */
  /* 20150115: MacOSX with clang and --enable-debug-custom fails on yyget_leng() prototype
     Change return type of yyget_leng() from int to yy_size_t */
  /* int yyget_leng(void); *//* fixes: warning: no previous prototype for `yyget_leng' */
  /* 20161116: Debian (e.g., glace) NCO build fails in ncap_lex.l due to conflicting types for `yyget_leng'. Debian wants yy_size_t yyget_leng(void); */
  /* 20170804: Fedora (e.g., skyglow) NCO build fails in ncap_lex.l due to conflicting types for `yyget_leng'. Fedora wants int yyget_leng(void); */
  /* 20180907: Daniel Neumann reports (https://sourceforge.net/p/nco/discussion/9829/thread/d3ecc062) that NCO build fails in ncap_lex.l due to conflicting types for `yyget_leng'. After thorough investigation he determined that
        "All variables and functions, which are decalred as yy_size_t in the flex-2.6.0-generated code, are of type int in the flex-2.6.4-generated code. No variable or function is declared as the type yy_size_t in the code generated by flex 2.6.4. Therefore, the definitions of variables and functions which were generated by flex (2.6.4) and which should be of type yy_size_t conflict with the hard-coded definitions copied from ncap_lex.l.
        The error is only thrown in combination with --enable-optimize-custom or --enable-debug-custom because only then the conflicting hard-coded definitions are considered by the compiler/preprocessor (#if ... && (defined(ENABLE_DEBUG_CUSTOM) || defined(ENABLE_OPTIMIZE_CUSTOM)) ...)." 
     Once all platforms upgrade to Flex >= 2.6.4 we can deprecate yy_size_t code
     However, MacOSX may never upgrade to newer Flex
     CZ's decision is to keep current behavior until breakage cannot be ignored and then sacrifice buildability on older Flex */
  yy_size_t yyget_leng(void); /* fixes: warning: no previous prototype for `yyget_leng' */
  int yyget_lineno(void); /* fixes: warning: no previous prototype for `yyget_lineno' */
  int yylex_destroy(void); /* fixes: warning: no previous prototype for `yylex_destroy' */
  void yyset_debug(int bdebug); /* fixes: warning: no previous prototype for `yyset_debug' */
  void yyset_in(FILE *in_str); /* fixes: warning: no previous prototype for `yyset_in' */
  void yyset_lineno(int line_number); /* fixes: warning: no previous prototype for `yyset_lineno' */
  void yyset_out(FILE *out_str); /* fixes: warning: no previous prototype for `yyset_out' */
#endif /* !__GNUC__ */

  /* Global variables */
  extern size_t ncap_ncl_dpt_crr; /* [nbr] Depth of current #include file (declared in ncap.c) */
  extern size_t *ncap_ln_nbr_crr; /* [cnt] Line number (declared in ncap.c) */
  extern char **ncap_fl_spt_glb; /* [fl] Script file (declared in ncap.c) */

  /* File scope variables */
  /* fxm: turn arbitrary size into pre-processor token */
  char ncap_err_sng[200]; /* [sng] Buffer for error string */

  /* Is lexer on left or right hand side of equals sign?
     LHS should contain only a variable or attribute
     In this case return variable/attribute name to parser
     If on RHS then return attribute value or variable structure
     Initialize to false, change to true if token is '=', false is token is ';' */
  static nco_bool RHS=False; /* [flg] Is lexer on RHS of '=' sign? */

  /* Headers necessary for INCLUDE state */
#define NCO_MAX_NCL_DPT 10
  YY_BUFFER_STATE ncl_stk[NCO_MAX_NCL_DPT]; /* Include stack */
#line 1234 "ncap_lex.c"
/* %x defines exclusive start states <stt>
   Once state <stt> is active, other rules do not match until initial state is restored
   NB: State names may not contain hyphens
   CCOMMENT: Handle C comments LMB92 p. 172, p. 43
   INCLUDE: Read in #include file (from example in flex manpage)
   DMN_LST: Dimension list
   LHS_SUBSCRIPT: Left Hand Side subscripts (currently LHS casting)
   RHS_SUBSCRIPT: Right Hand Side subscripts (currently not used) */

/* Definitions:  LMB92 p. 153
   Definitions are named regular expressions, e.g., DGT [0-9]
   Definitions enclosed in braces in rules section, e.g. {DGT}, are interpreted literally
   DGT [0-9] Digit
   LPH [A-Za-z_] Alphabetic character
   LPHDGT [A-Za-z0-9_] Alphanumeric character
   XPN [eE][+-]?[0-9]+ Real number Exponent */
/* Following sections after %% are lexer rules
   Each rule is regular expression followed by C-code for action
   If token matches regular expression then C-code is executed */
#line 1254 "ncap_lex.c"

#define INITIAL 0
#define CCOMMENT 1
#define DMN_LST 2
#define INCLUDE 3
#define LHS_SUBSCRIPT 4
#define RHS_SUBSCRIPT 5

#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

        /* Create the reject buffer large enough to save one state per allowed character. */
        if ( ! (yy_state_buf) )
            (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  );
            if ( ! (yy_state_buf) )
                YY_FATAL_ERROR( "out of dynamic memory in yylex()" );

		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 166 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"


#line 1485 "ncap_lex.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_state_ptr) = (yy_state_buf);
		*(yy_state_ptr)++ = yy_current_state;

yy_match:
		do
			{
			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*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 >= 263 )
					yy_c = yy_meta[yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
			*(yy_state_ptr)++ = yy_current_state;
			++yy_cp;
			}
		while ( yy_base[yy_current_state] != 1051 );

yy_find_action:
		yy_current_state = *--(yy_state_ptr);
		(yy_lp) = yy_accept[yy_current_state];
find_rule: /* we branch to this label when backing up */
		for ( ; ; ) /* until we find what rule we matched */
			{
			if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
				{
				yy_act = yy_acclist[(yy_lp)];
				if ( yy_act & YY_TRAILING_HEAD_MASK ||
				     (yy_looking_for_trail_begin) )
					{
					if ( yy_act == (yy_looking_for_trail_begin) )
						{
						(yy_looking_for_trail_begin) = 0;
						yy_act &= ~YY_TRAILING_HEAD_MASK;
						break;
						}
					}
				else if ( yy_act & YY_TRAILING_MASK )
					{
					(yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
					(yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
					}
				else
					{
					(yy_full_match) = yy_cp;
					(yy_full_state) = (yy_state_ptr);
					(yy_full_lp) = (yy_lp);
					break;
					}
				++(yy_lp);
				goto find_rule;
				}
			--yy_cp;
			yy_current_state = *--(yy_state_ptr);
			(yy_lp) = 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 1:
YY_RULE_SETUP
#line 168 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* INCLUDE is exclusive start state for obtaining #include filename */
  BEGIN INCLUDE;
} /* end include */
	YY_BREAK
case 2:
YY_RULE_SETUP
#line 172 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
/* Eat whitespace */
	YY_BREAK
case 3:
YY_RULE_SETUP
#line 173 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* Get include file name */
  if(ncap_ncl_dpt_crr >= NCO_MAX_NCL_DPT){
    (void)fprintf(stderr,"%s: ERROR File %s nesting depth of %lu is too deep",nco_prg_nm_get(),yytext,(unsigned long)ncap_ncl_dpt_crr);
    nco_exit(EXIT_FAILURE);
  } /* endif */
  if(nco_dbg_lvl_get() > 1) (void)fprintf(stderr,"%s: INFO Will descend from file %s at nesting depth %lu to #include'd file %s at depth %lu\n",nco_prg_nm_get(),ncap_fl_spt_glb[ncap_ncl_dpt_crr],(unsigned long)ncap_ncl_dpt_crr,yytext,(unsigned long)ncap_ncl_dpt_crr+1UL);
  /* Put current input buffer on stack */
  ncl_stk[ncap_ncl_dpt_crr]=YY_CURRENT_BUFFER; 
  /* Increment nesting level */
  ncap_ncl_dpt_crr++;
  /* Allocate another entry in line counter array */
  ncap_ln_nbr_crr=(size_t *)nco_realloc(ncap_ln_nbr_crr,ncap_ncl_dpt_crr+1UL); 
  /* Initialize line number counter for new file */
  ncap_ln_nbr_crr[ncap_ncl_dpt_crr]=1UL;
  /* Store file name for diagnostics */
  ncap_fl_spt_glb=(char **)nco_realloc(ncap_fl_spt_glb,ncap_ncl_dpt_crr+1UL); 
  ncap_fl_spt_glb[ncap_ncl_dpt_crr]=(char *)strdup(yytext);
  if((yyin=fopen(ncap_fl_spt_glb[ncap_ncl_dpt_crr],"r")) == NULL){
    (void)fprintf(stderr,"%s: ERROR Unable to open script file %s\n",nco_prg_nm_get(),ncap_fl_spt_glb[ncap_ncl_dpt_crr]);
    nco_exit(EXIT_FAILURE);
  } /* endif error */

  /* Create new scanner input buffer for include file and switch to it
     Current start conditions remains active in new input buffer */
  nco_yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE));
  /* Return to default state, known as INITIAL state or 0 state LMB92 p. 43 */    
  BEGIN INITIAL;
} /* end enter #include file */
	YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(CCOMMENT):
case YY_STATE_EOF(DMN_LST):
case YY_STATE_EOF(INCLUDE):
case YY_STATE_EOF(LHS_SUBSCRIPT):
case YY_STATE_EOF(RHS_SUBSCRIPT):
#line 203 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* NB: AT&T lex does not appear to have <EOF> rules */
  nco_bool NCO_SCRIPT_WITH_EOF_IS_TOPLEVEL=True;
  /* Emerge from #include file if nested, else exit lexer */
  if(ncap_ncl_dpt_crr > 0UL){
    /* If we are exiting a #include'd script, delete its buffers */
    NCO_SCRIPT_WITH_EOF_IS_TOPLEVEL=False; /* [flg] */
    if(nco_dbg_lvl_get() > 1) (void)fprintf(stderr,"%s: DEBUG Found EOF, emerging from file %s at nesting depth %lu to file %s at depth %lu\n",nco_prg_nm_get(),ncap_fl_spt_glb[ncap_ncl_dpt_crr],(unsigned long)ncap_ncl_dpt_crr,ncap_fl_spt_glb[ncap_ncl_dpt_crr-1],(unsigned long)ncap_ncl_dpt_crr-1UL);
    ncap_fl_spt_glb[ncap_ncl_dpt_crr]=(char *)nco_free(ncap_fl_spt_glb[ncap_ncl_dpt_crr]);
    /* Decrement depth of nesting */
    ncap_ncl_dpt_crr--; 
    /* De-allocate entry from line counter array */
    ncap_ln_nbr_crr=(size_t *)nco_realloc(ncap_ln_nbr_crr,ncap_ncl_dpt_crr+1UL); 
    /* De-allocate entry from script name array */
    ncap_fl_spt_glb=(char **)nco_realloc(ncap_fl_spt_glb,ncap_ncl_dpt_crr+1UL); 
  } /* endif #include'd script */
  if(NCO_SCRIPT_WITH_EOF_IS_TOPLEVEL){
    /* Emerged from zeroth level, exit lexer */
    yyterminate();
  }else{
    /* Reclaim storage used by buffer just exited */
    yy_delete_buffer(YY_CURRENT_BUFFER);
    /* Switch back to parent buffer */
    nco_yy_switch_to_buffer(ncl_stk[ncap_ncl_dpt_crr]);
  } /* endelse */
} /* end <EOF> */
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 230 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
   /* CCOMMENT is exclusive start state for C comments LMB92 p. 172
      When CCOMMENT state is active, only CCOMMENT rules will match 
      (hence an "exclusive start state" rather than "regular start state")
      Thus must (re)-define line number incrementing */
  BEGIN CCOMMENT;
}
	YY_BREAK
case 5:
/* rule 5 can match eol */
YY_RULE_SETUP
#line 237 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* Throw away comment text but increment line counter */
  ncap_ln_nbr_crr[ncap_ncl_dpt_crr]++; 
}
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 241 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* Throw away everything except end comment text */
}
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 244 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* Return to default state, known as INITIAL state or 0 state LMB92 p. 43 */
  BEGIN INITIAL;
} /* end CCOMMENT start state rules */
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 249 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* Dimension list */
  if(nco_dbg_lvl_get() > 0) (void)fprintf(stderr,"Entering DMN_LST with %s\n",yytext);

  BEGIN DMN_LST;

  return IGNORE; 
} /* End dimension list */
	YY_BREAK
case 9:
/* rule 9 can match eol */
YY_RULE_SETUP
#line 257 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
/* Eat whitespace */
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 258 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  if(nco_dbg_lvl_get() > 0) (void)fprintf(stderr,"Exiting DMN_LST with %s\n",yytext);

  /* Return to default state, known as INITIAL state or 0 state LMB92 p. 43 */    
  BEGIN INITIAL;
} /* End dimension list */
	YY_BREAK
case 11:
/* rule 11 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 2);
(yy_c_buf_p) = yy_cp -= 2;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 264 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
/*<DMN_LST>{LPH}{LPHDGT}*[ \t\n]*[,]?[ \t\n]* {*/
  /* Recognize dimension lists */
  if(nco_dbg_lvl_get() > 0) (void)fprintf(stderr,"Lexing dimension list %s\n",yytext);

  /* Valid subscripts must contain alphanumeric string */
  if(yyleng < 3) goto end_dmn_lst;
     
 end_dmn_lst: /* Errors encountered during LHS processing jump to here */
  /* Return to default state, known as INITIAL state or 0 state LMB92 p. 43 */    
  BEGIN INITIAL;
} /* end dimension list */
	YY_BREAK
case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
#line 277 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ 
  /* NB: Remaining rules are default state, also known as INITIAL state, or 0 state */
  /* Ignore new lines */
  ncap_ln_nbr_crr[ncap_ncl_dpt_crr]++;
}
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 283 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ 
  /* Eat spaces and tabs */
}
	YY_BREAK
case 14:
YY_RULE_SETUP
#line 287 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* Enable C++ comments */
}
	YY_BREAK
case 15:
/* rule 15 can match eol */
YY_RULE_SETUP
#line 291 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* Process quoted strings */
  char *bfr;
                
  bfr=(char*)nco_malloc(yyleng*sizeof(char));
  strcpy(bfr,&yytext[1]);
  bfr[yyleng-2]='\0';
  
  /* Replace C-language escape codes with actual byte values */
  (void)sng_ascii_trn(bfr);
  lval_ptr->sng=strdup(bfr);
  bfr=(char*)nco_free(bfr);
  if(nco_dbg_lvl_get() > 3){
    (void)fprintf(stderr,"Lexing string: %s\n",yytext);
    (void)fprintf(stderr,"Made   string: %s\n",lval_ptr->sng);
  } /* endif */
  return SNG;
} /* end quoted strings */
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 310 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* double or long double */
  /* {DGT}*\.{DGT}*({XPN})?[LlDd]?|{DGT}*({XPN})[LlDd]? # Original rule and comments used until 20140527
     NB: Tempted to prepend lexer expressions for floats and doubles with [+-]? 
     so that unary plus/minus is handled in lexer rather than parser.
     However, this has unintended side-effects so let parser handle it for now */
  /* 20140527: Many years after writing the above line I regret not recording what those unintended side-effects were...
     [+-]?{DGT}*\.{DGT}*({XPN})?[LlDd]?|{DGT}*({XPN})[LlDd]? # Potential rule tested 20140527
     Not including sign signifiers [+-]? causes bug parsing --mask_condition expressions with negative msk_val
     Without the optional signage, ncap_ncwa_scn() ignores unary negative sign so msk_val is returned as abs(msk_val)
     Prepending [+-]? to number rules for doubles, floats etc fixes this particular problem but causes others
     Specifically, when lexer ingests signage tokens then parser treatment of subtraction fails, e.g.,
     ncap -O -D 4 -v -s 'zero=1-1.0' ~/nco/data/in.nc ~/foo.nc # Result is zero=1 
     Hence the "unintended side-effects" mentioned above includes, roughly, 
     that using [+-]? in lexer interferes with parser handling of unary signs */
  char *sng_cnv_rcd=NULL_CEWI; /* [sng] strtol()/strtoul() return code */
  if(nco_dbg_lvl_get() > 3) (void)fprintf(stderr,"Lexing a double %s\n",yytext); 
  lval_ptr->scv.val.d=strtod(yytext,&sng_cnv_rcd);
  if(*sng_cnv_rcd) nco_sng_cnv_err(yytext,"strtod",sng_cnv_rcd);
  lval_ptr->scv.type=NC_DOUBLE;
  return SCV;
} /* end double or long double */
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 333 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* float */
  float float_tkn;
  if(nco_dbg_lvl_get() > 3) (void)fprintf(stderr,"Lexing a float %s\n",yytext); 
  if(sscanf((char *)yytext,"%e",&float_tkn) != 1){
    sprintf(ncap_err_sng,"#Bad float: %s",yytext);
    nco_yyerror(prs_arg,ncap_err_sng);
    return EPROVOKE;
  } /* endif */
  lval_ptr->scv.val.f=float_tkn;
  lval_ptr->scv.type=NC_FLOAT;
  return SCV;
} /* end float */
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 347 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* int64 */
  nco_int64 int64_tkn;
  if(nco_dbg_lvl_get() > 3) (void)fprintf(stderr,"Lexing an int64 %s\n",yytext); 
  if(sscanf((char *)yytext,"%lli",&int64_tkn) != 1){
    sprintf(ncap_err_sng,"Bad int64 constant: %s",(char *)yytext);
    nco_yyerror(prs_arg,ncap_err_sng);
  } /* endif err */
  lval_ptr->scv.val.i=int64_tkn;
  lval_ptr->scv.type=NC_INT64;
  return SCV;
} /* end int64 */
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 360 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* uint64 */
  nco_uint64 uint64_tkn;
  if(nco_dbg_lvl_get() > 3) (void)fprintf(stderr,"Lexing a uint64 %s\n",yytext); 
  if(sscanf((char *)yytext,"%llu",&uint64_tkn) != 1){
    sprintf(ncap_err_sng,"Bad uint64 constant: %s",(char *)yytext);
    nco_yyerror(prs_arg,ncap_err_sng);
  } /* endif err */
  lval_ptr->scv.val.i=uint64_tkn;
  lval_ptr->scv.type=NC_UINT64;
  return SCV;
} /* end uint64 */
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 373 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* int */
  nco_int int_tkn;
  if(nco_dbg_lvl_get() > 3) (void)fprintf(stderr,"Lexing an int %s\n",yytext); 
  /* NB: Format depends on opaque type of nco_int
     Until 200911, nco_int was C-type long, and now nco_int is C-type int
     if(sscanf((char *)yytext,"%li",&int_tkn) != 1){ */
  if(sscanf((char *)yytext,"%i",&int_tkn) != 1){
    sprintf(ncap_err_sng,"Bad int constant: %s",(char *)yytext);
    nco_yyerror(prs_arg,ncap_err_sng);
  } /* endif err */
  lval_ptr->scv.val.i=int_tkn;
  lval_ptr->scv.type=NC_INT;
  return SCV;
} /* end int */
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 389 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* uint */
  nco_uint uint_tkn;
  if(nco_dbg_lvl_get() > 3) (void)fprintf(stderr,"Lexing a uint %s\n",yytext); 
  if(sscanf((char *)yytext,"%u",&uint_tkn) != 1){
    sprintf(ncap_err_sng,"Bad uint constant: %s",(char *)yytext);
    nco_yyerror(prs_arg,ncap_err_sng);
  } /* endif err */
  lval_ptr->scv.val.ui=uint_tkn;
  lval_ptr->scv.type=NC_UINT;
  return SCV;
} /* end uint */
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 402 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* short */
  nco_short short_tkn;
  if(nco_dbg_lvl_get() > 3) (void)fprintf(stderr,"Lexing a short %s\n",yytext); 	
  if(sscanf((char *)yytext,"%hi",&short_tkn) != 1){
    sprintf(ncap_err_sng,"Bad short constant: %s",(char *)yytext);
    nco_yyerror(prs_arg,ncap_err_sng);
  } /* endif err */
  lval_ptr->scv.val.s=short_tkn;
  lval_ptr->scv.type=NC_SHORT;
  return SCV;
} /* end short */
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 415 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* ushort */
  nco_ushort short_tkn;
  if(nco_dbg_lvl_get() > 3) (void)fprintf(stderr,"Lexing a ushort %s\n",yytext); 	
  if(sscanf((char *)yytext,"%hu",&short_tkn) != 1){
    sprintf(ncap_err_sng,"Bad short constant: %s",(char *)yytext);
    nco_yyerror(prs_arg,ncap_err_sng);
  } /* endif err */
  lval_ptr->scv.val.s=short_tkn;
  lval_ptr->scv.type=NC_USHORT;
  return SCV;
} /* end short */
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 428 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* byte */
  nco_byte byte_tkn;
  if(nco_dbg_lvl_get() > 3) (void)fprintf(stderr,"Lexing a byte %s\n",yytext); 
  if(sscanf((char *)yytext,"%hhi",&byte_tkn) != 1){
    sprintf(ncap_err_sng,"#Bad byte: %s",yytext);
    nco_yyerror(prs_arg,ncap_err_sng);
    return EPROVOKE;
  } /* endif err */
  lval_ptr->scv.val.b=byte_tkn;
  lval_ptr->scv.type=NC_BYTE;
  return SCV;                    
} /* end byte */
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 442 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* ubyte */
  nco_ubyte ubyte_tkn;
  if(nco_dbg_lvl_get() > 3) (void)fprintf(stderr,"Lexing a ubyte %s\n",yytext); 
  if(sscanf((char *)yytext,"%hhu",&ubyte_tkn) != 1){
    sprintf(ncap_err_sng,"#Bad byte: %s",yytext);
    nco_yyerror(prs_arg,ncap_err_sng);
    return EPROVOKE;
  } /* endif err */
  lval_ptr->scv.val.ub=ubyte_tkn;
  lval_ptr->scv.type=NC_UBYTE;
  return SCV;                    
} /* end ubyte */
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 456 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{return ABS;} /* Strategy for lexing control statements: 
1. Look for language control statements (if, while, do, for)
2. Look for NCO-defined intrinsic functions (abs, pack, unpack)
3. Look for mathematical intrinsic functions (sin, cos)
4. Look for NCO-defined named constants (M_PI, M_E) */
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 461 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{return IF;}
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 462 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{return PRINT;}
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 464 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{return ABS;} /* TOKEN whitespace (: Token followed any amount of whitespace followed by opening parenthesis signifies function name, not variable name.
This disambiguates variable and functional namespaces.

Dimension reducing functions (min,max,avg,ttl) need thought
Each function should allow specification of optional dimension list, e.g., 
foo=avg(var,(/lat,lon/)); should return mean T over lat,lon dimensions

Certain functions, however, have binary versions, e.g., 
foo=min(var_1,var_2); should return point-wise minimum values

Dimension lists require syntax like (/.../) to disambiguate meanings like
foo=min(lat,lat)

End result:
foo=min(lat) Returns minimum value of lat
foo=min(lat,(/lat/)) Returns minimum value of lat
foo=min(lat,lat) Returns copy of lat (i.e., pointwise minimum of lat and lat)
foo=min(var,(/dmn_1,dmn_2/)) Returns minimum of variable over dmn_1, dmn_2 dimensions */
	YY_BREAK
case 30:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 482 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{return ABS;}
	YY_BREAK
case 31:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 6;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 483 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{return ATOSTR;}
	YY_BREAK
case 32:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 484 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{prs_arg->nco_op_typ=nco_op_avg;return RDC;}
	YY_BREAK
case 33:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 485 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{prs_arg->nco_op_typ=nco_op_min;return RDC;}
	YY_BREAK
case 34:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 486 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{prs_arg->nco_op_typ=nco_op_max;return RDC;}
	YY_BREAK
case 35:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 487 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{prs_arg->nco_op_typ=nco_op_ttl;return RDC;}
	YY_BREAK
case 36:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 488 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{return PACK;}
	YY_BREAK
case 37:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 4;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 489 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{return PACK;}
	YY_BREAK
case 38:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 490 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{return POWER;}
	YY_BREAK
case 39:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 491 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{return UNPACK;}
	YY_BREAK
case 40:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 6;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 492 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{return UNPACK;}
	YY_BREAK
case 41:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 5;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 493 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ lval_ptr->cnv_type = NC_FLOAT;return CNV_TYPE;} 
	YY_BREAK
case 42:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 6;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 494 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ lval_ptr->cnv_type = NC_DOUBLE;return CNV_TYPE;} 
	YY_BREAK
case 43:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 4;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 495 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ lval_ptr->cnv_type = NC_INT;return CNV_TYPE;} 
	YY_BREAK
case 44:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 3;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 496 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ lval_ptr->cnv_type = NC_INT;return CNV_TYPE;} 
	YY_BREAK
case 45:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 5;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 497 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ lval_ptr->cnv_type = NC_SHORT;return CNV_TYPE;} 
	YY_BREAK
case 46:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 6;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 498 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ lval_ptr->cnv_type = NC_USHORT;return CNV_TYPE;} 
	YY_BREAK
case 47:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 4;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 499 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ lval_ptr->cnv_type = NC_UINT;return CNV_TYPE;} 
	YY_BREAK
case 48:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 5;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 500 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ lval_ptr->cnv_type = NC_INT64;return CNV_TYPE;} 
	YY_BREAK
case 49:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 6;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 501 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ lval_ptr->cnv_type = NC_UINT64;return CNV_TYPE;} 
	YY_BREAK
case 50:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 5;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 502 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ lval_ptr->cnv_type = NC_UBYTE;return CNV_TYPE;} 
	YY_BREAK
case 51:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 4;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 503 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ lval_ptr->cnv_type = NC_BYTE;return CNV_TYPE;} 
	YY_BREAK
case 52:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp = yy_bp + 4;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 504 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ lval_ptr->cnv_type = NC_CHAR;return CNV_TYPE;} 
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 506 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{return NAMED_CONSTANT;}
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 508 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
/* Compare input with mathematical function names in table and return
   pointer to structure containing name, double function, float function */
   int idx;
   for(idx=0;idx<prs_arg->sym_tbl_nbr;idx++)
     if(!strcmp(yytext,(prs_arg->sym_tbl[idx]->nm))){ 
        lval_ptr->sym=prs_arg->sym_tbl[idx];
        return FUNCTION;
     } /* endif */
   (void)sprintf(ncap_err_sng,"Warning: Unable to locate function %s. Perhaps %s is a variable?",yytext,yytext);
   (void)nco_yyerror(prs_arg,ncap_err_sng);       
   return EPROVOKE;             
} /* end functions */
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 522 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ 
  /* Recognize variable attributes, e.g., var_nm@att_nm */
  aed_sct *ptr_aed;
  char *amp_ptr;
  char att_nm[NC_MAX_NAME];
  char var_nm[NC_MAX_NAME];
  int rcd=NC_NOERR;
  int rcd_out;
  int var_id;
  long att_sz;
  nc_type type;
  ptr_unn val;
  size_t sng_lng;
  nco_bool blkp;
  var_sct var_lkp; /* for us when calling lookup vars on first pass only */
  
  if(nco_dbg_lvl_get() > 3) (void)fprintf(stderr,"Lexing attribute %s\n",yytext);
  amp_ptr=strchr(yytext,'@');
  sng_lng=amp_ptr-yytext;
  
  strncpy(var_nm,yytext,sng_lng);
  var_nm[sng_lng]='\0';
  
  strcpy(att_nm,++amp_ptr);
  
  var_lkp.nm=var_nm; 

  /* Assume global attribute when variable name is "global" */
  if(!strcmp(var_nm,"global")) var_id=NC_GLOBAL; else rcd=nco_inq_varid_flg(prs_arg->in_id,var_nm,&var_id);
  
  /* We are on RHS so return value of attribute (if available) to parser
     During initial scan, just return attributes on RHS 
  if(prs_arg->ntl_scn){
    if(!RHS){
      lval_ptr->aed.att_nm=(char *)strdup(att_nm);
      lval_ptr->aed.var_nm=(char *)strdup(var_nm);
      return OUT_ATT;
    }else{
      return IGNORE;
    } 
  } 
  */  

  if(RHS){
    /* First check if attribute has already been saved in symbol table
       If so then obtain and return value, else check input file
       If attribute is present obtain and return value from disk else return NC_BYTE of value 0
       If attribute is NC_CHAR then return SNG type
       Other types (NC_FLOAT, NC_DOUBLE, NC_BYTE, NC_SHORT) return SCV */
    ptr_aed=ncap_aed_lookup(var_nm,att_nm,prs_arg,False);
    if(ptr_aed){
      if(ptr_aed->type == NC_CHAR){
	(void)cast_void_nctype(ptr_aed->type,&ptr_aed->val);
	lval_ptr->sng=(char *)nco_malloc((ptr_aed->sz+1)*nco_typ_lng(NC_CHAR));
	strncpy(lval_ptr->sng,(char *)(ptr_aed->val.cp),(size_t)(ptr_aed->sz));
	lval_ptr->sng[ptr_aed->sz]='\0';
	return SNG;
      }else{
	lval_ptr->scv=ptr_unn_2_scv(ptr_aed->type,ptr_aed->val);
	return SCV;  
      } /* end else */        
    } /* end if */
    if(rcd == NC_NOERR){  
      rcd=nco_inq_att_flg(prs_arg->in_id,var_id,att_nm,&type,&att_sz);
      if (rcd == NC_ENOTATT){
	(void)sprintf(ncap_err_sng,"Warning: Unable to locate RHS attribute %s of variable %s with var ID = %d in file %s. Returning 0-byte.",att_nm,var_nm,var_id,prs_arg->fl_in);
	(void)nco_yyerror(prs_arg,ncap_err_sng);
	lval_ptr->scv.val.b=0;
	lval_ptr->scv.type=NC_BYTE;
	return SCV;
      } /* end if */
      if(rcd == NC_NOERR){ 
	val.vp=(void *)nco_malloc(att_sz*nco_typ_lng(type));
	rcd=nco_get_att(prs_arg->in_id,var_id,att_nm,val.vp,type);
	if(type == NC_CHAR){
	  (void)cast_void_nctype(type,&val);
	  lval_ptr->sng=(char *)nco_malloc((att_sz+1)*sizeof(char));
	  strncpy(lval_ptr->sng,(char *)val.cp,(size_t)att_sz);
	  lval_ptr->sng[att_sz]='\0';;
          val.vp=(void*)nco_free(val.vp); 
	  return SNG;
	}else{
	  lval_ptr->scv=ptr_unn_2_scv(type,val);
	  val.vp=(void*)nco_free(val.vp); 
	  return SCV;   
	} /* end else */ 
      } /* end if */
    }else{ /* ...else rcd reported an error */
      /* Attribute is not in table or on disk so return 0-byte  */
      (void)sprintf(ncap_err_sng,"Warning: Unable to locate RHS attribute %s of variable %s with var ID = %d in file %s. Returning 0-byte.",att_nm,var_nm,var_id,prs_arg->fl_in);
      (void)nco_yyerror(prs_arg,ncap_err_sng);
      lval_ptr->scv.val.b=0;
      lval_ptr->scv.type=NC_BYTE;
      return SCV;
    } /* end if */
  }/* end if RHS */
  
  /* We are on LHS so simply save information for later processing by parser
     Atrribute is valid if its associated variable is in input or output file */
  if(!RHS){

    if(prs_arg->ntl_scn) 
      blkp= ( ncap_var_lookup(&var_lkp,prs_arg,False) !=NULL) ;
    else blkp=False;

    rcd_out=nco_inq_varid_flg(prs_arg->out_id,var_nm,&var_id);

    if(rcd == NC_NOERR || rcd_out == NC_NOERR || blkp ){
      lval_ptr->aed.att_nm=(char *)strdup(att_nm);
      lval_ptr->aed.var_nm=(char *)strdup(var_nm);
      return OUT_ATT;
    }else{
      (void)sprintf(ncap_err_sng,"#Warning: unable to locate variable %s. So cannot create attribute %s",var_nm,yytext);
      (void)nco_yyerror(prs_arg,ncap_err_sng);
      return EPROVOKE; 
    } /* end else */
  } /* end if */
  
} /* End scalar values. Phew! */
	YY_BREAK
case 56:
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 642 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* Recognize variables with subscripts */
  if(nco_dbg_lvl_get() > 3) (void)fprintf(stderr,"Lexing variable with subscripts %s\n",yytext);
  if(RHS){
    lval_ptr->var_nm_RHS=(char *)strdup(yytext);
    BEGIN RHS_SUBSCRIPT;
    return VAR;
  }else{ 
    lval_ptr->var_nm_LHS=(char *)strdup(yytext);
    BEGIN LHS_SUBSCRIPT;
    return OUT_VAR;
  } /* end else */
} /* end variables with subscripts */
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 656 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* Recognize plain variables */
  if(nco_dbg_lvl_get() > 3) (void)fprintf(stderr,"Lexing variable %s\n",yytext);
  if(RHS){
    /* fxm mmr: memory leak since var_nm_RHS is never free()'d */
    lval_ptr->var_nm_RHS=(char *)strdup(yytext); 
    return VAR;
  }else{ 
    lval_ptr->var_nm_LHS=(char *)strdup(yytext);
    return OUT_VAR;
  } /* end else */
} /* end variables without subscripts */
	YY_BREAK
case 58:
/* rule 58 can match eol */
YY_RULE_SETUP
#line 669 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* fxm: allow whitespace in dimension list */
  /* Recognize subscripted (hyperslabbed) variables
     Hyperslabbed variables for now indicated with square brackets
     Using square brackets so development does not break functions
     Left context is described in LMB92 p. 152
     
     Subscript syntax is taken from Fortran9X specification:
     x[dmn1,dmn2,...,dmnN]
     x[a:b,c:,:d,e] */
  const char * const sbs_dlm=","; /* [sng] Subscript delimiter */
  static const char * const tpl_nm="Internally generated template";
  
  char **sbs_lst; /* [sng] Array of dimension subscripts */
  char *sbs_sng; /* [sng] Subscript */
  
  int dmn_nbr; /* [nbr] Number of dimensions */
  int idx; /* [idx] Counter */
  int jdx; /* [idx] Counter */
  
  double val=1.0; /* [frc] Value of template */
  
  var_sct *var; /* [sct] Variable */
  
  dmn_sct **dmn; /* [dmn] Dimension structure list */
  dmn_sct *dmn_item;
  dmn_sct **dmn_new;

  /* Valid subscripts must contain alphanumeric string */
  if(nco_dbg_lvl_get() > 2) (void)fprintf(stderr,"Interpreting %s as LHS_SUBSCRIPT\n",yytext);
  if(yyleng < 3) goto end_LHS_sbs;

  /* if(prs_arg->ntl_scn) goto end_LHS_sbs; */  
  /* Copy token into user memory and turn into list of dimension names */
  sbs_sng=(char *)nco_malloc(yyleng*sizeof(char));
  strcpy(sbs_sng,&yytext[1]);
  sbs_sng[yyleng-2]='\0';  
  sbs_lst=nco_lst_prs_2D(sbs_sng,sbs_dlm,&dmn_nbr);

  dmn=(dmn_sct **)nco_malloc(dmn_nbr*sizeof(dmn_sct *));
  (void)nco_redef(prs_arg->out_id);
  for(idx=0;idx<dmn_nbr;idx++){
    /* first seach for dimension in psr_arg->dmn_out */
    for(jdx=0;jdx<*(prs_arg->nbr_dmn_out);jdx++){
      dmn_item=(*(prs_arg->dmn_out))[jdx];
      if(!strcmp(sbs_lst[idx],dmn_item->nm)){
      dmn[idx]=dmn_item;
      break;
      } /* endif */
    } /* end loop over jdx */
   if(jdx != *(prs_arg->nbr_dmn_out)) continue;   
    /* then try seach for dimension in prs_arg->dmn_in */
   for (jdx=0;jdx<prs_arg->nbr_dmn_in;jdx++){
     dmn_item = prs_arg->dmn_in[jdx];
     /* If found add dimension to dmn_out and dmn */
     if(!strcmp(sbs_lst[idx],dmn_item->nm)){
       /* BEWARE -- nco_dmn_out_grow() increments *(prs_arg->nbr_dmn_out) */
       dmn_new = nco_dmn_out_grow(prs_arg); 
       *dmn_new=nco_dmn_dpl(dmn_item);
       (void)nco_dmn_xrf(*dmn_new,dmn_item);
       /* write found  dimension to output  */
       (void)nco_dmn_dfn(prs_arg->fl_out,prs_arg->out_id,dmn_new,1);
       dmn[idx]=*dmn_new;
       break;
     } /* endif */
   } /* end loop over jdx */

   if(jdx != prs_arg->nbr_dmn_in) continue;
   /* Exit action if dimension not found */
   (void)sprintf(ncap_err_sng,"Warning: Unrecognized dimension \"%s\" in LHS subscripts",sbs_lst[idx]);
   (void)nco_yyerror(prs_arg,ncap_err_sng);
   (void)nco_enddef(prs_arg->out_id);
   goto end_LHS_sbs;                     
  } /* endif */
  (void)nco_enddef(prs_arg->out_id);

  /* Check that un-limited dimension is first dimension */
  for(idx=1;idx<dmn_nbr;idx++)
    if(dmn[idx]->is_rec_dmn){
      (void)sprintf(ncap_err_sng,"Warning:\"%s\" is the record dimension. It can only be the first dimension in a list",dmn[idx]->nm);
      (void)nco_yyerror(prs_arg,ncap_err_sng);
      goto end_LHS_sbs;                     
    } /* endif */

  /* Create template variable to cast all RHS expressions */
  var=(var_sct *)nco_malloc(sizeof(var_sct));
  
  /* Set defaults */
  (void)var_dfl_set(var); /* [fnc] Set defaults for each member of variable structure */
  /* Overwrite with LHS information */
  /* fxm mmr: memory leak with var->nm */
  var->nm=(char *)strdup(tpl_nm);
  var->type=NC_DOUBLE;
  var->nbr_dim=dmn_nbr;
  var->dim=dmn;
  /* Allocate space for dimension structures */
  if(var->nbr_dim > 0) var->dmn_id=(int *)nco_malloc(var->nbr_dim*sizeof(int)); else var->dmn_id=(int *)NULL;
  if(var->nbr_dim > 0) var->cnt=(long *)nco_malloc(var->nbr_dim*sizeof(long)); else var->cnt=(long *)NULL;
  if(var->nbr_dim > 0) var->srt=(long *)nco_malloc(var->nbr_dim*sizeof(long)); else var->srt=(long *)NULL;
  if(var->nbr_dim > 0) var->end=(long *)nco_malloc(var->nbr_dim*sizeof(long)); else var->end=(long *)NULL;
  if(var->nbr_dim > 0) var->srd=(long *)nco_malloc(var->nbr_dim*sizeof(long)); else var->srd=(long *)NULL;
  
  /* Defensive programming */
  var->sz=1L; 
  /* Attach LHS dimensions to variable */
  for(idx=0;idx<dmn_nbr;idx++){
    var->dim[idx]=dmn[idx];
    var->dmn_id[idx]=dmn[idx]->id;
    var->cnt[idx]=dmn[idx]->cnt;
    var->srt[idx]=dmn[idx]->srt;
    var->end[idx]=dmn[idx]->end;
    var->srd[idx]=dmn[idx]->srd;
    var->sz*=var->cnt[idx];
  } /* end loop over dim */
  
  /* Do not initialize val in initial scan */
  if(prs_arg->ntl_scn) {
    var->val.vp=(void*)NULL;
    goto end_var;
  }
  
  /* Allocate space for variable values 
     fxm: more efficient and safer to use nco_calloc() and not fill with values? */
  if((var->val.vp=(void *)nco_malloc_flg(var->sz*nco_typ_lng(var->type))) == NULL){
    (void)fprintf(stderr,"%s: ERROR Unable to malloc() %ld*%lu bytes for var_LHS() in lexer\n",nco_prg_nm_get(),var->sz,(unsigned long)nco_typ_lng(var->type));
    nco_exit(EXIT_FAILURE); 
  } /* end if */
  
  /* Copy arbitrary value into variable 
     Placing a uniform value in variable should be unnecessary since variable
     is intended for use solely as dimensional template for nco_var_cnf_dmn() 
     Nevertheless, copy 1.0 into value for safety */
  { /* Change scope to define convenience variables which reduce de-referencing */
    long var_sz; /* [nbr] Number of elements in variable */
    size_t var_typ_sz; /* [B] Size of single element of variable */
    char *var_val_cp; /* [ptr] Pointer to values */
    
    var_sz=var->sz; /* [nbr] Number of elements in variable */
    var_typ_sz=nco_typ_lng(var->type);
    var_val_cp=(char *)var->val.vp;
    for(idx=0;idx<var_sz;idx++) (void)memcpy(var_val_cp+idx,(void *)(&val),var_typ_sz);
  } /* end scope */
 end_var:

  /* Link variable into yylex() argument for use in parser */
  prs_arg->var_LHS=var;
  
  if(nco_dbg_lvl_get() > 2) (void)fprintf(stderr,"%s: Lexer creating LHS cast template: Template var->nm %s, var->nbr_dim %d, var->sz %li\n",nco_prg_nm_get(),prs_arg->var_LHS->nm,prs_arg->var_LHS->nbr_dim,prs_arg->var_LHS->sz);
  
  if(0){ /* Remove some compiler warning messages CEWI */
    /* Following two statements remove "defined but not used" messages in ncap_lex.c (lex.yy.c) */
    (void)yyunput((int)0,(char *)NULL);
    /*    (void)yy_flex_realloc((void *)NULL,(size_t)NULL);*/
    /* Remove warnings which only occur on SGI IRIX cc */
    yy_full_match=yy_full_match+0;
    yy_full_lp=yy_full_lp+0;
    yy_full_state=yy_full_state+0;
  } /* endif False */
  
  /* Free dimension list memory */
  (void)nco_free(sbs_sng); 
  /* char list */
  if(dmn_nbr > 0) sbs_lst=nco_sng_lst_free(sbs_lst,dmn_nbr);
   
 end_LHS_sbs: /* Errors encountered during LHS processing jump to here */
  /* Return to default state, known as INITIAL state or 0 state LMB92 p. 43 */    
  BEGIN INITIAL;
} /* end LHS subscripted variables */
	YY_BREAK
case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
#line 838 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* RHS_SUBSCRIPT */
  (void)sprintf(ncap_err_sng,"Warning RHS subscripts are not yet implemented");
  (void)nco_yyerror(prs_arg,ncap_err_sng);
  /* Return to default state, known as INITIAL state or 0 state LMB92 p. 43 */    
  BEGIN INITIAL;
} /* end RHS_SUBSCRIPT */
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 846 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ /* And */
  return AND;
} /* end && */
	YY_BREAK
case 61:
YY_RULE_SETUP
#line 849 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ /* Or */
  return OR;
} /* end || */
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 852 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ /* Comparison equals */
  lval_ptr->nco_rlt_opr=nco_op_eq;
  return COMPARISON;
} /* end == */
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 856 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ /* Comparison not equals */
  lval_ptr->nco_rlt_opr=nco_op_ne;
  return COMPARISON;
} /* end != */
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 860 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ /* Comparison less than or equal to */
  lval_ptr->nco_rlt_opr=nco_op_le;
  return COMPARISON;
} /* end <= */
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 864 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ /* Comparison greater than or equal to */
  lval_ptr->nco_rlt_opr=nco_op_ge;
  return COMPARISON;
} /* end >= */
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 868 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ /* Comparison less than */
  lval_ptr->nco_rlt_opr=nco_op_lt;
  return COMPARISON;
} /* end < */
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 872 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ /* Comparison greater than */
  lval_ptr->nco_rlt_opr=nco_op_gt;
  return COMPARISON;
} /* end > */
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 877 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* Equals assignment */
  RHS=True; 
  return yytext[0];
} /* end equals */
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 883 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{ 
  /* semi-colon indicates end-of-statement */
  RHS=False;
  return yytext[0]; 
} /* end semi-colon */
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 889 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
{
  /* Everything not parsed by above falls through to here */
  if(nco_dbg_lvl_get() > 5) (void)fprintf(stderr,"%s: Following token reached last lexer rule: %s\n",nco_prg_nm_get(),yytext);
  return yytext[0];
} /* end trickle down */
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 895 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"
ECHO;
	YY_BREAK
#line 2637 "ncap_lex.c"

	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. */

			YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );

			}

		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);

	(yy_state_ptr) = (yy_state_buf);
	*(yy_state_ptr)++ = yy_current_state;

	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);
		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 >= 263 )
				yy_c = yy_meta[yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
		*(yy_state_ptr)++ = yy_current_state;
		}

	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;
    
	YY_CHAR yy_c = 1;
	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 >= 263 )
			yy_c = yy_meta[yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
	yy_is_jam = (yy_current_state == 262);
	if ( ! yy_is_jam )
		*(yy_state_ptr)++ = yy_current_state;

		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;

    (yy_state_buf) = 0;
    (yy_state_ptr) = 0;
    (yy_full_match) = 0;
    (yy_lp) = 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;

    yyfree ( (yy_state_buf) );
    (yy_state_buf)  = 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 895 "/pub/devel/nco/nco-5.0.3-1.i686/src/nco-5.0.3/src/nco/ncap_lex.l"


/* Begin user functions section */
int /* fxm: 20060217 Change to int from bool to work with g++ */
yywrap(void)
{
  /* Purpose: Routine to replace library-defined yywrap() 
     yywrap() is called when YY_INPUT returns EOF, e.g., at end of script
     Returning false (zero) means there is more to scan, and input has
     been redirected to new source, e.g., yyin points to new file. 
     Returning true (non-zero) means scanning is complete, so scanner terminates and returns 0 to calling function
     Default is to return true (one) when called---this terminates scanner */
  if(nco_dbg_lvl_get() >= 3) (void)fprintf(stderr,"%s: DEBUG yywrap() called with ncap_ncl_dpt_crr = %lu\n",nco_prg_nm_get(),(unsigned long)ncap_ncl_dpt_crr);
  /* comp.compilers thread 20020523 yywrap() should always return 1, even when
     scanning a #include'd file
     return (ncap_ncl_dpt_crr <= 1) ? 1 : 0; */
  return 1;
} /* end yywrap() */


int /* O [enm] Return code */ 
ncap_ncwa_scn /* [fnc] Scan command script, construct I/O lists */
(prs_sct * const prs_arg, /* I/O [sct] Global information required in parser routines */
 const char * const msk_sng, /* I [sng] User-specified script */
 char **msk_nm, /* O [sng] Masking variable name */
 double *msk_val, /* O [frc] Masking value */ 
 int *op_typ_rlt) /* O [enm] Relational operator type */ 
{   
  /* Get YYSTYPE prior to calling scanner */
  /*
    #include "ncap_yacc.h" 
    extern int yylex(YYSTYPE *lval_ptr,prs_sct *prs_arg); 
    extern int yy_scan_string(const char *); */
  
  nco_bool scv_dfn=False;
  nco_bool minus_dfn=False;
  int op_typ=-1;
  int rcd=NCO_NOERR;
  char *fnl_sng;
  char *msk_nm_LHS=NULL;
  scv_sct scv_out;
  
  int tkn_crr=-1; /* [tkn] Current token, must initialize to non-zero value */
  
  YYSTYPE lval; /* [tkn] Token */
  
  fnl_sng=(char *)nco_malloc((strlen(msk_sng)+3UL)*sizeof(char));
  
  (void)strcpy(fnl_sng,msk_sng);
  (void)strcat(fnl_sng,";\n");
  
  yy_scan_string(fnl_sng);
  
  /* While there are more tokens... */
  while(tkn_crr != 0){
    /* ...obtain next token from lexer... */
    tkn_crr=yylex(&lval,prs_arg);
    
    /* ...determine which variables and attributes exist in input file... */
    switch(tkn_crr){
    case OUT_VAR:
      msk_nm_LHS=strdup(lval.var_nm_LHS);
      break;
    case COMPARISON:
      op_typ=lval.nco_rlt_opr;
      break;
    case '-':
      minus_dfn=True;
      break; 
    case SCV:	
      scv_out=lval.scv;
      if (minus_dfn) (void)ncap_scv_minus(&scv_out); 
      scv_dfn=True;
      break;
    default: 
      /* Tokens that fall through are perfectly safe and normal
	 Tokens values 1--256 are ASCII characters, values > 256 defined in yy.tab.h */
      if(nco_dbg_lvl_get() >= 5) (void)fprintf(stderr,"%s: DEBUG Token type %d not handled in ncap_ntl_scn()\n",nco_prg_nm_get(),tkn_crr);
      
      /* Assume single '=' means '==' if op_typ is not defined */
      if(tkn_crr == '=' && op_typ == -1) op_typ=nco_op_eq;
      break;
    } /* end switch */
  } /* end while */
  
  /* Check that all three required items for an ncwa mask_condition have been scanned */
  if(msk_nm_LHS == (char *)NULL){
    (void)fprintf(stderr,"%s: Mask string (%s) does not contain valid variable name\n",nco_prg_nm_get(),msk_sng);
    rcd=NCO_ERR;
  }else{
    *msk_nm=msk_nm_LHS;
  } /* endif */
  if(op_typ == -1){
    (void)fprintf(stderr,"%s: Mask string (%s) does not contain valid comparison operator\n",nco_prg_nm_get(),msk_sng);
    rcd=NCO_ERR;
  }else{
    *op_typ_rlt=op_typ;
  } /* endif */
  if(scv_dfn == False){
    (void)fprintf(stderr,"%s: Mask string (%s) does not contain valid number\n",nco_prg_nm_get(),msk_sng);
    rcd=NCO_ERR;
  }else{ 
    (void)nco_scv_cnf_typ((nc_type)NC_DOUBLE,&scv_out);
    *msk_val=scv_out.val.d;
  } /* endif */
  
  return rcd;
  
} /* end ncap_ncwa_scn() */







