#line 2 "pgc.c"
/* A lexical scanner generated by flex*/

/* Scanner skeleton version:
 * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
 */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5

#include <stdio.h>
#include <unistd.h>


/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
#ifdef c_plusplus
#ifndef __cplusplus
#define __cplusplus
#endif
#endif


#ifdef __cplusplus

#include <stdlib.h>

/* Use prototypes in function declarations. */
#define YY_USE_PROTOS

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

#else	/* ! __cplusplus */

#if __STDC__

#define YY_USE_PROTOS
#define YY_USE_CONST

#endif	/* __STDC__ */
#endif	/* ! __cplusplus */

#ifdef __TURBOC__
 #pragma warn -rch
 #pragma warn -use
#include <io.h>
#include <stdlib.h>
#define YY_USE_CONST
#define YY_USE_PROTOS
#endif

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


#ifdef YY_USE_PROTOS
#define YY_PROTO(proto) proto
#else
#define YY_PROTO(proto) ()
#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. */
#define YY_BUF_SIZE 16384

typedef struct yy_buffer_state *YY_BUFFER_STATE;

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

/* The funky do-while in the following #define is used to turn the definition
 * int a single C statement (which needs a semi-colon terminator).  This
 * avoids problems with code like:
 *
 * 	if ( condition_holds )
 *		yyless( 5 );
 *	else
 *		do_something_else();
 *
 * Prior to using the do-while the compiler would get upset at the
 * "else" because it interpreted the "if" statement as being all
 * done when it reached the ';' after the yyless() call.
 */

/* Return all but the first 'n' matched characters back to the input stream. */

#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
		*yy_cp = yy_hold_char; \
		YY_RESTORE_YY_MORE_OFFSET \
		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )

#define unput(c) yyunput( c, yytext_ptr )

/* Some routines like yy_flex_realloc() are emitted as static but are
   not called by all lexers. This generates warnings in some compilers,
   notably GCC. Arrange to suppress these. */
#ifdef __GNUC__
#define YY_MAY_BE_UNUSED __attribute__((unused))
#else
#define YY_MAY_BE_UNUSED
#endif

/* The following is because we cannot portably get our hands on size_t
 * (without autoconf's help, which isn't available because we want
 * flex-generated scanners to compile on their own).
 */
typedef unsigned int yy_size_t;


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;

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

static YY_BUFFER_STATE yy_current_buffer = 0;

/* 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".
 */
#define YY_CURRENT_BUFFER yy_current_buffer


