#line 1 "scanner.c"

#line 3 "scanner.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#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

/* 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 &&(!defined(_MSC_VER) || _MSC_VER >= 1800)

/* 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 115
#define YY_END_OF_BUFFER 116
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
static const flex_int16_t yy_accept[830] =
    {   0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
      116,  110,    7,   38,   13,  101,   33,   34,  105,  106,
      107,  100,  104,   35,  102,   39,  108,  103,  109,   95,
       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
       95,   95,   95,   95,   95,   95,   95,   95,   38,    9,
      106,   43,  107,  100,   35,  106,   48,  107,   35,  112,
       38,   39,  112,   38,  112,  114,   38,  113,   39,   38,
      114,   38,   99,   37,    0,  100,    0,   35,   95,   39,
       96,   98,   97,   95,   95,    0,    0,    0,   95,   95,
       95,   95,   95,   95,   95,   95,   95,    0,    0,    0,

       95,    0,    0,   95,   95,   16,   95,   95,   95,    0,
       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
        0,    0,    0,    0,    0,    0,    9,    9,    9,    9,
        9,    9,    9,    0,   37,   43,   42,   35,    0,   37,
       47,   46,   35,  112,  111,  112,  112,  112,  112,  112,
      113,    0,    0,    0,    0,    0,   36,   95,    0,    0,
       26,   29,    0,   25,    0,    0,   95,   95,   95,   95,
       95,   95,   95,   95,    0,   24,   32,    0,   23,   95,
        0,   22,    0,   21,   95,   95,   95,   95,    0,   95,
        0,    0,   30,    0,   95,   10,   95,   95,   95,   95,

       95,   95,   95,   95,    0,   15,   31,    0,   14,    0,
       20,    0,   19,    9,    9,    9,    9,    9,    9,    0,
       36,   47,    0,   36,  112,  112,  112,  112,  112,    0,
        0,    0,    0,    0,   95,    0,    0,    0,    0,   28,
        0,   27,    0,    0,   82,   95,   95,   95,   95,   95,
       95,   95,   95,   95,   95,   95,    0,    0,    0,    0,
       18,    0,   17,    0,    0,    0,    0,   95,   95,   95,
       95,   95,   95,   95,   95,   95,   95,    9,    9,    9,
        9,    9,    9,    0,    0,   40,    0,    0,   44,  112,
      112,  112,  112,  112,    0,    0,    0,    0,    0,   95,

        0,    0,    0,    0,    0,    0,   95,   95,   95,   95,
        0,   95,   95,   95,   95,    0,    0,   95,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,   95,   95,   95,   95,   95,    0,   95,    0,    0,
        0,    9,    9,    9,    9,    9,    9,    9,   41,   45,
      112,  112,  112,  112,  112,  112,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,   95,
        0,    0,   95,    0,   95,   95,   95,   95,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,

       95,   95,    0,    0,   95,    0,   95,    0,    0,    0,
        0,    0,    0,    9,    9,    9,    9,    9,    9,    9,
        9,  112,  112,  112,  112,  112,  112,    0,    0,    0,
        0,    0,    0,    0,    0,   79,    0,   64,    0,    0,
        0,    0,    0,   95,    0,   95,   95,   95,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,   95,   11,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    9,    9,    9,    8,
        9,    9,    9,  112,  112,  112,  112,  112,  112,    0,

        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,   95,    0,    0,   95,    0,   12,    0,   84,   84,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
       85,    0,   78,    0,   81,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,   95,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        9,    2,    9,    3,    9,    1,    8,    9,    9,    9,
        6,  112,    0,  112,    0,  112,    0,  112,  112,  112,
        0,    0,    0,   92,    0,    0,    0,    0,    0,   95,
       61,    0,   95,   52,    0,    0,    0,    0,    0,    0,

        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,   80,    0,    0,
        0,    0,    0,   94,    0,    0,    0,    0,    0,    9,
        4,    9,  112,    0,  112,    0,    0,   66,    0,    0,
        0,   95,    0,    0,    0,    0,    0,   93,    0,   60,
       60,    0,    0,   63,    0,   69,    0,    0,    0,    0,
        0,    0,    0,   75,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,   86,    9,    5,  112,    0,
        0,    0,    0,    0,   95,    0,    0,    0,    0,    0,
        0,    0,   67,    0,   70,    0,    0,   73,    0,    0,

        0,    0,    0,    0,    0,    0,    0,    0,   72,    0,
        0,    0,    0,    0,    0,    0,   49,    0,    0,    0,
        0,    0,    0,    0,    0,    0,   83,   83,    0,    0,
        0,    0,   55,   56,    0,    0,    0,    0,    0,    0,
        0,   50,   54,    0,    0,   58,   58,    0,   65,   68,
        0,    0,    0,    0,   77,    0,   76,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,   59,   59,
        0,   74,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,   71,   51,   53,
       62,    0,    0,    0,    0,    0,    0,    0,    0,    0,

        0,   57,   57,    0,    0,    0,    0,    0,    0,    0,
       90,    0,    0,    0,    0,    0,    0,    0,   91,    0,
        0,    0,   89,    0,    0,   87,    0,   88,    0
    } ;

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

       53,   54,   55,   56,   57,   31,   58,   59,   60,   61,
       62,   63,   64,   65,   66,   67,   68,   69,   70,   71,
       72,   73,    1,    1,    1,    1,    1,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,

       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
       74,   74,   74,   74,   74
    } ;

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

static const flex_int16_t yy_base[872] =
    {   0,
        0,   72,   67,   79,   85,   97,   85,  102,  159,  233,
     1445, 2729, 2729, 1440, 2729, 2729, 2729, 2729, 1431, 1424,
     1423,  109, 2729,   73, 2729, 1420,   96, 2729, 1368,  145,
      139,   81,  295,   86,  143,  198,  140,  252,  251,  214,
      168,  170,  267,   93,  247,  255,  266,  213,  121,  345,
      117, 1327,  121,  318,  176,  102,  124,  188,  277,    0,
     1331, 1314,   79,  145,  338, 2729, 1275,    0, 1259,  152,
      377, 1270, 2729, 1256,  192,  314,  184,  215,  253, 1251,
     2729, 2729, 2729,  306,  373, 1254, 1203, 1206,  332,  310,
      369,  370,  375,  395,  293,  379,  383, 1203,    0, 1196,

      382, 1192, 1138,  409,  420, 2729,  402,  451,  452, 1127,
      459,  432,  428,  461,  447,  279,  454,  477,  469,  465,
     1122,    0, 1118, 1107, 1101,  499,    0,  242,  316,  314,
      371,  229,  440, 1091,  199, 1085,  488,  475, 1072,  334,
     1075,  500,  524,    0,    0,  490,  493,  498,  233,  496,
        0,  503,  503,  517,  465,  517,  541,  532,  565, 1030,
     2729, 1003, 1007, 2729, 1000,  987,  590,  598,  547,  569,
      561,  565,  573,  585,  976, 2729,    0,  899, 2729,  606,
      899, 2729,  895, 2729,  592,  609,  610,  618,  649,  666,
      890,  881,  869,  713,  643,  629,  628,  647,  673,  676,

      670,  659,  674,  684,  880, 2729,    0,  862, 2729,  860,
     2729,  841, 2729,  519,  525,  515,  607,  537,  628,  730,
      690,  821,  632,  738,  612,  663,  661,  702,  676,  705,
      706,  710,  708,  711,  734,  716,  723,  726,  824, 2729,
      820, 2729,  778,  756, 2729,  743,  752,  750,  804,  782,
      788,  776,  790,  808,  841,  848,  742,  748,  906,  821,
     2729,  807, 2729,  797,  786,  765,  810,  845,  832,  849,
      834,  857,  874,  866,  913,  917,  931,  872,  832,  820,
      845,  839,  877,  272,  767,  335,  349,  761,  482,  901,
      894,  897,  906,  911,  912,  915,  928,  917,  921,  973,

      917,  935,  925,  927,  927,  931,  976,  995,  997,  979,
      999,  992,  980,  999, 1003, 1036, 1050, 1023, 1058,  975,
      990,  996, 1039, 1020, 1030, 1012, 1034, 1042, 1019, 1041,
     1031, 1069, 1067, 1117, 1121, 1079, 1134, 1118, 1139, 1146,
     1159, 1056, 1066, 1059,  206, 1078, 1111, 1110,  756,  748,
     1114, 1109, 1126, 1119, 1124, 1124, 1135, 1136, 1143, 1146,
     1149, 1147, 1203, 1150, 1220, 1223, 1228, 1157, 1162,  376,
     1241, 1245, 1197, 1163, 1226, 1236, 1239, 1248, 1216, 1180,
     1235, 1277, 1228, 1248, 1249, 1254, 1302, 1258, 1231, 1262,
     1266, 1259, 1304, 1283, 1265, 1293, 1293, 1280, 1284, 1298,

     1312, 1317, 1338, 1350, 1364, 1290,  581, 1305, 1294, 1299,
     1302, 1323, 1318, 1314, 1329, 1328,  707,  432, 1325, 1343,
     1349, 1335, 1346, 1343, 1339, 1356, 1361, 1346, 1357, 1352,
     1348, 1366, 1372, 1377, 1367, 2729, 1370, 2729, 1375, 1380,
     1396, 1380, 1380, 1414, 1389, 1418, 1452, 1455, 1469, 1434,
     1402, 1400, 1408, 1427, 1442, 1444, 1433, 1447, 1481, 1489,
     1507, 1510, 1468, 1470, 1480, 1531, 1446, 1488, 1481, 1489,
     1533, 1500, 1535, 1517, 1556, 1501, 1507, 1561, 1511,  559,
     1518, 1520, 1522, 1517, 1521, 1587,  710,  703,  679,    0,
     1535, 1555,  648, 1592, 1598, 1600, 1548, 1567, 1611,  633,

      625,  624, 1556, 1573,  579, 1618, 1582, 1574, 1584, 1574,
     1583, 1613, 1625, 1601, 1611, 1642,  679, 1655, 1662, 2729,
     1615, 1674, 1605, 1621, 1681, 1608, 1616, 1613, 1637, 1644,
     2729, 1652, 2729, 1635, 2729, 1645, 1648, 1656, 1658, 1659,
     1677, 1707, 1679, 1666, 1732, 1679, 1734, 1737, 1694, 1696,
     1694, 1705, 1756, 1761, 1721, 1715, 1726, 1696, 1729, 1782,
      571, 2729,  563, 2729,  495, 2729,    0,  494, 1735,  485,
     2729, 1763,  432, 1787,  366, 1789,  351, 1794, 1745, 1799,
      346,  272, 1761, 2729, 1767, 1807,  256, 1769, 1784, 1795,
     2729, 1770, 1826, 2729, 1776, 1784, 1833, 1796, 1844, 1778,

     1852, 1786, 1857, 1811, 1865, 1824, 1870, 1800, 1836, 1850,
     1830, 1851, 1852, 1892, 1903, 1856, 1857, 2729, 1850, 1865,
     1875, 1866, 1863, 2729, 1887, 1878, 1892, 1881, 1930,  228,
     2729,  227, 1932,  219, 1937,  212, 1886, 2729, 1888, 1894,
     1897, 1934, 1895, 1950, 1963, 1921, 1908, 2729, 1916, 1974,
     2729, 1976, 1923, 2729, 1993, 2729, 1932,  172, 2000, 1934,
     1946, 1937, 1944, 2729, 1953, 1953, 1966, 1978, 1980, 1967,
     2025, 1989, 1991, 1981, 1983, 2729,  145, 2729, 2044,  137,
     1981, 2002, 1994, 2047, 2054, 1992, 2002, 2051, 2017, 2068,
     2038, 2071, 2729, 2041, 2729, 2048, 2042, 2729, 2048, 2094,

     2041, 2049, 2055, 2116, 2070, 2123, 2136, 2052, 2729, 2064,
     2063, 2070, 2088, 2070, 2081, 2141, 2729, 2144, 2096, 2102,
     2149, 2109, 2162, 2167, 2123, 2125, 2175, 2729, 2180, 2135,
     2187, 2148, 2729, 2729, 2152, 2156, 2154,  125, 2162, 2164,
     2149, 2729, 2729, 2178, 2164, 2206, 2729, 2213, 2729, 2729,
     2183, 2232, 2237, 2194, 2729, 2180, 2729, 2195, 2203, 2201,
      117, 2204, 2217, 2206, 2262, 2218, 2229, 2269, 2280, 2729,
     2226, 2729, 2212, 2288, 2301, 2306, 2314, 2224, 2231, 2225,
     2327, 2232, 2263, 2331, 2261, 2334, 2339, 2729, 2729, 2729,
     2729, 2259, 2277, 2273, 2236, 2352, 2357, 2301, 2324,  114,

     2320, 2371, 2729, 2335, 2376, 2341, 2330, 2393, 2331, 2354,
     2729, 2359, 2364, 2412, 2415, 2358, 2365, 2373, 2729, 2433,
     2366, 2374, 2729, 2438, 2375, 2729, 2441, 2729, 2729, 2460,
     2467, 2471, 2478, 2485, 2489, 2494, 2501, 2508,   80, 2515,
     2522, 2529, 2536,   71, 2543, 2550, 2557, 2564, 2571, 2578,
     2585, 2590, 2595, 2602, 2609, 2616, 2623, 2630, 2637, 2644,
     2651, 2658, 2665, 2672, 2679, 2686, 2693, 2700, 2707, 2714,
     2721
    } ;

static const flex_int16_t yy_def[872] =
    {   0,
      829,    1,    1,    1,    1,    1,  830,  830,  831,  831,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  832,  829,  829,  829,  829,  829,  832,
      832,  832,  832,  832,  832,  832,  832,  832,  832,  832,
      832,  832,  832,  832,  832,  832,  832,  832,  829,  833,
      829,  829,  829,  829,  832,  829,  829,  829,  832,  834,
      829,  829,  834,  829,  834,  829,  829,  835,  829,  829,
      829,  829,  829,  829,  829,  829,  832,  832,  832,  829,
      829,  829,  829,  832,  832,  836,  829,  837,  832,  832,
      832,  832,  832,  832,  832,  832,  832,  838,  839,  840,

      832,  841,  842,  832,  832,  829,  832,  832,  832,  829,
      832,  832,  832,  832,  832,  832,  832,  832,  832,  832,
      843,  844,  845,  846,  847,  829,  833,  833,  833,  833,
      833,  833,  833,  829,  829,  829,  829,  832,  829,  829,
      829,  829,  832,  834,  834,  834,  834,  834,  834,  834,
      835,  829,  829,  829,  829,  829,  832,  832,  829,  836,
      829,  829,  837,  829,  848,  849,  832,  832,  832,  832,
      832,  832,  832,  832,  838,  829,  839,  840,  829,  832,
      841,  829,  842,  829,  832,  832,  832,  832,  829,  832,
      850,  851,  829,  829,  832,  832,  832,  832,  832,  832,

      832,  832,  832,  832,  843,  829,  844,  845,  829,  846,
      829,  847,  829,  833,  833,  833,  833,  833,  833,  829,
      832,  829,  829,  832,  834,  834,  834,  834,  834,  829,
      829,  829,  829,  829,  832,  829,  829,  829,  848,  829,
      849,  829,  829,  832,  829,  832,  832,  832,  832,  832,
      832,  832,  832,  832,  832,  832,  829,  829,  829,  850,
      829,  851,  829,  829,  829,  829,  829,  832,  832,  832,
      832,  832,  832,  832,  832,  832,  832,  833,  833,  833,
      833,  833,  833,  829,  829,  829,  829,  829,  829,  834,
      834,  834,  834,  834,  829,  829,  829,  829,  829,  832,

      829,  829,  829,  829,  829,  829,  832,  832,  832,  832,
      829,  832,  832,  832,  832,  829,  829,  832,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  832,  832,  832,  832,  832,  829,  832,  829,  829,
      829,  833,  833,  833,  833,  833,  833,  833,  829,  829,
      834,  834,  834,  834,  834,  834,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  832,
      829,  829,  832,  829,  832,  832,  832,  832,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,

      832,  832,  829,  829,  832,  829,  832,  829,  829,  829,
      829,  829,  829,  833,  833,  833,  833,  833,  833,  833,
      833,  834,  834,  834,  834,  834,  834,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      832,  829,  829,  832,  829,  832,  832,  832,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  832,  832,  829,  829,  829,  829,  852,
      829,  829,  829,  829,  829,  829,  853,  854,  855,  856,
      833,  833,  857,  858,  859,  860,  834,  834,  861,  862,

      863,  864,  829,  829,  865,  829,  829,  829,  829,  829,
      829,  832,  829,  829,  832,  829,  832,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  832,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      853,  829,  854,  829,  855,  829,  856,  866,  833,  857,
      829,  858,  862,  859,  863,  860,  864,  867,  834,  861,
      865,  868,  829,  829,  829,  829,  829,  829,  829,  832,
      829,  829,  832,  829,  829,  829,  829,  829,  829,  829,

      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  866,
      829,  869,  867,  868,  870,  871,  829,  829,  829,  829,
      829,  832,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  869,  829,  870,  871,
      829,  829,  829,  829,  832,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,

      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,

      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,    0,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829
    } ;

static const flex_int16_t yy_nxt[2804] =
    {   0,
       12,   13,   14,   15,   12,   16,   15,   17,   18,   19,
       20,   12,   21,   22,   23,   24,   25,   26,   27,   28,
       29,   30,   31,   32,   32,   33,   34,   35,   36,   37,
       32,   32,   38,   32,   39,   40,   41,   32,   42,   43,
       44,   45,   32,   46,   47,   32,   48,   12,   30,   31,
       32,   32,   33,   34,   35,   36,   37,   32,   38,   32,
       39,   40,   41,   32,   42,   43,   44,   45,   32,   46,
       47,   32,   48,   32,   49,  207,   50,   51,   52,   53,
       54,   49,   55,   50,  177,   77,   13,   61,   78,   51,
       52,   53,   54,   77,   55,   56,   57,   58,   77,   49,

       59,   50,   62,   13,   64,   77,   65,   56,   57,   58,
       75,   75,   59,  139,   63,   81,   82,  140,  145,   62,
       77,  118,   76,   72,   95,  126,  806,   96,   77,  778,
      134,   63,  135,   77,  134,  141,  135,  762,  678,  142,
       77,   63,   86,   87,  145,   88,  678,   72,  118,  126,
       95,   77,   77,   96,   72,   77,  126,   77,   63,   66,
       13,   67,   66,   66,   66,   66,   66,   66,   66,   66,
       66,   84,   66,   66,  101,   66,   69,   66,   66,   66,
       77,   97,   77,   89,  697,   85,   77,   77,   77,  134,
       77,  138,   77,   75,   75,  114,   77,  113,   84,  139,

      101,   98,   99,  140,  100,   76,   66,   97,  417,   89,
       77,   85,  134,  678,  135,   77,  124,   77,  110,  125,
      631,  418,  114,   77,  113,   77,   77,   77,  678,  631,
      157,   77,   66,   66,   13,   70,   66,   71,   66,   66,
       66,   66,   66,   66,   66,   77,   66,   66,  111,   66,
       69,   66,   66,   66,  106,  102,  112,  106,  103,   77,
       77,   77,   77,   77,   77,   77,  214,   77,  639,  121,
      122,  218,  123,  631,  111,  228,  107,  104,   77,   77,
       66,  105,  112,  119,  120,  285,  108,  286,  139,   77,
      115,   77,  143,  214,   77,  109,  116,  218,   77,   77,

       77,  228,   77,  107,  104,   77,   66,   77,  105,  119,
      117,  120,  108,   77,   77,   75,   75,  115,   77,   75,
       75,  109,   77,  116,   77,  200,   77,   76,  172,   90,
       91,   76,   92,  137,  167,  165,  117,   93,  166,   94,
       77,  215,   77,  216,   77,  139,  158,  571,  285,  140,
      286,  200,  566,   77,  172,   90,   91,   77,   92,  146,
      288,  167,  147,   93,  289,   94,  128,  564,  215,  129,
      216,  148,  158,  149,  159,  159,  150,  130,  131,   77,
      132,   77,   77,  133,  159,   77,  146,   77,  441,  147,
      159,   77,  217,  128,   77,   77,  129,  148,  152,  149,

      170,  153,  150,  130,  131,  168,  132,   77,  174,  133,
      154,  169,  155,  173,   77,  156,   77,   77,  171,  217,
       77,   77,   77,   77,  180,  152,   77,  170,  153,   77,
       77,  168,   77,  562,  490,  174,  154,  169,  155,  173,
       77,  156,   77,  185,   77,  171,  188,  418,  186,   77,
      180,  196,  189,  189,  187,  191,   77,  195,  192,   77,
      194,  194,  189,   77,   77,  219,   77,   77,  189,  185,
      194,   77,  188,   77,  186,   77,  194,   77,  196,   77,
      187,   77,  197,  201,  195,  199,  571,   77,  134,   77,
      221,  190,  219,  288,   77,  631,  566,  289,   77,   77,

      198,   77,  202,  137,  203,  204,   77,  233,   77,  197,
      201,  199,   77,  220,  225,  142,   77,  190,  226,  227,
      152,  229,   77,  153,   77,  223,  198,  230,  231,  202,
      203,  204,  154,  233,  155,  139,   77,  156,  232,  224,
      220,  225,  234,  278,   77,  226,  227,  152,  229,  280,
      153,  279,  223,   77,  230,  231,  157,  235,  154,   77,
      155,  480,  282,  156,  564,  232,  159,  159,  246,  234,
      278,   77,  562,   77,  553,  280,  159,   77,  279,   77,
      571,   77,  159,  480,  235,   77,  248,  236,   77,  282,
      237,  243,  243,   77,   77,  246,  250,   77,  249,  245,

      245,  243,  244,  247,   77,  238,  251,  243,   77,  245,
       77,  245,   77,  248,  236,  245,   77,  237,   77,  253,
       77,   77,   77,  250,  249,  566,  564,  252,   77,  247,
       77,  238,   77,  251,  562,  255,  290,   77,  281,   77,
       77,   77,  287,  288,  287,   77,  253,  289,  254,  571,
      189,  189,  270,   77,  252,   77,   77,   77,  256,   77,
      189,  283,  255,  290,  281,   77,  189,  259,  259,  269,
      257,   77,  271,  258,  254,   77,   77,  259,   77,  270,
      566,  268,   77,  259,  256,   77,   77,  283,   77,  291,
       77,   77,  292,  275,   77,  269,   77,  257,  272,  271,

      258,  273,   77,  134,  564,  221,   77,  268,  276,  294,
      274,  562,  277,   77,  194,  194,  291,   77,  292,  275,
       77,   77,  418,   77,  194,  272,   77,  293,  273,  295,
      194,   77,  296,  298,  276,  294,  274,   77,  264,  277,
      284,  297,  284,  285,  299,  286,   77,  265,  266,  139,
       77,  301,  267,  224,  293,   77,  295,  302,  303,  296,
      298,  304,   77,  350,   77,  264,  320,  297,   77,  321,
      299,  349,  300,  265,  266,  308,  350,  301,  267,  243,
      243,   77,  349,  302,  303,   77,  310,  304,   77,  243,
       77,  307,  309,  320,   77,  243,  321,   77,  300,   77,

       77,  308,   77,   77,  305,  311,  311,  330,  314,  316,
      316,  329,  310,  263,  306,  311,   77,  307,  309,  316,
       77,  311,  312,   77,  261,  316,  242,  240,  313,   77,
      315,  305,  222,  330,  314,   77,  327,   77,  329,  331,
      306,  328,  317,  317,   77,  345,   77,  213,  312,  319,
      319,   77,  317,   77,  313,   77,  315,   77,  317,  319,
       77,   77,  327,  211,  344,  319,  331,  328,  209,   77,
      346,  332,  345,  333,  335,  337,  337,  347,   77,   77,
      318,   77,  336,  206,  193,  337,   77,  263,   77,  338,
      344,  337,   77,  261,  334,   77,   77,  346,  332,  333,

      335,  184,  182,  347,   77,  179,  318,  259,  259,  336,
      342,  343,  348,   77,  339,  339,  338,  259,  340,  340,
      334,   77,  354,  259,  339,   77,  353,  322,  340,   77,
      339,  323,  341,  341,  340,  324,  342,  343,  348,  351,
      352,  325,  341,   77,  355,  326,  356,  359,  341,  354,
      357,  358,  353,  360,  322,  361,  362,  364,  323,  365,
       77,  366,  324,  367,   77,  351,  352,  325,  368,  369,
      355,  326,  356,  359,  363,  363,  357,  358,   77,  176,
      360,  361,  362,  364,  363,   77,  365,  366,   77,  367,
      363,   77,   77,  242,  368,  369,  371,  371,  372,  372,

      311,  311,  370,  240,   77,  376,  371,   77,  372,   77,
      311,   77,  371,  164,  372,   77,  311,  385,  162,  373,
       77,  375,  374,   77,  382,  382,   77,   77,  377,  370,
      386,  378,  376,  161,  382,   77,  387,  316,  316,   77,
      382,  395,   77,  385,   77,  373,   77,  316,  375,  374,
       77,  317,  317,  316,  392,  377,  386,  396,  378,  319,
      319,  317,  387,  398,  393,  397,  399,  317,  395,  319,
       77,  379,  394,  388,  389,  319,  380,  400,  390,   77,
      392,   77,  381,  391,  396,  383,  222,  142,  416,  398,
      393,   77,  397,  399,  384,  414,  136,  379,  394,  388,

      389,  401,  380,  400,  390,  402,  137,  213,  381,  391,
      211,  415,  383,  405,   77,  416,   77,  419,  403,  403,
      384,  414,  404,  404,  209,  206,   77,  401,  403,   77,
       77,  402,  404,   77,  403,  337,  337,  415,  404,  405,
      339,  339,  193,  419,  184,  337,  407,  340,  340,  420,
      339,  337,  421,  422,  423,  424,  339,  340,  425,  406,
      341,  341,  426,  340,   77,   77,  427,  409,   77,  410,
      341,  411,  430,  407,  428,  420,  341,  408,  421,  422,
      423,  429,  424,  412,  425,  431,  406,  432,  426,  433,
      435,  439,  427,  413,  409,  182,  410,  440,  411,  430,

      428,  445,  179,  408,  363,  363,  176,  429,  451,   77,
      412,  431,  164,  432,  363,  433,  435,  439,  162,  413,
      363,  436,  436,  440,  245,  245,  444,  445,  434,  438,
      438,  436,  437,  436,  245,  451,  245,  436,   77,  438,
      245,  438,  371,  371,   77,  438,  372,  372,   77,  449,
      449,   77,  371,  444,  450,  434,  372,  161,  371,  449,
       77,  446,  372,  448,  452,  449,  456,  462,   80,  457,
      458,   74,   72,   77,  447,  459,   80,   72,  382,  382,
      450,  442,  461,   77,  443,  463,   77,  446,  382,  464,
      448,  452,  456,  462,  382,   77,  457,  458,  453,  454,

      447,  465,  459,  460,  460,  466,  466,  442,  467,  461,
      443,  468,  463,  460,  469,  466,  464,  455,  470,  460,
      471,  466,  472,  473,   77,  453,  454,  465,  479,   77,
      481,   80,  482,   72,  483,  467,  484,  468,  136,  403,
      403,  469,  475,  455,  485,  470,  471,  474,  472,  403,
      473,  404,  404,  486,  479,  403,  487,  481,  482,   77,
      483,  404,  484,  488,   77,  478,  478,  404,  489,  475,
      491,  485,  492,  474,  493,  478,   77,  494,  476,  486,
      495,  478,  487,  496,  497,  498,  499,   83,  500,  488,
      477,  501,  502,  503,  489,  504,  491,  505,  510,  492,

      506,  493,  508,  494,  476,  509,  495,  511,   77,  496,
      497,   77,  498,  499,  500,  513,  477,  501,  502,  503,
      514,  507,  504,  523,  505,  510,   77,  506,  508,  516,
       77,  509,  512,  524,  511,  522,  522,   80,   74,   74,
       73,  513,   72,   77,  829,  522,  514,  507,  525,  515,
      523,  522,  517,  518,  518,  516,  519,  519,  512,  524,
      529,   77,  526,  518,   77,   77,  519,   77,  520,  518,
      449,  449,  519,  829,  525,  515,  829,  527,  517,  528,
      449,  530,  531,  531,  541,  829,  449,  529,  526,  536,
      460,  460,  531,  829,  531,  537,  829,  829,  531,   77,

      460,  538,   77,  527,  521,  528,  460,  530,  533,  533,
      541,  535,  535,  542,  532,  829,  536,  543,  533,  534,
      533,  535,  537,  535,  533,  544,  546,  535,  538,   77,
      521,  829,  466,  466,  545,  545,  337,  337,  829,  549,
      542,  532,  466,  543,  545,  550,  337,  556,  466,  552,
      545,  544,  337,  546,  555,  557,  539,  548,  548,  558,
      547,  559,  478,  478,   77,  549,  540,  548,   77,  568,
      326,  550,  478,  548,  556,  552,  829,  829,  478,  569,
      555,  557,  578,  539,  551,  558,  547,  559,  560,  560,
      582,  579,  540,  562,  573,  568,  326,  583,  560,  564,

      575,  566,  577,   77,  560,  585,  569,  586,  578,  573,
      587,  551,  571,  581,  588,  575,  582,  577,  579,  584,
      584,  589,  592,   77,  583,   77,  591,  591,  581,  584,
      829,  584,  585,  586,  590,  584,  591,  587,  591,  601,
      588,  599,  591,  594,  594,  593,  829,  589,  604,  592,
      602,  829,  605,  594,  606,  594,  518,  518,   77,  594,
       77,  590,  607,  597,  597,  601,  518,  608,  599,  829,
      609,  593,  518,  597,  604,  522,  522,  602,  605,  597,
      606,  610,  603,  603,  611,  522,  388,  389,  612,  607,
      595,  522,  603,  598,  608,  596,  609,  390,  603,  600,

      829,  394,  391,  613,  615,  829,  616,  610,  614,  614,
      611,  617,  388,  389,  612,  620,  595,  621,  614,  598,
      829,  596,  829,  390,  614,  628,  600,  394,  391,  622,
      613,  615,  616,  545,  545,  618,  618,  617,  548,  548,
      623,  829,  620,  545,  621,  618,   77,  618,  548,  545,
      629,  618,  628,  625,  548,  622,  626,  624,  624,  627,
      632,  829,  624,  624,  562,  573,  623,  624,  384,  624,
      635,  554,  624,  624,  624,  829,  619,  629,  624,  625,
      573,   77,  626,  560,  560,  627,  636,  632,  564,  575,
      566,  577,  637,  560,  384,  631,  634,  635,  640,  560,

      571,  581,  619,  257,  575,  641,  577,   77,  638,  638,
      643,  634,  646,  636,  645,  649,  581,  829,  638,  637,
      638,  647,  642,  829,  638,  640,  652,  644,  644,  657,
      257,  829,  641,  829,  597,  597,  643,  644,   77,  646,
      645,  649,   77,  644,  597,  648,  648,  829,  647,  642,
      597,  653,  652,  650,  650,  648,  657,  648,  603,  603,
      655,  648,  658,  650,  598,  651,  654,  654,  603,  650,
      660,  656,  656,   77,  603,  659,  654,  653,  654,  454,
      661,  656,  654,  656,  662,  665,  655,  656,  668,  658,
      598,  829,  666,  614,  614,  667,  660,  455,  669,  829,

      670,  671,  659,  614,  664,  664,  454,  661,  672,  614,
      662,  673,  665,  674,  664,  668,  664,  663,  666,  675,
      664,  667,  681,  455,  682,  669,  670,  671,  829,  683,
      684,  676,  676,  631,  634,  672,  686,  673,  678,  680,
      674,  676,  689,  676,  663,  675,   77,  676,  681,  634,
      682,  644,  644,  690,  680,  683,  684,  691,  694,  685,
      829,  644,  686,  699,  688,  688,  696,  644,  829,  689,
      700,  829,  701,  687,  688,  692,  692,  693,  693,  690,
      688,   77,  702,  691,  694,  692,  685,  693,  703,  693,
      699,  692,  696,  693,  695,  695,  704,  700,  701,  705,

      687,  698,  698,  706,  695,  707,  695,  708,  702,  379,
      695,  698,  710,  698,  703,  712,  711,  698,  713,  829,
      829,  714,  704,  715,  829,  705,  709,  709,  716,  829,
      706,  718,  707,  708,  829,  379,  709,  719,  709,  710,
      829,  712,  709,  711,  713,  678,  680,  714,  717,  717,
      715,  721,  688,  688,  716,  245,  245,  718,  717,  722,
      717,  680,  688,  719,  717,  245,   77,  245,  688,  520,
      520,  245,  692,  692,  723,  724,  720,  721,  725,  520,
      829,  520,  692,  726,  729,  520,  722,  730,  692,  731,
      735,  829,  732,  736,  738,  727,  727,  737,  829,  740,

      723,   77,  724,  720,  725,  727,  379,  728,  741,  726,
      729,  727,  829,  730,  829,  731,  735,  618,  618,  732,
      736,  738,  739,  737,  733,  733,  740,  618,  829,  618,
      744,  829,  379,  618,  733,  741,  733,  734,  734,  745,
      733,  748,  742,  742,  751,  743,  743,  734,  739,  734,
      746,  746,  742,  734,  742,  743,  744,  743,  742,  752,
      746,  743,  747,  749,  749,  745,  746,  748,  750,  750,
      756,  751,  829,  749,  765,  749,  753,  753,  750,  749,
      750,  755,  755,  758,  750,  752,  753,  759,  757,  757,
      760,  755,  753,  755,  761,  763,  756,  755,  757,  764,

      757,  765,  766,  829,  757,  767,  754,  768,  768,  758,
      771,  829,  829,  759,  769,  769,  760,  768,  774,  773,
      761,  763,  829,  768,  769,  764,  770,  775,  777,  766,
      769,  767,  754,  772,  772,  776,  779,  771,  753,  753,
      781,  595,  780,  772,  774,  772,  773,  782,  753,  772,
      783,  786,  829,  775,  753,  777,  829,  787,  792,  794,
      793,  776,  779,  245,  245,  801,  781,  595,  754,  780,
      768,  768,  795,  245,  782,  245,  829,  783,  786,  245,
      768,  784,  784,  787,  792,  794,  768,  793,  829,  788,
      788,  784,  801,  829,  754,  796,  797,  784,  795,  788,

      798,  788,  789,  789,  595,  788,  829,  790,  790,  829,
      829,  799,  789,  800,  789,  791,  791,  790,  789,  790,
      785,  796,  797,  790,  829,  791,  798,  791,  644,  644,
      595,  791,  784,  784,  804,  535,  535,  799,  644,  800,
      728,  728,  784,  829,  644,  535,  785,  535,  784,  805,
      728,  535,  728,  802,  802,  807,  728,  810,  770,  770,
      804,  829,  829,  802,  814,  803,  815,  829,  770,  802,
      770,  785,  808,  808,  770,  812,  805,  811,  811,  816,
      817,  807,  808,  813,  810,  818,  829,  811,  808,  811,
      814,  824,  815,  811,  808,  808,  820,  785,  821,  829,

      827,  812,  829,  829,  808,  822,  816,  817,  829,  813,
      808,  809,  818,  819,  819,  825,  803,  803,  824,  829,
      829,  829,  820,  819,  821,  819,  803,  827,  803,  819,
      829,  822,  803,  809,  823,  823,  829,  809,  829,  826,
      826,  825,  828,  828,  823,  829,  823,  829,  829,  826,
      823,  826,  828,  829,  828,  826,  829,  829,  828,  809,
       60,   60,   60,   60,   60,   60,   60,   68,   68,   68,
       68,   68,   68,   68,   79,   79,  829,   79,  127,  829,
      127,  127,  127,  127,  127,  144,  829,  829,  144,  144,
      829,  144,  151,  151,  160,  829,  160,  160,  160,  160,

      160,  163,  829,  163,  163,  163,  163,  163,  175,  829,
      175,  175,  175,  175,  175,  178,  829,  178,  178,  178,
      178,  178,  181,  829,  181,  181,  181,  181,  181,  183,
      829,  183,  183,  183,  183,  183,  205,  829,  205,  205,
      205,  205,  205,  208,  829,  208,  208,  208,  208,  208,
      210,  829,  210,  210,  210,  210,  210,  212,  829,  212,
      212,  212,  212,  212,  239,  829,  239,  239,  239,  239,
      239,  241,  829,  241,  241,  241,  241,  241,  260,  829,
      260,  260,  260,  260,  260,  262,  829,  262,  262,  262,
      262,  262,  554,  829,  554,  561,  561,  561,  561,  561,

      561,  561,  563,  563,  563,  563,  563,  563,  563,  565,
      565,  565,  565,  565,  565,  565,  567,  829,  567,  567,
      567,  567,  567,  570,  570,  570,  570,  570,  570,  570,
      572,  572,  572,  572,  572,  572,  572,  574,  574,  574,
      574,  574,  574,  574,  576,  576,  576,  576,  576,  576,
      576,  580,  580,  580,  580,  580,  580,  580,  573,  573,
      573,  573,  573,  573,  573,  575,  575,  575,  575,  575,
      575,  575,  577,  577,  577,  577,  577,  577,  577,  581,
      581,  581,  581,  581,  581,  581,  630,  630,  630,  630,
      630,  630,  630,  633,  633,  633,  633,  633,  633,  633,

      634,  634,  634,  634,  634,  634,  634,  677,  677,  677,
      677,  677,  677,  677,  679,  679,  679,  679,  679,  679,
      679,  680,  680,  680,  680,  680,  680,  680,   11,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,

      829,  829,  829
    } ;

static const flex_int16_t yy_chk[2804] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    2,  844,    2,    3,    3,    3,
        3,    4,    3,    4,  839,   24,    7,    7,   24,    4,
        4,    4,    4,   32,    4,    5,    5,    5,   34,    6,

        5,    6,    7,    8,    8,   44,    8,    6,    6,    6,
       22,   22,    6,   56,    7,   27,   27,   56,   63,    8,
       24,   44,   22,   49,   34,   49,  800,   34,   32,  761,
       51,    8,   51,   34,   53,   57,   53,  738,  680,   57,
       44,    7,   31,   31,   63,   31,  677,   64,   44,   64,
       34,   31,   37,   34,   70,   35,   70,   30,    8,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,   30,    9,    9,   37,    9,    9,    9,    9,    9,
       41,   35,   42,   31,  658,   30,   31,   37,   55,   55,
       35,   55,   30,   75,   75,   42,   77,   41,   30,   58,

       37,   36,   36,   58,   36,   75,    9,   35,  345,   31,
       36,   30,  135,  636,  135,   41,   48,   42,   40,   48,
      634,  345,   42,   55,   41,   48,   40,   78,  632,  630,
       78,   77,    9,   10,   10,   10,   10,   10,   10,   10,
       10,   10,   10,   10,   10,   36,   10,   10,   40,   10,
       10,   10,   10,   10,   39,   38,   40,   39,   38,   45,
       48,   40,   78,   39,   38,   79,  128,   46,  587,   47,
       47,  132,   47,  582,   40,  149,   39,   38,   47,   43,
       10,   38,   40,   45,   46,  284,   39,  284,   59,   59,
       43,  116,   59,  128,   45,   39,   43,  132,   39,   38,

       79,  149,   46,   39,   38,   95,   10,   33,   38,   45,
       43,   46,   39,   47,   43,   76,   76,   43,   84,   54,
       54,   39,   90,   43,   59,  116,  116,   76,   95,   33,
       33,   54,   33,   54,   90,   89,   43,   33,   89,   33,
       95,  129,   33,  130,   89,  140,   84,  581,  286,  140,
      286,  116,  577,   84,   95,   33,   33,   90,   33,   65,
      287,   90,   65,   33,  287,   33,   50,  575,  129,   50,
      130,   65,   84,   65,   85,   85,   65,   50,   50,   89,
       50,   91,   92,   50,   85,   85,   65,   93,  370,   65,
       85,   96,  131,   50,  101,   97,   50,   65,   71,   65,

       93,   71,   65,   50,   50,   91,   50,   94,   97,   50,
       71,   92,   71,   96,  107,   71,   91,   92,   94,  131,
       85,  104,   93,  370,  101,   71,   96,   93,   71,  101,
       97,   91,  105,  573,  418,   97,   71,   92,   71,   96,
      113,   71,   94,  104,  112,   94,  107,  418,  104,  107,
      101,  113,  108,  108,  105,  109,  104,  112,  109,  115,
      111,  111,  108,  108,  109,  133,  117,  105,  108,  104,
      111,  111,  107,  114,  104,  113,  111,  120,  113,  112,
      105,  119,  114,  117,  112,  115,  570,  138,  138,  118,
      138,  108,  133,  289,  115,  568,  565,  289,  108,  109,

      114,  117,  118,  137,  119,  120,  111,  155,  114,  114,
      117,  115,  120,  137,  146,  142,  119,  108,  147,  148,
      126,  150,  138,  126,  118,  142,  114,  152,  153,  118,
      119,  120,  126,  155,  126,  143,  143,  126,  154,  143,
      137,  146,  156,  214,  158,  147,  148,  126,  150,  216,
      126,  215,  142,  157,  152,  153,  157,  158,  126,  169,
      126,  480,  218,  126,  563,  154,  159,  159,  169,  156,
      214,  143,  561,  171,  480,  216,  159,  172,  215,  158,
      505,  170,  159,  407,  158,  173,  171,  159,  157,  218,
      159,  167,  167,  407,  169,  169,  173,  174,  172,  168,

      168,  167,  167,  170,  185,  159,  174,  167,  171,  168,
      168,  168,  172,  171,  159,  168,  170,  159,  180,  185,
      173,  186,  187,  173,  172,  502,  501,  180,  407,  170,
      188,  159,  174,  174,  500,  187,  225,  167,  217,  185,
      197,  196,  223,  223,  223,  168,  185,  223,  186,  493,
      189,  189,  197,  180,  180,  195,  186,  187,  188,  198,
      189,  219,  187,  225,  217,  188,  189,  190,  190,  196,
      189,  202,  198,  189,  186,  197,  196,  190,  190,  197,
      489,  195,  201,  190,  188,  199,  203,  219,  200,  226,
      195,  517,  227,  202,  198,  196,  204,  189,  199,  198,

      189,  200,  221,  221,  488,  221,  202,  195,  203,  229,
      201,  487,  204,  190,  194,  194,  226,  201,  227,  202,
      199,  203,  417,  200,  194,  199,  517,  228,  200,  230,
      194,  204,  231,  233,  203,  229,  201,  221,  194,  204,
      220,  232,  220,  220,  234,  220,  235,  194,  194,  224,
      224,  236,  194,  224,  228,  246,  230,  237,  237,  231,
      233,  238,  248,  350,  247,  194,  257,  232,  244,  258,
      234,  349,  235,  194,  194,  246,  288,  236,  194,  243,
      243,  235,  285,  237,  237,  224,  248,  238,  252,  243,
      246,  244,  247,  257,  250,  243,  258,  248,  235,  247,

      251,  246,  253,  244,  243,  249,  249,  266,  252,  254,
      254,  265,  248,  262,  243,  249,  249,  244,  247,  254,
      254,  249,  250,  252,  260,  254,  241,  239,  251,  250,
      253,  243,  222,  266,  252,  251,  264,  253,  265,  267,
      243,  264,  255,  255,  269,  280,  271,  212,  250,  256,
      256,  249,  255,  255,  251,  254,  253,  268,  255,  256,
      256,  270,  264,  210,  279,  256,  267,  264,  208,  272,
      281,  268,  280,  269,  271,  273,  273,  282,  274,  269,
      255,  271,  272,  205,  193,  273,  273,  192,  255,  274,
      279,  273,  268,  191,  270,  256,  270,  281,  268,  269,

      271,  183,  181,  282,  272,  178,  255,  259,  259,  272,
      278,  278,  283,  274,  275,  275,  274,  259,  276,  276,
      270,  273,  292,  259,  275,  275,  291,  259,  276,  276,
      275,  259,  277,  277,  276,  259,  278,  278,  283,  290,
      290,  259,  277,  277,  293,  259,  294,  296,  277,  292,
      295,  295,  291,  297,  259,  298,  299,  301,  259,  302,
      275,  303,  259,  304,  276,  290,  290,  259,  305,  306,
      293,  259,  294,  296,  300,  300,  295,  295,  277,  175,
      297,  298,  299,  301,  300,  300,  302,  303,  307,  304,
      300,  310,  313,  166,  305,  306,  308,  308,  309,  309,

      311,  311,  307,  165,  312,  313,  308,  308,  309,  309,
      311,  314,  308,  163,  309,  315,  311,  320,  162,  310,
      300,  312,  311,  307,  318,  318,  310,  313,  314,  307,
      321,  315,  313,  160,  318,  318,  322,  316,  316,  312,
      318,  326,  308,  320,  309,  310,  314,  316,  312,  311,
      315,  317,  317,  316,  324,  314,  321,  327,  315,  319,
      319,  317,  322,  329,  325,  328,  330,  317,  326,  319,
      318,  316,  325,  323,  323,  319,  316,  331,  323,  333,
      324,  332,  317,  323,  327,  319,  141,  139,  344,  329,
      325,  336,  328,  330,  319,  342,  136,  316,  325,  323,

      323,  332,  316,  331,  323,  333,  134,  125,  317,  323,
      124,  343,  319,  336,  333,  344,  332,  346,  334,  334,
      319,  342,  335,  335,  123,  121,  336,  332,  334,  334,
      338,  333,  335,  335,  334,  337,  337,  343,  335,  336,
      339,  339,  110,  346,  103,  337,  338,  340,  340,  347,
      339,  337,  348,  351,  352,  353,  339,  340,  354,  337,
      341,  341,  355,  340,  334,  338,  356,  340,  335,  340,
      341,  340,  359,  338,  357,  347,  341,  339,  348,  351,
      352,  358,  353,  341,  354,  360,  337,  361,  355,  362,
      364,  368,  356,  341,  340,  102,  340,  369,  340,  359,

      357,  374,  100,  339,  363,  363,   98,  358,  380,  373,
      341,  360,   88,  361,  363,  362,  364,  368,   87,  341,
      363,  365,  365,  369,  366,  366,  373,  374,  363,  367,
      367,  365,  365,  365,  366,  380,  366,  365,  375,  367,
      366,  367,  371,  371,  373,  367,  372,  372,  376,  378,
      378,  377,  371,  373,  379,  363,  372,   86,  371,  378,
      378,  375,  372,  377,  381,  378,  383,  389,   80,  384,
      385,   74,   72,  375,  376,  386,   69,   67,  382,  382,
      379,  371,  388,  376,  372,  390,  377,  375,  382,  391,
      377,  381,  383,  389,  382,  378,  384,  385,  382,  382,

      376,  392,  386,  387,  387,  393,  393,  371,  394,  388,
      372,  395,  390,  387,  396,  393,  391,  382,  397,  387,
      398,  393,  399,  400,  401,  382,  382,  392,  406,  402,
      408,   62,  409,   61,  410,  394,  411,  395,   52,  403,
      403,  396,  402,  382,  412,  397,  398,  401,  399,  403,
      400,  404,  404,  413,  406,  403,  414,  408,  409,  401,
      410,  404,  411,  415,  402,  405,  405,  404,  416,  402,
      419,  412,  420,  401,  421,  405,  405,  422,  403,  413,
      423,  405,  414,  424,  425,  426,  427,   29,  428,  415,
      404,  429,  430,  431,  416,  432,  419,  433,  439,  420,

      434,  421,  435,  422,  403,  437,  423,  440,  441,  424,
      425,  405,  426,  427,  428,  442,  404,  429,  430,  431,
      443,  434,  432,  451,  433,  439,  444,  434,  435,  445,
      446,  437,  441,  452,  440,  450,  450,   26,   21,   20,
       19,  442,   14,  441,   11,  450,  443,  434,  453,  444,
      451,  450,  446,  447,  447,  445,  448,  448,  441,  452,
      457,  444,  454,  447,  447,  446,  448,  448,  448,  447,
      449,  449,  448,    0,  453,  444,    0,  455,  446,  456,
      449,  458,  459,  459,  467,    0,  449,  457,  454,  463,
      460,  460,  459,    0,  459,  464,    0,    0,  459,  447,

      460,  465,  448,  455,  449,  456,  460,  458,  461,  461,
      467,  462,  462,  468,  460,    0,  463,  469,  461,  461,
      461,  462,  464,  462,  461,  470,  472,  462,  465,  474,
      449,    0,  466,  466,  471,  471,  473,  473,    0,  476,
      468,  460,  466,  469,  471,  477,  473,  482,  466,  479,
      471,  470,  473,  472,  481,  483,  466,  475,  475,  484,
      474,  485,  478,  478,  474,  476,  466,  475,  475,  491,
      466,  477,  478,  475,  482,  479,    0,    0,  478,  492,
      481,  483,  497,  466,  478,  484,  474,  485,  486,  486,
      503,  498,  466,  494,  494,  491,  466,  504,  486,  495,

      495,  496,  496,  475,  486,  507,  492,  508,  497,  494,
      509,  478,  499,  499,  510,  495,  503,  496,  498,  506,
      506,  511,  514,  515,  504,  512,  513,  513,  499,  506,
        0,  506,  507,  508,  512,  506,  513,  509,  513,  523,
      510,  521,  513,  516,  516,  515,    0,  511,  526,  514,
      524,    0,  527,  516,  528,  516,  518,  518,  515,  516,
      512,  512,  529,  519,  519,  523,  518,  530,  521,    0,
      534,  515,  518,  519,  526,  522,  522,  524,  527,  519,
      528,  536,  525,  525,  537,  522,  532,  532,  538,  529,
      518,  522,  525,  519,  530,  518,  534,  539,  525,  522,

        0,  540,  539,  541,  543,    0,  544,  536,  542,  542,
      537,  546,  532,  532,  538,  549,  518,  550,  542,  519,
        0,  518,    0,  539,  542,  558,  522,  540,  539,  551,
      541,  543,  544,  545,  545,  547,  547,  546,  548,  548,
      552,    0,  549,  545,  550,  547,  547,  547,  548,  545,
      559,  547,  558,  555,  548,  551,  556,  553,  553,  557,
      569,    0,  554,  554,  572,  572,  552,  553,  545,  553,
      579,  553,  554,  553,  554,    0,  548,  559,  554,  555,
      572,  547,  556,  560,  560,  557,  583,  569,  574,  574,
      576,  576,  585,  560,  545,  578,  578,  579,  588,  560,

      580,  580,  548,  560,  574,  589,  576,  590,  586,  586,
      592,  578,  596,  583,  595,  600,  580,    0,  586,  585,
      586,  598,  590,    0,  586,  588,  602,  593,  593,  608,
      560,    0,  589,    0,  597,  597,  592,  593,  593,  596,
      595,  600,  590,  593,  597,  599,  599,    0,  598,  590,
      597,  604,  602,  601,  601,  599,  608,  599,  603,  603,
      606,  599,  609,  601,  597,  601,  605,  605,  603,  601,
      611,  607,  607,  593,  603,  610,  605,  604,  605,  603,
      612,  607,  605,  607,  613,  616,  606,  607,  620,  609,
      597,    0,  617,  614,  614,  619,  611,  603,  621,    0,

      622,  623,  610,  614,  615,  615,  603,  612,  625,  614,
      613,  626,  616,  627,  615,  620,  615,  614,  617,  628,
      615,  619,  637,  603,  639,  621,  622,  623,    0,  640,
      641,  629,  629,  633,  633,  625,  643,  626,  635,  635,
      627,  629,  646,  629,  614,  628,  642,  629,  637,  633,
      639,  644,  644,  647,  635,  640,  641,  649,  653,  642,
        0,  644,  643,  660,  645,  645,  657,  644,    0,  646,
      661,    0,  662,  644,  645,  650,  650,  652,  652,  647,
      645,  642,  663,  649,  653,  650,  642,  652,  665,  652,
      660,  650,  657,  652,  655,  655,  666,  661,  662,  667,

      644,  659,  659,  668,  655,  669,  655,  670,  663,  650,
      655,  659,  672,  659,  665,  674,  673,  659,  675,    0,
        0,  681,  666,  682,    0,  667,  671,  671,  683,    0,
      668,  686,  669,  670,    0,  650,  671,  687,  671,  672,
        0,  674,  671,  673,  675,  679,  679,  681,  684,  684,
      682,  689,  688,  688,  683,  685,  685,  686,  684,  691,
      684,  679,  688,  687,  684,  685,  685,  685,  688,  690,
      690,  685,  692,  692,  694,  696,  688,  689,  697,  690,
        0,  690,  692,  699,  701,  690,  691,  702,  692,  703,
      708,    0,  705,  710,  712,  700,  700,  711,    0,  714,

      694,  685,  696,  688,  697,  700,  692,  700,  715,  699,
      701,  700,    0,  702,    0,  703,  708,  704,  704,  705,
      710,  712,  713,  711,  706,  706,  714,  704,    0,  704,
      719,    0,  692,  704,  706,  715,  706,  707,  707,  720,
      706,  722,  716,  716,  725,  718,  718,  707,  713,  707,
      721,  721,  716,  707,  716,  718,  719,  718,  716,  726,
      721,  718,  721,  723,  723,  720,  721,  722,  724,  724,
      730,  725,    0,  723,  741,  723,  727,  727,  724,  723,
      724,  729,  729,  732,  724,  726,  727,  735,  731,  731,
      736,  729,  727,  729,  737,  739,  730,  729,  731,  740,

      731,  741,  744,    0,  731,  745,  727,  746,  746,  732,
      751,    0,    0,  735,  748,  748,  736,  746,  756,  754,
      737,  739,    0,  746,  748,  740,  748,  758,  760,  744,
      748,  745,  727,  752,  752,  759,  762,  751,  753,  753,
      764,  746,  763,  752,  756,  752,  754,  766,  753,  752,
      767,  771,    0,  758,  753,  760,    0,  773,  778,  780,
      779,  759,  762,  765,  765,  795,  764,  746,  753,  763,
      768,  768,  782,  765,  766,  765,    0,  767,  771,  765,
      768,  769,  769,  773,  778,  780,  768,  779,    0,  774,
      774,  769,  795,    0,  753,  783,  785,  769,  782,  774,

      792,  774,  775,  775,  768,  774,    0,  776,  776,    0,
        0,  793,  775,  794,  775,  777,  777,  776,  775,  776,
      769,  783,  785,  776,    0,  777,  792,  777,  781,  781,
      768,  777,  784,  784,  798,  786,  786,  793,  781,  794,
      787,  787,  784,    0,  781,  786,  769,  786,  784,  799,
      787,  786,  787,  796,  796,  801,  787,  804,  797,  797,
      798,    0,    0,  796,  807,  796,  809,    0,  797,  796,
      797,  784,  802,  802,  797,  806,  799,  805,  805,  810,
      812,  801,  802,  806,  804,  813,    0,  805,  802,  805,
      807,  821,  809,  805,  808,  808,  816,  784,  817,    0,

      825,  806,    0,    0,  808,  818,  810,  812,    0,  806,
      808,  802,  813,  814,  814,  822,  815,  815,  821,    0,
        0,    0,  816,  814,  817,  814,  815,  825,  815,  814,
        0,  818,  815,  808,  820,  820,    0,  802,    0,  824,
      824,  822,  827,  827,  820,    0,  820,    0,    0,  824,
      820,  824,  827,    0,  827,  824,    0,    0,  827,  808,
      830,  830,  830,  830,  830,  830,  830,  831,  831,  831,
      831,  831,  831,  831,  832,  832,    0,  832,  833,    0,
      833,  833,  833,  833,  833,  834,    0,    0,  834,  834,
        0,  834,  835,  835,  836,    0,  836,  836,  836,  836,

      836,  837,    0,  837,  837,  837,  837,  837,  838,    0,
      838,  838,  838,  838,  838,  840,    0,  840,  840,  840,
      840,  840,  841,    0,  841,  841,  841,  841,  841,  842,
        0,  842,  842,  842,  842,  842,  843,    0,  843,  843,
      843,  843,  843,  845,    0,  845,  845,  845,  845,  845,
      846,    0,  846,  846,  846,  846,  846,  847,    0,  847,
      847,  847,  847,  847,  848,    0,  848,  848,  848,  848,
      848,  849,    0,  849,  849,  849,  849,  849,  850,    0,
      850,  850,  850,  850,  850,  851,    0,  851,  851,  851,
      851,  851,  852,    0,  852,  853,  853,  853,  853,  853,

      853,  853,  854,  854,  854,  854,  854,  854,  854,  855,
      855,  855,  855,  855,  855,  855,  856,    0,  856,  856,
      856,  856,  856,  857,  857,  857,  857,  857,  857,  857,
      858,  858,  858,  858,  858,  858,  858,  859,  859,  859,
      859,  859,  859,  859,  860,  860,  860,  860,  860,  860,
      860,  861,  861,  861,  861,  861,  861,  861,  862,  862,
      862,  862,  862,  862,  862,  863,  863,  863,  863,  863,
      863,  863,  864,  864,  864,  864,  864,  864,  864,  865,
      865,  865,  865,  865,  865,  865,  866,  866,  866,  866,
      866,  866,  866,  867,  867,  867,  867,  867,  867,  867,

      868,  868,  868,  868,  868,  868,  868,  869,  869,  869,
      869,  869,  869,  869,  870,  870,  870,  870,  870,  870,
      870,  871,  871,  871,  871,  871,  871,  871,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,
      829,  829,  829,  829,  829,  829,  829,  829,  829,  829,

      829,  829,  829
    } ;

static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;

extern int yy_flex_debug;
int yy_flex_debug = 0;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "scanner.l"
/*
   Copyright (C) 2001-2012, 2014-2018 Free Software Foundation, Inc.
   Written by Keisuke Nishida, Roger While, Simon Sobisch, Edwart Hart,
   Ron Norman

   This file is part of GnuCOBOL.

   The GnuCOBOL compiler is free software: you can redistribute it
   and/or modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation, either version 3 of the
   License, or (at your option) any later version.

   GnuCOBOL 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
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with GnuCOBOL.  If not, see <http://www.gnu.org/licenses/>.
*/
#line 49 "scanner.l"

