#line 2 "/build/postgresql/build/../src/pl/plpgsql/src/pl_scan.c"

#line 4 "/build/postgresql/build/../src/pl/plpgsql/src/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;

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

#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
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 * Ditto for the __ia64__ case accordingly.
 */
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif

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

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

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 97
#define YY_END_OF_BUFFER 98
/* 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[393] =
    {   0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
       98,   96,   73,   73,   96,   96,   80,   96,   96,   96,
       71,   96,    2,   55,   55,   55,   55,   55,   55,   55,
       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
       55,   55,   96,   77,   79,   78,   86,   86,   82,   89,
       85,   82,   93,   93,   95,   73,   72,    0,   55,   90,
       63,   91,   73,    3,   74,   71,    1,    0,   55,    0,
        0,   55,   55,    6,   55,   55,   55,   55,   55,   55,
       55,   81,   55,   55,   55,   55,   55,   55,   55,   26,
       27,   30,   55,   55,   55,   55,   55,   37,   55,   55,

       55,   55,   55,   55,   55,   48,   55,   55,   55,    0,
       77,   79,   76,   75,   78,   86,   82,   82,   84,   83,
       87,   85,   93,   92,   94,   55,    0,    0,    0,    0,
       91,   73,    0,    0,    0,    0,   56,   55,   55,   55,
       55,   55,   55,   55,   55,   55,   55,   55,   18,   55,
       55,   55,   55,   23,   55,   25,   55,   55,   55,   55,
        0,   34,   55,   55,   55,   55,   55,   55,   55,   55,
       55,   55,   55,   55,   55,   55,   55,   55,    0,   82,
       88,   83,   82,   94,    0,    0,    0,    0,   64,    0,
        0,    0,   56,    0,   56,    0,    0,   55,   55,    7,

       55,   55,   55,   55,   55,   55,   55,   54,   15,   55,
       55,   55,   21,   55,   24,   55,   29,   31,   32,    0,
       35,   36,   55,   55,   55,   55,   55,   55,   55,   55,
       55,   47,   49,   55,   51,   55,    0,   82,   82,   82,
       82,    0,    0,    0,   64,    0,   64,    0,    0,    0,
        0,    0,    0,    0,    0,   57,    4,    5,    8,   55,
       55,   55,   55,   55,   55,   55,   17,   55,   55,   22,
       55,    0,   55,   39,   55,   55,   55,   55,   55,   55,
       55,   50,   52,    0,   82,   82,   82,   82,   82,    0,
        0,    0,    0,    0,    0,   65,    0,   58,    0,    0,

        0,   57,    0,   57,    0,   55,   55,   11,   55,   55,
       55,   16,   55,   55,   28,    0,   55,   40,   55,   42,
       55,   55,   45,   46,    0,   82,    0,   66,    0,    0,
        0,   65,    0,   65,    0,    0,    0,    0,    0,   55,
       55,   12,   13,   55,   55,   20,    0,   38,   55,   43,
       55,   53,    0,    0,    0,    0,    0,    0,   59,    0,
        9,   10,   55,   55,    0,   55,   55,    0,    0,   67,
        0,   61,    0,    0,   55,   19,   33,   55,   44,   69,
        0,    0,    0,   60,   55,   41,    0,   68,   62,   14,
       70,    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,    7,    8,    9,
        1,   10,    9,   11,    1,    1,   12,   12,   12,   12,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   13,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
       12,   12,   12
    } ;

static yyconst flex_int16_t yy_base[424] =
    {   0,
        0,  301,   54,   55,   63,   66,  289,  285,   67,   70,
      288, 2566,   76,   79,   81,   78, 2566,  270,  268,  255,
      246,  232, 2566,   85,   92,  154,  212,  270,  312,   80,
      106,  370,  120,  139,  140,  117,  142,  411,  219,  469,
      197,  212,   81,    0,   89,  124,    0,    0,  176,    0,
        0,  200,    0,    0,  239,  142,  224,  212,  281, 2566,
      288,  205,    0, 2566, 2566,  183, 2566,  237,  301,  278,
      265,  293,  347,  323,  332,  351,  354,  394,  391,  452,
      472, 2566,  386,  483,  471,  508,  523,  509,  541,  548,
      535,  582,  557,  600,  611,  614,  600,  625,  636,  626,

      671,  650,  671,  678,  663,  713,  733,  698,  717,   85,
        0,  185, 2566, 2566,  178,    0,  253,  313, 2566,  157,
     2566,    0,    0, 2566,  157,  757,  155,  769,  335,  692,
      147,    0,  122,  120,  751,  148,  781,  788,  773,  774,
      781,  782,  784,  840,  843,  854,  861,  847,  872,  865,
      901,  915,  927,  930,  948,  951,  922,  940,  980,  940,
      993, 1004, 1011,  995,  996,  998, 1055, 1019, 1035, 1052,
     1072, 1065, 1071, 1079, 1099, 1094, 1109, 1151,  148,  885,
     2566,  122,  653,  120,  180,  189, 1165,  112, 1169,  198,
      256,  102, 1180, 1187, 1201,  384, 1212, 1165, 1178, 1224,

     1198, 1235, 1199, 1216, 1259, 1231, 1231, 1283, 1271, 1275,
     1307, 1277, 1331, 1301, 1344, 1355, 1366, 1369, 1380,  181,
     1387, 1394, 1355, 1380, 1417, 1420, 1432, 1446, 1449, 1471,
     1482, 1501, 1504, 1515, 1527, 1441,  182,  747,  776, 1030,
     1271,  258,  275,   93, 1538, 1545, 1552,  533, 1563,  295,
      197,  310,  317, 1567,   86, 1172, 1571, 1574, 1585, 1588,
     1579, 1607, 1619, 1638, 1594, 1623, 1656, 1669, 1680, 1683,
     1694,  328, 1697, 1708, 1696, 1722, 1686, 1715, 1711, 1755,
     1767, 1781, 1784,  358, 1478, 1651, 1796, 1800, 1806,  387,
      255,  395,  395, 1810,   85, 1816,  420, 2566,  441,  458,

       71, 1824, 1831, 1834,  464, 1818, 1820, 1846, 1832, 1860,
     1851, 1884, 1860, 1876, 1912,  475, 1925, 1928, 1939, 1942,
     1913, 1935, 1963, 1980,  485, 1819,  498, 2566,  509,  516,
       66, 1993, 2000, 2003,  520,  528,  539,  299,  535, 2010,
     1995, 2021, 2024, 2035, 2010, 2048,  549, 2059, 2042, 2072,
     2056, 2566,  546,  573,  317,  571,  383,  603, 2566,  612,
     2096, 2108, 1996, 2068,  650, 2093, 2128,  401,  639, 2566,
      675, 2566,  677,  416, 2145, 2142, 2566, 2157, 2164, 2566,
      715,  442,  458, 2566, 2141, 2179,  461, 2566, 2566, 2193,
     2566, 2566, 2205, 2218, 2231, 2244, 2257, 2265, 2276, 2288,

     2301, 2313, 2326, 2339, 2347, 2359, 2367, 2379, 2391, 2398,
     2409, 2421, 2433, 2445, 2458, 2470, 2481, 2493, 2505, 2517,
     2529, 2541, 2553
    } ;

static yyconst flex_int16_t yy_def[424] =
    {   0,
      392,    1,  393,  393,  394,  394,  395,  395,  396,  396,
      392,  392,  392,  392,  397,  398,  392,  392,  392,  392,
      392,  392,  392,  399,  399,  399,  399,  399,   27,   27,
      399,  399,  399,  399,   27,  399,   27,   27,  399,  399,
       32,   40,  392,  400,  392,  392,  401,  401,  392,  402,
      403,  392,  404,  404,  405,  392,  406,  406,  392,  392,
      392,  407,  408,  392,  392,  392,  392,  392,  399,  392,
      409,   27,  399,  399,   32,   40,   32,  399,   32,  399,
      399,  392,   32,  399,   27,  399,  399,   40,  399,  399,
       32,  399,   40,  399,  399,  399,   27,  399,  399,   27,

       32,  399,  399,  399,   27,  399,  399,   27,   27,  392,
      400,  392,  392,  392,  392,  401,  392,  392,  392,  392,
      392,  403,  404,  392,  410,  392,  406,  392,  392,  411,
      407,  408,  392,  392,  409,  412,  413,  399,   27,   27,
       32,   32,   32,  399,  399,  399,  399,   27,  399,   27,
      399,  399,  399,  399,  399,  399,   27,   40,  399,   27,
      392,  399,  399,   32,   32,   32,  399,   27,   27,   27,
      399,   40,   27,   32,   27,   32,   32,  399,  392,  392,
      392,  392,  414,  410,  392,  392,  411,  415,  416,  392,
      392,  412,  392,  392,  413,  392,  417,   32,   32,  399,

       27,  399,   27,   40,  399,   27,   32,  399,   27,   32,
      399,   27,  399,   40,  399,  399,  399,  399,  399,  392,
      399,  399,   40,   27,  399,  399,  399,  399,  399,  399,
      399,  399,  399,  399,  399,   27,  392,  418,  414,  414,
      414,  392,  392,  415,  392,  392,  416,  392,  419,  392,
      392,  392,  392,  417,  420,  421,  399,  399,  399,  399,
       32,  399,  399,  399,   40,   32,  399,  399,  399,  399,
      399,  392,  399,  399,   27,  399,   32,   32,   40,  399,
      399,  399,  399,  392,  418,  418,  392,  418,  414,  392,
      392,  392,  392,  419,  422,  423,  392,  392,  392,  392,

      420,  392,  392,  421,  392,   32,   27,  399,   27,  399,
       32,  399,   27,   27,  399,  392,  399,  399,  399,  399,
       27,   27,  399,  399,  392,  418,  392,  392,  392,  392,
      422,  392,  392,  423,  392,  392,  392,  392,  392,  399,
       27,  399,  399,  399,   40,  399,  392,  399,   40,  399,
       32,  392,  392,  392,  392,  392,  392,  392,  392,  392,
      399,  399,   27,   32,  392,   27,  399,  392,  392,  392,
      392,  392,  392,  392,  399,  399,  392,  399,  399,  392,
      392,  392,  392,  392,   32,  399,  392,  392,  392,  399,
      392,    0,  392,  392,  392,  392,  392,  392,  392,  392,

      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,
      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,
      392,  392,  392
    } ;

static yyconst flex_int16_t yy_nxt[2630] =
    {   0,
       12,   13,   14,   13,   15,   12,   16,   12,   17,   12,
       18,   19,   20,   21,   22,   23,   24,   25,   26,   27,
       28,   29,   30,   31,   32,   31,   33,   34,   35,   36,
       37,   38,   39,   40,   41,   31,   42,   31,   31,   12,
       31,   24,   25,   26,   27,   28,   29,   30,   31,   32,
       33,   34,   35,   36,   37,   38,   39,   40,   41,   31,
       42,   31,   31,   45,   45,   48,   46,   46,   48,   54,
      332,   49,   54,   55,   49,  302,   55,   56,   56,   56,
       56,   56,   56,   58,   60,   59,   68,   68,   68,  332,
      302,   61,   70,   68,   68,   68,   71,  245,  112,   70,

       89,  113,   50,   71,   69,   50,  193,   68,   68,   68,
      110,   72,   73,   70,   69,  179,  245,   71,   68,   68,
       68,   68,   68,   68,   70,   89,  124,   70,   71,   69,
       74,   71,  238,  114,  110,   72,  115,   73,   69,  179,
       68,   68,   68,   56,   56,   56,   70,   97,   98,   93,
       71,  190,  193,   60,   74,   68,   68,   68,  191,  126,
       69,   70,   99,  124,   69,   71,   69,  183,   94,   95,
       75,   97,   98,   93,   96,  190,   69,  117,  118,  118,
       76,  237,  191,   77,  119,   69,  120,   99,   78,   69,
      115,   69,   94,   95,  112,   75,   66,  113,   96,  272,

       69,  117,  118,  118,   76,  237,  284,   77,  119,  242,
      120,   60,   78,   68,   68,   68,  126,  298,   69,   70,
       68,   68,   68,   71,  272,   69,   70,  243,  126,  108,
       71,  284,   79,  242,  250,  109,   80,  103,   68,   68,
       68,   69,  298,   69,   70,  124,   81,   67,   71,   69,
       69,  243,  104,  108,  117,  118,  118,   79,  250,   66,
      109,   80,  103,  120,   65,   69,  135,  135,  135,  136,
       81,   68,   68,   68,   69,  328,  104,   70,   82,   64,
       63,   71,   68,   68,   68,  127,  251,  392,   70,  128,
      128,  128,   71,   52,  290,  129,   83,   52,   84,  130,

      328,   61,   68,   68,   68,  291,   43,   85,   70,  133,
      251,  134,   71,   69,  180,  180,  180,  138,  290,  359,
       83,  181,   84,  182,   68,   68,   68,   69,  297,  291,
       70,   85,   86,  133,   71,  134,   69,  370,   69,  299,
      392,   87,  138,   88,  359,  392,   69,  392,   68,   68,
       68,   69,  297,   69,   70,  300,  392,   86,   71,  316,
       69,   69,  370,  299,  140,   87,  185,   88,  186,  139,
       69,   68,   68,   68,   69,   69,  392,   70,   69,  300,
      141,   71,  142,  316,   69,  392,   69,  325,  140,   69,
      185,   90,  186,  392,  139,   68,   68,   68,   91,   69,

       69,   70,   92,  372,  141,   71,  142,   69,  392,  144,
       69,  325,  145,   69,   69,  252,   90,  253,  148,   69,
      327,  380,   91,   69,  329,  143,   92,  100,  372,  392,
      392,  101,   69,  330,  144,   69,  384,  145,   69,  252,
      102,  253,  148,   69,  327,   69,  380,   69,  329,  143,
      392,  392,  100,   68,   68,   68,  101,  330,  336,   70,
       69,  384,  388,   71,  102,  392,  392,  392,  146,   69,
       68,   68,   68,   68,   68,   68,   70,  337,  389,   70,
       71,  391,  336,   71,   68,   68,   68,  388,  338,  150,
       70,  151,  105,  146,   71,  152,  392,  339,  106,  147,

      392,  337,  149,  389,  347,   69,  391,  107,  392,   68,
       68,   68,  338,  352,  150,   70,  151,  105,  392,   71,
      152,  339,  106,  147,   68,   68,   68,  149,  347,   69,
       70,  107,   69,  392,   71,  392,  353,  352,  155,  392,
      392,  153,   68,   68,   68,  354,  355,   69,   70,   68,
       68,   68,   71,  356,  154,   70,   69,   69,  357,   71,
      353,  392,  155,   69,  292,  153,  293,  157,  158,  354,
      355,   69,  358,  360,  156,  365,  368,  356,  154,  392,
       69,   69,  357,   68,   68,   68,  159,   69,  292,   70,
      293,  157,  158,   71,  392,   69,  358,  360,  156,  365,

      368,   68,   68,   68,  392,   69,  369,   70,  392,  371,
      159,   71,  161,  161,  161,   68,   68,   68,   70,   69,
      164,   70,   71,  392,   69,   71,   68,   68,   68,  392,
      369,  392,   70,  371,   69,  160,   71,   68,   68,   68,
      163,  373,  374,   70,  162,  164,   69,   71,  392,   69,
      166,   68,   68,   68,  240,  118,  118,   70,   69,  160,
       69,   71,  392,  241,  163,  373,  374,  165,  162,  392,
      392,   69,   68,   68,   68,  166,  377,  381,   70,   68,
       68,   68,   71,  174,   69,   70,  171,   69,  392,   71,
      392,  165,   69,  187,  187,  187,  188,   69,  392,  167,

      377,  381,  172,  168,  169,  382,  170,  383,  174,  173,
      171,  392,   69,  392,   68,   68,   68,   69,   69,  392,
       70,   69,  176,  167,   71,  392,  172,  168,  169,  382,
      170,  383,   69,  173,   68,   68,   68,  177,  392,  392,
       70,  178,  392,   69,   71,  387,  392,  176,  286,  287,
      287,   69,  135,  135,  135,  136,   69,  288,   68,   68,
       68,  127,  177,  175,   70,  392,  178,  392,   71,  387,
      128,  128,  128,  392,  392,   69,  129,  240,  118,  118,
      130,  392,  194,  194,  194,  392,  241,  175,  196,   68,
       68,   68,  197,   69,  200,   70,  392,  199,   69,   71,

      392,  392,   69,   69,  198,   69,  392,   69,   69,   69,
       69,  392,   69,  201,  202,  203,  204,  392,   69,  200,
      392,  392,  199,   69,  392,  392,  392,   69,   69,  198,
       69,   69,   69,   69,   69,  392,   69,  201,  202,  203,
      204,   68,   68,   68,   68,   68,   68,   70,  392,  392,
       70,   71,  392,  392,   71,   68,   68,   68,  392,  206,
      392,   70,   68,   68,   68,   71,  205,  209,   70,  392,
      392,  210,   71,   68,   68,   68,  207,  392,  392,   70,
      392,   69,  392,   71,  206,  211,  180,  180,  180,   69,
      205,  208,  209,  181,  392,  182,  210,  392,  392,   69,

      392,  207,   68,   68,   68,   69,  392,  392,   70,  392,
      211,  392,   71,  392,   69,  208,   68,   68,   68,  212,
      392,  392,   70,   69,  392,  392,   71,  392,   68,   68,
       68,   68,   68,   68,   70,  392,  392,   70,   71,  392,
      392,   71,  216,  392,  212,  214,   69,  392,  213,   68,
       68,   68,   68,   68,   68,   70,   69,  392,   70,   71,
      219,  392,   71,   69,   69,  392,  392,  216,  392,  217,
      214,   69,  213,  392,   69,  215,  392,  392,   69,  392,
       69,   68,   68,   68,  392,  219,  392,   70,   69,   69,
      392,   71,  392,  217,  161,  161,  161,  392,   69,  215,

       70,  392,   69,  392,   71,   68,   68,   68,  392,  392,
      218,   70,   68,   68,   68,   71,   69,  223,   70,   69,
      392,  392,   71,  222,   69,  220,   69,   69,   69,  392,
      224,  240,  118,  118,  218,  392,  392,  221,  392,   69,
      241,   69,  223,   69,   69,  392,  392,  222,   69,  220,
       69,   69,   69,  226,  224,   69,   68,   68,   68,   69,
      392,  221,   70,  392,   69,  392,   71,  392,   69,  227,
      392,  225,  228,   68,   68,   68,   69,  226,  392,   70,
       69,  392,  392,   71,   69,  392,   69,  392,   69,  392,
      392,   69,  392,  227,  230,  231,  225,  228,  392,  392,

       69,   69,  392,   69,  392,   69,  392,  232,  392,  392,
       69,   69,  229,   69,  392,   69,   69,  392,  230,  233,
      231,  392,  234,   69,  392,   69,   69,   69,  392,   69,
       69,  232,  392,   69,  392,   69,  392,  235,  392,  392,
       69,   69,  392,  392,  233,  392,  234,  392,   69,  392,
       69,  392,   68,   68,   68,   69,  392,   69,   70,  392,
      392,  235,   71,  392,  392,   69,  187,  187,  187,  188,
      246,  246,  246,  303,  303,  303,  248,  236,  392,  305,
      249,  194,  194,  194,  136,  392,   69,  196,  194,  194,
      194,  197,  392,   69,  196,  392,  392,  257,  197,   69,

      392,  236,  194,  194,  194,  392,  258,  392,  196,  392,
       69,   69,  197,  254,  254,  254,  255,   69,  259,   69,
      392,  257,   69,  261,   69,   68,   68,   68,  392,  392,
      258,   70,   69,   69,   69,   71,   68,   68,   68,   69,
      392,  392,   70,  259,   69,  262,   71,   69,  261,  392,
      392,   69,   69,  392,   69,   69,   69,   69,  392,  265,
       68,   68,   68,   69,   69,  264,   70,  392,  260,  262,
       71,  392,  240,  118,  118,  263,   69,   69,   69,  392,
       69,  289,  392,  265,   68,   68,   68,   69,  392,  264,
       70,   69,  260,  392,   71,  266,  267,   69,  392,  392,

      263,   69,  392,   69,  392,   69,  392,   69,   68,   68,
       68,  269,  392,  392,   70,  392,   69,  392,   71,  392,
      266,  267,   69,  392,  270,  392,   69,   69,  392,   69,
       69,   69,   68,   68,   68,  269,  392,  268,   70,   69,
      392,  392,   71,  392,  392,   68,   68,   68,  392,  270,
      392,   70,  392,  392,   69,   71,   68,   68,   68,  392,
      392,  268,   70,   69,  392,  392,   71,   68,   68,   68,
       68,   68,   68,   70,  392,  392,   70,   71,   69,  392,
       71,   68,   68,   68,  273,  392,  271,   70,   68,   68,
       68,   71,  392,   69,   70,   68,   68,   68,   71,  392,

      274,   70,  392,   69,   69,   71,  392,  392,  273,  392,
      271,  392,  392,  392,   69,  392,  392,   69,   68,   68,
       68,   68,   68,   68,   70,  274,  392,   70,   71,   69,
      392,   71,  392,   68,   68,   68,  392,  392,   69,   70,
      392,  392,  392,   71,  275,  392,  276,   68,   68,   68,
       68,   68,   68,   70,  392,  392,   70,   71,  392,  392,
       71,  283,  392,  277,  392,   69,  392,  279,  275,  392,
      276,  392,   68,   68,   68,   69,  392,  278,   70,  286,
      287,  287,   71,   68,   68,   68,  283,  277,  288,   70,
       69,  392,  279,   71,  392,  392,  392,  280,  392,   69,

      281,  278,   68,   68,   68,   68,   68,   68,   70,  392,
      392,   70,   71,  392,  392,   71,   68,   68,   68,  392,
      392,  280,   70,  392,  392,  281,   71,  392,   68,   68,
       68,  392,  392,  392,   70,  392,  392,  282,   71,  246,
      246,  246,  188,  392,  392,  248,  246,  246,  246,  249,
      392,  392,  248,  246,  246,  246,  249,  392,  392,  248,
      392,  392,  282,  249,  294,  294,  294,  295,  254,  254,
      254,  255,   68,   68,   68,   68,   68,   68,   70,  392,
      392,   70,   71,  392,  392,   71,   68,   68,   68,   68,
       68,   68,   70,  392,  392,   70,   71,  392,  392,   71,

       69,  392,  392,  392,  306,  392,  392,  307,   68,   68,
       68,   69,  392,  392,   70,  392,  392,   69,   71,  392,
       68,   68,   68,  311,  392,   69,   70,  392,  392,  306,
       71,  307,   69,  392,  392,   69,  392,  392,  308,   68,
       68,   68,   69,  392,  312,   70,  392,  311,  392,   71,
      309,   69,  286,  287,  287,   69,   69,   68,   68,   68,
      392,  288,  308,   70,  310,  392,  392,   71,  392,  312,
       68,   68,   68,  392,  309,   69,   70,  392,  392,   69,
       71,   68,   68,   68,   68,   68,   68,   70,  310,  392,
       70,   71,  392,  392,   71,   68,   68,   68,   68,   68,

       68,   70,  313,  392,   70,   71,  392,   69,   71,   68,
       68,   68,  392,  314,  320,   70,  318,  392,   69,   71,
       69,  392,  392,   68,   68,   68,  313,  315,  317,   70,
       69,  392,   69,   71,   69,  392,   69,  314,  320,  392,
      322,  318,   69,   69,  392,   69,  392,  321,  392,   69,
      392,  315,  317,  392,   69,  319,   68,   68,   68,   69,
      392,   69,   70,  392,  322,  392,   71,   69,   68,   68,
       68,  321,  392,   69,   70,  392,  392,  392,   71,  319,
      392,  323,   68,   68,   68,   68,   68,   68,   70,  392,
      392,   70,   71,  392,  392,   71,  392,  180,  180,  180,

      324,  286,  287,  287,  181,  323,  182,  240,  118,  118,
      326,  294,  294,  294,  295,  392,  289,  333,  333,  333,
      286,  287,  287,  335,  324,  303,  303,  303,  255,  326,
      392,  305,  303,  303,  303,  303,  303,  303,  305,   69,
       69,  305,  392,  392,   69,  392,  340,   68,   68,   68,
       69,  392,  342,   70,  341,  392,   69,   71,  392,  392,
      392,   68,   68,   68,   69,   69,   69,   70,  392,   69,
      340,   71,   69,  392,   69,  392,  392,  342,  341,   69,
       69,   69,  392,  344,  345,   68,   68,   68,  392,  392,
       69,   70,  392,  343,   69,   71,  346,   69,  392,  392,

       69,  392,  392,   69,  392,   69,  392,  344,  392,  345,
       69,  392,  392,   68,   68,   68,  392,  343,   69,   70,
      392,  346,  392,   71,  392,   69,   68,   68,   68,   68,
       68,   68,   70,  350,   69,   70,   71,   69,  392,   71,
       68,   68,   68,   68,   68,   68,   70,   69,  392,   70,
       71,  392,  348,   71,  392,   69,  392,  392,  350,   69,
      392,  392,   69,  392,   68,   68,   68,  392,  392,  351,
       70,   69,  392,  392,   71,  392,  348,  392,  392,  349,
       69,   68,   68,   68,   69,  392,  392,   70,  392,  392,
      392,   71,  392,  351,  333,  333,  333,  295,  392,  392,

      335,  333,  333,  333,  333,  333,  333,  335,  392,  392,
      335,   68,   68,   68,  392,  362,   69,   70,  392,   69,
      375,   71,   68,   68,   68,   68,   68,   68,   70,   69,
       69,   70,   71,   69,  392,   71,   68,   68,   68,  364,
      362,   69,   70,  361,   69,  375,   71,  392,   69,   68,
       68,   68,  392,   69,   69,   70,  392,  392,   69,   71,
       68,   68,   68,  364,  392,   69,   70,  361,  363,  392,
       71,  366,   69,   68,   68,   68,  392,   69,  392,   70,
       69,  392,  392,   71,  367,  392,  392,  392,   69,   69,
       69,  392,  363,  392,  392,  366,  376,   68,   68,   68,

       69,  392,   69,   70,   69,  392,  392,   71,  367,   68,
       68,   68,   69,   69,   69,   70,  392,  378,  392,   71,
      376,  392,  392,  392,   69,  392,  392,   69,  392,   68,
       68,   68,  392,  392,  392,   70,  392,  392,   69,   71,
      392,  392,  378,   68,   68,   68,   68,   68,   68,   70,
      392,   69,   70,   71,  392,  392,   71,  392,   68,   68,
       68,  379,   69,  385,   70,   68,   68,   68,   71,   69,
      392,   70,  392,  390,  392,   71,  386,  392,  392,  392,
       68,   68,   68,  392,  392,  379,   70,   69,  385,  392,
       71,  392,  392,   69,   68,   68,   68,  390,  392,  392,

       70,  386,  392,  392,   71,   44,   44,   44,   44,   44,
       44,   44,   44,   44,   44,   44,   44,   44,   47,   47,
       47,   47,   47,   47,   47,   47,   47,   47,   47,   47,
       47,   51,   51,   51,   51,   51,   51,   51,   51,   51,
       51,   51,   51,   51,   53,   53,   53,   53,   53,   53,
       53,   53,   53,   53,   53,   53,   53,   57,   57,   57,
       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
       62,  392,  392,  392,  392,   62,   62,   69,   69,   69,
      392,   69,   69,  392,  392,   69,   69,   69,  111,  111,
      111,  111,  111,  111,  111,  111,  392,  111,  111,  111,

      111,  116,  116,  116,  116,  116,  116,  116,  392,  116,
      116,  116,  116,  121,  121,  392,  121,  121,  121,  121,
      121,  121,  121,  121,  121,  121,  122,  122,  122,  122,
      122,  122,  122,  392,  122,  122,  122,  122,  122,  123,
      123,  123,  123,  123,  392,  123,  123,  123,  123,  123,
      123,  123,  125,  392,  392,  392,  392,  392,  125,   58,
       58,   58,   58,   58,   58,   58,   58,   58,   58,   58,
       58,   58,  131,  392,  392,  392,  392,  131,  131,  132,
      132,  392,  392,  132,  132,  132,  132,  132,  132,  132,
      132,  132,  137,  137,  137,  137,  392,  392,  392,  392,

      392,  392,  137,  184,  392,  392,  392,  392,  184,  184,
      189,  189,  189,  189,  392,  392,  392,  392,  392,  392,
      189,  192,  192,  192,  192,  192,  192,  192,  192,  192,
      192,  192,  192,  192,  195,  195,  195,  392,  195,  195,
      392,  392,  195,  195,  195,  239,  239,  239,  239,  239,
      239,  239,  239,  239,  239,  239,  239,  239,  244,  244,
      244,  244,  244,  244,  244,  244,  244,  244,  244,  244,
      244,  247,  247,  247,  392,  247,  247,  392,  392,  247,
      247,  247,  256,  256,  256,  256,  392,  392,  392,  392,
      392,  392,  256,  285,  285,  285,  285,  285,  285,  285,

      285,  285,  285,  285,  285,  285,  296,  296,  296,  296,
      392,  392,  392,  392,  392,  392,  296,  301,  301,  301,
      301,  301,  301,  301,  301,  301,  301,  301,  301,  301,
      304,  304,  304,  392,  304,  304,  392,  392,  392,  304,
      304,  331,  331,  331,  331,  331,  331,  331,  331,  331,
      331,  331,  331,  331,  334,  334,  334,  392,  334,  334,
      392,  392,  392,  334,  334,   11,  392,  392,  392,  392,
      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,
      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,
      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,

      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,
      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,
      392,  392,  392,  392,  392,  392,  392,  392,  392
    } ;

static yyconst flex_int16_t yy_chk[2630] =
    {   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,    3,    4,    6,    9,
      331,    5,   10,    9,    6,  301,   10,   13,   13,   13,
       14,   14,   14,   15,   16,   15,   24,   24,   24,  295,
      255,   16,   24,   25,   25,   25,   24,  244,   45,   25,

       30,   45,    5,   25,   30,    6,  192,   31,   31,   31,
       43,   24,   25,   31,   30,  110,  188,   31,   36,   36,
       36,   33,   33,   33,   36,   30,  184,   33,   36,   30,
       25,   33,  182,   46,   43,   24,   46,   25,   30,  110,
       34,   34,   34,   56,   56,   56,   34,   36,   36,   33,
       34,  133,  136,  131,   25,   26,   26,   26,  134,  127,
       35,   26,   37,  125,   35,   26,   37,  120,   34,   35,
       26,   36,   36,   33,   35,  133,   37,   49,   49,   49,
       26,  179,  134,   26,   49,   35,   49,   37,   26,   35,
      115,   37,   34,   35,  112,   26,   66,  112,   35,  220,

       37,   52,   52,   52,   26,  179,  237,   26,   52,  185,
       52,   62,   26,   27,   27,   27,   58,  251,   41,   27,
       39,   39,   39,   27,  220,   41,   39,  186,   57,   41,
       39,  237,   27,  185,  190,   42,   27,   39,   68,   68,
       68,   42,  251,   41,   68,   55,   27,   22,   68,   41,
       42,  186,   39,   41,  117,  117,  117,   27,  190,   21,
       42,   27,   39,  117,   20,   42,   71,   71,   71,   71,
       27,   28,   28,   28,   42,  291,   39,   28,   28,   19,
       18,   28,   59,   59,   59,   59,  191,   11,   59,   61,
       61,   61,   59,    8,  242,   61,   28,    7,   28,   61,

      291,   61,   69,   69,   69,  243,    2,   28,   69,   70,
      191,   70,   69,   72,  118,  118,  118,   72,  242,  338,
       28,  118,   28,  118,   74,   74,   74,   72,  250,  243,
       74,   28,   29,   70,   74,   70,   29,  355,   72,  252,
        0,   29,   72,   29,  338,    0,   29,    0,   73,   73,
       73,   72,  250,   75,   73,  253,    0,   29,   73,  272,
       75,   29,  355,  252,   75,   29,  129,   29,  129,   73,
       29,   32,   32,   32,   76,   77,    0,   32,   75,  253,
       76,   32,   77,  272,   75,    0,   77,  284,   75,   76,
      129,   32,  129,    0,   73,   78,   78,   78,   32,   76,

       77,   78,   32,  357,   76,   78,   77,   83,    0,   79,
       77,  284,   79,   76,   83,  196,   32,  196,   83,   79,
      290,  368,   32,   79,  292,   78,   32,   38,  357,    0,
        0,   38,   83,  293,   79,   38,  374,   79,   83,  196,
       38,  196,   83,   79,  290,   38,  368,   79,  292,   78,
        0,    0,   38,   80,   80,   80,   38,  293,  297,   80,
       38,  374,  382,   80,   38,    0,    0,    0,   80,   38,
       40,   40,   40,   81,   81,   81,   40,  299,  383,   81,
       40,  387,  297,   81,   84,   84,   84,  382,  300,   85,
       84,   85,   40,   80,   84,   85,    0,  305,   40,   81,

        0,  299,   84,  383,  316,   85,  387,   40,    0,   86,
       86,   86,  300,  325,   85,   86,   85,   40,    0,   86,
       85,  305,   40,   81,   87,   87,   87,   84,  316,   85,
       87,   40,   88,    0,   87,    0,  327,  325,   88,    0,
        0,   86,   89,   89,   89,  329,  330,   88,   89,   90,
       90,   90,   89,  335,   87,   90,   91,   88,  336,   90,
      327,    0,   88,   91,  248,   86,  248,   91,   91,  329,
      330,   88,  337,  339,   89,  347,  353,  335,   87,    0,
       93,   91,  336,   92,   92,   92,   93,   91,  248,   92,
      248,   91,   91,   92,    0,   93,  337,  339,   89,  347,

      353,   94,   94,   94,    0,   93,  354,   94,    0,  356,
       93,   94,   95,   95,   95,   96,   96,   96,   95,   93,
       97,   96,   95,    0,   97,   96,   98,   98,   98,    0,
      354,    0,   98,  356,   97,   94,   98,   99,   99,   99,
       96,  358,  360,   99,   95,   97,  100,   99,    0,   97,
      100,  102,  102,  102,  183,  183,  183,  102,   97,   94,
      100,  102,    0,  183,   96,  358,  360,   99,   95,    0,
        0,  100,  103,  103,  103,  100,  365,  369,  103,  104,
      104,  104,  103,  105,  100,  104,  102,  105,    0,  104,
        0,   99,  101,  130,  130,  130,  130,  105,    0,  101,

      365,  369,  103,  101,  101,  371,  101,  373,  105,  104,
      102,    0,  105,    0,  106,  106,  106,  101,  108,    0,
      106,  105,  108,  101,  106,    0,  103,  101,  101,  371,
      101,  373,  108,  104,  107,  107,  107,  109,    0,    0,
      107,  109,    0,  108,  107,  381,    0,  108,  238,  238,
      238,  109,  135,  135,  135,  135,  108,  238,  126,  126,
      126,  126,  109,  107,  126,    0,  109,    0,  126,  381,
      128,  128,  128,    0,    0,  109,  128,  239,  239,  239,
      128,    0,  137,  137,  137,    0,  239,  107,  137,  138,
      138,  138,  137,  139,  140,  138,    0,  139,  140,  138,

        0,    0,  141,  142,  138,  143,    0,  139,  140,  141,
      142,    0,  143,  141,  142,  142,  143,    0,  139,  140,
        0,    0,  139,  140,    0,    0,    0,  141,  142,  138,
      143,  139,  140,  141,  142,    0,  143,  141,  142,  142,
      143,  144,  144,  144,  145,  145,  145,  144,    0,    0,
      145,  144,    0,    0,  145,  146,  146,  146,    0,  145,
        0,  146,  147,  147,  147,  146,  144,  148,  147,    0,
        0,  148,  147,  149,  149,  149,  146,    0,    0,  149,
        0,  148,    0,  149,  145,  150,  180,  180,  180,  150,
      144,  147,  148,  180,    0,  180,  148,    0,    0,  150,

        0,  146,  151,  151,  151,  148,    0,    0,  151,    0,
      150,    0,  151,    0,  150,  147,  152,  152,  152,  151,
        0,    0,  152,  150,    0,    0,  152,    0,  153,  153,
      153,  154,  154,  154,  153,    0,    0,  154,  153,    0,
        0,  154,  157,    0,  151,  153,  157,    0,  152,  155,
      155,  155,  156,  156,  156,  155,  157,    0,  156,  155,
      160,    0,  156,  158,  160,    0,    0,  157,    0,  158,
      153,  157,  152,    0,  160,  155,    0,    0,  158,    0,
      157,  159,  159,  159,    0,  160,    0,  159,  158,  160,
        0,  159,    0,  158,  161,  161,  161,    0,  160,  155,

      161,    0,  158,    0,  161,  162,  162,  162,    0,    0,
      159,  162,  163,  163,  163,  162,  164,  165,  163,  166,
        0,    0,  163,  164,  165,  161,  166,  164,  165,    0,
      166,  240,  240,  240,  159,    0,    0,  163,    0,  168,
      240,  164,  165,  168,  166,    0,    0,  164,  165,  161,
      166,  164,  165,  168,  166,  169,  167,  167,  167,  169,
        0,  163,  167,    0,  168,    0,  167,    0,  168,  169,
        0,  167,  170,  171,  171,  171,  170,  168,    0,  171,
      169,    0,    0,  171,  169,    0,  170,    0,  172,    0,
        0,  173,    0,  169,  172,  173,  167,  170,    0,    0,

      174,  170,    0,  172,    0,  173,    0,  174,    0,    0,
      170,  174,  171,  172,    0,  176,  173,    0,  172,  175,
      173,    0,  176,  175,    0,  174,  176,  172,    0,  173,
      177,  174,    0,  175,    0,  174,    0,  177,    0,    0,
      176,  177,    0,    0,  175,    0,  176,    0,  175,    0,
      176,    0,  178,  178,  178,  177,    0,  175,  178,    0,
        0,  177,  178,    0,    0,  177,  187,  187,  187,  187,
      189,  189,  189,  256,  256,  256,  189,  178,    0,  256,
      189,  193,  193,  193,  193,    0,  198,  193,  194,  194,
      194,  193,    0,  198,  194,    0,    0,  198,  194,  199,

        0,  178,  195,  195,  195,    0,  199,    0,  195,    0,
      199,  198,  195,  197,  197,  197,  197,  198,  201,  203,
        0,  198,  201,  203,  199,  200,  200,  200,    0,    0,
      199,  200,  201,  203,  199,  200,  202,  202,  202,  204,
        0,    0,  202,  201,  203,  204,  202,  201,  203,    0,
        0,  206,  207,    0,  204,  206,  201,  203,    0,  207,
      205,  205,  205,  207,  204,  206,  205,    0,  202,  204,
      205,    0,  241,  241,  241,  205,  206,  207,  204,    0,
      206,  241,    0,  207,  208,  208,  208,  207,    0,  206,
      208,  209,  202,    0,  208,  209,  210,  212,    0,    0,

      205,  212,    0,  210,    0,  209,    0,  210,  211,  211,
      211,  212,    0,    0,  211,    0,  209,    0,  211,    0,
      209,  210,  212,    0,  214,    0,  212,  210,    0,  209,
      214,  210,  213,  213,  213,  212,    0,  211,  213,  214,
        0,    0,  213,    0,    0,  215,  215,  215,    0,  214,
        0,  215,    0,    0,  214,  215,  216,  216,  216,    0,
        0,  211,  216,  214,    0,    0,  216,  217,  217,  217,
      218,  218,  218,  217,    0,    0,  218,  217,  223,    0,
      218,  219,  219,  219,  223,    0,  216,  219,  221,  221,
      221,  219,    0,  223,  221,  222,  222,  222,  221,    0,

      224,  222,    0,  223,  224,  222,    0,    0,  223,    0,
      216,    0,    0,    0,  224,    0,    0,  223,  225,  225,
      225,  226,  226,  226,  225,  224,    0,  226,  225,  224,
        0,  226,    0,  227,  227,  227,    0,    0,  224,  227,
        0,    0,    0,  227,  225,    0,  226,  228,  228,  228,
      229,  229,  229,  228,    0,    0,  229,  228,    0,    0,
      229,  236,    0,  227,    0,  236,    0,  229,  225,    0,
      226,    0,  230,  230,  230,  236,    0,  228,  230,  285,
      285,  285,  230,  231,  231,  231,  236,  227,  285,  231,
      236,    0,  229,  231,    0,    0,    0,  230,    0,  236,

      231,  228,  232,  232,  232,  233,  233,  233,  232,    0,
        0,  233,  232,    0,    0,  233,  234,  234,  234,    0,
        0,  230,  234,    0,    0,  231,  234,    0,  235,  235,
      235,    0,    0,    0,  235,    0,    0,  234,  235,  245,
      245,  245,  245,    0,    0,  245,  246,  246,  246,  245,
        0,    0,  246,  247,  247,  247,  246,    0,    0,  247,
        0,    0,  234,  247,  249,  249,  249,  249,  254,  254,
      254,  254,  257,  257,  257,  258,  258,  258,  257,    0,
        0,  258,  257,    0,    0,  258,  259,  259,  259,  260,
      260,  260,  259,    0,    0,  260,  259,    0,    0,  260,

      261,    0,    0,    0,  260,    0,    0,  261,  262,  262,
      262,  261,    0,    0,  262,    0,    0,  265,  262,    0,
      263,  263,  263,  265,    0,  261,  263,    0,    0,  260,
      263,  261,  265,    0,    0,  261,    0,    0,  262,  264,
      264,  264,  265,    0,  266,  264,    0,  265,    0,  264,
      263,  266,  286,  286,  286,  266,  265,  267,  267,  267,
        0,  286,  262,  267,  264,    0,    0,  267,    0,  266,
      268,  268,  268,    0,  263,  266,  268,    0,    0,  266,
      268,  269,  269,  269,  270,  270,  270,  269,  264,    0,
      270,  269,    0,    0,  270,  271,  271,  271,  273,  273,

      273,  271,  268,    0,  273,  271,    0,  277,  273,  274,
      274,  274,    0,  269,  277,  274,  275,    0,  277,  274,
      275,    0,    0,  276,  276,  276,  268,  271,  273,  276,
      275,    0,  277,  276,  279,    0,  278,  269,  277,    0,
      279,  275,  277,  278,    0,  275,    0,  278,    0,  279,
        0,  271,  273,    0,  275,  276,  280,  280,  280,  279,
        0,  278,  280,    0,  279,    0,  280,  278,  281,  281,
      281,  278,    0,  279,  281,    0,    0,    0,  281,  276,
        0,  280,  282,  282,  282,  283,  283,  283,  282,    0,
        0,  283,  282,    0,    0,  283,    0,  287,  287,  287,

      281,  288,  288,  288,  287,  280,  287,  289,  289,  289,
      288,  294,  294,  294,  294,    0,  289,  296,  296,  296,
      326,  326,  326,  296,  281,  302,  302,  302,  302,  326,
        0,  302,  303,  303,  303,  304,  304,  304,  303,  306,
      307,  304,    0,    0,  307,    0,  306,  308,  308,  308,
      306,    0,  309,  308,  307,    0,  309,  308,    0,    0,
        0,  310,  310,  310,  306,  307,  309,  310,    0,  307,
      306,  310,  311,    0,  306,    0,    0,  309,  307,  311,
      313,  309,    0,  311,  313,  312,  312,  312,    0,    0,
      309,  312,    0,  310,  313,  312,  314,  311,    0,    0,

      314,    0,    0,  311,    0,  313,    0,  311,    0,  313,
      314,    0,    0,  315,  315,  315,    0,  310,  313,  315,
        0,  314,    0,  315,    0,  314,  317,  317,  317,  318,
      318,  318,  317,  321,  314,  318,  317,  321,    0,  318,
      319,  319,  319,  320,  320,  320,  319,  321,    0,  320,
      319,    0,  317,  320,    0,  322,    0,    0,  321,  322,
        0,    0,  321,    0,  323,  323,  323,    0,    0,  322,
      323,  321,    0,    0,  323,    0,  317,    0,    0,  319,
      322,  324,  324,  324,  322,    0,    0,  324,    0,    0,
        0,  324,    0,  322,  332,  332,  332,  332,    0,    0,

      332,  333,  333,  333,  334,  334,  334,  333,    0,    0,
      334,  340,  340,  340,    0,  341,  363,  340,    0,  341,
      363,  340,  342,  342,  342,  343,  343,  343,  342,  341,
      363,  343,  342,  345,    0,  343,  344,  344,  344,  345,
      341,  363,  344,  340,  341,  363,  344,    0,  345,  346,
      346,  346,    0,  341,  363,  346,    0,    0,  345,  346,
      348,  348,  348,  345,    0,  349,  348,  340,  344,    0,
      348,  349,  345,  350,  350,  350,    0,  351,    0,  350,
      349,    0,    0,  350,  351,    0,    0,    0,  351,  364,
      349,    0,  344,    0,    0,  349,  364,  361,  361,  361,

      364,    0,  351,  361,  349,    0,    0,  361,  351,  362,
      362,  362,  351,  366,  364,  362,    0,  366,    0,  362,
      364,    0,    0,    0,  364,    0,    0,  366,    0,  367,
      367,  367,    0,    0,    0,  367,    0,    0,  366,  367,
        0,    0,  366,  376,  376,  376,  375,  375,  375,  376,
        0,  366,  375,  376,    0,    0,  375,    0,  378,  378,
      378,  367,  385,  375,  378,  379,  379,  379,  378,  385,
        0,  379,    0,  385,    0,  379,  378,    0,    0,    0,
      386,  386,  386,    0,    0,  367,  386,  385,  375,    0,
      386,    0,    0,  385,  390,  390,  390,  385,    0,    0,

      390,  378,    0,    0,  390,  393,  393,  393,  393,  393,
      393,  393,  393,  393,  393,  393,  393,  393,  394,  394,
      394,  394,  394,  394,  394,  394,  394,  394,  394,  394,
      394,  395,  395,  395,  395,  395,  395,  395,  395,  395,
      395,  395,  395,  395,  396,  396,  396,  396,  396,  396,
      396,  396,  396,  396,  396,  396,  396,  397,  397,  397,
      397,  397,  397,  397,  397,  397,  397,  397,  397,  397,
      398,    0,    0,    0,    0,  398,  398,  399,  399,  399,
        0,  399,  399,    0,    0,  399,  399,  399,  400,  400,
      400,  400,  400,  400,  400,  400,    0,  400,  400,  400,

      400,  401,  401,  401,  401,  401,  401,  401,    0,  401,
      401,  401,  401,  402,  402,    0,  402,  402,  402,  402,
      402,  402,  402,  402,  402,  402,  403,  403,  403,  403,
      403,  403,  403,    0,  403,  403,  403,  403,  403,  404,
      404,  404,  404,  404,    0,  404,  404,  404,  404,  404,
      404,  404,  405,    0,    0,    0,    0,    0,  405,  406,
      406,  406,  406,  406,  406,  406,  406,  406,  406,  406,
      406,  406,  407,    0,    0,    0,    0,  407,  407,  408,
      408,    0,    0,  408,  408,  408,  408,  408,  408,  408,
      408,  408,  409,  409,  409,  409,    0,    0,    0,    0,

        0,    0,  409,  410,    0,    0,    0,    0,  410,  410,
      411,  411,  411,  411,    0,    0,    0,    0,    0,    0,
      411,  412,  412,  412,  412,  412,  412,  412,  412,  412,
      412,  412,  412,  412,  413,  413,  413,    0,  413,  413,
        0,    0,  413,  413,  413,  414,  414,  414,  414,  414,
      414,  414,  414,  414,  414,  414,  414,  414,  415,  415,
      415,  415,  415,  415,  415,  415,  415,  415,  415,  415,
      415,  416,  416,  416,    0,  416,  416,    0,    0,  416,
      416,  416,  417,  417,  417,  417,    0,    0,    0,    0,
        0,    0,  417,  418,  418,  418,  418,  418,  418,  418,

      418,  418,  418,  418,  418,  418,  419,  419,  419,  419,
        0,    0,    0,    0,    0,    0,  419,  420,  420,  420,
      420,  420,  420,  420,  420,  420,  420,  420,  420,  420,
      421,  421,  421,    0,  421,  421,    0,    0,    0,  421,
      421,  422,  422,  422,  422,  422,  422,  422,  422,  422,
      422,  422,  422,  422,  423,  423,  423,    0,  423,  423,
        0,    0,    0,  423,  423,  392,  392,  392,  392,  392,
      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,
      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,
      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,

      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,
      392,  392,  392,  392,  392,  392,  392,  392,  392,  392,
      392,  392,  392,  392,  392,  392,  392,  392,  392
    } ;

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 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
#line 2 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
/*-------------------------------------------------------------------------
 *
 * scan.l		- Scanner for the PL/pgSQL
 *			  procedural language
 *
 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 *
 * IDENTIFICATION
 *	  $PostgreSQL: pgsql/src/pl/plpgsql/src/scan.l,v 1.70 2009/06/10 22:34:11 petere Exp $
 *
 *-------------------------------------------------------------------------
 */

