#line 2 "pl_scan.c"

#line 4 "pl_scan.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define yy_create_buffer plpgsql_base_yy_create_buffer
#define yy_delete_buffer plpgsql_base_yy_delete_buffer
#define yy_flex_debug plpgsql_base_yy_flex_debug
#define yy_init_buffer plpgsql_base_yy_init_buffer
#define yy_flush_buffer plpgsql_base_yy_flush_buffer
#define yy_load_buffer_state plpgsql_base_yy_load_buffer_state
#define yy_switch_to_buffer plpgsql_base_yy_switch_to_buffer
#define yyin plpgsql_base_yyin
#define yyleng plpgsql_base_yyleng
#define yylex plpgsql_base_yylex
#define yylineno plpgsql_base_yylineno
#define yyout plpgsql_base_yyout
#define yyrestart plpgsql_base_yyrestart
#define yytext plpgsql_base_yytext
#define yywrap plpgsql_base_yywrap
#define yyalloc plpgsql_base_yyalloc
#define yyrealloc plpgsql_base_yyrealloc
#define yyfree plpgsql_base_yyfree

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

/* First, we deal with  platform-specific or compiler-specific issues. */

/* begin standard C headers. */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>

/* end standard C headers. */

/* flex integer type definitions */

#ifndef FLEXINT_H
#define FLEXINT_H

/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */

#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L

/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
 * if you want the limit (max/min) macros for int types. 
 */
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif

#include <inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef unsigned char flex_uint8_t; 
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */

/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN               (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN              (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN              (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX               (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX              (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX              (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX              (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX             (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX             (4294967295U)
#endif

#endif /* ! FLEXINT_H */

#ifdef __cplusplus

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

#else	/* ! __cplusplus */

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

#define YY_USE_CONST

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

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

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

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

/* Enter a start condition.  This macro really ought to take a parameter,
 * but we do it the disgusting crufty way forced on us by the ()-less
 * definition of BEGIN.
 */
#define BEGIN (yy_start) = 1 + 2 *

/* Translate the current start state into a value that can be later handed
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
 * compatibility.
 */
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START

/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)

/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE plpgsql_base_yyrestart(plpgsql_base_yyin  )

#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#define YY_BUF_SIZE 16384
#endif

/* The state buf must be large enough to hold one state per character in the main buffer.
 */
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))

#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif

extern int plpgsql_base_yyleng;

extern FILE *plpgsql_base_yyin, *plpgsql_base_yyout;

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2

    #define YY_LESS_LINENO(n)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up plpgsql_base_yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = (yy_hold_char); \
		YY_RESTORE_YY_MORE_OFFSET \
		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up plpgsql_base_yytext again */ \
		} \
	while ( 0 )

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

#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
	{
	FILE *yy_input_file;

	char *yy_ch_buf;		/* input buffer */
	char *yy_buf_pos;		/* current position in input buffer */

	/* Size of input buffer in bytes, not including room for EOB
	 * characters.
	 */
	yy_size_t yy_buf_size;

	/* Number of characters read into yy_ch_buf, not including EOB
	 * characters.
	 */
	int yy_n_chars;

	/* Whether we "own" the buffer - i.e., we know we created it,
	 * and can realloc() it to grow it, and should free() it to
	 * delete it.
	 */
	int yy_is_our_buffer;

	/* Whether this is an "interactive" input source; if so, and
	 * if we're using stdio for input, then we want to use getc()
	 * instead of fread(), to make sure we stop fetching input after
	 * each newline.
	 */
	int yy_is_interactive;

	/* Whether we're considered to be at the beginning of a line.
	 * If so, '^' rules will be active on the next match, otherwise
	 * not.
	 */
	int yy_at_bol;

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */
    
	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
	/* When an EOF's been seen but there's still some text to process
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
	 * shouldn't try reading from the input source any more.  We might
	 * still have a bunch of tokens to match, though, because of
	 * possible backing-up.
	 *
	 * When we actually see the EOF, we change the status to "new"
	 * (via plpgsql_base_yyrestart()), so that the user can continue scanning by
	 * just pointing plpgsql_base_yyin at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* Stack of input buffers. */
static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
 */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
                          : NULL)

/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]

/* yy_hold_char holds the character lost when plpgsql_base_yytext is formed. */
static char yy_hold_char;
static int yy_n_chars;		/* number of characters read into yy_ch_buf */
int plpgsql_base_yyleng;

/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
static int yy_init = 0;		/* whether we need to initialize */
static int yy_start = 0;	/* start state number */

/* Flag which is used to allow plpgsql_base_yywrap()'s to do buffer switches
 * instead of setting up a fresh plpgsql_base_yyin.  A bit of a hack ...
 */
static int yy_did_buffer_switch_on_eof;

void plpgsql_base_yyrestart (FILE *input_file  );
void plpgsql_base_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer  );
YY_BUFFER_STATE plpgsql_base_yy_create_buffer (FILE *file,int size  );
void plpgsql_base_yy_delete_buffer (YY_BUFFER_STATE b  );
void plpgsql_base_yy_flush_buffer (YY_BUFFER_STATE b  );
void plpgsql_base_yypush_buffer_state (YY_BUFFER_STATE new_buffer  );
void plpgsql_base_yypop_buffer_state (void );

static void plpgsql_base_yyensure_buffer_stack (void );
static void plpgsql_base_yy_load_buffer_state (void );
static void plpgsql_base_yy_init_buffer (YY_BUFFER_STATE b,FILE *file  );

#define YY_FLUSH_BUFFER plpgsql_base_yy_flush_buffer(YY_CURRENT_BUFFER )

YY_BUFFER_STATE plpgsql_base_yy_scan_buffer (char *base,yy_size_t size  );
YY_BUFFER_STATE plpgsql_base_yy_scan_string (yyconst char *yy_str  );
YY_BUFFER_STATE plpgsql_base_yy_scan_bytes (yyconst char *bytes,int len  );

void *plpgsql_base_yyalloc (yy_size_t  );
void *plpgsql_base_yyrealloc (void *,yy_size_t  );
void plpgsql_base_yyfree (void *  );

#define yy_new_buffer plpgsql_base_yy_create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        plpgsql_base_yyensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            plpgsql_base_yy_create_buffer(plpgsql_base_yyin,YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
	}

#define yy_set_bol(at_bol) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){\
        plpgsql_base_yyensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            plpgsql_base_yy_create_buffer(plpgsql_base_yyin,YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
	}

#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

/* Begin user sect3 */

#define plpgsql_base_yywrap(n) 1
#define YY_SKIP_YYWRAP

typedef unsigned char YY_CHAR;

FILE *plpgsql_base_yyin = (FILE *) 0, *plpgsql_base_yyout = (FILE *) 0;

typedef int yy_state_type;

extern int plpgsql_base_yylineno;

int plpgsql_base_yylineno = 1;

extern char *plpgsql_base_yytext;
#define yytext_ptr plpgsql_base_yytext

static yy_state_type yy_get_previous_state (void );
static yy_state_type yy_try_NUL_trans (yy_state_type current_state  );
static int yy_get_next_buffer (void );
static void yy_fatal_error (yyconst char msg[]  );

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up plpgsql_base_yytext.
 */
#define YY_DO_BEFORE_ACTION \
	(yytext_ptr) = yy_bp; \
	plpgsql_base_yyleng = (size_t) (yy_cp - yy_bp); \
	(yy_hold_char) = *yy_cp; \
	*yy_cp = '\0'; \
	(yy_c_buf_p) = yy_cp;

#define YY_NUM_RULES 82
#define YY_END_OF_BUFFER 83
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
static yyconst flex_int16_t yy_accept[338] =
    {   0,
        0,    0,   80,   80,    0,    0,   83,   81,   70,   70,
       81,   81,   76,   81,   81,   81,   68,   81,    2,   52,
       52,   52,   52,   52,   52,   52,   52,   52,   52,   52,
       52,   52,   52,   52,   52,   52,   81,   80,   79,   82,
       75,   74,   75,   70,   69,    0,   52,   60,   71,    3,
       72,   68,    1,    0,   52,    0,    0,   52,   52,   52,
       52,   52,   52,   52,   52,   52,   52,   52,   52,   52,
       52,   52,   23,   24,   27,   52,   52,   52,   52,   52,
       52,   52,   52,   52,   52,   52,   45,   52,   52,   52,
        0,   80,   78,   77,   73,   52,    0,    0,    0,    0,

       71,    0,    0,    0,    0,   53,   52,   52,   52,   52,
       52,   52,   52,   52,   52,   52,   52,   15,   52,   52,
       52,   52,   20,   52,   22,   52,   52,   28,   52,   52,
       31,   52,   52,   52,   52,   52,   52,   52,   52,   52,
       52,   52,   52,   52,   52,   52,   52,    0,    0,    0,
        0,    0,   61,    0,    0,    0,   53,    0,   53,    0,
        0,   52,   52,   52,   52,   52,   52,   52,   52,   52,
       51,   13,   52,   52,   52,   18,   52,   21,   25,   26,
       29,   30,   52,   33,   34,   52,   52,   52,   52,   52,
       52,   52,   52,   52,   44,   46,   52,   48,   52,    0,

        0,    0,    0,   61,    0,   61,    0,    0,    0,    0,
        0,    0,    0,    0,   54,    4,    5,    6,   52,   52,
        9,   52,   52,   52,   14,   52,   52,   19,   52,   52,
       36,   52,   52,   52,   52,   52,   52,   52,   52,   49,
        0,    0,    0,    0,    0,    0,    0,   62,    0,   55,
        0,    0,    0,   54,    0,   54,    0,   52,    8,   52,
       52,   52,   52,   52,   32,   52,   37,   38,   52,   40,
       52,   52,   43,   52,    0,    0,   63,    0,    0,    0,
       62,    0,   62,    0,    0,    0,    0,    0,   52,   10,
       11,   52,   52,   17,   35,   52,   41,   52,   47,   50,

        0,    0,    0,    0,    0,    0,   56,    0,    7,   52,
       52,   52,   52,    0,    0,   64,    0,   58,    0,    0,
       52,   16,   52,   42,   66,    0,    0,    0,   57,   52,
       39,    0,   65,   59,   12,   67,    0
    } ;

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

       46,   47,   48,   49,   50,   26,   26,   51,   52,   53,
       54,   55,   26,   56,   57,   58,   59,   60,   61,   62,
       63,   26,    1,    1,    1,    1,    1,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,

       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   26
    } ;

