#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 129
#define YY_END_OF_BUFFER 130
/* 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[490] =
    {   0,
        0,    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,  130,  128,   98,   76,   76,   98,
       43,   98,   60,   70,   98,   19,   74,   75,   69,   72,
       68,   73,   98,   71,   50,   50,   66,   67,   98,   81,
       98,   65,   65,   79,   80,   77,   98,   78,   58,    1,
        1,   48,   38,   48,   46,   47,   20,   47,   47,   47,
       47,   50,   47,   57,   57,   57,   57,   57,  127,  127,
      127,  127,  123,  123,  122,  121,  120,  104,  104,   12,

        9,    5,    5,    6,    6,   42,   39,   44,   40,   44,
       11,   16,   26,   26,   22,   31,   25,   22,   35,   35,
       37,  119,  119,  117,   76,   76,  117,  117,    0,    0,
       90,    0,   64,   64,    0,    0,    0,    0,    0,    0,
       95,   86,   93,   87,   91,   88,   92,   82,   97,   52,
        2,    0,   94,   52,   50,    0,   62,   84,   89,   83,
       65,   65,   85,    1,    0,   48,   48,   33,   49,   32,
        1,   52,    2,   52,   50,   54,   45,   56,   57,    8,
       21,   18,   15,    0,  126,    0,    0,    0,  122,  120,
        0,    0,  103,   12,    9,    9,   10,    5,    7,    4,

        3,   42,   41,   44,   11,   16,   16,   17,   26,   22,
       22,   24,   23,   27,   28,   27,   25,   35,   34,   36,
        0,    0,  118,    0,    0,    0,    0,   64,   64,    0,
        0,    0,    0,    0,    0,   96,    2,    0,   61,   52,
        0,   53,   62,   65,   32,    1,    1,    2,   52,   50,
       55,   56,    0,    0,    0,  125,  124,    9,   14,   10,
        9,    3,   16,   13,   17,   16,   22,   30,   23,   22,
       28,   29,   36,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,   65,    0,   52,   50,   56,    0,    0,
        0,   56,  125,  125,  124,  124,    9,    9,    9,    9,

       16,   16,   16,   16,   22,   22,   22,   22,   28,   29,
        0,    0,    0,  112,  114,    0,    0,    0,    0,    0,
        0,   65,    0,   52,   52,   56,    0,    0,    0,    0,
        9,    9,    9,    9,    9,   16,   16,   13,   16,   16,
       22,   22,   22,   22,   22,    0,    0,    0,    0,  112,
      114,    0,  108,    0,    0,  102,    0,   65,    0,    0,
       52,    0,    0,    0,    0,   56,   56,    9,   16,   22,
        0,    0,  100,    0,  116,  108,  110,    0,  102,    0,
       59,   51,    0,    0,    0,    0,    0,   56,    0,   63,
      100,  110,  106,   59,   59,   65,   65,   65,   65,   51,

       56,    0,    0,    0,   63,   63,   63,  106,    0,    0,
        0,   65,   65,   65,   65,   65,   65,   51,   56,    0,
        0,    0,   63,    0,    0,    0,   65,   65,   65,   65,
       65,   65,   65,   65,    0,    0,    0,    0,    0,    0,
        0,    0,   65,   65,   65,   65,   65,   65,   65,   65,
      111,    0,    0,    0,    0,    0,    0,    0,   65,  111,
        0,  113,   65,   65,   65,   65,   65,    0,  107,    0,
        0,    0,  101,   65,    0,  115,  107,   65,   65,  101,
      109,   99,    0,   99,  109,   65,  105,  105,    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[546] =
    {   0,
        0,    0,    0,    0,   50,    0,   95,   99,  104,  107,
      103,  122,  141,  160, 1204, 1203,  203,  248, 1199, 1182,
      121,  123, 1156, 1154,  200,  203, 1153, 1151,  109,  110,
      269,  288,  231,  238, 1161, 2314, 2314,  275,  281, 1133,
     2314,  183,  218, 1132, 1139, 2314, 2314, 2314, 1121,   88,
     2314,  198,  317,  190,  248,  322, 2314, 2314, 1106, 1103,
     1099,    0,   74, 2314, 2314, 2314, 1070, 2314, 2314,  289,
      343,    0, 2314,  353,  344,    0, 2314, 2314, 1096,  126,
     1096,  353, 1086,    0, 1092, 1091, 1083, 1076, 1047,    0,
     2314,    0, 2314,  310, 2314, 2314,    0, 2314,  380,    0,

      386,    0,    0,  111, 1056,    0, 1062, 2314, 2314,  179,
        0,  389,    0,    0,  405,  240,    0,  408,    0,    0,
     1059, 2314,  411, 2314, 2314, 2314,  212,  179,  424,  397,
     2314,  350, 2314,  373,  392,  435, 1032,  199,  298, 1026,
     2314, 2314, 2314, 2314, 2314, 2314, 2314, 1048, 2314,  422,
        0, 1058, 2314,  425,  430,  439,    0, 2314, 2314, 2314,
        0, 1016, 2314,  462,  464,    0,    0, 2314,  450, 1040,
      504,  453,    0,  456,  462,  470, 2314,  406,    0, 2314,
     2314, 2314, 2314, 1022, 2314, 1039, 1016,  496, 2314,    0,
      500,  503, 2314,    0,  531,  534, 1025,    0,  224, 2314,

        0,    0, 2314, 2314,    0,  537,  553, 1013,    0,  556,
      563, 2314, 1012, 2314,  328,    0,    0,    0, 2314, 1018,
      559,  573, 2314,  990,  990,  540,  543,  565,  575,  987,
      417,  975,  248,  974,  972, 2314,    0,  986, 2314,  495,
      568,  571,    0,  957,  978,    0,  615,    0,  578,  583,
      586,  479,  958,    0,  610,  633,  642,  645, 2314,  966,
      648,    0,  656, 2314,  965,  666,  673, 2314,  950,  676,
      400,    0,  957,  932,  650,  911,  911,  911,  899,  897,
      897,  831,  830,  693,  678,  683,  688,  664,  709,  715,
      720,  725,  732, 2314,  737, 2314,  742,  745,  769,  772,

      776,  779,  788,  795,  798,  804,  814,  820, 2314, 2314,
      748,  582,  822,  823,  826,  823,  821,  809,  794,  786,
      830,  780,  818,  823,  826,  671,  870,  767,  919,  925,
      847,  850,  967,  970,  973,  989,  992, 1008, 1011, 1014,
     1030, 1033, 1049, 1052, 1055, 1036,  775,  976,  780,  922,
      995, 1071, 1075,  777,  772, 1078,  764,  758, 1063, 1068,
     1071,  760,  752,  749,    0,  984, 1103, 1097, 1149, 1152,
      727, 1124, 1094, 1168, 2314, 1171, 1174,  725, 1177,  720,
     1180, 1165,  737,    0,  711, 1205,  714,    0, 1187, 1204,
     1191, 1194, 1197, 1222, 1228,  697,  456,  583,  687, 1182,

     1262, 1274,  488,  668, 1207, 1215, 1264, 1225,  659,  729,
      647,  640,  826,  631,  402,  607,  599, 2314,    0,  829,
      596,  601, 1269,  584,  571,  549,  536,  518,  516,  506,
      479,  478,  464,  455,  447,  429,  396,  396,  386,  369,
      361,  354,  347, 1283, 1309,  335,  327,  326,  310,  307,
     1286, 1312,  299,  281,  256,  234,  215,  198,  172, 1315,
     1318, 2314, 1321, 1324,  150,  136, 1327, 1335, 1344,  132,
      116,   83, 1347, 1350, 1353, 2314, 1358, 1361,   71, 1364,
     1367, 1370,   69, 1376, 1379, 1382, 1385, 1388, 2314, 1392,
     1412, 1432, 1452, 1472, 1492, 1512, 1532, 1552, 1572, 1592,

     1612, 1632, 1652, 1672, 1692, 1707, 1723, 1735, 1700, 1749,
     1768, 1788, 1808, 1823, 1841, 1860, 1880, 1900, 1920, 1940,
     1959, 1979, 1999,  576, 2018, 2034, 2051,  597, 2066, 2085,
     2102, 2114, 2130,  673, 2142,  653, 2160, 2179, 2199, 2219,
      702, 2234, 2253, 2273, 2293
    } ;

static yyconst flex_int16_t yy_def[546] =
    {   0,
      490,  490,  489,    3,  489,    5,  491,  491,  492,  492,
      493,  493,  494,  494,  495,  495,  496,  496,  497,  497,
      498,  498,  499,  499,  500,  500,  501,  501,  502,  502,
      503,  503,  504,  504,  489,  489,  489,  489,  489,  489,
      489,  505,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  506,  506,  489,  489,  489,  489,  489,  489,  489,
      489,  507,  489,  505,  508,  507,  489,  489,  507,  489,
      507,  489,  509,  510,  510,  510,  510,  510,  511,  512,
      489,  513,  489,  489,  489,  489,  514,  489,  515,  516,

      489,  517,  517,  489,  489,  518,  489,  489,  489,  489,
      519,  489,  520,  520,  489,  521,  522,  489,  523,  523,
      524,  489,  525,  489,  489,  489,  489,  489,  489,  505,
      489,  505,  489,  505,  505,  505,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      526,  527,  489,  489,  489,  489,  528,  489,  489,  489,
      506,  506,  489,  489,  505,  507,   74,  489,  489,  529,
      530,  489,  531,  489,  489,  489,  489,  532,  510,  489,
      489,  489,  489,  511,  489,  512,  513,  489,  489,  514,
      489,  515,  489,  516,  489,  489,  489,  517,  489,  489,

      533,  518,  489,  489,  519,  489,  489,  489,  520,  489,
      489,  489,  489,  489,  489,  534,  522,  523,  489,  535,
      489,  525,  489,  489,  489,  505,  505,  505,  505,  489,
      489,  489,  489,  489,  489,  489,  526,  527,  489,  489,
      489,  489,  528,  506,  529,  530,  530,  531,  489,  489,
      489,  532,  489,  536,  537,  489,  489,  489,  489,  489,
      538,  533,  489,  489,  489,  539,  489,  489,  489,  540,
      489,  541,  535,  489,  505,  489,  489,  489,  489,  489,
      489,  489,  489,  506,  489,  489,  489,  542,  537,  537,
      537,  537,  489,  489,  489,  489,  543,  538,  538,  538,

      544,  539,  539,  539,  545,  540,  540,  540,  489,  489,
      489,  505,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  506,  489,  489,  489,  542,  489,  292,  489,  292,
      543,  543,  543,  543,  538,  544,  544,  544,  544,  539,
      545,  545,  545,  545,  540,  489,  489,  505,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  506,  489,  489,
      489,  327,  327,  327,  327,  327,  489,  543,  544,  545,
      489,  505,  489,  489,  489,  489,  489,  489,  489,  489,
      506,  489,  489,  327,  327,  327,  327,  367,  489,  505,
      489,  489,  489,  489,  489,  506,  506,  506,  506,  489,

      327,  489,  489,  489,  505,  489,  505,  489,  489,  489,
      489,  506,  506,  506,  506,  506,  506,  489,  401,  489,
      489,  489,  489,  489,  489,  489,  506,  506,  506,  506,
      506,  506,  506,  506,  489,  489,  489,  489,  489,  489,
      489,  489,  506,  506,  506,  506,  506,  506,  506,  506,
      489,  489,  489,  489,  489,  489,  489,  489,  506,  489,
      489,  489,  506,  506,  506,  506,  506,  489,  489,  489,
      489,  489,  489,  506,  489,  489,  489,  506,  506,  489,
      489,  489,  489,  489,  489,  506,  489,  489,    0,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,

      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489
    } ;

static yyconst flex_int16_t yy_nxt[2365] =
    {   0,
       37,   38,   39,   38,   40,   41,   42,   43,   44,   45,
       46,   47,   48,   49,   50,   51,   52,   53,   54,   55,
       56,   56,   57,   58,   59,   60,   61,   37,   62,   62,
       62,   62,   63,   62,   62,   62,   62,   62,   62,   62,
       62,   62,   64,   37,   65,   37,   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,  487,  144,  486,   90,   94,   94,   94,   94,   94,
       94,  120,  120,  145,  483,  162,  121,  121,   91,   92,
      162,   91,   91,   92,  199,   91,  109,   95,  109,  200,
       95,   97,   97,   97,   97,   97,   97,   97,   97,   97,
       97,   97,   97,   97,   97,  172,  172,  172,  482,   97,
       97,   97,   97,   97,   97,   97,   97,   97,   97,   97,
       97,   97,   97,   97,  110,  481,  110,  479,   97,   99,
       99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
       99,   99,   99,  478,  204,  133,  134,   99,   99,   99,
       99,   99,   99,   99,   99,   99,   99,   99,   99,   99,

       99,   99,  114,  151,  474,  114,   99,  103,  152,  103,
      115,  103,  103,  115,  146,  153,  104,  103,  135,  103,
      225,  105,  204,  147,  148,  225,  136,  103,  103,  103,
      103,  473,  125,  126,  125,  231,  232,  199,  127,  125,
      126,  125,  200,  116,  138,  127,  116,  224,  103,  137,
      138,  103,  103,  139,  103,  472,  103,  103,  140,  215,
      215,  104,  103,  128,  103,  154,  105,  155,  155,  155,
      128,  471,  103,  103,  103,  103,  129,  129,  129,  280,
      156,  130,  129,  129,  129,  281,  216,  130,  470,  157,
      164,  164,  164,  103,  157,  165,  103,  123,  123,  123,

      123,  123,  123,  123,  123,  123,  123,  123,  123,  123,
      123,  188,  188,  188,  469,  123,  123,  123,  123,  123,
      123,  123,  123,  123,  123,  123,  123,  123,  123,  123,
      149,  233,  468,  189,  123,  234,  150,  150,  150,  154,
      467,  155,  155,  155,  164,  164,  164,  271,  271,  165,
      466,  168,  133,  134,  156,  133,  134,  167,  465,  167,
      464,  167,  167,  169,  169,  169,  167,  167,  463,  167,
      174,  167,  175,  175,  175,  133,  134,  167,  167,  167,
      167,  191,  191,  191,  459,  176,  458,  195,  196,  196,
      206,  207,  207,  136,  133,  134,  136,  457,  167,  133,

      134,  167,  197,  193,  456,  208,  210,  211,  211,  210,
      211,  211,  221,  221,  221,  212,  136,  455,  212,  309,
      309,  213,  253,  254,  213,  129,  129,  129,  454,  226,
      130,  453,  135,  431,  223,  136,  227,  228,  229,  432,
      136,  150,  150,  150,  240,  240,  240,  154,  255,  155,
      155,  155,  277,  241,  156,  241,  278,  156,  242,  242,
      242,  452,  156,  164,  164,  164,  133,  134,  165,  169,
      169,  169,  172,  172,  172,  249,  249,  249,  136,  174,
      451,  250,  250,  250,  251,  176,  251,  450,  176,  242,
      242,  242,  413,  414,  176,  253,  254,  188,  188,  188,

      449,  191,  191,  191,  191,  191,  191,  136,  247,  448,
      247,  447,  247,  247,  240,  240,  240,  247,  247,  189,
      247,  255,  247,  193,  420,  421,  193,  156,  247,  247,
      247,  247,  195,  196,  196,  258,  258,  258,  206,  207,
      207,  446,  133,  134,  259,  133,  134,  197,  445,  247,
      260,  444,  247,  208,  263,  263,  263,  210,  211,  211,
      221,  221,  221,  264,  267,  267,  267,  133,  134,  265,
      275,  443,  213,  268,  221,  221,  221,  133,  134,  269,
      442,  220,  223,  136,  133,  134,  136,  242,  242,  242,
      242,  242,  242,  220,  220,  285,  223,  286,  286,  286,

      174,  441,  287,  287,  287,  242,  242,  242,  136,  243,
      176,  289,  289,  289,  243,  176,  415,  440,  136,  247,
      416,  247,  348,  247,  247,  136,  291,  437,  247,  247,
      434,  247,  438,  247,  293,  293,  293,  433,  439,  247,
      247,  247,  247,  295,  295,  295,  258,  258,  258,  299,
      196,  196,  133,  134,  292,  259,  294,  263,  263,  263,
      247,  260,  430,  247,  300,  296,  264,  303,  207,  207,
      288,  288,  265,  427,  267,  267,  267,  307,  211,  211,
      253,  254,  304,  268,  426,  272,  312,  253,  254,  269,
      272,  424,  308,  136,  321,  321,  321,  323,  323,  323,

      285,  422,  324,  324,  324,  325,  255,  287,  287,  287,
      289,  289,  289,  255,  310,  176,  289,  289,  289,  310,
      176,  289,  289,  289,  417,  291,  289,  289,  289,  412,
      384,  291,  322,  293,  293,  293,  327,  386,  295,  295,
      295,  328,  329,  332,  258,  258,  299,  196,  196,  346,
      346,  346,  333,  292,  359,  294,  394,  393,  334,  292,
      296,  300,  422,  389,  292,  384,  425,  330,  384,  292,
      299,  196,  196,  299,  196,  196,  384,  337,  263,  263,
      303,  207,  207,  327,  290,  300,  338,  347,  335,  303,
      207,  207,  339,  329,  381,  304,  303,  207,  207,  342,

      267,  267,  380,  378,  304,  307,  211,  211,  343,  290,
      377,  340,  373,  371,  344,  307,  211,  211,  358,  356,
      308,  307,  211,  211,  350,  350,  350,  351,  351,  351,
      308,  321,  321,  321,  355,  359,  345,  360,  360,  360,
      285,  354,  361,  361,  361,  361,  361,  361,  332,  258,
      258,  332,  258,  258,  353,  176,  352,  333,  176,  349,
      333,  428,  320,  334,  435,  429,  334,  319,  436,  357,
      362,  363,  289,  289,  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,
      289,  289,  289,  350,  350,  350,  290,  290,  318,  317,
      290,  290,  290,  290,  316,  291,  290,  290,  290,  290,
      290,  291,  290,  315,  314,  290,  313,  367,  367,  367,
      367,  367,  367,  367,  367,  367,  367,  367,  367,  367,
      367,  290,  311,  292,  219,  367,  305,  290,  332,  258,
      258,  332,  258,  258,  299,  196,  196,  333,  133,  134,
      333,  301,  297,  334,  254,  168,  368,  284,  239,  335,
      337,  263,  263,  337,  263,  263,  351,  351,  351,  338,

      385,  386,  338,  283,  282,  339,  279,  372,  339,  337,
      263,  263,  337,  263,  263,  303,  207,  207,  338,  136,
      276,  338,  274,  233,  339,  219,  387,  369,  270,  266,
      340,  342,  267,  267,  342,  267,  267,  346,  346,  346,
      343,  261,  257,  343,  256,  185,  344,  168,  244,  344,
      342,  267,  267,  342,  267,  267,  307,  211,  211,  343,
      239,  236,  343,  235,  230,  344,  219,  203,  370,  201,
      185,  345,  374,  374,  374,  347,  376,  376,  376,  379,
      379,  379,  382,  382,  382,  359,  183,  383,  383,  383,
      361,  361,  361,  182,  375,  391,  391,  391,  332,  258,

      258,  181,  180,  176,  289,  289,  289,  333,  177,  173,
      388,  290,  171,  368,  290,  290,  290,  290,  163,  328,
      329,  290,  388,  388,  388,  160,  133,  134,  159,  290,
      158,  388,  388,  388,  388,  388,  388,  388,  388,  388,
      388,  388,  388,  388,  388,  330,  143,  292,  142,  388,
      337,  263,  263,  342,  267,  267,  390,  141,  131,  338,
      489,  118,  343,  118,  112,  369,  112,  136,  370,  374,
      374,  374,  376,  376,  376,  392,  392,  392,  379,  379,
      379,  395,  395,  395,  400,  400,  400,  107,  402,  402,
      402,  375,  391,  391,  391,  392,  392,  392,  408,  408,

      408,  418,  418,  418,  107,  405,  406,  407,  405,  406,
      407,  396,  397,  101,  101,  398,  423,  423,  423,  403,
      399,  384,  404,  395,  395,  395,  408,  408,  408,  395,
      395,  395,  489,  401,  401,  401,  401,  401,  401,  401,
      401,  401,  401,  401,  401,  401,  401,  136,  489,  489,
      136,  401,  489,  409,  403,  489,  489,  410,  489,  409,
      403,  489,  411,  410,  489,  405,  406,  407,  411,  419,
      423,  423,  423,  489,  489,  402,  402,  402,  385,  386,
      489,  419,  419,  419,  460,  460,  460,  460,  460,  460,
      419,  419,  419,  419,  419,  419,  419,  419,  419,  419,

      419,  419,  419,  419,  387,  489,  403,  136,  419,  404,
      461,  461,  461,  461,  461,  461,  460,  460,  460,  461,
      461,  461,  475,  475,  475,  477,  477,  477,  480,  480,
      480,  489,  462,  489,  489,  462,  475,  475,  475,  489,
      489,  462,  489,  489,  476,  477,  477,  477,  480,  480,
      480,  484,  484,  484,  475,  475,  475,  489,  476,  477,
      477,  477,  485,  485,  485,  480,  480,  480,  485,  485,
      485,  484,  484,  484,  489,  489,  476,  484,  484,  484,
      485,  485,  485,  488,  488,  488,  488,  488,  488,  488,
      488,  488,   36,   36,   36,   36,   36,   36,   36,   36,

       36,   36,   36,   36,   36,   36,   36,   36,   36,   36,
       36,   36,   89,   89,   89,   89,   89,   89,   89,   89,
       89,   89,   89,   89,   89,   89,   89,   89,   89,   89,
       89,   89,   93,   93,   93,   93,   93,   93,   93,   93,
       93,   93,   93,   93,   93,   93,   93,   93,   93,   93,
       93,   93,   96,   96,   96,   96,   96,   96,   96,   96,
       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
       96,   96,   98,   98,   98,   98,   98,   98,   98,   98,
       98,   98,   98,   98,   98,   98,   98,   98,   98,   98,
       98,   98,  100,  100,  100,  100,  100,  100,  100,  100,

      100,  100,  100,  100,  100,  100,  100,  100,  100,  100,
      100,  100,  102,  102,  102,  102,  102,  102,  102,  102,
      102,  102,  102,  102,  102,  102,  102,  102,  102,  102,
      102,  102,  106,  106,  106,  106,  106,  106,  106,  106,
      106,  106,  106,  106,  106,  106,  106,  106,  106,  106,
      106,  106,  108,  108,  108,  108,  108,  108,  108,  108,
      108,  108,  108,  108,  108,  108,  108,  108,  108,  108,
      108,  108,  111,  111,  111,  111,  111,  111,  111,  111,
      111,  111,  111,  111,  111,  111,  111,  111,  111,  111,
      111,  111,  113,  113,  113,  113,  113,  113,  113,  113,

      113,  113,  113,  113,  113,  113,  113,  113,  113,  113,
      113,  113,  117,  117,  117,  117,  117,  117,  117,  117,
      117,  117,  117,  117,  117,  117,  117,  117,  117,  117,
      117,  117,  119,  119,  119,  119,  119,  119,  119,  119,
      119,  119,  119,  119,  119,  119,  119,  119,  119,  119,
      119,  119,  122,  122,  122,  122,  122,  122,  122,  122,
      122,  122,  122,  122,  122,  122,  122,  122,  122,  122,
      122,  122,  124,  124,  124,  124,  124,  124,  124,  124,
      124,  124,  124,  124,  124,  124,  124,  124,  124,  124,
      124,  124,  132,  132,  132,  132,  132,  132,  132,  132,

      132,  132,  132,  132,  132,  132,  132,  132,  132,  132,
      132,  132,  161,  178,  489,  489,  489,  178,  178,  161,
      489,  489,  489,  489,  161,  161,  166,  489,  489,  166,
      489,  489,  166,  166,  489,  489,  489,  489,  166,  166,
      170,  489,  489,  489,  489,  489,  489,  170,  489,  489,
      489,  489,  170,  170,  179,  489,  489,  489,  489,  489,
      489,  179,  489,  489,  489,  489,  179,  179,  184,  184,
      184,  184,  489,  184,  184,  184,  184,  184,  184,  184,
      184,  184,  184,  489,  489,  184,  184,  184,  186,  186,
      186,  186,  489,  186,  186,  186,  186,  186,  186,  186,

      186,  186,  186,  186,  186,  186,  186,  186,  187,  187,
      187,  187,  187,  187,  187,  187,  187,  187,  187,  187,
      187,  187,  187,  187,  489,  187,  187,  187,  190,  489,
      489,  489,  489,  489,  489,  190,  489,  489,  489,  489,
      190,  190,  192,  192,  489,  489,  192,  489,  489,  489,
      489,  489,  489,  192,  489,  192,  489,  489,  192,  192,
      194,  194,  194,  194,  194,  194,  194,  489,  194,  194,
      194,  194,  194,  194,  194,  194,  194,  194,  194,  194,
      198,  198,  198,  198,  198,  198,  198,  198,  198,  489,
      198,  198,  198,  198,  198,  198,  198,  198,  198,  198,

      202,  202,  202,  202,  489,  202,  202,  202,  202,  202,
      202,  202,  202,  202,  202,  202,  202,  202,  202,  202,
      205,  205,  205,  205,  205,  205,  205,  489,  205,  205,
      205,  205,  205,  205,  205,  205,  205,  205,  205,  205,
      209,  209,  209,  209,  209,  209,  209,  489,  209,  209,
      209,  209,  209,  209,  209,  209,  209,  209,  209,  214,
      214,  214,  214,  214,  214,  214,  214,  214,  214,  214,
      214,  214,  214,  214,  214,  214,  214,  214,  214,  217,
      217,  217,  217,  217,  217,  217,  489,  217,  217,  217,
      217,  217,  217,  217,  217,  217,  217,  217,  217,  218,

      218,  218,  218,  218,  489,  218,  218,  218,  218,  218,
      218,  218,  218,  218,  218,  218,  218,  218,  218,  222,
      222,  489,  489,  222,  489,  489,  489,  489,  489,  489,
      222,  489,  222,  489,  489,  222,  222,  237,  489,  489,
      237,  489,  489,  237,  237,  489,  489,  489,  489,  237,
      237,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  238,  238,  238,  238,  238,  238,  238,  238,  238,
      238,  245,  489,  489,  489,  489,  489,  489,  245,  489,
      489,  489,  489,  245,  245,  246,  246,  489,  246,  246,
      246,  246,  246,  246,  246,  246,  246,  246,  246,  246,

      246,  246,  246,  246,  246,  248,  489,  489,  248,  489,
      489,  248,  248,  489,  489,  489,  489,  248,  248,  252,
      489,  489,  489,  489,  252,  252,  252,  489,  489,  489,
      489,  252,  252,  262,  489,  489,  262,  489,  489,  262,
      262,  489,  489,  489,  489,  262,  262,  273,  489,  489,
      489,  489,  489,  489,  273,  489,  489,  489,  489,  273,
      273,  290,  290,  489,  489,  290,  290,  489,  290,  290,
      290,  290,  290,  489,  489,  489,  290,  290,  290,  298,
      298,  298,  298,  298,  298,  298,  298,  298,  298,  298,
      298,  298,  298,  298,  298,  298,  298,  298,  298,  302,

      302,  302,  302,  302,  302,  302,  302,  302,  302,  302,
      302,  302,  302,  302,  302,  302,  302,  302,  302,  306,
      306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
      306,  306,  306,  306,  306,  306,  306,  306,  306,  326,
      489,  489,  489,  489,  326,  326,  326,  489,  489,  489,
      489,  326,  326,  331,  331,  331,  331,  331,  331,  331,
      331,  331,  331,  331,  331,  331,  331,  331,  331,  331,
      331,  331,  331,  336,  336,  336,  336,  336,  336,  336,
      336,  336,  336,  336,  336,  336,  336,  336,  336,  336,
      336,  336,  336,  341,  341,  341,  341,  341,  341,  341,

      341,  341,  341,  341,  341,  341,  341,  341,  341,  341,
      341,  341,  341,   35,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489
    } ;

static yyconst flex_int16_t yy_chk[2365] =
    {   0,
        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,  483,   50,  479,    8,    9,    9,    9,   10,   10,
       10,   29,   30,   50,  472,   63,   29,   30,    7,    7,
       63,    7,    8,    8,  104,    8,   21,    9,   22,  104,
       10,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,   80,   80,   80,  471,   11,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
       12,   12,   12,   12,   21,  470,   22,  466,   12,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,  465,  110,   42,   42,   13,   14,   14,
       14,   14,   14,   14,   14,   14,   14,   14,   14,   14,

       14,   14,   25,   54,  459,   26,   14,   17,   54,   17,
       25,   17,   17,   26,   52,   54,   17,   17,   42,   17,
      128,   17,  110,   52,   52,  128,   42,   17,   17,   17,
       17,  458,   33,   33,   33,  138,  138,  199,   33,   34,
       34,   34,  199,   25,  127,   34,   26,  127,   17,   43,
       43,   17,   18,   43,   18,  457,   18,   18,   43,  116,
      116,   18,   18,   33,   18,   55,   18,   55,   55,   55,
       34,  456,   18,   18,   18,   18,   38,   38,   38,  233,
       55,   38,   39,   39,   39,  233,  116,   39,  455,   55,
       70,   70,   70,   18,   55,   70,   18,   31,   31,   31,

       31,   31,   31,   31,   31,   31,   31,   31,   31,   31,
       31,   94,   94,   94,  454,   31,   32,   32,   32,   32,
       32,   32,   32,   32,   32,   32,   32,   32,   32,   32,
       53,  139,  453,   94,   32,  139,   53,   53,   53,   56,
      450,   56,   56,   56,   71,   71,   71,  215,  215,   71,
      449,   75,  132,  132,   56,   74,   74,   74,  448,   74,
      447,   74,   74,   75,   75,   75,   74,   74,  446,   74,
       82,   74,   82,   82,   82,  134,  134,   74,   74,   74,
       74,   99,   99,   99,  443,   82,  442,  101,  101,  101,
      112,  112,  112,  132,  135,  135,   74,  441,   74,  130,

      130,   74,  101,   99,  440,  112,  115,  115,  115,  118,
      118,  118,  123,  123,  123,  115,  134,  439,  118,  271,
      271,  115,  178,  178,  118,  129,  129,  129,  438,  135,
      129,  437,  130,  415,  123,  135,  136,  136,  136,  415,
      130,  150,  150,  150,  154,  154,  154,  155,  178,  155,
      155,  155,  231,  156,  150,  156,  231,  154,  156,  156,
      156,  436,  155,  164,  164,  164,  165,  165,  164,  169,
      169,  169,  172,  172,  172,  174,  174,  174,  136,  175,
      435,  175,  175,  175,  176,  172,  176,  434,  174,  176,
      176,  176,  397,  397,  175,  252,  252,  188,  188,  188,

      433,  191,  191,  191,  192,  192,  192,  165,  171,  432,
      171,  431,  171,  171,  240,  240,  240,  171,  171,  188,
      171,  252,  171,  191,  403,  403,  192,  240,  171,  171,
      171,  171,  195,  195,  195,  196,  196,  196,  206,  206,
      206,  430,  226,  226,  196,  227,  227,  195,  429,  171,
      196,  428,  171,  206,  207,  207,  207,  210,  210,  210,
      221,  221,  221,  207,  211,  211,  211,  228,  228,  207,
      226,  427,  210,  211,  222,  222,  222,  229,  229,  211,
      426,  524,  221,  226,  312,  312,  227,  241,  241,  241,
      242,  242,  242,  524,  524,  249,  222,  249,  249,  249,

      250,  425,  250,  250,  250,  251,  251,  251,  228,  528,
      249,  255,  255,  255,  528,  250,  398,  424,  229,  247,
      398,  247,  312,  247,  247,  312,  255,  421,  247,  247,
      417,  247,  422,  247,  256,  256,  256,  416,  422,  247,
      247,  247,  247,  257,  257,  257,  258,  258,  258,  261,
      261,  261,  275,  275,  255,  258,  256,  263,  263,  263,
      247,  258,  414,  247,  261,  257,  263,  266,  266,  266,
      536,  536,  263,  412,  267,  267,  267,  270,  270,  270,
      288,  288,  266,  267,  411,  534,  275,  326,  326,  267,
      534,  409,  270,  275,  284,  284,  284,  285,  285,  285,

      286,  404,  286,  286,  286,  287,  288,  287,  287,  287,
      289,  289,  289,  326,  541,  286,  290,  290,  290,  541,
      287,  291,  291,  291,  399,  289,  292,  292,  292,  396,
      387,  290,  284,  293,  293,  293,  291,  385,  295,  295,
      295,  292,  292,  297,  297,  297,  298,  298,  298,  311,
      311,  311,  297,  289,  383,  293,  380,  378,  297,  290,
      295,  298,  410,  371,  291,  364,  410,  292,  363,  292,
      299,  299,  299,  300,  300,  300,  362,  301,  301,  301,
      302,  302,  302,  328,  328,  299,  301,  311,  300,  303,
      303,  303,  301,  328,  358,  302,  304,  304,  304,  305,

      305,  305,  357,  355,  303,  306,  306,  306,  305,  328,
      354,  304,  349,  347,  305,  307,  307,  307,  322,  320,
      306,  308,  308,  308,  314,  314,  314,  315,  315,  315,
      307,  321,  321,  321,  319,  323,  308,  323,  323,  323,
      324,  318,  324,  324,  324,  325,  325,  325,  331,  331,
      331,  332,  332,  332,  317,  324,  316,  331,  325,  313,
      332,  413,  283,  331,  420,  413,  332,  282,  420,  321,
      327,  327,  327,  327,  327,  327,  327,  327,  327,  327,
      327,  327,  327,  327,  327,  327,  327,  327,  327,  327,
      327,  327,  327,  327,  327,  327,  327,  327,  327,  327,

      327,  327,  327,  327,  327,  327,  327,  327,  327,  327,
      327,  327,  327,  327,  327,  327,  327,  327,  327,  327,
      329,  329,  329,  350,  350,  350,  329,  329,  281,  280,
      329,  329,  329,  329,  279,  329,  329,  329,  329,  329,
      329,  330,  330,  278,  277,  329,  276,  329,  329,  329,
      329,  329,  329,  329,  329,  329,  329,  329,  329,  329,
      329,  329,  274,  329,  273,  329,  269,  330,  333,  333,
      333,  334,  334,  334,  335,  335,  335,  333,  348,  348,
      334,  265,  260,  333,  253,  245,  334,  244,  238,  335,
      336,  336,  336,  337,  337,  337,  351,  351,  351,  336,

      366,  366,  337,  235,  234,  336,  232,  348,  337,  338,
      338,  338,  339,  339,  339,  340,  340,  340,  338,  348,
      230,  339,  225,  224,  338,  220,  366,  339,  213,  208,
      340,  341,  341,  341,  342,  342,  342,  346,  346,  346,
      341,  197,  187,  342,  186,  184,  341,  170,  162,  342,
      343,  343,  343,  344,  344,  344,  345,  345,  345,  343,
      152,  148,  344,  140,  137,  343,  121,  107,  344,  105,
       89,  345,  352,  352,  352,  346,  353,  353,  353,  356,
      356,  356,  359,  359,  359,  360,   88,  360,  360,  360,
      361,  361,  361,   87,  352,  373,  373,  373,  368,  368,

      368,   86,   85,  361,  367,  367,  367,  368,   83,   81,
      367,  367,   79,  368,  367,  367,  367,  367,   67,  367,
      367,  367,  367,  367,  367,   61,  372,  372,   60,  367,
       59,  367,  367,  367,  367,  367,  367,  367,  367,  367,
      367,  367,  367,  367,  367,  367,   49,  367,   45,  367,
      369,  369,  369,  370,  370,  370,  372,   44,   40,  369,
       35,   28,  370,   27,   24,  369,   23,  372,  370,  374,
      374,  374,  376,  376,  376,  377,  377,  377,  379,  379,
      379,  381,  381,  381,  382,  382,  382,   20,  389,  389,
      389,  374,  391,  391,  391,  392,  392,  392,  393,  393,

      393,  400,  400,  400,   19,  390,  390,  390,  405,  405,
      405,  381,  381,   16,   15,  381,  406,  406,  406,  389,
      381,  386,  389,  394,  394,  394,  408,  408,  408,  395,
      395,  395,    0,  386,  386,  386,  386,  386,  386,  386,
      386,  386,  386,  386,  386,  386,  386,  390,    0,    0,
      405,  386,    0,  394,  394,    0,    0,  394,    0,  395,
      395,    0,  394,  395,    0,  407,  407,  407,  395,  401,
      423,  423,  423,    0,    0,  402,  402,  402,  401,  401,
        0,  401,  401,  401,  444,  444,  444,  451,  451,  451,
      401,  401,  401,  401,  401,  401,  401,  401,  401,  401,

      401,  401,  401,  401,  401,    0,  402,  407,  401,  402,
      445,  445,  445,  452,  452,  452,  460,  460,  460,  461,
      461,  461,  463,  463,  463,  464,  464,  464,  467,  467,
      467,    0,  445,    0,    0,  452,  468,  468,  468,    0,
        0,  461,    0,    0,  463,  469,  469,  469,  473,  473,
      473,  474,  474,  474,  475,  475,  475,    0,  468,  477,
      477,  477,  478,  478,  478,  480,  480,  480,  481,  481,
      481,  482,  482,  482,    0,    0,  475,  484,  484,  484,
      485,  485,  485,  486,  486,  486,  487,  487,  487,  488,
      488,  488,  490,  490,  490,  490,  490,  490,  490,  490,

      490,  490,  490,  490,  490,  490,  490,  490,  490,  490,
      490,  490,  491,  491,  491,  491,  491,  491,  491,  491,
      491,  491,  491,  491,  491,  491,  491,  491,  491,  491,
      491,  491,  492,  492,  492,  492,  492,  492,  492,  492,
      492,  492,  492,  492,  492,  492,  492,  492,  492,  492,
      492,  492,  493,  493,  493,  493,  493,  493,  493,  493,
      493,  493,  493,  493,  493,  493,  493,  493,  493,  493,
      493,  493,  494,  494,  494,  494,  494,  494,  494,  494,
      494,  494,  494,  494,  494,  494,  494,  494,  494,  494,
      494,  494,  495,  495,  495,  495,  495,  495,  495,  495,

      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  496,  496,  496,  496,  496,  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,  497,  497,
      497,  497,  498,  498,  498,  498,  498,  498,  498,  498,
      498,  498,  498,  498,  498,  498,  498,  498,  498,  498,
      498,  498,  499,  499,  499,  499,  499,  499,  499,  499,
      499,  499,  499,  499,  499,  499,  499,  499,  499,  499,
      499,  499,  500,  500,  500,  500,  500,  500,  500,  500,

      500,  500,  500,  500,  500,  500,  500,  500,  500,  500,
      500,  500,  501,  501,  501,  501,  501,  501,  501,  501,
      501,  501,  501,  501,  501,  501,  501,  501,  501,  501,
      501,  501,  502,  502,  502,  502,  502,  502,  502,  502,
      502,  502,  502,  502,  502,  502,  502,  502,  502,  502,
      502,  502,  503,  503,  503,  503,  503,  503,  503,  503,
      503,  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,  505,  505,  505,

      505,  505,  505,  505,  505,  505,  505,  505,  505,  505,
      505,  505,  506,  509,    0,    0,    0,  509,  509,  506,
        0,    0,    0,    0,  506,  506,  507,    0,    0,  507,
        0,    0,  507,  507,    0,    0,    0,    0,  507,  507,
      508,    0,    0,    0,    0,    0,    0,  508,    0,    0,
        0,    0,  508,  508,  510,    0,    0,    0,    0,    0,
        0,  510,    0,    0,    0,    0,  510,  510,  511,  511,
      511,  511,    0,  511,  511,  511,  511,  511,  511,  511,
      511,  511,  511,    0,    0,  511,  511,  511,  512,  512,
      512,  512,    0,  512,  512,  512,  512,  512,  512,  512,

      512,  512,  512,  512,  512,  512,  512,  512,  513,  513,
      513,  513,  513,  513,  513,  513,  513,  513,  513,  513,
      513,  513,  513,  513,    0,  513,  513,  513,  514,    0,
        0,    0,    0,    0,    0,  514,    0,    0,    0,    0,
      514,  514,  515,  515,    0,    0,  515,    0,    0,    0,
        0,    0,    0,  515,    0,  515,    0,    0,  515,  515,
      516,  516,  516,  516,  516,  516,  516,    0,  516,  516,
      516,  516,  516,  516,  516,  516,  516,  516,  516,  516,
      517,  517,  517,  517,  517,  517,  517,  517,  517,    0,
      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,

      518,  518,  518,  518,    0,  518,  518,  518,  518,  518,
      518,  518,  518,  518,  518,  518,  518,  518,  518,  518,
      519,  519,  519,  519,  519,  519,  519,    0,  519,  519,
      519,  519,  519,  519,  519,  519,  519,  519,  519,  519,
      520,  520,  520,  520,  520,  520,  520,    0,  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,    0,  522,  522,  522,
      522,  522,  522,  522,  522,  522,  522,  522,  522,  523,

      523,  523,  523,  523,    0,  523,  523,  523,  523,  523,
      523,  523,  523,  523,  523,  523,  523,  523,  523,  525,
      525,    0,    0,  525,    0,    0,    0,    0,    0,    0,
      525,    0,  525,    0,    0,  525,  525,  526,    0,    0,
      526,    0,    0,  526,  526,    0,    0,    0,    0,  526,
      526,  527,  527,  527,  527,  527,  527,  527,  527,  527,
      527,  527,  527,  527,  527,  527,  527,  527,  527,  527,
      527,  529,    0,    0,    0,    0,    0,    0,  529,    0,
        0,    0,    0,  529,  529,  530,  530,    0,  530,  530,
      530,  530,  530,  530,  530,  530,  530,  530,  530,  530,

      530,  530,  530,  530,  530,  531,    0,    0,  531,    0,
        0,  531,  531,    0,    0,    0,    0,  531,  531,  532,
        0,    0,    0,    0,  532,  532,  532,    0,    0,    0,
        0,  532,  532,  533,    0,    0,  533,    0,    0,  533,
      533,    0,    0,    0,    0,  533,  533,  535,    0,    0,
        0,    0,    0,    0,  535,    0,    0,    0,    0,  535,
      535,  537,  537,    0,    0,  537,  537,    0,  537,  537,
      537,  537,  537,    0,    0,    0,  537,  537,  537,  538,
      538,  538,  538,  538,  538,  538,  538,  538,  538,  538,
      538,  538,  538,  538,  538,  538,  538,  538,  538,  539,

      539,  539,  539,  539,  539,  539,  539,  539,  539,  539,
      539,  539,  539,  539,  539,  539,  539,  539,  539,  540,
      540,  540,  540,  540,  540,  540,  540,  540,  540,  540,
      540,  540,  540,  540,  540,  540,  540,  540,  540,  542,
        0,    0,    0,    0,  542,  542,  542,    0,    0,    0,
        0,  542,  542,  543,  543,  543,  543,  543,  543,  543,
      543,  543,  543,  543,  543,  543,  543,  543,  543,  543,
      543,  543,  543,  544,  544,  544,  544,  544,  544,  544,
      544,  544,  544,  544,  544,  544,  544,  544,  544,  544,
      544,  544,  544,  545,  545,  545,  545,  545,  545,  545,

      545,  545,  545,  545,  545,  545,  545,  545,  545,  545,
      545,  545,  545,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489,  489,  489,  489,  489,  489,  489,
      489,  489,  489,  489
    } ;

/* Table of booleans, true if rule could match eol. */
static yyconst flex_int32_t yy_rule_can_match_eol[130] =
    {   0,
1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 
    0, 0, 1, 1, 0, 1, 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, 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, 1, 1, 1, 1, 0, 1, 1, 
    0, 1, 1, 1, 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-2006, 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.150.2.1 2007/08/29 13:58:34 meskes Exp $
 *
 *-------------------------------------------------------------------------
 */
#include "postgres_fe.h"

#include <ctype.h>
#include <sys/types.h>
#include <limits.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 */
static bool		escape_string_warning;
static bool		standard_conforming_strings;
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 ecpg_isspace(char ch);
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> standard quoted strings - thomas 1997-07-30
 *	<xe> extended quoted strings (support backslash escape sequences)
 *  <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?
 *
 * XXX if you change the set of whitespace characters, fix ecpg_isspace()
 * to agree.
 */
/*
 * 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 1371 "pgc.c"

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

#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 326 "pgc.l"



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


#line 1577 "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 >= 490 )
					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 != 489 );
		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 333 "pgc.l"
{ /* ignore */ }
	YY_BREAK
