#line 1 "kdev-pg-lexer.cc"

#line 3 "kdev-pg-lexer.cc"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 4
#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

#ifndef SIZE_MAX
#define SIZE_MAX               (~(size_t)0)
#endif

#endif /* ! C99 */

#endif /* ! FLEXINT_H */

/* begin standard C++ headers. */

/* TODO: this is always defined, so inline it */
#define yyconst const

#if defined(__GNUC__) && __GNUC__ >= 3
#define yynoreturn __attribute__((__noreturn__))
#else
#define yynoreturn
#endif

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

/* Promotes a possibly negative, possibly signed char to an
 *   integer in range [0..255] for use as an array index.
 */
#define YY_SC_TO_UI(c) ((YY_CHAR) (c))

/* Enter a start condition.  This macro really ought to take a parameter,
 * but we do it the disgusting crufty way forced on us by the ()-less
 * definition of BEGIN.
 */
#define BEGIN (yy_start) = 1 + 2 *
/* Translate the current start state into a value that can be later handed
 * to BEGIN to return to the state.  The YYSTATE alias is for lex
 * compatibility.
 */
#define YY_START (((yy_start) - 1) / 2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin  )
#define YY_END_OF_BUFFER_CHAR 0

/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#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

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

extern int yyleng;

extern FILE *yyin, *yyout;

#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
    
    #define YY_LESS_LINENO(n)
    #define YY_LINENO_REWIND_TO(ptr)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up yytext. */ \
        int yyless_macro_arg = (n); \
        YY_LESS_LINENO(yyless_macro_arg);\
		*yy_cp = (yy_hold_char); \
		YY_RESTORE_YY_MORE_OFFSET \
		(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
		} \
	while ( 0 )
#define unput(c) yyunput( c, (yytext_ptr)  )

#ifndef YY_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.
	 */
	int yy_buf_size;

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

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

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

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

    int yy_bs_lineno; /**< The line count. */
    int yy_bs_column; /**< The column count. */

	/* Whether to try to fill the input buffer when we reach the
	 * end of it.
	 */
	int yy_fill_buffer;

	int yy_buffer_status;

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

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

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

/* We provide macros for accessing buffer states in case in the
 * future we want to put the buffer states in a more general
 * "scanner state".
 *
 * Returns the top of the stack, or NULL.
 */
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
                          ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
                          : NULL)
/* Same as previous macro, but useful when we know that the buffer stack is not
 * NULL or when we need an lvalue. For internal use only.
 */
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]

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

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

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

void yyrestart ( FILE *input_file  );
void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer  );
YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size  );
void yy_delete_buffer ( YY_BUFFER_STATE b  );
void yy_flush_buffer ( YY_BUFFER_STATE b  );
void yypush_buffer_state ( YY_BUFFER_STATE new_buffer  );
void yypop_buffer_state ( void );

static void yyensure_buffer_stack ( void );
static void yy_load_buffer_state ( void );
static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file  );
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )

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

void *yyalloc ( yy_size_t  );
void *yyrealloc ( void *, yy_size_t  );
void yyfree ( void *  );

#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        yyensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            yy_create_buffer( yyin, YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
	}
#define yy_set_bol(at_bol) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){\
        yyensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            yy_create_buffer( yyin, YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
	}
#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

/* Begin user sect3 */
typedef flex_uint8_t YY_CHAR;

FILE *yyin = NULL, *yyout = NULL;

typedef int yy_state_type;

extern int yylineno;
int yylineno = 1;

extern char *yytext;
#ifdef yytext_ptr
#undef yytext_ptr
#endif
#define yytext_ptr yytext

static yy_state_type yy_get_previous_state ( void );
static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  );
static int yy_get_next_buffer ( void );
static void yynoreturn yy_fatal_error ( const char* msg  );

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up yytext.
 */