static yyconst flex_int32_t yy_meta[64] =
    {   0,
        1,    2,    3,    4,    5,    1,    6,    6,    7,    1,
        1,    8,    1,    6,    1,    1,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    7,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
        2,    2,    2
    } ;

static yyconst flex_int16_t yy_base[358] =
    {   0,
        0,  207,   55,   56,   63,   64,  207, 2185,   66,   73,
       75,  182, 2185,  164,  162,  155,  149,  141, 2185,   79,
       82,  129,  168,  201,  243,   96,  107,  301,   62,   99,
      136,  158,  342,  169,  378,  208,   58,    0,  146,    0,
     2185, 2185,  134,  120,  141,  138,  197,  239,    0, 2185,
     2185,  122, 2185,  264,  278,   93,  182,  312,  323,  306,
      323,  379,  424,  416,  395,  357,  452,  496,  436,  471,
      455,  516,  484,  500,  533,  521,  558,  574,  538,  560,
      591,  590,  629,  623,  587,  624,  688,  691,  702,  631,
      121,    0, 2185, 2185, 2185,  713,  130,  724,  203,  447,

        0,  124,  129,  508,  109,  727,  739,  719,  726,  731,
      739,  740,  747,  800,  807,  819,  795,  832,  807,  827,
      856,  842,  877,  891,  894,  874,  878,  908,  919,  932,
      905,  911,  925,  930,  938,  946,  990,  969,  976,  993,
     1013, 1015, 1000, 1023, 1023, 1042, 1028,  148,  167,  185,
     1081,  102, 1088,  197,  207,  100, 1099, 1106, 1113,  237,
     1124, 1090, 1091, 1111, 1137, 1123, 1160, 1176, 1140, 1163,
     1199, 1211, 1195, 1223, 1146, 1235, 1247, 1254, 1261, 1272,
     1279, 1286, 1274, 1298, 1301, 1281, 1298, 1325, 1343, 1323,
     1357, 1360, 1354, 1359, 1415, 1418, 1387, 1432, 1420,   68,

      237,  246,   97, 1444, 1451, 1465,  308, 1383,  249,  148,
      254,  248, 1476,   96,  347, 1480, 1483, 1494, 1497, 1508,
     1515, 1522, 1501, 1502, 1539, 1555, 1567, 1578, 1547, 1592,
     1603, 1606, 1608, 1628, 1590, 1606, 1614, 1667, 1645, 1679,
      258,  285,  187,  299,  305, 1691,   74,  651,  322, 2185,
      355,  375,   67, 1701,  705, 1542,  378, 1685, 1708, 1702,
     1727, 1711, 1703, 1738, 1763, 1775, 1787, 1790, 1802, 1805,
     1800, 1788, 1826, 1829,  392,  426, 2185,  432,  447,   66,
     1851, 1653, 1752,  467,  476,  496,  219,  500, 1858, 1861,
     1872, 1879, 1858, 1892, 1895, 1875, 1916, 1892, 1928, 2185,

      512,  525,  264,  525,  271,  561, 2185,  574, 1939, 1925,
     1926, 1941, 1974,  275,  574, 2185,  587, 2185,  602,  301,
     1949, 1986, 1998, 2001, 2185,  630,  354,  388, 2185, 1992,
     2025,  438, 2185, 2185, 2032, 2185, 2185, 2049, 2057, 2065,
     2072, 2080, 2088, 2096, 2104, 2111, 2115, 2120, 2127, 2135,
     2142, 2149, 2153, 2158, 2165, 2171, 2178
    } ;

static yyconst flex_int16_t yy_def[358] =
    {   0,
      337,    1,  338,  338,  339,  339,  337,  337,  337,  337,
      340,  337,  337,  337,  337,  337,  337,  337,  337,  341,
      341,  341,   22,   22,   22,  341,  341,  341,   22,   22,
      341,  341,   22,  341,   22,  341,  337,  342,  337,  343,
      337,  337,  337,  337,  344,  344,  337,  337,  345,  337,
      337,  337,  337,  337,  341,  337,  346,  341,  341,   22,
       28,  341,   28,  341,  341,   28,  341,  341,  341,  341,
       22,  341,  341,   28,  341,   22,  341,  341,   22,   68,
      341,   68,   28,  341,   22,   68,  341,  341,  341,   68,
      337,  342,  337,  337,  337,  337,  344,  337,  337,  347,

      345,  337,  337,  346,  348,  349,  341,   68,   28,   28,
       28,   22,   22,  341,  341,  341,   68,  341,   68,   68,
      341,   68,  341,  341,  341,   22,   22,  341,  341,  341,
       68,   22,   28,   28,   28,   22,  341,   22,   22,   68,
      341,   68,   28,   68,   28,   28,   22,  337,  337,  337,
      347,  350,  351,  337,  337,  348,  337,  337,  349,  337,
      352,   28,   28,   68,  341,   22,  341,  341,   22,   28,
      341,  341,   28,  341,   22,  341,  341,  341,  341,  341,
      341,  341,   68,  341,  341,   22,   68,  341,  341,   22,
      341,  341,   68,   68,  341,  341,   68,  341,   68,  337,

      337,  337,  350,  337,  337,  351,  337,  353,  337,  337,
      337,  337,  352,  354,  355,  341,  341,  341,  341,  341,
      341,  341,   22,   22,  341,  341,  341,  341,   68,  341,
      341,  341,   68,  341,   28,   28,   22,  341,   28,  341,
      337,  337,  337,  337,  337,  353,  356,  357,  337,  337,
      337,  337,  354,  337,  337,  355,  337,   28,  341,   68,
      341,   28,   68,   68,  341,  341,  341,  341,  341,  341,
       68,   22,  341,  341,  337,  337,  337,  337,  337,  356,
      337,  337,  357,  337,  337,  337,  337,  337,  341,  341,
      341,  341,   22,  341,  341,   22,  341,   28,  341,  337,

      337,  337,  337,  337,  337,  337,  337,  337,  341,   68,
       28,   68,  341,  337,  337,  337,  337,  337,  337,  337,
       68,  341,  341,  341,  337,  337,  337,  337,  337,   28,
      341,  337,  337,  337,  341,  337,    0,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337
    } ;