case 2:
YY_RULE_SETUP
#line 335 "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 344 "pgc.l"
{
					xcdepth++;
			 		/* Put back any characters past slash-star; see above */
			 		yyless(2);
					fputs("/*", yyout);
				}
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 351 "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 362 "pgc.l"
{ ECHO; }
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 363 "pgc.l"
{ ECHO; }
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 364 "pgc.l"
{ ECHO; }
	YY_BREAK
case YY_STATE_EOF(xc):
#line 366 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated /* comment"); }
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 368 "pgc.l"
{
					token_start = yytext;
					BEGIN(xb);
					startlit();
					addlitchar('b');
				}
	YY_BREAK
case 9:
/* rule 9 can match eol */
#line 375 "pgc.l"
case 10:
/* rule 10 can match eol */
YY_RULE_SETUP
#line 375 "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 385 "pgc.l"
case 12:
/* rule 12 can match eol */
YY_RULE_SETUP
#line 385 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 13:
/* rule 13 can match eol */
#line 387 "pgc.l"
case 14:
/* rule 14 can match eol */
YY_RULE_SETUP
#line 387 "pgc.l"
{ /* ignore */ }
	YY_BREAK
case YY_STATE_EOF(xb):
#line 388 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated bit string"); }
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 390 "pgc.l"
{
					token_start = yytext;
					BEGIN(xh);
					startlit();
					addlitchar('x');
				}
	YY_BREAK