#define YY_DO_BEFORE_ACTION \
	(yytext_ptr) = yy_bp; \
	(yytext_ptr) -= (yy_more_len); \
	yyleng = (int) (yy_cp - (yytext_ptr)); \
	(yy_hold_char) = *yy_cp; \
	*yy_cp = '\0'; \
	(yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 139
#define YY_END_OF_BUFFER 140
/* 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 const flex_int16_t yy_acclist[518] =
    {   0,
        1,    1,  131,  131,   59,   59,  107,  107,  110,  110,
      126,  126,  140,  138,  139,    1,  138,  139,    2,  139,
        2,  138,  139,  138,  139,   13,  138,  139,  138,  139,
       22,  138,  139,    7,  138,  139,    8,  138,  139,   18,
      138,  139,   17,  138,  139,   11,  138,  139,  138,  139,
       14,  138,  139,   12,  136,  138,  139,  136,  138,  139,
       15,  138,  139,    4,  138,  139,   16,  138,  139,   19,
      138,  139,   20,  138,  139,  134,  135,  138,  139,   71,
      138,  139,  135,  138,  139,  135,  138,  139,  135,  138,
      139,    9,  138,  139,   21,  138,  139,   10,  138,  139,

      131,  139,  130,  139,  130,  139,  132,  139,   70,  139,
       59,   70,  139,   60,  139,   60,   70,  139,   61,   70,
      139,   69,   70,  139,   70,  139,   70,  139,   70,  139,
       70,  139,  107,  139,  104,  139,  104,  139,  106,  139,
      108,  139,  109,  139,  124,  139,  110,  124,  139,  111,
      139,  111,  124,  139,  114,  124,  139,  124,  139,  122,
      124,  139,  113,  124,  139,  121,  124,  139,  122,  124,
      139,  123,  124,  139,  122,  124,  139,  122,  124,  139,
      122,  124,  139,  122,  124,  139,  122,  124,  139,  126,
      128,  139,  125,  139,  125,  128,  139,  127,  128,  139,

      139,  102,  139,   73,  139,   73,  139,  139,  139,   85,
      139,   79,  139,   80,  139,   87,  139,   88,  139,  139,
       90,  139,  101,  139,16484,   76,  139,   81,  139,   89,
      139,  101,  139,16483,16484,   77,  139,  139,   78,  139,
       83,  139,  139,   82,  139,   86,  139,    1,    2,  137,
       52,   53,    3,    5,    6,  136,    4,  135,  134,  135,
      129,  135,  135,  131,  130,  132,  132,  133,   59,   60,
      107,  104,  105,  110,  111,  112,  122,  113,  122,  122,
      122,  122,  122,  122,  122,  126,  125,   73,  103,   72,
       91,  101,16484, 8292,16459,   76, 8291, 8292,  101,16483,

    16484,   98,  101,  101,  101,  101,  101,  137,    3,  135,
      135,  105,  112,  122,  122,  122,  122,  122,  122,  103,
       97,   96,   72,   84,  101,  101,  101,  101,  101, 8267,
      101,  101,  101,  101,   74,   46,   47,  135,   68,  122,
      122,  118,  122,  122,  122,  122,   84,   84,   84,   84,
      101,  101,  101,  101,  101,  101,  101,  101,   54,   48,
       49,   25,  135,  122,  122,  122,  119,  122,  122,   93,
       84,   84,   84,   84,  101,  101,  101,  101,  101,  101,
      101,   58,   50,   55,   28,   62,  122,  115,  122,  122,
      122,   94,   95,   84,   84,   84,   84,  101,  101,  101,

      101,  101,  101,   56,   63,  122,  122,  122,   84,   84,
       84,  101,  101,  101,  101,  101,  101,   57,  117,  122,
      122,  120,  122,   84,   84,   84,  101,  101,  101,  101,
      101,  101,   43,   51,   64,  116,  122,   92,   84,   84,
       84,  101,  101,  101,  101,  101,   30,   67,   84,   84,
      101,  101,  101,   37,   45,   32,   23,   66,   65,   84,
       84,  101,  101,   44,   31,   41,   24,   84,  101,  101,
       26,   33,   29,   84,  101,  101,   84,  101,  101,   40,
       42,   84,  101,  101,   84,  101,  101,   84,  101,  101,
       34,   39,   84,  101,  101,   36,   84,  101,  101,   27,

       84,  101,  101,   84,  101,  101,   84,  101,  101,   84,
      101,  101,   84,  101,   38,   84,   35
    } ;

static const flex_int16_t yy_accept[670] =
    {   0,
        1,    2,    3,    4,    5,    6,    7,    8,    9,   10,
       11,   12,   13,   13,   13,   14,   16,   19,   21,   24,
       26,   29,   31,   34,   37,   40,   43,   46,   49,   51,
       54,   58,   61,   64,   67,   70,   73,   76,   80,   83,
       86,   89,   92,   95,   98,  101,  103,  105,  107,  109,
      111,  114,  116,  119,  122,  125,  127,  129,  131,  133,
      135,  137,  139,  141,  143,  145,  147,  150,  152,  155,
      158,  160,  163,  166,  169,  172,  175,  178,  181,  184,
      187,  190,  193,  195,  198,  201,  202,  204,  206,  208,
      209,  210,  212,  214,  216,  218,  220,  221,  223,  226,

      228,  230,  232,  236,  238,  239,  241,  243,  244,  246,
      248,  249,  250,  250,  251,  251,  252,  253,  253,  253,
      253,  253,  253,  253,  253,  253,  253,  253,  254,  255,
      256,  257,  258,  259,  261,  262,  263,  264,  265,  266,
      267,  268,  269,  270,  271,  271,  271,  271,  271,  271,
      272,  273,  273,  274,  274,  275,  276,  277,  278,  279,
      280,  281,  282,  283,  284,  285,  286,  287,  288,  289,
      289,  290,  290,  290,  290,  290,  290,  290,  291,  292,
      292,  292,  294,  295,  295,  296,  296,  297,  297,  299,
      302,  303,  304,  305,  306,  307,  308,  308,  308,  309,

      309,  309,  309,  309,  309,  309,  309,  309,  309,  309,
      309,  309,  309,  309,  309,  309,  310,  311,  312,  312,
      312,  312,  312,  312,  312,  312,  312,  313,  313,  314,
      315,  316,  317,  318,  319,  320,  320,  321,  321,  322,
      322,  322,  322,  323,  323,  324,  325,  325,  326,  327,
      328,  329,  330,  331,  331,  332,  333,  334,  335,  335,
      336,  336,  337,  337,  337,  337,  337,  337,  337,  337,
      337,  337,  338,  338,  338,  338,  338,  338,  338,  339,
      339,  340,  340,  340,  340,  340,  340,  340,  341,  342,
      344,  345,  346,  347,  347,  347,  347,  347,  348,  349,

      350,  351,  352,  353,  354,  355,  355,  356,  357,  358,
      359,  359,  359,  359,  359,  359,  360,  360,  360,  360,
      360,  361,  361,  361,  361,  361,  362,  362,  364,  364,
      364,  364,  364,  364,  364,  364,  365,  366,  367,  369,
      370,  370,  370,  371,  371,  372,  373,  374,  375,  376,
      377,  378,  379,  380,  381,  382,  382,  382,  382,  382,
      382,  382,  382,  383,  383,  384,  384,  384,  385,  385,
      385,  386,  386,  386,  386,  386,  386,  386,  386,  387,
      388,  390,  391,  392,  392,  393,  394,  395,  396,  397,
      398,  399,  400,  401,  402,  403,  404,  404,  404,  404,

      404,  404,  405,  405,  405,  405,  405,  405,  405,  405,
      405,  405,  405,  405,  405,  405,  405,  406,  406,  407,
      408,  409,  409,  410,  411,  412,  413,  414,  415,  416,
      417,  418,  418,  418,  418,  418,  418,  418,  419,  419,
      419,  419,  419,  419,  419,  419,  419,  419,  419,  419,
      419,  419,  419,  419,  419,  421,  422,  424,  424,  425,
      426,  427,  428,  429,  430,  431,  432,  433,  434,  434,
      434,  434,  434,  434,  434,  434,  434,  434,  434,  434,
      434,  434,  435,  435,  435,  435,  435,  435,  435,  435,
      435,  436,  438,  439,  440,  441,  442,  443,  444,  445,

      446,  447,  447,  447,  447,  447,  447,  447,  447,  447,
      447,  448,  448,  448,  448,  448,  448,  448,  448,  448,
      448,  448,  448,  449,  450,  451,  452,  453,  454,  454,
      455,  455,  455,  455,  456,  456,  456,  457,  457,  457,
      457,  457,  457,  457,  457,  458,  458,  459,  460,  461,
      462,  463,  464,  464,  464,  464,  464,  464,  464,  465,
      465,  465,  466,  466,  467,  467,  468,  469,  470,  471,
      471,  472,  472,  473,  473,  473,  473,  473,  473,  474,
      475,  476,  477,  477,  477,  477,  477,  477,  477,  477,
      477,  478,  479,  480,  480,  480,  481,  481,  481,  481,

      481,  482,  483,  484,  485,  485,  485,  485,  485,  485,
      485,  486,  487,  488,  488,  488,  488,  488,  488,  488,
      489,  490,  491,  492,  492,  493,  493,  493,  493,  494,
      495,  496,  496,  496,  497,  497,  498,  499,  500,  501,
      501,  501,  502,  503,  504,  504,  504,  505,  506,  507,
      507,  507,  508,  509,  510,  510,  510,  511,  512,  513,
      513,  513,  514,  515,  516,  516,  517,  518,  518
    } ;

static const YY_CHAR 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,    5,    6,    7,    8,    6,    9,   10,    6,   11,
       12,   13,   14,   15,   16,   17,   18,   19,   20,   21,
       21,   21,   21,   21,   21,   22,   22,   23,   24,   25,
       26,   27,   28,   29,   30,   30,   30,   31,   30,   30,
       32,   32,   32,   32,   32,   33,   32,   32,   34,   32,
       32,   35,   32,   32,   36,   32,   32,   36,   37,   32,
       38,   39,   40,   41,   42,    6,   43,   44,   45,   46,

       47,   48,   49,   50,   51,   52,   53,   54,   55,   56,
       57,   58,   59,   60,   61,   62,   63,   64,   52,   65,
       66,   52,   67,   68,   69,   70,    6,    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,
        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,    1,    1
    } ;

static const YY_CHAR yy_meta[71] =
    {   0,
        1,    2,    3,    3,    4,    5,    6,    5,    5,    5,
        5,    5,    5,    5,    5,    7,    5,    5,    8,    8,
        8,    8,    9,   10,    5,    5,    5,    5,    5,   11,
       11,   12,   12,   12,   12,   12,   12,    6,   13,    6,
        5,   12,   11,   11,   11,   11,   11,   11,   12,   12,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
       12,   12,   12,   12,   12,   12,    5,    5,   14,    5
    } ;

static const flex_int16_t yy_base[704] =
    {   0,
        0,    0,   68,   70,   73,   77,   92,   98,  138,    0,
       83,  100,  208,    0, 1820, 1821,   92, 1821, 1816,   76,
     1821,  254, 1821, 1821, 1821, 1821, 1821, 1821,   82, 1792,
       91,  106, 1821, 1793, 1821, 1821, 1821,  252, 1793,    0,
     1772, 1754, 1821, 1821, 1821,    0, 1821, 1810,   93, 1821,
      132, 1821, 1809, 1821, 1821, 1760, 1753, 1762,  230,    0,
     1821, 1805,  284, 1821, 1821, 1821,  290, 1821, 1804, 1821,
     1790,    0,  294, 1821,  298, 1821,  305,  309,  313,  317,
      323,    0, 1821, 1802, 1821, 1821, 1821, 1821, 1801,  302,
      259, 1821, 1821, 1821, 1821, 1821,  284, 1821,  344,  373,

     1821, 1821,  396, 1780,  348, 1821, 1821,    0, 1821, 1821,
      348, 1821,  315, 1821,  333, 1821, 1821, 1741, 1750, 1735,
      296, 1752, 1755,  330, 1746, 1749,  312,    0, 1821, 1821,
      387, 1771,    0,  409, 1821, 1732, 1727,    0, 1821,  340,
      348, 1821,  356, 1821, 1730, 1735,   45,   57, 1746,    0,
     1821,  379, 1821,  384,  390, 1821,    0,    0,  391,  428,
      433,  437,  441,  445,  449,  453,    0, 1821, 1821,  395,
     1821,  397, 1746, 1731, 1731, 1743,  372,    0, 1821,  474,
     1746,  481, 1821,  470,  506, 1768,  521,  491, 1821, 1767,
     1821,  464,  522,  530,  554,  538, 1713,  482,  492,  521,

     1719, 1724, 1721, 1720,  389,  464, 1722, 1716, 1714,  370,
     1725, 1714, 1728, 1711, 1717,    0, 1724, 1750, 1706, 1705,
     1711, 1702, 1699, 1700, 1707,  525,  527,  532,    0,  559,
      567,  584,  588,  593,  597,  533,  552,  555, 1821, 1704,
     1697, 1707, 1821, 1714,    0, 1821,  590,  475,  613,  622,
      646,  644, 1732,  514,  659,  666,  687,  680, 1686, 1821,
     1712, 1821, 1696, 1689, 1704, 1699, 1687, 1701, 1700,  320,
     1684, 1821, 1688, 1694, 1680, 1688, 1685, 1693, 1689, 1678,
     1821, 1675, 1693, 1675, 1691, 1686, 1681,  682,  650,  691,
      701,  705,  719, 1669, 1683, 1675, 1664,  723,  630,    0,

      528,  730,  744,  765,  737,  549,  751,  758,  795,  782,
      744, 1667, 1664, 1677, 1675, 1821, 1663, 1661, 1665, 1673,
     1821, 1659, 1656, 1670, 1669, 1821, 1659,    0,  508, 1654,
     1653, 1649, 1649, 1665, 1664,  784,  808,  813,  825,  830,
     1657, 1647, 1821, 1659,  834,  638,    0,  548,  841,  850,
      871,  856,  865,  901,  887, 1662, 1639, 1656, 1640, 1659,
     1638, 1649,  550, 1640, 1821, 1637, 1645, 1821, 1639, 1652,
     1651, 1647, 1637, 1627, 1646, 1643, 1640, 1624, 1821,  877,
      889,  908,  915, 1629, 1821, 1821,  919,  695,    0,  563,
      934,  955,  941,  943,  985,  951, 1623, 1621, 1639, 1639,

      576, 1821, 1592,  444, 1597, 1607,  583, 1583, 1599, 1573,
     1565, 1556, 1545, 1540, 1509, 1495, 1821, 1496,  972,  989,
      998, 1462, 1002,    0,  625, 1019, 1040, 1027, 1034, 1070,
     1056, 1475, 1461, 1460, 1444, 1436, 1425, 1821,   49, 1439,
     1439, 1436,  722, 1414, 1391, 1407, 1393, 1370, 1362, 1377,
     1358, 1356, 1290, 1300, 1058, 1077, 1083, 1298, 1087,    0,
      654, 1103, 1125, 1110, 1112,  720, 1119, 1821, 1301, 1296,
     1299, 1296, 1279, 1276, 1274, 1290, 1273, 1286,  704, 1284,
     1287, 1821, 1285, 1258, 1262, 1264, 1267, 1242, 1241, 1227,
     1821, 1140, 1821, 1144,    0,  709, 1158,  783, 1165,  784,

     1167, 1244, 1215, 1229, 1206, 1215, 1204, 1189, 1190, 1178,
     1821, 1177, 1165, 1181, 1164, 1170, 1173, 1171, 1154, 1167,
     1143, 1144, 1821, 1169,  761,  820, 1176, 1182, 1144, 1821,
     1134, 1147, 1139, 1821, 1134, 1132, 1821, 1120, 1091, 1094,
     1080, 1089, 1067, 1078, 1821, 1067, 1821, 1821, 1821,  773,
     1189, 1191, 1065, 1054, 1059, 1039, 1043, 1022, 1821, 1039,
     1031, 1821, 1004, 1821, 1008, 1821,  799, 1197, 1203, 1002,
     1010,  988, 1821,  995,  984,  964,  937,  925, 1821,  845,
     1213, 1215,  924,  902,  856,  857,  832,  841,  836,  807,
      858, 1221, 1227,  811,  801, 1821,  791,  773,  777,  745,

     1821,  863, 1229, 1237,  729,  739,  728,  697,  702,  644,
      893, 1239, 1245,  627,  638,  594,  583,  583,  563,  905,
     1251, 1253, 1821,  549, 1821,  548,  503,  500,  923, 1261,
     1263,  459,  431, 1821,  395,  959, 1269, 1275, 1821,  378,
      366,  964, 1277, 1285,  367,  356,  968, 1287, 1293,  316,
      308,  976, 1299, 1301,  274,  256,  993, 1309,  942,  220,
       82, 1006,  950, 1821,   60, 1821, 1821, 1821, 1348, 1362,
     1376, 1390, 1404, 1411, 1423, 1437, 1451, 1465, 1472, 1477,
     1489, 1503, 1516, 1526, 1025, 1540, 1554, 1568, 1582, 1596,
     1610, 1617, 1627, 1635, 1641, 1652, 1666, 1040, 1056, 1057,

     1129, 1142, 1146
    } ;

static const flex_int16_t yy_def[704] =
    {   0,
      668,    1,  669,  669,  670,  670,  671,  671,  668,    9,
      672,  672,  668,   13,  668,  668,  668,  668,  668,  673,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  674,  668,  674,
      674,  674,  668,  668,  668,  675,  668,  668,  676,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  677,
      668,  668,  678,  668,  668,  668,  668,  668,  668,  668,
      668,  679,  668,  668,  680,  668,  680,  680,  680,  680,
      680,  681,  668,  668,  668,  668,  668,  668,  668,  682,
      668,  668,  668,  668,  668,  668,  668,  668,  683,  668,

      668,  668,  683,  668,  684,  668,  668,  685,  668,  668,
      668,  668,  673,  668,  686,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  687,  668,  668,
      668,  668,  674,  674,  668,  674,  674,  675,  668,  676,
      676,  668,  668,  668,  668,  668,  668,  668,  668,  677,
      668,  678,  668,  688,  668,  668,  689,  679,  668,  680,
      680,  680,  680,  680,  680,  680,  681,  668,  668,  682,
      668,  690,  668,  668,  668,  668,  668,  691,  668,  668,
      692,  683,  668,  693,  668,  668,  668,  668,  668,  103,
      668,  694,  694,  694,  694,  694,  695,  673,  673,  686,

      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  687,  674,  674,  668,  668,
      668,  668,  668,  668,  668,  678,  678,  688,  689,  680,
      680,  680,  680,  680,  680,  682,  682,  690,  668,  668,
      668,  668,  668,  668,  691,  668,  696,  694,  694,  694,
      195,  694,  668,  697,  694,  694,  195,  694,  695,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  674,  668,
      668,  668,  668,  668,  668,  668,  668,  680,  680,  680,
      680,  680,  680,  668,  668,  668,  668,  668,  668,  698,

      668,  694,  694,  251,  694,  697,  694,  694,  195,  694,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  674,  668,  668,
      668,  668,  668,  668,  668,  680,  680,  680,  680,  680,
      668,  668,  668,  668,  668,  668,  699,  668,  694,  694,
      251,  694,  694,  195,  694,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  680,
      680,  680,  680,  668,  668,  668,  668,  668,  700,  668,
      694,  251,  694,  694,  195,  694,  668,  668,  668,  668,

      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  680,  680,
      680,  668,  668,  701,  668,  694,  251,  694,  694,  195,
      694,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  680,  680,  680,  668,  668,  702,
      668,  694,  251,  694,  694,  694,  694,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  680,  668,  668,  703,  668,  694,  694,  694,  694,

      694,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  694,  694,  694,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      694,  694,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  694,  694,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      694,  694,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  694,  694,  668,  668,  668,  668,  668,  668,  668,

      668,  668,  694,  694,  668,  668,  668,  668,  668,  668,
      668,  694,  694,  668,  668,  668,  668,  668,  668,  668,
      694,  694,  668,  668,  668,  668,  668,  668,  668,  694,
      694,  668,  668,  668,  668,  668,  694,  694,  668,  668,
      668,  668,  694,  694,  668,  668,  668,  694,  694,  668,
      668,  668,  694,  694,  668,  668,  668,  694,  694,  668,
      668,  668,  694,  668,  668,  668,  668,    0,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,

      668,  668,  668
    } ;

static const flex_int16_t yy_nxt[1892] =
    {   0,
       16,   17,   18,   19,   17,   16,   20,   21,   22,   23,
       24,   25,   26,   27,   28,   29,   30,   16,   31,   32,
       32,   32,   33,   34,   16,   35,   16,   36,   37,   38,
       38,   38,   38,   38,   38,   38,   38,   39,   16,   16,
       16,   38,   40,   40,   41,   40,   40,   40,   40,   40,
       40,   40,   40,   40,   40,   40,   40,   40,   40,   40,
       40,   42,   40,   40,   40,   40,   43,   44,   45,   16,
       47,   48,   47,   48,   51,   52,   53,   51,   51,   52,
       53,   51,  114,   54,   55,   83,   84,   54,   55,  221,
       49,  474,   49,  111,   61,   62,  111,  128,   63,  475,

       61,   62,   83,   84,   63,  222,   85,  223,  129,  131,
      131,  131,  131,  224,  115,  141,   56,   57,   58,  667,
       56,   57,   58,   85,  131,  131,  131,  131,  665,   64,
       59,   65,  142,  143,   59,   64,  143,   65,   66,   67,
       68,   69,   67,   66,   66,   70,   66,   66,   66,   66,
       66,   66,   66,   71,   66,   66,   72,   72,   72,   72,
       73,   74,   66,   66,   66,   66,   66,   75,   75,   75,
       75,   75,   75,   75,   75,   66,   66,   76,   66,   75,
       77,   75,   75,   75,   75,   75,   75,   75,   75,   75,
       75,   75,   78,   79,   75,   75,   75,   75,   75,   80,

       75,   81,   75,   75,   66,   66,   66,   66,   86,   87,
       88,   89,   87,   86,   90,   86,   91,   92,   93,   94,
       95,   96,   86,   97,   98,   86,   99,   99,   99,   99,
       86,  100,   86,   86,   86,  101,  102,  103,  103,  103,
      103,  103,  103,  103,  103,  104,  105,  106,  107,  103,
       99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
       99,   99,   99,   99,   99,   99,   99,   99,   99,   99,
       99,   99,   99,   99,  108,  109,   86,  110,  116,  664,
      117,  134,  134,  134,  134,  134,  134,  134,  134,  148,
      153,  155,  149,  134,  155,  159,  118,  119,  159,  178,

      120,  661,  173,  174,  121,  175,  176,  122,  171,  123,
      179,  124,  177,  125,  126,  127,  158,  158,  158,  158,
      660,  114,  154,  158,  158,  158,  158,  158,  158,  158,
      158,  158,  158,  158,  158,  158,  158,  158,  158,  199,
      172,  158,  158,  158,  158,  180,  180,  180,  180,  111,
      656,  204,  111,  115,  213,  162,  205,  143,  214,  181,
      143,  655,  668,  164,  161,  166,  319,  183,  215,  163,
      141,  200,  208,  165,  185,  185,  185,  185,  193,  668,
      320,  194,  184,  195,  196,  153,  209,  668,  186,  210,
      227,  155,  159,  193,  155,  159,  187,  188,  188,  188,

      188,  171,  651,  237,  194,  131,  131,  131,  131,  650,
      195,  181,  195,  196,  243,  646,  272,  154,  244,  189,
      273,  265,  228,  266,  645,  190,  190,  190,  190,  190,
      190,  190,  190,  172,  184,  238,  641,  190,  134,  134,
      134,  134,  134,  134,  134,  134,  158,  158,  158,  158,
      134,  158,  158,  158,  158,  158,  158,  158,  158,  158,
      158,  158,  158,  158,  158,  158,  158,  158,  158,  158,
      158,  158,  158,  158,  158,  180,  180,  180,  180,  181,
      640,  230,  180,  180,  180,  180,  232,  439,  114,  440,
      668,  231,  188,  188,  188,  188,  668,  183,  114,  233,

      249,  234,  184,  250,  183,  251,  252,  185,  185,  185,
      185,  267,  235,  184,  189,  249,  185,  185,  639,  184,
      115,  186,  185,  185,  185,  185,  250,  199,  268,  253,
      115,  153,  251,  153,  251,  252,  186,  181,  227,  171,
      255,  255,  255,  255,  187,  181,  348,  348,  256,  256,
      256,  185,  185,  181,  372,  635,  258,  258,  171,  200,
      184,  237,  634,  154,  373,  154,  390,  390,  184,  181,
      228,  172,  257,  257,  257,  257,  184,  158,  158,  158,
      158,  425,  425,  257,  257,  158,  158,  158,  158,  633,
      172,  404,  184,  238,  405,  632,  257,  257,  257,  257,

      257,  257,  158,  158,  158,  158,  158,  158,  158,  158,
      289,  158,  158,  158,  158,  158,  158,  158,  158,  628,
      298,  288,  436,  299,  443,  300,  301,  444,  668,  627,
      290,  302,  302,  302,  302,  298,  437,  668,  626,  292,
      303,  303,  303,  461,  461,  291,  299,  293,  346,  346,
      346,  184,  300,  625,  300,  301,  388,  388,  388,  668,
      184,  668,  305,  305,  304,  304,  304,  304,  158,  158,
      158,  158,  496,  496,  181,  304,  304,  307,  307,  307,
      307,  181,  184,  624,  308,  308,  308,  623,  304,  304,
      304,  304,  304,  304,  619,  181,  337,  184,  310,  310,

      158,  158,  158,  158,  184,  309,  309,  309,  309,  158,
      158,  158,  158,  388,  388,  388,  309,  309,  184,  158,
      158,  158,  158,  158,  158,  158,  158,  525,  525,  309,
      309,  309,  309,  309,  309,  181,  336,  158,  158,  158,
      158,  345,  345,  345,  345,  668,  512,  618,  349,  349,
      349,  349,  668,  617,  513,  352,  352,  338,  184,  668,
      339,  340,  350,  350,  350,  479,  181,  480,  184,  353,
      353,  353,  353,  181,  616,  184,  308,  308,  308,  550,
      550,  615,  184,  351,  351,  351,  351,  356,  614,  184,
      357,  567,  567,  358,  351,  351,  184,  181,  668,  181,

      355,  355,  158,  158,  158,  158,  610,  351,  351,  351,
      351,  351,  351,  354,  354,  354,  354,  580,  580,  609,
      184,  184,  184,  608,  354,  354,  158,  158,  158,  158,
      380,  158,  158,  158,  158,  668,  607,  354,  354,  354,
      354,  354,  354,  158,  158,  158,  158,  606,  158,  158,
      158,  158,  387,  387,  387,  387,  668,  605,  184,  391,
      391,  391,  391,  591,  591,  668,  601,  381,  350,  350,
      350,  668,  382,  383,  393,  393,  602,  602,  600,  184,
      181,  611,  611,  394,  394,  394,  394,  599,  184,  392,
      392,  392,  392,  598,  184,  158,  158,  158,  158,  597,

      392,  392,  181,  184,  596,  396,  396,  158,  158,  158,
      158,  620,  620,  392,  392,  392,  392,  392,  392,  395,
      395,  395,  395,  629,  629,  184,  158,  158,  158,  158,
      395,  395,  419,  158,  158,  158,  158,  423,  423,  423,
      423,  636,  636,  395,  395,  395,  395,  395,  395,  668,
      420,  595,  426,  426,  426,  426,  668,  181,  181,  428,
      428,  429,  429,  429,  429,  668,  181,  594,  421,  431,
      431,  590,  184,  427,  427,  427,  427,  642,  642,  184,
      184,  184,  647,  647,  427,  427,  652,  652,  184,  184,
      158,  158,  158,  158,  657,  657,  589,  427,  427,  427,

      427,  427,  427,  430,  430,  430,  430,  158,  158,  158,
      158,  662,  662,  588,  430,  430,  158,  158,  158,  158,
      459,  459,  459,  459,  666,  666,  587,  430,  430,  430,
      430,  430,  430,  455,  668,  197,  197,  462,  462,  462,
      462,  586,  668,  585,  457,  464,  464,  347,  456,  181,
      347,  584,  465,  465,  465,  465,  583,  184,  463,  463,
      463,  463,  579,  389,  424,  184,  389,  424,  578,  463,
      463,  181,  184,  577,  467,  467,  158,  158,  158,  158,
      576,  575,  463,  463,  463,  463,  463,  463,  466,  466,
      466,  466,  574,  573,  184,  158,  158,  158,  158,  466,

      466,  158,  158,  158,  158,  494,  494,  494,  494,  572,
      571,  570,  466,  466,  466,  466,  466,  466,  668,  566,
      565,  497,  497,  497,  497,  668,  564,  181,  499,  499,
      500,  500,  500,  500,  181,  563,  460,  501,  501,  460,
      562,  184,  492,  498,  498,  498,  498,  561,  184,  495,
      184,  560,  495,  246,  498,  498,  246,  184,  158,  158,
      158,  158,  524,  524,  524,  524,  559,  498,  498,  498,
      498,  498,  498,  668,  558,  557,  526,  526,  526,  526,
      668,  556,  181,  527,  527,  528,  528,  549,  549,  549,
      549,  668,  555,  554,  551,  551,  184,  181,  553,  548,

      552,  552,  547,  184,  668,  184,  181,  568,  568,  569,
      569,  546,  668,  545,  184,  581,  581,  544,  181,  543,
      184,  582,  582,  542,  541,  540,  539,  184,  668,  184,
      181,  592,  592,  593,  593,  184,  668,  538,  537,  603,
      603,  184,  181,  536,  668,  604,  604,  612,  612,  535,
      534,  184,  181,  184,  668,  613,  613,  621,  621,  184,
      181,  533,  532,  622,  622,  184,  668,  184,  181,  630,
      630,  631,  631,  531,  530,  184,  668,  184,  181,  637,
      637,  638,  638,  184,  668,  529,  523,  643,  643,  184,
      181,  184,  668,  644,  644,  648,  648,  522,  521,  184,

      181,  184,  668,  649,  649,  653,  653,  184,  181,  520,
      519,  654,  654,  184,  668,  184,  181,  658,  658,  659,
      659,  518,  517,  184,  668,  184,  516,  663,  663,  515,
      514,  184,  511,  510,  509,  508,  507,  184,  506,  184,
      505,  504,  503,  502,  493,  491,  490,  184,   46,   46,
       46,   46,   46,   46,   46,   46,   46,   46,   46,   46,
       46,   46,   50,   50,   50,   50,   50,   50,   50,   50,
       50,   50,   50,   50,   50,   50,   60,   60,   60,   60,
       60,   60,   60,   60,   60,   60,   60,   60,   60,   60,
       82,   82,   82,   82,   82,   82,   82,   82,   82,   82,

       82,   82,   82,   82,  113,  113,  489,  113,  113,  113,
      113,  113,  113,  113,  113,  113,  113,  113,  133,  488,
      487,  133,  133,  138,  138,  486,  138,  138,  138,  138,
      138,  485,  138,  138,  138,  138,  138,  140,  140,  484,
      140,  140,  140,  140,  140,  140,  140,  140,  140,  140,
      140,  150,  150,  483,  150,  150,  482,  150,  150,  150,
      150,  150,  150,  150,  150,  152,  152,  481,  152,  152,
      152,  152,  152,  152,  152,  152,  152,  152,  152,  158,
      478,  477,  158,  158,  160,  476,  473,  160,  160,  167,
      167,  472,  167,  167,  167,  167,  167,  167,  471,  167,

      167,  167,  167,  170,  170,  470,  170,  170,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  182,  182,  182,
      469,  468,  182,  182,  458,  182,  182,  182,  182,  192,
      192,  192,  192,  192,  192,  192,  192,  192,  192,  192,
      198,  198,  454,  198,  198,  198,  198,  198,  198,  198,
      198,  198,  198,  198,  216,  216,  453,  216,  216,  216,
      216,  216,  216,  216,  216,  216,  216,  216,  226,  226,
      452,  226,  226,  226,  226,  226,  226,  226,  226,  226,
      226,  226,  229,  229,  451,  229,  229,  229,  229,  229,
      229,  229,  229,  229,  229,  229,  236,  236,  450,  236,

      236,  236,  236,  236,  236,  236,  236,  236,  236,  236,
      245,  245,  449,  245,  245,  245,  245,  245,  245,  245,
      245,  245,  245,  245,  246,  448,  447,  246,  246,  246,
      248,  248,  248,  248,  248,  248,  248,  248,  248,  248,
      248,  248,  248,  446,  445,  248,  248,  248,  259,  442,
      441,  259,  259,  438,  259,  246,  246,  246,  246,  246,
      246,  246,  246,  246,  246,  246,  306,  306,  306,  306,
      306,  306,  306,  306,  306,  306,  306,  306,  306,  306,
      435,  434,  433,  432,  422,  418,  417,  416,  415,  414,
      413,  412,  411,  410,  409,  408,  407,  406,  403,  402,

      401,  400,  399,  398,  397,  386,  385,  384,  379,  378,
      377,  376,  375,  374,  371,  370,  369,  368,  367,  366,
      365,  364,  363,  362,  361,  360,  359,  344,  343,  342,
      341,  335,  334,  333,  332,  331,  330,  329,  328,  327,
      326,  325,  324,  323,  322,  321,  318,  317,  316,  315,
      314,  313,  312,  311,  260,  253,  297,  296,  295,  294,
      287,  286,  285,  284,  283,  282,  281,  280,  279,  278,
      277,  276,  275,  274,  271,  270,  269,  264,  263,  262,
      261,  260,  668,  254,  247,  242,  241,  240,  239,  225,
      220,  219,  218,  217,  132,  212,  211,  207,  206,  203,

      202,  201,  191,  169,  168,  157,  156,  151,  147,  146,
      145,  144,  139,  137,  136,  135,  132,  130,  112,  668,
       15,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668

    } ;

static const flex_int16_t yy_chk[1892] =
    {   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,    1,    1,    1,    1,    1,    1,    1,
        3,    3,    4,    4,    5,    5,    5,    5,    6,    6,
        6,    6,   20,    5,    5,   11,   11,    6,    6,  147,
        3,  439,    4,   17,    7,    7,   17,   29,    7,  439,

        8,    8,   12,   12,    8,  147,   11,  148,   29,   31,
       31,   31,   31,  148,   20,   49,    5,    5,    5,  665,
        6,    6,    6,   12,   32,   32,   32,   32,  661,    7,
        5,    7,   49,   51,    6,    8,   51,    8,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,
        9,    9,    9,    9,    9,    9,    9,    9,    9,    9,

        9,    9,    9,    9,    9,    9,    9,    9,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   13,   13,
       13,   13,   13,   13,   13,   13,   13,   13,   22,  660,
       22,   38,   38,   38,   38,   38,   38,   38,   38,   59,
       63,   67,   59,   38,   67,   73,   22,   22,   73,   97,

       22,  656,   91,   91,   22,   91,   91,   22,   90,   22,
       97,   22,   91,   22,   22,   22,   75,   75,   75,   75,
      655,  113,   63,   77,   77,   77,   77,   78,   78,   78,
       78,   79,   79,   79,   79,   80,   80,   80,   80,  115,
       90,   81,   81,   81,   81,   99,   99,   99,   99,  111,
      651,  121,  111,  113,  127,   78,  121,  143,  127,   99,
      143,  650,  140,   80,   77,   81,  270,   99,  127,   79,
      141,  115,  124,   80,  100,  100,  100,  100,  105,  140,
      270,  105,   99,  105,  105,  152,  124,  141,  100,  124,
      154,  155,  159,  105,  155,  159,  100,  103,  103,  103,

      103,  170,  646,  172,  105,  131,  131,  131,  131,  645,
      105,  103,  105,  105,  177,  641,  210,  152,  177,  103,
      210,  205,  154,  205,  640,  103,  103,  103,  103,  103,
      103,  103,  103,  170,  103,  172,  635,  103,  134,  134,
      134,  134,  134,  134,  134,  134,  160,  160,  160,  160,
      134,  161,  161,  161,  161,  162,  162,  162,  162,  163,
      163,  163,  163,  164,  164,  164,  164,  165,  165,  165,
      165,  166,  166,  166,  166,  180,  180,  180,  180,  192,
      633,  161,  182,  182,  182,  182,  163,  404,  198,  404,
      248,  162,  188,  188,  188,  188,  182,  180,  199,  164,

      184,  165,  192,  184,  182,  184,  184,  185,  185,  185,
      185,  206,  166,  248,  188,  184,  254,  254,  632,  182,
      198,  185,  187,  187,  187,  187,  184,  200,  206,  185,
      199,  226,  184,  227,  184,  184,  187,  193,  228,  236,
      193,  193,  193,  193,  187,  194,  301,  301,  194,  194,
      194,  306,  306,  196,  329,  628,  196,  196,  237,  200,
      193,  238,  627,  226,  329,  227,  348,  348,  194,  195,
      228,  236,  195,  195,  195,  195,  196,  230,  230,  230,
      230,  390,  390,  195,  195,  231,  231,  231,  231,  626,
      237,  363,  195,  238,  363,  624,  195,  195,  195,  195,

      195,  195,  232,  232,  232,  232,  233,  233,  233,  233,
      231,  234,  234,  234,  234,  235,  235,  235,  235,  619,
      247,  230,  401,  247,  407,  247,  247,  407,  249,  618,
      232,  249,  249,  249,  249,  247,  401,  250,  617,  234,
      250,  250,  250,  425,  425,  233,  247,  235,  299,  299,
      299,  249,  247,  616,  247,  247,  346,  346,  346,  252,
      250,  251,  252,  252,  251,  251,  251,  251,  289,  289,
      289,  289,  461,  461,  255,  251,  251,  255,  255,  255,
      255,  256,  252,  615,  256,  256,  256,  614,  251,  251,
      251,  251,  251,  251,  610,  258,  289,  255,  258,  258,

      288,  288,  288,  288,  256,  257,  257,  257,  257,  290,
      290,  290,  290,  388,  388,  388,  257,  257,  258,  291,
      291,  291,  291,  292,  292,  292,  292,  496,  496,  257,
      257,  257,  257,  257,  257,  466,  288,  293,  293,  293,
      293,  298,  298,  298,  298,  302,  479,  609,  302,  302,
      302,  302,  305,  608,  479,  305,  305,  291,  466,  303,
      292,  293,  303,  303,  303,  443,  307,  443,  302,  307,
      307,  307,  307,  308,  607,  305,  308,  308,  308,  525,
      525,  606,  303,  304,  304,  304,  304,  311,  605,  307,
      311,  550,  550,  311,  304,  304,  308,  310,  498,  500,

      310,  310,  336,  336,  336,  336,  600,  304,  304,  304,
      304,  304,  304,  309,  309,  309,  309,  567,  567,  599,
      310,  498,  500,  598,  309,  309,  337,  337,  337,  337,
      336,  338,  338,  338,  338,  526,  597,  309,  309,  309,
      309,  309,  309,  339,  339,  339,  339,  595,  340,  340,
      340,  340,  345,  345,  345,  345,  349,  594,  526,  349,
      349,  349,  349,  580,  580,  350,  590,  337,  350,  350,
      350,  352,  338,  340,  352,  352,  591,  591,  589,  349,
      353,  602,  602,  353,  353,  353,  353,  588,  350,  351,
      351,  351,  351,  587,  352,  380,  380,  380,  380,  586,

      351,  351,  355,  353,  585,  355,  355,  381,  381,  381,
      381,  611,  611,  351,  351,  351,  351,  351,  351,  354,
      354,  354,  354,  620,  620,  355,  382,  382,  382,  382,
      354,  354,  380,  383,  383,  383,  383,  387,  387,  387,
      387,  629,  629,  354,  354,  354,  354,  354,  354,  391,
      382,  584,  391,  391,  391,  391,  393,  659,  394,  393,
      393,  394,  394,  394,  394,  663,  396,  583,  383,  396,
      396,  578,  391,  392,  392,  392,  392,  636,  636,  393,
      659,  394,  642,  642,  392,  392,  647,  647,  663,  396,
      419,  419,  419,  419,  652,  652,  577,  392,  392,  392,

      392,  392,  392,  395,  395,  395,  395,  420,  420,  420,
      420,  657,  657,  576,  395,  395,  421,  421,  421,  421,
      423,  423,  423,  423,  662,  662,  575,  395,  395,  395,
      395,  395,  395,  419,  426,  685,  685,  426,  426,  426,
      426,  574,  428,  572,  421,  428,  428,  698,  420,  429,
      698,  571,  429,  429,  429,  429,  570,  426,  427,  427,
      427,  427,  565,  699,  700,  428,  699,  700,  563,  427,
      427,  431,  429,  561,  431,  431,  455,  455,  455,  455,
      560,  558,  427,  427,  427,  427,  427,  427,  430,  430,
      430,  430,  557,  556,  431,  456,  456,  456,  456,  430,

      430,  457,  457,  457,  457,  459,  459,  459,  459,  555,
      554,  553,  430,  430,  430,  430,  430,  430,  462,  546,
      544,  462,  462,  462,  462,  464,  543,  465,  464,  464,
      465,  465,  465,  465,  467,  542,  701,  467,  467,  701,
      541,  462,  456,  463,  463,  463,  463,  540,  464,  702,
      465,  539,  702,  703,  463,  463,  703,  467,  492,  492,
      492,  492,  494,  494,  494,  494,  538,  463,  463,  463,
      463,  463,  463,  497,  536,  535,  497,  497,  497,  497,
      499,  533,  501,  499,  499,  501,  501,  524,  524,  524,
      524,  527,  532,  531,  527,  527,  497,  528,  529,  522,

      528,  528,  521,  499,  551,  501,  552,  551,  551,  552,
      552,  520,  568,  519,  527,  568,  568,  518,  569,  517,
      528,  569,  569,  516,  515,  514,  513,  551,  581,  552,
      582,  581,  581,  582,  582,  568,  592,  512,  510,  592,
      592,  569,  593,  509,  603,  593,  593,  603,  603,  508,
      507,  581,  604,  582,  612,  604,  604,  612,  612,  592,
      613,  506,  505,  613,  613,  593,  621,  603,  622,  621,
      621,  622,  622,  504,  503,  604,  630,  612,  631,  630,
      630,  631,  631,  613,  637,  502,  490,  637,  637,  621,
      638,  622,  643,  638,  638,  643,  643,  489,  488,  630,

      644,  631,  648,  644,  644,  648,  648,  637,  649,  487,
      486,  649,  649,  638,  653,  643,  654,  653,  653,  654,
      654,  485,  484,  644,  658,  648,  483,  658,  658,  481,
      480,  649,  478,  477,  476,  475,  474,  653,  473,  654,
      472,  471,  470,  469,  458,  454,  453,  658,  669,  669,
      669,  669,  669,  669,  669,  669,  669,  669,  669,  669,
      669,  669,  670,  670,  670,  670,  670,  670,  670,  670,
      670,  670,  670,  670,  670,  670,  671,  671,  671,  671,
      671,  671,  671,  671,  671,  671,  671,  671,  671,  671,
      672,  672,  672,  672,  672,  672,  672,  672,  672,  672,

      672,  672,  672,  672,  673,  673,  452,  673,  673,  673,
      673,  673,  673,  673,  673,  673,  673,  673,  674,  451,
      450,  674,  674,  675,  675,  449,  675,  675,  675,  675,
      675,  448,  675,  675,  675,  675,  675,  676,  676,  447,
      676,  676,  676,  676,  676,  676,  676,  676,  676,  676,
      676,  677,  677,  446,  677,  677,  445,  677,  677,  677,
      677,  677,  677,  677,  677,  678,  678,  444,  678,  678,
      678,  678,  678,  678,  678,  678,  678,  678,  678,  679,
      442,  441,  679,  679,  680,  440,  437,  680,  680,  681,
      681,  436,  681,  681,  681,  681,  681,  681,  435,  681,

      681,  681,  681,  682,  682,  434,  682,  682,  682,  682,
      682,  682,  682,  682,  682,  682,  682,  683,  683,  683,
      433,  432,  683,  683,  422,  683,  683,  683,  683,  684,
      684,  684,  684,  684,  684,  684,  684,  684,  684,  684,
      686,  686,  418,  686,  686,  686,  686,  686,  686,  686,
      686,  686,  686,  686,  687,  687,  416,  687,  687,  687,
      687,  687,  687,  687,  687,  687,  687,  687,  688,  688,
      415,  688,  688,  688,  688,  688,  688,  688,  688,  688,
      688,  688,  689,  689,  414,  689,  689,  689,  689,  689,
      689,  689,  689,  689,  689,  689,  690,  690,  413,  690,

      690,  690,  690,  690,  690,  690,  690,  690,  690,  690,
      691,  691,  412,  691,  691,  691,  691,  691,  691,  691,
      691,  691,  691,  691,  692,  411,  410,  692,  692,  692,
      693,  693,  693,  693,  693,  693,  693,  693,  693,  693,
      693,  694,  694,  409,  408,  694,  694,  694,  695,  406,
      405,  695,  695,  403,  695,  696,  696,  696,  696,  696,
      696,  696,  696,  696,  696,  696,  697,  697,  697,  697,
      697,  697,  697,  697,  697,  697,  697,  697,  697,  697,
      400,  399,  398,  397,  384,  378,  377,  376,  375,  374,
      373,  372,  371,  370,  369,  367,  366,  364,  362,  361,

      360,  359,  358,  357,  356,  344,  342,  341,  335,  334,
      333,  332,  331,  330,  327,  325,  324,  323,  322,  320,
      319,  318,  317,  315,  314,  313,  312,  297,  296,  295,
      294,  287,  286,  285,  284,  283,  282,  280,  279,  278,
      277,  276,  275,  274,  273,  271,  269,  268,  267,  266,
      265,  264,  263,  261,  259,  253,  244,  242,  241,  240,
      225,  224,  223,  222,  221,  220,  219,  218,  217,  215,
      214,  213,  212,  211,  209,  208,  207,  204,  203,  202,
      201,  197,  190,  186,  181,  176,  175,  174,  173,  149,
      146,  145,  137,  136,  132,  126,  125,  123,  122,  120,

      119,  118,  104,   89,   84,   71,   69,   62,   58,   57,
       56,   53,   48,   42,   41,   39,   34,   30,   19,   15,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668,  668,  668,  668,  668,  668,  668,  668,  668,  668,
      668

    } ;

extern int yy_flex_debug;
int yy_flex_debug = 0;

static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;
static char *yy_full_match;
static int yy_lp;
static int yy_looking_for_trail_begin = 0;
static int yy_full_lp;
static int *yy_full_state;
#define YY_TRAILING_MASK 0x2000
#define YY_TRAILING_HEAD_MASK 0x4000
#define REJECT \
{ \
*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ \
yy_cp = (yy_full_match); /* restore poss. backed-over text */ \
(yy_lp) = (yy_full_lp); /* restore orig. accepting pos. */ \
(yy_state_ptr) = (yy_full_state); /* restore orig. state */ \
yy_current_state = *(yy_state_ptr); /* restore curr. state */ \
++(yy_lp); \
goto find_rule; \
}