#include "plpgsql.h"

#include "mb/pg_wchar.h"


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

/*
 * When we parse a token that requires multiple lexer rules to process,
 * remember the token's starting position this way.
 */
#define SAVE_TOKEN_START()  \
	( start_lineno = plpgsql_scanner_lineno(), start_charpos = plpgsql_base_yytext )

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

static const char *scanstr;		/* original input string */

static int	pushback_token;
static bool have_pushback_token;
static const char *cur_line_start;
static int	cur_line_num;
static int		xcdepth = 0;	/* depth of nesting in slash-star comments */
static char    *dolqstart;      /* current $foo$ quote start string */

extern PGDLLIMPORT bool standard_conforming_strings;

bool plpgsql_SpaceScanned = false;
#define YY_NO_INPUT 1
/*
 * Exclusive states are a subset of the core lexer's:
 *  <xc> extended C-style comments
 *  <xq> standard quoted strings
 *  <xe> extended quoted strings (support backslash escape sequences)
 *  <xdolq> $foo$ quoted strings
 */




/*
 * Definitions --- these generally must match the core lexer, but in some
 * cases we can simplify, since we only care about identifying the token
 * boundaries and not about deriving the represented value.  Also, we
 * aren't trying to lex multicharacter operators so their interactions
 * with comments go away.
 */