static yyconst flex_int16_t yy_nxt[2249] =
    {   0,
        8,    9,   10,    9,   11,    8,   12,    8,   13,    8,
       14,   15,   16,   17,   18,   19,   20,   21,   22,   23,
       24,   25,   26,   27,   28,   27,   29,   27,   30,   31,
       32,   33,   34,   35,   27,   27,   36,   27,   27,    8,
       27,   20,   21,   22,   23,   24,   25,   26,   27,   28,
       29,   27,   30,   31,   32,   33,   34,   35,   27,   27,
       36,   27,   27,   39,   39,   42,   42,   44,   44,   44,
      281,  254,   43,   43,   44,   44,   44,   46,  281,   47,
       54,   54,   54,   54,   54,   54,   56,   91,   55,   56,
       57,   76,  241,   57,   40,   40,   55,   54,   54,   54,

      254,  204,   59,   56,  157,   58,  204,   57,   54,   54,
       54,   91,   55,  157,   56,   76,   72,  241,   57,   77,
       55,   44,   44,   44,  102,   55,  103,   59,   78,   58,
       54,   54,   54,   79,   96,   52,   56,   54,   54,   54,
       57,   72,   96,   56,   77,   96,   95,   57,  102,   55,
      103,  148,   78,  154,   93,   60,   53,   79,   61,   54,
       54,   54,   52,   62,   51,   56,   80,  155,  250,   57,
       54,   54,   54,   50,   49,  148,   56,  154,   81,   60,
       57,  200,   61,  104,  104,  104,  105,   62,   63,   85,
       80,  155,   64,  250,   55,   48,  201,   55,   54,   54,

       54,   97,   65,   81,   56,  200,  337,  277,   57,   54,
       54,   54,   37,   63,   85,   56,  337,   64,   55,   57,
      201,   55,  337,  202,   89,  337,   65,   66,  337,   67,
       55,   90,  277,  209,  149,   55,  150,  210,   68,  307,
       98,   98,   98,  337,  337,  337,   99,  202,  337,   89,
      100,   66,   48,   67,   55,  337,   90,  209,  149,   55,
      150,  210,   68,   69,  307,   54,   54,   54,  211,   55,
      212,   56,   70,  242,   71,   57,  243,   55,  337,   54,
       54,   54,  249,  251,  316,   56,  252,  275,   69,   57,
      337,  318,  211,   55,  212,  325,   70,  242,   71,  337,

      243,   55,   54,   54,   54,  337,  249,  251,   56,  316,
      252,  275,   57,   54,   54,   54,  318,  337,  276,   56,
      325,  329,   73,   57,   54,   54,   54,  337,  278,   74,
       56,  337,   55,   75,   57,  109,  107,  337,  337,  244,
       55,  245,  276,  279,   55,  108,  329,   73,  255,  255,
      255,  110,  278,   74,  257,   55,   55,   75,   82,  109,
      285,  107,   83,  244,   55,  245,  337,  279,   55,   55,
      108,   84,  337,  337,  333,  110,   55,  337,   55,   55,
       54,   54,   54,   82,  285,   55,   56,   83,  337,  117,
       57,  286,   55,  337,  337,   84,   54,   54,   54,  333,

       55,   86,   56,   55,   55,  287,   57,   87,  334,   55,
      111,  288,   55,  117,  337,  286,   88,   54,   54,   54,
      300,  337,  116,   56,  337,  337,   86,   57,   55,  287,
      337,   87,  115,  334,  111,  288,   55,   54,   54,   54,
       88,  112,  113,   56,  300,  114,  116,   57,  151,  151,
      151,  152,   55,   54,   54,   54,   55,  115,  336,   56,
      337,  337,  337,   57,  301,  337,  112,  113,  302,  122,
      114,  118,   54,   54,   54,  337,   55,  303,   56,  337,
       55,   55,   57,  336,  124,   54,   54,   54,  301,   55,
      337,   56,  302,  122,  337,   57,  118,   54,   54,   54,

      304,  303,  123,   56,  337,   55,  305,   57,  124,  104,
      104,  104,  105,   55,  119,  337,  120,   54,   54,   54,
      121,  126,  337,   56,  304,  337,  123,   57,   55,  306,
      305,  337,   55,  127,   54,   54,   54,  337,  308,  119,
       56,  120,  314,  128,   57,  121,  126,   55,  337,  125,
      129,  337,   55,  306,  337,   55,   55,  127,  315,   54,
       54,   54,  308,  317,  132,   56,  314,   55,  128,   57,
      337,   55,   55,  125,  129,   54,   54,   54,   55,   55,
      133,   56,  315,  337,   55,   57,  337,  317,  132,  337,
      337,   55,   54,   54,   54,  130,   55,  337,   56,  319,

      337,  337,   57,   55,  320,  133,  337,  131,   55,   55,
       55,  337,  326,  142,  135,  337,   55,  327,  337,  130,
      337,   55,  134,  319,   54,   54,   54,  337,  320,  337,
       56,  131,  328,   55,   57,   55,  326,  142,  337,  135,
       55,  327,   55,  337,  143,   55,  134,  136,   55,   55,
       55,  146,  282,  282,  282,  147,  328,  137,  284,  141,
      332,  138,  139,  337,  140,  337,  337,   55,  337,  143,
      337,  337,  136,   55,   55,   55,  146,  337,  337,  337,
      147,  137,  337,  141,  332,  138,  139,  337,  140,   54,
       54,   54,   54,   54,   54,   56,  337,  337,   56,   57,

      337,  337,   57,   54,   54,   54,  255,  255,  255,   56,
      337,  337,  257,   57,   54,   54,   54,   97,  337,  337,
       56,  144,  337,  337,   57,   98,   98,   98,  158,  158,
      158,   99,  337,  145,  160,  100,  337,   55,  161,   55,
       54,   54,   54,  163,  337,  144,   56,   55,  337,  337,
       57,  337,   55,  337,   55,  162,  337,  145,  164,   55,
       55,  337,   55,  165,   55,  337,   55,   55,  163,   55,
      337,  166,   55,  168,  167,  337,   55,   55,   55,  337,
      162,   55,  164,   55,  337,   55,  337,  165,  337,  337,
       55,   55,  337,   55,  337,  166,  337,  168,  167,  337,

       55,   54,   54,   54,  337,   55,  337,   56,   54,   54,
       54,   57,  337,   55,   56,  172,  169,  337,   57,  173,
       54,   54,   54,  337,  337,   55,   56,  174,  337,  170,
       57,   55,  337,   54,   54,   54,  337,  337,   55,   56,
      172,  169,  337,   57,  173,  175,  337,   55,  337,  171,
       55,   55,  174,  337,  170,  337,   55,   54,   54,   54,
      177,  337,   55,   56,  337,  337,   55,   57,  337,  337,
      175,  337,   55,  171,  337,  337,   55,  337,   54,   54,
       54,  337,  337,  337,   56,  177,  337,   55,   57,  176,
      337,   55,   54,   54,   54,   54,   54,   54,   56,  337,

       55,   56,   57,  179,   55,   57,  337,  180,   55,   54,
       54,   54,   55,  176,  337,   56,  337,  337,  178,   57,
       54,   54,   54,   55,   55,   55,   56,  179,   55,  183,
       57,  180,   55,   54,   54,   54,   55,  184,  337,   56,
       55,  337,  178,   57,  337,   55,   55,  337,   55,  181,
       55,  186,  337,  185,  183,  337,  337,   55,   55,   55,
      337,  184,   55,  337,   55,  182,   55,  337,  337,   55,
      187,   55,   55,  181,  337,  188,  186,  185,  337,  337,
       55,   55,   55,  337,   55,  337,   55,  337,  337,  182,
       55,   54,   54,   54,  187,   55,   55,   56,   55,  188,

      337,   57,   55,  190,   55,   55,  189,  337,  337,  337,
      191,   55,  337,  192,   54,   54,   54,   55,  337,   55,
       56,   55,   55,  337,   57,  337,   55,  190,  195,   55,
      337,  189,   55,   55,  191,  194,   55,  337,  192,   55,
      337,   55,   55,  196,   55,  337,   55,   55,  337,  337,
      337,  197,  195,  193,  199,   55,   55,   55,   55,  337,
      194,  337,   55,   55,   55,  337,   55,  337,  196,   55,
      198,  337,   55,  337,   55,  197,  337,  337,  199,   55,
      337,   55,  151,  151,  151,  152,   55,  337,   55,  205,
      205,  205,  337,  337,  198,  207,  337,  337,   55,  208,

      158,  158,  158,  105,  337,  337,  160,  158,  158,  158,
      161,   55,   55,  160,  158,  158,  158,  161,   55,  217,
      160,  337,  216,   55,  161,  213,  213,  213,  214,   55,
      337,  218,  337,  337,  337,   55,   55,   55,   54,   54,
       54,  337,   55,  217,   56,  337,  216,   55,   57,   55,
      337,  337,  220,  337,   55,  337,  218,   55,  337,  337,
       55,   54,   54,   54,  337,  337,   55,   56,  337,   55,
      219,   57,   55,   55,  223,   55,  220,   54,   54,   54,
      227,   55,  221,   56,   55,  337,  337,   57,  337,  337,
       55,  224,  222,   55,  219,   55,   55,  337,  223,   55,

       54,   54,   54,  337,  227,  337,   56,  221,  337,   55,
       57,  337,   54,   54,   54,  224,  225,  222,   56,   55,
      337,  337,   57,   55,   54,   54,   54,   55,  337,  337,
       56,  337,  337,  337,   57,  337,   54,   54,   54,  337,
      337,  225,   56,  337,  337,  337,   57,   55,   54,   54,
       54,   55,  337,  226,   56,   54,   54,   54,   57,  337,
      337,   56,   54,   54,   54,   57,  337,  337,   56,  337,
      228,  337,   57,   54,   54,   54,  337,  226,  337,   56,
       54,   54,   54,   57,  337,  337,   56,   54,   54,   54,
       57,  337,  229,   56,   55,  228,  337,   57,   55,   54,

       54,   54,   54,   54,   54,   56,  337,   55,   56,   57,
      230,  337,   57,  337,  337,   55,   55,  229,  231,   55,
      337,  337,   55,   55,  337,  337,   54,   54,   54,  337,
      337,   55,   56,  337,  230,  337,   57,  337,  337,   55,
      337,   55,  337,  231,   54,   54,   54,   55,  337,  234,
       56,  337,   55,  337,   57,  337,  232,   55,   54,   54,
       54,   54,   54,   54,   56,  337,  337,   56,   57,  337,
      233,   57,  237,  234,   55,  337,   55,  238,   55,   55,
      232,   55,  337,   55,  246,  246,  246,  247,  235,  337,
      337,  236,  337,  337,  233,  337,  337,  237,  337,   55,

      337,  337,  238,   55,   55,   55,  337,   55,   55,  337,
      337,  239,  235,  337,  337,  236,   54,   54,   54,   54,
       54,   54,   56,  337,  337,   56,   57,  337,  337,   57,
       55,  337,   55,   54,   54,   54,  239,  337,   55,   56,
      240,  337,  337,   57,   55,  205,  205,  205,  152,  337,
      337,  207,  205,  205,  205,  208,  337,  337,  207,  337,
      337,  337,  208,   55,  337,  240,  205,  205,  205,   55,
      337,  337,  207,  337,  337,  337,  208,  213,  213,  213,
      214,   54,   54,   54,   54,   54,   54,   56,  337,  337,
       56,   57,  337,  337,   57,   54,   54,   54,   54,   54,

       54,   56,  337,  337,   56,   57,  337,  337,   57,   54,
       54,   54,  337,  258,  337,   56,   54,   54,   54,   57,
      337,  337,   56,   54,   54,   54,   57,  261,   55,   56,
       55,  262,  337,   57,  337,   55,   55,  337,  258,  259,
       54,   54,   54,  255,  255,  255,   56,  337,  337,  257,
       57,  261,   55,  260,   55,  262,   54,   54,   54,   55,
       55,  337,   56,  259,  337,   55,   57,  265,   54,   54,
       54,   55,  337,  337,   56,  337,  337,  260,   57,   54,
       54,   54,  337,  337,  337,   56,  337,  337,  263,   57,
       55,  337,  265,   54,   54,   54,   55,  337,  337,   56,

      264,  337,  337,   57,   54,   54,   54,   54,   54,   54,
       56,   55,  263,   56,   57,  337,  337,   57,  270,  337,
      337,  337,   55,  266,  264,  267,   55,   55,  268,   54,
       54,   54,   55,  337,   55,   56,   55,  337,  271,   57,
       55,  337,  270,  272,  337,  337,   55,  266,   55,  337,
      267,   55,   55,  268,  282,  282,  282,   55,   55,  337,
      284,  269,  271,  337,   55,  337,   55,  272,   54,   54,
       54,  337,   55,  274,   56,  337,  337,   55,   57,  337,
       54,   54,   54,  337,  337,  269,   56,  337,  337,  337,
       57,   55,  246,  246,  246,  247,  337,  274,  337,  337,

      273,   55,  255,  255,  255,  214,   55,  337,  257,   54,
       54,   54,  337,  289,  337,   56,  337,   55,  337,   57,
       55,   55,  290,   55,  273,  337,   55,  293,   54,   54,
       54,   55,   55,  337,   56,  337,  337,  289,   57,   55,
      337,   55,  337,  292,  337,   55,   55,  290,   55,  337,
      337,   55,  293,  282,  282,  282,   55,   55,  294,  284,
      291,  337,   55,   55,   54,   54,   54,  292,  337,  337,
       56,  337,  337,  337,   57,  337,   54,   54,   54,  337,
      337,   55,   56,  294,  291,  337,   57,   55,   54,   54,
       54,   54,   54,   54,   56,  337,  337,   56,   57,  337,

      337,   57,  295,   54,   54,   54,   54,   54,   54,   56,
      337,  337,   56,   57,   55,  337,   57,   55,   55,  337,
      297,  337,  298,  337,   55,  337,  295,   54,   54,   54,
       54,   54,   54,   56,  337,  337,   56,   57,   55,  337,
       57,   55,  296,   55,  337,  297,  298,  337,  337,   55,
      337,  299,  282,  282,  282,  247,  337,  337,  284,   54,
       54,   54,   54,   54,   54,   56,  337,  337,   56,   57,
      337,  337,   57,   54,   54,   54,  299,  337,  337,   56,
       54,   54,   54,   57,   55,  337,   56,  311,  337,  337,
       57,  309,   55,   54,   54,   54,   54,   54,   54,   56,

      337,   55,   56,   57,  312,  337,   57,  337,   55,   55,
      337,  311,  310,   55,  337,  309,   55,   54,   54,   54,
      313,  337,  337,   56,   55,   55,  337,   57,  312,   54,
       54,   54,  337,   55,  337,   56,  310,  337,   55,   57,
       54,   54,   54,   55,  313,   55,   56,   55,   55,  321,
       57,  337,  337,  337,  322,  337,  337,  337,   55,   55,
      337,   55,  337,  337,  337,  323,  337,  330,   55,   55,
       55,  337,   55,   55,  321,   54,   54,   54,  322,  337,
      337,   56,   55,  337,   55,   57,   55,   54,   54,   54,
      323,  337,  330,   56,   55,  337,  337,   57,   55,   54,

       54,   54,   54,   54,   54,   56,  337,  324,   56,   57,
      337,  337,   57,   55,  337,  337,  337,  331,  337,  337,
       55,  337,  337,  337,  335,  337,   54,   54,   54,  337,
      337,  324,   56,   54,   54,   54,   57,  337,   55,   56,
      337,  337,  331,   57,   55,  337,  337,  337,  335,   38,
       38,   38,   38,   38,   38,   38,   38,   41,   41,   41,
       41,   41,   41,   41,   41,   45,   45,   45,   45,   45,
       45,   45,   45,   55,   55,   55,  337,   55,  337,   55,
       92,   92,   92,   92,   92,   92,  337,   92,   94,   94,
      337,   94,   94,   94,   94,   94,   46,   46,   46,   46,

       46,   46,   46,   46,  101,  101,  337,  337,  101,  101,
      101,  101,  106,  106,  106,  106,  153,  153,  153,  153,
      156,  156,  156,  156,  156,  156,  156,  156,  159,  159,
      159,  337,  159,  337,  159,  203,  203,  203,  203,  203,
      203,  203,  203,  206,  206,  206,  337,  206,  337,  206,
      215,  215,  215,  215,  248,  248,  248,  248,  253,  253,
      253,  253,  253,  253,  253,  253,  256,  256,  256,  337,
      256,  280,  280,  280,  280,  280,  280,  280,  280,  283,
      283,  283,  337,  283,    7,  337,  337,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337,  337,  337,  337,

      337,  337,  337,  337,  337,  337,  337,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337,  337
    } ;