static int yy_more_flag = 0;
static int yy_more_len = 0;
#define yymore() ((yy_more_flag) = 1)
#define YY_MORE_ADJ (yy_more_len)
#define YY_RESTORE_YY_MORE_OFFSET
char *yytext;
#line 1 "kdev-pg-lexer.ll"
#line 2 "kdev-pg-lexer.ll"
/*
    SPDX-FileCopyrightText 2006 Jakob Petsovits <jpetso@gmx.at>

    SPDX-License-Identifier: LGPL-2.0-or-later
*/

#include <QDebug>

#include "kdev-pg.h"
#include "kdev-pg-parser.hh"

#include <QFile>
#include <QFileInfo>
#include <QTextStream>

int inp();
void appendLineBuffer();
void newline();
void countNewlines(const char*, int);
void yyerror(const char* );
extern int yyLine;
extern int currentOffset;
extern bool yymoreFlag;

namespace KDevPG
{
  extern QFile file;
  extern QFileInfo fileInfo;
  extern QTextStream checkOut;
}

#define YYMORE yymoreFlag = true; yymore();

#define YY_INPUT(buf, result, max_size) \
  { \
    int c = inp(); \
    result = (c == EOF) ? YY_NULL : (buf[0] = (char)c, 1); \
  }

#define YY_USER_ACTION  appendLineBuffer();