/* This is a simpler treatment of quoted identifiers than the core uses */
#line 1266 "/build/postgresql/build/../src/pl/plpgsql/src/pl_scan.c"

#define INITIAL 0
#define xc 1
#define xe 2
#define xq 3
#define xdolq 4

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

#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif

static int yy_init_globals (void );

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

int 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
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif

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

/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
 * is returned in "result".
 */
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		size_t 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 128 "/build/postgresql/build/../src/pl/plpgsql/src/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 = false;

    /* ----------
     * The keyword rules
     * ----------
     */
#line 1479 "/build/postgresql/build/../src/pl/plpgsql/src/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 >= 393 )
					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 != 392 );
		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 148 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_ASSIGN;			}
	YY_BREAK
case 2:
YY_RULE_SETUP
#line 149 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_ASSIGN;			}
	YY_BREAK
case 3:
YY_RULE_SETUP
#line 150 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_DOTDOT;			}
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 151 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_ALIAS;			}
	YY_BREAK
case 5:
YY_RULE_SETUP
#line 152 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_BEGIN;			}
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 153 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_BY;   			}
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 154 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_CASE;			}
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 155 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_CLOSE;			}
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 156 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_CONSTANT;		}
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 157 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_CONTINUE;		}
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 158 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_CURSOR;			}
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 159 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_DECLARE;			}
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 160 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_DEFAULT;			}
	YY_BREAK