#undef	YY_READ_BUF_SIZE
#define	YY_READ_BUF_SIZE	32768
#undef	YY_BUF_SIZE
#define	YY_BUF_SIZE		32768

#define	YY_SKIP_YYWRAP
static int yywrap (void) {
    return 1;
}

#define YY_INPUT(buf,result,max_size)				\
	{							\
		if (fgets (buf, (int)max_size, yyin) == NULL) { \
			result = YY_NULL;			\
		} else {					\
			result = strlen (buf);			\
		}						\
	}

#define	YY_USER_INIT						\
	if (!plex_buff) {					\
		plex_size = COB_MINI_BUFF;			\
		plex_buff = cobc_malloc (plex_size);		\
	}							\
	if (!pic_buff1) {					\
		pic1_size = COB_MINI_BUFF;			\
		pic_buff1 = cobc_malloc (pic1_size);		\
	}							\
	if (!pic_buff2) {					\
		pic2_size = COB_MINI_BUFF;			\
		pic_buff2 = cobc_malloc (pic2_size);		\
	}

#include "config.h"

#include <ctype.h>
#include <limits.h>

#ifdef	HAVE_UNISTD_H
#include <unistd.h>
#else
#define	YY_NO_UNISTD_H	1
#endif

#define	COB_IN_SCANNER	1
#include "cobc.h"
#include "tree.h"