#define COPY_TO_YYLVAL(string, len) \
    yylval.str = (char*) calloc(len+1, sizeof(char)); \
    strncpy(yylval.str, string, len); \
    yylval.str[len] = '\0';
#define COPY_CODE_TO_YYLVAL(string, len) \
    if(KDevPG::globalSystem.lineNumberPolicy == KDevPG::World::BeautifulCode) \
    { \
      COPY_TO_YYLVAL(string, len) \
    } \
    else \
    { \
      QByteArray tmp("\n#"); \
      if(KDevPG::globalSystem.lineNumberPolicy == KDevPG::World::CompatibilityLineNumbers) \
        tmp += "line"; \
      tmp += " " + QString::number(firstCodeLine).toLocal8Bit(); \
      tmp += " \"" + KDevPG::fileInfo.absoluteFilePath().toLocal8Bit() + "\""; \
      if(KDevPG::globalSystem.lineNumberPolicy == KDevPG::World::FullLineNumbers) \
        tmp += " 1"; \
      tmp += "\n"; \
      size_t memlen = tmp.size() + firstCodeColumn + len + 16 + 1; \
      yylval.str = (char*) calloc(memlen, sizeof(char)); \
      strncpy(yylval.str, tmp.data(), tmp.size()); \
      memset(yylval.str + tmp.size(), ' ', firstCodeColumn); \
      strncpy(yylval.str + tmp.size() + firstCodeColumn, string, len); \
      yylval.str[memlen-1] = '\0'; \
    }