case 14:
YY_RULE_SETUP
#line 161 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_DIAGNOSTICS;		}
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 162 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_ELSE;			}
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 163 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_ELSIF;			}
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 164 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_ELSIF;			}
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 165 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_END;				}
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 166 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_EXCEPTION;		}
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 167 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_EXECUTE;			}
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 168 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_EXIT;			}
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 169 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_FETCH;			}
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 170 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_FOR;				}
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 171 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_FROM;			}
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 172 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_GET;				}
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 173 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_IF;				}
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 174 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_IN;				}
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 175 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_INSERT;			}
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 176 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_INTO;			}
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 177 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_IS;				}
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 178 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_LOOP;			}
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 179 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_MOVE;			}
	YY_BREAK
case 33:
/* rule 33 can match eol */
YY_RULE_SETUP
#line 180 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_NOSCROLL;		}
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 181 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_NOT;				}
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 182 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_NULL;			}
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 183 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_OPEN;			}
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 184 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_OR;				}
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 185 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_PERFORM;			}
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 186 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_RAISE;			}
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 187 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_RENAME;			}
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 188 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_RESULT_OID;		}
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 189 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_RETURN;			}
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 190 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_REVERSE;			}
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 191 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_ROW_COUNT;		}
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 192 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_SCROLL;			}
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 193 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_STRICT;	    	}
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 194 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_THEN;			}
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 195 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_TO;				}
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 196 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_TYPE;			}
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 197 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_USING;			}
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 198 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_WHEN;			}
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 199 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return K_WHILE;			}
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 201 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return O_OPTION;			}
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 202 "/build/postgresql/build/../src/pl/plpgsql/src/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 55:
/* rule 55 can match eol */
YY_RULE_SETUP
#line 212 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_word(plpgsql_base_yytext); }
	YY_BREAK
