#line 2 "pgc.c"

#line 4 "pgc.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 5
#define YY_FLEX_SUBMINOR_VERSION 35
#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

/* 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;
#endif /* ! C99 */

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

#endif /* ! FLEXINT_H */

#ifdef __cplusplus

/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST

#else	/* ! __cplusplus */

/* C99 requires __STDC__ to be defined as 1. */
#if defined (__STDC__)

#define YY_USE_CONST

#endif	/* defined (__STDC__) */
#endif	/* ! __cplusplus */

#ifdef YY_USE_CONST
#define yyconst const
#else
#define yyconst
#endif

/* Returned upon end-of-file. */
#define YY_NULL 0

/* Promotes a possibly negative, possibly signed char to an unsigned
 * integer for use as an array index.  If the signed char is negative,
 * we want to instead treat it as an 8-bit unsigned char, hence the
 * double cast.
 */
#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)

/* 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
#define YY_BUF_SIZE 16384
#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

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

    /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
     *       access to the local variable yy_act. Since yyless() is a macro, it would break
     *       existing scanners that call yyless() from OUTSIDE yylex. 
     *       One obvious solution it to make yy_act a global. I tried that, and saw
     *       a 5% performance hit in a non-yylineno scanner, because yy_act is
     *       normally declared as a register variable-- so it is not worth it.
     */
    #define  YY_LESS_LINENO(n) \
            do { \
                int yyl;\
                for ( yyl = n; yyl < yyleng; ++yyl )\
                    if ( yytext[yyl] == '\n' )\
                        --yylineno;\
            }while(0)
    
/* 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_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#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.
	 */
	yy_size_t 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 = 0; /**< 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 = (char *) 0;
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 (yyconst char *yy_str  );
YY_BUFFER_STATE yy_scan_bytes (yyconst 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 */

#define yywrap(n) 1
#define YY_SKIP_YYWRAP

typedef unsigned char YY_CHAR;

FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;

typedef int yy_state_type;

extern int yylineno;

int yylineno = 1;

extern char *yytext;
#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 yy_fatal_error (yyconst 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 = (size_t) (yy_cp - yy_bp); \
	(yy_hold_char) = *yy_cp; \
	*yy_cp = '\0'; \
	(yy_c_buf_p) = yy_cp;