#define ESCAPE_CHARACTER(chr) \
        yylval.str = (char*) calloc(2, sizeof(char)); yylval.str[0] = chr; yylval.str[1] = '\0'; return T_STRING;

namespace {
  enum RulePosition {
    RuleBody,
    RuleFooter,
    RuleLexer
  };
  RulePosition rulePosition = RuleBody;
  int openBrackets; // for rule arguments and regexp usage
  int firstCodeLine; // where the current code-block begins
  int firstCodeColumn;
}

#ifdef _WIN32
#include <io.h>
#else
#include <unistd.h>
#endif

#line 1255 "kdev-pg-lexer.cc"

#line 1257 "kdev-pg-lexer.cc"

#define INITIAL 0
#define CODE 1
#define PARSERCLASS 2
#define RULE_ARGUMENTS 3
#define RULE_PARAMETERS_HEADER 4
#define RULE_PARAMETERS_VARNAME 5
#define RULE_LEXER 6

#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif

static int yy_init_globals ( void );

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

int yylex_destroy ( void );

int yyget_debug ( void );

void yyset_debug ( int debug_flag  );

YY_EXTRA_TYPE yyget_extra ( void );

void yyset_extra ( YY_EXTRA_TYPE user_defined  );

FILE *yyget_in ( void );