case 16:
/* rule 16 can match eol */
#line 397 "pgc.l"
case 17:
/* rule 17 can match eol */
YY_RULE_SETUP
#line 397 "pgc.l"
{
				yyless(1);
				BEGIN(SQL);
				yylval.str = mm_strdup(literalbuf);
				return XCONST;
			}
	YY_BREAK
case YY_STATE_EOF(xh):
#line 404 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated hexadecimal integer"); }
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 405 "pgc.l"
{
				/* National character.
				 * Transfer it as-is to the backend.
				 */
				warn_on_first_escape = true;
		        token_start = yytext;
				state_before = YYSTATE;
				if (standard_conforming_strings)
					BEGIN(xq);
				else
					BEGIN(xe);
				startlit();
			}
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 418 "pgc.l"
{
				warn_on_first_escape = false;
				token_start = yytext;
				state_before = YYSTATE;
				BEGIN(xe);
				startlit();
			}
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 425 "pgc.l"
{
				warn_on_first_escape = true;
				token_start = yytext;
				state_before = YYSTATE;
				if (standard_conforming_strings)
					BEGIN(xq);
				else
					BEGIN(xe);
				startlit();
			}
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 435 "pgc.l"
{
				warn_on_first_escape = false;
				token_start = yytext;
				state_before = YYSTATE;
				BEGIN(xe);
				startlit();
			}
	YY_BREAK