/* ignore unused functions here as flex generates unused ones */
#ifdef	__GNUC__
#if	defined (__clang__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
#pragma GCC diagnostic ignored "-Wunused-function"
#endif
#endif

#define YYSTYPE			cb_tree
#include "parser.h"

#define RETURN_TOK(expr)			\
	do {					\
		last_yylval = yylval;		\
		last_token = (expr);		\
		return last_token;		\
	} ONCE_COB

#define SET_LOCATION(x)                         \
	do {					\
		(x)->source_file = cb_source_file;		\
		(x)->source_line = cb_source_line;		\
	} ONCE_COB

/* CONSTANT (78 level) structure */
struct cb_level_78 {
	struct cb_level_78	*next;		/* Next in chain */
	struct cb_level_78	*glob_next;	/* Continued next in chain */
	struct cb_level_78	*last;		/* Last in chain */
	struct cb_field		*fld_78;		/* Pointer to field */
	struct cb_program	*prog;		/* Program where defined */
	cob_u32_t		name_len;	/* Length of name */
	cob_u32_t		not_const;	/* Invalid usage check */
	cob_u32_t		chk_const;	/* Check global level use */
};

struct cb_top_level_78 {
	struct cb_top_level_78	*next;
	struct cb_level_78	*lev_78_ptr;
};