#define YY_NUM_RULES 118
#define YY_END_OF_BUFFER 119
/* 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 yyconst flex_int16_t yy_accept[478] =
    {   0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,   12,   12,    0,    0,    0,    0,    0,    0,
       11,   11,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,  119,  118,  118,  118,  118,   95,   73,   73,
       95,   41,   95,   58,   67,   95,   19,   71,   72,   66,
       69,   65,   70,   95,   68,   48,   48,   64,   95,   78,
       95,   63,   63,   76,   77,   74,   95,   75,   56,    1,
        1,   46,   36,   46,   44,   45,   19,   45,   45,   45,
       45,   48,   45,   55,   55,   55,   55,   55,  118,  118,
      118,  118,  118,  118,  114,  114,  114,  114,  114,  113,

      112,   12,    9,    5,    5,    6,    6,   40,   37,   42,
       38,   42,   11,   16,   24,   24,   21,   29,   33,   33,
       35,  118,  110,   73,   73,  110,  110,   50,    2,   50,
        0,    0,    0,   87,    0,   62,   62,    0,    0,    0,
        0,    0,   92,   83,   90,   84,   88,   85,   89,   79,
       94,   50,    0,   91,   50,   48,    0,   60,   81,   86,
       80,   63,   20,   63,   82,    1,    0,   46,   46,   31,
       47,   30,    1,   50,    2,   50,   48,   52,   43,   54,
       55,    8,   18,   15,    0,  117,    0,   50,    2,   50,
        0,    0,    0,  113,  112,   12,    9,    9,   10,    5,

        7,    4,    3,   40,   39,   42,   11,   16,   16,   17,
       24,   21,   21,   23,   22,   25,   26,   25,   33,   32,
       34,    0,    0,  111,    0,    0,    2,   50,    0,    0,
       62,   62,    0,    0,    0,    0,    0,   93,    0,   59,
       50,    0,   51,   60,   63,   30,    1,    1,    2,   50,
       48,   53,   54,    0,    0,    0,  116,    2,   50,  115,
        9,   14,   10,    9,    3,   16,   13,   17,   16,   21,
       28,   22,   21,   26,   27,   34,    0,    0,    0,    0,
        0,    0,    0,    0,    0,   63,    0,   50,   48,   54,
        0,    0,    0,   54,  116,  116,  115,  115,    9,    9,

        9,    9,   16,   16,   16,   16,   21,   21,   21,   21,
       26,   27,    0,    0,    0,  105,  107,    0,    0,    0,
        0,    0,   63,    0,   50,   50,   54,    0,    0,    0,
        0,    9,    9,    9,    9,    9,   16,   16,   13,   16,
       16,   21,   21,   21,   21,   21,    0,    0,    0,    0,
      105,  107,    0,  101,    0,    0,    0,   63,    0,    0,
       50,    0,    0,    0,    0,   54,   54,    9,   16,   21,
        0,    0,   97,    0,  109,  101,  103,    0,    0,   57,
       49,    0,    0,    0,    0,    0,   54,    0,   61,   97,
      103,   99,   57,   57,   63,   63,   63,   49,   54,    0,

        0,    0,   61,   61,   61,   99,    0,    0,   63,   63,
       63,   63,   63,   49,   54,    0,    0,    0,   61,    0,
        0,   63,   63,   63,   63,   63,   63,   63,    0,    0,
        0,    0,    0,    0,    0,   63,   63,   63,   63,   63,
       63,   63,  104,    0,    0,    0,    0,    0,    0,   63,
      104,    0,  106,   63,   63,   63,   63,    0,  100,    0,
        0,    0,   63,    0,  108,  100,   63,   63,  102,   96,
        0,   96,  102,   63,   98,   98,    0
    } ;

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

       33,   34,   35,   35,   36,   35,   35,   37,   35,   38,
       35,   35,   39,   35,   40,   35,   41,   35,   35,   47,
       35,   35,   48,   49,   50,   28,    1,   35,   35,   35,
       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,

       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
       35,   35,   35,   35,   35,   35,   35,   35,   35,   35,
       35,   35,   35,   35,   35
    } ;

static yyconst flex_int32_t yy_meta[51] =
    {   0,
        1,    2,    3,    3,    4,    5,    4,    6,    7,    4,
        8,    9,    9,   10,    7,    1,   11,   12,   10,   13,
       13,   13,   14,   15,   16,    4,   17,    4,   18,   18,
       18,   18,   18,   18,   19,   19,   19,   19,   19,   19,
       19,   19,   12,   20,    9,    4,   19,    1,    4,    1
    } ;

static yyconst flex_int16_t yy_base[528] =
    {   0,
        0,    5,   27,    0,   77,    0,  122,  144,  170,  193,
      200,    0, 1153, 1151,  243,  288, 1155, 1146,  123,  126,
     1135, 1132,  134,  149,    0,    1,    0,    0,  309,    0,
      151,  173, 1131, 2208,  113, 1116,  165, 2208,    3,    9,
     1094, 2208,  220,  125, 1085, 1100, 2208, 2208, 2208, 1082,
      183, 2208,  199,  245,  235,  254,  261, 2208, 1082, 1079,
     1077,    0,  244, 2208, 2208, 2208, 1053, 2208, 2208,  197,
      315,    0, 2208,  354,  303,    0, 2208, 2208, 1084,  223,
     1075,  288, 1065,    0, 1075, 1074, 1072, 1071, 1046,    0,
      306,  124,  311,    0, 2208,  350,  345, 1055,  365, 2208,

        0,    0,  373,    0,    0,  117, 1053,    0, 1060, 2208,
     2208,  202,    0,  389,    0,    0,  393,  257,    0,    0,
     1056,  405, 2208, 2208, 2208,  146,  109,  391,    0,  394,
      399,  420,  398, 2208,  422, 2208,  427,  429,  433, 1030,
      165,  246, 2208, 2208, 2208, 2208, 2208, 2208, 2208, 1047,
     2208,  418, 1044, 2208,  423,  428,  437,    0, 2208, 2208,
     2208,    0, 2208, 1012, 2208,  461,  466,    0,    0, 2208,
      454, 1036,  506,  458,    0,  461,  466,  475, 2208,  483,
        0, 2208, 2208, 2208, 1018, 2208, 1035,  482,  551,  515,
      520, 1002,  505, 2208,    0,    0,  545,  569, 1011,    0,

      191, 2208,    0,    0, 2208, 2208,    0,  579,  587, 1009,
        0,  590,  599, 2208, 1008, 2208,  207,    0,    0, 2208,
     1015,  609,  615, 2208,  973,  972,    0,  497,  584,  581,
      602,  605,  955,  348,  955,  340,  946, 2208,  969, 2208,
      601,  609,  615,    0,  940,  903,    0,  645,    0,  620,
      645,  623,  510,  882,    0,  672,  677,    0,  662,  694,
      702, 2208,  891,  705,    0,  712, 2208,  889,  708,  724,
     2208,  888,  728,  279,    0,  895,  869,  696,  862,  844,
      844,  827,  829,  825,  819,  734,  636,  726,  731,  725,
      752,  758,  763,  768,  774, 2208,  780, 2208,  785,  788,

      797,  813,  816,  819,  822,  838,  841,  844,  847,  863,
     2208, 2208,  791,  644,  815,  866,  869,  803,  800,  779,
      740,  872,  740,  861,  866,  869,  789,  912,  811,  961,
      792,  890,  893, 1007, 1010, 1013, 1029, 1032, 1048, 1051,
     1054, 1070, 1073, 1089, 1092, 1095,  982,  734, 1016,  730,
      964, 1035, 1111, 1076,  724,  725,  711,  702, 1096, 1101,
     1104,  717,  707,  704,    0,  842, 1136, 1125, 1130, 1182,
      683, 1156, 1188, 1192, 2208, 1199, 1202,  670,  665, 1205,
     1190,  677,    0,  666, 1225,  675,    0, 1211, 1224, 1215,
     1218, 1221, 1246, 1267,  657,  508,  451, 1209, 1296, 1272,

      513,  653, 1249, 1230, 1307, 1281,  644,  525,  627,  559,
      619,  367,  601, 2208,    0,  584,  542,  409, 1284,  535,
      536,  528,  523,  521,  507,  497,  492,  485,  480,  479,
      469,  465,  461,  436,  425,  422, 1287, 1317,  421,  419,
      395,  377, 1292, 1320,  336,  328,  303,  282,  271,  255,
     1343, 1346, 2208, 1350, 1353,  239,  231, 1356, 1359,  217,
      174,  148, 1362, 1365, 2208, 1369, 1373,  106, 1379, 1382,
       97, 1388, 1391, 1394, 1397, 1400, 2208, 1404, 1424, 1444,
     1464, 1484, 1504, 1524, 1544, 1564, 1584, 1604, 1624, 1639,
     1655, 1667, 1221, 1681, 1700, 1720, 1740, 1755, 1774, 1794,

     1814, 1834, 1854, 1873, 1893,  608, 1912, 1928, 1945,  272,
     1960, 1979, 1996, 2008, 2024,  342, 2036,  650, 2054, 2073,
     2093, 2113,  376, 2128, 2147, 2167, 2187
    } ;

static yyconst flex_int16_t yy_def[528] =
    {   0,
      478,  478,  477,    3,  477,    5,  479,  479,  480,  480,
      478,   11,  481,  481,  482,  482,  483,  483,  484,  484,
      485,  485,  486,  486,  487,  487,  478,  478,  478,   29,
      488,  488,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  489,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  490,  490,  477,  477,  477,  477,  477,  477,  477,
      477,  491,  477,  489,  492,  491,  477,  477,  491,  477,
      491,  477,  493,  494,  494,  494,  494,  494,  495,  496,
      495,  495,  495,  497,  477,  477,  477,  477,  477,  477,

      498,  499,  477,  500,  500,  477,  477,  501,  477,  477,
      477,  477,  502,  477,  503,  503,  477,  504,  505,  505,
      506,  507,  477,  477,  477,  477,  477,  477,  508,  477,
      477,  477,  489,  477,  489,  477,  489,  489,  489,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  509,  477,  477,  477,  477,  510,  477,  477,
      477,  490,  477,  490,  477,  477,  489,  491,   74,  477,
      477,  511,  512,  477,  513,  477,  477,  477,  477,  514,
      494,  477,  477,  477,  495,  477,  496,  495,  495,  495,
      495,  497,  477,  477,  498,  499,  477,  477,  477,  500,

      477,  477,  515,  501,  477,  477,  502,  477,  477,  477,
      503,  477,  477,  477,  477,  477,  477,  516,  505,  477,
      517,  477,  507,  477,  477,  477,  508,  477,  489,  489,
      489,  489,  477,  477,  477,  477,  477,  477,  509,  477,
      477,  477,  477,  510,  490,  511,  512,  512,  513,  477,
      477,  477,  514,  477,  518,  519,  477,  189,  495,  477,
      477,  477,  477,  520,  515,  477,  477,  477,  521,  477,
      477,  477,  522,  477,  523,  517,  477,  489,  477,  477,
      477,  477,  477,  477,  477,  490,  477,  477,  477,  524,
      519,  519,  519,  519,  477,  477,  477,  477,  525,  520,

      520,  520,  526,  521,  521,  521,  527,  522,  522,  522,
      477,  477,  477,  489,  477,  477,  477,  477,  477,  477,
      477,  477,  490,  477,  477,  477,  524,  477,  294,  477,
      294,  525,  525,  525,  525,  520,  526,  526,  526,  526,
      521,  527,  527,  527,  527,  522,  477,  477,  489,  477,
      477,  477,  477,  477,  477,  477,  477,  490,  477,  477,
      477,  328,  328,  328,  328,  328,  477,  525,  526,  527,
      477,  489,  477,  477,  477,  477,  477,  477,  477,  490,
      477,  477,  328,  328,  328,  328,  367,  477,  489,  477,
      477,  477,  477,  477,  490,  490,  490,  477,  328,  477,

      477,  477,  489,  477,  489,  477,  477,  477,  490,  490,
      490,  490,  490,  477,  399,  477,  477,  477,  477,  477,
      477,  490,  490,  490,  490,  490,  490,  490,  477,  477,
      477,  477,  477,  477,  477,  490,  490,  490,  490,  490,
      490,  490,  477,  477,  477,  477,  477,  477,  477,  490,
      477,  477,  477,  490,  490,  490,  490,  477,  477,  477,
      477,  477,  490,  477,  477,  477,  490,  490,  477,  477,
      477,  477,  477,  490,  477,  477,    0,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,

      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477
    } ;

static yyconst flex_int16_t yy_nxt[2259] =
    {   0,
      477,  477,  120,  120,  132,  132,  132,  121,  121,  133,
      132,  132,  132,  477,  477,  133,  477,   35,   36,   37,
       37,   37,   35,   36,   37,   37,   37,   38,   39,   40,
       39,   41,   42,   43,   44,   45,   46,   47,   48,   49,
       50,   51,   52,   53,   54,   55,   56,   57,   57,   38,
       58,   59,   60,   61,   38,   62,   62,   62,   62,   63,
       62,   62,   62,   62,   62,   62,   62,   62,   62,   64,
       38,   65,   38,   62,   66,   67,   68,   69,   70,   71,
       70,   72,   73,   74,   75,   76,   72,   77,   78,   78,
       76,   76,   78,   79,   80,   81,   82,   82,   82,   83,

       78,   76,   76,   76,   72,   84,   85,   84,   84,   86,
       84,   84,   84,   84,   87,   84,   84,   84,   88,   78,
       69,   78,   76,   88,   69,   72,   69,   90,  111,  475,
      201,  111,  128,  128,  128,  202,  116,  189,  474,   91,
       92,   93,   93,   93,  117,   34,   94,  186,   34,   90,
      226,  116,  124,  125,  124,  226,  140,  141,  126,  117,
      142,   91,   92,   93,   93,   93,  112,   34,   94,  112,
       34,   96,   96,   96,  124,  125,  124,  118,  141,  471,
      126,  225,  130,  127,  131,  131,  131,   97,   98,   99,
       99,   99,  118,  100,   96,   96,   96,  146,  166,  166,

      166,  234,  235,  167,  201,  127,  470,  206,  147,  202,
       97,   98,   99,   99,   99,  148,  100,   35,   36,   37,
       37,   37,  136,  137,  149,  150,  274,  274,  101,  101,
      101,  101,  101,  101,  101,  101,  101,  101,  101,  101,
      101,  101,  174,  174,  174,  206,  101,  105,  129,  105,
      469,  105,  105,  153,  163,  138,  106,  105,  151,  105,
      154,  107,  468,  139,  152,  152,  152,  105,  105,  105,
      105,  155,  467,  156,  156,  156,  217,  217,  155,  236,
      156,  156,  156,  237,  244,  164,  157,  463,  105,  244,
      164,  105,  105,  157,  105,  158,  105,  105,  311,  311,

      158,  106,  105,  218,  105,  176,  107,  177,  177,  177,
      170,  462,  105,  105,  105,  105,  166,  166,  166,  461,
      178,  167,  171,  171,  171,  188,  188,  188,  190,  186,
      191,  191,  191,  105,  186,  460,  105,  122,  122,  122,
      122,  122,  122,  122,  122,  122,  122,  122,  122,  122,
      122,  193,  193,  193,  275,  122,  136,  137,  169,  275,
      169,  459,  169,  169,  128,  128,  128,  169,  169,  458,
      169,  283,  169,  194,  197,  198,  198,  284,  169,  169,
      169,  169,  130,  280,  131,  131,  131,  281,  312,  199,
      208,  209,  209,  312,  212,  213,  213,  139,  426,  169,

      136,  137,  169,  214,  427,  210,  222,  222,  222,  215,
      128,  128,  128,  228,  228,  228,  130,  457,  131,  131,
      131,  132,  132,  132,  136,  137,  133,  456,  224,  136,
      137,  136,  137,  138,  230,  231,  232,  152,  152,  152,
      432,  139,  241,  241,  241,  155,  433,  156,  156,  156,
      157,  242,  455,  242,  454,  157,  243,  243,  243,  450,
      157,  449,  166,  166,  166,  139,  229,  167,  136,  137,
      139,  448,  139,  171,  171,  171,  139,  174,  174,  174,
      250,  250,  250,  176,  412,  251,  251,  251,  413,  252,
      178,  252,  447,  178,  243,  243,  243,  446,  178,  254,

      255,  188,  188,  188,  445,  186,  193,  193,  193,  139,
      248,  444,  248,  443,  248,  248,  228,  228,  228,  248,
      248,  442,  248,  441,  248,  256,  254,  255,  194,  440,
      248,  248,  248,  248,  259,  259,  259,  190,  186,  191,
      191,  191,  439,  186,  410,  411,  197,  198,  198,  416,
      417,  248,  256,  438,  248,  258,  437,  258,  418,  258,
      258,  199,  421,  436,  258,  258,  435,  258,  434,  258,
      261,  261,  261,  431,  186,  227,  258,  227,  258,  262,
      208,  209,  209,  136,  137,  263,  136,  137,  266,  266,
      266,  212,  213,  213,  423,  210,  258,  267,  424,  258,

      270,  270,  270,  268,  136,  137,  215,  136,  137,  271,
      222,  222,  222,  221,  278,  272,  222,  222,  222,  429,
      241,  241,  241,  430,  139,  221,  221,  139,  243,  243,
      243,  428,  224,  157,  243,  243,  243,  287,  224,  288,
      288,  288,  243,  243,  243,  139,  136,  137,  139,  248,
      425,  248,  178,  248,  248,  324,  324,  324,  248,  248,
      422,  248,  176,  248,  289,  289,  289,  290,  290,  248,
      248,  248,  248,  291,  291,  291,  420,  178,  295,  295,
      295,  259,  259,  259,  349,  186,  418,  139,  293,  409,
      248,  383,  385,  248,  359,  297,  297,  297,  136,  137,

      296,  393,  392,  261,  261,  261,  301,  198,  198,  305,
      209,  209,  262,  266,  266,  266,  294,  298,  263,  388,
      383,  302,  267,  383,  306,  270,  270,  270,  268,  309,
      213,  213,  314,  383,  271,  322,  322,  322,  380,  139,
      272,  254,  255,  287,  310,  325,  325,  325,  326,  379,
      289,  289,  289,  291,  291,  291,  378,  377,  178,  291,
      291,  291,  373,  178,  291,  291,  291,  256,  293,  291,
      291,  291,  371,  323,  293,  295,  295,  295,  358,  328,
      356,  297,  297,  297,  329,  330,  333,  261,  261,  301,
      198,  198,  347,  347,  347,  334,  294,  296,  301,  198,

      198,  335,  294,  298,  302,  254,  255,  294,  293,  292,
      331,  355,  294,  302,  301,  198,  198,  338,  266,  266,
      305,  209,  209,  305,  209,  209,  339,  328,  292,  336,
      348,  256,  340,  354,  292,  306,  353,  330,  306,  305,
      209,  209,  343,  270,  270,  309,  213,  213,  309,  213,
      213,  344,  350,  292,  341,  321,  320,  345,  384,  385,
      310,  319,  318,  310,  309,  213,  213,  351,  351,  351,
      352,  352,  352,  322,  322,  322,  317,  316,  359,  346,
      360,  360,  360,  287,  386,  361,  361,  361,  361,  361,
      361,  333,  261,  261,  333,  261,  261,  315,  178,  313,

      334,  178,  220,  334,  307,  303,  335,  299,  255,  335,
      170,  357,  362,  363,  291,  291,  362,  362,  362,  364,
      364,  362,  362,  364,  364,  364,  364,  362,  365,  364,
      364,  364,  364,  364,  362,  362,  362,  362,  364,  362,
      364,  364,  364,  364,  364,  364,  364,  364,  364,  364,
      364,  364,  364,  364,  364,  362,  366,  362,  364,  362,
      362,  362,  291,  291,  291,  351,  351,  351,  292,  292,
      286,  240,  292,  292,  292,  292,  285,  293,  292,  292,
      292,  292,  292,  347,  347,  347,  282,  292,  279,  367,
      367,  367,  367,  367,  367,  367,  367,  367,  367,  367,

      367,  367,  367,  292,  277,  294,  236,  367,  333,  261,
      261,  333,  261,  261,  301,  198,  198,  334,  136,  137,
      334,  348,  220,  335,  273,  269,  368,  264,  260,  336,
      338,  266,  266,  338,  266,  266,  352,  352,  352,  339,
      257,  186,  339,  170,  245,  340,  240,  372,  340,  338,
      266,  266,  338,  266,  266,  305,  209,  209,  339,  139,
      238,  339,  233,  220,  340,  205,  203,  369,  129,  186,
      341,  343,  270,  270,  343,  270,  270,  376,  376,  376,
      344,  184,  183,  344,  163,  182,  345,  179,  175,  345,
      343,  270,  270,  343,  270,  270,  309,  213,  213,  344,

      173,  165,  344,  161,  160,  345,  159,  145,  370,  144,
      143,  346,  374,  374,  374,  381,  381,  381,  359,  134,
      382,  382,  382,  361,  361,  361,  333,  261,  261,  129,
      477,  338,  266,  266,  375,  334,  178,  291,  291,  291,
      339,  368,  114,  387,  292,  114,  369,  292,  292,  292,
      292,  109,  329,  330,  292,  387,  387,  387,  136,  137,
      109,  103,  292,  103,  387,  387,  387,  387,  387,  387,
      387,  387,  387,  387,  387,  387,  387,  387,  331,  477,
      294,  477,  387,  343,  270,  270,  477,  477,  389,  390,
      390,  390,  344,  374,  374,  374,  477,  477,  370,  139,

      376,  376,  376,  391,  391,  391,  394,  394,  394,  398,
      398,  398,  400,  400,  400,  375,  390,  390,  390,  391,
      391,  391,  406,  406,  406,  403,  404,  405,  414,  414,
      414,  419,  419,  419,  180,  477,  395,  396,  180,  180,
      397,  383,  477,  401,  477,  477,  402,  394,  394,  394,
      403,  404,  405,  399,  399,  399,  399,  399,  399,  399,
      399,  399,  399,  399,  399,  399,  399,  139,  394,  394,
      394,  399,  477,  400,  400,  400,  477,  407,  401,  477,
      477,  408,  406,  406,  406,  419,  419,  419,  451,  451,
      451,  477,  139,  451,  451,  451,  477,  477,  407,  401,

      477,  477,  408,  415,  401,  477,  477,  402,  403,  404,
      405,  477,  384,  385,  477,  415,  415,  415,  452,  452,
      452,  452,  452,  452,  415,  415,  415,  415,  415,  415,
      415,  415,  415,  415,  415,  415,  415,  415,  386,  477,
      453,  477,  415,  453,  451,  451,  451,  452,  452,  452,
      139,  464,  464,  464,  466,  466,  466,  464,  464,  464,
      466,  466,  466,  472,  472,  472,  464,  464,  464,  453,
      466,  466,  466,  465,  473,  473,  473,  477,  477,  465,
      473,  473,  473,  472,  472,  472,  477,  477,  465,  472,
      472,  472,  473,  473,  473,  476,  476,  476,  476,  476,

      476,  476,  476,  476,   34,   34,   34,   34,   34,   34,
       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
       34,   34,   34,   34,   89,   89,   89,   89,   89,   89,
       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
       89,   89,   89,   89,   95,   95,   95,   95,   95,   95,
       95,   95,   95,   95,   95,   95,   95,   95,   95,   95,
       95,   95,   95,   95,  102,  102,  102,  102,  102,  102,
      102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
      102,  102,  102,  102,  104,  104,  104,  104,  104,  104,
      104,  104,  104,  104,  104,  104,  104,  104,  104,  104,

      104,  104,  104,  104,  108,  108,  108,  108,  108,  108,
      108,  108,  108,  108,  108,  108,  108,  108,  108,  108,
      108,  108,  108,  108,  110,  110,  110,  110,  110,  110,
      110,  110,  110,  110,  110,  110,  110,  110,  110,  110,
      110,  110,  110,  110,  113,  113,  113,  113,  113,  113,
      113,  113,  113,  113,  113,  113,  113,  113,  113,  113,
      113,  113,  113,  113,  115,  115,  115,  115,  115,  115,
      115,  115,  115,  115,  115,  115,  115,  115,  115,  115,
      115,  115,  115,  115,  119,  119,  119,  119,  119,  119,
      119,  119,  119,  119,  119,  119,  119,  119,  119,  119,

      119,  119,  119,  119,  123,  123,  123,  123,  123,  123,
      123,  123,  123,  123,  123,  123,  123,  123,  123,  123,
      123,  123,  123,  123,  135,  135,  135,  135,  135,  135,
      135,  135,  135,  135,  135,  135,  135,  135,  135,  135,
      135,  135,  135,  135,  162,  477,  477,  477,  477,  477,
      477,  162,  477,  477,  477,  477,  162,  162,  168,  477,
      477,  168,  477,  477,  168,  168,  477,  477,  477,  477,
      168,  168,  172,  477,  477,  477,  477,  477,  477,  172,
      477,  477,  477,  477,  172,  172,  181,  477,  477,  477,
      477,  477,  477,  181,  477,  477,  477,  477,  181,  181,

      185,  185,  185,  185,  477,  185,  185,  185,  185,  185,
      185,  185,  185,  185,  185,  477,  477,  185,  185,  185,
      187,  187,  187,  187,  477,  187,  187,  187,  187,  187,
      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
      192,  192,  192,  192,  192,  192,  192,  192,  192,  192,
      192,  192,  192,  192,  192,  192,  477,  192,  192,  192,
      195,  477,  477,  477,  477,  477,  477,  195,  477,  477,
      477,  477,  195,  195,  196,  196,  196,  196,  196,  196,
      196,  477,  196,  196,  196,  196,  196,  196,  196,  196,
      196,  196,  196,  196,  200,  200,  200,  200,  200,  200,

      200,  200,  200,  477,  200,  200,  200,  200,  200,  200,
      200,  200,  200,  200,  204,  204,  204,  204,  477,  204,
      204,  204,  204,  204,  204,  204,  204,  204,  204,  204,
      204,  204,  204,  204,  207,  207,  207,  207,  207,  207,
      207,  477,  207,  207,  207,  207,  207,  207,  207,  207,
      207,  207,  207,  207,  211,  211,  211,  211,  211,  211,
      211,  477,  211,  211,  211,  211,  211,  211,  211,  211,
      211,  211,  211,  216,  216,  216,  216,  216,  216,  216,
      216,  216,  216,  216,  216,  216,  216,  216,  216,  216,
      216,  216,  216,  219,  219,  219,  219,  219,  477,  219,

      219,  219,  219,  219,  219,  219,  219,  219,  219,  219,
      219,  219,  219,  223,  223,  477,  477,  223,  477,  477,
      477,  477,  477,  477,  223,  477,  223,  477,  477,  223,
      223,  227,  477,  477,  227,  477,  477,  227,  227,  477,
      477,  477,  477,  227,  227,  239,  239,  239,  239,  239,
      239,  239,  239,  239,  239,  239,  239,  239,  239,  239,
      239,  239,  239,  239,  239,  246,  477,  477,  477,  477,
      477,  477,  246,  477,  477,  477,  477,  246,  246,  247,
      247,  477,  247,  247,  247,  247,  247,  247,  247,  247,
      247,  247,  247,  247,  247,  247,  247,  247,  247,  249,

      477,  477,  249,  477,  477,  249,  249,  477,  477,  477,
      477,  249,  249,  253,  477,  477,  477,  477,  253,  253,
      253,  477,  477,  477,  477,  253,  253,  265,  477,  477,
      265,  477,  477,  265,  265,  477,  477,  477,  477,  265,
      265,  276,  477,  477,  477,  477,  477,  477,  276,  477,
      477,  477,  477,  276,  276,  292,  292,  477,  477,  292,
      292,  477,  292,  292,  292,  292,  292,  477,  477,  477,
      292,  292,  292,  300,  300,  300,  300,  300,  300,  300,
      300,  300,  300,  300,  300,  300,  300,  300,  300,  300,
      300,  300,  300,  304,  304,  304,  304,  304,  304,  304,

      304,  304,  304,  304,  304,  304,  304,  304,  304,  304,
      304,  304,  304,  308,  308,  308,  308,  308,  308,  308,
      308,  308,  308,  308,  308,  308,  308,  308,  308,  308,
      308,  308,  308,  327,  477,  477,  477,  477,  327,  327,
      327,  477,  477,  477,  477,  327,  327,  332,  332,  332,
      332,  332,  332,  332,  332,  332,  332,  332,  332,  332,
      332,  332,  332,  332,  332,  332,  332,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337,  342,  342,  342,
      342,  342,  342,  342,  342,  342,  342,  342,  342,  342,

      342,  342,  342,  342,  342,  342,  342,   33,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477
    } ;

static yyconst flex_int16_t yy_chk[2259] =
    {   0,
        0,    0,   25,   26,   39,   39,   39,   25,   26,   39,
       40,   40,   40,    0,    0,   40,    0,    1,    1,    1,
        1,    1,    2,    2,    2,    2,    2,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    3,    3,    3,
        3,    3,    3,    3,    3,    3,    3,    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,    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,   19,  471,
      106,   20,   35,   35,   35,  106,   23,   92,  468,    7,
        7,    7,    7,    7,   23,    7,    7,   92,    7,    8,
      127,   24,   31,   31,   31,  127,   44,   44,   31,   24,
       44,    8,    8,    8,    8,    8,   19,    8,    8,   20,
        8,    9,    9,    9,   32,   32,   32,   23,  126,  462,
       32,  126,   37,   31,   37,   37,   37,    9,    9,    9,
        9,    9,   24,    9,   10,   10,   10,   51,   70,   70,

       70,  141,  141,   70,  201,   32,  461,  112,   51,  201,
       10,   10,   10,   10,   10,   53,   10,   11,   11,   11,
       11,   11,   43,   43,   53,   53,  217,  217,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   80,   80,   80,  112,   11,   15,   55,   15,
      460,   15,   15,   55,   63,   43,   15,   15,   54,   15,
       55,   15,  457,   43,   54,   54,   54,   15,   15,   15,
       15,   56,  456,   56,   56,   56,  118,  118,   57,  142,
       57,   57,   57,  142,  510,   63,   56,  450,   15,  510,
       63,   15,   16,   57,   16,   56,   16,   16,  274,  274,

       56,   16,   16,  118,   16,   82,   16,   82,   82,   82,
       75,  449,   16,   16,   16,   16,   71,   71,   71,  448,
       82,   71,   75,   75,   75,   91,   91,   91,   93,   91,
       93,   93,   93,   16,   93,  447,   16,   29,   29,   29,
       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
       29,   96,   96,   96,  516,   29,   74,   74,   74,  516,
       74,  446,   74,   74,   97,   97,   97,   74,   74,  445,
       74,  236,   74,   96,  103,  103,  103,  236,   74,   74,
       74,   74,   99,  234,   99,   99,   99,  234,  523,  103,
      114,  114,  114,  523,  117,  117,  117,   74,  412,   74,

      133,  133,   74,  117,  412,  114,  122,  122,  122,  117,
      128,  128,  128,  130,  130,  130,  131,  442,  131,  131,
      131,  132,  132,  132,  135,  135,  132,  441,  122,  137,
      137,  138,  138,  133,  139,  139,  139,  152,  152,  152,
      418,  133,  155,  155,  155,  156,  418,  156,  156,  156,
      152,  157,  440,  157,  439,  155,  157,  157,  157,  436,
      156,  435,  166,  166,  166,  135,  138,  166,  167,  167,
      137,  434,  138,  171,  171,  171,  139,  174,  174,  174,
      176,  176,  176,  177,  397,  177,  177,  177,  397,  178,
      174,  178,  433,  176,  178,  178,  178,  432,  177,  180,

      180,  188,  188,  188,  431,  188,  193,  193,  193,  167,
      173,  430,  173,  429,  173,  173,  228,  228,  228,  173,
      173,  428,  173,  427,  173,  180,  253,  253,  193,  426,
      173,  173,  173,  173,  190,  190,  190,  191,  190,  191,
      191,  191,  425,  191,  396,  396,  197,  197,  197,  401,
      401,  173,  253,  424,  173,  189,  423,  189,  408,  189,
      189,  197,  408,  422,  189,  189,  421,  189,  420,  189,
      198,  198,  198,  417,  189,  189,  189,  189,  189,  198,
      208,  208,  208,  230,  230,  198,  229,  229,  209,  209,
      209,  212,  212,  212,  410,  208,  189,  209,  410,  189,

      213,  213,  213,  209,  231,  231,  212,  232,  232,  213,
      222,  222,  222,  506,  229,  213,  223,  223,  223,  416,
      241,  241,  241,  416,  230,  506,  506,  229,  242,  242,
      242,  413,  222,  241,  243,  243,  243,  250,  223,  250,
      250,  250,  252,  252,  252,  231,  314,  314,  232,  248,
      411,  248,  250,  248,  248,  287,  287,  287,  248,  248,
      409,  248,  251,  248,  251,  251,  251,  518,  518,  248,
      248,  248,  248,  256,  256,  256,  407,  251,  257,  257,
      257,  259,  259,  259,  314,  259,  402,  314,  256,  395,
      248,  386,  384,  248,  382,  260,  260,  260,  278,  278,

      257,  379,  378,  261,  261,  261,  264,  264,  264,  269,
      269,  269,  261,  266,  266,  266,  256,  260,  261,  371,
      364,  264,  266,  363,  269,  270,  270,  270,  266,  273,
      273,  273,  278,  362,  270,  286,  286,  286,  358,  278,
      270,  290,  290,  288,  273,  288,  288,  288,  289,  357,
      289,  289,  289,  291,  291,  291,  356,  355,  288,  292,
      292,  292,  350,  289,  293,  293,  293,  290,  291,  294,
      294,  294,  348,  286,  292,  295,  295,  295,  323,  293,
      321,  297,  297,  297,  294,  294,  299,  299,  299,  300,
      300,  300,  313,  313,  313,  299,  291,  295,  301,  301,

      301,  299,  292,  297,  300,  327,  327,  293,  331,  331,
      294,  320,  294,  301,  302,  302,  302,  303,  303,  303,
      304,  304,  304,  305,  305,  305,  303,  329,  329,  302,
      313,  327,  303,  319,  331,  304,  318,  329,  305,  306,
      306,  306,  307,  307,  307,  308,  308,  308,  309,  309,
      309,  307,  315,  329,  306,  285,  284,  307,  366,  366,
      308,  283,  282,  309,  310,  310,  310,  316,  316,  316,
      317,  317,  317,  322,  322,  322,  281,  280,  324,  310,
      324,  324,  324,  325,  366,  325,  325,  325,  326,  326,
      326,  332,  332,  332,  333,  333,  333,  279,  325,  277,

      332,  326,  276,  333,  272,  268,  332,  263,  254,  333,
      246,  322,  328,  328,  328,  328,  328,  328,  328,  328,
      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
      328,  328,  328,  328,  328,  328,  328,  328,  328,  328,
      328,  328,  330,  330,  330,  351,  351,  351,  330,  330,
      245,  239,  330,  330,  330,  330,  237,  330,  330,  330,
      330,  330,  330,  347,  347,  347,  235,  330,  233,  330,
      330,  330,  330,  330,  330,  330,  330,  330,  330,  330,

      330,  330,  330,  330,  226,  330,  225,  330,  334,  334,
      334,  335,  335,  335,  336,  336,  336,  334,  349,  349,
      335,  347,  221,  334,  215,  210,  335,  199,  192,  336,
      337,  337,  337,  338,  338,  338,  352,  352,  352,  337,
      187,  185,  338,  172,  164,  337,  153,  349,  338,  339,
      339,  339,  340,  340,  340,  341,  341,  341,  339,  349,
      150,  340,  140,  121,  339,  109,  107,  340,   98,   89,
      341,  342,  342,  342,  343,  343,  343,  354,  354,  354,
      342,   88,   87,  343,   86,   85,  342,   83,   81,  343,
      344,  344,  344,  345,  345,  345,  346,  346,  346,  344,

       79,   67,  345,   61,   60,  344,   59,   50,  345,   46,
       45,  346,  353,  353,  353,  359,  359,  359,  360,   41,
      360,  360,  360,  361,  361,  361,  368,  368,  368,   36,
       33,  369,  369,  369,  353,  368,  361,  367,  367,  367,
      369,  368,   22,  367,  367,   21,  369,  367,  367,  367,
      367,   18,  367,  367,  367,  367,  367,  367,  372,  372,
       17,   14,  367,   13,  367,  367,  367,  367,  367,  367,
      367,  367,  367,  367,  367,  367,  367,  367,  367,    0,
      367,    0,  367,  370,  370,  370,    0,    0,  372,  373,
      373,  373,  370,  374,  374,  374,    0,    0,  370,  372,

      376,  376,  376,  377,  377,  377,  380,  380,  380,  381,
      381,  381,  388,  388,  388,  374,  390,  390,  390,  391,
      391,  391,  392,  392,  392,  389,  389,  389,  398,  398,
      398,  404,  404,  404,  493,    0,  380,  380,  493,  493,
      380,  385,    0,  388,    0,    0,  388,  393,  393,  393,
      403,  403,  403,  385,  385,  385,  385,  385,  385,  385,
      385,  385,  385,  385,  385,  385,  385,  389,  394,  394,
      394,  385,    0,  400,  400,  400,    0,  393,  393,    0,
        0,  393,  406,  406,  406,  419,  419,  419,  437,  437,
      437,    0,  403,  443,  443,  443,    0,    0,  394,  394,

        0,    0,  394,  399,  400,    0,    0,  400,  405,  405,
      405,    0,  399,  399,    0,  399,  399,  399,  438,  438,
      438,  444,  444,  444,  399,  399,  399,  399,  399,  399,
      399,  399,  399,  399,  399,  399,  399,  399,  399,    0,
      438,    0,  399,  444,  451,  451,  451,  452,  452,  452,
      405,  454,  454,  454,  455,  455,  455,  458,  458,  458,
      459,  459,  459,  463,  463,  463,  464,  464,  464,  452,
      466,  466,  466,  454,  467,  467,  467,    0,    0,  458,
      469,  469,  469,  470,  470,  470,    0,    0,  464,  472,
      472,  472,  473,  473,  473,  474,  474,  474,  475,  475,

      475,  476,  476,  476,  478,  478,  478,  478,  478,  478,
      478,  478,  478,  478,  478,  478,  478,  478,  478,  478,
      478,  478,  478,  478,  479,  479,  479,  479,  479,  479,
      479,  479,  479,  479,  479,  479,  479,  479,  479,  479,
      479,  479,  479,  479,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  480,  480,  480,  480,  480,  480,
      480,  480,  480,  480,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  482,  482,  482,  482,  482,  482,
      482,  482,  482,  482,  482,  482,  482,  482,  482,  482,

      482,  482,  482,  482,  483,  483,  483,  483,  483,  483,
      483,  483,  483,  483,  483,  483,  483,  483,  483,  483,
      483,  483,  483,  483,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  485,  485,  485,  485,  485,  485,
      485,  485,  485,  485,  485,  485,  485,  485,  485,  485,
      485,  485,  485,  485,  486,  486,  486,  486,  486,  486,
      486,  486,  486,  486,  486,  486,  486,  486,  486,  486,
      486,  486,  486,  486,  487,  487,  487,  487,  487,  487,
      487,  487,  487,  487,  487,  487,  487,  487,  487,  487,

      487,  487,  487,  487,  488,  488,  488,  488,  488,  488,
      488,  488,  488,  488,  488,  488,  488,  488,  488,  488,
      488,  488,  488,  488,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  490,    0,    0,    0,    0,    0,
        0,  490,    0,    0,    0,    0,  490,  490,  491,    0,
        0,  491,    0,    0,  491,  491,    0,    0,    0,    0,
      491,  491,  492,    0,    0,    0,    0,    0,    0,  492,
        0,    0,    0,    0,  492,  492,  494,    0,    0,    0,
        0,    0,    0,  494,    0,    0,    0,    0,  494,  494,

      495,  495,  495,  495,    0,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,    0,    0,  495,  495,  495,
      496,  496,  496,  496,    0,  496,  496,  496,  496,  496,
      496,  496,  496,  496,  496,  496,  496,  496,  496,  496,
      497,  497,  497,  497,  497,  497,  497,  497,  497,  497,
      497,  497,  497,  497,  497,  497,    0,  497,  497,  497,
      498,    0,    0,    0,    0,    0,    0,  498,    0,    0,
        0,    0,  498,  498,  499,  499,  499,  499,  499,  499,
      499,    0,  499,  499,  499,  499,  499,  499,  499,  499,
      499,  499,  499,  499,  500,  500,  500,  500,  500,  500,

      500,  500,  500,    0,  500,  500,  500,  500,  500,  500,
      500,  500,  500,  500,  501,  501,  501,  501,    0,  501,
      501,  501,  501,  501,  501,  501,  501,  501,  501,  501,
      501,  501,  501,  501,  502,  502,  502,  502,  502,  502,
      502,    0,  502,  502,  502,  502,  502,  502,  502,  502,
      502,  502,  502,  502,  503,  503,  503,  503,  503,  503,
      503,    0,  503,  503,  503,  503,  503,  503,  503,  503,
      503,  503,  503,  504,  504,  504,  504,  504,  504,  504,
      504,  504,  504,  504,  504,  504,  504,  504,  504,  504,
      504,  504,  504,  505,  505,  505,  505,  505,    0,  505,

      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
      505,  505,  505,  507,  507,    0,    0,  507,    0,    0,
        0,    0,    0,    0,  507,    0,  507,    0,    0,  507,
      507,  508,    0,    0,  508,    0,    0,  508,  508,    0,
        0,    0,    0,  508,  508,  509,  509,  509,  509,  509,
      509,  509,  509,  509,  509,  509,  509,  509,  509,  509,
      509,  509,  509,  509,  509,  511,    0,    0,    0,    0,
        0,    0,  511,    0,    0,    0,    0,  511,  511,  512,
      512,    0,  512,  512,  512,  512,  512,  512,  512,  512,
      512,  512,  512,  512,  512,  512,  512,  512,  512,  513,

        0,    0,  513,    0,    0,  513,  513,    0,    0,    0,
        0,  513,  513,  514,    0,    0,    0,    0,  514,  514,
      514,    0,    0,    0,    0,  514,  514,  515,    0,    0,
      515,    0,    0,  515,  515,    0,    0,    0,    0,  515,
      515,  517,    0,    0,    0,    0,    0,    0,  517,    0,
        0,    0,    0,  517,  517,  519,  519,    0,    0,  519,
      519,    0,  519,  519,  519,  519,  519,    0,    0,    0,
      519,  519,  519,  520,  520,  520,  520,  520,  520,  520,
      520,  520,  520,  520,  520,  520,  520,  520,  520,  520,
      520,  520,  520,  521,  521,  521,  521,  521,  521,  521,

      521,  521,  521,  521,  521,  521,  521,  521,  521,  521,
      521,  521,  521,  522,  522,  522,  522,  522,  522,  522,
      522,  522,  522,  522,  522,  522,  522,  522,  522,  522,
      522,  522,  522,  524,    0,    0,    0,    0,  524,  524,
      524,    0,    0,    0,    0,  524,  524,  525,  525,  525,
      525,  525,  525,  525,  525,  525,  525,  525,  525,  525,
      525,  525,  525,  525,  525,  525,  525,  526,  526,  526,
      526,  526,  526,  526,  526,  526,  526,  526,  526,  526,
      526,  526,  526,  526,  526,  526,  526,  527,  527,  527,
      527,  527,  527,  527,  527,  527,  527,  527,  527,  527,

      527,  527,  527,  527,  527,  527,  527,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  477,  477,  477,  477,  477,  477,  477
    } ;

/* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[119] =
    {   0,
1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 
    0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 
    1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 
    0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 
    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0,     };

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 "pgc.l"
#line 2 "pgc.l"
/*-------------------------------------------------------------------------
 *
 * pgc.l
 *	  lexical scanner for ecpg
 *
 * This is a modified version of src/backend/parser/scan.l
 *
 *
 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 *
 * IDENTIFICATION
 *	  $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.137.2.1 2007/08/29 13:58:51 meskes Exp $
 *
 *-------------------------------------------------------------------------
 */