static yyconst flex_int16_t yy_chk[2249] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    3,    4,    5,    6,    9,    9,    9,
      280,  253,    5,    6,   10,   10,   10,   11,  247,   11,
       20,   20,   20,   21,   21,   21,   20,   37,   29,   21,
       20,   29,  200,   21,    3,    4,   29,   26,   26,   26,

      214,  203,   21,   26,  156,   20,  152,   26,   27,   27,
       27,   37,   29,  105,   27,   29,   26,  200,   27,   30,
       29,   44,   44,   44,   56,   30,   56,   21,   30,   20,
       22,   22,   22,   30,   97,   52,   22,   31,   31,   31,
       22,   26,   46,   31,   30,   45,   43,   31,   56,   30,
       56,   91,   30,  102,   39,   22,   18,   30,   22,   32,
       32,   32,   17,   22,   16,   32,   31,  103,  210,   32,
       34,   34,   34,   15,   14,   91,   34,  102,   32,   22,
       34,  148,   22,   57,   57,   57,   57,   22,   23,   34,
       31,  103,   23,  210,   23,   12,  149,   23,   47,   47,

       47,   47,   23,   32,   47,  148,    7,  243,   47,   36,
       36,   36,    2,   23,   34,   36,    0,   23,   23,   36,
      149,   23,    0,  150,   36,    0,   23,   24,    0,   24,
       24,   36,  243,  154,   99,   24,   99,  155,   24,  287,
       48,   48,   48,    0,    0,    0,   48,  150,    0,   36,
       48,   24,   48,   24,   24,    0,   36,  154,   99,   24,
       99,  155,   24,   25,  287,   54,   54,   54,  160,   25,
      160,   54,   25,  201,   25,   54,  202,   25,    0,   55,
       55,   55,  209,  211,  303,   55,  212,  241,   25,   55,
        0,  305,  160,   25,  160,  314,   25,  201,   25,    0,

      202,   25,   28,   28,   28,    0,  209,  211,   28,  303,
      212,  241,   28,   58,   58,   58,  305,    0,  242,   58,
      314,  320,   28,   58,   59,   59,   59,    0,  244,   28,
       59,    0,   60,   28,   59,   60,   58,    0,    0,  207,
       60,  207,  242,  245,   61,   59,  320,   28,  215,  215,
      215,   61,  244,   28,  215,   61,   60,   28,   33,   60,
      249,   58,   33,  207,   60,  207,    0,  245,   33,   61,
       59,   33,    0,    0,  327,   61,   33,    0,   66,   61,
       62,   62,   62,   33,  249,   66,   62,   33,    0,   66,
       62,  251,   33,    0,    0,   33,   65,   65,   65,  327,

       33,   35,   65,   66,   35,  252,   65,   35,  328,   66,
       62,  257,   35,   66,    0,  251,   35,   64,   64,   64,
      275,    0,   65,   64,    0,    0,   35,   64,   35,  252,
        0,   35,   64,  328,   62,  257,   35,   69,   69,   69,
       35,   63,   63,   69,  275,   63,   65,   69,  100,  100,
      100,  100,   63,   67,   67,   67,   63,   64,  332,   67,
        0,    0,    0,   67,  276,    0,   63,   63,  278,   69,
       63,   67,   70,   70,   70,    0,   63,  279,   70,    0,
       63,   71,   70,  332,   71,   73,   73,   73,  276,   71,
        0,   73,  278,   69,    0,   73,   67,   68,   68,   68,

      284,  279,   70,   68,    0,   71,  285,   68,   71,  104,
      104,  104,  104,   71,   68,    0,   68,   72,   72,   72,
       68,   74,    0,   72,  284,    0,   70,   72,   74,  286,
      285,    0,   74,   74,   75,   75,   75,    0,  288,   68,
       75,   68,  301,   76,   75,   68,   74,   76,    0,   72,
       76,    0,   74,  286,    0,   76,   74,   74,  302,   77,
       77,   77,  288,  304,   79,   77,  301,   79,   76,   77,
        0,   76,   79,   72,   76,   78,   78,   78,   80,   76,
       80,   78,  302,    0,   80,   78,    0,  304,   79,    0,
        0,   79,   81,   81,   81,   77,   79,    0,   81,  306,

        0,    0,   81,   80,  308,   80,    0,   78,   82,   80,
       82,    0,  315,   85,   82,    0,   85,  317,    0,   77,
        0,   85,   81,  306,   84,   84,   84,    0,  308,    0,
       84,   78,  319,   82,   84,   82,  315,   85,    0,   82,
       85,  317,   86,    0,   86,   85,   81,   83,   86,   90,
       83,   90,  248,  248,  248,   90,  319,   83,  248,   84,
      326,   83,   83,    0,   83,    0,    0,   86,    0,   86,
        0,    0,   83,   86,   90,   83,   90,    0,    0,    0,
       90,   83,    0,   84,  326,   83,   83,    0,   83,   87,
       87,   87,   88,   88,   88,   87,    0,    0,   88,   87,

        0,    0,   88,   89,   89,   89,  255,  255,  255,   89,
        0,    0,  255,   89,   96,   96,   96,   96,    0,    0,
       96,   88,    0,    0,   96,   98,   98,   98,  106,  106,
      106,   98,    0,   89,  106,   98,    0,  108,  106,  108,
      107,  107,  107,  108,    0,   88,  107,  109,    0,    0,
      107,    0,  110,    0,  109,  107,    0,   89,  109,  110,
      111,    0,  108,  110,  108,    0,  112,  111,  108,  112,
        0,  111,  109,  113,  112,    0,  113,  110,  109,    0,
      107,  113,  109,  110,    0,  111,    0,  110,    0,    0,
      112,  111,    0,  112,    0,  111,    0,  113,  112,    0,

      113,  114,  114,  114,    0,  113,    0,  114,  115,  115,
      115,  114,    0,  117,  115,  117,  114,    0,  115,  117,
      116,  116,  116,    0,    0,  119,  116,  119,    0,  115,
      116,  119,    0,  118,  118,  118,    0,    0,  117,  118,
      117,  114,    0,  118,  117,  120,    0,  120,    0,  116,
      119,  120,  119,    0,  115,    0,  119,  121,  121,  121,
      122,    0,  122,  121,    0,    0,  122,  121,    0,    0,
      120,    0,  120,  116,    0,    0,  120,    0,  123,  123,
      123,    0,    0,    0,  123,  122,    0,  122,  123,  121,
        0,  122,  124,  124,  124,  125,  125,  125,  124,    0,

      126,  125,  124,  126,  127,  125,    0,  127,  126,  128,
      128,  128,  127,  121,    0,  128,    0,    0,  124,  128,
      129,  129,  129,  131,  126,  131,  129,  126,  127,  131,
      129,  127,  126,  130,  130,  130,  127,  132,    0,  130,
      132,    0,  124,  130,    0,  132,  133,    0,  131,  129,
      131,  134,    0,  133,  131,    0,    0,  133,  134,  135,
        0,  132,  134,    0,  132,  130,  135,    0,    0,  132,
      135,  133,  136,  129,    0,  136,  134,  133,    0,    0,
      136,  133,  134,    0,  135,    0,  134,    0,    0,  130,
      135,  137,  137,  137,  135,  138,  136,  137,  138,  136,

        0,  137,  139,  138,  136,  139,  137,    0,    0,    0,
      139,  140,    0,  140,  141,  141,  141,  140,    0,  138,
      141,  143,  138,    0,  141,    0,  139,  138,  143,  139,
        0,  137,  143,  142,  139,  142,  140,    0,  140,  142,
        0,  144,  140,  144,  145,    0,  143,  144,    0,    0,
        0,  145,  143,  141,  147,  145,  143,  147,  142,    0,
      142,    0,  147,  146,  142,    0,  144,    0,  144,  145,
      146,    0,  144,    0,  146,  145,    0,    0,  147,  145,
        0,  147,  151,  151,  151,  151,  147,    0,  146,  153,
      153,  153,    0,    0,  146,  153,    0,    0,  146,  153,

      157,  157,  157,  157,    0,    0,  157,  158,  158,  158,
      157,  162,  163,  158,  159,  159,  159,  158,  162,  163,
      159,    0,  162,  163,  159,  161,  161,  161,  161,  164,
        0,  164,    0,    0,    0,  164,  162,  163,  165,  165,
      165,    0,  162,  163,  165,    0,  162,  163,  165,  166,
        0,    0,  166,    0,  164,    0,  164,  166,    0,    0,
      164,  167,  167,  167,    0,    0,  169,  167,    0,  169,
      165,  167,  175,  166,  169,  175,  166,  168,  168,  168,
      175,  166,  167,  168,  170,    0,    0,  168,    0,    0,
      169,  170,  168,  169,  165,  170,  175,    0,  169,  175,

      171,  171,  171,    0,  175,    0,  171,  167,    0,  170,
      171,    0,  172,  172,  172,  170,  173,  168,  172,  170,
        0,    0,  172,  173,  174,  174,  174,  173,    0,    0,
      174,    0,    0,    0,  174,    0,  176,  176,  176,    0,
        0,  173,  176,    0,    0,    0,  176,  173,  177,  177,
      177,  173,    0,  174,  177,  178,  178,  178,  177,    0,
        0,  178,  179,  179,  179,  178,    0,    0,  179,    0,
      177,    0,  179,  180,  180,  180,    0,  174,    0,  180,
      181,  181,  181,  180,    0,    0,  181,  182,  182,  182,
      181,    0,  183,  182,  183,  177,    0,  182,  183,  184,

      184,  184,  185,  185,  185,  184,    0,  186,  185,  184,
      186,    0,  185,    0,    0,  186,  187,  183,  187,  183,
        0,    0,  187,  183,    0,    0,  188,  188,  188,    0,
        0,  186,  188,    0,  186,    0,  188,    0,    0,  186,
        0,  187,    0,  187,  189,  189,  189,  187,    0,  190,
      189,    0,  190,    0,  189,    0,  188,  190,  191,  191,
      191,  192,  192,  192,  191,    0,    0,  192,  191,    0,
      189,  192,  193,  190,  193,    0,  190,  194,  193,  194,
      188,  190,    0,  194,  208,  208,  208,  208,  191,    0,
        0,  192,    0,    0,  189,    0,    0,  193,    0,  193,

        0,    0,  194,  193,  194,  197,    0,  197,  194,    0,
        0,  197,  191,    0,    0,  192,  195,  195,  195,  196,
      196,  196,  195,    0,    0,  196,  195,    0,    0,  196,
      197,    0,  197,  198,  198,  198,  197,    0,  199,  198,
      199,    0,    0,  198,  199,  204,  204,  204,  204,    0,
        0,  204,  205,  205,  205,  204,    0,    0,  205,    0,
        0,    0,  205,  199,    0,  199,  206,  206,  206,  199,
        0,    0,  206,    0,    0,    0,  206,  213,  213,  213,
      213,  216,  216,  216,  217,  217,  217,  216,    0,    0,
      217,  216,    0,    0,  217,  218,  218,  218,  219,  219,

      219,  218,    0,    0,  219,  218,    0,    0,  219,  220,
      220,  220,    0,  219,    0,  220,  221,  221,  221,  220,
        0,    0,  221,  222,  222,  222,  221,  223,  224,  222,
      223,  224,    0,  222,    0,  223,  224,    0,  219,  220,
      225,  225,  225,  256,  256,  256,  225,    0,    0,  256,
      225,  223,  224,  222,  223,  224,  226,  226,  226,  223,
      224,    0,  226,  220,    0,  229,  226,  229,  227,  227,
      227,  229,    0,    0,  227,    0,    0,  222,  227,  228,
      228,  228,    0,    0,    0,  228,    0,    0,  226,  228,
      229,    0,  229,  230,  230,  230,  229,    0,    0,  230,

      227,    0,    0,  230,  231,  231,  231,  232,  232,  232,
      231,  235,  226,  232,  231,    0,    0,  232,  235,    0,
        0,    0,  235,  230,  227,  232,  233,  236,  233,  234,
      234,  234,  233,    0,  236,  234,  235,    0,  236,  234,
      237,    0,  235,  237,    0,    0,  235,  230,  237,    0,
      232,  233,  236,  233,  282,  282,  282,  233,  236,    0,
      282,  234,  236,    0,  237,    0,  239,  237,  238,  238,
      238,    0,  237,  239,  238,    0,    0,  239,  238,    0,
      240,  240,  240,    0,    0,  234,  240,    0,    0,    0,
      240,  239,  246,  246,  246,  246,    0,  239,    0,    0,

      238,  239,  254,  254,  254,  254,  258,    0,  254,  259,
      259,  259,    0,  258,    0,  259,    0,  258,    0,  259,
      260,  263,  260,  263,  238,    0,  260,  263,  261,  261,
      261,  258,  262,    0,  261,    0,    0,  258,  261,  262,
        0,  258,    0,  262,    0,  260,  263,  260,  263,    0,
        0,  260,  263,  283,  283,  283,  264,  262,  264,  283,
      261,    0,  264,  262,  265,  265,  265,  262,    0,    0,
      265,    0,    0,    0,  265,    0,  266,  266,  266,    0,
        0,  264,  266,  264,  261,    0,  266,  264,  267,  267,
      267,  268,  268,  268,  267,    0,    0,  268,  267,    0,

        0,  268,  266,  269,  269,  269,  270,  270,  270,  269,
        0,    0,  270,  269,  272,    0,  270,  272,  271,    0,
      271,    0,  272,    0,  271,    0,  266,  273,  273,  273,
      274,  274,  274,  273,    0,    0,  274,  273,  272,    0,
      274,  272,  269,  271,    0,  271,  272,    0,    0,  271,
        0,  274,  281,  281,  281,  281,    0,    0,  281,  289,
      289,  289,  290,  290,  290,  289,    0,    0,  290,  289,
        0,    0,  290,  291,  291,  291,  274,    0,    0,  291,
      292,  292,  292,  291,  293,    0,  292,  293,    0,    0,
      292,  289,  293,  294,  294,  294,  295,  295,  295,  294,

        0,  296,  295,  294,  296,    0,  295,    0,  293,  296,
        0,  293,  292,  298,    0,  289,  293,  297,  297,  297,
      298,    0,    0,  297,  298,  296,    0,  297,  296,  299,
      299,  299,    0,  296,    0,  299,  292,    0,  298,  299,
      309,  309,  309,  310,  298,  310,  309,  311,  298,  310,
      309,    0,    0,    0,  311,    0,    0,    0,  311,  312,
        0,  312,    0,    0,    0,  312,    0,  321,  310,  321,
      310,    0,  311,  321,  310,  313,  313,  313,  311,    0,
        0,  313,  311,    0,  312,  313,  312,  322,  322,  322,
      312,    0,  321,  322,  321,    0,    0,  322,  321,  323,

      323,  323,  324,  324,  324,  323,    0,  313,  324,  323,
        0,    0,  324,  330,    0,    0,    0,  323,    0,    0,
      330,    0,    0,    0,  330,    0,  331,  331,  331,    0,
        0,  313,  331,  335,  335,  335,  331,    0,  330,  335,
        0,    0,  323,  335,  330,    0,    0,    0,  330,  338,
      338,  338,  338,  338,  338,  338,  338,  339,  339,  339,
      339,  339,  339,  339,  339,  340,  340,  340,  340,  340,
      340,  340,  340,  341,  341,  341,    0,  341,    0,  341,
      342,  342,  342,  342,  342,  342,    0,  342,  343,  343,
        0,  343,  343,  343,  343,  343,  344,  344,  344,  344,

      344,  344,  344,  344,  345,  345,    0,    0,  345,  345,
      345,  345,  346,  346,  346,  346,  347,  347,  347,  347,
      348,  348,  348,  348,  348,  348,  348,  348,  349,  349,
      349,    0,  349,    0,  349,  350,  350,  350,  350,  350,
      350,  350,  350,  351,  351,  351,    0,  351,    0,  351,
      352,  352,  352,  352,  353,  353,  353,  353,  354,  354,
      354,  354,  354,  354,  354,  354,  355,  355,  355,    0,
      355,  356,  356,  356,  356,  356,  356,  356,  356,  357,
      357,  357,    0,  357,  337,  337,  337,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337,  337,  337,  337,

      337,  337,  337,  337,  337,  337,  337,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337,  337,  337,  337,
      337,  337,  337,  337,  337,  337,  337,  337
    } ;