/* Local variables */
static cb_tree			last_yylval;
static int			last_token;
static struct cb_level_78	*top_78_ptr = NULL;
static struct cb_level_78	*const_78_ptr = NULL;
static struct cb_level_78	*lev_78_ptr = NULL;
static struct cb_level_78	*glob_lev_78_ptr = NULL;
static char			*plex_buff = NULL;
static char			*pic_buff1 = NULL;
static char			*pic_buff2 = NULL;
static size_t			plex_size;
static size_t			pic1_size;
static size_t			pic2_size;
static unsigned int		last_token_is_dot = 0;
static unsigned int		integer_is_label = 0;
static unsigned int		inside_bracket = 0;
static unsigned int		literal_error;
static char			err_msg[COB_MINI_BUFF];

/* Function declarations */
static void	read_literal (const char, const char *);
static int	scan_x (const char *, const char *);
static int	scan_z (const char *, const char *);
static int	scan_h (const char *, const char *);
static int	scan_b (const char *, const char *);
static int	scan_o (const char *, const char *);
static int	scan_numeric (const char *);
static int	scan_floating_numeric (const char *);
static void	scan_picture (const char *);
static void	count_lines (const char *);
static void	scan_define_options (const char *);
static void	copy_word_in_quotes (char ** const);
static void	copy_two_words_in_quotes (char ** const, char ** const);
static void	add_synonym (const int);

#line 1489 "scanner.c"

#line 1491 "scanner.c"

#define INITIAL 0
#define DECIMAL_IS_PERIOD 1
#define DECIMAL_IS_COMMA 2
#define PICTURE_STATE 3
#define FUNCTION_STATE 4

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