case 22:
/* rule 22 can match eol */
#line 443 "pgc.l"
case 23:
/* rule 23 can match eol */
YY_RULE_SETUP
#line 443 "pgc.l"
{
				yyless(1);
				BEGIN(state_before);
				yylval.str = mm_strdup(literalbuf);
				return SCONST;
			}
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 449 "pgc.l"
{ addlitchar('\''); }
	YY_BREAK
case 25:
/* rule 25 can match eol */
YY_RULE_SETUP
#line 450 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 26:
/* rule 26 can match eol */
YY_RULE_SETUP
#line 451 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 27:
/* rule 27 can match eol */
YY_RULE_SETUP
#line 452 "pgc.l"
{ 
				check_escape_warning();
				addlit(yytext, yyleng);
			}
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 456 "pgc.l"
{ 
				check_escape_warning();
				addlit(yytext, yyleng);
			}
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 460 "pgc.l"
{ 
				check_escape_warning();
				addlit(yytext, yyleng);
			}
	YY_BREAK
case 30:
/* rule 30 can match eol */
YY_RULE_SETUP
#line 464 "pgc.l"
{ /* ignore */ }
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 465 "pgc.l"
{
			   /* This is only needed for \ just before EOF */
			   addlitchar(yytext[0]);
			}
	YY_BREAK