void yyset_in  ( FILE * _in_str  );

FILE *yyget_out ( void );

void yyset_out  ( FILE * _out_str  );

			int yyget_leng ( void );

char *yyget_text ( void );

int yyget_lineno ( void );

void yyset_lineno ( int _line_number  );

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

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

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

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

#ifdef YY_NEED_STRLEN
static int yy_flex_strlen ( const 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( yytext, (size_t) yyleng, 1, 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 = '*'; \
		int n; \
		for ( n = 0; n < max_size && \
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( yyin ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
			clearerr(yyin); \
			} \
		}\
\

#endif

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

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

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

/* end tables serialization structures and prototypes */

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

extern int yylex (void);

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

/* Code executed at the beginning of each rule, after yytext and yyleng
 * have been set up.
 */
#ifndef YY_USER_ACTION
#define YY_USER_ACTION
#endif

/* Code executed at the end of each rule. */
#ifndef YY_BREAK
#define YY_BREAK /*LINTED*/break;
#endif

#define YY_RULE_SETUP \
	YY_USER_ACTION

/** The main scanner function which does all the work.
 */
YY_DECL
{
	yy_state_type yy_current_state;
	char *yy_cp, *yy_bp;
	int yy_act;
    
	if ( !(yy_init) )
		{
		(yy_init) = 1;

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

        /* Create the reject buffer large enough to save one state per allowed character. */
        if ( ! (yy_state_buf) )
            (yy_state_buf) = (yy_state_type *)yyalloc(YY_STATE_BUF_SIZE  );
            if ( ! (yy_state_buf) )
                YY_FATAL_ERROR( "out of dynamic memory in yylex()" );

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

		if ( ! yyin )
			yyin = stdin;

		if ( ! yyout )
			yyout = stdout;

		if ( ! YY_CURRENT_BUFFER ) {
			yyensure_buffer_stack ();
			YY_CURRENT_BUFFER_LVALUE =
				yy_create_buffer( yyin, YY_BUF_SIZE );
		}

		yy_load_buffer_state(  );
		}

	{
#line 105 "kdev-pg-lexer.ll"



#line 1482 "kdev-pg-lexer.cc"

	while ( /*CONSTCOND*/1 )		/* loops until end-of-file is reached */
		{
		(yy_more_len) = 0;
		if ( (yy_more_flag) )
			{
			(yy_more_len) = (int) ((yy_c_buf_p) - (yytext_ptr));
			(yy_more_flag) = 0;
			}
		yy_cp = (yy_c_buf_p);

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

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

		yy_current_state = (yy_start);

		(yy_state_ptr) = (yy_state_buf);
		*(yy_state_ptr)++ = yy_current_state;

yy_match:
		do
			{
			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 669 )
					yy_c = yy_meta[yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
			*(yy_state_ptr)++ = yy_current_state;
			++yy_cp;
			}
		while ( yy_base[yy_current_state] != 1821 );

yy_find_action:
		yy_current_state = *--(yy_state_ptr);
		(yy_lp) = yy_accept[yy_current_state];
find_rule: /* we branch to this label when backing up */
		for ( ; ; ) /* until we find what rule we matched */
			{
			if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
				{
				yy_act = yy_acclist[(yy_lp)];
				if ( yy_act & YY_TRAILING_HEAD_MASK ||
				     (yy_looking_for_trail_begin) )
					{
					if ( yy_act == (yy_looking_for_trail_begin) )
						{
						(yy_looking_for_trail_begin) = 0;
						yy_act &= ~YY_TRAILING_HEAD_MASK;
						break;
						}
					}
				else if ( yy_act & YY_TRAILING_MASK )
					{
					(yy_looking_for_trail_begin) = yy_act & ~YY_TRAILING_MASK;
					(yy_looking_for_trail_begin) |= YY_TRAILING_HEAD_MASK;
					(yy_full_match) = yy_cp;
					(yy_full_state) = (yy_state_ptr);
					(yy_full_lp) = (yy_lp);
					}
				else
					{
					(yy_full_match) = yy_cp;
					(yy_full_state) = (yy_state_ptr);
					(yy_full_lp) = (yy_lp);
					break;
					}
				++(yy_lp);
				goto find_rule;
				}
			--yy_cp;
			yy_current_state = *--(yy_state_ptr);
			(yy_lp) = 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 1:
YY_RULE_SETUP
#line 108 "kdev-pg-lexer.ll"
/* skip */ ;
	YY_BREAK
case 2:
/* rule 2 can match eol */
YY_RULE_SETUP
#line 109 "kdev-pg-lexer.ll"
newline();
	YY_BREAK
case 3:
YY_RULE_SETUP
#line 110 "kdev-pg-lexer.ll"
/* line comments, skip */ ;
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 112 "kdev-pg-lexer.ll"
rulePosition = RuleBody; return ';';
	YY_BREAK
case 5:
YY_RULE_SETUP
#line 113 "kdev-pg-lexer.ll"
if(rulePosition == RuleLexer) BEGIN(RULE_LEXER); else rulePosition = RuleFooter; return T_ARROW;
	YY_BREAK
case 6:
YY_RULE_SETUP
#line 114 "kdev-pg-lexer.ll"
return T_INLINE;
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 116 "kdev-pg-lexer.ll"
return '(';
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 117 "kdev-pg-lexer.ll"
return ')';
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 118 "kdev-pg-lexer.ll"
return '{';
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 119 "kdev-pg-lexer.ll"
return '}';
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 120 "kdev-pg-lexer.ll"
return ',';
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 121 "kdev-pg-lexer.ll"
return '0';
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 122 "kdev-pg-lexer.ll"
return '#';
	YY_BREAK
case 14:
YY_RULE_SETUP
#line 123 "kdev-pg-lexer.ll"
return '.';
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 124 "kdev-pg-lexer.ll"
return ':';
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 125 "kdev-pg-lexer.ll"
return '=';
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 126 "kdev-pg-lexer.ll"
return '+';
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 127 "kdev-pg-lexer.ll"
return '*';
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 128 "kdev-pg-lexer.ll"
return '?';
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 129 "kdev-pg-lexer.ll"
return '@';
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 130 "kdev-pg-lexer.ll"
return '|';
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 131 "kdev-pg-lexer.ll"
return '&';
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 133 "kdev-pg-lexer.ll"
return T_TRY_RECOVER;
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 134 "kdev-pg-lexer.ll"
return T_TRY_ROLLBACK;
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 135 "kdev-pg-lexer.ll"
return T_CATCH;
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 137 "kdev-pg-lexer.ll"
return T_EXPORT_MACRO;
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 138 "kdev-pg-lexer.ll"
return T_EXPORT_MACRO_HEADER;
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 139 "kdev-pg-lexer.ll"
return T_TOKEN_DECLARATION;
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 140 "kdev-pg-lexer.ll"
return T_TOKEN_STREAM_DECLARATION;
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 141 "kdev-pg-lexer.ll"
return T_NAMESPACE_DECLARATION;
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 142 "kdev-pg-lexer.ll"
BEGIN(PARSERCLASS); return T_PARSERCLASS_DECLARATION;
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 143 "kdev-pg-lexer.ll"
BEGIN(PARSERCLASS); return T_LEXERCLASS_DECLARATION;
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 144 "kdev-pg-lexer.ll"
return T_INPUT_STREAM;
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 145 "kdev-pg-lexer.ll"
return T_AST_DECLARATION;
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 146 "kdev-pg-lexer.ll"
return T_PARSER_DECLARATION_HEADER;
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 147 "kdev-pg-lexer.ll"
return T_PARSER_BITS_HEADER;
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 148 "kdev-pg-lexer.ll"
return T_AST_HEADER;
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 149 "kdev-pg-lexer.ll"
return T_LEXER_DECLARATION_HEADER;
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 150 "kdev-pg-lexer.ll"
return T_LEXER_BITS_HEADER;
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 151 "kdev-pg-lexer.ll"
return T_INPUT_ENCODING;
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 152 "kdev-pg-lexer.ll"
return T_TABLE_LEXER;
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 153 "kdev-pg-lexer.ll"
return T_SEQUENCE_LEXER;
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 154 "kdev-pg-lexer.ll"
return T_AST_BASE;
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 155 "kdev-pg-lexer.ll"
return T_PARSER_BASE;
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 156 "kdev-pg-lexer.ll"
return T_LEXER_BASE;
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 157 "kdev-pg-lexer.ll"
return T_BIN;
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 158 "kdev-pg-lexer.ll"
return T_PRE;
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 159 "kdev-pg-lexer.ll"
return T_POST;
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 160 "kdev-pg-lexer.ll"
return T_TERN;
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 161 "kdev-pg-lexer.ll"
return T_PAREN;
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 162 "kdev-pg-lexer.ll"
return T_PRIORITY;
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 163 "kdev-pg-lexer.ll"
rulePosition = RuleBody; return T_LOPR;
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 164 "kdev-pg-lexer.ll"
rulePosition = RuleFooter; return T_ROPR;
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 165 "kdev-pg-lexer.ll"
return T_LEFT_ASSOC;
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 166 "kdev-pg-lexer.ll"
return T_RIGHT_ASSOC;
	YY_BREAK
case 56:
YY_RULE_SETUP
#line 167 "kdev-pg-lexer.ll"
return T_IS_LEFT_ASSOC;
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 168 "kdev-pg-lexer.ll"
return T_IS_RIGHT_ASSOC;
	YY_BREAK
case 58:
YY_RULE_SETUP
#line 169 "kdev-pg-lexer.ll"
rulePosition = RuleLexer; return T_LEXER;
	YY_BREAK

case 59:
YY_RULE_SETUP
#line 172 "kdev-pg-lexer.ll"
/* skip */ ;
	YY_BREAK
case 60:
/* rule 60 can match eol */
YY_RULE_SETUP
#line 173 "kdev-pg-lexer.ll"
newline();
	YY_BREAK
case 61:
YY_RULE_SETUP
#line 174 "kdev-pg-lexer.ll"
return '(';
	YY_BREAK
case 62:
YY_RULE_SETUP
#line 175 "kdev-pg-lexer.ll"
return T_PUBLIC;
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 176 "kdev-pg-lexer.ll"
return T_PRIVATE;
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 177 "kdev-pg-lexer.ll"
return T_PROTECTED;
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 178 "kdev-pg-lexer.ll"
return T_DECLARATION;
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 179 "kdev-pg-lexer.ll"
return T_CONSTRUCTOR;
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 180 "kdev-pg-lexer.ll"
return T_DESTRUCTOR;
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 181 "kdev-pg-lexer.ll"
return T_BITS;
	YY_BREAK
case 69:
YY_RULE_SETUP
#line 182 "kdev-pg-lexer.ll"
BEGIN(INITIAL); return ')';
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 183 "kdev-pg-lexer.ll"
BEGIN(INITIAL); REJECT; /* everything else */
	YY_BREAK

case 71:
YY_RULE_SETUP
#line 187 "kdev-pg-lexer.ll"
{
    if (rulePosition == RuleBody) { /* use the arguments in a rule call */
      firstCodeLine = yyLine;
      openBrackets = 0;
      BEGIN(RULE_ARGUMENTS);
    }
    else if (rulePosition == RuleFooter) { /* declare the arguments */
      BEGIN(RULE_PARAMETERS_HEADER); return '[';
    }
}
	YY_BREAK

case 72:
YY_RULE_SETUP
#line 199 "kdev-pg-lexer.ll"
/* line comments, skip */ ;
	YY_BREAK
case 73:
/* rule 73 can match eol */
YY_RULE_SETUP
#line 200 "kdev-pg-lexer.ll"
newline();
	YY_BREAK
case 74:
YY_RULE_SETUP
#line 201 "kdev-pg-lexer.ll"
++yytext; COPY_TO_YYLVAL(yytext,yyleng-2); return T_NAMED_REGEXP;
	YY_BREAK
case 75:
/* rule 75 can match eol */
YY_RULE_SETUP
#line 202 "kdev-pg-lexer.ll"
countNewlines(yytext, yyleng); rulePosition = RuleBody; BEGIN(INITIAL); return ';';
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 203 "kdev-pg-lexer.ll"
return ';';
	YY_BREAK
case 77:
YY_RULE_SETUP
#line 204 "kdev-pg-lexer.ll"
++openBrackets; return '[';
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 205 "kdev-pg-lexer.ll"
--openBrackets; return ']';
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 206 "kdev-pg-lexer.ll"
++openBrackets; return '(';
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 207 "kdev-pg-lexer.ll"
--openBrackets; return ')';
	YY_BREAK
case 81:
YY_RULE_SETUP
#line 208 "kdev-pg-lexer.ll"
return '?';
	YY_BREAK
case 82:
YY_RULE_SETUP
#line 209 "kdev-pg-lexer.ll"
return '|';
	YY_BREAK
case 83:
YY_RULE_SETUP
#line 210 "kdev-pg-lexer.ll"
return '^';
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 211 "kdev-pg-lexer.ll"
COPY_TO_YYLVAL(yytext,yyleng); return T_RANGE;
	YY_BREAK
case 85:
YY_RULE_SETUP
#line 212 "kdev-pg-lexer.ll"
return '&';
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 213 "kdev-pg-lexer.ll"
return '~';
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 214 "kdev-pg-lexer.ll"
return '*';
	YY_BREAK
case 88:
YY_RULE_SETUP
#line 215 "kdev-pg-lexer.ll"
return '+';
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 216 "kdev-pg-lexer.ll"
return '@';
	YY_BREAK
case 90:
YY_RULE_SETUP
#line 217 "kdev-pg-lexer.ll"
return '.';
	YY_BREAK
case 91:
YY_RULE_SETUP
#line 218 "kdev-pg-lexer.ll"
return T_ARROW;
	YY_BREAK
case 92:
YY_RULE_SETUP
#line 219 "kdev-pg-lexer.ll"
return T_CONTINUE;
	YY_BREAK
case 93:
YY_RULE_SETUP
#line 220 "kdev-pg-lexer.ll"
return T_FAIL;
	YY_BREAK
case 94:
YY_RULE_SETUP
#line 221 "kdev-pg-lexer.ll"
return T_ENTER_RULE_SET;
	YY_BREAK
case 95:
YY_RULE_SETUP
#line 222 "kdev-pg-lexer.ll"
return T_LEAVE_RULE_SET;
	YY_BREAK
case 96:
YY_RULE_SETUP
#line 223 "kdev-pg-lexer.ll"
return T_LOOKAHEAD;
	YY_BREAK
case 97:
YY_RULE_SETUP
#line 224 "kdev-pg-lexer.ll"
return T_BARRIER;
	YY_BREAK
case 98:
YY_RULE_SETUP
#line 225 "kdev-pg-lexer.ll"
firstCodeLine = yyLine; firstCodeColumn = currentOffset + 2; BEGIN(CODE);
	YY_BREAK
case 99:
/* rule 99 can match eol */
YY_RULE_SETUP
#line 226 "kdev-pg-lexer.ll"
COPY_TO_YYLVAL(yytext,yyleng); return T_TERMINAL;
	YY_BREAK
case 100:
/* rule 100 can match eol */
YY_RULE_SETUP
#line 227 "kdev-pg-lexer.ll"
COPY_TO_YYLVAL(yytext,yyleng); return T_IDENTIFIER;
	YY_BREAK
case 101:
YY_RULE_SETUP
#line 228 "kdev-pg-lexer.ll"
COPY_TO_YYLVAL(yytext,yyleng); return T_UNQUOTED_STRING;
	YY_BREAK
case 102:
YY_RULE_SETUP
#line 229 "kdev-pg-lexer.ll"
/* skip */
	YY_BREAK
case 103:
YY_RULE_SETUP
#line 230 "kdev-pg-lexer.ll"
yytext++; COPY_TO_YYLVAL(yytext,yyleng-2); return T_STRING;
	YY_BREAK
case YY_STATE_EOF(RULE_LEXER):
#line 232 "kdev-pg-lexer.ll"
{
    BEGIN(INITIAL); // is not set automatically by yyrestart()
    KDevPG::checkOut << "** ERROR Encountered end of file in an unclosed rule lexer definition..." << Qt::endl;
    yyerror("");
    return 0;
  }
	YY_BREAK


case 104:
/* rule 104 can match eol */
YY_RULE_SETUP
#line 241 "kdev-pg-lexer.ll"
newline(); YYMORE;
	YY_BREAK
case 105:
YY_RULE_SETUP
#line 242 "kdev-pg-lexer.ll"
YYMORE; /* this and... */
	YY_BREAK
case 106:
YY_RULE_SETUP
#line 243 "kdev-pg-lexer.ll"
YYMORE; /* ...this prevent brackets inside strings to be counted */
	YY_BREAK
case 107:
YY_RULE_SETUP
#line 244 "kdev-pg-lexer.ll"
YYMORE; /* gather everything that's not a bracket, and append what comes next */
	YY_BREAK
case 108:
YY_RULE_SETUP
#line 245 "kdev-pg-lexer.ll"
openBrackets++; YYMORE;
	YY_BREAK
case 109:
YY_RULE_SETUP
#line 246 "kdev-pg-lexer.ll"
{
      openBrackets--;
      if (openBrackets < 0) {
        COPY_CODE_TO_YYLVAL(yytext,(yyleng-1)); /* cut off the trailing bracket */
        BEGIN(INITIAL);
        return T_RULE_ARGUMENTS;
      }
  }
	YY_BREAK
case YY_STATE_EOF(RULE_ARGUMENTS):
#line 254 "kdev-pg-lexer.ll"
{
      BEGIN(INITIAL); // is not set automatically by yyrestart()
      KDevPG::checkOut << "** ERROR Encountered end of file in an unclosed rule argument specification..." << Qt::endl;
      yyerror("");
      return 0;
  }
	YY_BREAK


case 110:
YY_RULE_SETUP
#line 263 "kdev-pg-lexer.ll"
/* skip */ ;
	YY_BREAK
case 111:
/* rule 111 can match eol */
YY_RULE_SETUP
#line 264 "kdev-pg-lexer.ll"
newline();
	YY_BREAK
case 112:
YY_RULE_SETUP
#line 265 "kdev-pg-lexer.ll"
/* line comments, skip */ ;
	YY_BREAK
case 113:
YY_RULE_SETUP
#line 266 "kdev-pg-lexer.ll"
BEGIN(RULE_PARAMETERS_VARNAME); return ':';
	YY_BREAK
case 114:
YY_RULE_SETUP
#line 267 "kdev-pg-lexer.ll"
return '#';
	YY_BREAK
case 115:
YY_RULE_SETUP
#line 268 "kdev-pg-lexer.ll"
return T_MEMBER;
	YY_BREAK
case 116:
YY_RULE_SETUP
#line 269 "kdev-pg-lexer.ll"
return T_TEMPORARY;
	YY_BREAK
case 117:
YY_RULE_SETUP
#line 270 "kdev-pg-lexer.ll"
return T_ARGUMENT;
	YY_BREAK
case 118:
YY_RULE_SETUP
#line 271 "kdev-pg-lexer.ll"
return T_NODE;
	YY_BREAK
case 119:
YY_RULE_SETUP
#line 272 "kdev-pg-lexer.ll"
return T_TOKEN;
	YY_BREAK
case 120:
YY_RULE_SETUP
#line 273 "kdev-pg-lexer.ll"
return T_VARIABLE;
	YY_BREAK
case 121:
YY_RULE_SETUP
#line 274 "kdev-pg-lexer.ll"
return ';';  /* only used for "token" types */
	YY_BREAK
case 122:
YY_RULE_SETUP
#line 275 "kdev-pg-lexer.ll"
COPY_TO_YYLVAL(yytext,yyleng); return T_IDENTIFIER;
	YY_BREAK
case 123:
YY_RULE_SETUP
#line 276 "kdev-pg-lexer.ll"
BEGIN(INITIAL); return ']';
	YY_BREAK
case 124:
YY_RULE_SETUP
#line 277 "kdev-pg-lexer.ll"
BEGIN(INITIAL); REJECT; /* everything else */
	YY_BREAK


case 125:
/* rule 125 can match eol */
YY_RULE_SETUP
#line 281 "kdev-pg-lexer.ll"
newline(); YYMORE;
	YY_BREAK
case 126:
YY_RULE_SETUP
#line 282 "kdev-pg-lexer.ll"
YYMORE; /* gather everything that's not a semicolon, and append what comes next */
	YY_BREAK
case 127:
YY_RULE_SETUP
#line 283 "kdev-pg-lexer.ll"
{
      // strip trailing whitespace
      int length = yyleng-1; // and first, the trailing semicolon
      for (int i = length-1; i < 1; i--) {
        switch(yytext[i-1])
        {
          case ' ':
          case '\f':
          case '\t':
            continue;
          default:
            length = i;
            break;
        }
      }
      COPY_TO_YYLVAL(yytext,length);
      BEGIN(RULE_PARAMETERS_HEADER);
      return T_IDENTIFIER;
  }
	YY_BREAK
case 128:
YY_RULE_SETUP
#line 302 "kdev-pg-lexer.ll"
BEGIN(INITIAL); REJECT; /* everything else */
	YY_BREAK

case 129:
YY_RULE_SETUP
#line 306 "kdev-pg-lexer.ll"
firstCodeLine = yyLine; firstCodeColumn = currentOffset + 2; BEGIN(CODE);
	YY_BREAK

case 130:
/* rule 130 can match eol */
YY_RULE_SETUP
#line 308 "kdev-pg-lexer.ll"
newline(); YYMORE;
	YY_BREAK
case 131:
YY_RULE_SETUP
#line 309 "kdev-pg-lexer.ll"
YYMORE; /* gather everything that's not a colon, and append what comes next */
	YY_BREAK
case 132:
YY_RULE_SETUP
#line 310 "kdev-pg-lexer.ll"
YYMORE; /* also gather colons that are not followed by colons or newlines */
	YY_BREAK
case 133:
YY_RULE_SETUP
#line 311 "kdev-pg-lexer.ll"
{
      COPY_CODE_TO_YYLVAL(yytext, (yyleng-2)); /* cut off the trailing stuff */
      if(rulePosition == RuleLexer)
        BEGIN(RULE_LEXER);
      else
        BEGIN(INITIAL);
      return T_CODE;
  }
	YY_BREAK
case YY_STATE_EOF(CODE):
#line 319 "kdev-pg-lexer.ll"
{
      BEGIN(INITIAL); // is not set automatically by yyrestart()
      KDevPG::checkOut << "** ERROR Encountered end of file in an unclosed code segment..." << Qt::endl;
      yyerror("");
      return 0;
  }
	YY_BREAK

case 134:
YY_RULE_SETUP
#line 328 "kdev-pg-lexer.ll"
COPY_TO_YYLVAL(yytext,yyleng); return T_TERMINAL;
	YY_BREAK
case 135:
YY_RULE_SETUP
#line 329 "kdev-pg-lexer.ll"
COPY_TO_YYLVAL(yytext,yyleng); return T_IDENTIFIER;
	YY_BREAK
case 136:
YY_RULE_SETUP
#line 330 "kdev-pg-lexer.ll"
COPY_TO_YYLVAL(yytext,yyleng); return T_NUMBER;
	YY_BREAK
case 137:
YY_RULE_SETUP
#line 333 "kdev-pg-lexer.ll"
{
   yytext++;                         /* start inside the quotes */
   COPY_TO_YYLVAL(yytext,yyleng-2);  /* cut off the trailing quote */
   return T_STRING;
}
	YY_BREAK
case 138:
YY_RULE_SETUP
#line 339 "kdev-pg-lexer.ll"
{
  KDevPG::checkOut << "Unexpected character: ``" << yytext[0] << "''" << Qt::endl;
  yyerror("");
}
	YY_BREAK
case 139:
YY_RULE_SETUP
#line 345 "kdev-pg-lexer.ll"
ECHO;
	YY_BREAK
#line 2363 "kdev-pg-lexer.cc"
			case YY_STATE_EOF(INITIAL):
			case YY_STATE_EOF(PARSERCLASS):
			case YY_STATE_EOF(RULE_PARAMETERS_HEADER):
			case YY_STATE_EOF(RULE_PARAMETERS_VARNAME):
				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 yyin at a new source and called
			 * yylex().  If so, then we have to assure
			 * consistency between YY_CURRENT_BUFFER and our
			 * globals.  Here is the right place to do so, because
			 * this is the first action (other than possibly a
			 * back-up) that will match for the new input source.
			 */
			(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
			YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin;
			YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
			}

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

			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state(  );

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

			yy_next_state = yy_try_NUL_trans( yy_current_state );

			yy_bp = (yytext_ptr) + YY_MORE_ADJ;

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

			else
				{
				yy_cp = (yy_c_buf_p);
				goto yy_find_action;
				}
			}

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

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

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

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

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

				yy_current_state = yy_get_previous_state(  );

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

			case EOB_ACT_LAST_MATCH:
				(yy_c_buf_p) =
				&YY_CURRENT_BUFFER_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 user's declarations */
} /* end of yylex */

/* yy_get_next_buffer - try to read in a new buffer
 *
 * Returns a code representing an action:
 *	EOB_ACT_LAST_MATCH -
 *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
 *	EOB_ACT_END_OF_FILE - end of file
 */
static int yy_get_next_buffer (void)
{
    	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	char *source = (yytext_ptr);
	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. */

			YY_FATAL_ERROR(
"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );

			}

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

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	if ( (yy_n_chars) == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			yyrestart( yyin  );
			}

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

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

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

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

	(yy_state_ptr) = (yy_state_buf);
	*(yy_state_ptr)++ = yy_current_state;

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

	return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
{
	int yy_is_jam;
    
	YY_CHAR yy_c = 1;
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 669 )
			yy_c = yy_meta[yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
	yy_is_jam = (yy_current_state == 668);
	if ( ! yy_is_jam )
		*(yy_state_ptr)++ = yy_current_state;

		return yy_is_jam ? 0 : yy_current_state;
}

#ifndef YY_NO_UNPUT

    static void yyunput (int c, char * yy_bp )
{
	char *yy_cp;
    
    yy_cp = (yy_c_buf_p);

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

	if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
		{ /* need to shift things up to make room */
		/* +2 for EOB chars. */
		int number_to_move = (yy_n_chars) + 2;
		char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
					YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
		char *source =
				&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];

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

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

		if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
			YY_FATAL_ERROR( "flex scanner push-back overflow" );
		}

	*--yy_cp = (char) c;

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

#endif

#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 = (int) ((yy_c_buf_p) - (yytext_ptr));
			++(yy_c_buf_p);

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

					/* Reset buffer status. */
					yyrestart( yyin );

					/*FALLTHROUGH*/

				case EOB_ACT_END_OF_FILE:
					{
					if ( yywrap(  ) )
						return 0;

					if ( ! (yy_did_buffer_switch_on_eof) )
						YY_NEW_FILE;
#ifdef __cplusplus
					return yyinput();
#else
					return input();
#endif
					}

				case EOB_ACT_CONTINUE_SCAN:
					(yy_c_buf_p) = (yytext_ptr) + offset;
					break;
				}
			}
		}

	c = *(unsigned char *) (yy_c_buf_p);	/* cast for 8-bit char's */
	*(yy_c_buf_p) = '\0';	/* preserve yytext */
	(yy_hold_char) = *++(yy_c_buf_p);

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

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

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

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

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

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	yy_load_buffer_state(  );

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

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

/** Allocate and initialize an input buffer state.
 * @param file A readable stream.
 * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
 * 
 * @return the allocated buffer state.
 */
    YY_BUFFER_STATE yy_create_buffer  (FILE * file, int  size )
{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

	b->yy_buf_size = size;

	/* yy_ch_buf has to be 2 characters longer than the size given because
	 * we need to put in 2 end-of-buffer characters.
	 */
	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );

	b->yy_is_our_buffer = 1;

	yy_init_buffer( b, file );

	return b;
}

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

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

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

	yyfree( (void *) b  );
}

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