/* 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 \
	if ( yyleng > 0 ) \
		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
				(yytext[yyleng - 1] == '\n'); \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
	yy_state_type yy_current_state;
	char *yy_cp, *yy_bp;
	int yy_act;
    
	if ( !(yy_init) )
		{
		(yy_init) = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

		if ( ! (yy_start) )
			(yy_start) = 1;	/* first start state */

		if ( ! yyin )
			yyin = stdin;

		if ( ! yyout )
			yyout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {
			yyensure_buffer_stack ();
			YY_CURRENT_BUFFER_LVALUE =
				yy_create_buffer( yyin, YY_BUF_SIZE );
		}

		yy_load_buffer_state(  );
		}

	{
#line 178 "scanner.l"



#line 182 "scanner.l"
	if (likely (current_program)) {
		if (current_program->decimal_point == '.') {
			BEGIN DECIMAL_IS_PERIOD;
		} else {
			BEGIN DECIMAL_IS_COMMA;
		}
	}

	if (cobc_repeat_last_token) {
		cobc_repeat_last_token = 0;
		yylval = last_yylval;
	        return last_token;
	}

	/* We treat integer literals immediately after '.' as labels;
	   that is, they must be level numbers or section names. */
	if (last_token_is_dot) {
		integer_is_label = 1;
		last_token_is_dot = 0;
	} else {
		integer_is_label = 0;
	}



#line 1721 "scanner.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_current_state += YY_AT_BOL();
yy_match:
		do
			{
			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
			if ( yy_accept[yy_current_state] )
				{
				(yy_last_accepting_state) = yy_current_state;
				(yy_last_accepting_cpos) = yy_cp;
				}
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 830 )
					yy_c = yy_meta[yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
			++yy_cp;
			}
		while ( yy_current_state != 829 );
		yy_cp = (yy_last_accepting_cpos);
		yy_current_state = (yy_last_accepting_state);

yy_find_action:
		yy_act = yy_accept[yy_current_state];

		YY_DO_BEFORE_ACTION;

do_action:	/* This label is used only to access EOF actions. */

		switch ( yy_act )
	{ /* beginning of action switch */
			case 0: /* must back up */
			/* undo the effects of YY_DO_BEFORE_ACTION */
			*yy_cp = (yy_hold_char);
			yy_cp = (yy_last_accepting_cpos);
			yy_current_state = (yy_last_accepting_state);
			goto yy_find_action;

case 1:
/* rule 1 can match eol */
YY_RULE_SETUP
#line 207 "scanner.l"
{
	scan_define_options (yytext);
}
	YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
#line 211 "scanner.l"
{
	char	*word;

	copy_word_in_quotes (&word);
	add_reserved_word_now (word, NULL);
	cobc_free (word);
}
	YY_BREAK
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
#line 219 "scanner.l"
{
	add_synonym (0);
}
	YY_BREAK
case 4:
/* rule 4 can match eol */
YY_RULE_SETUP
#line 223 "scanner.l"
{
	char	*new_meaning;
	char	*word_to_change;

	copy_two_words_in_quotes (&new_meaning, &word_to_change);

	if (!is_default_reserved_word (new_meaning)) {
		cb_error (_("'%s' is not a default reserved word, so cannot be aliased"),
			  new_meaning);
	} else if (!is_reserved_word (word_to_change)) {
		cb_error (_("'%s' is not a reserved word; you may want ADDSYN or OVERRIDE instead"),
			  word_to_change);
	} else {
		remove_reserved_word_now (word_to_change);
		add_reserved_word_now (word_to_change, new_meaning);
	}

	cobc_free (new_meaning);
	cobc_free (word_to_change);
 }
	YY_BREAK
case 5:
/* rule 5 can match eol */
YY_RULE_SETUP
#line 244 "scanner.l"
{
	add_synonym (1);
}
	YY_BREAK
case 6:
/* rule 6 can match eol */
YY_RULE_SETUP
#line 248 "scanner.l"
{
	char	*word;

	copy_word_in_quotes (&word);
        remove_reserved_word_now (word);
	cobc_free (word);
}
	YY_BREAK
case 7:
/* rule 7 can match eol */
YY_RULE_SETUP
#line 256 "scanner.l"
{
	cb_source_line++;
}
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 260 "scanner.l"
{
	/* Line directive */
	char		*p1;
	char		*p2;

	p1 = strchr (yytext, '"');
	if (p1) {
		p2 = cobc_strdup (p1 + 1);
		p1 = strrchr (p2, '"');
		if (p1) {
			*p1 = 0;
			cb_source_file = cobc_parse_strdup (p2);
			/* FIXME: only place where strol is used, replace by cobc internal
			          function for base 10 (found in cobc.c already) and base 16,
			          remove from configure.ac */
			cb_source_line = (int)strtol (yytext + 5, NULL, 10) - 1;
		}
		cobc_free (p2);
	}
}
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 281 "scanner.l"
{
	/* Ignore */
}
	YY_BREAK
case 10:
#line 286 "scanner.l"
case 11:
YY_RULE_SETUP
#line 286 "scanner.l"
{
	BEGIN PICTURE_STATE;
}
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 290 "scanner.l"
{
	if (cobc_in_repository || cobc_cs_check == CB_CS_EXIT) {
		yylval = NULL;
	        RETURN_TOK (FUNCTION);
	}
	BEGIN FUNCTION_STATE;
}
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 298 "scanner.l"
{
	/* String literal */
	cobc_force_literal = 0;
	read_literal (yytext[0], "");
	RETURN_TOK (LITERAL);
}
	YY_BREAK
case 14:
#line 306 "scanner.l"
case 15:
YY_RULE_SETUP
#line 306 "scanner.l"
{
	/* X string literal */
	cobc_force_literal = 0;
	RETURN_TOK (scan_x (yytext + 2, "X"));
}
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 312 "scanner.l"
{
	/* N national string literal */
	cobc_force_literal = 0;
	/* TODO: national string - needs different handling */
	read_literal (yytext [1], "N");
	RETURN_TOK (LITERAL);
}
	YY_BREAK
case 17:
#line 321 "scanner.l"
case 18:
YY_RULE_SETUP
#line 321 "scanner.l"
{
	/* NX string literal */
	cobc_force_literal = 0;
	RETURN_TOK (scan_x (yytext + 3, "NX"));
}
	YY_BREAK
case 19:
#line 328 "scanner.l"
case 20:
YY_RULE_SETUP
#line 328 "scanner.l"
{
	/* Z string literal */
	cobc_force_literal = 0;
	RETURN_TOK (scan_z (yytext + 2, "Z"));
}
	YY_BREAK
case 21:
#line 335 "scanner.l"
case 22:
YY_RULE_SETUP
#line 335 "scanner.l"
{
	/* L string literal */
	cobc_force_literal = 0;
	RETURN_TOK (scan_z (yytext + 2, "L"));
}
	YY_BREAK
case 23:
#line 342 "scanner.l"
case 24:
YY_RULE_SETUP
#line 342 "scanner.l"
{
	/* H hexadecimal/numeric literal */
	cobc_force_literal = 0;
	RETURN_TOK (scan_h (yytext + 2, "H"));
}
	YY_BREAK
case 25:
#line 349 "scanner.l"
case 26:
YY_RULE_SETUP
#line 349 "scanner.l"
{
	/* B boolean/numeric literal */
	cobc_force_literal = 0;
	RETURN_TOK (scan_b (yytext + 2, "B"));
}
	YY_BREAK
case 27:
#line 356 "scanner.l"
case 28:
YY_RULE_SETUP
#line 356 "scanner.l"
{
	/* BX boolean hexadecimal string literal */
	cobc_force_literal = 0;
	RETURN_TOK (scan_x (yytext + 3, "BX"));
}
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 362 "scanner.l"
{
	/*
	  To avoid subtle silent errors, such as B#021, this rule (and the ones
	  following) here admit some invalid literals which emit errors when
	  they are processed.
	*/
	/* ACUCOBOL binary numeric literal */
	cobc_force_literal = 0;
	RETURN_TOK (scan_b (yytext + 2, "B#"));
}
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 373 "scanner.l"
{
	/* ACUCOBOL octal numeric literal */
	cobc_force_literal = 0;
	RETURN_TOK (scan_o (yytext + 2, "O#"));
}
	YY_BREAK
case 31:
#line 380 "scanner.l"
case 32:
YY_RULE_SETUP
#line 380 "scanner.l"
{
	/* ACUCOBOL hexadecimal numeric literal */
	char type[3] = "x#";
	type[0] = yytext [0];
	cobc_force_literal = 0;
	RETURN_TOK (scan_h (yytext + 2, type));
}
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 388 "scanner.l"
{
	inside_bracket++;
	RETURN_TOK (TOK_OPEN_PAREN);
}
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 393 "scanner.l"
{
	if (inside_bracket > 0) {
		inside_bracket--;
	}
	RETURN_TOK (TOK_CLOSE_PAREN);
}
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 400 "scanner.l"
{
	int	value;

	cobc_force_literal = 0;
	if (integer_is_label) {
		yylval = cb_build_reference (yytext);

		if (!cobc_in_procedure) {
			value = atoi (yytext);
			if (value == 66) {
				/* level number 66 */
				RETURN_TOK (SIXTY_SIX);
			} else if (value == 78) {
				/* level number 78 */
				RETURN_TOK (SEVENTY_EIGHT);
			} else if (value == 88) {
				/* level number 88 */
				RETURN_TOK (EIGHTY_EIGHT);
			} else if ((value >= 1 && value <= 49) || value == 77) {
				/* level number (1 through 49, 77) */
				RETURN_TOK (LEVEL_NUMBER);
			}
		}

		/* Integer label */
		RETURN_TOK (WORD);
	}
	/* Numeric literal or referenced integer label
	   remark: all transformations/checks are postponed:
	   literals to tree.c,
	   integer label to typeck.c (cb_build_section_name)
	*/
	yylval = cb_build_numeric_literal (0, yytext, 0);
	RETURN_TOK (LITERAL);
}
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 436 "scanner.l"
{

	cobc_force_literal = 0;
	if (integer_is_label) {
		/* Integer label */
		yylval = cb_build_reference (yytext);
		RETURN_TOK (WORD);
	}
	/* Numeric literal or referenced integer label
	   remark: all transformations/checks are postponed:
	   literals to tree.c,
	   integer label to typeck.c (cb_build_section_name)
	*/
	yylval = cb_build_numeric_literal (0, yytext, 0);
	RETURN_TOK (LITERAL);
}
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 453 "scanner.l"
{
	/* Numeric literal (signed) */
	RETURN_TOK (scan_numeric (yytext));
}
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 458 "scanner.l"
{
	/* Ignore */
}
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 462 "scanner.l"
{
	if (inside_bracket) {
		RETURN_TOK (SEMI_COLON);
	}
	/* Ignore */
}
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 469 "scanner.l"
{
	/* Numeric floating point literal */
	RETURN_TOK (scan_floating_numeric (yytext));
}
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 474 "scanner.l"
{
	/* Invalid numeric floating point literal */
	RETURN_TOK (scan_floating_numeric (yytext));
}
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 479 "scanner.l"
{
	/* Numeric literal */
	RETURN_TOK (scan_numeric (yytext));
}
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 484 "scanner.l"
{
	if (inside_bracket) {
		RETURN_TOK (COMMA_DELIM);
	}
	/* Ignore */
}
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 491 "scanner.l"
{
	/* Numeric floating point literal */
	RETURN_TOK (scan_floating_numeric (yytext));
}
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 496 "scanner.l"
{
	/* Invalid numeric floating point literal */
	RETURN_TOK (scan_floating_numeric (yytext));
}
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 501 "scanner.l"
{
	/* Numeric literal */
	RETURN_TOK (scan_numeric (yytext));
}
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 506 "scanner.l"
{
	unput (',');
}
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 510 "scanner.l"
{
	if (inside_bracket) {
		RETURN_TOK (COMMA_DELIM);
	}
	/* Ignore */
}
	YY_BREAK
case 49:
/* rule 49 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 517 "scanner.l"
{
	cobc_force_literal = 1;
	count_lines (yytext);
	RETURN_TOK (END_PROGRAM);
}
	YY_BREAK
case 50:
/* rule 50 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 523 "scanner.l"
{
	cobc_force_literal = 1;
	count_lines (yytext);
	RETURN_TOK (END_FUNCTION);
}
	YY_BREAK
case 51:
/* rule 51 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 529 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (PICTURE_SYMBOL);
}
	YY_BREAK
case 52:
/* rule 52 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 534 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (FROM_CRT);
}
	YY_BREAK
case 53:
/* rule 53 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 539 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (SCREEN_CONTROL);
}
	YY_BREAK
case 54:
/* rule 54 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 544 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (EVENT_STATUS);
}
	YY_BREAK
case 55:
/* rule 55 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 549 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (READY_TRACE);
}
	YY_BREAK
case 56:
/* rule 56 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 554 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (RESET_TRACE);
}
	YY_BREAK
case 57:
/* rule 57 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 559 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (GREATER_OR_EQUAL);
}
	YY_BREAK
case 58:
/* rule 58 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 564 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (GREATER);
}
	YY_BREAK
case 59:
/* rule 59 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 569 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (LESS_OR_EQUAL);
}
	YY_BREAK
case 60:
/* rule 60 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 574 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (LESS);
}
	YY_BREAK
case 61:
/* rule 61 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 579 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (EQUAL);
}
	YY_BREAK
case 62:
/* rule 62 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 584 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (REPLACING);
}
	YY_BREAK
case 63:
/* rule 63 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 589 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (TOP);
}
	YY_BREAK
case 64:
/* rule 64 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 593 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (TOP);
}
	YY_BREAK
case 65:
/* rule 65 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 598 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (BOTTOM);
}
	YY_BREAK
case 66:
/* rule 66 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 602 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (BOTTOM);
}
	YY_BREAK
case 67:
/* rule 67 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 607 "scanner.l"
{
	count_lines (yytext);
	return LINE_LIMIT;
}
	YY_BREAK
case 68:
/* rule 68 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 612 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (NO_ADVANCING);
}
	YY_BREAK
case 69:
/* rule 69 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 617 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (NEXT_PAGE);
}
	YY_BREAK
case 70:
/* rule 70 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 622 "scanner.l"
{
	count_lines (yytext);
	return NEXT_GROUP;
}
	YY_BREAK
case 71:
/* rule 71 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 627 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (NOT_SIZE_ERROR);
}
	YY_BREAK
case 72:
/* rule 72 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 632 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (SIZE_ERROR);
}
	YY_BREAK
case 73:
/* rule 73 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 637 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (NOT_ESCAPE);
}
	YY_BREAK
case 74:
/* rule 74 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 642 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (NOT_EXCEPTION);
}
	YY_BREAK
case 75:
/* rule 75 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 647 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (ESCAPE);
}
	YY_BREAK
case 76:
/* rule 76 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 652 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (EXCEPTION);
}
	YY_BREAK
case 77:
/* rule 77 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 657 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (NOT_OVERFLOW);
}
	YY_BREAK
case 78:
/* rule 78 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 662 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (NOT_END);
}
	YY_BREAK
case 79:
/* rule 79 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 667 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (END);
}
	YY_BREAK
case 80:
/* rule 80 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 672 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (TOK_OVERFLOW);
}
	YY_BREAK
case 81:
/* rule 81 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 677 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (NOT_EOP);
}
	YY_BREAK
case 82:
/* rule 82 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 682 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (EOP);
}
	YY_BREAK
case 83:
/* rule 83 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 687 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (NOT_INVALID_KEY);
}
	YY_BREAK
case 84:
/* rule 84 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 692 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (INVALID_KEY);
}
	YY_BREAK
case 85:
/* rule 85 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 697 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (NO_DATA);
}
	YY_BREAK
case 86:
/* rule 86 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 702 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (DATA);
}
	YY_BREAK
case 87:
/* rule 87 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 707 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (UPON_ENVIRONMENT_NAME);
}
	YY_BREAK
case 88:
/* rule 88 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 712 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (UPON_ENVIRONMENT_VALUE);
}
	YY_BREAK
case 89:
/* rule 89 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 717 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (UPON_ARGUMENT_NUMBER);
}
	YY_BREAK
case 90:
/* rule 90 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 722 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (UPON_COMMAND_LINE);
}
	YY_BREAK
case 91:
/* rule 91 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 727 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (EXCEPTION_CONDITION);
}
	YY_BREAK
case 92:
/* rule 92 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 732 "scanner.l"
{
	count_lines (yytext);
	RETURN_TOK (EC);
}
	YY_BREAK
case 93:
/* rule 93 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 737 "scanner.l"
{
	count_lines (yytext);
	/* FIXME: check with "lookup_register ("LENGTH OF") != NULL"
	          if we actually want to do this,
			  otherwise return 2 (!) WORD tokens (by adding a queue
			  of tokens to be returned)
	*/
	RETURN_TOK (LENGTH_OF);
}
	YY_BREAK
case 94:
/* rule 94 can match eol */
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */
YY_LINENO_REWIND_TO(yy_cp - 1);
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
#line 747 "scanner.l"
{
	/* ACUCOBOL extension: switch-names with space and with letter */
	char suffix[3] = "";
	char name[10] = "";

	/* FIXME: move the code for filling "name" here and first
	          check with "lookup_system_name (name) != NULL"
	          if we actually want to do this,
			  otherwise return 2 (!) WORD tokens (by adding a queue
			  of tokens to be returned)
	*/
	if (cobc_in_procedure) {
		 /* unput characters */
		yylval = cb_build_reference ("SWITCH");
		if (isdigit((unsigned char)yytext[yyleng-2])) {
			unput (yytext[yyleng-1]);
			unput (yytext[yyleng-2]);
		} else {
			unput (yytext[yyleng-1]);
		}
	} else {
		 /* we need to return a single word, reverted later in parser.y */
		if (yytext[yyleng-2] == ' ' && isdigit((unsigned char)yytext[yyleng-1])) {
			/* SWITCH 0  to SWITCH 9 */
			suffix[0] = yytext[yyleng-1];
		} else if (isdigit((unsigned char)yytext[yyleng-2])) {
			/* SWITCH 00 to SWITCH 99 */
			suffix[0] = yytext[yyleng-2];
			suffix[1] = yytext[yyleng-1];
		} else {
			suffix[0] = yytext[yyleng-1];
		}
		strncpy(name, yytext, 6);
		strcat(name, "_");
		strcat(name, suffix);
		yylval = cb_build_reference (name);
	}
	RETURN_TOK (WORD);
}
	YY_BREAK
case 95:
YY_RULE_SETUP
#line 787 "scanner.l"
{
	struct cb_level_78		*p78;
	struct cb_intrinsic_table	*cbp;
	struct cobc_reserved		*resptr;
	struct cb_text_list		*tlp;
	cb_tree				x;
	cb_tree				l;
	struct cb_program		*program;

	cb_check_word_length ((unsigned int)yyleng, yytext);

	/* Check Intrinsic FUNCTION name without keyword */
	if ((cobc_in_procedure && (functions_are_all || cb_intrinsic_list ||
	     current_program->function_spec_list)) || cobc_in_repository) {
		cbp = lookup_intrinsic (yytext, 0);
		if (cbp) {
			if (cobc_in_repository) {
				yylval = cb_build_alphanumeric_literal (yytext, (size_t)yyleng);
				RETURN_TOK (FUNCTION_NAME);
			}
			if (functions_are_all) {
				yylval = cb_build_reference (yytext);
				RETURN_TOK ((enum yytokentype)(cbp->token));
			}
			for (tlp = cb_intrinsic_list; tlp; tlp = tlp->next) {
				if (!strcasecmp (yytext, tlp->text)) {
					yylval = cb_build_reference (yytext);
					RETURN_TOK ((enum yytokentype)(cbp->token));
				}
			}
			l = current_program->function_spec_list;
			for (; l; l = CB_CHAIN(l)) {
				x = CB_VALUE (l);
				if (!strcasecmp (yytext,
						 (char *)(CB_LITERAL(x)->data))) {
					yylval = cb_build_reference (yytext);
					RETURN_TOK ((enum yytokentype)(cbp->token));
				}
			}
		}
	}

	/* Bail early for (END) PROGRAM-ID when not a literal */
	if (unlikely (cobc_force_literal)) {
		/* Force PROGRAM-ID / END PROGRAM */
		cobc_force_literal = 0;
		if (cb_fold_call) {
			yylval = cb_build_reference (yytext);
			RETURN_TOK (PROGRAM_NAME);
		} else {
			yylval = cb_build_alphanumeric_literal (yytext, (size_t)yyleng);
			RETURN_TOK (LITERAL);
		}
	}

	/* Check reserved word */
	resptr = lookup_reserved_word (yytext);
	if (resptr != NULL) {
		if (resptr->nodegen) {
			/* Save location for terminator checking */
			/* Misuse comment tree to mark statement */
			yylval = cb_build_comment (NULL);
		} else {
			yylval = NULL;
		}
		RETURN_TOK (resptr->token);
	}

	/* New user-defined word in REPOSITORY entry */
	if (cobc_in_repository) {
		yylval = cb_build_reference (yytext);
		RETURN_TOK (WORD);
	}

	/* Direct recursive reference in function */
	if (current_program->prog_type == COB_MODULE_TYPE_FUNCTION
		   && !functions_are_all
		   && !strcasecmp (yytext, current_program->orig_program_id)) {
		yylval = cb_build_reference (yytext);
		RETURN_TOK (USER_FUNCTION_NAME);
	}

	/* Check prototype names */
	for (l = current_program->user_spec_list; l; l = CB_CHAIN (l)) {
		x = CB_VALUE (l);
		if (!strcasecmp (yytext, CB_PROTOTYPE (x)->name)) {
			yylval = cb_build_reference (yytext);
			RETURN_TOK (USER_FUNCTION_NAME);
		}
	}
	if (cobc_allow_program_name) {
		for (l = current_program->program_spec_list; l; l = CB_CHAIN (l)) {
			x = CB_VALUE (l);
			if (!strcasecmp (yytext, CB_PROTOTYPE (x)->name)) {
				yylval = cb_build_reference (yytext);
				RETURN_TOK (PROGRAM_NAME);
			}
		}
	}

	/* Check user programs */
	if (cobc_in_id) {
		program = cb_find_defined_program_by_name (yytext);
		if (program) {
			yylval = cb_build_reference (yytext);
			RETURN_TOK (PROGRAM_NAME);
		}
	}

	/* User word */

	/* Check local, global and source global CONSTANT (78) items */

	for (p78 = top_78_ptr; p78; p78 = p78->glob_next) {
		if (strcasecmp (yytext, p78->fld_78->name) == 0) {
			if (unlikely (non_const_word)) {
				if (p78->prog == current_program) {
					cb_error (_("a constant may not be used here - '%s'"), yytext);
					yylval = cb_error_node;
					RETURN_TOK (WORD);
				}
				if (p78->chk_const) {
					p78->not_const = 1;
				}
				break;
			}
			if (p78->chk_const && p78->not_const) {
				break;
			}
			yylval = CB_VALUE (p78->fld_78->values);
			SET_LOCATION (yylval);
			RETURN_TOK (LITERAL);
		}
	}

	yylval = cb_build_reference (yytext);

	/* Special name handling */
	if (CB_WORD_COUNT (yylval) > 0 && CB_WORD_ITEMS (yylval)) {
		x = CB_VALUE (CB_WORD_ITEMS (yylval));
		if (CB_SYSTEM_NAME_P (x)) {
			RETURN_TOK (MNEMONIC_NAME);
		} else if (CB_CLASS_NAME_P (x)) {
			RETURN_TOK (CLASS_NAME);
		}
	}

	RETURN_TOK (WORD);
}
	YY_BREAK
case 96:
YY_RULE_SETUP
#line 937 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (LESS_OR_EQUAL);
}
	YY_BREAK