case YY_STATE_EOF(xq):
case YY_STATE_EOF(xe):
#line 469 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted string"); }
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 470 "pgc.l"
{
				/* throw back all but the initial "$" */
				yyless(1);
				/* and treat it as {other} */
				return yytext[0];	
			}
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 476 "pgc.l"
{
				token_start = yytext;
				dolqstart = mm_strdup(yytext);
				BEGIN(xdolq);
				startlit();
				addlit(yytext, yyleng);
			}
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 483 "pgc.l"
{
				if (strcmp(yytext, dolqstart) == 0)
				{
					addlit(yytext, yyleng);
					free(dolqstart);
					BEGIN(SQL);
					yylval.str = mm_strdup(literalbuf);
					return DOLCONST;
				}
				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 35:
/* rule 35 can match eol */
YY_RULE_SETUP
#line 503 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 504 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 505 "pgc.l"
{
				/* single quote or dollar sign */
				addlitchar(yytext[0]);
			}
	YY_BREAK
case YY_STATE_EOF(xdolq):
#line 509 "pgc.l"
{ yyerror("unterminated dollar-quoted string"); }
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 510 "pgc.l"
{
						state_before = YYSTATE;
						BEGIN(xd);
						startlit();
					}
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 515 "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 40:
YY_RULE_SETUP
#line 523 "pgc.l"
{
						BEGIN(state_before);
						yylval.str = mm_strdup(literalbuf);
						return CSTRING;
					}
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 528 "pgc.l"
{ addlitchar('"'); }
	YY_BREAK
case 42:
/* rule 42 can match eol */
YY_RULE_SETUP
#line 529 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case YY_STATE_EOF(xd):
case YY_STATE_EOF(xdc):
#line 530 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted identifier"); }
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 531 "pgc.l"
{
						state_before = YYSTATE;
						BEGIN(xdc);
						startlit();
					}
	YY_BREAK
case 44:
/* rule 44 can match eol */
YY_RULE_SETUP
#line 536 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 537 "pgc.l"
{ return TYPECAST; }
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 538 "pgc.l"
{
			  /* are we simulating Informix? */
				if (INFORMIX_MODE)
				{
					unput(':');
				}
				else
					return yytext[0];
				}
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 547 "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 48:
YY_RULE_SETUP
#line 556 "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 49:
YY_RULE_SETUP
#line 624 "pgc.l"
{
						yylval.ival = atol(yytext+1);
						return PARAM;
					}
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 628 "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 51:
YY_RULE_SETUP
#line 648 "pgc.l"
{
						yylval.str = mm_strdup(yytext);
						return IP;
				}
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 652 "pgc.l"
{
						yylval.str = mm_strdup(yytext);
						return FCONST;
			}
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 656 "pgc.l"
{
						yylval.str = mm_strdup(yytext);
						return FCONST;
			}
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 660 "pgc.l"
{
						yyless(yyleng-1);
						yylval.str = mm_strdup(yytext);
						return FCONST;
					}
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 665 "pgc.l"
{
						yyless(yyleng-2);
						yylval.str = mm_strdup(yytext);
						return FCONST;
					}
	YY_BREAK
case 56:
/* rule 56 can match eol */
YY_RULE_SETUP
#line 670 "pgc.l"
{
						yylval.str = mm_strdup(yytext+1);
						return(CVARIABLE);
					}
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 674 "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 58:
YY_RULE_SETUP
#line 706 "pgc.l"
{ return yytext[0]; }
	YY_BREAK
case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
#line 707 "pgc.l"
{ BEGIN(SQL); return SQL_START; }
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 708 "pgc.l"
{ 
						/* are we simulating Informix? */
						if (INFORMIX_MODE)
						{
							BEGIN(SQL);
							return SQL_START;
						}
						else
							return S_ANYTHING;
					 }
	YY_BREAK
case 61:
/* rule 61 can match eol */
YY_RULE_SETUP
#line 718 "pgc.l"
{ ECHO; }
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 719 "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 63:
/* rule 63 can match eol */
YY_RULE_SETUP
#line 732 "pgc.l"
{
						if (system_includes)
						{
							BEGIN(incl);
						}
						else
					 	{
							yylval.str = mm_strdup(yytext);
							return(CPP_LINE);
					  	}
					}
	YY_BREAK
case 64:
/* rule 64 can match eol */
YY_RULE_SETUP
#line 743 "pgc.l"
{
						yylval.str = mm_strdup(yytext);
						return(CPP_LINE);
					}
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 747 "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 66:
YY_RULE_SETUP
#line 764 "pgc.l"
{ return(':'); }
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 765 "pgc.l"
{ return(';'); }
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 766 "pgc.l"
{ return(','); }
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 767 "pgc.l"
{ return('*'); }
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 768 "pgc.l"
{ return('%'); }
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 769 "pgc.l"
{ return('/'); }
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 770 "pgc.l"
{ return('+'); }
	YY_BREAK
case 73:
YY_RULE_SETUP
#line 771 "pgc.l"
{ return('-'); }
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 772 "pgc.l"
{ return('('); }
	YY_BREAK
case 75:
YY_RULE_SETUP
#line 773 "pgc.l"
{ return(')'); }
	YY_BREAK
case 76:
/* rule 76 can match eol */
YY_RULE_SETUP
#line 774 "pgc.l"
{ ECHO; }
	YY_BREAK
case 77:
YY_RULE_SETUP
#line 775 "pgc.l"
{ return('{'); }
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 776 "pgc.l"
{ return('}'); }
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 777 "pgc.l"
{ return('['); }
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 778 "pgc.l"
{ return(']'); }
	YY_BREAK
case 81:
YY_RULE_SETUP
#line 779 "pgc.l"
{ return('='); }
	YY_BREAK
case 82:
YY_RULE_SETUP
#line 780 "pgc.l"
{ return(S_MEMBER); }
	YY_BREAK
case 83:
YY_RULE_SETUP
#line 781 "pgc.l"
{ return(S_RSHIFT); }
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 782 "pgc.l"
{ return(S_LSHIFT); }
	YY_BREAK
case 85:
YY_RULE_SETUP
#line 783 "pgc.l"
{ return(S_OR); }
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 784 "pgc.l"
{ return(S_AND); }
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 785 "pgc.l"
{ return(S_INC); }
	YY_BREAK
case 88:
YY_RULE_SETUP
#line 786 "pgc.l"
{ return(S_DEC); }
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 787 "pgc.l"
{ return(S_EQUAL); }
	YY_BREAK
case 90:
YY_RULE_SETUP
#line 788 "pgc.l"
{ return(S_NEQUAL); }
	YY_BREAK
case 91:
YY_RULE_SETUP
#line 789 "pgc.l"
{ return(S_ADD); }
	YY_BREAK
case 92:
YY_RULE_SETUP
#line 790 "pgc.l"
{ return(S_SUB); }
	YY_BREAK
case 93:
YY_RULE_SETUP
#line 791 "pgc.l"
{ return(S_MUL); }
	YY_BREAK
case 94:
YY_RULE_SETUP
#line 792 "pgc.l"
{ return(S_DIV); }
	YY_BREAK
case 95:
YY_RULE_SETUP
#line 793 "pgc.l"
{ return(S_MOD); }
	YY_BREAK
case 96:
YY_RULE_SETUP
#line 794 "pgc.l"
{ return(S_MEMPOINT); }
	YY_BREAK
case 97:
YY_RULE_SETUP
#line 795 "pgc.l"
{ return(S_DOTPOINT); }
	YY_BREAK
case 98:
YY_RULE_SETUP
#line 796 "pgc.l"
{ return S_ANYTHING; }
	YY_BREAK
case 99:
/* rule 99 can match eol */
YY_RULE_SETUP
#line 797 "pgc.l"
{ BEGIN(def_ident); }
	YY_BREAK
case 100:
/* rule 100 can match eol */
YY_RULE_SETUP
#line 798 "pgc.l"
{
						/* are we simulating Informix? */
						if (INFORMIX_MODE)
						{
							BEGIN(def_ident);
						}
						else
						{
							yyless(1);
							return (S_ANYTHING);
						}
					}
	YY_BREAK
case 101:
/* rule 101 can match eol */
YY_RULE_SETUP
#line 810 "pgc.l"
{ BEGIN(undef); }
	YY_BREAK
case 102:
/* rule 102 can match eol */
YY_RULE_SETUP
#line 811 "pgc.l"
{
						/* are we simulating Informix? */
						if (INFORMIX_MODE)
						{
							BEGIN(undef);
						}
						else
						{
							yyless(1);
							return (S_ANYTHING);
						}
					}
	YY_BREAK
case 103:
/* rule 103 can match eol */
YY_RULE_SETUP
#line 823 "pgc.l"
{
					struct _defines *ptr, *ptr2 = NULL;
					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 && ecpg_isspace(yytext[i]);
						 i-- )
						;
					yytext[i+1] = '\0';


					for (ptr = defines; ptr != NULL; ptr2 = ptr, ptr = ptr->next)
					{
						if (strcmp(yytext, ptr->old) == 0)
						{
							if (ptr2 == NULL)
								defines = ptr->next;
							else
								ptr2->next = ptr->next;
							free(ptr->new);
							free(ptr->old);
							free(ptr);
							break;
						}
					}

					BEGIN(C);
				}
	YY_BREAK