{
	int oerrno = errno;
    
	yy_flush_buffer( b );

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

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

        b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
    
	errno = oerrno;
}

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

	b->yy_n_chars = 0;

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

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

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

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

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

	yyensure_buffer_stack();

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

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

	/* copied from yy_switch_to_buffer. */
	yy_load_buffer_state(  );
	(yy_did_buffer_switch_on_eof) = 1;
}

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

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

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

/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
static void yyensure_buffer_stack (void)
{
	yy_size_t 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; /* After all that talk, this was set to 1 anyways... */
		(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );

		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));

		(yy_buffer_stack_max) = num_to_alloc;
		(yy_buffer_stack_top) = 0;
		return;
	}

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

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

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

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

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

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

	b->yy_buf_size = (int) (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 = NULL;
	b->yy_n_chars = b->yy_buf_size;
	b->yy_is_interactive = 0;
	b->yy_at_bol = 1;
	b->yy_fill_buffer = 0;
	b->yy_buffer_status = YY_BUFFER_NEW;

	yy_switch_to_buffer( b  );

	return b;
}

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

/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
 * scan from a @e copy of @a bytes.
 * @param 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 yy_scan_bytes  (const 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 = (yy_size_t) (_yybytes_len + 2);
	buf = (char *) yyalloc( n  );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );

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

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

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

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

	return b;
}

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

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

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

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

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

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

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

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

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