case 97:
YY_RULE_SETUP
#line 942 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (GREATER_OR_EQUAL);
}
	YY_BREAK
case 98:
YY_RULE_SETUP
#line 947 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (NOT_EQUAL);
}
	YY_BREAK
case 99:
YY_RULE_SETUP
#line 952 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (EXPONENTIATION);
}
	YY_BREAK
case 100:
/* rule 100 can match eol */
YY_RULE_SETUP
#line 957 "scanner.l"
{
	if (last_token_is_dot || strlen (yytext) > 1) {
		cb_warning (COBC_WARN_FILLER, _("ignoring redundant ."));
	}

	if (!last_token_is_dot) {
		last_token_is_dot = 1;
		yylval = NULL;
		RETURN_TOK (TOK_DOT);
	}
}
	YY_BREAK
case 101:
YY_RULE_SETUP
#line 969 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (TOK_AMPER);
}
	YY_BREAK
case 102:
YY_RULE_SETUP
#line 974 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (TOK_COLON);
}
	YY_BREAK
case 103:
YY_RULE_SETUP
#line 979 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (TOK_EQUAL);
}
	YY_BREAK
case 104:
YY_RULE_SETUP
#line 984 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (TOK_DIV);
}
	YY_BREAK
case 105:
YY_RULE_SETUP
#line 989 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (TOK_MUL);
}
	YY_BREAK
case 106:
YY_RULE_SETUP
#line 994 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (TOK_PLUS);
}
	YY_BREAK
case 107:
YY_RULE_SETUP
#line 999 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (TOK_MINUS);
}
	YY_BREAK
case 108:
YY_RULE_SETUP
#line 1004 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (TOK_LESS);
}
	YY_BREAK
case 109:
YY_RULE_SETUP
#line 1009 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (TOK_GREATER);
}
	YY_BREAK
case 110:
YY_RULE_SETUP
#line 1014 "scanner.l"
{
	int	c;

	cb_error (_("invalid symbol '%s' - skipping word"), yytext);
	while ((c = input ()) != EOF) {
		if (c == '\n' || c == ' ') {
			break;
		}
	}
	if (c != EOF) {
		unput (c);
	}
}
	YY_BREAK

case 111:
YY_RULE_SETUP
#line 1030 "scanner.l"
{
	/* Ignore */
  }
	YY_BREAK
case 112:
YY_RULE_SETUP
#line 1033 "scanner.l"
{
	BEGIN INITIAL;
	scan_picture (yytext);
	RETURN_TOK (PICTURE);
  }
	YY_BREAK


case 113:
YY_RULE_SETUP
#line 1041 "scanner.l"
{
	struct cb_intrinsic_table	*cbp;
	cb_tree				l;
	cb_tree				x;

	BEGIN INITIAL;
	yylval = cb_build_reference (yytext);
	for (l = current_program->user_spec_list; l; l = CB_CHAIN(l)) {
		x = CB_VALUE (l);
		if (!strcasecmp (yytext, CB_PROTOTYPE (x)->name)) {
			RETURN_TOK (USER_FUNCTION_NAME);
		}
	}
	cbp = lookup_intrinsic (yytext, 0);
	if (cbp) {
		RETURN_TOK ((enum yytokentype)(cbp->token));
	}
	RETURN_TOK (FUNCTION_NAME);
  }
	YY_BREAK
case 114:
YY_RULE_SETUP
#line 1060 "scanner.l"
{
	yylval = NULL;
	RETURN_TOK (yytext[0]);
  }
	YY_BREAK

case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(DECIMAL_IS_PERIOD):
case YY_STATE_EOF(DECIMAL_IS_COMMA):
case YY_STATE_EOF(PICTURE_STATE):
case YY_STATE_EOF(FUNCTION_STATE):
#line 1066 "scanner.l"
{
	struct cb_level_78	*p78;
	struct cb_level_78	*p782;

	/* At EOF - Clear variables */
	for (p78 = lev_78_ptr; p78; ) {
		p782 = p78->next;
		cobc_free (p78);
		p78 = p782;
	}
	for (p78 = glob_lev_78_ptr; p78; ) {
		p782 = p78->next;
		cobc_free (p78);
		p78 = p782;
	}
	for (p78 = const_78_ptr; p78; ) {
		p782 = p78->next;
		cobc_free (p78);
		p78 = p782;
	}
	top_78_ptr = NULL;
	last_token_is_dot = 0;
	integer_is_label = 0;
	inside_bracket = 0;
	lev_78_ptr = NULL;
	glob_lev_78_ptr = NULL;
	cobc_force_literal = 0;
	yyterminate ();
}
	YY_BREAK
case 115:
YY_RULE_SETUP
#line 1096 "scanner.l"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 3240 "scanner.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_last_accepting_cpos);
				yy_current_state = (yy_last_accepting_state);
				goto yy_find_action;
				}
			}

		else switch ( yy_get_next_buffer(  ) )
			{
			case EOB_ACT_END_OF_FILE:
				{
				(yy_did_buffer_switch_on_eof) = 0;

				if ( yywrap(  ) )
					{
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * yytext, we can now set up
					 * yy_c_buf_p so that if some total
					 * hoser (like flex itself) wants to
					 * call the scanner after we return the
					 * YY_NULL, it'll still work - another
					 * YY_NULL will get returned.
					 */
					(yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

				else
					{
					if ( ! (yy_did_buffer_switch_on_eof) )
						YY_NEW_FILE;
					}
				break;
				}

			case EOB_ACT_CONTINUE_SCAN:
				(yy_c_buf_p) =
					(yytext_ptr) + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state(  );

				yy_cp = (yy_c_buf_p);
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
				goto yy_match;

			case EOB_ACT_LAST_MATCH:
				(yy_c_buf_p) =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];

				yy_current_state = yy_get_previous_state(  );

				yy_cp = (yy_c_buf_p);
				yy_bp = (yytext_ptr) + YY_MORE_ADJ;
				goto yy_find_action;
			}
		break;
		}

	default:
		YY_FATAL_ERROR(
			"fatal flex scanner internal error--no action found" );
	} /* end of action switch */
		} /* end of scanning one token */
	} /* end of user's declarations */
} /* end of yylex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int yy_get_next_buffer (void)
{
    	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	char *source = (yytext_ptr);
	int number_to_move, i;
	int ret_val;

	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
		{ /* Don't try to fill the buffer, so this is an EOF. */
		if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
			{
			/* We matched a single character, the EOB, so
			 * treat this as a final EOF.
			 */
			return EOB_ACT_END_OF_FILE;
			}

		else
			{
			/* We matched some text prior to the EOB, first
			 * process it.
			 */
			return EOB_ACT_LAST_MATCH;
			}
		}

	/* Try to read more data. */

	/* First move last chars to start of buffer. */
	number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1);

	for ( i = 0; i < number_to_move; ++i )
		*(dest++) = *(source++);

	if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
		/* don't do the read, it's not guaranteed to return an EOF,
		 * just force an EOF
		 */
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;

	else
		{
			int num_to_read =
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

		while ( num_to_read <= 0 )
			{ /* Not enough room in the buffer - grow it. */

			/* just a shorter name for the current buffer */
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;

			int yy_c_buf_p_offset =
				(int) ((yy_c_buf_p) - b->yy_ch_buf);

			if ( b->yy_is_our_buffer )
				{
				int new_size = b->yy_buf_size * 2;

				if ( new_size <= 0 )
					b->yy_buf_size += b->yy_buf_size / 8;
				else
					b->yy_buf_size *= 2;

				b->yy_ch_buf = (char *)
					/* Include room in for 2 EOB chars. */
					yyrealloc( (void *) b->yy_ch_buf,
							 (yy_size_t) (b->yy_buf_size + 2)  );
				}
			else
				/* Can't grow it, we don't own it. */
				b->yy_ch_buf = NULL;

			if ( ! b->yy_ch_buf )
				YY_FATAL_ERROR(
				"fatal error - scanner input buffer overflow" );

			(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];

			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

		/* Read in more data. */
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
			(yy_n_chars), num_to_read );

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	if ( (yy_n_chars) == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			yyrestart( yyin  );
			}

		else
			{
			ret_val = EOB_ACT_LAST_MATCH;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
		/* Extend the array by 50%, plus the number we really need. */
		int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
		YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
			(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size  );
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
		/* "- 2" to take care of EOB's */
		YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
	}

	(yy_n_chars) += number_to_move;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
	YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;

	(yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];

	return ret_val;
}

/* yy_get_previous_state - get the state just before the EOB char was reached */

    static yy_state_type yy_get_previous_state (void)
{
	yy_state_type yy_current_state;
	char *yy_cp;
    
	yy_current_state = (yy_start);
	yy_current_state += YY_AT_BOL();

	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
		{
		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
		if ( yy_accept[yy_current_state] )
			{
			(yy_last_accepting_state) = yy_current_state;
			(yy_last_accepting_cpos) = yy_cp;
			}
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 830 )
				yy_c = yy_meta[yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
		}

	return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
{
	int yy_is_jam;
    	char *yy_cp = (yy_c_buf_p);

	YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		(yy_last_accepting_state) = yy_current_state;
		(yy_last_accepting_cpos) = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 830 )
			yy_c = yy_meta[yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
	yy_is_jam = (yy_current_state == 829);

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

	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');

	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 = 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;
	}
}

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

static int yy_init_globals (void)
{
        /* Initialization is the same as for the non-reentrant scanner.
     * This function is called from yylex_destroy(), so don't allocate here.
     */

    (yy_buffer_stack) = NULL;
    (yy_buffer_stack_top) = 0;
    (yy_buffer_stack_max) = 0;
    (yy_c_buf_p) = NULL;
    (yy_init) = 0;
    (yy_start) = 0;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = NULL;
    yyout = NULL;
#endif

    /* For future reference: Set errno on error, since we are called by
     * yylex_init()
     */
    return 0;
}

/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy  (void)
{
    
    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){
		yy_delete_buffer( YY_CURRENT_BUFFER  );
		YY_CURRENT_BUFFER_LVALUE = NULL;
		yypop_buffer_state();
	}

	/* Destroy the stack itself. */
	yyfree((yy_buffer_stack) );
	(yy_buffer_stack) = NULL;

    /* Reset the globals. This is important in a non-reentrant scanner so the next time
     * yylex() is called, initialization will occur. */
    yy_init_globals( );

    return 0;
}

/*
 * Internal utility routines.
 */

#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, const char * s2, int n )
{
		
	int i;
	for ( i = 0; i < n; ++i )
		s1[i] = s2[i];
}
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (const char * s )
{
	int n;
	for ( n = 0; s[n]; ++n )
		;

	return n;
}
#endif

void *yyalloc (yy_size_t  size )
{
			return malloc(size);
}

void *yyrealloc  (void * ptr, yy_size_t  size )
{
		
	/* The cast to (char *) in the following accommodates both
	 * implementations that use char* generic pointers, and those
	 * that use void* generic pointers.  It works with the latter
	 * because both ANSI C and C++ allow castless assignment from
	 * any pointer type to void*, and deal with argument conversions
	 * as though doing an assignment.
	 */
	return realloc(ptr, size);
}

void yyfree (void * ptr )
{
			free( (char *) ptr );	/* see yyrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"

#line 1096 "scanner.l"


static void
error_literal (const char *type, const char *literal)
{
	char		lit_out[39];

	if (!literal_error) {
#if 0 /* national literal, check for different truncation and wcslen
		 or not show it at all */
		if (strcmp (type, "national") == 0) {
			cb_error (_("invalid national literal"), lit_out);
		} else {
#endif
		/* snip literal for output, if too long */
			strncpy (lit_out, literal, 38);
			if (strlen (literal) > 38) {
				strcpy (lit_out + 35, "...");
			} else {
				lit_out[38] = '\0';
			}
			if (strcmp (type, "") == 0) {
				cb_error (_("invalid literal: '%s'"), lit_out);
			} else if (strcmp (type, "hex") == 0) {
				cb_error (_("invalid hexadecimal literal: '%s'"), lit_out);
			} else if (strcmp (type, "num") == 0) {
				cb_error (_("invalid numeric literal: '%s'"), lit_out);
			} else if (strcmp (type, "float") == 0) {
				cb_error (_("invalid floating-point literal: '%s'"), lit_out);
			} else {
				cb_error (_("invalid %s literal: '%s'"), type, lit_out);
			}
#if 0 /* national literal */
		}
#endif
	}
	literal_error++;
	cb_error ("%s", err_msg);
}

static void
read_literal (const char mark, const char *type)
{
	size_t		i;
	int		c;

	literal_error = 0;

	i = 0;
	/* read until a not-escaped mark is found (see break)
	   or (unlikely) we reach EOF */
	/* NO early exit possible as the literal has to be consumed */
	while ((c = input ()) != EOF) {
#if EOF != 0
		if (unlikely (c == 0)) break;	/* fixes unexpected error case */
#endif
		if (!literal_error) {
			if (unlikely (i == plex_size)) {
				plex_size *= 2;
				if (unlikely (plex_size > (cb_lit_length + 1))) {
					plex_size = cb_lit_length + 1;
				}
				plex_buff = cobc_realloc (plex_buff, plex_size);
			}
			plex_buff[i] = (cob_u8_t)c;
		}
		if (c == mark && (c = input ()) != (int)mark) {
			if (c == '-') {
				/* Free format continuation ("a"- 'b'- ) */
				/* Hack it as concatenation */
				unput ('&');
			} else {
				if (c == EOF || c == 0) break;
				unput (c);
			}
			break;
		}
		/* check literal size here as we have to adjust and check
		   for (escaped) mark before checking the max length */
		if (unlikely (i++ == cb_lit_length)) {
			snprintf (err_msg, COB_MINI_MAX,
				_("literal length exceeds %d characters"),
				cb_lit_length);
			plex_buff[cb_lit_length] = 0; /* ensure valid C-string for error message */
			error_literal ("", plex_buff);
		}
	}
	/* FIXME: Exact behaviour should depend on level of support:
	    * "OK" => stanadard behaviour, e.g. normal items filled with spaces/
                      zeroes, DYNAMIC LENGTH items made empty
	    * "warning" => current implementation, interpret '' as SPACE/ZERO
	    * "ignore" => assume a space without warning; make sure zero length
                          items work everywhere (should do as we support zero
                          lengths via ODO items already)
	*/

	if (!i) {
		cb_verify (cb_zero_length_lit, _("zero-length literal"));
		cb_warning (COBC_WARN_FILLER,
			    type[0] == 'N' ?
			    _("national literal has zero length; a SPACE will be assumed") :
			    _("alphanumeric literal has zero length; a SPACE will be assumed"));
		plex_buff[i++] = ' ';
	} else if (i > cb_lit_length) {
		i = cb_lit_length;
	}

	/* build literal with given size */
	plex_buff[i] = 0;
	if (type[0] != 'N') {
		yylval = cb_build_alphanumeric_literal (plex_buff, i);
	} else {
		if (cb_verify (cb_national_literals, _("national literal"))) {
			CB_UNFINISHED (_("national literal"));
		}
		yylval = cb_build_national_literal (plex_buff, i);
	}
}