case 104:
/* rule 104 can match eol */
YY_RULE_SETUP
#line 855 "pgc.l"
{
		                	mmerror(PARSE_ERROR, ET_FATAL, "Missing identifier in 'EXEC SQL UNDEF' command");
			                yyterminate();
				}
	YY_BREAK
case 105:
/* rule 105 can match eol */
YY_RULE_SETUP
#line 859 "pgc.l"
{ BEGIN(incl); }
	YY_BREAK
case 106:
/* rule 106 can match eol */
YY_RULE_SETUP
#line 860 "pgc.l"
{ 
					  /* are we simulating Informix? */
					  if (INFORMIX_MODE)
					  {
						  BEGIN(incl);
					  }
					  else
					  {
						  yyless(1);
						  return (S_ANYTHING);
					  }
					}
	YY_BREAK
case 107:
/* rule 107 can match eol */
YY_RULE_SETUP
#line 872 "pgc.l"
{ ifcond = TRUE; BEGIN(xcond); }
	YY_BREAK
case 108:
/* rule 108 can match eol */
YY_RULE_SETUP
#line 873 "pgc.l"
{ 
					  /* are we simulating Informix? */
					  if (INFORMIX_MODE)
					  {
						  ifcond = TRUE;
						  BEGIN(xcond);
					  }
					  else
					  {
						  yyless(1);
						  return (S_ANYTHING);
					  }
					}
	YY_BREAK