case 56:
/* rule 56 can match eol */
YY_RULE_SETUP
#line 215 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_dblword(plpgsql_base_yytext); }
	YY_BREAK
case 57:
/* rule 57 can match eol */
YY_RULE_SETUP
#line 218 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_tripword(plpgsql_base_yytext); }
	YY_BREAK
case 58:
/* rule 58 can match eol */
YY_RULE_SETUP
#line 221 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_wordtype(plpgsql_base_yytext); }
	YY_BREAK
case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
#line 224 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_dblwordtype(plpgsql_base_yytext); }
	YY_BREAK
case 60:
/* rule 60 can match eol */
YY_RULE_SETUP
#line 227 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_tripwordtype(plpgsql_base_yytext); }
	YY_BREAK
case 61:
/* rule 61 can match eol */
YY_RULE_SETUP
#line 230 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_wordrowtype(plpgsql_base_yytext); }
	YY_BREAK
case 62:
/* rule 62 can match eol */
YY_RULE_SETUP
#line 233 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_dblwordrowtype(plpgsql_base_yytext); }
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 236 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_word(plpgsql_base_yytext); }
	YY_BREAK
case 64:
/* rule 64 can match eol */
YY_RULE_SETUP
#line 239 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_dblword(plpgsql_base_yytext); }
	YY_BREAK