static int
scan_x (const char *text, const char *type)
{
	char		*p;
	char		*e;
	char		*dst;
	size_t		currlen;
	size_t		result_len;
	int		high = 1;
	int		c;
	cob_u64_t	val = 0;

	literal_error = 0;

	/* Remark:
	   The standard allows for 8,191 (normal/national/boolean) character positions */

	/* currlen includes the terminating quote
	   and has to be adjusted according to type */

	currlen = strlen (text);
	currlen--;
	if (currlen == 0) {
		cb_verify (cb_zero_length_lit, _("zero-length literal"));
		plex_buff[0] = '\0';
		plex_buff[1] = '\0';
		cb_warning (COBC_WARN_FILLER,
			    _("hexadecimal literal has zero length; X'00' will be assumed"));
		if (type[0] == 'B') {
			yylval = cb_build_numeric_literal (0, "0", 0);
		} else if (type[0] == 'N') {
			yylval = cb_build_alphanumeric_literal (plex_buff, 1);
		} else {
			yylval = cb_build_national_literal (plex_buff, 1);
		}
		RETURN_TOK (LITERAL);
	}

	if (unlikely (currlen + 1 > plex_size)) {
		plex_size = currlen + 1;
		plex_buff = cobc_realloc (plex_buff, plex_size);
	}
	memcpy (plex_buff, text, currlen);
	if (likely(type[0] == 'X')) {
		result_len = currlen / 2; /* characters, two half-bytes (hex) = 1 byte */
	} else if (type[0] == 'B') {
		if (!cb_verify (cb_hexadecimal_boolean, _("hexadecimal-boolean literal"))) {
			goto error; /* early exit possible as complete literal is consumed */
		}
		result_len = currlen * 4; /* boolean characters B -> 1110 */
		/* GnuCOBOL currently only support 64 bit booleans */
		if (unlikely (result_len > 64)) {
			snprintf (err_msg, COB_MINI_MAX,
				_("literal length %d exceeds %d characters"),
				  (int) result_len, 64);
			error_literal (type, plex_buff);
			goto error;
		}
	} else {
		if (!cb_verify (cb_national_hex_literals, _("hexadecimal-national literal"))) {
			goto error; /* early exit possible as complete literal is consumed */
		}
		CB_UNFINISHED (_("national literal"));
		result_len = currlen / (2 * COB_NATIONAL_SIZE); /* national characters */
	}
	if (unlikely (result_len > cb_lit_length)) {
		snprintf (err_msg, COB_MINI_MAX,
			_("literal length %d exceeds %d characters"),
			  (int) result_len, cb_lit_length);
		error_literal (type, plex_buff);
		goto error;
	}

	p = (char *)text;
	e = (char *)p + currlen;
	dst = plex_buff;

	if (unlikely(type[0] == 'B')) {
		/* hexadecimal-boolean */
		for (; *p != *e; p++) {
			c = (int) *p;
			if ('0' <= c && c <= '9') {
				val = (val << 4) + (c - '0');
			} else if ('A' <= c && c <= 'F') {
				val = (val << 4) + (c - 'A' + 10);
			} else if ('a' <= c && c <= 'f') {
				val = (val << 4) + (c - 'a' + 10);
			} else {
				snprintf (err_msg, COB_MINI_MAX,
					_("literal contains invalid character '%c'"), c);
				if (likely (literal_error == 0)) {
					memcpy (plex_buff, text, currlen + 1);
					plex_buff[currlen] = 0;
				}
				error_literal (type, plex_buff);
				/* By not breaking immediately, we detect any following
					invalid chars
				*/
				continue;
			}
		}
		if (unlikely (literal_error != 0)) {
			goto error;
		}
		sprintf ((char *)plex_buff, CB_FMT_LLU, val);
		yylval = cb_build_numeric_literal (0, (const void *)plex_buff, 0);

	} else {

		/* hexadecimal */
		for (; *p != *e; p++) {
			c = (int) *p;
			if ('0' <= c && c <= '9') {
				c = c - '0';
			} else if ('A' <= c && c <= 'F') {
				c = c - 'A' + 10;
			} else if ('a' <= c && c <= 'f') {
				c = c - 'a' + 10;
			} else {
				snprintf (err_msg, COB_MINI_MAX,
					_("literal contains invalid character '%c'"), c);
				if (likely (literal_error == 0)) {
					memcpy (plex_buff, text, currlen + 1);
					plex_buff[currlen] = 0;
				}
				error_literal (type, plex_buff);
				/* By not breaking immediately, we detect any following
					invalid chars
				*/
				continue;
			}
			if (likely (literal_error == 0)) {
				if (high) {
					*dst = (cob_u8_t)(c << 4);
				} else {
					*dst++ += (cob_u8_t)c;
				}
			}
			high = 1 - high;
		}

		if (!high) {
			/* This is non-standard behaviour */
			snprintf (err_msg, COB_MINI_MAX,
				_("literal does not have an even number of digits"));
			if (likely (literal_error == 0)) {
				memcpy (plex_buff, text, currlen + 1);
				plex_buff[currlen] = 0;
			}
			error_literal (type, plex_buff);
		}
		if (unlikely (literal_error != 0)) {
			goto error;
		}
		if (type[0] != 'N') {
			yylval = cb_build_alphanumeric_literal (plex_buff, (size_t)(dst - plex_buff));
		} else {
			yylval = cb_build_national_literal (plex_buff, (size_t)(dst - plex_buff));
		}
	}

	RETURN_TOK (LITERAL);

error:
	yylval = cb_error_node;
	RETURN_TOK (LITERAL);
}

static int
scan_z (const char *text, const char *type)
{
	size_t		currlen;

	literal_error = 0;

	/* currlen includes the terminating quote */
	currlen = strlen (text);
	if (unlikely ((currlen - 1) > cb_lit_length)) {
		currlen--;
		snprintf (err_msg, COB_MINI_MAX,
			_("literal length %d exceeds %d characters"),
			  (int) currlen, cb_lit_length);
		error_literal (type, text);
		goto error;
	} else if (unlikely (currlen == 1)) {
		currlen--;
	        snprintf (err_msg, COB_MINI_MAX,
			  _("%s literals must contain at least one character"),
			  type);
		error_literal (type, "");
		goto error;
	}
	if (unlikely (currlen > plex_size)) {
		plex_size = currlen;
		plex_buff = cobc_realloc (plex_buff, plex_size);
	}
	memcpy (plex_buff, text, currlen);
	plex_buff[currlen - 1] = 0;

	/* Count is correct here as the trailing quote is now a null */
	yylval = cb_build_alphanumeric_literal (plex_buff, currlen);
	if (type[0] == 'L') {
		CB_LITERAL(yylval)->llit = 1;
	}
	RETURN_TOK (LITERAL);

 error:
	yylval = cb_error_node;
	RETURN_TOK (LITERAL);
}

static int
scan_h (const char *text, const char *type)
{
	size_t		currlen;
	char		*p;
	cob_u64_t	val = 0;
	int		c;

	literal_error = 0;

	if (type[1] == '#' &&
		!cb_verify (cb_acu_literals, _("ACUCOBOL numeric literal"))) {
		goto error; /* early exit possible as complete literal is consumed */
	}

	/* currlen can include the terminating quote */
	currlen = strlen (text);
	memcpy (plex_buff, text, currlen + 1);
	if (type[1] != '#') {
		currlen--;
		if (currlen == 0) {
			cb_error (_("H literals must contain at least one character"));
			goto error;
		}
		plex_buff[currlen] = 0;
	}
	if (unlikely (currlen > 16)) {
		snprintf (err_msg, COB_MINI_MAX,
			_("literal length %d exceeds %d characters"),
			  (int) currlen,  16);
		error_literal ("hex", plex_buff);
		goto error;
	}

	for (p = plex_buff; *p != 0; p++) {
		c = (int) *p;
		if ('0' <= c && c <= '9') {
			c = c - '0';
		} else if ('A' <= c && c <= 'F') {
			c = c - 'A' + 10;
		} else if ('a' <= c && c <= 'f') {
			c = c - 'a' + 10;
		} else {
			snprintf (err_msg, COB_MINI_MAX,
				_("literal contains invalid character '%c'"), c);
			error_literal (type, plex_buff);
			/* By not breaking immediately, we detect any following
				invalid chars
			*/
			continue;
		}

		val = (val << 4) + c;
	}

	if (type[1] == '#') {
		/* limit for ACUCOBOL literals: UINT_MAX */
		if (val > UINT_MAX) {
			snprintf (err_msg, COB_MINI_MAX,
				_("literal exceeds limit %u"), UINT_MAX);
			error_literal (type, plex_buff);
		}
	}

	if (literal_error) {
		goto error;
	}

	/* Duplication? */
	sprintf ((char *)plex_buff, CB_FMT_LLU, val);
	yylval = cb_build_numeric_literal (0, (const void *)plex_buff, 0);

	RETURN_TOK (LITERAL);

error:
	yylval = cb_error_node;
	RETURN_TOK (LITERAL);
}

static int
scan_b (const char *text, const char *type)
{
	/* FIXME: COBOL 2014 allows up to 8,192 boolean characters
	          COBOL 2002 allows up to   160 boolean characters
	          --> both identical to "literal-length" maximum
	          GnuCOBOL currently only supports 64 boolean characters,
	   check if it works to concatenate after 64 characters, similar to read_literal()
	*/

	size_t		currlen;
	char		*p;
	cob_u64_t	val = 0;
	int		c;

	literal_error = 0;

	/* currlen can include the terminating quote */
	currlen = strlen (text);

	if (type[1] == 0) {
		if (!cb_verify (cb_numeric_boolean, _("numeric boolean literal"))) {
			goto error; /* early exit possible as complete literal is consumed */
		}
		if (currlen == 1) {
			cb_verify (cb_zero_length_lit, _("zero-length literal"));
			cb_warning (COBC_WARN_FILLER,
				    _("Boolean literal has zero length; B'0' will be assumed"));
			/* FIXME: we should really build a boolean literal... */
			yylval = cb_build_numeric_literal (0, "0", 0);
			RETURN_TOK (LITERAL);
		}
	} else {
		if (!cb_verify (cb_acu_literals, _("ACUCOBOL numeric literal"))) {
			goto error; /* early exit possible as complete literal is consumed */
		}
	};
	if (unlikely (currlen >= plex_size)) {
		currlen = plex_size - 1;
	}
	memcpy (plex_buff, text, currlen + 1);
	if (type[1] == 0) {
		currlen--;
	}
	plex_buff[currlen] = 0;
	if (unlikely (currlen > 64)) {
		snprintf (err_msg, COB_MINI_MAX,
			_("literal length %d exceeds %d characters"),
			  (int) currlen, 64);
		error_literal (type, plex_buff);
		goto error;
	}

	for (p = plex_buff; *p != 0; p++) {
		c = (int) *p;
		if (c == '0') {
			c = 0;
		} else if (c == '1') {
			c = 1;
		} else {
			snprintf (err_msg, COB_MINI_MAX,
				_("literal contains invalid character '%c'"), c);
			error_literal (type, plex_buff);
			continue;
		}

		val = (val << 1) + c;
	}
	if (type[1] == '#') {
		/* limit for ACUCOBOL literals: UINT_MAX */
		if (val > UINT_MAX) {
			snprintf (err_msg, COB_MINI_MAX,
				_("literal exceeds limit %u"), UINT_MAX);
			error_literal (type, plex_buff);
		}
	}

	if (literal_error) {
		goto error;
	}

	sprintf ((char *)plex_buff, CB_FMT_LLU, val);
	/* FIXME: we should likely build a boolean literal ... */
	yylval = cb_build_numeric_literal (0, (const void *)plex_buff, 0);

	RETURN_TOK (LITERAL);

 error:
	yylval = cb_error_node;
	RETURN_TOK (LITERAL);
}

static int
scan_o (const char *text, const char *type)
{
	size_t		currlen;
	char		*p;
	cob_u64_t	val = 0;
	int		c;

	literal_error = 0;

	if (!cb_verify (cb_acu_literals, _("ACUCOBOL numeric literal"))) {
		goto error; /* early exit possible as complete literal is consumed */
	}

	currlen = strlen (text);
	memcpy (plex_buff, text, currlen + 1);
	if (unlikely (currlen > 22)) {
		snprintf (err_msg, COB_MINI_MAX,
			  _("literal length %d exceeds %d characters"),
			  (int) currlen, 22);
		error_literal (type, plex_buff);
		goto error;
	}

	for (p = plex_buff; *p != 0; p++) {
		c = (int) *p;
		if (!('0' <= c && c <= '7')) {
			snprintf (err_msg, COB_MINI_MAX,
				_("literal contains invalid character '%c'"), c);
			error_literal (type, plex_buff);
			continue;
		}

		c = c - '0';
		val = (val << 3) + c;
	}
	/* limit for ACUCOBOL literals: UINT_MAX */
	if (val > UINT_MAX) {
		snprintf (err_msg, COB_MINI_MAX,
			_("literal exceeds limit %u"), UINT_MAX);
		error_literal (type, plex_buff);
	}

	if (literal_error) {
		goto error;
	}

	sprintf ((char *)plex_buff, CB_FMT_LLU, val);
	yylval = cb_build_numeric_literal (0, (const void *)plex_buff, 0);

	RETURN_TOK (LITERAL);

 error:
	yylval = cb_error_node;
	RETURN_TOK (LITERAL);
}

static int
get_sign (const char sign)
{
	if (sign == '+') {
		return 1;
	} else if (sign == '-') {
		return -1;
	} else {
		return 0;
	}
}

#define INCREMENT_IF_SIGNED(text, sign) \
	do {				\
		if (sign) {		\
			(text)++;	\
		}			\
	} ONCE_COB

static int
scan_numeric (const char *text)
{
	char		*p = (char *)text;
	char		*s;
	int 		sign;
	int 		scale;

	/* Get sign */
	sign = get_sign (*p);
	INCREMENT_IF_SIGNED (p, sign);

	/* Get decimal point */
	s = strchr (p, current_program->decimal_point);
	if (s) {
		scale = (int)strlen (s) - 1;
		/* Remove decimal point */
		/* Moves trailing null */
		memmove (s, s + 1, (size_t)(scale + 1));
	} else {
		scale = 0;
	}

	/* Note that leading zeroes are not removed from the literal. */

	if (unlikely (strlen (p) > COB_MAX_DIGITS)) {
		/* Absolute limit */
		snprintf (err_msg, COB_MINI_MAX,
			  _("literal length %d exceeds maximum of %d digits"),
			  (int) strlen (p), COB_MAX_DIGITS);
		error_literal ("num", text);
		yylval = cb_error_node;
	} else if (unlikely (strlen (p) > cb_numlit_length)) {
		snprintf (err_msg, COB_MINI_MAX,
			  _("literal length %d exceeds %d digits"),
			  (int) strlen (p), cb_numlit_length);
		error_literal ("num", text);
		yylval = cb_error_node;
	} else {
		yylval = cb_build_numeric_literal (sign, p, scale);
	}
	RETURN_TOK (LITERAL);
}

static int
all_zeroes (const char *str)
{
	int	i;

	for (i = 0; str[i] != '\0'; ++i) {
		if (str[i] != '0') {
			return 0;
		}
	}

	return 1;
}

static int
significand_is_zero (const char *int_part, const char *dec_part)
{
	return all_zeroes (int_part)
		&& all_zeroes (dec_part);
}

	/* Note: Exponent *digits* in literals according to COBOL 202x: 36 */
#define COB_FLOAT_DIGITS_MAX         36
#define COB_FLOAT_DIGITS_CHCK_MAX    37
#define COB_FLOAT_DIGITS_STR_MAX     38

#define COB_FLOAT_DIGITS_WIDTH	"%" CB_XSTRINGIFY(COB_FLOAT_DIGITS_STR_MAX)