/* 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 = 1;		/* 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 YY_PROTO(( FILE *input_file ));

void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
void yy_load_buffer_state YY_PROTO(( void ));
YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )

YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));

static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) YY_MAY_BE_UNUSED;
static void yy_flex_free YY_PROTO(( void * ));

#define yy_new_buffer yy_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! yy_current_buffer ) \
		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
	yy_current_buffer->yy_is_interactive = is_interactive; \
	}

#define yy_set_bol(at_bol) \
	{ \
	if ( ! yy_current_buffer ) \
		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
	yy_current_buffer->yy_at_bol = at_bol; \
	}

#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)


#define YY_USES_REJECT

#define yywrap() 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 YY_PROTO(( void ));
static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
static int yy_get_next_buffer YY_PROTO(( void ));
static void yy_fatal_error YY_PROTO(( 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 = (int) (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
static yyconst short int yy_acclist[510] =
    {   0,
       12,   12,   11,   11,  130,  128,  129,   98,  129,   76,
       98,  129,   76,  129,   98,  129,   43,   98,  129,   98,
      129,   60,   98,  129,   70,   98,  129,   98,  129,   19,
       98,  129,   74,   98,  129,   75,   98,  129,   69,   98,
      129,   72,   98,  129,   68,   98,  129,   73,   98,  129,
       98,  129,   71,   98,  129,   50,   98,  129,   50,   98,
      129,   66,   98,  129,   67,   98,  129,   98,  129,   81,
       98,  129,   98,  129,   65,   98,  129,   65,   98,  129,
       79,   98,  129,   80,   98,  129,   77,   98,  129,   98,
      129,   78,   98,  129,   58,  129,    1,   58,  129,    1,

      129,   48,   58,  129,   38,   43,   58,  129,   48,   58,
      129,   46,   58,  129,   47,   48,   58,  129,   20,   58,
      129,   47,   58,  129,   47,   48,   58,  129,   47,   58,
      129,   47,   48,   58,  129,   50,   58,  129,   47,   58,
      129,   57,   58,  129,   57,   58,  129,   57,   58,  129,
       57,   58,  129,   57,   58,  129,  127,  129,  127,  129,
      127,  129,  127,  129,  123,  129,  123,  129,  122,  129,
      121,  129,  120,  121,  129,  104,  129,  104,  129,   12,
      129,    9,  129,    5,  129,    5,    6,  129,    6,    7,
      129,    6,  129,   42,  129,   39,  129,   44,  129,   40,

      129,   44,  129,   11,  129,   16,  129,   26,   31,  129,
       26,  129,   22,   31,  129,   31,  129,   25,  129,   22,
      129,   35,   37,  129,   35,  129,   37,  129,  119,  129,
      119,  129,  117,  129,   76,  117,  129,   76,  129,  117,
      129,  117,  129,   90,   64,   64,   95,   86,   93,   87,
       91,   88,   92,   82,   97,   52,    2,   94,   52,   50,
       62,   84,   89,   83,   65,   65,   85,    1,   48,   48,
       33,   49,   32,    1,   48,   52,    2,   48,   52,   50,
       54,   45,   56,   57,    8,   21,   18,   15,  126,  122,
      120,  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,  118,
       64,   64,   96,    2,   61,   52,   53,   62,   65,   32,
        1,    1,   48,    2,   48,   52,   50,   55,   56,  125,
      124,    9,   14,   10,    9,    3,   16,   13,   17,   16,
       22,   30,   23,   22,   28,   29,   36,   65,   52,   50,
       56,   56,  125,  125,  124,  124,    9,    9,    9,    9,
       10,   16,   16,   16,   16,   17,   22,   22,   22,   22,
       23,   28,   29,  112,  114,   65,   52,   52,   56,    9,
        9,    9,   14,    9,   10,    9,   10,   16,   16,   13,

       16,   16,   17,   16,   17,   22,   22,   22,   30,   22,
       23,   22,   23,  112,  114,  108,  102,   65,   52,   56,
       56,    9,   10,   16,   17,   22,   23,  100,  116,  108,
      110,  102,   59,   65,   51,   56,   63,  100,  110,  106,
       59,   59,   65,   65,   65,   65,   51,   56,   63,   63,
       64,   63,   64,  106,   65,   65,   65,   65,   65,   65,
       51,   56,   63,   65,   65,   65,   65,   65,   65,   65,
       65,   65,   65,  111,   65,   65,   65,   65,   65,   65,
      111,   65,  111,  113,   65,   65,  107,   65,   65,   65,
      101,  107,  101,   65,   99,  115,  107,   65,  109,   65,

      101,  109,   99,   99,  109,   65,  105,  105,  105
    } ;

static yyconst short int yy_accept[491] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    2,    3,    3,    3,    3,
        3,    3,    3,    4,    5,    5,    5,    5,    5,    5,
        5,    5,    5,    5,    5,    6,    8,   10,   13,   15,
       17,   20,   22,   25,   28,   30,   33,   36,   39,   42,
       45,   48,   51,   53,   56,   59,   62,   65,   68,   70,
       73,   75,   78,   81,   84,   87,   90,   92,   95,   97,
      100,  102,  105,  109,  112,  115,  119,  122,  125,  129,
      132,  136,  139,  142,  145,  148,  151,  154,  157,  159,
      161,  163,  165,  167,  169,  171,  173,  176,  178,  180,

      182,  184,  186,  189,  192,  194,  196,  198,  200,  202,
      204,  206,  208,  211,  213,  216,  218,  220,  222,  225,
      227,  229,  231,  233,  235,  238,  240,  242,  244,  244,
      244,  245,  245,  246,  247,  247,  247,  247,  247,  247,
      247,  248,  249,  250,  251,  252,  253,  254,  255,  256,
      257,  258,  258,  259,  260,  261,  261,  262,  263,  264,
      265,  266,  267,  268,  269,  269,  270,  271,  272,  273,
      274,  276,  277,  279,  280,  281,  282,  283,  284,  285,
      286,  287,  288,  289,  289,  290,  290,  290,  290,  291,
      292,  292,  292,  293,  294,  295,  296,  297,  298,  299,

      300,  301,  302,  303,  304,  305,  306,  307,  308,  309,
      310,  311,  312,  313,  314,  315,  316,  317,  318,  319,
      320,  320,  320,  321,  321,  321,  321,  321,  322,  323,
      323,  323,  323,  323,  323,  323,  324,  325,  325,  326,
      327,  327,  328,  329,  330,  331,  332,  334,  336,  337,
      338,  339,  340,  340,  340,  340,  341,  342,  343,  344,
      345,  346,  347,  348,  349,  350,  351,  352,  353,  354,
      355,  356,  357,  358,  358,  358,  358,  358,  358,  358,
      358,  358,  358,  358,  359,  359,  360,  361,  362,  362,
      362,  362,  363,  364,  365,  366,  367,  368,  369,  370,

      372,  373,  374,  375,  377,  378,  379,  380,  382,  383,
      384,  384,  384,  384,  385,  386,  386,  386,  386,  386,
      386,  386,  387,  387,  388,  389,  390,  390,  390,  390,
      390,  391,  392,  394,  396,  398,  399,  400,  402,  404,
      406,  407,  408,  410,  412,  414,  414,  414,  414,  414,
      415,  416,  416,  417,  417,  417,  418,  418,  419,  419,
      419,  420,  420,  420,  420,  420,  421,  422,  424,  426,
      428,  428,  428,  429,  429,  430,  431,  432,  432,  433,
      433,  435,  436,  436,  436,  436,  436,  436,  437,  437,
      438,  439,  440,  441,  442,  443,  444,  445,  446,  447,

      448,  449,  449,  449,  449,  450,  452,  454,  455,  455,
      455,  455,  456,  457,  458,  459,  460,  461,  462,  463,
      463,  463,  463,  464,  464,  464,  464,  465,  466,  467,
      468,  469,  470,  471,  472,  472,  472,  472,  472,  472,
      472,  472,  472,  473,  475,  476,  477,  478,  479,  480,
      481,  482,  482,  482,  482,  482,  482,  482,  482,  483,
      484,  484,  485,  486,  488,  489,  490,  492,  492,  493,
      493,  493,  493,  494,  496,  496,  497,  498,  500,  501,
      502,  503,  504,  504,  505,  506,  508,  509,  510,  510
    } ;

static yyconst int 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 int 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 short int 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 short int 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 short int 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 short int 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
    } ;

static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
static char *yy_full_match;
static int yy_lp;
#define REJECT \
{ \
*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
yy_cp = yy_full_match; /* restore poss. backed-over text */ \
++yy_lp; \
goto find_rule; \
}
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "pgc.l"
#define INITIAL 0
#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 2006/09/22 21:39:58 tgl 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);

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