case 65:
/* rule 65 can match eol */
YY_RULE_SETUP
#line 242 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_tripword(plpgsql_base_yytext); }
	YY_BREAK
case 66:
/* rule 66 can match eol */
YY_RULE_SETUP
#line 245 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_wordtype(plpgsql_base_yytext); }
	YY_BREAK
case 67:
/* rule 67 can match eol */
YY_RULE_SETUP
#line 248 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_dblwordtype(plpgsql_base_yytext); }
	YY_BREAK
case 68:
/* rule 68 can match eol */
YY_RULE_SETUP
#line 251 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_tripwordtype(plpgsql_base_yytext); }
	YY_BREAK
case 69:
/* rule 69 can match eol */
YY_RULE_SETUP
#line 254 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_wordrowtype(plpgsql_base_yytext); }
	YY_BREAK
case 70:
/* rule 70 can match eol */
YY_RULE_SETUP
#line 257 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
	plpgsql_error_lineno = plpgsql_scanner_lineno();
	return plpgsql_parse_dblwordrowtype(plpgsql_base_yytext); }
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 261 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ return T_NUMBER;			}
	YY_BREAK
case 72:
YY_RULE_SETUP
#line 263 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ yyerror("unterminated quoted identifier"); }
	YY_BREAK
/* ----------
     * Ignore whitespace (including comments) but remember this happened
     * ----------
     */