#include "postgres_fe.h"

#include <ctype.h>
#include <sys/types.h>
#include <limits.h>
#include <errno.h>

#include "extern.h"

extern YYSTYPE yylval;

static int		xcdepth = 0;	/* depth of nesting in slash-star comments */
static char    *dolqstart;      /* current $foo$ quote start string */
bool                    escape_string_warning;
static bool             warn_on_first_escape;

/*
 * literalbuf is used to accumulate literal values when multiple rules
 * are needed to parse a single literal.  Call startlit to reset buffer
 * to empty, addlit to add text.  Note that the buffer is permanently
 * malloc'd to the largest size needed so far in the current run.
 */
static char    *literalbuf = NULL;		/* expandable buffer */
static int		literallen;				/* actual current length */
static int		literalalloc;			/* current allocated buffer size */

#define startlit()	(literalbuf[0] = '\0', literallen = 0)
static void addlit(char *ytext, int yleng);
static void addlitchar (unsigned char);
static void parse_include (void);
static void check_escape_warning(void);
static bool isdefine(void);
static bool isinformixdefine(void);

char *token_start;
int state_before;

struct _yy_buffer 
{ 
	YY_BUFFER_STATE		buffer;
	long				lineno;
	char		  		*filename;
	struct _yy_buffer 	*next;
} *yy_buffer = NULL;