static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;

extern int plpgsql_base_yy_flex_debug;
int plpgsql_base_yy_flex_debug = 0;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *plpgsql_base_yytext;
#line 1 "scan.l"
#line 2 "scan.l"
/**********************************************************************
 * scan.l		- Scanner for the PL/pgSQL
 *			  procedural language
 *
 * IDENTIFICATION
 *    $Header: /cvsroot/pgsql/src/pl/plpgsql/src/scan.l,v 1.29 2003/07/25 23:37:29 tgl Exp $
 *
 *    This software is copyrighted by Jan Wieck - Hamburg.
 *
 *    The author hereby grants permission  to  use,  copy,  modify,
 *    distribute,  and  license this software and its documentation
 *    for any purpose, provided that existing copyright notices are
 *    retained  in  all  copies  and  that  this notice is included
 *    verbatim in any distributions. No written agreement, license,
 *    or  royalty  fee  is required for any of the authorized uses.
 *    Modifications to this software may be  copyrighted  by  their
 *    author  and  need  not  follow  the licensing terms described
 *    here, provided that the new terms are  clearly  indicated  on
 *    the first page of each file where they apply.
 *
 *    IN NO EVENT SHALL THE AUTHOR OR DISTRIBUTORS BE LIABLE TO ANY
 *    PARTY  FOR  DIRECT,   INDIRECT,   SPECIAL,   INCIDENTAL,   OR
 *    CONSEQUENTIAL   DAMAGES  ARISING  OUT  OF  THE  USE  OF  THIS
 *    SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN
 *    IF  THE  AUTHOR  HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
 *    DAMAGE.
 *
 *    THE  AUTHOR  AND  DISTRIBUTORS  SPECIFICALLY   DISCLAIM   ANY
 *    WARRANTIES,  INCLUDING,  BUT  NOT  LIMITED  TO,  THE  IMPLIED
 *    WARRANTIES  OF  MERCHANTABILITY,  FITNESS  FOR  A  PARTICULAR
 *    PURPOSE,  AND NON-INFRINGEMENT.  THIS SOFTWARE IS PROVIDED ON
 *    AN "AS IS" BASIS, AND THE AUTHOR  AND  DISTRIBUTORS  HAVE  NO
 *    OBLIGATION   TO   PROVIDE   MAINTENANCE,   SUPPORT,  UPDATES,
 *    ENHANCEMENTS, OR MODIFICATIONS.
 *
 **********************************************************************/