#define YY_NEVER_INTERACTIVE 1
#define C 1
#define SQL 2
#define incl 3
#define def 4
#define def_ident 5
#define undef 6
 
/*
 * 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
 */
#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

/* 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 1352 "pgc.c"

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

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

#ifndef YY_NO_UNPUT
static void yyunput YY_PROTO(( int c, char *buf_ptr ));
#endif

#ifndef yytext_ptr
static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
#endif

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen YY_PROTO(( yyconst char * ));
#endif

#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput YY_PROTO(( void ));
#else
static int input YY_PROTO(( void ));
#endif
#endif

#if YY_STACK_USED
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
#ifndef YY_NO_PUSH_STATE
static void yy_push_state YY_PROTO(( int new_state ));
#endif
#ifndef YY_NO_POP_STATE
static void yy_pop_state YY_PROTO(( void ));
#endif
#ifndef YY_NO_TOP_STATE
static int yy_top_state YY_PROTO(( void ));
#endif

#else
#define YY_NO_PUSH_STATE 1
#define YY_NO_POP_STATE 1
#define YY_NO_TOP_STATE 1
#endif

#ifdef YY_MALLOC_DECL
YY_MALLOC_DECL
#else
#if __STDC__
#ifndef __cplusplus
#include <stdlib.h>
#endif
#else
/* Just try to get by without declaring the routines.  This will fail
 * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
 * or sizeof(void*) != sizeof(int).
 */
#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 (void) 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->yy_is_interactive ) \
		{ \
		int c = '*', 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 if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
		  && ferror( yyin ) ) \
		YY_FATAL_ERROR( "input in flex scanner failed" );
#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

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
#define YY_DECL int yylex YY_PROTO(( void ))
#endif

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