static char *old;

#define MAX_NESTED_IF 128
static short preproc_tos;
static short ifcond;
static struct _if_value 
{
	short condition;
	short else_branch;
} stacked_if_value[MAX_NESTED_IF];


/*
 * OK, here is a short description of lex/flex rules behavior.
 * The longest pattern which matches an input string is always chosen.
 * For equal-length patterns, the first occurring in the rules list is chosen.
 * INITIAL is the starting state, to which all non-conditional rules apply.
 * Exclusive states change parsing rules while the state is active.  When in
 * an exclusive state, only those rules defined for that state apply.
 *
 * We use exclusive states for quoted strings, extended comments,
 * and to eliminate parsing troubles for numeric strings.
 * Exclusive states:
 *	<xb> bit string literal
 *	<xc> extended C-style comments - thomas 1997-07-12
 *	<xd> delimited identifiers (double-quoted identifiers) - thomas 1997-10-27
 *	<xh> hexadecimal numeric string - thomas 1997-11-16
 *	<xq> quoted strings - thomas 1997-07-30
 *  	<xdolq> $foo$ quoted strings
 */










/* Bit string
 */
/* Hexadecimal number */
/* National character */
/* Quoted string that allows backslash escapes */
/* C version of hex number */
/* Extended quote
 * xqdouble implements embedded quote, ''''
 */