case 109:
/* rule 109 can match eol */
YY_RULE_SETUP
#line 886 "pgc.l"
{ ifcond = FALSE; BEGIN(xcond); }
	YY_BREAK
case 110:
/* rule 110 can match eol */
YY_RULE_SETUP
#line 887 "pgc.l"
{ 
					  /* are we simulating Informix? */
					  if (INFORMIX_MODE)
					  {
						  ifcond = FALSE;
						  BEGIN(xcond);
					  }
					  else
					  {
						  yyless(1);
						  return (S_ANYTHING);
					  }
					}
	YY_BREAK
case 111:
/* rule 111 can match eol */
YY_RULE_SETUP
#line 900 "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 112:
/* rule 112 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, "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 113:
/* rule 113 can match eol */
YY_RULE_SETUP
#line 932 "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 114:
/* rule 114 can match eol */
YY_RULE_SETUP
#line 948 "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 115:
/* rule 115 can match eol */
YY_RULE_SETUP
#line 973 "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 116:
/* rule 116 can match eol */
YY_RULE_SETUP
#line 984 "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 117:
YY_RULE_SETUP
#line 1005 "pgc.l"
{ /* ignore */ }
	YY_BREAK
case 118:
/* rule 118 can match eol */
YY_RULE_SETUP
#line 1007 "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 && ecpg_isspace(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 119:
/* rule 119 can match eol */
YY_RULE_SETUP
#line 1041 "pgc.l"
{
				mmerror(PARSE_ERROR, ET_FATAL, "Missing identifier in 'EXEC SQL IFDEF' command");
				yyterminate();
			}
	YY_BREAK