case 73:
/* rule 73 can match eol */
YY_RULE_SETUP
#line 269 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ plpgsql_SpaceScanned = true; }
	YY_BREAK
/* ----------
     * Comment and literal handling is mostly copied from the core lexer
     * ----------
     */
case 74:
YY_RULE_SETUP
#line 275 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					/* Set location in case of syntax error in comment */
					SAVE_TOKEN_START();
					xcdepth = 0;
					BEGIN(xc);
					plpgsql_SpaceScanned = true;
				}
	YY_BREAK
case 75:
YY_RULE_SETUP
#line 283 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					xcdepth++;
				}
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 287 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					if (xcdepth <= 0)
						BEGIN(INITIAL);
					else
						xcdepth--;
				}
	YY_BREAK
case 77:
/* rule 77 can match eol */
YY_RULE_SETUP
#line 294 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					/* ignore */
				}
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 298 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					/* ignore */
				}
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 302 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					/* ignore */
				}
	YY_BREAK
case YY_STATE_EOF(xc):
#line 306 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ yyerror("unterminated /* comment"); }
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 308 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					SAVE_TOKEN_START();
					if (standard_conforming_strings)
						BEGIN(xq);
					else
						BEGIN(xe);
				}
	YY_BREAK
case 81:
YY_RULE_SETUP
#line 315 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					SAVE_TOKEN_START();
					BEGIN(xe);
				}
	YY_BREAK