/* $foo$ style quotes ("dollar quoting")
 * The quoted string starts with $foo$ where "foo" is an optional string
 * in the form of an identifier, except that it may not contain "$",
 * and extends to the first occurrence of an identical string.
 * There is *no* processing of the quoted text.
 *
 * {dolqfailed} is an error rule to avoid scanner backup when {dolqdelim}
 * fails to match its trailing "$".
 */
/* Double quote
 * Allows embedded spaces and other special characters into identifiers.
 */
/* special stuff for C strings */
/* C-style comments
 *
 * The "extended comment" syntax closely resembles allowable operator syntax.
 * The tricky part here is to get lex to recognize a string starting with
 * slash-star as a comment, when interpreting it as an operator would produce
 * a longer match --- remember lex will prefer a longer match!	Also, if we
 * have something like plus-slash-star, lex will think this is a 3-character
 * operator whereas we want to see it as a + operator and a comment start.
 * The solution is two-fold:
 * 1. append {op_chars}* to xcstart so that it matches as much text as
 *	  {operator} would. Then the tie-breaker (first matching rule of same
 *	  length) ensures xcstart wins.  We put back the extra stuff with yyless()
 *	  in case it contains a star-slash that should terminate the comment.
 * 2. In the operator rule, check for slash-star within the operator, and
 *	  if found throw it back with yyless().  This handles the plus-slash-star
 *	  problem.
 * Dash-dash comments have similar interactions with the operator rule.
 */
/*
 * "self" is the set of chars that should be returned as single-character
 * tokens.	"op_chars" is the set of chars that can make up "Op" tokens,
 * which can be one or more characters long (but if a single-char token
 * appears in the "self" set, it is not to be returned as an Op).  Note
 * that the sets overlap, but each has some chars that are not in the other.
 *
 * If you change either set, adjust the character lists appearing in the
 * rule for "operator"!
 */
/* we no longer allow unary minus in numbers.
 * instead we pass it separately to parser. there it gets
 * coerced via doNegate() -- Leon aug 20 1999
 *
 * {realfail1} and {realfail2} are added to prevent the need for scanner
 * backup when the {real} rule fails to match completely.
 */
/*
 * In order to make the world safe for Windows and Mac clients as well as
 * Unix ones, we accept either \n or \r as a newline.  A DOS-style \r\n
 * sequence will be seen as two successive newlines, but that doesn't cause
 * any problems.  SQL92-style comments, which start with -- and extend to the
 * next newline, are treated as equivalent to a single whitespace character.
 *
 * NOTE a fine point: if there is no newline following --, we will absorb
 * everything to the end of the input as a comment.  This is correct.  Older
 * versions of Postgres failed to recognize -- as a comment if the input
 * did not end with a newline.
 *
 * XXX perhaps \f (formfeed) should be treated as a newline as well?
 */
/*
 * SQL92 requires at least one newline in the whitespace separating
 * string literals that are to be concatenated.  Silly, but who are we
 * to argue?  Note that {whitespace_with_newline} should not have * after
 * it, whereas {whitespace} should generally have a * after it...
 */
/* special characters for other dbms */
/* we have to react differently in compat mode */
/* some stuff needed for ecpg */
/* we might want to parse all cpp include files */
/* Take care of cpp lines, they may also be continuated */
/*
 * Dollar quoted strings are totally opaque, and no escaping is done on them.
 * Other quoted strings must allow some special characters such as single-quote
 *	and newline.
 * Embedded single-quotes are implemented both in the SQL standard
 *	style of two adjacent single quotes "''" and in the Postgres/Java style
 *	of escaped-quote "\'".
 * Other embedded escaped characters are matched explicitly and the leading
 *	backslash is dropped from the string. - thomas 1997-09-24
 * Note that xcstart must appear before operator, as explained above!
 *	Also whitespace (comment) must appear before operator.
 */
#line 1336 "pgc.c"

#define INITIAL 0
#define C 1
#define SQL 2
#define incl 3
#define def 4
#define def_ident 5
#define xb 6
#define xc 7
#define xd 8
#define xdc 9
#define xh 10
#define xq 11
#define xdolq 12
#define xpre 13
#define xcond 14
#define xskip 15

#ifndef YY_NO_UNISTD_H
/* Special case for "unistd.h", since it is non-ANSI. We include it way
 * down here because we want the user's section 1 to have been scanned first.
 * The user has a chance to override it with an option.
 */
#include <unistd.h>
#endif

#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif

static int yy_init_globals (void );

/* Accessor methods to globals.
   These are made visible to non-reentrant scanners for convenience. */

int yylex_destroy (void );

int yyget_debug (void );

void yyset_debug (int debug_flag  );

YY_EXTRA_TYPE yyget_extra (void );

void yyset_extra (YY_EXTRA_TYPE user_defined  );

FILE *yyget_in (void );

void yyset_in  (FILE * in_str  );

FILE *yyget_out (void );

void yyset_out  (FILE * out_str  );

int yyget_leng (void );

char *yyget_text (void );

int yyget_lineno (void );

void yyset_lineno (int line_number  );

/* Macros after this point can all be overridden by user definitions in
 * section 1.
 */

#ifndef YY_SKIP_YYWRAP
#ifdef __cplusplus
extern "C" int yywrap (void );
#else
extern int yywrap (void );
#endif
#endif

    static void yyunput (int c,char *buf_ptr  );
    
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst 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
#define YY_READ_BUF_SIZE 8192
#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 fwrite( yytext, yyleng, 1, yyout )
#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 = fread(buf, 1, 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 break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
	register yy_state_type yy_current_state;
	register char *yy_cp, *yy_bp;
	register int yy_act;
    
#line 319 "pgc.l"



                                       /* code to execute during start of each call of yylex() */
                                       token_start = NULL;