#include "plpgsql.h"


/* No reason to constrain amount of data slurped */
#define YY_READ_BUF_SIZE 16777216

/* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */
#define fprintf(file, fmt, msg)  ereport(ERROR, (errmsg_internal("%s", msg)))

/* Handles to the buffer that the lexer uses internally */
static YY_BUFFER_STATE scanbufhandle;
static char *scanbuf;

static int	scanner_functype;
static int	scanner_typereported;
static int	pushback_token;
static bool have_pushback_token;
static int	lookahead_token;	
static bool have_lookahead_token;
static const char *cur_line_start;
static int	cur_line_num;

int	plpgsql_SpaceScanned = 0;

#line 1144 "pl_scan.c"

#define INITIAL 0
#define IN_STRING 1
#define IN_COMMENT 2

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

#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif

static int yy_init_globals (void );

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

int plpgsql_base_yylex_destroy (void );

int plpgsql_base_yyget_debug (void );

void plpgsql_base_yyset_debug (int debug_flag  );

YY_EXTRA_TYPE plpgsql_base_yyget_extra (void );

void plpgsql_base_yyset_extra (YY_EXTRA_TYPE user_defined  );

FILE *plpgsql_base_yyget_in (void );

void plpgsql_base_yyset_in  (FILE * in_str  );

FILE *plpgsql_base_yyget_out (void );

void plpgsql_base_yyset_out  (FILE * out_str  );

int plpgsql_base_yyget_leng (void );

char *plpgsql_base_yyget_text (void );

int plpgsql_base_yyget_lineno (void );

void plpgsql_base_yyset_lineno (int line_number  );

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

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

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

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

#ifndef YY_NO_INPUT

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

#endif