case 82:
/* rule 82 can match eol */
#line 320 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
case 83:
/* rule 83 can match eol */
YY_RULE_SETUP
#line 320 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					yyless(1);
					BEGIN(INITIAL);
					/* adjust plpgsql_base_yytext/plpgsql_base_yyleng to describe whole string token */
					plpgsql_base_yyleng += (plpgsql_base_yytext - start_charpos);
					plpgsql_base_yytext = start_charpos;
					return T_STRING;
				}
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 328 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
				}
	YY_BREAK
case 85:
/* rule 85 can match eol */
YY_RULE_SETUP
#line 330 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
				}
	YY_BREAK
case 86:
/* rule 86 can match eol */
YY_RULE_SETUP
#line 332 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
				}
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 334 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
				}
	YY_BREAK
case 88:
/* rule 88 can match eol */
YY_RULE_SETUP
#line 336 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					/* ignore */
				}
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 339 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					/* This is only needed for \ just before EOF */
				}
	YY_BREAK
case YY_STATE_EOF(xq):
case YY_STATE_EOF(xe):
#line 342 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ yyerror("unterminated quoted string"); }
	YY_BREAK
case 90:
YY_RULE_SETUP
#line 344 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					SAVE_TOKEN_START();
					dolqstart = pstrdup(plpgsql_base_yytext);
					BEGIN(xdolq);
				}
	YY_BREAK
case 91:
YY_RULE_SETUP
#line 349 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					/* throw back all but the initial "$" */
					yyless(1);
					/* and treat it as {other} */
					return plpgsql_base_yytext[0];
				}
	YY_BREAK
case 92:
YY_RULE_SETUP
#line 355 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					if (strcmp(plpgsql_base_yytext, dolqstart) == 0)
					{
						pfree(dolqstart);
						BEGIN(INITIAL);
						/* adjust plpgsql_base_yytext/plpgsql_base_yyleng to describe whole string */
						plpgsql_base_yyleng += (plpgsql_base_yytext - start_charpos);
						plpgsql_base_yytext = start_charpos;
						return T_STRING;
					}
					else
					{
						/*
						 * When we fail to match $...$ to dolqstart, transfer
						 * the $... part to the output, but put back the final
						 * $ for rescanning.  Consider $delim$...$junk$delim$
						 */
						yyless(plpgsql_base_yyleng-1);
					}
				}
	YY_BREAK
case 93:
/* rule 93 can match eol */
YY_RULE_SETUP
#line 375 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
				}
	YY_BREAK
case 94:
YY_RULE_SETUP
#line 377 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
				}
	YY_BREAK
case 95:
YY_RULE_SETUP
#line 379 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					/* This is only needed for $ inside the quoted text */
				}
	YY_BREAK
case YY_STATE_EOF(xdolq):
#line 382 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{ yyerror("unterminated dollar-quoted string"); }
	YY_BREAK
/* ----------
     * Any unmatched character is returned as is
     * ----------
     */
case 96:
YY_RULE_SETUP
#line 388 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
{
					return plpgsql_base_yytext[0];
				}
	YY_BREAK
case 97:
YY_RULE_SETUP
#line 392 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 2206 "/build/postgresql/build/../src/pl/plpgsql/src/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 >= 393 )
				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 >= 393 )
			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 == 392);

	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 yybytes the byte buffer to scan
 * @param _yybytes_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 392 "/build/postgresql/build/../src/pl/plpgsql/src/scan.l"




/*
 * This is the plpgsql_base_yylex routine called from outside. It exists to provide
 * a one-token pushback facility.  Beware of trying to make it do more:
 * for the most part, plpgsql's gram.y assumes that plpgsql_base_yytext is in step
 * with the "current token".
 */
int
plpgsql_yylex(void)
{
	if (have_pushback_token)
	{
		have_pushback_token = false;
		return pushback_token;
	}
	return plpgsql_base_yylex();
}

/*
 * Push back a single token to be re-read by next plpgsql_yylex() call.
 *
 * NOTE: this does not cause plpgsql_base_yytext to "back up".
 */
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;
}

/*
 * Report a syntax error.
 */
void
plpgsql_yyerror(const char *message)
{
	const char *loc = plpgsql_base_yytext;
	int			cursorpos;

	plpgsql_error_lineno = plpgsql_scanner_lineno();

	/* in multibyte encodings, return index in characters not bytes */
	cursorpos = pg_mbstrlen_with_len(scanbuf, loc - scanbuf) + 1;

	if (*loc == YY_END_OF_BUFFER_CHAR)
	{
		ereport(ERROR,
				(errcode(ERRCODE_SYNTAX_ERROR),
				 /* translator: %s is typically the translation of "syntax error" */
				 errmsg("%s at end of input", _(message)),
				 internalerrposition(cursorpos),
				 internalerrquery(scanstr)));
	}
	else
	{
		ereport(ERROR,
				(errcode(ERRCODE_SYNTAX_ERROR),
				 /* translator: first %s is typically the translation of "syntax error" */
				 errmsg("%s at or near \"%s\"", _(message), loc),
				 internalerrposition(cursorpos),
				 internalerrquery(scanstr)));
	}
}

/*
 * 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
 *
 * Note: the passed "str" must remain valid until plpgsql_scanner_finish().
 * Although it is not fed directly to flex, we need the original string
 * to cite in error messages.
 */
void
plpgsql_scanner_init(const char *str)
{
	Size	slen;

	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 */
	scanstr = str;

	have_pushback_token = false;

	cur_line_start = scanbuf;
	cur_line_num = 1;

	/*----------
	 * 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 (*cur_line_start == '\r')
        cur_line_start++;
    if (*cur_line_start == '\n')
        cur_line_start++;

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