#line 1541 "pgc.c"

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

	while ( 1 )		/* loops until end-of-file is reached */
		{
		yy_cp = (yy_c_buf_p);

		/* Support of yytext. */
		*yy_cp = (yy_hold_char);

		/* yy_bp points to the position in yy_ch_buf of the start of
		 * the current run.
		 */
		yy_bp = yy_cp;

		yy_current_state = (yy_start);
yy_match:
		do
			{
			register 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 >= 478 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
			++yy_cp;
			}
		while ( yy_current_state != 477 );
		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;

		if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
			{
			int yyl;
			for ( yyl = 0; yyl < yyleng; ++yyl )
				if ( yytext[yyl] == '\n' )
					   
    yylineno++;
;
			}

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 326 "pgc.l"
{ /* ignore */ }
	YY_BREAK
case 2:
YY_RULE_SETUP
#line 328 "pgc.l"
{
						token_start = yytext;
						state_before = YYSTATE;
						xcdepth = 0;
						BEGIN(xc);
						/* Put back any characters past slash-star; see above */
						yyless(2);
						fputs("/*", yyout);
					}
	YY_BREAK
case 3:
YY_RULE_SETUP
#line 337 "pgc.l"
{
						xcdepth++;
				 		/* Put back any characters past slash-star; see above */
				 		yyless(2);
						fputs("/*", yyout);
					}
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 344 "pgc.l"
{
						ECHO;
						if (xcdepth <= 0)
						{
							BEGIN(state_before);
							token_start = NULL;
						}
						else
							xcdepth--;
					}
	YY_BREAK
case 5:
/* rule 5 can match eol */
YY_RULE_SETUP
#line 355 "pgc.l"
{ ECHO; }
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 356 "pgc.l"
{ ECHO; }
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 357 "pgc.l"
{ ECHO; }
	YY_BREAK
case YY_STATE_EOF(xc):
#line 359 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated /* comment"); }
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 361 "pgc.l"
{
						token_start = yytext;
						BEGIN(xb);
						startlit();
						addlitchar('b');
					}
	YY_BREAK
case 9:
/* rule 9 can match eol */
#line 368 "pgc.l"
case 10:
/* rule 10 can match eol */
YY_RULE_SETUP
#line 368 "pgc.l"
{
						yyless(1);
						BEGIN(SQL);
						if (literalbuf[strspn(literalbuf, "01") + 1] != '\0')
							mmerror(PARSE_ERROR, ET_ERROR, "invalid bit string input.");
						yylval.str = mm_strdup(literalbuf);
						return BCONST;
					}
	YY_BREAK
case 11:
/* rule 11 can match eol */
#line 378 "pgc.l"
case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
#line 378 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 13:
/* rule 13 can match eol */
#line 380 "pgc.l"
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
#line 380 "pgc.l"
{ /* ignore */ }
	YY_BREAK
case YY_STATE_EOF(xb):
#line 381 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated bit string"); }
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 383 "pgc.l"
{
						token_start = yytext;
						BEGIN(xh);
						startlit();
						addlitchar('x');
			}
	YY_BREAK
case 16:
/* rule 16 can match eol */
#line 390 "pgc.l"
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
#line 390 "pgc.l"
{
				yyless(1);
				BEGIN(SQL);
				yylval.str = mm_strdup(literalbuf);
				return XCONST;
			}
	YY_BREAK
case YY_STATE_EOF(xh):
#line 397 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated hexadecimal integer"); }
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 398 "pgc.l"
{
				/* National character.
		                 * Transfer it as-is to the backend.
		                 */
			        token_start = yytext;
				BEGIN(xq);
				startlit();
			}
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 406 "pgc.l"
{
				warn_on_first_escape = true;
				token_start = yytext;
				state_before = YYSTATE;
				BEGIN(xq);
				startlit();
			}
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 413 "pgc.l"
{
				warn_on_first_escape = false;
				token_start = yytext;
				state_before = YYSTATE;
				BEGIN(xq);
				startlit();
			}
	YY_BREAK
case 21:
/* rule 21 can match eol */
#line 421 "pgc.l"
case 22:
/* rule 22 can match eol */
YY_RULE_SETUP
#line 421 "pgc.l"
{
				yyless(1);
				BEGIN(state_before);
				yylval.str = mm_strdup(literalbuf);
				return SCONST;
			}
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 427 "pgc.l"
{ addlitchar('\''); }
	YY_BREAK
case 24:
/* rule 24 can match eol */
YY_RULE_SETUP
#line 428 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 25:
/* rule 25 can match eol */
YY_RULE_SETUP
#line 429 "pgc.l"
{ 
				check_escape_warning();
				addlit(yytext, yyleng);
			}
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 433 "pgc.l"
{ 
				check_escape_warning();
				addlit(yytext, yyleng);
			}
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 437 "pgc.l"
{ 
				check_escape_warning();
				addlit(yytext, yyleng);
			}
	YY_BREAK
case 28:
/* rule 28 can match eol */
YY_RULE_SETUP
#line 441 "pgc.l"
{ /* ignore */ }
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 442 "pgc.l"
{
                                       /* This is only needed for \ just before EOF */
                                       addlitchar(yytext[0]);
                        }
	YY_BREAK
case YY_STATE_EOF(xq):
#line 446 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted string"); }
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 447 "pgc.l"
{
				/* throw back all but the initial "$" */
				yyless(1);
				/* and treat it as {other} */
				return yytext[0];	
			}
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 453 "pgc.l"
{
				token_start = yytext;
				dolqstart = mm_strdup(yytext);
				BEGIN(xdolq);
				startlit();
			}
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 459 "pgc.l"
{
				if (strcmp(yytext, dolqstart) == 0)
				{
					free(dolqstart);
					BEGIN(SQL);
					yylval.str = mm_strdup(literalbuf);
					return SCONST;
				}
				else
				{
				        /*
				         * When we fail to match $...$ to dolqstart, transfer
				         * the $... part to the output, but put back the final
				         * $ for rescanning.  Consider $delim$...$junk$delim$
				         */
				        addlit(yytext, yyleng-1);
				        yyless(yyleng-1);
				}
			}
	YY_BREAK
case 33:
/* rule 33 can match eol */
YY_RULE_SETUP
#line 478 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 479 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 480 "pgc.l"
{
				/* This is only needed for $ inside the quoted text */
				addlitchar(yytext[0]);
			}
	YY_BREAK
case YY_STATE_EOF(xdolq):
#line 484 "pgc.l"
{ yyerror("unterminated dollar-quoted string"); }
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 486 "pgc.l"
{
						state_before = YYSTATE;
						BEGIN(xd);
						startlit();
					}
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 491 "pgc.l"
{
						BEGIN(state_before);
						if (literallen == 0)
							mmerror(PARSE_ERROR, ET_ERROR, "zero-length delimited identifier");
						/* The backend will truncate the idnetifier here. We do not as it does not change the result. */
						yylval.str = mm_strdup(literalbuf);
						return CSTRING;
					}
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 499 "pgc.l"
{
						BEGIN(state_before);
						yylval.str = mm_strdup(literalbuf);
						return CSTRING;
					}
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 504 "pgc.l"
{ addlitchar('"'); }
	YY_BREAK
case 40:
/* rule 40 can match eol */
YY_RULE_SETUP
#line 505 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case YY_STATE_EOF(xd):
case YY_STATE_EOF(xdc):
#line 506 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted identifier"); }
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 507 "pgc.l"
{
						state_before = YYSTATE;
						BEGIN(xdc);
						startlit();
					}
	YY_BREAK
case 42:
/* rule 42 can match eol */
YY_RULE_SETUP
#line 512 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 513 "pgc.l"
{ return TYPECAST; }
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 514 "pgc.l"
{
			  /* are we simulating Informix? */
                          if (INFORMIX_MODE)
			  {
			  	unput(':');
			  }
			  else
				return yytext[0];
			}
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 523 "pgc.l"
{ /*
					   * We may find a ';' inside a structure
					   * definition in a TYPE or VAR statement.
					   * This is not an EOL marker.
					   */
					  if (yytext[0] == ';' && struct_level == 0)
						 BEGIN C;
					  return yytext[0];
					}
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 532 "pgc.l"
{
						/*
						 * Check for embedded slash-star or dash-dash; those
						 * are comment starts, so operator must stop there.
						 * Note that slash-star or dash-dash at the first
						 * character will match a prior rule, not this one.
						 */
						int		nchars = yyleng;
						char   *slashstar = strstr(yytext, "/*");
						char   *dashdash = strstr(yytext, "--");

						if (slashstar && dashdash)
						{
							/* if both appear, take the first one */
							if (slashstar > dashdash)
								slashstar = dashdash;
						}
						else if (!slashstar)
							slashstar = dashdash;
						if (slashstar)
							nchars = slashstar - yytext;

						/*
						 * For SQL compatibility, '+' and '-' cannot be the
						 * last char of a multi-char operator unless the operator
						 * contains chars that are not in SQL operators.
						 * The idea is to lex '=-' as two operators, but not
						 * to forbid operator names like '?-' that could not be
						 * sequences of SQL operators.
						 */
						while (nchars > 1 &&
							   (yytext[nchars-1] == '+' ||
								yytext[nchars-1] == '-'))
						{
							int		ic;

							for (ic = nchars-2; ic >= 0; ic--)
							{
								if (strchr("~!@#^&|`?%", yytext[ic]))
									break;
							}
							if (ic >= 0)
								break; /* found a char that makes it OK */
							nchars--; /* else remove the +/-, and check again */
						}

						if (nchars < yyleng)
						{
							/* Strip the unwanted chars from the token */
							yyless(nchars);
							/*
							 * If what we have left is only one char, and it's
							 * one of the characters matching "self", then
							 * return it as a character token the same way
							 * that the "self" rule would have.
							 */
							if (nchars == 1 &&
								strchr(",()[].;:+-*/%^<>=", yytext[0]))
								return yytext[0];
						}

						/* Convert "!=" operator to "<>" for compatibility */
						if (strcmp(yytext, "!=") == 0)
							yylval.str = mm_strdup("<>");
						else
							yylval.str = mm_strdup(yytext);
						return Op;
					}
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 600 "pgc.l"
{
						yylval.ival = atol(yytext+1);
						return PARAM;
					}
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 604 "pgc.l"
{
						long val;
						char* endptr;

						errno = 0;
						val = strtol((char *)yytext, &endptr,10);
						if (*endptr != '\0' || errno == ERANGE
#ifdef HAVE_LONG_INT_64
							/* if long > 32 bits, check for overflow of int4 */
							|| val != (long) ((int32) val)
#endif
							)
						{
							errno = 0;
							yylval.str = mm_strdup(yytext);
							return FCONST;
						}
						yylval.ival = val;
						return ICONST;
					}
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 624 "pgc.l"
{
						yylval.str = mm_strdup(yytext);
						return IP;
					}
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 628 "pgc.l"
{
						yylval.str = mm_strdup(yytext);
						return FCONST;
			}
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 632 "pgc.l"
{
						yylval.str = mm_strdup(yytext);
						return FCONST;
			}
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 636 "pgc.l"
{
				yyless(yyleng-1);
				yylval.str = mm_strdup(yytext);
				return FCONST;
			}
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 641 "pgc.l"
{
				yyless(yyleng-2);
				yylval.str = mm_strdup(yytext);
				return FCONST;
			}
	YY_BREAK
case 54:
/* rule 54 can match eol */
YY_RULE_SETUP
#line 646 "pgc.l"
{
						yylval.str = mm_strdup(yytext+1);
						return(CVARIABLE);
					}
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 650 "pgc.l"
{
						ScanKeyword    *keyword;

						if (!isdefine())
						{
							/* Is it an SQL keyword? */
							keyword = ScanKeywordLookup(yytext);
							if (keyword != NULL)
								return keyword->value;

							/* Is it an ECPG keyword? */
							keyword = ScanECPGKeywordLookup( yytext);
							if (keyword != NULL)
								return keyword->value;

							/* Is it a C keyword? */
							keyword = ScanCKeywordLookup(yytext);
							if (keyword != NULL)
								return keyword->value;

							/*
							 * None of the above.  Return it as an identifier.
							 *
							 * The backend will attempt to truncate and case-fold
							 * the identifier, but I see no good reason for ecpg
							 * to do so; that's just another way that ecpg could get
							 * out of step with the backend.
							 */
							yylval.str = mm_strdup(yytext);
							return IDENT;
						}
					}
	YY_BREAK
case 56:
YY_RULE_SETUP
#line 682 "pgc.l"
{ return yytext[0]; }
	YY_BREAK
case 57:
/* rule 57 can match eol */
YY_RULE_SETUP
#line 683 "pgc.l"
{ BEGIN SQL; return SQL_START; }
	YY_BREAK
case 58:
YY_RULE_SETUP
#line 684 "pgc.l"
{ 
			  /* are we simulating Informix? */
			  if (INFORMIX_MODE)
			  {
			  	BEGIN SQL;
				return SQL_START;
			  }
			  else
			  	return S_ANYTHING;
			 }
	YY_BREAK
case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
#line 694 "pgc.l"
{ ECHO; }
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 695 "pgc.l"
{
						char* endptr;

						errno = 0;
						yylval.ival = strtoul((char *)yytext,&endptr,16);
						if (*endptr != '\0' || errno == ERANGE)
						{
							errno = 0;
							yylval.str = mm_strdup(yytext);
							return SCONST;
						}
						return ICONST;
					}
	YY_BREAK
case 61:
/* rule 61 can match eol */
YY_RULE_SETUP
#line 708 "pgc.l"
{
					  if (system_includes)
					  {
					  	BEGIN(incl);
					  }
					  else
					  {
						yylval.str = mm_strdup(yytext);
						return(CPP_LINE);
					  }
			}
	YY_BREAK
case 62:
/* rule 62 can match eol */
YY_RULE_SETUP
#line 719 "pgc.l"
{
						yylval.str = mm_strdup(yytext);
						return(CPP_LINE);
					}
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 723 "pgc.l"
{
						ScanKeyword		*keyword;

						/* Informix uses SQL defines only in SQL space */
						/* however, some defines have to be taken care of for compatibility */
						if ((!INFORMIX_MODE || !isinformixdefine()) && !isdefine())
						{
							keyword = ScanCKeywordLookup(yytext);
							if (keyword != NULL)
								return keyword->value;

							else {
								yylval.str = mm_strdup(yytext);
								return IDENT;
							}
						}
					}
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 740 "pgc.l"
{ return(';'); }
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 741 "pgc.l"
{ return(','); }
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 742 "pgc.l"
{ return('*'); }
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 743 "pgc.l"
{ return('%'); }
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 744 "pgc.l"
{ return('/'); }
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 745 "pgc.l"
{ return('+'); }
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 746 "pgc.l"
{ return('-'); }
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 747 "pgc.l"
{ return('('); }
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 748 "pgc.l"
{ return(')'); }
	YY_BREAK
case 73:
/* rule 73 can match eol */
YY_RULE_SETUP
#line 749 "pgc.l"
{ ECHO; }
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 750 "pgc.l"
{ return('{'); }
	YY_BREAK
case 75:
YY_RULE_SETUP
#line 751 "pgc.l"
{ return('}'); }
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 752 "pgc.l"
{ return('['); }
	YY_BREAK
case 77:
YY_RULE_SETUP
#line 753 "pgc.l"
{ return(']'); }
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 754 "pgc.l"
{ return('='); }
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 755 "pgc.l"
{ return(S_MEMBER); }
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 756 "pgc.l"
{ return(S_RSHIFT); }
	YY_BREAK
case 81:
YY_RULE_SETUP
#line 757 "pgc.l"
{ return(S_LSHIFT); }
	YY_BREAK
case 82:
YY_RULE_SETUP
#line 758 "pgc.l"
{ return(S_OR); }
	YY_BREAK
case 83:
YY_RULE_SETUP
#line 759 "pgc.l"
{ return(S_AND); }
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 760 "pgc.l"
{ return(S_INC); }
	YY_BREAK
case 85:
YY_RULE_SETUP
#line 761 "pgc.l"
{ return(S_DEC); }
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 762 "pgc.l"
{ return(S_EQUAL); }
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 763 "pgc.l"
{ return(S_NEQUAL); }
	YY_BREAK
case 88:
YY_RULE_SETUP
#line 764 "pgc.l"
{ return(S_ADD); }
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 765 "pgc.l"
{ return(S_SUB); }
	YY_BREAK
case 90:
YY_RULE_SETUP
#line 766 "pgc.l"
{ return(S_MUL); }
	YY_BREAK
case 91:
YY_RULE_SETUP
#line 767 "pgc.l"
{ return(S_DIV); }
	YY_BREAK
case 92:
YY_RULE_SETUP
#line 768 "pgc.l"
{ return(S_MOD); }
	YY_BREAK
case 93:
YY_RULE_SETUP
#line 769 "pgc.l"
{ return(S_MEMPOINT); }
	YY_BREAK
case 94:
YY_RULE_SETUP
#line 770 "pgc.l"
{ return(S_DOTPOINT); }
	YY_BREAK
case 95:
YY_RULE_SETUP
#line 771 "pgc.l"
{ return S_ANYTHING; }
	YY_BREAK
case 96:
/* rule 96 can match eol */
YY_RULE_SETUP
#line 773 "pgc.l"
{ BEGIN(def_ident); }
	YY_BREAK
case 97:
/* rule 97 can match eol */
YY_RULE_SETUP
#line 774 "pgc.l"
{
						/* are we simulating Informix? */
						if (INFORMIX_MODE)
						{
							BEGIN(def_ident);
						}
						else
						{
							yyless(1);
							return (S_ANYTHING);
						}
					}
	YY_BREAK
case 98:
/* rule 98 can match eol */
YY_RULE_SETUP
#line 786 "pgc.l"
{ BEGIN(incl); }
	YY_BREAK
case 99:
/* rule 99 can match eol */
YY_RULE_SETUP
#line 787 "pgc.l"
{ 
					  /* are we simulating Informix? */
					  if (INFORMIX_MODE)
					  {
						  BEGIN(incl);
					  }
					  else
					  {
						  yyless(1);
						  return (S_ANYTHING);
					  }
					}
	YY_BREAK
case 100:
/* rule 100 can match eol */
YY_RULE_SETUP
#line 799 "pgc.l"
{ ifcond = TRUE; BEGIN(xcond); }
	YY_BREAK
case 101:
/* rule 101 can match eol */
YY_RULE_SETUP
#line 800 "pgc.l"
{ 
					  /* are we simulating Informix? */
					  if (INFORMIX_MODE)
					  {
						  ifcond = TRUE;
						  BEGIN(xcond);
					  }
					  else
					  {
						  yyless(1);
						  return (S_ANYTHING);
					  }
					}
	YY_BREAK
case 102:
/* rule 102 can match eol */
YY_RULE_SETUP
#line 813 "pgc.l"
{ ifcond = FALSE; BEGIN(xcond); }
	YY_BREAK
case 103:
/* rule 103 can match eol */
YY_RULE_SETUP
#line 814 "pgc.l"
{ 
					  /* are we simulating Informix? */
					  if (INFORMIX_MODE)
					  {
						  ifcond = FALSE;
						  BEGIN(xcond);
					  }
					  else
					  {
						  yyless(1);
						  return (S_ANYTHING);
					  }
					}
	YY_BREAK
case 104:
/* rule 104 can match eol */
YY_RULE_SETUP
#line 827 "pgc.l"
{	/* pop stack */
						if ( preproc_tos == 0 ) {
							mmerror(PARSE_ERROR, ET_FATAL, "Missing matching 'EXEC SQL IFDEF / EXEC SQL IFNDEF'");
						}
						else if ( stacked_if_value[preproc_tos].else_branch )
							mmerror(PARSE_ERROR, ET_FATAL, "Missing 'EXEC SQL ENDIF;'");
						else
							preproc_tos--;

						ifcond = TRUE; BEGIN(xcond);
					}
	YY_BREAK
case 105:
/* rule 105 can match eol */
YY_RULE_SETUP
#line 838 "pgc.l"
{ 
					  /* are we simulating Informix? */
					  if (INFORMIX_MODE)
					  {
						if ( preproc_tos == 0 ) {
							mmerror(PARSE_ERROR, ET_FATAL, "Missing matching 'EXEC SQL IFDEF / EXEC SQL IFNDEF'");
						}
						else if ( stacked_if_value[preproc_tos].else_branch )
							mmerror(PARSE_ERROR, ET_FATAL, "Missing 'EXEC SQL ENDIF;'");
						else
							preproc_tos--;

						ifcond = TRUE; BEGIN(xcond);
					  }
					  else
					  {
						  yyless(1);
						  return (S_ANYTHING);
					  }
					}
	YY_BREAK
case 106:
/* rule 106 can match eol */
YY_RULE_SETUP
#line 859 "pgc.l"
{	/* only exec sql endif pops the stack, so take care of duplicated 'else' */
						if ( stacked_if_value[preproc_tos].else_branch ) {
							mmerror(PARSE_ERROR, ET_FATAL, "Duplicated 'EXEC SQL ELSE;'");
						}
						else {
							stacked_if_value[preproc_tos].else_branch = TRUE;
							stacked_if_value[preproc_tos].condition =
							(stacked_if_value[preproc_tos-1].condition &&
							 ! stacked_if_value[preproc_tos].condition);

							if ( stacked_if_value[preproc_tos].condition )
								BEGIN(C);
							else
								BEGIN(xskip);
						}
					}
	YY_BREAK
case 107:
/* rule 107 can match eol */
YY_RULE_SETUP
#line 875 "pgc.l"
{
					  /* are we simulating Informix? */
					  if (INFORMIX_MODE)
					  {
						if ( stacked_if_value[preproc_tos].else_branch ) {
							mmerror(PARSE_ERROR, ET_FATAL, "Duplicated 'EXEC SQL ELSE;'");
						}
						else {
							stacked_if_value[preproc_tos].else_branch = TRUE;
							stacked_if_value[preproc_tos].condition =
							(stacked_if_value[preproc_tos-1].condition &&
							 ! stacked_if_value[preproc_tos].condition);

							if ( stacked_if_value[preproc_tos].condition )
								BEGIN(C);
							else
								BEGIN(xskip);
						}
					  }
					  else
					  {
						  yyless(1);
						  return (S_ANYTHING);
					  }
					}
	YY_BREAK
case 108:
/* rule 108 can match eol */
YY_RULE_SETUP
#line 900 "pgc.l"
{
						if ( preproc_tos == 0 )
							mmerror(PARSE_ERROR, ET_FATAL, "Unmatched 'EXEC SQL ENDIF;'");
						else
							preproc_tos--;

						if ( stacked_if_value[preproc_tos].condition )
						   BEGIN(C);
						else
						   BEGIN(xskip);
					}
	YY_BREAK
case 109:
/* rule 109 can match eol */
YY_RULE_SETUP
#line 911 "pgc.l"
{
					  /* are we simulating Informix? */
					  if (INFORMIX_MODE)
					  {
						if ( preproc_tos == 0 )
							mmerror(PARSE_ERROR, ET_FATAL, "Unmatched 'EXEC SQL ENDIF;'");
						else
							preproc_tos--;

						if ( stacked_if_value[preproc_tos].condition )
						   BEGIN(C);
						else
						   BEGIN(xskip);
					  }
					  else
					  {
						  yyless(1);
						  return (S_ANYTHING);
					  }
					}
	YY_BREAK
case 110:
YY_RULE_SETUP
#line 932 "pgc.l"
{ /* ignore */ }
	YY_BREAK
case 111:
/* rule 111 can match eol */
YY_RULE_SETUP
#line 934 "pgc.l"
{
						if ( preproc_tos >= MAX_NESTED_IF-1 ) {
							mmerror(PARSE_ERROR, ET_FATAL, "Too many nested 'EXEC SQL IFDEF' conditions");
						}
						else 
						{
							struct _defines *defptr;
							unsigned int i;

							/* skip the ";" and trailing whitespace. Note that yytext contains
							   at least one non-space character plus the ";" */
							for ( i = strlen(yytext)-2;
								  i > 0 && isspace((unsigned char) yytext[i]);
								  i-- )
							{}
							yytext[i+1] = '\0';

							for ( defptr = defines; defptr != NULL &&
								  ( strcmp(yytext, defptr->old) != 0 ); defptr = defptr->next );

							preproc_tos++;
							stacked_if_value[preproc_tos].else_branch = FALSE;
							stacked_if_value[preproc_tos].condition =
							( (defptr ? ifcond : !ifcond) && stacked_if_value[preproc_tos-1].condition );
						}

						if ( stacked_if_value[preproc_tos].condition )
						   BEGIN C;
						else
						   BEGIN(xskip);
					}
	YY_BREAK
case 112:
YY_RULE_SETUP
#line 966 "pgc.l"
{
				old = mm_strdup(yytext);
				BEGIN(def);
				startlit();
			}
	YY_BREAK
case 113:
/* rule 113 can match eol */
YY_RULE_SETUP
#line 971 "pgc.l"
{
						struct _defines *ptr, *this;

						for (ptr = defines; ptr != NULL; ptr = ptr->next)
						{
							 if (strcmp(old, ptr->old) == 0)
							 {
								free(ptr->new);
								/* ptr->new = mm_strdup(scanstr(literalbuf));*/
								ptr->new = mm_strdup(literalbuf);
							 }
						}
						if (ptr == NULL)
						{
							this = (struct _defines *) mm_alloc(sizeof(struct _defines));

							/* initial definition */
							this->old = old;
							this->new = mm_strdup(literalbuf);
							this->next = defines;
							this->used = NULL;
							defines = this;
						}

						BEGIN(C);
					}
	YY_BREAK
case 114:
/* rule 114 can match eol */
YY_RULE_SETUP
#line 997 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 115:
/* rule 115 can match eol */
YY_RULE_SETUP
#line 999 "pgc.l"
{	parse_include(); }
	YY_BREAK
case 116:
/* rule 116 can match eol */
YY_RULE_SETUP
#line 1000 "pgc.l"
{	parse_include(); }
	YY_BREAK
case 117:
/* rule 117 can match eol */
YY_RULE_SETUP
#line 1001 "pgc.l"
{ parse_include(); }
	YY_BREAK
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(C):
case YY_STATE_EOF(SQL):
case YY_STATE_EOF(incl):
case YY_STATE_EOF(def):
case YY_STATE_EOF(def_ident):
case YY_STATE_EOF(xpre):
case YY_STATE_EOF(xcond):
case YY_STATE_EOF(xskip):
#line 1003 "pgc.l"
{
			  		if (yy_buffer == NULL) {
				  		if ( preproc_tos > 0 ) 
						{
					  		preproc_tos = 0;
							mmerror(PARSE_ERROR, ET_FATAL, "Missing 'EXEC SQL ENDIF;'");
				  		}
							yyterminate();
							}
				  		else
				  		{
							struct _yy_buffer *yb = yy_buffer;
							int i;
							struct _defines *ptr;

							for (ptr = defines; ptr; ptr = ptr->next)
								if (ptr->used == yy_buffer)
								{
									ptr->used = NULL;
									break;
								}
									
							if (yyin != NULL)
								fclose(yyin);

							yy_delete_buffer(YY_CURRENT_BUFFER );
							yy_switch_to_buffer(yy_buffer->buffer);

							yylineno = yy_buffer->lineno;

							/* We have to output the filename only if we change files here */
							i = strcmp(input_filename, yy_buffer->filename);

							free(input_filename);
							input_filename = yy_buffer->filename;

							yy_buffer = yy_buffer->next;
							free(yb);

							if (i != 0)
								output_line_number();
							
				  		}
					}
	YY_BREAK
case 118:
YY_RULE_SETUP
#line 1047 "pgc.l"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 2867 "pgc.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 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)
{
    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	register char *source = (yytext_ptr);
	register 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;

			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,b->yy_buf_size + 2  );
				}
			else
				/* Can't grow it, we don't own it. */
				b->yy_ch_buf = 0;

			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), (size_t) 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_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
		/* Extend the array by 50%, plus the number we really need. */
		yy_size_t 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,new_size  );
		if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
			YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
	}

	(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)
{
	register yy_state_type yy_current_state;
	register char *yy_cp;
    
	yy_current_state = (yy_start);

	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
		{
		register 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 >= 478 )
				yy_c = yy_meta[(unsigned int) yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) 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 )
{
	register int yy_is_jam;
    	register char *yy_cp = (yy_c_buf_p);

	register 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 >= 478 )
			yy_c = yy_meta[(unsigned int) yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
	yy_is_jam = (yy_current_state == 477);

	return yy_is_jam ? 0 : yy_current_state;
}

    static void yyunput (int c, register char * yy_bp )
{
	register 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. */
		register int number_to_move = (yy_n_chars) + 2;
		register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
		register 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) = 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;

    if ( c == '\n' ){
        --yylineno;
    }

	(yytext_ptr) = yy_bp;
	(yy_hold_char) = *yy_cp;
	(yy_c_buf_p) = yy_cp;
}