static int
scan_floating_numeric (const char *text)
{
	size_t		sig_int_len;
	size_t		sig_dec_len;
	int		sig_sign;
	int		exp_sign;
	int		scale;
	int		exponent;
	int		n;
	char		significand_str[COB_FLOAT_DIGITS_STR_MAX + 1] = { '\0' };
	char		*significand_pos;
	char		significand_dec[COB_FLOAT_DIGITS_STR_MAX + 1] = { '\0' };
	char		significand_int[COB_FLOAT_DIGITS_STR_MAX + 1] = { '\0' };
	char		exponent_str[8] = { '\0' };
	char		*exponent_pos;

	char		result[128] = { '\0' };

	literal_error = 0;

	/* Separate into significand and exponent */
	n = sscanf (text, COB_FLOAT_DIGITS_WIDTH "[0-9.,+-]%*1[Ee]%7[0-9.,+-]",
		  significand_str, exponent_str);
	/* We check the return for silencing warnings, but
	   this should actually never happen as the flex rule ensures this */
	/* LCOV_EXCL_START */
	if (n == 0) {
#if 1
		/* This should never happen (and therefore doesn't get a translation) */
		cb_error ("flex rule for scan_floating_numeric is wrong");
		COBC_ABORT();
#else
		yylval = cb_error_node;
		RETURN_TOK (LITERAL);
#endif
	}
	/* LCOV_EXCL_STOP */

	/* Get signs and adjust string positions accordingly */
	significand_pos = &significand_str[0];
	sig_sign = get_sign (*significand_pos);
	INCREMENT_IF_SIGNED (significand_pos, sig_sign);

	exponent_pos = &exponent_str[0];
	exp_sign = get_sign (*exponent_pos);
	INCREMENT_IF_SIGNED (exponent_pos, exp_sign);

	/* Separate significand into integer and decimal */
	n = sscanf (significand_pos,
		  COB_FLOAT_DIGITS_WIDTH "[0-9]%*1[.,]" COB_FLOAT_DIGITS_WIDTH "[0-9]",
		  significand_int, significand_dec);
	if (n == 0) { /* no integer part, copy after decimal-point */
		significand_int[0] = 0;
		strncpy (significand_dec, significand_pos + 1, COB_FLOAT_DIGITS_STR_MAX);
		significand_dec[COB_FLOAT_DIGITS_STR_MAX] = 0;
	} else {
	/* silencing some warnings */
		significand_int[COB_FLOAT_DIGITS_STR_MAX] = 0;
		significand_dec[COB_FLOAT_DIGITS_STR_MAX] = 0;
	}

	/* Validation and exponent handling */
	sig_int_len = strlen (significand_int);
	sig_dec_len = strlen (significand_dec);
	exponent = 0;

	if (sig_int_len + sig_dec_len > COB_FLOAT_DIGITS_MAX) {
		snprintf (err_msg, COB_MINI_MAX,
			_("significand has more than %d digits"), COB_FLOAT_DIGITS_MAX);
		error_literal ("float", text);
	} else {
		if (strchr (exponent_pos, current_program->decimal_point)) {
			snprintf (err_msg, COB_MINI_MAX,
				_("exponent has decimal point"));
			error_literal ("float", text);
		} else {
			if (strlen (exponent_pos) > 4) {
				snprintf (err_msg, COB_MINI_MAX,
					_("exponent has more than 4 digits"));
				error_literal ("float", text);
			} else {
				n = sscanf (exponent_pos, "%d", &exponent);
				/* We check the return for silencing warnings, but
				   this should actually never happen as the flex rule ensures this */
				/* LCOV_EXCL_START */
				if (n == 0) {
#if 1
					/* This should never happen (and therefore doesn't get a translation) */
					cb_error ("flex rule for scan_floating_numeric is wrong");
					COBC_ABORT();
#else
					yylval = cb_error_node;
					RETURN_TOK (LITERAL);
#endif
				}
				/* LCOV_EXCL_STOP */
			}

			if (exp_sign == -1) {
				exponent = -exponent;
			}

			/* "The maximum permitted value and minimum permitted value of
			    the exponent is implementor-defined" */
			/* Exponent range -383  thru +384  for FLOAT-DECIMAL-16 */
			/* Exponent range -6143 thru +6144 for FLOAT-DECIMAL-34 */
			if (!(-6143 <= exponent && exponent <= 6144)) {
				snprintf (err_msg, COB_MINI_MAX,
					_("exponent not between -6143 and 6144"));
				error_literal ("float", text);
			}
		}
	}

	if (significand_is_zero (significand_int, significand_dec)) {
		if (sig_sign == -1) {
			snprintf (err_msg, COB_MINI_MAX,
				_("significand of 0 must be positive"));
			error_literal ("float", text);
		}
		if (exponent != 0) {
			snprintf (err_msg, COB_MINI_MAX,
				_("exponent of 0 must be 0"));
			error_literal ("float", text);
		}
		if (exp_sign == -1) {
			snprintf (err_msg, COB_MINI_MAX,
				_("exponent of 0 must be positive"));
			error_literal ("float", text);
		}
	}

	if (literal_error) {
		yylval = cb_error_node;
		RETURN_TOK (LITERAL);
	}

	/* Literal data */
	strcpy (result, significand_int);
	strcat (result, significand_dec);

	/* Determine scale */
	/* Base scale is decimal part of the significant */
	scale = (int)sig_dec_len;
	if (exponent < 0) {
		/* Decimals; power down by scale difference */
		scale = - (exponent - scale);
	} else if (exponent > 0) {
		/* No decimals; power up by scale difference */
		if (exponent >= scale) {
			scale = - (exponent - scale);
		} else {
			scale -= exponent;
		}
	}

	yylval = cb_build_numeric_literal (sig_sign, result,
					   scale);
	RETURN_TOK (LITERAL);
}

static void
scan_picture (const char *text)
{
	unsigned char			*p;

	/* Scan a PICTURE clause */
	/* Normalize the input */
	for (p = (unsigned char *)text; *p; p++) {
		/* unput trailing '.' or ',' */
		if (p[1] == 0 && (*p == '.' || *p == ',')) {
			unput (*p);
			*p = 0;
			break;
		}
		*p = (unsigned char)toupper (*p);
	}

	yylval = cb_build_picture (text);
}

static void
count_lines (const char *text)
{
	const char	*p;

	/* Count newlines in text */
	for (p = text; *p; p++) {
		if (*p == '\n') {
			cb_source_line++;
		}
	}
}

static void
cb_add_const_var (const char *name, cb_tree value)
{
	cb_tree			x;
	struct cb_level_78	*p78;
	struct cb_field		*f;

	/* Add an inline constant */
	x = cb_build_constant (cb_build_reference (name), value);
	f = CB_FIELD (x);
	f->flag_item_78 = 1;
	f->flag_is_global = 1;
	f->flag_internal_constant = 1;
	f->level = 1;
	(void)cb_validate_78_item (f, 1);

	/* Add constant item */
	p78 = cobc_malloc (sizeof(struct cb_level_78));
	p78->fld_78 = f;
	p78->prog = NULL;
	p78->name_len = (cob_u32_t)strlen (f->name);
	/* RXWRXW - Check this */
	p78->chk_const = 0;
	if (!const_78_ptr) {
		p78->last = p78;
	} else {
		p78->last = const_78_ptr->last;
	}
	p78->next = const_78_ptr;
	p78->glob_next = const_78_ptr;
	const_78_ptr = p78;
	if (glob_lev_78_ptr) {
		glob_lev_78_ptr->last->glob_next = const_78_ptr;
	} else if (lev_78_ptr) {
		lev_78_ptr->last->glob_next = const_78_ptr;
	} else {
		top_78_ptr = const_78_ptr;
	}
}

static void
scan_define_options (const char *text)
{
	char				*p;
	char				*s;
	char				*var;
	const struct cb_level_78	*p78;
	char				*q;
	unsigned char			*t;
	cb_tree				x;
	size_t				size;
	int				scale;
	int				sign, override;

	/* Scan a source inline define */
	p = cobc_strdup (text);

	q = &p[strlen(p)-1];
	while(q != p
	   && (isspace(*q) || *q == '\n' || *q == '\r'))
		q--;
	q = q - 7;
	if (memcmp(q,"OVERRIDE",8) == 0) {
		override = 1;
		while (q[-1] == ' ') q--;
		strcpy(q,"\n");
	} else {
		override = 0;
	}

	/* Ignore first part */
	s = strtok (p, " ");

	/* Variable name */
	s = strtok (NULL, " \n");
	if (!s) {
		cobc_free (p);
		return;
	}

	/* Check for already defined constant */
	if (!override) {
		for (p78 = top_78_ptr; p78; p78 = p78->glob_next) {
			if (strcasecmp (s, p78->fld_78->name) == 0) {
				cobc_free (p);
				return;
			}
		}
	}

	var = cobc_strdup (s);

	/* Value */
	s = strtok (NULL, "\n");
	if (!s) {
		cb_error (_("invalid CONSTANT: %s"), var);
		goto freevar;
	}

	if (*s == '"' || *s == '\'') {
		/* Alphanumeric literal */
		sign = *s;
		size = strlen (s);
		q = s + size - 1;
		if (q == s || *q != sign) {
			cb_error (_("invalid alphanumeric CONSTANT: %s"), s);
			goto freevar;
		}
		if (size < 3) {
			cb_error (_("empty alphanumeric CONSTANT: %s"), s);
			goto freevar;
		}
		*q = 0;
		size -= 2;
		x = cb_build_alphanumeric_literal (s + 1, size);
	} else {
		/* Get sign */
		sign = get_sign (*s);
		INCREMENT_IF_SIGNED (s, sign);

		/* Get decimal point */
		scale = 0;
		q = strchr (s, '.');
		if (q) {
			scale = (int)strlen (q) - 1;
			if (scale < 1) {
				cb_error (_("invalid numeric CONSTANT: %s"), s);
				goto freevar;
			}
			/* Remove decimal point */
			memmove (q, q + 1, (size_t)(scale + 1));
		}
		for (t = (unsigned char *)s; *t; ++t) {
			if (*t < '0' || *t  > '9') {
				cb_error (_("invalid numeric CONSTANT: %s"), s);
				goto freevar;
			}
		}
		if (strlen (s) > COB_MAX_DIGITS) {
			cb_error (_("invalid numeric CONSTANT: %s"), s);
			goto freevar;
		}

		x = cb_build_numeric_literal (sign, s, scale);
	}
	/* Add to constant list */
	cb_add_const_var (var, x);

freevar:
	cobc_free (p);
	cobc_free (var);
}

#undef INCREMENT_IF_SIGNED

/*
  For yytext of the form '#directive "a-word"' or '#directive
  (first-word) (second-word)', copy a-word into word.
*/
static void
copy_word_in_quotes (char ** const word)
{
	char	*text = cobc_strdup (yytext);
	char	*word_str;

	/* Skip directive */
	word_str = strtok (text, " ");

	/* Get word and remove quotes */
	word_str = strtok (NULL, "\n");
	*word = cobc_malloc (strlen (word_str) - 1);
	strncpy (*word, word_str + 1, strlen (word_str) - 2);

	cobc_free (text);
}

/*
   For yytext of the form '#directive "first-word" "second-word"' or '#directive
   (first-word) (second-word)', allocate copies of first-word for word1 and
   second-word for word2.
*/
static void
copy_two_words_in_quotes (char ** const word1, char ** const word2)
{
	char	*text = cobc_strdup (yytext);
	char	*word1_str;
	char	*word2_str;

	/* Skip directive. */
        word1_str = strtok (text, " ");

	/* Get words and remove surrounding quotes. */

	word1_str = strtok (NULL, " ");
	*word1 = cobc_malloc (strlen (word1_str) - 1);
	strncpy (*word1, word1_str + 1, strlen (word1_str) - 2);

	word2_str = strtok (NULL, "\n");
	*word2 = cobc_malloc (strlen (word2_str) - 1);
	strncpy (*word2, word2_str + 1, strlen (word2_str) - 2);

	cobc_free (text);
}

static void
add_synonym (const int synonym_replaces_original)
{
	char	*word;
	char	*synonym;

	copy_two_words_in_quotes (&word, &synonym);

	if (!is_default_reserved_word (word)) {
		cb_error (_("'%s' is not a default reserved word, so cannot be aliased"),
			  word);
	} else if (is_reserved_word (synonym)) {
		cb_error (_("'%s' is already reserved; you may want MAKESYN instead"),
			  synonym);
	} else {
		if (synonym_replaces_original) {
			remove_reserved_word_now (word);
		}
		add_reserved_word_now (synonym, word);
	}

	cobc_free (word);
	cobc_free (synonym);
}

/* Global functions */

void
ylex_clear_all (void)
{
	/* Clear buffers after parsing all source elements */
	if (pic_buff2) {
		cobc_free (pic_buff2);
		pic_buff2 = NULL;
	}
	if (pic_buff1) {
		cobc_free (pic_buff1);
		pic_buff1 = NULL;
	}
	if (plex_buff) {
		cobc_free (plex_buff);
		plex_buff = NULL;
	}
	plex_size = 0;
	pic1_size = 0;
	pic2_size = 0;

	cb_reset_78 ();
	cb_reset_global_78 ();
}

void
ylex_call_destroy (void)
{
	/* Release flex buffers */
	(void)yylex_destroy ();
	const_78_ptr = NULL;
}

void
cb_unput_dot (void)
{
	unput ('.');
}

void
cb_reset_78 (void)
{
	struct cb_level_78	*p78;
	struct cb_level_78	*p782;

	/* Remove constant (78 level) items for current program */
	for (p78 = lev_78_ptr; p78; ) {
		p782 = p78->next;
		cobc_free (p78);
		p78 = p782;
	}
	lev_78_ptr = NULL;
	for (p78 = glob_lev_78_ptr; p78; p78 = p78->next) {
		p78->not_const = 0;
	}
	if (glob_lev_78_ptr) {
		top_78_ptr = glob_lev_78_ptr;
	} else {
		top_78_ptr = const_78_ptr;
	}
}

void
cb_reset_global_78 (void)
{
	struct cb_level_78	*p78;
	struct cb_level_78	*p782;

	/* Remove constant (78 level) items for top program */
	for (p78 = glob_lev_78_ptr; p78; ) {
		p782 = p78->next;
		cobc_free (p78);
		p78 = p782;
	}
	glob_lev_78_ptr = NULL;
	top_78_ptr = const_78_ptr;
}

void
cb_add_78 (struct cb_field *f)
{
	struct cb_level_78	*p78;

	/* Add a constant (78 level) item */
	p78 = cobc_malloc (sizeof(struct cb_level_78));
	p78->fld_78 = f;
	p78->prog = current_program;
	p78->name_len = (cob_u32_t)strlen (f->name);
	if (f->flag_is_global) {
		if (!glob_lev_78_ptr) {
			p78->last = p78;
		} else {
			p78->last = glob_lev_78_ptr->last;
		}
		p78->last->glob_next = const_78_ptr;
		p78->next = glob_lev_78_ptr;
		p78->glob_next = glob_lev_78_ptr;
		p78->chk_const = 1;
		glob_lev_78_ptr = p78;
		if (lev_78_ptr) {
			lev_78_ptr->last->glob_next = glob_lev_78_ptr;
		} else {
			top_78_ptr = glob_lev_78_ptr;
		}
	} else {
		if (!lev_78_ptr) {
			p78->last = p78;
		} else {
			p78->last = lev_78_ptr->last;
		}
		if (glob_lev_78_ptr) {
			p78->last->glob_next = glob_lev_78_ptr;
		} else {
			p78->last->glob_next = const_78_ptr;
		}
		p78->next = lev_78_ptr;
		p78->glob_next = lev_78_ptr;
		lev_78_ptr = p78;
		top_78_ptr = lev_78_ptr;
	}
}

struct cb_field *
check_level_78 (const char *name)
{
	const struct cb_level_78	*p78;

	/* Check against a current constant (78 level) */
	for (p78 = lev_78_ptr; p78; p78 = p78->next) {
		if (strcasecmp (name, p78->fld_78->name) == 0) {
			return p78->fld_78;
		}
	}
	/* Check against a global constant (78 level) */
	for (p78 = glob_lev_78_ptr; p78; p78 = p78->next) {
		if (strcasecmp (name, p78->fld_78->name) == 0) {
			return p78->fld_78;
		}
	}
	return NULL;
}

/*
  Find program with the program-name name in defined_prog_list. If it is not
  there, return NULL.
*/
struct cb_program *
cb_find_defined_program_by_name (const char *name)
{
	int	(*cmp_func)(const char *, const char *);
	cb_tree	l;
	cb_tree	x;

	if (cb_fold_call) {
		cmp_func = &strcasecmp;
	} else {
		cmp_func = &strcmp;
	}

	for (l = defined_prog_list; l; l = CB_CHAIN (l)) {
		x = CB_VALUE (l);
		if ((*cmp_func)(name, CB_PROGRAM (x)->program_name) == 0) {
			return CB_PROGRAM (x);
		}
	}

	return NULL;
}

struct cb_program *
cb_find_defined_program_by_id (const char *orig_id)
{
	cb_tree	l;
	cb_tree	x;

	for (l = defined_prog_list; l; l = CB_CHAIN (l)) {
		x = CB_VALUE (l);
		if (strcmp (orig_id, CB_PROGRAM (x)->orig_program_id) == 0) {
			return CB_PROGRAM (x);
		}
	}

	return NULL;
}