/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192
#endif

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO fwrite( plpgsql_base_yytext, plpgsql_base_yyleng, 1, plpgsql_base_yyout )
#endif

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		int n; \
		for ( n = 0; n < max_size && \
			     (c = getc( plpgsql_base_yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( plpgsql_base_yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = fread(buf, 1, max_size, plpgsql_base_yyin))==0 && ferror(plpgsql_base_yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
			clearerr(plpgsql_base_yyin); \
			} \
		}\
\

#endif

/* No semi-colon after return; correct usage is to write "yyterminate();" -
 * we don't want an extra ';' after the "return" because that will cause
 * some compilers to complain about unreachable statements.
 */
#ifndef yyterminate
#define yyterminate() return YY_NULL
#endif

/* Number of entries by which start-condition stack grows. */
#ifndef YY_START_STACK_INCR
#define YY_START_STACK_INCR 25
#endif

/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
#endif

/* end tables serialization structures and prototypes */

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1

extern int plpgsql_base_yylex (void);

#define YY_DECL int plpgsql_base_yylex (void)
#endif /* !YY_DECL */

/* Code executed at the beginning of each rule, after plpgsql_base_yytext and plpgsql_base_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 \
	if ( plpgsql_base_yyleng > 0 ) \
		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
				(plpgsql_base_yytext[plpgsql_base_yyleng - 1] == '\n'); \
	YY_USER_ACTION

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

    /* ----------
     * Local variables in scanner to remember where
     * a string or comment started
     * ----------
     */
    int	start_lineno = 0;
	char *start_charpos = NULL;

    /* ----------
     * Reset the state when entering the scanner
     * ----------
     */
    BEGIN INITIAL;
    plpgsql_SpaceScanned = 0;

    /* ----------
     * On the first call to a new source report the
     * functions type (T_FUNCTION or T_TRIGGER)
     * ----------
     */
	if (!scanner_typereported)
	{
		scanner_typereported = 1;
		return scanner_functype;
	}

    /* ----------
     * The keyword rules
     * ----------
     */
#line 1361 "pl_scan.c"

	if ( !(yy_init) )
		{
		(yy_init) = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

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

		if ( ! plpgsql_base_yyin )
			plpgsql_base_yyin = stdin;

		if ( ! plpgsql_base_yyout )
			plpgsql_base_yyout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {
			plpgsql_base_yyensure_buffer_stack ();
			YY_CURRENT_BUFFER_LVALUE =
				plpgsql_base_yy_create_buffer(plpgsql_base_yyin,YY_BUF_SIZE );
		}

		plpgsql_base_yy_load_buffer_state( );
		}

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

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

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

		yy_current_state = (yy_start);
		yy_current_state += YY_AT_BOL();
yy_match:
		do
			{
			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
			if ( yy_accept[yy_current_state] )
				{
				(yy_last_accepting_state) = yy_current_state;
				(yy_last_accepting_cpos) = yy_cp;
				}
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 338 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
			++yy_cp;
			}
		while ( yy_current_state != 337 );
		yy_cp = (yy_last_accepting_cpos);
		yy_current_state = (yy_last_accepting_state);

yy_find_action:
		yy_act = yy_accept[yy_current_state];

		YY_DO_BEFORE_ACTION;

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

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

case 1:
YY_RULE_SETUP
#line 117 "scan.l"
{ return K_ASSIGN;			}
	YY_BREAK
case 2:
YY_RULE_SETUP
#line 118 "scan.l"
{ return K_ASSIGN;			}
	YY_BREAK
case 3:
YY_RULE_SETUP
#line 119 "scan.l"
{ return K_DOTDOT;			}
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 120 "scan.l"
{ return K_ALIAS;			}
	YY_BREAK
case 5:
YY_RULE_SETUP
#line 121 "scan.l"
{ return K_BEGIN;			}
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 122 "scan.l"
{ return K_CLOSE;			}
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 123 "scan.l"
{ return K_CONSTANT;		}
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 124 "scan.l"
{ return K_CURSOR;			}
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 125 "scan.l"
{ return K_DEBUG;			}
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 126 "scan.l"
{ return K_DECLARE;			}
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 127 "scan.l"
{ return K_DEFAULT;			}
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 128 "scan.l"
{ return K_DIAGNOSTICS;		}
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 129 "scan.l"
{ return K_ELSE;			}
	YY_BREAK
case 14:
YY_RULE_SETUP
#line 130 "scan.l"
{ return K_ELSIF;           }
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 131 "scan.l"
{ return K_END;				}
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 132 "scan.l"
{ return K_EXCEPTION;		}
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 133 "scan.l"
{ return K_EXECUTE;			}
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 134 "scan.l"
{ return K_EXIT;			}
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 135 "scan.l"
{ return K_FETCH;			}
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 136 "scan.l"
{ return K_FOR;				}
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 137 "scan.l"
{ return K_FROM;			}
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 138 "scan.l"
{ return K_GET;				}
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 139 "scan.l"
{ return K_IF;				}
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 140 "scan.l"
{ return K_IN;				}
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 141 "scan.l"
{ return K_INFO;			}
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 142 "scan.l"
{ return K_INTO;			}
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 143 "scan.l"
{ return K_IS;				}
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 144 "scan.l"
{ return K_LOG;				}
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 145 "scan.l"
{ return K_LOOP;			}
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 146 "scan.l"
{ return K_NEXT;			}
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 147 "scan.l"
{ return K_NOT;				}
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 148 "scan.l"
{ return K_NOTICE;			}
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 149 "scan.l"
{ return K_NULL;			}
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 150 "scan.l"
{ return K_OPEN;			}
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 151 "scan.l"
{ return K_PERFORM;			}
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 152 "scan.l"
{ return K_RAISE;			}
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 153 "scan.l"
{ return K_RECORD;			}
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 154 "scan.l"
{ return K_RENAME;			}
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 155 "scan.l"
{ return K_RESULT_OID;		}
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 156 "scan.l"
{ return K_RETURN;			}
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 157 "scan.l"
{ return K_REVERSE;			}
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 158 "scan.l"
{ return K_ROW_COUNT;		}
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 159 "scan.l"
{ return K_SELECT;			}
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 160 "scan.l"
{ return K_THEN;			}
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 161 "scan.l"
{ return K_TO;				}
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 162 "scan.l"
{ return K_TYPE;			}
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 163 "scan.l"
{ return K_WARNING;			}
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 164 "scan.l"
{ return K_WHEN;			}
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 165 "scan.l"
{ return K_WHILE;			}
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 167 "scan.l"
{ return O_OPTION;			}
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 168 "scan.l"
{ return O_DUMP;			}
	YY_BREAK
/* ----------
     * Special word rules
	 *
	 * We set plpgsql_error_lineno in each rule so that errors reported
	 * in the pl_comp.c subroutines will point to the right place.
     * ----------
     */
case 52:
/* rule 52 can match eol */
YY_RULE_SETUP
#line 178 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_word(plpgsql_base_yytext); }
	YY_BREAK
case 53:
/* rule 53 can match eol */
YY_RULE_SETUP
#line 181 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_dblword(plpgsql_base_yytext); }
	YY_BREAK
case 54:
/* rule 54 can match eol */
YY_RULE_SETUP
#line 184 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_tripword(plpgsql_base_yytext); }
	YY_BREAK
case 55:
/* rule 55 can match eol */
YY_RULE_SETUP
#line 187 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_wordtype(plpgsql_base_yytext); }
	YY_BREAK
case 56:
/* rule 56 can match eol */
YY_RULE_SETUP
#line 190 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_dblwordtype(plpgsql_base_yytext); }
	YY_BREAK
case 57:
/* rule 57 can match eol */
YY_RULE_SETUP
#line 193 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_tripwordtype(plpgsql_base_yytext); }
	YY_BREAK
case 58:
/* rule 58 can match eol */
YY_RULE_SETUP
#line 196 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_wordrowtype(plpgsql_base_yytext); }
	YY_BREAK
case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
#line 199 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_dblwordrowtype(plpgsql_base_yytext); }
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 202 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_word(plpgsql_base_yytext); }
	YY_BREAK
case 61:
/* rule 61 can match eol */
YY_RULE_SETUP
#line 205 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_dblword(plpgsql_base_yytext); }
	YY_BREAK
case 62:
/* rule 62 can match eol */
YY_RULE_SETUP
#line 208 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_tripword(plpgsql_base_yytext); }
	YY_BREAK
case 63:
/* rule 63 can match eol */
YY_RULE_SETUP
#line 211 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_wordtype(plpgsql_base_yytext); }
	YY_BREAK
case 64:
/* rule 64 can match eol */
YY_RULE_SETUP
#line 214 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_dblwordtype(plpgsql_base_yytext); }
	YY_BREAK
case 65:
/* rule 65 can match eol */
YY_RULE_SETUP
#line 217 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_tripwordtype(plpgsql_base_yytext); }
	YY_BREAK
case 66:
/* rule 66 can match eol */
YY_RULE_SETUP
#line 220 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_wordrowtype(plpgsql_base_yytext); }
	YY_BREAK
case 67:
/* rule 67 can match eol */
YY_RULE_SETUP
#line 223 "scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_dblwordrowtype(plpgsql_base_yytext); }
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 227 "scan.l"
{ return T_NUMBER;			}
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 229 "scan.l"
{
				plpgsql_error_lineno = plpgsql_scanner_lineno();
				ereport(ERROR,
						(errcode(ERRCODE_DATATYPE_MISMATCH),
						 errmsg("unterminated quoted identifier")));
			}
	YY_BREAK
/* ----------
     * Ignore whitespaces but remember this happened
     * ----------
     */
case 70:
/* rule 70 can match eol */
YY_RULE_SETUP
#line 240 "scan.l"
{ plpgsql_SpaceScanned = 1;		}
	YY_BREAK
/* ----------
     * Eat up comments
     * ----------
     */
case 71:
YY_RULE_SETUP
#line 246 "scan.l"
;
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 248 "scan.l"
{ start_lineno = plpgsql_scanner_lineno();
			  BEGIN IN_COMMENT;
			}
	YY_BREAK
case 73:
YY_RULE_SETUP
#line 251 "scan.l"
{ BEGIN INITIAL; plpgsql_SpaceScanned = 1; }
	YY_BREAK
case 74:
/* rule 74 can match eol */
YY_RULE_SETUP
#line 252 "scan.l"
;
	YY_BREAK
case 75:
YY_RULE_SETUP
#line 253 "scan.l"
;
	YY_BREAK
case YY_STATE_EOF(IN_COMMENT):
#line 254 "scan.l"
{
				plpgsql_error_lineno = start_lineno;
				ereport(ERROR,
						(errcode(ERRCODE_DATATYPE_MISMATCH),
						 errmsg("unterminated comment")));
			}
	YY_BREAK
/* ----------
     * Collect anything inside of ''s and return one STRING
	 *
	 * Hacking plpgsql_base_yytext/plpgsql_base_yyleng here lets us avoid using yymore(), which is
	 * a win for performance.  It's safe because we know the underlying
	 * input buffer is not changing.
     * ----------
     */
case 76:
YY_RULE_SETUP
#line 269 "scan.l"
{
			  start_lineno = plpgsql_scanner_lineno();
			  start_charpos = plpgsql_base_yytext;
			  BEGIN IN_STRING;
			}
	YY_BREAK
case 77:
YY_RULE_SETUP
#line 274 "scan.l"
{ }
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 275 "scan.l"
{ }
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 276 "scan.l"
{
			  plpgsql_base_yyleng -= (plpgsql_base_yytext - start_charpos);
			  plpgsql_base_yytext = start_charpos;
			  BEGIN INITIAL;
			  return T_STRING;
			}
	YY_BREAK
case YY_STATE_EOF(IN_STRING):
#line 282 "scan.l"
{
				plpgsql_error_lineno = start_lineno;
				ereport(ERROR,
						(errcode(ERRCODE_DATATYPE_MISMATCH),
						 errmsg("unterminated string")));
			}
	YY_BREAK
case 80:
/* rule 80 can match eol */
YY_RULE_SETUP
#line 288 "scan.l"
{ }
	YY_BREAK
/* ----------
     * Any unmatched character is returned as is
     * ----------
     */
case 81:
YY_RULE_SETUP
#line 294 "scan.l"
{ return plpgsql_base_yytext[0];			}
	YY_BREAK
case 82:
YY_RULE_SETUP
#line 296 "scan.l"
ECHO;
	YY_BREAK
#line 1962 "pl_scan.c"
case YY_STATE_EOF(INITIAL):
	yyterminate();

	case YY_END_OF_BUFFER:
		{
		/* Amount of text matched not including the EOB char. */
		int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;

		/* Undo the effects of YY_DO_BEFORE_ACTION. */
		*yy_cp = (yy_hold_char);
		YY_RESTORE_YY_MORE_OFFSET

		if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
			{
			/* We're scanning a new file or input source.  It's
			 * possible that this happened because the user
			 * just pointed plpgsql_base_yyin at a new source and called
			 * plpgsql_base_yylex().  If so, then we have to assure
			 * consistency between YY_CURRENT_BUFFER and our
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */
			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = plpgsql_base_yyin;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
			}

		/* Note that here we test for yy_c_buf_p "<=" to the position
		 * of the first EOB in the buffer, since yy_c_buf_p will
		 * already have been incremented past the NUL character
		 * (since all states make transitions on EOB to the
		 * end-of-buffer state).  Contrast this with the test
		 * in input().
		 */
		if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
			{ /* This was really a NUL. */
			yy_state_type yy_next_state;

			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state(  );

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

			yy_next_state = yy_try_NUL_trans( yy_current_state );

			yy_bp = (yytext_ptr) + YY_MORE_ADJ;

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

			else
				{
				yy_cp = (yy_last_accepting_cpos);
				yy_current_state = (yy_last_accepting_state);
				goto yy_find_action;
				}
			}

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

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

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

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

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

				yy_current_state = yy_get_previous_state(  );

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

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

				yy_current_state = yy_get_previous_state(  );

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

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

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

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

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

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

	/* Try to read more data. */

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

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

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

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

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

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

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

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

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

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

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

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

			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

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

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	if ( (yy_n_chars) == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			plpgsql_base_yyrestart(plpgsql_base_yyin  );
			}

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

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

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

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

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

	return ret_val;
}

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

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

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

	return yy_current_state;
}

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

	register YY_CHAR yy_c = 1;
	if ( yy_accept[yy_current_state] )
		{
		(yy_last_accepting_state) = yy_current_state;
		(yy_last_accepting_cpos) = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 338 )
			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 == 337);

	return yy_is_jam ? 0 : yy_current_state;
}

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