#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 = (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 EOF;

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

	if ( c == '\n' )
		   
    yylineno++;
;

	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(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)
{
	int 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;
		(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. */
		int grow_size = 8 /* arbitrary grow size */;

		num_to_alloc = (yy_buffer_stack_max) + grow_size;
		(yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc
								((yy_buffer_stack),
								num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );

		/* zero only the new slots.*/
		memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
		(yy_buffer_stack_max) = num_to_alloc;
	}
}

/** Setup the input buffer state to scan directly from a user-specified character buffer.
 * @param base the character buffer
 * @param size the size in bytes of the character buffer
 * 
 * @return the newly allocated buffer state object. 
 */
YY_BUFFER_STATE yy_scan_buffer  (char * base, yy_size_t  size )
{
	YY_BUFFER_STATE b;
    
	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return 0;

	b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );

	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
	b->yy_buf_pos = b->yy_ch_buf = base;
	b->yy_is_our_buffer = 0;
	b->yy_input_file = 0;
	b->yy_n_chars = b->yy_buf_size;
	b->yy_is_interactive = 0;
	b->yy_at_bol = 1;
	b->yy_fill_buffer = 0;
	b->yy_buffer_status = YY_BUFFER_NEW;

	yy_switch_to_buffer(b  );

	return b;
}