YY_DECL
	{
	register yy_state_type yy_current_state;
	register char *yy_cp = NULL, *yy_bp = NULL;
	register int yy_act;

#line 324 "pgc.l"



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


#line 1511 "pgc.c"

	if ( yy_init )
		{
		yy_init = 0;

#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 )
			yy_current_buffer =
				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_state_ptr = yy_state_buf;
		*yy_state_ptr++ = yy_current_state;
yy_match:
		do
			{
			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 490 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
			*yy_state_ptr++ = yy_current_state;
			++yy_cp;
			}
		while ( yy_base[yy_current_state] != 2314 );

yy_find_action:
		yy_current_state = *--yy_state_ptr;
		yy_lp = yy_accept[yy_current_state];
find_rule: /* we branch to this label when backing up */
		for ( ; ; ) /* until we find what rule we matched */
			{
			if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
				{
				yy_act = yy_acclist[yy_lp];
					{
					yy_full_match = yy_cp;
					break;
					}
				}
			--yy_cp;
			yy_current_state = *--yy_state_ptr;
			yy_lp = yy_accept[yy_current_state];
			}

		YY_DO_BEFORE_ACTION;

		if ( yy_act != YY_END_OF_BUFFER )
			{
			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 1:
YY_RULE_SETUP
#line 331 "pgc.l"
{ /* ignore */ }
	YY_BREAK
case 2:
YY_RULE_SETUP
#line 333 "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 342 "pgc.l"
{
					xcdepth++;
			 		/* Put back any characters past slash-star; see above */
			 		yyless(2);
					fputs("/*", yyout);
				}
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 349 "pgc.l"
{
					ECHO;
					if (xcdepth <= 0)
					{
						BEGIN(state_before);
						token_start = NULL;
					}
					else
						xcdepth--;
				}
	YY_BREAK
case 5:
YY_RULE_SETUP
#line 360 "pgc.l"
{ ECHO; }
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 361 "pgc.l"
{ ECHO; }
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 362 "pgc.l"
{ ECHO; }
	YY_BREAK
case YY_STATE_EOF(xc):
#line 364 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated /* comment"); }
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 366 "pgc.l"
{
					token_start = yytext;
					BEGIN(xb);
					startlit();
					addlitchar('b');
				}
	YY_BREAK
case 9:
#line 373 "pgc.l"
case 10:
YY_RULE_SETUP
#line 373 "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:
#line 383 "pgc.l"
case 12:
YY_RULE_SETUP
#line 383 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 13:
#line 385 "pgc.l"
case 14:
YY_RULE_SETUP
#line 385 "pgc.l"
{ /* ignore */ }
	YY_BREAK
case YY_STATE_EOF(xb):
#line 386 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated bit string"); }
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 388 "pgc.l"
{
					token_start = yytext;
					BEGIN(xh);
					startlit();
					addlitchar('x');
				}
	YY_BREAK
case 16:
#line 395 "pgc.l"
case 17:
YY_RULE_SETUP
#line 395 "pgc.l"
{
				yyless(1);
				BEGIN(SQL);
				yylval.str = mm_strdup(literalbuf);
				return XCONST;
			}
	YY_BREAK
case YY_STATE_EOF(xh):
#line 402 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated hexadecimal integer"); }
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 403 "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 416 "pgc.l"
{
				warn_on_first_escape = false;
				token_start = yytext;
				state_before = YYSTATE;
				BEGIN(xe);
				startlit();
			}
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 423 "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 433 "pgc.l"
{
				warn_on_first_escape = false;
				token_start = yytext;
				state_before = YYSTATE;
				BEGIN(xe);
				startlit();
			}
	YY_BREAK
case 22:
#line 441 "pgc.l"
case 23:
YY_RULE_SETUP
#line 441 "pgc.l"
{
				yyless(1);
				BEGIN(state_before);
				yylval.str = mm_strdup(literalbuf);
				return SCONST;
			}
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 447 "pgc.l"
{ addlitchar('\''); }
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 448 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 449 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 450 "pgc.l"
{ 
				check_escape_warning();
				addlit(yytext, yyleng);
			}
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 454 "pgc.l"
{ 
				check_escape_warning();
				addlit(yytext, yyleng);
			}
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 458 "pgc.l"
{ 
				check_escape_warning();
				addlit(yytext, yyleng);
			}
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 462 "pgc.l"
{ /* ignore */ }
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 463 "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 467 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted string"); }
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 468 "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 474 "pgc.l"
{
				token_start = yytext;
				dolqstart = mm_strdup(yytext);
				BEGIN(xdolq);
				startlit();
				addlit(yytext, yyleng);
			}
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 481 "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:
YY_RULE_SETUP
#line 501 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 502 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 503 "pgc.l"
{
				/* single quote or dollar sign */
				addlitchar(yytext[0]);
			}
	YY_BREAK
case YY_STATE_EOF(xdolq):
#line 507 "pgc.l"
{ yyerror("unterminated dollar-quoted string"); }
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 508 "pgc.l"
{
						state_before = YYSTATE;
						BEGIN(xd);
						startlit();
					}
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 513 "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 521 "pgc.l"
{
						BEGIN(state_before);
						yylval.str = mm_strdup(literalbuf);
						return CSTRING;
					}
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 526 "pgc.l"
{ addlitchar('"'); }
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 527 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case YY_STATE_EOF(xd):
case YY_STATE_EOF(xdc):
#line 528 "pgc.l"
{ mmerror(PARSE_ERROR, ET_FATAL, "Unterminated quoted identifier"); }
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 529 "pgc.l"
{
						state_before = YYSTATE;
						BEGIN(xdc);
						startlit();
					}
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 534 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 535 "pgc.l"
{ return TYPECAST; }
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 536 "pgc.l"
{
			  /* are we simulating Informix? */
				if (INFORMIX_MODE)
				{
					unput(':');
				}
				else
					return yytext[0];
				}
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 545 "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 554 "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 622 "pgc.l"
{
						yylval.ival = atol(yytext+1);
						return PARAM;
					}
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 626 "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 646 "pgc.l"
{
						yylval.str = mm_strdup(yytext);
						return IP;
				}
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 650 "pgc.l"
{
						yylval.str = mm_strdup(yytext);
						return FCONST;
			}
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 654 "pgc.l"
{
						yylval.str = mm_strdup(yytext);
						return FCONST;
			}
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 658 "pgc.l"
{
						yyless(yyleng-1);
						yylval.str = mm_strdup(yytext);
						return FCONST;
					}
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 663 "pgc.l"
{
						yyless(yyleng-2);
						yylval.str = mm_strdup(yytext);
						return FCONST;
					}
	YY_BREAK
case 56:
YY_RULE_SETUP
#line 668 "pgc.l"
{
						yylval.str = mm_strdup(yytext+1);
						return(CVARIABLE);
					}
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 672 "pgc.l"
{
						ScanKeyword    *keyword;
						struct _defines *ptr;
						
						/* How about 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);
								break;
							}
						}
						if (ptr == NULL)
						{
							/* 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 725 "pgc.l"
{ return yytext[0]; }
	YY_BREAK
case 59:
YY_RULE_SETUP
#line 726 "pgc.l"
{ BEGIN(SQL); return SQL_START; }
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 727 "pgc.l"
{ 
						/* are we simulating Informix? */
						if (INFORMIX_MODE)
						{
							BEGIN(SQL);
							return SQL_START;
						}
						else
							return S_ANYTHING;
					 }
	YY_BREAK
case 61:
YY_RULE_SETUP
#line 737 "pgc.l"
{ ECHO; }
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 738 "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:
YY_RULE_SETUP
#line 751 "pgc.l"
{
						if (system_includes)
						{
							BEGIN(incl);
						}
						else
					 	{
							yylval.str = mm_strdup(yytext);
							return(CPP_LINE);
					  	}
					}
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 762 "pgc.l"
{
						yylval.str = mm_strdup(yytext);
						return(CPP_LINE);
					}
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 766 "pgc.l"
{
						ScanKeyword		*keyword;
						struct _defines *ptr;

						if (INFORMIX_MODE)
						{
							/* Informix uses SQL defines only in SQL space */
							ptr = NULL;
						}
						else
						{
							/* 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);
									break;
								}
							}
						}

						if (ptr == NULL)
						{
							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 811 "pgc.l"
{ return(':'); }
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 812 "pgc.l"
{ return(';'); }
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 813 "pgc.l"
{ return(','); }
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 814 "pgc.l"
{ return('*'); }
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 815 "pgc.l"
{ return('%'); }
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 816 "pgc.l"
{ return('/'); }
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 817 "pgc.l"
{ return('+'); }
	YY_BREAK
case 73:
YY_RULE_SETUP
#line 818 "pgc.l"
{ return('-'); }
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 819 "pgc.l"
{ return('('); }
	YY_BREAK
case 75:
YY_RULE_SETUP
#line 820 "pgc.l"
{ return(')'); }
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 821 "pgc.l"
{ ECHO; }
	YY_BREAK
case 77:
YY_RULE_SETUP
#line 822 "pgc.l"
{ return('{'); }
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 823 "pgc.l"
{ return('}'); }
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 824 "pgc.l"
{ return('['); }
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 825 "pgc.l"
{ return(']'); }
	YY_BREAK
case 81:
YY_RULE_SETUP
#line 826 "pgc.l"
{ return('='); }
	YY_BREAK
case 82:
YY_RULE_SETUP
#line 827 "pgc.l"
{ return(S_MEMBER); }
	YY_BREAK
case 83:
YY_RULE_SETUP
#line 828 "pgc.l"
{ return(S_RSHIFT); }
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 829 "pgc.l"
{ return(S_LSHIFT); }
	YY_BREAK
case 85:
YY_RULE_SETUP
#line 830 "pgc.l"
{ return(S_OR); }
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 831 "pgc.l"
{ return(S_AND); }
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 832 "pgc.l"
{ return(S_INC); }
	YY_BREAK
case 88:
YY_RULE_SETUP
#line 833 "pgc.l"
{ return(S_DEC); }
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 834 "pgc.l"
{ return(S_EQUAL); }
	YY_BREAK
case 90:
YY_RULE_SETUP
#line 835 "pgc.l"
{ return(S_NEQUAL); }
	YY_BREAK
case 91:
YY_RULE_SETUP
#line 836 "pgc.l"
{ return(S_ADD); }
	YY_BREAK
case 92:
YY_RULE_SETUP
#line 837 "pgc.l"
{ return(S_SUB); }
	YY_BREAK
case 93:
YY_RULE_SETUP
#line 838 "pgc.l"
{ return(S_MUL); }
	YY_BREAK
case 94:
YY_RULE_SETUP
#line 839 "pgc.l"
{ return(S_DIV); }
	YY_BREAK
case 95:
YY_RULE_SETUP
#line 840 "pgc.l"
{ return(S_MOD); }
	YY_BREAK
case 96:
YY_RULE_SETUP
#line 841 "pgc.l"
{ return(S_MEMPOINT); }
	YY_BREAK
case 97:
YY_RULE_SETUP
#line 842 "pgc.l"
{ return(S_DOTPOINT); }
	YY_BREAK
case 98:
YY_RULE_SETUP
#line 843 "pgc.l"
{ return S_ANYTHING; }
	YY_BREAK
case 99:
YY_RULE_SETUP
#line 844 "pgc.l"
{ BEGIN(def_ident); }
	YY_BREAK
case 100:
YY_RULE_SETUP
#line 845 "pgc.l"
{
						/* are we simulating Informix? */
						if (INFORMIX_MODE)
						{
							BEGIN(def_ident);
						}
						else
						{
							yyless(1);
							return (S_ANYTHING);
						}
					}
	YY_BREAK
case 101:
YY_RULE_SETUP
#line 857 "pgc.l"
{ BEGIN(undef); }
	YY_BREAK
case 102:
YY_RULE_SETUP
#line 858 "pgc.l"
{
						/* are we simulating Informix? */
						if (INFORMIX_MODE)
						{
							BEGIN(undef);
						}
						else
						{
							yyless(1);
							return (S_ANYTHING);
						}
					}
	YY_BREAK
case 103:
YY_RULE_SETUP
#line 870 "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:
YY_RULE_SETUP
#line 902 "pgc.l"
{
		                	mmerror(PARSE_ERROR, ET_FATAL, "Missing identifier in 'EXEC SQL UNDEF' command");
			                yyterminate();
				}
	YY_BREAK
case 105:
YY_RULE_SETUP
#line 906 "pgc.l"
{ BEGIN(incl); }
	YY_BREAK
case 106:
YY_RULE_SETUP
#line 907 "pgc.l"
{ 
					  /* are we simulating Informix? */
					  if (INFORMIX_MODE)
					  {
						  BEGIN(incl);
					  }
					  else
					  {
						  yyless(1);
						  return (S_ANYTHING);
					  }
					}
	YY_BREAK
case 107:
YY_RULE_SETUP
#line 919 "pgc.l"
{ ifcond = TRUE; BEGIN(xcond); }
	YY_BREAK
case 108:
YY_RULE_SETUP
#line 920 "pgc.l"
{ 
					  /* are we simulating Informix? */
					  if (INFORMIX_MODE)
					  {
						  ifcond = TRUE;
						  BEGIN(xcond);
					  }
					  else
					  {
						  yyless(1);
						  return (S_ANYTHING);
					  }
					}
	YY_BREAK
case 109:
YY_RULE_SETUP
#line 933 "pgc.l"
{ ifcond = FALSE; BEGIN(xcond); }
	YY_BREAK
case 110:
YY_RULE_SETUP
#line 934 "pgc.l"
{ 
					  /* are we simulating Informix? */
					  if (INFORMIX_MODE)
					  {
						  ifcond = FALSE;
						  BEGIN(xcond);
					  }
					  else
					  {
						  yyless(1);
						  return (S_ANYTHING);
					  }
					}
	YY_BREAK
case 111:
YY_RULE_SETUP
#line 947 "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:
YY_RULE_SETUP
#line 958 "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:
YY_RULE_SETUP
#line 979 "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:
YY_RULE_SETUP
#line 995 "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:
YY_RULE_SETUP
#line 1020 "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:
YY_RULE_SETUP
#line 1031 "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 1052 "pgc.l"
{ /* ignore */ }
	YY_BREAK
case 118:
YY_RULE_SETUP
#line 1054 "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:
YY_RULE_SETUP
#line 1088 "pgc.l"
{
				mmerror(PARSE_ERROR, ET_FATAL, "Missing identifier in 'EXEC SQL IFDEF' command");
				yyterminate();
			}
	YY_BREAK
case 120:
YY_RULE_SETUP
#line 1092 "pgc.l"
{
				old = mm_strdup(yytext);
				BEGIN(def);
				startlit();
			}
	YY_BREAK
case 121:
YY_RULE_SETUP
#line 1097 "pgc.l"
{
				mmerror(PARSE_ERROR, ET_FATAL, "Missing identifier in 'EXEC SQL DEFINE' command");
				yyterminate();
			}	
	YY_BREAK
case 122:
YY_RULE_SETUP
#line 1101 "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:
YY_RULE_SETUP
#line 1126 "pgc.l"
{ addlit(yytext, yyleng); }
	YY_BREAK
case 124:
YY_RULE_SETUP
#line 1127 "pgc.l"
{	parse_include(); }
	YY_BREAK
case 125:
YY_RULE_SETUP
#line 1128 "pgc.l"
{	parse_include(); }
	YY_BREAK
case 126:
YY_RULE_SETUP
#line 1129 "pgc.l"
{ parse_include(); }
	YY_BREAK
case 127:
YY_RULE_SETUP
#line 1130 "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 1135 "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:
YY_RULE_SETUP
#line 1180 "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 1181 "pgc.l"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 2972 "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->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->yy_n_chars;
			yy_current_buffer->yy_input_file = yyin;
			yy_current_buffer->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->yy_ch_buf[yy_n_chars] )
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;

			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state();

			/* Okay, we're now positioned to make the NUL
			 * transition.  We couldn't have
			 * yy_get_previous_state() go ahead and do it
			 * for us because it doesn't know how to deal
			 * with the possibility of jamming (and we don't
			 * want to build jamming into it because then it
			 * will run more slowly).
			 */

			yy_next_state = yy_try_NUL_trans( yy_current_state );

			yy_bp = yytext_ptr + YY_MORE_ADJ;

			if ( yy_next_state )
				{
				/* Consume the NUL. */
				yy_cp = ++yy_c_buf_p;
				yy_current_state = yy_next_state;
				goto yy_match;
				}

			else
				{
				yy_cp = yy_c_buf_p;
				goto yy_find_action;
				}
			}

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

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

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

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

			case EOB_ACT_CONTINUE_SCAN:
				yy_c_buf_p =
					yytext_ptr + yy_amount_of_matched_text;

				yy_current_state = yy_get_previous_state();

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

			case EOB_ACT_LAST_MATCH:
				yy_c_buf_p =
				&yy_current_buffer->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()
	{
	register char *dest = yy_current_buffer->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->yy_ch_buf[yy_n_chars + 1] )
		YY_FATAL_ERROR(
		"fatal flex scanner internal error--end of buffer missed" );

	if ( yy_current_buffer->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->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->yy_n_chars = yy_n_chars = 0;

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

		while ( num_to_read <= 0 )
			{ /* Not enough room in the buffer - grow it. */
#ifdef YY_USES_REJECT
			YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
#else

			/* 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. */
					yy_flex_realloc( (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->yy_buf_size -
						number_to_move - 1;
#endif
			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

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

		yy_current_buffer->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->yy_buffer_status =
				YY_BUFFER_EOF_PENDING;
			}
		}

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

	yy_n_chars += number_to_move;
	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;

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

	yy_current_state = yy_start;
	yy_state_ptr = yy_state_buf;
	*yy_state_ptr++ = yy_current_state;

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

	return yy_current_state;
	}


/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */

#ifdef YY_USE_PROTOS
static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
#else
static yy_state_type yy_try_NUL_trans( yy_current_state )
yy_state_type yy_current_state;
#endif
	{
	register int yy_is_jam;

	register YY_CHAR yy_c = 1;
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 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);
	if ( ! yy_is_jam )
		*yy_state_ptr++ = yy_current_state;

	return yy_is_jam ? 0 : yy_current_state;
	}