case 120:
YY_RULE_SETUP
#line 1045 "pgc.l"
{
				old = mm_strdup(yytext);
				BEGIN(def);
				startlit();
			}
	YY_BREAK
case 121:
/* rule 121 can match eol */
YY_RULE_SETUP
#line 1050 "pgc.l"
{
				mmerror(PARSE_ERROR, ET_FATAL, "Missing identifier in 'EXEC SQL DEFINE' command");
				yyterminate();
			}	
	YY_BREAK
case 122:
/* rule 122 can match eol */
YY_RULE_SETUP
#line 1054 "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(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 123:
/* rule 123 can match eol */
YY_RULE_SETUP
#line 1079 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 124:
/* rule 124 can match eol */
YY_RULE_SETUP
#line 1080 "pgc.l"
{	parse_include(); }
	YY_BREAK
case 125:
/* rule 125 can match eol */
YY_RULE_SETUP
#line 1081 "pgc.l"
{	parse_include(); }
	YY_BREAK
case 126:
/* rule 126 can match eol */
YY_RULE_SETUP
#line 1082 "pgc.l"
{ parse_include(); }
	YY_BREAK
case 127:
/* rule 127 can match eol */
YY_RULE_SETUP
#line 1083 "pgc.l"
{
					mmerror(PARSE_ERROR, ET_FATAL, "Incorrect 'EXEC SQL INCLUDE' command");
					yyterminate();
				}
	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(undef):
case YY_STATE_EOF(xcond):
case YY_STATE_EOF(xskip):
#line 1088 "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 128:
/* rule 128 can match eol */
YY_RULE_SETUP
#line 1133 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Internal error: unreachable state, please inform pgsql-bugs@postgresql.org"); }
	YY_BREAK
case 129:
YY_RULE_SETUP
#line 1134 "pgc.l"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 3040 "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 >= 490 )
				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 >= 490 )
			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 == 489);

	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 1134 "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 && ecpg_isspace(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 */
}

/*
 * ecpg_isspace() --- return TRUE if flex scanner considers char whitespace
 */
static bool
ecpg_isspace(char ch)
{
	if (ch == ' ' ||
		ch == '\t' ||
		ch == '\n' ||
		ch == '\r' ||
		ch == '\f')
		return true;
	return false;
}

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