/** Get the current token.
 * 
 */

char *yyget_text  (void)
{
        return yytext;
}

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

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

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

int yyget_debug  (void)
{
        return yy_flex_debug;
}

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

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

    (yy_buffer_stack) = NULL;
    (yy_buffer_stack_top) = 0;
    (yy_buffer_stack_max) = 0;
    (yy_c_buf_p) = NULL;
    (yy_init) = 0;
    (yy_start) = 0;

    (yy_state_buf) = 0;
    (yy_state_ptr) = 0;
    (yy_full_match) = 0;
    (yy_lp) = 0;

/* Defined in main.c */
#ifdef YY_STDINIT
    yyin = stdin;
    yyout = stdout;
#else
    yyin = NULL;
    yyout = NULL;
#endif

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

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

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

    yyfree ( (yy_state_buf) );
    (yy_state_buf)  = NULL;

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

    return 0;
}

/*
 * Internal utility routines.
 */

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

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

	return n;
}
#endif

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

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

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

#define YYTABLES_NAME "yytables"

#line 345 "kdev-pg-lexer.ll"


char ch;
int yyLine = 1, currentOffset = 0;
bool endOfLine = false, yymoreFlag = false;
int yyTextLineLeng = 1024;
char *yyTextLine = (char*)malloc(yyTextLineLeng);

int inp()
{
  if( KDevPG::file.atEnd() )
    return EOF;
  KDevPG::file.getChar( &ch );
  return ch;
}

void newline()
{
  ++yyLine;
  endOfLine = true;
}

void countNewlines(const char* code, int leng)
{
  for(int i = 0; i != leng; ++i)
    if(code[i] == '\n')
      ++yyLine;
}

/* initialize the line buffer */
void clearLineBuffer()
{
  yyTextLine[0] = '\0';
  currentOffset = 0;
  endOfLine = false;
}

struct InitLineBuffer
{
  InitLineBuffer()
  {
    clearLineBuffer();
  }
} _initLineBuffer;

 /* add the current token to the current line */
void appendLineBuffer()
{
  if (endOfLine == true)
    clearLineBuffer();
  
  static int lastTextLeng = 0;
  
  currentOffset = strlen(yyTextLine); /* start of current */
  
  int newLeng = currentOffset + strlen(yytext) - (yymoreFlag ? lastTextLeng : 0) + 1;
  if(newLeng > yyTextLineLeng)
  {
    do
    {
      yyTextLineLeng *= 2;
    }
    while(newLeng > yyTextLineLeng);
    yyTextLine = (char*)realloc(yyTextLine, yyTextLineLeng);
  }
  
  strcpy(yyTextLine+currentOffset, yytext + (yymoreFlag ? lastTextLeng : 0)); /* append current */
  /* strcpy is faster than strcat */
  
  Q_ASSERT(strlen(yyTextLine) < size_t(yyTextLineLeng));
  
  lastTextLeng = strlen(yytext);
  yymoreFlag = false;
}

void yyerror(const char* msg )
{
  Q_UNUSED(msg);
  KDevPG::checkOut << "** LEXICAL ERROR at line " << yyLine << " column " << currentOffset << Qt::endl;

  char *current_end = yyTextLine + strlen(yyTextLine);
  char *p;

  /* get the rest of the line if we are not already at the end */
  if(!endOfLine)
    {
      p = current_end;
      int c = ch;

      while(c != EOF && c != '\n')
        {
          *p++ = c;
          c = inp();
        }

      *p++ = '\n';
      *p = 0;
    }

  /* yyTextLine[] now has the whole line, with the current token */
  /* at currentOffset */

  /* print error message and current line */
  KDevPG::checkOut << yyTextLine;

  /* print a ^ under the most recent token */
  KDevPG::checkOut << QString(currentOffset, QLatin1Char(' ')).append(QLatin1Char('^')) << Qt::endl; /* currentOffset spaces, then ^ */

  exit(EXIT_FAILURE);
}

int yywrap() { return 1; }