#ifndef YY_NO_UNPUT
#ifdef YY_USE_PROTOS
static void yyunput( int c, register char *yy_bp )
#else
static void yyunput( c, yy_bp )
int c;
register char *yy_bp;
#endif
	{
	register char *yy_cp = yy_c_buf_p;

	/* undo effects of setting up yytext */
	*yy_cp = yy_hold_char;

	if ( yy_cp < yy_current_buffer->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->yy_ch_buf[
					yy_current_buffer->yy_buf_size + 2];
		register char *source =
				&yy_current_buffer->yy_ch_buf[number_to_move];

		while ( source > yy_current_buffer->yy_ch_buf )
			*--dest = *--source;

		yy_cp += (int) (dest - source);
		yy_bp += (int) (dest - source);
		yy_current_buffer->yy_n_chars =
			yy_n_chars = yy_current_buffer->yy_buf_size;

		if ( yy_cp < yy_current_buffer->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;
	}
#endif	/* ifndef YY_NO_UNPUT */


#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput()
#else
static int input()
#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->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 );

					/* fall through */

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

#ifdef YY_USE_PROTOS
void yyrestart( FILE *input_file )
#else
void yyrestart( input_file )
FILE *input_file;
#endif
	{
	if ( ! yy_current_buffer )
		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );

	yy_init_buffer( yy_current_buffer, input_file );
	yy_load_buffer_state();
	}


#ifdef YY_USE_PROTOS
void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
#else
void yy_switch_to_buffer( new_buffer )
YY_BUFFER_STATE new_buffer;
#endif
	{
	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->yy_buf_pos = yy_c_buf_p;
		yy_current_buffer->yy_n_chars = yy_n_chars;
		}

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


#ifdef YY_USE_PROTOS
void yy_load_buffer_state( void )
#else
void yy_load_buffer_state()
#endif
	{
	yy_n_chars = yy_current_buffer->yy_n_chars;
	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
	yyin = yy_current_buffer->yy_input_file;
	yy_hold_char = *yy_c_buf_p;
	}


#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
#else
YY_BUFFER_STATE yy_create_buffer( file, size )
FILE *file;
int size;
#endif
	{
	YY_BUFFER_STATE b;

	b = (YY_BUFFER_STATE) yy_flex_alloc( 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 *) yy_flex_alloc( 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;
	}


#ifdef YY_USE_PROTOS
void yy_delete_buffer( YY_BUFFER_STATE b )
#else
void yy_delete_buffer( b )
YY_BUFFER_STATE b;
#endif
	{
	if ( ! b )
		return;

	if ( b == yy_current_buffer )
		yy_current_buffer = (YY_BUFFER_STATE) 0;

	if ( b->yy_is_our_buffer )
		yy_flex_free( (void *) b->yy_ch_buf );

	yy_flex_free( (void *) b );
	}



#ifdef YY_USE_PROTOS
void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
#else
void yy_init_buffer( b, file )
YY_BUFFER_STATE b;
FILE *file;
#endif


	{
	yy_flush_buffer( b );

	b->yy_input_file = file;
	b->yy_fill_buffer = 1;

#if YY_ALWAYS_INTERACTIVE
	b->yy_is_interactive = 1;
#else
#if YY_NEVER_INTERACTIVE
	b->yy_is_interactive = 0;
#else
	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
#endif
#endif
	}


#ifdef YY_USE_PROTOS
void yy_flush_buffer( YY_BUFFER_STATE b )
#else
void yy_flush_buffer( b )
YY_BUFFER_STATE b;
#endif

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


#ifndef YY_NO_SCAN_BUFFER
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
#else
YY_BUFFER_STATE yy_scan_buffer( base, size )
char *base;
yy_size_t size;
#endif
	{
	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) yy_flex_alloc( 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;
	}
#endif


#ifndef YY_NO_SCAN_STRING
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
#else
YY_BUFFER_STATE yy_scan_string( yy_str )
yyconst char *yy_str;
#endif
	{
	int len;
	for ( len = 0; yy_str[len]; ++len )
		;

	return yy_scan_bytes( yy_str, len );
	}
#endif


#ifndef YY_NO_SCAN_BYTES
#ifdef YY_USE_PROTOS
YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
#else
YY_BUFFER_STATE yy_scan_bytes( bytes, len )
yyconst char *bytes;
int len;
#endif
	{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	int i;

	/* Get memory for full buffer, including space for trailing EOB's. */
	n = len + 2;
	buf = (char *) yy_flex_alloc( n );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );

	for ( i = 0; i < len; ++i )
		buf[i] = bytes[i];

	buf[len] = buf[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;
	}
#endif


#ifndef YY_NO_PUSH_STATE
#ifdef YY_USE_PROTOS
static void yy_push_state( int new_state )
#else
static void yy_push_state( new_state )
int new_state;
#endif
	{
	if ( yy_start_stack_ptr >= yy_start_stack_depth )
		{
		yy_size_t new_size;

		yy_start_stack_depth += YY_START_STACK_INCR;
		new_size = yy_start_stack_depth * sizeof( int );

		if ( ! yy_start_stack )
			yy_start_stack = (int *) yy_flex_alloc( new_size );

		else
			yy_start_stack = (int *) yy_flex_realloc(
					(void *) yy_start_stack, new_size );

		if ( ! yy_start_stack )
			YY_FATAL_ERROR(
			"out of memory expanding start-condition stack" );
		}

	yy_start_stack[yy_start_stack_ptr++] = YY_START;

	BEGIN(new_state);
	}
#endif


#ifndef YY_NO_POP_STATE
static void yy_pop_state()
	{
	if ( --yy_start_stack_ptr < 0 )
		YY_FATAL_ERROR( "start-condition stack underflow" );

	BEGIN(yy_start_stack[yy_start_stack_ptr]);
	}
#endif


#ifndef YY_NO_TOP_STATE
static int yy_top_state()
	{
	return yy_start_stack[yy_start_stack_ptr - 1];
	}
#endif

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

#ifdef YY_USE_PROTOS
static void yy_fatal_error( yyconst char msg[] )
#else
static void yy_fatal_error( msg )
char msg[];
#endif
	{
	(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. */ \
		yytext[yyleng] = yy_hold_char; \
		yy_c_buf_p = yytext + n; \
		yy_hold_char = *yy_c_buf_p; \
		*yy_c_buf_p = '\0'; \
		yyleng = n; \
		} \
	while ( 0 )


/* Internal utility routines. */

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

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

	return n;
	}
#endif


#ifdef YY_USE_PROTOS
static void *yy_flex_alloc( yy_size_t size )
#else
static void *yy_flex_alloc( size )
yy_size_t size;
#endif
	{
	return (void *) malloc( size );
	}

#ifdef YY_USE_PROTOS
static void *yy_flex_realloc( void *ptr, yy_size_t size )
#else
static void *yy_flex_realloc( ptr, size )
void *ptr;
yy_size_t size;
#endif
	{
	/* 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 );
	}

#ifdef YY_USE_PROTOS
static void yy_flex_free( void *ptr )
#else
static void yy_flex_free( ptr )
void *ptr;
#endif
	{
	free( ptr );
	}

#if YY_MAIN
int main()
	{
	yylex();
	return 0;
	}
#endif
#line 1181 "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;
}