/** Setup the input buffer state to scan a string. The next call to yylex() will
 * scan from a @e copy of @a str.
 * @param yystr a NUL-terminated string to scan
 * 
 * @return the newly allocated buffer state object.
 * @note If you want to scan bytes that may contain NUL values, then use
 *       yy_scan_bytes() instead.
 */
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
{
    
	return yy_scan_bytes(yystr,strlen(yystr) );
}

/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
 * scan from a @e copy of @a bytes.
 * @param bytes the byte buffer to scan
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 * 
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	int i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = _yybytes_len + 2;
	buf = (char *) yyalloc(n  );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );

	for ( i = 0; i < _yybytes_len; ++i )
		buf[i] = yybytes[i];

	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;

	b = yy_scan_buffer(buf,n );
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );

	/* It's okay to grow etc. this buffer, and we should throw it
	 * away when we're done.
	 */
	b->yy_is_our_buffer = 1;

	return b;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

static void yy_fatal_error (yyconst char* msg )
{
    	(void) fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
}

/* Redefine yyless() so it works in section 3 code. */

#undef yyless
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		yytext[yyleng] = (yy_hold_char); \
		(yy_c_buf_p) = yytext + yyless_macro_arg; \
		(yy_hold_char) = *(yy_c_buf_p); \
		*(yy_c_buf_p) = '\0'; \
		yyleng = yyless_macro_arg; \
		} \
	while ( 0 )

/* Accessor  methods (get/set functions) to struct members. */

/** Get the current line number.
 * 
 */
int yyget_lineno  (void)
{
        
    return yylineno;
}

/** Get the input stream.
 * 
 */
FILE *yyget_in  (void)
{
        return yyin;
}

/** Get the output stream.
 * 
 */
FILE *yyget_out  (void)
{
        return yyout;
}

/** Get the length of the current token.
 * 
 */
int yyget_leng  (void)
{
        return yyleng;
}

/** Get the current token.
 * 
 */

char *yyget_text  (void)
{
        return yytext;
}

/** Set the current line number.
 * @param line_number
 * 
 */
void yyset_lineno (int  line_number )
{
    
    yylineno = line_number;
}

/** Set the input stream. This does not discard the current
 * input buffer.
 * @param in_str A readable stream.
 * 
 * @see yy_switch_to_buffer
 */
void yyset_in (FILE *  in_str )
{
        yyin = in_str ;
}

void yyset_out (FILE *  out_str )
{
        yyout = out_str ;
}

int yyget_debug  (void)
{
        return yy_flex_debug;
}

void yyset_debug (int  bdebug )
{
        yy_flex_debug = bdebug ;
}

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

    /* We do not touch yylineno unless the option is enabled. */
    yylineno =  1;
    
    (yy_buffer_stack) = 0;
    (yy_buffer_stack_top) = 0;
    (yy_buffer_stack_max) = 0;
    (yy_c_buf_p) = (char *) 0;
    (yy_init) = 0;
    (yy_start) = 0;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = (FILE *) 0;
    yyout = (FILE *) 0;
#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, yyconst char * s2, int n )
{
	register int i;
	for ( i = 0; i < n; ++i )
		s1[i] = s2[i];
}
#endif

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

	return n;
}
#endif

void *yyalloc (yy_size_t  size )
{
	return (void *) 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 (void *) realloc( (char *) ptr, size );
}

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

#define YYTABLES_NAME "yytables"

#line 1047 "pgc.l"


void
lex_init(void)
{
	braces_open = 0;

	preproc_tos = 0;
	yylineno = 1;
	ifcond = TRUE;
	stacked_if_value[preproc_tos].condition = ifcond;
	stacked_if_value[preproc_tos].else_branch = FALSE;

	/* initialize literal buffer to a reasonable but expansible size */
	if (literalbuf == NULL)
	{
		literalalloc = 128;
		literalbuf = (char *) malloc(literalalloc);
	}
	startlit();

	BEGIN C;
}

static void
addlit(char *ytext, int yleng)
{
	/* enlarge buffer if needed */
	if ((literallen+yleng) >= literalalloc)
	{
		do 
			literalalloc *= 2;
		while ((literallen+yleng) >= literalalloc);
		literalbuf = (char *) realloc(literalbuf, literalalloc);
	}
	/* append new data, add trailing null */
	memcpy(literalbuf+literallen, ytext, yleng);
	literallen += yleng;
	literalbuf[literallen] = '\0';
}

static void
addlitchar(unsigned char ychar)
{
	/* enlarge buffer if needed */
        if ((literallen+1) >= literalalloc)
        {
                literalalloc *= 2;
                literalbuf = (char *) realloc(literalbuf, literalalloc);
        }
	/* append new data, add trailing null */
	literalbuf[literallen] = ychar;
	literallen += 1;
	literalbuf[literallen] = '\0';
}

static void
parse_include(void)
{
	/* got the include file name */
	struct _yy_buffer *yb;
  	struct _include_path *ip;
  	char inc_file[MAXPGPATH];
  	unsigned int i;

  	yb = mm_alloc(sizeof(struct _yy_buffer));

  	yb->buffer =	YY_CURRENT_BUFFER;
  	yb->lineno = yylineno;
  	yb->filename = input_filename;
  	yb->next = yy_buffer;

  	yy_buffer = yb;

  	/*
	 * skip the ";" if there is one and trailing whitespace. Note that
	 * yytext contains at least one non-space character plus the ";" 
	 */
  	for ( i = strlen(yytext)-2;
		i > 0 && isspace((unsigned char) yytext[i]);
		i-- )
  		{}

	if (yytext[i] == ';')
		i--;

	yytext[i+1] = '\0';
	
	yyin = NULL;

	/* If file name is enclosed in '"' remove these and look only in '.' */
	/* Informix does look into all include paths though, except filename starts with '/' */
	if ((yytext[0] == '"' && yytext[i] == '"') &&
	    ((compat != ECPG_COMPAT_INFORMIX && compat != ECPG_COMPAT_INFORMIX_SE) || yytext[1] == '/'))
	{
		yytext[i] = '\0';
		memmove(yytext, yytext+1, strlen(yytext));
	
		strncpy(inc_file, yytext, sizeof(inc_file));
		yyin = fopen(inc_file, "r");
		if (!yyin)
		{
			if (strcmp(inc_file + strlen(inc_file) - 2, ".h"))
			{
				strcat(inc_file, ".h");
				yyin = fopen(inc_file, "r");
			}
		}
		
	}
	else
	{
		if ((yytext[0] == '"' && yytext[i] == '"') || (yytext[0] == '<' && yytext[i] == '>'))
		{
			yytext[i] = '\0';
			memmove(yytext, yytext+1, strlen(yytext));
		}
		
	  	for (ip = include_paths; yyin == NULL && ip != NULL; ip = ip->next)
	  	{
			if (strlen(ip->path) + strlen(yytext) + 3 > MAXPGPATH)
			{
				fprintf(stderr, "Error: Path %s/%s is too long in line %d, skipping.\n", ip->path, yytext, yylineno);
				continue;
			}
			snprintf (inc_file, sizeof(inc_file), "%s/%s", ip->path, yytext);
			yyin = fopen(inc_file, "r");
			if (!yyin)
			{
				if (strcmp(inc_file + strlen(inc_file) - 2, ".h"))
				{
					strcat(inc_file, ".h");
					yyin = fopen( inc_file, "r" );
				}
			}
		}
	}
	if (!yyin)
		mmerror(NO_INCLUDE_FILE, ET_FATAL, "Cannot open include file %s in line %d\n", yytext, yylineno);

	input_filename = mm_strdup(inc_file);
	yy_switch_to_buffer(yy_create_buffer(yyin,YY_BUF_SIZE ));
	yylineno = 1;
	output_line_number();

  	BEGIN C;
}

static void
check_escape_warning(void)
{
	if (warn_on_first_escape && escape_string_warning)
	       	mmerror (PARSE_ERROR, ET_WARNING, "nonstandard use of escape in a string literal");
        warn_on_first_escape = false;   /* warn only once per string */
}

static bool isdefine(void)
{
	struct _defines *ptr;

	/* is it a define? */
	for (ptr = defines; ptr; ptr = ptr->next)
	{
		if (strcmp(yytext, ptr->old) == 0 && ptr->used == NULL)
		{
			struct _yy_buffer *yb;

			yb = mm_alloc(sizeof(struct _yy_buffer));

			yb->buffer =  YY_CURRENT_BUFFER;
			yb->lineno = yylineno;
			yb->filename = mm_strdup(input_filename);
			yb->next = yy_buffer;

			ptr->used = yy_buffer = yb;

			yy_scan_string(ptr->new);
			return true;
		}
	}

	return false;
}

static bool isinformixdefine(void)
{
	const char *new = NULL;

	if (strcmp(yytext, "dec_t") == 0)
		new = "decimal";
	else if (strcmp(yytext, "intrvl_t") == 0)
	        new = "interval";
	else if (strcmp(yytext, "dtime_t") == 0)
                new = "timestamp";

	if (new)
	{
		struct _yy_buffer *yb;

		yb = mm_alloc(sizeof(struct _yy_buffer));

		yb->buffer =  YY_CURRENT_BUFFER;
		yb->lineno = yylineno;
		yb->filename = mm_strdup(input_filename);
		yb->next = yy_buffer;
		yy_buffer = yb;

		yy_scan_string(new);
		return true;
	}

	return false;
}