{
	int c;
    
	*(yy_c_buf_p) = (yy_hold_char);

	if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
		{
		/* yy_c_buf_p now points to the character we want to return.
		 * If this occurs *before* the EOB characters, then it's a
		 * valid NUL; if not, then we've hit the end of the buffer.
		 */
		if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
			/* This was really a NUL. */
			*(yy_c_buf_p) = '\0';

		else
			{ /* need more input */
			int offset = (yy_c_buf_p) - (yytext_ptr);
			++(yy_c_buf_p);

			switch ( yy_get_next_buffer(  ) )
				{
				case EOB_ACT_LAST_MATCH:
					/* This happens because yy_g_n_b()
					 * sees that we've accumulated a
					 * token and flags that we need to
					 * try matching the token before
					 * proceeding.  But for input(),
					 * there's no matching to consider.
					 * So convert the EOB_ACT_LAST_MATCH
					 * to EOB_ACT_END_OF_FILE.
					 */

					/* Reset buffer status. */
					plpgsql_base_yyrestart(plpgsql_base_yyin );

					/*FALLTHROUGH*/

				case EOB_ACT_END_OF_FILE:
					{
					if ( plpgsql_base_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 plpgsql_base_yytext */
	(yy_hold_char) = *++(yy_c_buf_p);

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

	return c;
}
#endif	/* ifndef YY_NO_INPUT */

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * 
 * @note This function does not reset the start condition to @c INITIAL .
 */
    void plpgsql_base_yyrestart  (FILE * input_file )
{
    
	if ( ! YY_CURRENT_BUFFER ){
        plpgsql_base_yyensure_buffer_stack ();
		YY_CURRENT_BUFFER_LVALUE =
            plpgsql_base_yy_create_buffer(plpgsql_base_yyin,YY_BUF_SIZE );
	}

	plpgsql_base_yy_init_buffer(YY_CURRENT_BUFFER,input_file );
	plpgsql_base_yy_load_buffer_state( );
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * 
 */
    void plpgsql_base_yy_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
{
    
	/* TODO. We should be able to replace this entire function body
	 * with
	 *		plpgsql_base_yypop_buffer_state();
	 *		plpgsql_base_yypush_buffer_state(new_buffer);
     */
	plpgsql_base_yyensure_buffer_stack ();
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*(yy_c_buf_p) = (yy_hold_char);
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	plpgsql_base_yy_load_buffer_state( );

	/* We don't actually know whether we did this switch during
	 * EOF (plpgsql_base_yywrap()) processing, but the only time this flag
	 * is looked at is after plpgsql_base_yywrap() is called, so it's safe
	 * to go ahead and always set it.
	 */
	(yy_did_buffer_switch_on_eof) = 1;
}

static void plpgsql_base_yy_load_buffer_state  (void)
{
    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	plpgsql_base_yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
	(yy_hold_char) = *(yy_c_buf_p);
}

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * 
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE plpgsql_base_yy_create_buffer  (FILE * file, int  size )
{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) plpgsql_base_yyalloc(sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in plpgsql_base_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 *) plpgsql_base_yyalloc(b->yy_buf_size + 2  );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in plpgsql_base_yy_create_buffer()" );

	b->yy_is_our_buffer = 1;

	plpgsql_base_yy_init_buffer(b,file );

	return b;
}

/** Destroy the buffer.
 * @param b a buffer created with plpgsql_base_yy_create_buffer()
 * 
 */
    void plpgsql_base_yy_delete_buffer (YY_BUFFER_STATE  b )
{
    
	if ( ! b )
		return;

	if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
		YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;

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

	plpgsql_base_yyfree((void *) b  );
}

/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a plpgsql_base_yyrestart() or at EOF.
 */
    static void plpgsql_base_yy_init_buffer  (YY_BUFFER_STATE  b, FILE * file )

{
	int oerrno = errno;
    
	plpgsql_base_yy_flush_buffer(b );

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

    /* If b is the current buffer, then plpgsql_base_yy_init_buffer was _probably_
     * called from plpgsql_base_yyrestart() or through yy_get_next_buffer.
     * In that case, we don't want to reset the lineno or column.
     */
    if (b != YY_CURRENT_BUFFER){
        b->yy_bs_lineno = 1;
        b->yy_bs_column = 0;
    }

        b->yy_is_interactive = 0;
    
	errno = oerrno;
}

/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
 * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
 * 
 */
    void plpgsql_base_yy_flush_buffer (YY_BUFFER_STATE  b )
{
    	if ( ! b )
		return;

	b->yy_n_chars = 0;

	/* We always need two end-of-buffer characters.  The first causes
	 * a transition to the end-of-buffer state.  The second causes
	 * a jam in that state.
	 */
	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;

	b->yy_buf_pos = &b->yy_ch_buf[0];

	b->yy_at_bol = 1;
	b->yy_buffer_status = YY_BUFFER_NEW;

	if ( b == YY_CURRENT_BUFFER )
		plpgsql_base_yy_load_buffer_state( );
}

/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  
 */
void plpgsql_base_yypush_buffer_state (YY_BUFFER_STATE new_buffer )
{
    	if (new_buffer == NULL)
		return;

	plpgsql_base_yyensure_buffer_stack();

	/* This block is copied from plpgsql_base_yy_switch_to_buffer. */
	if ( YY_CURRENT_BUFFER )
		{
		/* Flush out information for old buffer. */
		*(yy_c_buf_p) = (yy_hold_char);
		YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	/* Only push if top exists. Otherwise, replace top. */
	if (YY_CURRENT_BUFFER)
		(yy_buffer_stack_top)++;
	YY_CURRENT_BUFFER_LVALUE = new_buffer;

	/* copied from plpgsql_base_yy_switch_to_buffer. */
	plpgsql_base_yy_load_buffer_state( );
	(yy_did_buffer_switch_on_eof) = 1;
}

/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  
 */
void plpgsql_base_yypop_buffer_state (void)
{
    	if (!YY_CURRENT_BUFFER)
		return;

	plpgsql_base_yy_delete_buffer(YY_CURRENT_BUFFER );
	YY_CURRENT_BUFFER_LVALUE = NULL;
	if ((yy_buffer_stack_top) > 0)
		--(yy_buffer_stack_top);

	if (YY_CURRENT_BUFFER) {
		plpgsql_base_yy_load_buffer_state( );
		(yy_did_buffer_switch_on_eof) = 1;
	}
}

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void plpgsql_base_yyensure_buffer_stack (void)
{
	int num_to_alloc;
    
	if (!(yy_buffer_stack)) {

		/* First allocation is just for 2 elements, since we don't know if this
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
		 * immediate realloc on the next call.
         */
		num_to_alloc = 1;
		(yy_buffer_stack) = (struct yy_buffer_state**)plpgsql_base_yyalloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in plpgsql_base_yyensure_buffer_stack()" );
								  
		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
				
		(yy_buffer_stack_max) = num_to_alloc;
		(yy_buffer_stack_top) = 0;
		return;
	}

	if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){

		/* Increase the buffer to prepare for a possible push. */
		int grow_size = 8 /* arbitrary grow size */;

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

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

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

	b = (YY_BUFFER_STATE) plpgsql_base_yyalloc(sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in plpgsql_base_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;

	plpgsql_base_yy_switch_to_buffer(b  );

	return b;
}

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

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

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

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

	b = plpgsql_base_yy_scan_buffer(buf,n );
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in plpgsql_base_yy_scan_bytes()" );

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

	return b;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

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

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

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

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

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

/** Get the input stream.
 * 
 */
FILE *plpgsql_base_yyget_in  (void)
{
        return plpgsql_base_yyin;
}

/** Get the output stream.
 * 
 */
FILE *plpgsql_base_yyget_out  (void)
{
        return plpgsql_base_yyout;
}

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

/** Get the current token.
 * 
 */

char *plpgsql_base_yyget_text  (void)
{
        return plpgsql_base_yytext;
}

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

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

void plpgsql_base_yyset_out (FILE *  out_str )
{
        plpgsql_base_yyout = out_str ;
}

int plpgsql_base_yyget_debug  (void)
{
        return plpgsql_base_yy_flex_debug;
}

void plpgsql_base_yyset_debug (int  bdebug )
{
        plpgsql_base_yy_flex_debug = bdebug ;
}

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

    (yy_buffer_stack) = 0;
    (yy_buffer_stack_top) = 0;
    (yy_buffer_stack_max) = 0;
    (yy_c_buf_p) = (char *) 0;
    (yy_init) = 0;
    (yy_start) = 0;

/* Defined in main.c */
#ifdef YY_STDINIT
    plpgsql_base_yyin = stdin;
    plpgsql_base_yyout = stdout;
#else
    plpgsql_base_yyin = (FILE *) 0;
    plpgsql_base_yyout = (FILE *) 0;
#endif

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

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

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

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

    return 0;
}

/*
 * Internal utility routines.
 */

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

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

	return n;
}
#endif

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

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

void plpgsql_base_yyfree (void * ptr )
{
	free( (char *) ptr );	/* see plpgsql_base_yyrealloc() for (char *) cast */
}

#define YYTABLES_NAME "yytables"

#line 296 "scan.l"




/*
 * This is the plpgsql_base_yylex routine called from outside. It exists to provide
 * a pushback facility, as well as to allow us to parse syntax that
 * requires more than one token of lookahead.
 */
int
plpgsql_yylex(void)
{
	int cur_token;

	if (have_pushback_token)
	{
		have_pushback_token = false;
		cur_token = pushback_token;
	}
	else if (have_lookahead_token)
	{
		have_lookahead_token = false;
		cur_token = lookahead_token;
	}
	else
		cur_token = plpgsql_base_yylex();

	/* Do we need to look ahead for a possible multiword token? */
	switch (cur_token)
	{
		/* RETURN NEXT must be reduced to a single token */
		case K_RETURN:
			if (!have_lookahead_token)
			{
				lookahead_token = plpgsql_base_yylex();
				have_lookahead_token = true;
			}
			if (lookahead_token == K_NEXT)
			{
				have_lookahead_token = false;
				cur_token = K_RETURN_NEXT;
			}
			break;

		default:
			break;
	}

	return cur_token;
}

/*
 * Push back a single token to be re-read by next plpgsql_yylex() call.
 */
void
plpgsql_push_back_token(int token)
{
	if (have_pushback_token)
		elog(ERROR, "cannot push back multiple tokens");
	pushback_token = token;
	have_pushback_token = true;
}

/*
 * Get the line number at which the current token ends.  This substitutes
 * for flex's very poorly implemented plpgsql_base_yylineno facility.
 *
 * We assume that flex has written a '\0' over the character following the
 * current token in scanbuf.  So, we just have to count the '\n' characters
 * before that.  We optimize this a little by keeping track of the last
 * '\n' seen so far.
 */
int
plpgsql_scanner_lineno(void)
{
	const char *c;

	while ((c = strchr(cur_line_start, '\n')) != NULL)
	{
		cur_line_start = c + 1;
		cur_line_num++;
	}
	return cur_line_num;
}

/*
 * Called before any actual parsing is done
 */
void
plpgsql_scanner_init(const char *str, int functype)
{
	Size	slen;

	/*----------
	 * Hack: skip any initial newline, so that in the common coding layout
	 *		CREATE FUNCTION ... AS '
	 *			code body
	 *		' LANGUAGE 'plpgsql';
	 * we will think "line 1" is what the programmer thinks of as line 1.
	 *----------
	 */
    if (*str == '\r')
        str++;
    if (*str == '\n')
        str++;

	slen = strlen(str);

	/*
	 * Might be left over after ereport()
	 */
	if (YY_CURRENT_BUFFER)
		plpgsql_base_yy_delete_buffer(YY_CURRENT_BUFFER);

	/*
	 * Make a scan buffer with special termination needed by flex.
	 */
	scanbuf = palloc(slen + 2);
	memcpy(scanbuf, str, slen);
	scanbuf[slen] = scanbuf[slen + 1] = YY_END_OF_BUFFER_CHAR;
	scanbufhandle = plpgsql_base_yy_scan_buffer(scanbuf,slen + 2);

	/* Other setup */
    scanner_functype     = functype;
    scanner_typereported = 0;

	have_pushback_token = false;
	have_lookahead_token = false;

	cur_line_start = scanbuf;
	cur_line_num = 1;

	BEGIN(INITIAL);
}


/*
 * Called after parsing is done to clean up after plpgsql_scanner_init()
 */
void
plpgsql_scanner_finish(void)
{
	plpgsql_base_yy_delete_buffer(scanbufhandle);
	pfree(scanbuf);
}

