#line 2 "src/scan-gram.c"

#line 4 "src/scan-gram.c"

#define  YY_INT_ALIGNED short int

/* A lexical scanner generated by flex */

/* %not-for-header */

/* %if-c-only */
/* %if-not-reentrant */
#define yy_create_buffer gram__create_buffer
#define yy_delete_buffer gram__delete_buffer
#define yy_flex_debug gram__flex_debug
#define yy_init_buffer gram__init_buffer
#define yy_flush_buffer gram__flush_buffer
#define yy_load_buffer_state gram__load_buffer_state
#define yy_switch_to_buffer gram__switch_to_buffer
#define yyin gram_in
#define yyleng gram_leng
#define yylex gram_lex
#define yylineno gram_lineno
#define yyout gram_out
#define yyrestart gram_restart
#define yytext gram_text
#define yywrap gram_wrap
#define yyalloc gram_alloc
#define yyrealloc gram_realloc
#define yyfree gram_free

/* %endif */
/* %endif */
/* %ok-for-header */

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

/* %if-c++-only */
/* %endif */

/* %if-c-only */
    
/* %endif */

/* %if-c-only */

/* %endif */

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

/* begin standard C headers. */
/* %if-c-only */
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
/* %endif */

/* %if-tables-serialization */
/* %endif */
/* end standard C headers. */

/* %if-c-or-c++ */
/* flex integer type definitions */

#ifndef FLEXINT_H
#define FLEXINT_H

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

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

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

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

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

#endif /* ! C99 */

#endif /* ! FLEXINT_H */

/* %endif */

/* %if-c++-only */
/* %endif */

#ifdef __cplusplus

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

#else	/* ! __cplusplus */

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

#define YY_USE_CONST

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

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

/* %not-for-header */

/* Returned upon end-of-file. */
#define YY_NULL 0
/* %ok-for-header */

/* %not-for-header */

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

/* %if-reentrant */
/* %endif */

/* %if-not-reentrant */

/* %endif */

/* 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 gram_restart(gram_in  )

#define YY_END_OF_BUFFER_CHAR 0

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

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

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

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

/* %if-not-reentrant */
extern yy_size_t gram_leng;
/* %endif */

/* %if-c-only */
/* %if-not-reentrant */
extern FILE *gram_in, *gram_out;
/* %endif */
/* %endif */

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

    #define YY_LESS_LINENO(n)
    
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
	do \
		{ \
		/* Undo effects of setting up gram_text. */ \
        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 gram_text 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
	{
/* %if-c-only */
	FILE *yy_input_file;
/* %endif */

/* %if-c++-only */
/* %endif */

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

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

	/* Number of characters read into yy_ch_buf, not including EOB
	 * characters.
	 */
	yy_size_t 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 gram_restart()), so that the user can continue scanning by
	 * just pointing gram_in at a new input file.
	 */
#define YY_BUFFER_EOF_PENDING 2

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */

/* %if-not-reentrant */

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

/* %endif */

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

/* %if-c-only Standard (non-C++) definition */

/* %if-not-reentrant */
/* %not-for-header */

/* yy_hold_char holds the character lost when gram_text is formed. */
static char yy_hold_char;
static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
yy_size_t gram_leng;

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

/* Flag which is used to allow gram_wrap()'s to do buffer switches
 * instead of setting up a fresh gram_in.  A bit of a hack ...
 */
static int yy_did_buffer_switch_on_eof;
/* %ok-for-header */

/* %endif */

void gram_restart (FILE *input_file  );
void gram__switch_to_buffer (YY_BUFFER_STATE new_buffer  );
YY_BUFFER_STATE gram__create_buffer (FILE *file,int size  );
void gram__delete_buffer (YY_BUFFER_STATE b  );
void gram__flush_buffer (YY_BUFFER_STATE b  );
void gram_push_buffer_state (YY_BUFFER_STATE new_buffer  );
void gram_pop_buffer_state (void );

static void gram_ensure_buffer_stack (void );
static void gram__load_buffer_state (void );
static void gram__init_buffer (YY_BUFFER_STATE b,FILE *file  );

#define YY_FLUSH_BUFFER gram__flush_buffer(YY_CURRENT_BUFFER )

YY_BUFFER_STATE gram__scan_buffer (char *base,yy_size_t size  );
YY_BUFFER_STATE gram__scan_string (yyconst char *yy_str  );
YY_BUFFER_STATE gram__scan_bytes (yyconst char *bytes,yy_size_t len  );

/* %endif */

void *gram_alloc (yy_size_t  );
void *gram_realloc (void *,yy_size_t  );
void gram_free (void *  );

#define yy_new_buffer gram__create_buffer

#define yy_set_interactive(is_interactive) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){ \
        gram_ensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            gram__create_buffer(gram_in,YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
	}

#define yy_set_bol(at_bol) \
	{ \
	if ( ! YY_CURRENT_BUFFER ){\
        gram_ensure_buffer_stack (); \
		YY_CURRENT_BUFFER_LVALUE =    \
            gram__create_buffer(gram_in,YY_BUF_SIZE ); \
	} \
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
	}

#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

/* %% [1.0] gram_text/gram_in/gram_out/yy_state_type/gram_lineno etc. def's & init go here */
/* Begin user sect3 */

#define gram_wrap() 1
#define YY_SKIP_YYWRAP

#define FLEX_DEBUG

typedef unsigned char YY_CHAR;

FILE *gram_in = (FILE *) 0, *gram_out = (FILE *) 0;

typedef int yy_state_type;

extern int gram_lineno;

int gram_lineno = 1;

extern char *gram_text;
#define yytext_ptr gram_text

/* %if-c-only Standard (non-C++) definition */

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

/* %endif */

/* Done after the current pattern has been matched and before the
 * corresponding action - sets up gram_text.
 */
#define YY_DO_BEFORE_ACTION \
	(yytext_ptr) = yy_bp; \
/* %% [2.0] code to fiddle gram_text and gram_leng for yymore() goes here \ */\
	gram_leng = (size_t) (yy_cp - yy_bp); \
	(yy_hold_char) = *yy_cp; \
	*yy_cp = '\0'; \
/* %% [3.0] code to copy yytext_ptr to gram_text[] goes here, if %array \ */\
	(yy_c_buf_p) = yy_cp;

/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
#define YY_NUM_RULES 130
#define YY_END_OF_BUFFER 131
/* This struct is not used in this scanner,
   but its presence is necessary. */
struct yy_trans_info
	{
	flex_int32_t yy_verify;
	flex_int32_t yy_nxt;
	};
static yyconst flex_int16_t yy_accept[582] =
    {   0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,   93,   93,  113,  113,  113,  113,    0,    0,
        0,    0,  131,   80,    2,    2,   71,   80,   70,   80,
        1,   66,   80,   67,   67,   65,   77,   63,   66,   79,
       73,   64,   80,   90,   90,  128,   95,   94,  128,   81,
       97,   96,   84,    2,    1,   84,   83,   82,   84,   99,
       99,  100,   98,   81,  129,  119,  128,  118,  128,  128,
      128,  122,  125,  126,  128,   92,  128,  117,  116,  128,
      115,  114,   87,    2,    1,   85,   87,   87,   86,   87,

       88,    2,    1,   88,   88,   80,    0,   78,   62,    0,
       62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   62,   72,   66,
       66,    4,    3,   69,   67,   69,    0,   76,    0,   89,
      112,  110,  101,  112,  103,  104,  105,  106,  107,  108,
      112,  109,  112,   99,   99,  100,  127,  120,  121,    0,
      123,    0,  122,  124,    0,   91,    0,    0,   93,  113,
      113,  113,  113,   87,   85,   62,   62,    0,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   62,   62,   62,

       62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
        3,   69,   68,   75,    0,  101,    0,    0,  102,    0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,   74,   62,   62,   62,   62,   62,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
       62,    0,  101,    0,    0,   62,    7,   62,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
       23,   62,   62,   62,   62,   62,   62,   62,   62,   62,

       62,   62,   62,   62,   62,   36,   62,   62,   62,   62,
       62,   62,   44,   62,   47,   62,   62,   50,    0,    0,
        0,   62,    8,   62,   62,   62,   13,   14,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   26,   62,   62,
       62,   62,   62,   62,   62,   62,   32,   62,   34,   62,
       62,   62,   62,   62,   62,   41,   62,   43,   45,   48,
       62,    0,    0,  111,    6,   62,   10,   62,   62,   62,
       16,   62,   62,   62,   62,   62,   62,   62,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   33,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   62,    0,   62,

       11,   62,   62,   62,   62,   62,   62,   62,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   62,   62,   62,
       62,   62,    0,   59,   62,   62,   38,   62,   62,   40,
       62,   62,   62,   49,    5,    0,   62,   62,   62,   62,
       62,   62,   62,   62,   62,   62,   62,   62,   22,   62,
       62,   62,   62,   62,   29,   62,   58,   30,   62,   62,
       62,   62,   62,   42,   62,   62,    0,   62,   62,   62,
       62,   62,   17,   53,   62,   62,   62,   62,   62,   24,
       25,   62,   62,   62,   62,   62,   62,   62,   62,   62,
       62,   62,    0,    0,   62,   62,   12,   62,   62,   62,

       62,   62,   21,   62,   62,   62,   62,   62,   62,   62,
       37,   62,   62,   62,   62,   62,   62,   62,   62,   18,
       62,   62,   62,   27,   56,   62,   62,   62,   35,   39,
       60,   46,   61,    9,   51,   62,   62,    0,   54,   62,
       62,   62,    0,   56,   62,   62,   62,   15,   52,   62,
       62,   62,   62,   62,   62,   62,   62,   20,   62,   62,
       62,   62,   62,   28,   57,   62,   62,   62,   62,   62,
       62,   62,   19,   55,   62,   62,   62,   62,   62,   31,
        0
    } ;

static yyconst flex_int32_t yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        2,    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,    6,   10,    6,
        6,   11,    6,   12,   13,   14,   15,   16,   17,   17,
       17,   17,   17,   17,   17,   18,   18,   19,   20,   21,
       22,   23,   24,    6,   25,   25,   25,   25,   25,   25,
       26,   26,   26,   26,   26,   26,   26,   26,   26,   26,
       26,   26,   26,   26,   27,   26,   26,   28,   26,   26,
       29,   30,   31,    6,   32,    6,   33,   34,   35,   36,

       37,   38,   39,   40,   41,   26,   42,   43,   44,   45,
       46,   47,   48,   49,   50,   51,   52,   53,   26,   54,
       55,   26,   56,   57,   58,    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,    1
    } ;

static yyconst flex_int32_t yy_meta[60] =
    {   0,
        1,    2,    3,    1,    2,    4,    5,    4,    5,    5,
        5,    5,    6,    7,    8,    9,    9,    9,    4,    5,
       10,    5,   10,    4,    9,   11,   11,   11,   12,    4,
       13,   11,    9,    9,    9,    9,    9,    9,   11,   11,
       11,   11,   11,   11,   11,   11,   11,   11,   11,   11,
       11,   11,   11,   11,   11,    5,    5,    5,    1
    } ;

static yyconst flex_int16_t yy_base[609] =
    {   0,
        0, 1065, 1061, 1060,   57,   58,   59,   60,   79,   94,
       53,   62,  117,  126,  135,  144,  100,  145,  154,  163,
       68,   69,   65,   70,   98,  155,  101,  164,  221, 1062,
      174,  193, 1069,    0, 1074, 1074, 1074,  280, 1074, 1074,
     1074,  339,  119,  164,  197, 1074,  114, 1074,  398, 1074,
     1074, 1074, 1025, 1074, 1052, 1074, 1074, 1074,  451, 1074,
     1074, 1074, 1074, 1074, 1074,  128, 1074, 1074, 1023, 1052,
       54, 1043, 1074, 1050, 1074, 1074, 1004, 1074,  331,   63,
      190, 1074, 1074, 1074,  153, 1074,  185, 1074, 1074,  346,
     1074, 1074,    0, 1074,    0,    0,  192, 1074, 1074, 1018,

     1074, 1074, 1074,  339, 1017,    0,    0, 1074,    0,  354,
     1018, 1012,  169,  311, 1016, 1013, 1010,  329, 1017,  331,
     1001,  334,  331,   98,  334, 1007, 1014, 1017, 1074,  505,
        0, 1074,    0,    0,  374,  549, 1026, 1074, 1007, 1074,
     1074, 1074,  357,    0, 1074, 1074, 1074, 1074, 1074, 1074,
        0, 1074,    0, 1034,  365, 1025, 1074, 1074, 1074,  382,
     1074,  391, 1074, 1074,  398, 1074,  406,  410, 1015, 1074,
      416, 1014,  421,    0,    0,    0,    0,  430,    0,  998,
     1006,  393,  992,  993,  990,  991,  362,  988,  995,  990,
      341,  999,  984,  988,  407,  994,  979,  980,  393,  979,

      979,  987,  988,  991,  974,  980,  974,  979,  970,  983,
        0,    0,    0, 1074,  972,  420,    0,    0,    0,  439,
      434,  445,  174,  451,  442,  457,  410,  468,  474,  485,
      489,  435, 1074,  983,  978,  962,   81,  962,  975,  960,
      964,  972,  971,  970,  993,  954,  965,  952,  989,  968,
      961,  962,  371,  465,  308,  949,  950,  433,  961,  950,
      957,  941,  952,  948,  941,  945,  951,  950,  940,  951,
      949,  946, 1074,    0,    0,  933,    0,  942,  928,  934,
      929,  942,  921,  926,  939,  960,  936,  924,  929,  917,
        0,  921,  916,  929,  442,  928,  923,  926,  921,  911,

      923,  915,  906,  913,  919,  918,  903,  467,  912,  901,
      914,  899,    0,  904,    0,  903,  901,    0,  941,    0,
        0,  890,    0,  901,  906,  890,    0,    0,  480,  890,
      893,  482,  906,  905,  904,  903,  894,    0,  887,  886,
      894,  886,  892,  884,  878,  876,    0,  875,    0,  912,
      888,  886,  875,  874,  871,    0,  868,    0,  484,    0,
      868,  504,    0, 1074,    0,  866,  866,  880,  861,  860,
      485,  863,  865,  864,  860,  865,  868,  857,  859,  855,
      854,  869,  864,  867,  862,  852,  860,  523,  849,  858,
      845,  860,  859,  854,  844,  838,  837,  850,  534,  502,

        0,  835,  848,  847,  834,  833,  844,  828,  827,  828,
      864,  839,  842,  829,  836,  835,  819,  820,  817,  818,
      832,  817,  538, 1074,  832,  819,    0,  814,  813,    0,
      816,  827,  826,    0, 1074,  851,  810,  809,  809,  805,
      804,  803,  802,  812,  798,  797,  810,  813,    0,  801,
      794,  805,  804,  798,    0,  797,    0,    0,  795,  789,
      802,  786,  785,    0,  800,  799,  825,  782,  781,  780,
      794,  793,    0,    0,  785,  778,  777,  774,  787,    0,
        0,  780,  779,  768,  767,  776,  783,  768,  764,  762,
      743,  739,  773,  541,  729,  727,    0,  714,  712,  703,

      704,  700,    0,  700,  681,  657,  517,  525,  664,  662,
        0,  655,  653,  662,  660,  661,  658,  642,  641,  551,
      639,  638,  645,  566,  573,  637,  636,  574,    0,    0,
        0,    0,    0,    0,    0,  577,  576,  587, 1074,  548,
      549,  566,  594, 1074,  562,  561,  558,    0,    0,  569,
      568,  560,  567,  566,  551,  560,  559,    0,  559,  558,
      538,  529,  520,    0,    0,  524,  521,  510,  533,  483,
      482,  484,    0,    0,  490,  461,  457,  445,  420,    0,
     1074,  616,  629,  642,  655,  668,  681,  694,  701,  712,
      725,  738,  749,  756,  764,  772,  783,  791,  437,  388,

      372,  208,  200,  162,  137,   83,   69,  802
    } ;

static yyconst flex_int16_t yy_def[609] =
    {   0,
      581,    1,  582,  582,  583,  583,  583,  583,  584,  584,
      585,  585,  583,  583,  583,  583,  583,  583,  583,  583,
      583,  583,  583,  583,  583,  583,  583,  583,  581,   29,
      586,  586,  581,  587,  581,  581,  581,  581,  581,  581,
      581,  588,  581,  589,  589,  581,  581,  581,  588,  581,
      581,  581,  587,  581,  581,  581,  581,  581,  590,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  591,
      591,  581,  581,  591,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  592,
      581,  581,  593,  581,  593,  594,  581,  581,  581,  593,

      581,  581,  581,  581,  581,  587,  595,  581,  596,  595,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  581,  588,
       49,  581,  597,  598,  589,  598,  581,  581,  581,  581,
      581,  581,  581,  599,  581,  581,  581,  581,  581,  581,
      600,  581,  601,  591,  591,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  593,  594,  595,  596,  581,  595,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,

      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      597,  598,  136,  581,  581,  581,  602,  603,  601,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  592,  581,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  581,  581,  604,  605,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,

      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  581,  606,
      607,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  581,  600,  581,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  581,  596,

      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  581,  581,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  581,  581,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  608,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  608,  608,  596,  596,  596,  596,  596,  596,

      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  581,  581,  596,
      596,  596,  581,  581,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
      596,  596,  596,  596,  596,  596,  596,  596,  596,  596,
        0,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,

      581,  581,  581,  581,  581,  581,  581,  581
    } ;

static yyconst flex_int16_t yy_nxt[1134] =
    {   0,
       34,   35,   36,   34,   35,   34,   37,   34,   38,   39,
       40,   41,   34,   42,   43,   44,   45,   45,   34,   46,
       47,   48,   40,   34,   49,   49,   49,   49,   50,   34,
       34,   49,   49,   49,   49,   49,   49,   49,   49,   49,
       49,   49,   49,   49,   49,   49,   49,   49,   49,   49,
       49,   49,   49,   49,   49,   51,   52,   40,   34,   57,
       57,   61,   61,   58,   58,   71,  155,   86,   62,   62,
       75,   75,   86,   72,   71,   73,  154,  364,   85,   85,
       64,   36,   72,   64,   73,  161,   59,   59,   59,   59,
       65,  363,  162,   66,   87,   64,   36,   67,   64,   87,

       88,   69,   75,   91,   89,   65,   76,   68,   66,   78,
       92,   74,   67,  279,   79,   60,   60,   60,   60,   75,
       74,  280,   68,   76,  137,   77,   78,   90,   75,  132,
       90,   79,   76,  133,   77,   78,  138,   75,  132,  203,
       79,   76,  133,   80,   78,  321,   75,   75,  204,   79,
       76,   76,   80,   78,   78,   81,   75,   88,   79,   79,
       76,   89,   80,   78,   81,   75,   91,  166,   79,   76,
      320,   80,   78,   92,   81,  102,   36,   79,  102,  135,
      135,  135,  167,   81,   90,  103,  168,  169,  104,  168,
       82,  136,   83,   90,  102,   36,  161,  102,  163,   82,

      105,   83,  132,  162,  103,  182,  133,  104,  275,   82,
      164,   84,  135,  135,  135,  183,  274,  136,   82,  165,
       84,   93,   94,   36,   93,   94,   93,   93,   93,   93,
       93,   93,   95,   93,   96,   97,   98,   98,   98,   93,
       93,   93,   93,   93,   93,   96,   96,   96,   96,   93,
       93,   99,   96,   96,   96,   96,   96,   96,   96,   96,
       96,   96,   96,   96,   96,   96,   96,   96,   96,   96,
       96,   96,   96,   96,   96,   96,   93,   93,   93,   93,
      107,  107,  107,  107,  107,  107,  107,  107,  108,  107,
      107,  107,  107,  109,  107,  107,  107,  107,  107,  107,

      107,  107,  107,  110,  109,  109,  109,  109,  107,  107,
      107,  109,  109,  111,  112,  113,  114,  115,  116,  109,
      117,  109,  118,  119,  120,  121,  122,  109,  123,  124,
      125,  126,  127,  109,  128,  129,  107,  107,  107,  106,
      300,  158,  106,  301,  106,  159,  106,  171,  172,  132,
      171,  130,  130,  133,  184,  178,  178,  106,  178,  185,
      160,  190,  106,  194,  186,  191,  198,  201,  106,  106,
      205,  202,  216,  216,  192,  173,  195,  155,  248,  206,
      219,  196,  199,  220,  221,  200,  220,  154,  207,  135,
      135,  135,  222,  223,  249,  222,  218,  106,  581,  224,

      225,  581,  224,  581,  243,  581,  296,  226,  227,  179,
      226,  168,  169,  297,  168,  244,  581,  229,  172,  253,
      229,  581,  231,  232,  166,  231,  236,  581,  581,  259,
      237,  178,  178,  260,  178,  273,  273,  581,  254,  167,
      220,  221,  238,  220,  158,  217,  222,  223,  159,  222,
      163,  255,  224,  225,  339,  224,  581,  142,  226,  227,
      142,  226,  164,  160,  173,  304,  143,  143,  580,  168,
      169,  165,  168,  340,  142,  229,  172,  144,  229,  353,
      142,  579,  305,  145,  146,  233,  229,  172,  147,  229,
      231,  232,  369,  231,  373,  148,  396,  405,  354,  149,

      298,  150,  151,  152,  153,  106,  578,  299,  106,  577,
      106,  370,  106,  374,  437,  397,  406,  130,  130,  399,
      399,  399,  576,  106,  423,  423,  423,  423,  106,  526,
      575,  574,  573,  438,  106,  106,  435,  527,  436,  423,
      423,  423,  423,  435,  424,  572,  571,  494,  527,  399,
      399,  399,  538,  538,  538,  538,  527,  570,  569,  424,
      550,  551,  568,  106,  213,  213,  213,  543,  543,  543,
      543,  567,  539,  213,  543,  543,  543,  543,  566,  551,
      551,  213,  213,  213,  213,  213,  213,  544,  538,  538,
      538,  538,  565,  564,  544,  543,  543,  543,  543,  563,

      562,  561,  560,  559,  558,  557,  556,  555,  539,  554,
      553,  552,  549,  548,  547,  544,   54,   54,   54,   54,
       54,   54,   54,   54,   54,   54,   54,   54,   54,   56,
       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
       56,   56,   63,   63,   63,   63,   63,   63,   63,   63,
       63,   63,   63,   63,   63,   70,   70,   70,   70,   70,
       70,   70,   70,   70,   70,   70,   70,   70,  101,  101,
      101,  101,  101,  101,  101,  101,  101,  101,  101,  101,
      101,  106,  546,  545,  106,  542,  106,  106,  541,  540,
      537,  536,  535,  106,  131,  534,  533,  131,  532,  131,

      131,  531,  131,  530,  131,  529,  131,  134,  528,  134,
      525,  134,  141,  141,  141,  141,  141,  141,  141,  141,
      141,  141,  141,  141,  141,  154,  154,  154,  154,  154,
      154,  154,  154,  154,  524,  154,  154,  154,  170,  170,
      170,  170,  170,  170,  170,  170,  170,  170,  170,  174,
      523,  522,  174,  174,  174,  521,  520,  519,  174,  518,
      174,  175,  175,  517,  175,  516,  175,  176,  176,  176,
      176,  176,  176,  176,  176,  176,  176,  177,  177,  494,
      177,  515,  177,  211,  211,  514,  211,  211,  211,  211,
      211,  211,  211,  211,  211,  211,  212,  212,  513,  212,

      512,  212,  493,  493,  511,  493,  493,  493,  493,  493,
      493,  493,  493,  493,  493,  510,  509,  508,  507,  506,
      505,  504,  503,  502,  501,  500,  499,  498,  497,  496,
      495,  494,  492,  491,  490,  489,  488,  487,  486,  485,
      484,  483,  482,  481,  480,  479,  478,  477,  476,  475,
      474,  473,  472,  471,  470,  469,  468,  467,  466,  465,
      464,  463,  462,  461,  460,  459,  458,  457,  456,  455,
      454,  453,  452,  451,  450,  449,  448,  447,  446,  445,
      444,  443,  442,  441,  440,  439,  434,  433,  432,  431,
      430,  429,  428,  427,  426,  425,  422,  421,  420,  419,

      418,  417,  416,  415,  414,  413,  412,  411,  410,  409,
      408,  407,  404,  403,  402,  401,  400,  398,  395,  394,
      393,  392,  391,  390,  389,  388,  387,  386,  385,  384,
      383,  382,  381,  380,  379,  378,  377,  376,  375,  372,
      371,  368,  367,  366,  365,  362,  361,  360,  359,  358,
      357,  356,  355,  352,  351,  350,  349,  348,  347,  346,
      345,  344,  343,  342,  341,  338,  337,  336,  335,  334,
      333,  332,  331,  330,  329,  328,  327,  326,  325,  324,
      323,  322,  319,  318,  317,  316,  315,  314,  313,  312,
      311,  310,  309,  308,  307,  306,  303,  302,  295,  294,

      293,  292,  291,  290,  289,  288,  287,  286,  285,  284,
      283,  282,  281,  278,  277,  276,  272,  271,  270,  269,
      268,  267,  266,  265,  264,  263,  262,  261,  258,  257,
      256,  252,  251,  250,  247,  246,  245,  242,  241,  240,
      239,  235,  234,  230,  228,  156,  155,  215,  214,  210,
      209,  208,  197,  193,  189,  188,  187,  181,  180,  139,
      139,  157,  155,  156,  155,  139,  140,  139,  581,  100,
       55,   55,   53,   33,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,

      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581
    } ;

static yyconst flex_int16_t yy_chk[1134] =
    {   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,    5,
        6,    7,    8,    5,    6,   11,   71,   23,    7,    8,
       21,   22,   24,   11,   12,   11,   71,  607,   21,   22,
        9,    9,   12,    9,   12,   80,    5,    6,    7,    8,
        9,  606,   80,    9,   23,   10,   10,    9,   10,   24,

       25,   10,   17,   27,   25,   10,   17,    9,   10,   17,
       27,   11,   10,  237,   17,    5,    6,    7,    8,   13,
       12,  237,   10,   13,   47,   13,   13,   25,   14,   43,
       27,   13,   14,   43,   14,   14,   47,   15,   66,  124,
       14,   15,   66,   15,   15,  605,   16,   18,  124,   15,
       16,   18,   16,   16,   18,   15,   19,   26,   16,   18,
       19,   26,   19,   19,   16,   20,   28,   85,   19,   20,
      604,   20,   20,   28,   19,   31,   31,   20,   31,   44,
       44,   44,   85,   20,   26,   31,   87,   87,   31,   87,
       15,   44,   15,   28,   32,   32,  223,   32,   81,   16,

       32,   16,   97,  223,   32,  113,   97,   32,  603,   19,
       81,   19,   45,   45,   45,  113,  602,   44,   20,   81,
       20,   29,   29,   29,   29,   29,   29,   29,   29,   29,
       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
       29,   29,   29,   29,   29,   29,   29,   29,   29,   29,
       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,

       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
       38,   38,   38,   38,   38,   38,   38,   38,   38,   38,
       38,   38,   38,   38,   38,   38,   38,   38,   38,   42,
      255,   79,   42,  255,   42,   79,   42,   90,   90,  104,
       90,   42,   42,  104,  114,  110,  110,   42,  110,  114,
       79,  118,   42,  120,  114,  118,  122,  123,   42,   42,
      125,  123,  143,  143,  118,   90,  120,  155,  191,  125,
      601,  120,  122,  160,  160,  122,  160,  155,  125,  135,
      135,  135,  162,  162,  191,  162,  600,   42,   49,  165,

      165,   49,  165,   49,  187,   49,  253,  167,  167,  110,
      167,  168,  168,  253,  168,  187,   49,  171,  171,  195,
      171,   49,  173,  173,  227,  173,  182,   49,   49,  199,
      182,  178,  178,  199,  178,  216,  216,  232,  195,  227,
      220,  220,  182,  220,  221,  599,  222,  222,  221,  222,
      225,  195,  224,  224,  295,  224,   49,   59,  226,  226,
       59,  226,  225,  221,  232,  258,   59,   59,  579,  228,
      228,  225,  228,  295,   59,  229,  229,   59,  229,  308,
       59,  578,  258,   59,   59,  178,  230,  230,   59,  230,
      231,  231,  329,  231,  332,   59,  359,  371,  308,   59,

      254,   59,   59,   59,   59,  130,  577,  254,  130,  576,
      130,  329,  130,  332,  400,  359,  371,  130,  130,  362,
      362,  362,  575,  130,  388,  388,  388,  388,  130,  507,
      572,  571,  570,  400,  130,  130,  399,  508,  399,  423,
      423,  423,  423,  494,  388,  569,  568,  494,  507,  399,
      399,  399,  520,  520,  520,  520,  508,  567,  566,  423,
      540,  541,  563,  130,  136,  136,  136,  524,  524,  524,
      524,  562,  520,  136,  525,  525,  525,  525,  561,  540,
      541,  136,  136,  136,  136,  136,  136,  524,  538,  538,
      538,  538,  560,  559,  525,  543,  543,  543,  543,  557,

      556,  555,  554,  553,  552,  551,  550,  547,  538,  546,
      545,  542,  537,  536,  528,  543,  582,  582,  582,  582,
      582,  582,  582,  582,  582,  582,  582,  582,  582,  583,
      583,  583,  583,  583,  583,  583,  583,  583,  583,  583,
      583,  583,  584,  584,  584,  584,  584,  584,  584,  584,
      584,  584,  584,  584,  584,  585,  585,  585,  585,  585,
      585,  585,  585,  585,  585,  585,  585,  585,  586,  586,
      586,  586,  586,  586,  586,  586,  586,  586,  586,  586,
      586,  587,  527,  526,  587,  523,  587,  587,  522,  521,
      519,  518,  517,  587,  588,  516,  515,  588,  514,  588,

      588,  513,  588,  512,  588,  510,  588,  589,  509,  589,
      506,  589,  590,  590,  590,  590,  590,  590,  590,  590,
      590,  590,  590,  590,  590,  591,  591,  591,  591,  591,
      591,  591,  591,  591,  505,  591,  591,  591,  592,  592,
      592,  592,  592,  592,  592,  592,  592,  592,  592,  593,
      504,  502,  593,  593,  593,  501,  500,  499,  593,  498,
      593,  594,  594,  496,  594,  495,  594,  595,  595,  595,
      595,  595,  595,  595,  595,  595,  595,  596,  596,  493,
      596,  492,  596,  597,  597,  491,  597,  597,  597,  597,
      597,  597,  597,  597,  597,  597,  598,  598,  490,  598,

      489,  598,  608,  608,  488,  608,  608,  608,  608,  608,
      608,  608,  608,  608,  608,  487,  486,  485,  484,  483,
      482,  479,  478,  477,  476,  475,  472,  471,  470,  469,
      468,  467,  466,  465,  463,  462,  461,  460,  459,  456,
      454,  453,  452,  451,  450,  448,  447,  446,  445,  444,
      443,  442,  441,  440,  439,  438,  437,  436,  433,  432,
      431,  429,  428,  426,  425,  422,  421,  420,  419,  418,
      417,  416,  415,  414,  413,  412,  411,  410,  409,  408,
      407,  406,  405,  404,  403,  402,  398,  397,  396,  395,
      394,  393,  392,  391,  390,  389,  387,  386,  385,  384,

      383,  382,  381,  380,  379,  378,  377,  376,  375,  374,
      373,  372,  370,  369,  368,  367,  366,  361,  357,  355,
      354,  353,  352,  351,  350,  348,  346,  345,  344,  343,
      342,  341,  340,  339,  337,  336,  335,  334,  333,  331,
      330,  326,  325,  324,  322,  319,  317,  316,  314,  312,
      311,  310,  309,  307,  306,  305,  304,  303,  302,  301,
      300,  299,  298,  297,  296,  294,  293,  292,  290,  289,
      288,  287,  286,  285,  284,  283,  282,  281,  280,  279,
      278,  276,  272,  271,  270,  269,  268,  267,  266,  265,
      264,  263,  262,  261,  260,  259,  257,  256,  252,  251,

      250,  249,  248,  247,  246,  245,  244,  243,  242,  241,
      240,  239,  238,  236,  235,  234,  215,  210,  209,  208,
      207,  206,  205,  204,  203,  202,  201,  200,  198,  197,
      196,  194,  193,  192,  190,  189,  188,  186,  185,  184,
      183,  181,  180,  172,  169,  156,  154,  139,  137,  128,
      127,  126,  121,  119,  117,  116,  115,  112,  111,  105,
      100,   77,   74,   72,   70,   69,   55,   53,   33,   30,
        4,    3,    2,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,

      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581,  581,  581,  581,  581,  581,  581,  581,
      581,  581,  581
    } ;

static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;

extern int gram__flex_debug;
int gram__flex_debug = 1;

static yyconst flex_int16_t yy_rule_linenum[130] =
    {   0,
      179,  182,  183,  184,  192,  210,  211,  212,  213,  214,
      215,  216,  217,  218,  219,  220,  221,  222,  223,  224,
      225,  226,  227,  228,  229,  230,  231,  232,  233,  234,
      235,  236,  237,  238,  239,  240,  241,  242,  243,  244,
      245,  246,  247,  248,  249,  250,  251,  252,  253,  254,
      257,  258,  259,  260,  261,  262,  263,  264,  265,  266,
      267,  269,  273,  274,  275,  277,  284,  288,  295,  300,
      303,  306,  309,  317,  324,  325,  326,  332,  339,  346,
      366,  376,  391,  396,  415,  428,  444,  459,  476,  477,
      488,  499,  500,  512,  520,  530,  549,  561,  575,  576,

      587,  596,  606,  607,  608,  609,  610,  611,  612,  615,
      617,  625,  643,  648,  649,  655,  656,  667,  673,  679,
      685,  701,  702,  706,  713,  730,  751,  784,  785
    } ;

/* The intent behind this definition is that it'll catch
 * any uses of REJECT which flex missed.
 */
#define REJECT reject_used_but_not_detected
#define yymore() yymore_used_but_not_detected
#define YY_MORE_ADJ 0
#define YY_RESTORE_YY_MORE_OFFSET
char *gram_text;
#line 1 "../../src/scan-gram.l"
/* Bison Grammar Scanner                             -*- C -*-

   Copyright (C) 2002-2013 Free Software Foundation, Inc.

   This file is part of Bison, the GNU Compiler Compiler.

   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
#define YY_NO_INPUT 1
#line 24 "../../src/scan-gram.l"
/* Work around a bug in flex 2.5.31.  See Debian bug 333231
   <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=333231>.  */
#undef gram_wrap
#define gram_wrap() 1

#define FLEX_PREFIX(Id) gram_ ## Id
#include <src/flex-scanner.h>

#include <src/complain.h>
#include <src/files.h>
#include <src/getargs.h>
#include <src/gram.h>
#include <quotearg.h>
#include <src/reader.h>
#include <src/uniqstr.h>

#include <c-ctype.h>
#include <mbswidth.h>
#include <quote.h>

#include <src/scan-gram.h>

#define YY_DECL GRAM_LEX_DECL

#define YY_USER_INIT                                    \
   code_start = scanner_cursor = loc->start;            \

/* Location of scanner cursor.  */
static boundary scanner_cursor;

#define YY_USER_ACTION  location_compute (loc, &scanner_cursor, gram_text, gram_leng);

static size_t no_cr_read (FILE *, char *, size_t);
#define YY_INPUT(buf, result, size) ((result) = no_cr_read (gram_in, buf, size))

#define RETURN_PERCENT_PARAM(Value)                     \
  RETURN_VALUE(PERCENT_PARAM, param, param_ ## Value)

#define RETURN_PERCENT_FLAG(Value)                              \
  RETURN_VALUE(PERCENT_FLAG, uniqstr, uniqstr_new (Value))

#define RETURN_VALUE(Token, Field, Value)       \
  do {                                          \
    val->Field = Value;                         \
    return Token;                               \
  } while (0)

#define ROLLBACK_CURRENT_TOKEN                                  \
  do {                                                          \
    scanner_cursor.column -= mbsnwidth (gram_text, gram_leng, 0);     \
    yyless (0);                                                 \
  } while (0)

#define DEPRECATED(Msg)                                         \
  do {                                                          \
    size_t i;                                                   \
    deprecated_directive (loc, gram_text, Msg);                    \
    scanner_cursor.column -= mbsnwidth (Msg, strlen (Msg), 0);  \
    for (i = strlen (Msg); i != 0; --i)                         \
      unput (Msg[i - 1]);                                       \
  } while (0)

/* A string representing the most recently saved token.  */
static char *last_string;

/* Bracketed identifier. */
static uniqstr bracketed_id_str = 0;
static location bracketed_id_loc;
static boundary bracketed_id_start;
static int bracketed_id_context_state = 0;

void
gram_scanner_last_string_free (void)
{
  STRING_FREE;
}

static void handle_syncline (char *, location);
static unsigned long int scan_integer (char const *p, int base, location loc);
static int convert_ucn_to_byte (char const *hex_text);
static void unexpected_eof (boundary, char const *);
static void unexpected_newline (boundary, char const *);

/* A C-like comment in directives/rules. */

/* Strings and characters in directives/rules. */

/* A identifier was just read in directives/rules.  Special state
to capture the sequence 'identifier :'. */

/* POSIX says that a tag must be both an id and a C union member, but
historically almost any character is allowed in a tag.  We
disallow NUL, as this simplifies our implementation.  We match
angle brackets in nested pairs: several languages use them for
generics/template types.  */

/* Four types of user code:
- prologue (code between '%{' '%}' in the first section, before %%);
- actions, printers, union, etc, (between braced in the middle section);
- epilogue (everything after the second %%).
- predicate (code between '%?{' and '{' in middle section); */

/* C and C++ comments in code. */

/* Strings and characters in code. */

/* Bracketed identifiers support. */

/* Zero or more instances of backslash-newline.  Following GCC, allow
   white space between the backslash and the newline.  */
/* An equal sign, with optional leading whitespaces. This is used in some
   deprecated constructs. */
#line 1153 "src/scan-gram.c"

#define INITIAL 0
#define SC_YACC_COMMENT 1
#define SC_ESCAPED_STRING 2
#define SC_ESCAPED_CHARACTER 3
#define SC_AFTER_IDENTIFIER 4
#define SC_TAG 5
#define SC_PROLOGUE 6
#define SC_BRACED_CODE 7
#define SC_EPILOGUE 8
#define SC_PREDICATE 9
#define SC_COMMENT 10
#define SC_LINE_COMMENT 11
#define SC_STRING 12
#define SC_CHARACTER 13
#define SC_BRACKETED_ID 14
#define SC_RETURN_BRACKETED_ID 15

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

#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif

/* %if-c-only Reentrant structure and macros (non-C++). */
/* %if-reentrant */
/* %if-c-only */

static int yy_init_globals (void );

/* %endif */
/* %if-reentrant */
/* %endif */
/* %endif End reentrant structures and macros. */

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

int gram_lex_destroy (void );

int gram_get_debug (void );

void gram_set_debug (int debug_flag  );

YY_EXTRA_TYPE gram_get_extra (void );

void gram_set_extra (YY_EXTRA_TYPE user_defined  );

FILE *gram_get_in (void );

void gram_set_in  (FILE * in_str  );

FILE *gram_get_out (void );

void gram_set_out  (FILE * out_str  );

yy_size_t gram_get_leng (void );

char *gram_get_text (void );

int gram_get_lineno (void );

void gram_set_lineno (int line_number  );

/* %if-bison-bridge */
/* %endif */

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

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

/* %not-for-header */

    static void yyunput (int c,char *buf_ptr  );
    
/* %ok-for-header */

/* %endif */

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

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

#ifndef YY_NO_INPUT
/* %if-c-only Standard (non-C++) definition */
/* %not-for-header */

#ifdef __cplusplus
static int yyinput (void );
#else
static int input (void );
#endif
/* %ok-for-header */

/* %endif */
#endif

/* %if-c-only */

/* %endif */

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

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* %if-c-only Standard (non-C++) definition */
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( gram_text, gram_leng, 1, gram_out )) {} } while (0)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
#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) \
/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
		{ \
		int c = '*'; \
		size_t n; \
		for ( n = 0; n < max_size && \
			     (c = getc( gram_in )) != EOF && c != '\n'; ++n ) \
			buf[n] = (char) c; \
		if ( c == '\n' ) \
			buf[n++] = (char) c; \
		if ( c == EOF && ferror( gram_in ) ) \
			YY_FATAL_ERROR( "input in flex scanner failed" ); \
		result = n; \
		} \
	else \
		{ \
		errno=0; \
		while ( (result = fread(buf, 1, max_size, gram_in))==0 && ferror(gram_in)) \
			{ \
			if( errno != EINTR) \
				{ \
				YY_FATAL_ERROR( "input in flex scanner failed" ); \
				break; \
				} \
			errno=0; \
			clearerr(gram_in); \
			} \
		}\
\
/* %if-c++-only C++ definition \ */\
/* %endif */

#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
/* %if-c-only */
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
/* %endif */
/* %if-c++-only */
/* %endif */
#endif

/* %if-tables-serialization structures and prototypes */
/* %not-for-header */

/* %ok-for-header */

/* %not-for-header */

/* %tables-yydmap generated elements */
/* %endif */
/* end tables serialization structures and prototypes */

/* %ok-for-header */

/* Default declaration of generated scanner - a define so the user can
 * easily add parameters.
 */
#ifndef YY_DECL
#define YY_DECL_IS_OURS 1
/* %if-c-only Standard (non-C++) definition */

extern int gram_lex (void);

#define YY_DECL int gram_lex (void)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
#endif /* !YY_DECL */

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

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

/* %% [6.0] YY_RULE_SETUP definition goes here */
#define YY_RULE_SETUP \
	if ( gram_leng > 0 ) \
		YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
				(gram_text[gram_leng - 1] == '\n'); \
	YY_USER_ACTION

/* %not-for-header */

/** The main scanner function which does all the work.
 */
YY_DECL
{
	register yy_state_type yy_current_state;
	register char *yy_cp, *yy_bp;
	register int yy_act;
    
/* %% [7.0] user's declarations go here */
#line 149 "../../src/scan-gram.l"


  /* Nesting level.  Either for nested braces, or nested angle brackets
     (but not mixed).  */
  int nesting PACIFY_CC (= 0);

  /* Parent context state, when applicable.  */
  int context_state PACIFY_CC (= 0);

  /* Location of most recent identifier, when applicable.  */
  location id_loc PACIFY_CC (= empty_location);

  /* Where containing code started, when applicable.  Its initial
     value is relevant only when gram_lex is invoked in the SC_EPILOGUE
     start condition.  */
  boundary code_start = scanner_cursor;

  /* Where containing comment or string or character literal started,
     when applicable.  */
  boundary token_start PACIFY_CC (= scanner_cursor);



  /*-----------------------.
  | Scanning white space.  |
  `-----------------------*/

#line 1441 "src/scan-gram.c"

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

#ifdef YY_USER_INIT
		YY_USER_INIT;
#endif

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

		if ( ! gram_in )
/* %if-c-only */
			gram_in = stdin;
/* %endif */
/* %if-c++-only */
/* %endif */

		if ( ! gram_out )
/* %if-c-only */
			gram_out = stdout;
/* %endif */
/* %if-c++-only */
/* %endif */

		if ( ! YY_CURRENT_BUFFER ) {
			gram_ensure_buffer_stack ();
			YY_CURRENT_BUFFER_LVALUE =
				gram__create_buffer(gram_in,YY_BUF_SIZE );
		}

		gram__load_buffer_state( );
		}

	while ( 1 )		/* loops until end-of-file is reached */
		{
/* %% [8.0] yymore()-related code goes here */
		yy_cp = (yy_c_buf_p);

		/* Support of gram_text. */
		*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;

/* %% [9.0] code to set up and find next match goes here */
		yy_current_state = (yy_start);
		yy_current_state += YY_AT_BOL();
yy_match:
		do
			{
			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
			if ( yy_accept[yy_current_state] )
				{
				(yy_last_accepting_state) = yy_current_state;
				(yy_last_accepting_cpos) = yy_cp;
				}
			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
				{
				yy_current_state = (int) yy_def[yy_current_state];
				if ( yy_current_state >= 582 )
					yy_c = yy_meta[(unsigned int) yy_c];
				}
			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
			++yy_cp;
			}
		while ( yy_current_state != 581 );
		yy_cp = (yy_last_accepting_cpos);
		yy_current_state = (yy_last_accepting_state);

yy_find_action:
/* %% [10.0] code to find the action number goes here */
		yy_act = yy_accept[yy_current_state];

		YY_DO_BEFORE_ACTION;

/* %% [11.0] code for gram_lineno update goes here */

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

/* %% [12.0] debug code goes here */
		if ( gram__flex_debug )
			{
			if ( yy_act == 0 )
				fprintf( stderr, "--scanner backing up\n" );
			else if ( yy_act < 130 )
				fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
				         (long)yy_rule_linenum[yy_act], gram_text );
			else if ( yy_act == 130 )
				fprintf( stderr, "--accepting default rule (\"%s\")\n",
				         gram_text );
			else if ( yy_act == 131 )
				fprintf( stderr, "--(end of buffer or a NUL)\n" );
			else
				fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
			}

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

/* Comments and white space.  */
case 1:
YY_RULE_SETUP
#line 179 "../../src/scan-gram.l"
{
     complain (loc, Wother, _("stray ',' treated as white space"));
  }
	YY_BREAK
case 2:
/* rule 2 can match eol */
#line 183 "../../src/scan-gram.l"
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
#line 183 "../../src/scan-gram.l"
continue;
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 184 "../../src/scan-gram.l"
{
    token_start = loc->start;
    context_state = YY_START;
    BEGIN SC_YACC_COMMENT;
  }
	YY_BREAK
/* #line directives are not documented, and may be withdrawn or
     modified in future versions of Bison.  */
case 5:
/* rule 5 can match eol */
YY_RULE_SETUP
#line 192 "../../src/scan-gram.l"
{
    handle_syncline (gram_text + sizeof "#line " - 1, *loc);
  }
	YY_BREAK

/*----------------------------.
  | Scanning Bison directives.  |
  `----------------------------*/
/* For directives that are also command line options, the regex must be
        "%..."
     after "[-_]"s are removed, and the directive must match the --long
     option name, with a single string argument.  Otherwise, add exceptions
     to ../build-aux/cross-options.pl.  */


case 6:
YY_RULE_SETUP
#line 210 "../../src/scan-gram.l"
return PERCENT_NONASSOC;
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 211 "../../src/scan-gram.l"
return PERCENT_CODE;
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 212 "../../src/scan-gram.l"
RETURN_PERCENT_FLAG("parse.trace");
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 213 "../../src/scan-gram.l"
return PERCENT_DEFAULT_PREC;
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 214 "../../src/scan-gram.l"
return PERCENT_DEFINE;
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 215 "../../src/scan-gram.l"
return PERCENT_DEFINES;
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 216 "../../src/scan-gram.l"
return PERCENT_DESTRUCTOR;
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 217 "../../src/scan-gram.l"
return PERCENT_DPREC;
	YY_BREAK
case 14:
YY_RULE_SETUP
#line 218 "../../src/scan-gram.l"
return PERCENT_EMPTY;
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 219 "../../src/scan-gram.l"
return PERCENT_ERROR_VERBOSE;
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 220 "../../src/scan-gram.l"
return PERCENT_EXPECT;
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 221 "../../src/scan-gram.l"
return PERCENT_EXPECT_RR;
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 222 "../../src/scan-gram.l"
return PERCENT_FILE_PREFIX;
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 223 "../../src/scan-gram.l"
return PERCENT_YACC;
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 224 "../../src/scan-gram.l"
return PERCENT_INITIAL_ACTION;
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 225 "../../src/scan-gram.l"
return PERCENT_GLR_PARSER;
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 226 "../../src/scan-gram.l"
return PERCENT_LANGUAGE;
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 227 "../../src/scan-gram.l"
return PERCENT_LEFT;
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 228 "../../src/scan-gram.l"
RETURN_PERCENT_PARAM(lex);
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 229 "../../src/scan-gram.l"
RETURN_PERCENT_FLAG("locations");
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 230 "../../src/scan-gram.l"
return PERCENT_MERGE;
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 231 "../../src/scan-gram.l"
return PERCENT_NAME_PREFIX;
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 232 "../../src/scan-gram.l"
return PERCENT_NO_DEFAULT_PREC;
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 233 "../../src/scan-gram.l"
return PERCENT_NO_LINES;
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 234 "../../src/scan-gram.l"
return PERCENT_NONASSOC;
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 235 "../../src/scan-gram.l"
return PERCENT_NONDETERMINISTIC_PARSER;
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 236 "../../src/scan-gram.l"
return PERCENT_NTERM;
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 237 "../../src/scan-gram.l"
return PERCENT_OUTPUT;
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 238 "../../src/scan-gram.l"
RETURN_PERCENT_PARAM(both);
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 239 "../../src/scan-gram.l"
RETURN_PERCENT_PARAM(parse);
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 240 "../../src/scan-gram.l"
return PERCENT_PREC;
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 241 "../../src/scan-gram.l"
return PERCENT_PRECEDENCE;
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 242 "../../src/scan-gram.l"
return PERCENT_PRINTER;
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 243 "../../src/scan-gram.l"
RETURN_PERCENT_FLAG("api.pure");
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 244 "../../src/scan-gram.l"
return PERCENT_REQUIRE;
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 245 "../../src/scan-gram.l"
return PERCENT_RIGHT;
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 246 "../../src/scan-gram.l"
return PERCENT_SKELETON;
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 247 "../../src/scan-gram.l"
return PERCENT_START;
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 248 "../../src/scan-gram.l"
return PERCENT_TOKEN;
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 249 "../../src/scan-gram.l"
return PERCENT_TOKEN;
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 250 "../../src/scan-gram.l"
return PERCENT_TOKEN_TABLE;
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 251 "../../src/scan-gram.l"
return PERCENT_TYPE;
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 252 "../../src/scan-gram.l"
return PERCENT_UNION;
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 253 "../../src/scan-gram.l"
return PERCENT_VERBOSE;
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 254 "../../src/scan-gram.l"
return PERCENT_YACC;
	YY_BREAK
/* deprecated */
case 51:
YY_RULE_SETUP
#line 257 "../../src/scan-gram.l"
DEPRECATED("%default-prec");
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 258 "../../src/scan-gram.l"
DEPRECATED("%define parse.error verbose");
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 259 "../../src/scan-gram.l"
DEPRECATED("%expect-rr");
	YY_BREAK
case 54:
/* rule 54 can match eol */
YY_RULE_SETUP
#line 260 "../../src/scan-gram.l"
DEPRECATED("%file-prefix");
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 261 "../../src/scan-gram.l"
DEPRECATED("%fixed-output-files");
	YY_BREAK
case 56:
/* rule 56 can match eol */
YY_RULE_SETUP
#line 262 "../../src/scan-gram.l"
DEPRECATED("%name-prefix");
	YY_BREAK
case 57:
YY_RULE_SETUP
#line 263 "../../src/scan-gram.l"
DEPRECATED("%no-default-prec");
	YY_BREAK
case 58:
YY_RULE_SETUP
#line 264 "../../src/scan-gram.l"
DEPRECATED("%no-lines");
	YY_BREAK
case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
#line 265 "../../src/scan-gram.l"
DEPRECATED("%output");
	YY_BREAK
case 60:
YY_RULE_SETUP
#line 266 "../../src/scan-gram.l"
DEPRECATED("%pure-parser");
	YY_BREAK
case 61:
YY_RULE_SETUP
#line 267 "../../src/scan-gram.l"
DEPRECATED("%token-table");
	YY_BREAK
case 62:
/* rule 62 can match eol */
YY_RULE_SETUP
#line 269 "../../src/scan-gram.l"
{
    complain (loc, complaint, _("invalid directive: %s"), quote (gram_text));
  }
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 273 "../../src/scan-gram.l"
return EQUAL;
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 274 "../../src/scan-gram.l"
return PIPE;
	YY_BREAK
case 65:
YY_RULE_SETUP
#line 275 "../../src/scan-gram.l"
return SEMICOLON;
	YY_BREAK
case 66:
YY_RULE_SETUP
#line 277 "../../src/scan-gram.l"
{
    val->uniqstr = uniqstr_new (gram_text);
    id_loc = *loc;
    bracketed_id_str = NULL;
    BEGIN SC_AFTER_IDENTIFIER;
  }
	YY_BREAK
case 67:
YY_RULE_SETUP
#line 284 "../../src/scan-gram.l"
{
    val->integer = scan_integer (gram_text, 10, *loc);
    return INT;
  }
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 288 "../../src/scan-gram.l"
{
    val->integer = scan_integer (gram_text, 16, *loc);
    return INT;
  }
	YY_BREAK
/* Identifiers may not start with a digit.  Yet, don't silently
     accept "1FOO" as "1 FOO".  */
case 69:
YY_RULE_SETUP
#line 295 "../../src/scan-gram.l"
{
    complain (loc, complaint, _("invalid identifier: %s"), quote (gram_text));
  }
	YY_BREAK
/* Characters.  */
case 70:
YY_RULE_SETUP
#line 300 "../../src/scan-gram.l"
token_start = loc->start; BEGIN SC_ESCAPED_CHARACTER;
	YY_BREAK
/* Strings. */
case 71:
YY_RULE_SETUP
#line 303 "../../src/scan-gram.l"
token_start = loc->start; BEGIN SC_ESCAPED_STRING;
	YY_BREAK
/* Prologue. */
case 72:
YY_RULE_SETUP
#line 306 "../../src/scan-gram.l"
code_start = loc->start; BEGIN SC_PROLOGUE;
	YY_BREAK
/* Code in between braces.  */
case 73:
YY_RULE_SETUP
#line 309 "../../src/scan-gram.l"
{
    STRING_GROW;
    nesting = 0;
    code_start = loc->start;
    BEGIN SC_BRACED_CODE;
  }
	YY_BREAK
/* Semantic predicate. */
case 74:
/* rule 74 can match eol */
YY_RULE_SETUP
#line 317 "../../src/scan-gram.l"
{
    nesting = 0;
    code_start = loc->start;
    BEGIN SC_PREDICATE;
  }
	YY_BREAK
/* A type. */
case 75:
YY_RULE_SETUP
#line 324 "../../src/scan-gram.l"
return TAG_ANY;
	YY_BREAK
case 76:
YY_RULE_SETUP
#line 325 "../../src/scan-gram.l"
return TAG_NONE;
	YY_BREAK
case 77:
YY_RULE_SETUP
#line 326 "../../src/scan-gram.l"
{
    nesting = 0;
    token_start = loc->start;
    BEGIN SC_TAG;
  }
	YY_BREAK
case 78:
YY_RULE_SETUP
#line 332 "../../src/scan-gram.l"
{
    static int percent_percent_count;
    if (++percent_percent_count == 2)
      BEGIN SC_EPILOGUE;
    return PERCENT_PERCENT;
  }
	YY_BREAK
case 79:
YY_RULE_SETUP
#line 339 "../../src/scan-gram.l"
{
    bracketed_id_str = NULL;
    bracketed_id_start = loc->start;
    bracketed_id_context_state = YY_START;
    BEGIN SC_BRACKETED_ID;
  }
	YY_BREAK
case 80:
YY_RULE_SETUP
#line 346 "../../src/scan-gram.l"
{
    complain (loc, complaint, "%s: %s",
              ngettext ("invalid character", "invalid characters", gram_leng),
              quote_mem (gram_text, gram_leng));
  }
	YY_BREAK
case YY_STATE_EOF(INITIAL):
#line 352 "../../src/scan-gram.l"
{
    loc->start = loc->end = scanner_cursor;
    yyterminate ();
  }
	YY_BREAK

/*--------------------------------------------------------------.
  | Supporting \0 complexifies our implementation for no expected |
  | added value.                                                  |
  `--------------------------------------------------------------*/


case 81:
YY_RULE_SETUP
#line 366 "../../src/scan-gram.l"
complain (loc, complaint, _("invalid null character"));
	YY_BREAK

/*-----------------------------------------------------------------.
  | Scanning after an identifier, checking whether a colon is next.  |
  `-----------------------------------------------------------------*/


case 82:
YY_RULE_SETUP
#line 376 "../../src/scan-gram.l"
{
    if (bracketed_id_str)
      {
        ROLLBACK_CURRENT_TOKEN;
        BEGIN SC_RETURN_BRACKETED_ID;
        *loc = id_loc;
        return ID;
      }
    else
      {
        bracketed_id_start = loc->start;
        bracketed_id_context_state = YY_START;
        BEGIN SC_BRACKETED_ID;
      }
  }
	YY_BREAK
case 83:
YY_RULE_SETUP
#line 391 "../../src/scan-gram.l"
{
    BEGIN (bracketed_id_str ? SC_RETURN_BRACKETED_ID : INITIAL);
    *loc = id_loc;
    return ID_COLON;
  }
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 396 "../../src/scan-gram.l"
{
    ROLLBACK_CURRENT_TOKEN;
    BEGIN (bracketed_id_str ? SC_RETURN_BRACKETED_ID : INITIAL);
    *loc = id_loc;
    return ID;
  }
	YY_BREAK
case YY_STATE_EOF(SC_AFTER_IDENTIFIER):
#line 402 "../../src/scan-gram.l"
{
    BEGIN (bracketed_id_str ? SC_RETURN_BRACKETED_ID : INITIAL);
    *loc = id_loc;
    return ID;
  }
	YY_BREAK

/*--------------------------------.
  | Scanning bracketed identifiers. |
  `--------------------------------*/


case 85:
YY_RULE_SETUP
#line 415 "../../src/scan-gram.l"
{
    if (bracketed_id_str)
      {
        complain (loc, complaint,
                  _("unexpected identifier in bracketed name: %s"),
                  quote (gram_text));
      }
    else
      {
        bracketed_id_str = uniqstr_new (gram_text);
        bracketed_id_loc = *loc;
      }
  }
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 428 "../../src/scan-gram.l"
{
    BEGIN bracketed_id_context_state;
    if (bracketed_id_str)
      {
        if (INITIAL == bracketed_id_context_state)
          {
            val->uniqstr = bracketed_id_str;
            bracketed_id_str = 0;
            *loc = bracketed_id_loc;
            return BRACKETED_ID;
          }
      }
    else
      complain (loc, complaint, _("an identifier expected"));
  }
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 444 "../../src/scan-gram.l"
{
    complain (loc, complaint, "%s: %s",
              ngettext ("invalid character in bracketed name",
                        "invalid characters in bracketed name", gram_leng),
              quote_mem (gram_text, gram_leng));
  }
	YY_BREAK
case YY_STATE_EOF(SC_BRACKETED_ID):
#line 451 "../../src/scan-gram.l"
{
    BEGIN bracketed_id_context_state;
    unexpected_eof (bracketed_id_start, "]");
  }
	YY_BREAK



case 88:
YY_RULE_SETUP
#line 459 "../../src/scan-gram.l"
{
    ROLLBACK_CURRENT_TOKEN;
    val->uniqstr = bracketed_id_str;
    bracketed_id_str = 0;
    *loc = bracketed_id_loc;
    BEGIN INITIAL;
    return BRACKETED_ID;
  }
	YY_BREAK

/*---------------------------------------------------------------.
  | Scanning a Yacc comment.  The initial '/ *' is already eaten.  |
  `---------------------------------------------------------------*/


case 89:
YY_RULE_SETUP
#line 476 "../../src/scan-gram.l"
BEGIN context_state;
	YY_BREAK
case 90:
/* rule 90 can match eol */
YY_RULE_SETUP
#line 477 "../../src/scan-gram.l"
continue;
	YY_BREAK
case YY_STATE_EOF(SC_YACC_COMMENT):
#line 478 "../../src/scan-gram.l"
unexpected_eof (token_start, "*/"); BEGIN context_state;
	YY_BREAK

/*------------------------------------------------------------.
  | Scanning a C comment.  The initial '/ *' is already eaten.  |
  `------------------------------------------------------------*/


case 91:
/* rule 91 can match eol */
YY_RULE_SETUP
#line 488 "../../src/scan-gram.l"
STRING_GROW; BEGIN context_state;
	YY_BREAK
case YY_STATE_EOF(SC_COMMENT):
#line 489 "../../src/scan-gram.l"
unexpected_eof (token_start, "*/"); BEGIN context_state;
	YY_BREAK

/*--------------------------------------------------------------.
  | Scanning a line comment.  The initial '//' is already eaten.  |
  `--------------------------------------------------------------*/


case 92:
/* rule 92 can match eol */
YY_RULE_SETUP
#line 499 "../../src/scan-gram.l"
STRING_GROW; BEGIN context_state;
	YY_BREAK
case 93:
/* rule 93 can match eol */
YY_RULE_SETUP
#line 500 "../../src/scan-gram.l"
STRING_GROW;
	YY_BREAK
case YY_STATE_EOF(SC_LINE_COMMENT):
#line 501 "../../src/scan-gram.l"
BEGIN context_state;
	YY_BREAK

/*------------------------------------------------.
  | Scanning a Bison string, including its escapes. |
  | The initial quote is already eaten.             |
  `------------------------------------------------*/


case 94:
YY_RULE_SETUP
#line 512 "../../src/scan-gram.l"
{
    STRING_FINISH;
    loc->start = token_start;
    val->code = last_string;
    BEGIN INITIAL;
    return STRING;
  }
	YY_BREAK
case YY_STATE_EOF(SC_ESCAPED_STRING):
#line 519 "../../src/scan-gram.l"
unexpected_eof (token_start, "\"");
	YY_BREAK
case 95:
/* rule 95 can match eol */
YY_RULE_SETUP
#line 520 "../../src/scan-gram.l"
unexpected_newline (token_start, "\"");
	YY_BREAK

/*----------------------------------------------------------.
  | Scanning a Bison character literal, decoding its escapes. |
  | The initial quote is already eaten.                       |
  `----------------------------------------------------------*/


case 96:
YY_RULE_SETUP
#line 530 "../../src/scan-gram.l"
{
    STRING_FINISH;
    loc->start = token_start;
    val->character = last_string[0];

    /* FIXME: Eventually, make these errors.  */
    if (last_string[0] == '\0')
    {
      complain (loc, Wother, _("empty character literal"));
      /* '\0' seems dangerous even if we are about to complain.  */
      val->character = '\'';
    }
    else if (last_string[1] != '\0')
      complain (loc, Wother,
                _("extra characters in character literal"));
    STRING_FREE;
    BEGIN INITIAL;
    return CHAR;
  }
	YY_BREAK
case 97:
/* rule 97 can match eol */
YY_RULE_SETUP
#line 549 "../../src/scan-gram.l"
unexpected_newline (token_start, "'");
	YY_BREAK
case YY_STATE_EOF(SC_ESCAPED_CHARACTER):
#line 550 "../../src/scan-gram.l"
unexpected_eof (token_start, "'");
	YY_BREAK

/*--------------------------------------------------------------.
  | Scanning a tag.  The initial angle bracket is already eaten.  |
  `--------------------------------------------------------------*/


case 98:
YY_RULE_SETUP
#line 561 "../../src/scan-gram.l"
{
    --nesting;
    if (nesting < 0)
      {
        STRING_FINISH;
        loc->start = token_start;
        val->uniqstr = uniqstr_new (last_string);
        STRING_FREE;
        BEGIN INITIAL;
        return TAG;
      }
    STRING_GROW;
  }
	YY_BREAK
case 99:
/* rule 99 can match eol */
YY_RULE_SETUP
#line 575 "../../src/scan-gram.l"
STRING_GROW;
	YY_BREAK
case 100:
YY_RULE_SETUP
#line 576 "../../src/scan-gram.l"
STRING_GROW; nesting += gram_leng;
	YY_BREAK
case YY_STATE_EOF(SC_TAG):
#line 578 "../../src/scan-gram.l"
unexpected_eof (token_start, ">");
	YY_BREAK

/*----------------------------.
  | Decode escaped characters.  |
  `----------------------------*/


case 101:
YY_RULE_SETUP
#line 587 "../../src/scan-gram.l"
{
    unsigned long int c = strtoul (gram_text + 1, NULL, 8);
    if (!c || UCHAR_MAX < c)
      complain (loc, complaint, _("invalid number after \\-escape: %s"),
                   gram_text+1);
    else
      obstack_1grow (&obstack_for_string, c);
  }
	YY_BREAK
case 102:
YY_RULE_SETUP
#line 596 "../../src/scan-gram.l"
{
    verify (UCHAR_MAX < ULONG_MAX);
    unsigned long int c = strtoul (gram_text + 2, NULL, 16);
    if (!c || UCHAR_MAX < c)
      complain (loc, complaint, _("invalid number after \\-escape: %s"),
                   gram_text+1);
    else
      obstack_1grow (&obstack_for_string, c);
  }
	YY_BREAK
case 103:
YY_RULE_SETUP
#line 606 "../../src/scan-gram.l"
obstack_1grow (&obstack_for_string, '\a');
	YY_BREAK
case 104:
YY_RULE_SETUP
#line 607 "../../src/scan-gram.l"
obstack_1grow (&obstack_for_string, '\b');
	YY_BREAK
case 105:
YY_RULE_SETUP
#line 608 "../../src/scan-gram.l"
obstack_1grow (&obstack_for_string, '\f');
	YY_BREAK
case 106:
YY_RULE_SETUP
#line 609 "../../src/scan-gram.l"
obstack_1grow (&obstack_for_string, '\n');
	YY_BREAK
case 107:
YY_RULE_SETUP
#line 610 "../../src/scan-gram.l"
obstack_1grow (&obstack_for_string, '\r');
	YY_BREAK
case 108:
YY_RULE_SETUP
#line 611 "../../src/scan-gram.l"
obstack_1grow (&obstack_for_string, '\t');
	YY_BREAK
case 109:
YY_RULE_SETUP
#line 612 "../../src/scan-gram.l"
obstack_1grow (&obstack_for_string, '\v');
	YY_BREAK
/* \\[\"\'?\\] would be shorter, but it confuses xgettext.  */
case 110:
YY_RULE_SETUP
#line 615 "../../src/scan-gram.l"
obstack_1grow (&obstack_for_string, gram_text[1]);
	YY_BREAK
case 111:
YY_RULE_SETUP
#line 617 "../../src/scan-gram.l"
{
    int c = convert_ucn_to_byte (gram_text);
    if (c <= 0)
      complain (loc, complaint, _("invalid number after \\-escape: %s"),
                   gram_text+1);
    else
      obstack_1grow (&obstack_for_string, c);
  }
	YY_BREAK
case 112:
/* rule 112 can match eol */
YY_RULE_SETUP
#line 625 "../../src/scan-gram.l"
{
    char const *p = gram_text + 1;
    /* Quote only if escaping won't make the character visible.  */
    if (c_isspace ((unsigned char) *p) && c_isprint ((unsigned char) *p))
      p = quote (p);
    else
      p = quotearg_style_mem (escape_quoting_style, p, 1);
    complain (loc, complaint, _("invalid character after \\-escape: %s"),
                 p);
  }
	YY_BREAK

/*--------------------------------------------.
  | Scanning user-code characters and strings.  |
  `--------------------------------------------*/


case 113:
/* rule 113 can match eol */
YY_RULE_SETUP
#line 643 "../../src/scan-gram.l"
STRING_GROW;
	YY_BREAK



case 114:
YY_RULE_SETUP
#line 648 "../../src/scan-gram.l"
STRING_GROW; BEGIN context_state;
	YY_BREAK
case 115:
/* rule 115 can match eol */
YY_RULE_SETUP
#line 649 "../../src/scan-gram.l"
unexpected_newline (token_start, "'");
	YY_BREAK
case YY_STATE_EOF(SC_CHARACTER):
#line 650 "../../src/scan-gram.l"
unexpected_eof (token_start, "'");
	YY_BREAK



case 116:
YY_RULE_SETUP
#line 655 "../../src/scan-gram.l"
STRING_GROW; BEGIN context_state;
	YY_BREAK
case 117:
/* rule 117 can match eol */
YY_RULE_SETUP
#line 656 "../../src/scan-gram.l"
unexpected_newline (token_start, "\"");
	YY_BREAK
case YY_STATE_EOF(SC_STRING):
#line 657 "../../src/scan-gram.l"
unexpected_eof (token_start, "\"");
	YY_BREAK

/*---------------------------------------------------.
  | Strings, comments etc. can be found in user code.  |
  `---------------------------------------------------*/


case 118:
YY_RULE_SETUP
#line 667 "../../src/scan-gram.l"
{
    STRING_GROW;
    context_state = YY_START;
    token_start = loc->start;
    BEGIN SC_CHARACTER;
  }
	YY_BREAK
case 119:
YY_RULE_SETUP
#line 673 "../../src/scan-gram.l"
{
    STRING_GROW;
    context_state = YY_START;
    token_start = loc->start;
    BEGIN SC_STRING;
  }
	YY_BREAK
case 120:
/* rule 120 can match eol */
YY_RULE_SETUP
#line 679 "../../src/scan-gram.l"
{
    STRING_GROW;
    context_state = YY_START;
    token_start = loc->start;
    BEGIN SC_COMMENT;
  }
	YY_BREAK
case 121:
/* rule 121 can match eol */
YY_RULE_SETUP
#line 685 "../../src/scan-gram.l"
{
    STRING_GROW;
    context_state = YY_START;
    BEGIN SC_LINE_COMMENT;
  }
	YY_BREAK

/*-----------------------------------------------------------.
  | Scanning some code in braces (actions, predicates). The    |
  | initial "{" is already eaten.                              |
  `-----------------------------------------------------------*/


case 122:
/* rule 122 can match eol */
YY_RULE_SETUP
#line 701 "../../src/scan-gram.l"
STRING_GROW; nesting++;
	YY_BREAK
case 123:
/* rule 123 can match eol */
YY_RULE_SETUP
#line 702 "../../src/scan-gram.l"
STRING_GROW; nesting--;
	YY_BREAK
/* Tokenize '<<%' correctly (as '<<' '%') rather than incorrrectly
     (as '<' '<%').  */
case 124:
/* rule 124 can match eol */
YY_RULE_SETUP
#line 706 "../../src/scan-gram.l"
STRING_GROW;
	YY_BREAK
case YY_STATE_EOF(SC_BRACED_CODE):
case YY_STATE_EOF(SC_PREDICATE):
#line 708 "../../src/scan-gram.l"
unexpected_eof (code_start, "}");
	YY_BREAK



case 125:
YY_RULE_SETUP
#line 713 "../../src/scan-gram.l"
{
    obstack_1grow (&obstack_for_string, '}');

    --nesting;
    if (nesting < 0)
      {
        STRING_FINISH;
        loc->start = code_start;
        val->code = last_string;
        BEGIN INITIAL;
        return BRACED_CODE;
      }
  }
	YY_BREAK



case 126:
YY_RULE_SETUP
#line 730 "../../src/scan-gram.l"
{
    --nesting;
    if (nesting < 0)
      {
        STRING_FINISH;
        loc->start = code_start;
        val->code = last_string;
        BEGIN INITIAL;
        return BRACED_PREDICATE;
      }
    else
      obstack_1grow (&obstack_for_string, '}');
  }
	YY_BREAK

/*--------------------------------------------------------------.
  | Scanning some prologue: from "%{" (already scanned) to "%}".  |
  `--------------------------------------------------------------*/


case 127:
YY_RULE_SETUP
#line 751 "../../src/scan-gram.l"
{
    STRING_FINISH;
    loc->start = code_start;
    val->code = last_string;
    BEGIN INITIAL;
    return PROLOGUE;
  }
	YY_BREAK
case YY_STATE_EOF(SC_PROLOGUE):
#line 759 "../../src/scan-gram.l"
unexpected_eof (code_start, "%}");
	YY_BREAK

/*---------------------------------------------------------------.
  | Scanning the epilogue (everything after the second "%%", which |
  | has already been eaten).                                       |
  `---------------------------------------------------------------*/


case YY_STATE_EOF(SC_EPILOGUE):
#line 770 "../../src/scan-gram.l"
{
    STRING_FINISH;
    loc->start = code_start;
    val->code = last_string;
    BEGIN INITIAL;
    return EPILOGUE;
  }
	YY_BREAK

/*-----------------------------------------------------.
  | By default, grow the string obstack with the input.  |
  `-----------------------------------------------------*/
case 128:
#line 785 "../../src/scan-gram.l"
case 129:
/* rule 129 can match eol */
YY_RULE_SETUP
#line 785 "../../src/scan-gram.l"
STRING_GROW;
	YY_BREAK
case 130:
YY_RULE_SETUP
#line 787 "../../src/scan-gram.l"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 2661 "src/scan-gram.c"
case YY_STATE_EOF(SC_RETURN_BRACKETED_ID):
	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 gram_in at a new source and called
			 * gram_lex().  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 = gram_in;
			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
				{
/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
				yy_cp = (yy_last_accepting_cpos);
				yy_current_state = (yy_last_accepting_state);
				goto yy_find_action;
				}
			}

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

				if ( gram_wrap( ) )
					{
					/* Note: because we've taken care in
					 * yy_get_next_buffer() to have set up
					 * gram_text, 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 gram_lex */
/* %ok-for-header */

/* %if-c++-only */
/* %not-for-header */

/* %ok-for-header */

/* %endif */

/* 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
 */
/* %if-c-only */
static int yy_get_next_buffer (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
	register char *source = (yytext_ptr);
	register int number_to_move, i;
	int ret_val;

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

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

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

	/* Try to read more data. */

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

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

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

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

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

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

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

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

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

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

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

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

			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

		/* Read in more data. */
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
			(yy_n_chars), 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;
			gram_restart(gram_in  );
			}

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

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

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

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

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

	return ret_val;
}

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

/* %if-c-only */
/* %not-for-header */

    static yy_state_type yy_get_previous_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
	register yy_state_type yy_current_state;
	register char *yy_cp;
    
/* %% [15.0] code to get the start state into yy_current_state goes here */
	yy_current_state = (yy_start);
	yy_current_state += YY_AT_BOL();

	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
		{
/* %% [16.0] code to find the next state goes here */
		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 59);
		if ( yy_accept[yy_current_state] )
			{
			(yy_last_accepting_state) = yy_current_state;
			(yy_last_accepting_cpos) = yy_cp;
			}
		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
			{
			yy_current_state = (int) yy_def[yy_current_state];
			if ( yy_current_state >= 582 )
				yy_c = yy_meta[(unsigned int) yy_c];
			}
		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
		}

	return yy_current_state;
}

/* yy_try_NUL_trans - try to make a transition on the NUL character
 *
 * synopsis
 *	next_state = yy_try_NUL_trans( current_state );
 */
/* %if-c-only */
    static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
/* %endif */
/* %if-c++-only */
/* %endif */
{
	register int yy_is_jam;
    /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
	register char *yy_cp = (yy_c_buf_p);

	register YY_CHAR yy_c = 59;
	if ( yy_accept[yy_current_state] )
		{
		(yy_last_accepting_state) = yy_current_state;
		(yy_last_accepting_cpos) = yy_cp;
		}
	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
		{
		yy_current_state = (int) yy_def[yy_current_state];
		if ( yy_current_state >= 582 )
			yy_c = yy_meta[(unsigned int) yy_c];
		}
	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
	yy_is_jam = (yy_current_state == 581);

		return yy_is_jam ? 0 : yy_current_state;
}

/* %if-c-only */

    static void yyunput (int c, register char * yy_bp )
/* %endif */
/* %if-c++-only */
/* %endif */
{
	register char *yy_cp;
    
    yy_cp = (yy_c_buf_p);

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

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

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

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

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

	*--yy_cp = (char) c;

/* %% [18.0] update gram_lineno here */

	(yytext_ptr) = yy_bp;
	(yy_hold_char) = *yy_cp;
	(yy_c_buf_p) = yy_cp;
}
/* %if-c-only */

/* %endif */

/* %if-c-only */
#ifndef YY_NO_INPUT
#ifdef __cplusplus
    static int yyinput (void)
#else
    static int input  (void)
#endif

/* %endif */
/* %if-c++-only */
/* %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 */
			yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
			++(yy_c_buf_p);

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

					/* Reset buffer status. */
					gram_restart(gram_in );

					/*FALLTHROUGH*/

				case EOB_ACT_END_OF_FILE:
					{
					if ( gram_wrap( ) )
						return EOF;

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

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

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

/* %% [19.0] update BOL and gram_lineno */
	YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');

	return c;
}
/* %if-c-only */
#endif	/* ifndef YY_NO_INPUT */
/* %endif */

/** 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 .
 */
/* %if-c-only */
    void gram_restart  (FILE * input_file )
/* %endif */
/* %if-c++-only */
/* %endif */
{
    
	if ( ! YY_CURRENT_BUFFER ){
        gram_ensure_buffer_stack ();
		YY_CURRENT_BUFFER_LVALUE =
            gram__create_buffer(gram_in,YY_BUF_SIZE );
	}

	gram__init_buffer(YY_CURRENT_BUFFER,input_file );
	gram__load_buffer_state( );
}

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * 
 */
/* %if-c-only */
    void gram__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
/* %endif */
/* %if-c++-only */
/* %endif */
{
    
	/* TODO. We should be able to replace this entire function body
	 * with
	 *		gram_pop_buffer_state();
	 *		gram_push_buffer_state(new_buffer);
     */
	gram_ensure_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;
	gram__load_buffer_state( );

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

/* %if-c-only */
static void gram__load_buffer_state  (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	gram_in = 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.
 */
/* %if-c-only */
    YY_BUFFER_STATE gram__create_buffer  (FILE * file, int  size )
/* %endif */
/* %if-c++-only */
/* %endif */
{
	YY_BUFFER_STATE b;
    
	b = (YY_BUFFER_STATE) gram_alloc(sizeof( struct yy_buffer_state )  );
	if ( ! b )
		YY_FATAL_ERROR( "out of dynamic memory in gram__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 *) gram_alloc(b->yy_buf_size + 2  );
	if ( ! b->yy_ch_buf )
		YY_FATAL_ERROR( "out of dynamic memory in gram__create_buffer()" );

	b->yy_is_our_buffer = 1;

	gram__init_buffer(b,file );

	return b;
}

/** Destroy the buffer.
 * @param b a buffer created with gram__create_buffer()
 * 
 */
/* %if-c-only */
    void gram__delete_buffer (YY_BUFFER_STATE  b )
/* %endif */
/* %if-c++-only */
/* %endif */
{
    
	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 )
		gram_free((void *) b->yy_ch_buf  );

	gram_free((void *) b  );
}

/* Initializes or reinitializes a buffer.
 * This function is sometimes called more than once on the same buffer,
 * such as during a gram_restart() or at EOF.
 */
/* %if-c-only */
    static void gram__init_buffer  (YY_BUFFER_STATE  b, FILE * file )
/* %endif */
/* %if-c++-only */
/* %endif */

{
	int oerrno = errno;
    
	gram__flush_buffer(b );

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

    /* If b is the current buffer, then gram__init_buffer was _probably_
     * called from gram_restart() 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;
    }

/* %if-c-only */

        b->yy_is_interactive = 0;
    
/* %endif */
/* %if-c++-only */
/* %endif */
	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.
 * 
 */
/* %if-c-only */
    void gram__flush_buffer (YY_BUFFER_STATE  b )
/* %endif */
/* %if-c++-only */
/* %endif */
{
    	if ( ! b )
		return;

	b->yy_n_chars = 0;

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

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

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

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

/* %if-c-or-c++ */
/** 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.
 *  
 */
/* %if-c-only */
void gram_push_buffer_state (YY_BUFFER_STATE new_buffer )
/* %endif */
/* %if-c++-only */
/* %endif */
{
    	if (new_buffer == NULL)
		return;

	gram_ensure_buffer_stack();

	/* This block is copied from gram__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 gram__switch_to_buffer. */
	gram__load_buffer_state( );
	(yy_did_buffer_switch_on_eof) = 1;
}
/* %endif */

/* %if-c-or-c++ */
/** Removes and deletes the top of the stack, if present.
 *  The next element becomes the new top.
 *  
 */
/* %if-c-only */
void gram_pop_buffer_state (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
    	if (!YY_CURRENT_BUFFER)
		return;

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

	if (YY_CURRENT_BUFFER) {
		gram__load_buffer_state( );
		(yy_did_buffer_switch_on_eof) = 1;
	}
}
/* %endif */

/* %if-c-or-c++ */
/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
/* %if-c-only */
static void gram_ensure_buffer_stack (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
	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;
		(yy_buffer_stack) = (struct yy_buffer_state**)gram_alloc
								(num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in gram_ensure_buffer_stack()" );
								  
		memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
				
		(yy_buffer_stack_max) = num_to_alloc;
		(yy_buffer_stack_top) = 0;
		return;
	}

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

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

		num_to_alloc = (yy_buffer_stack_max) + grow_size;
		(yy_buffer_stack) = (struct yy_buffer_state**)gram_realloc
								((yy_buffer_stack),
								num_to_alloc * sizeof(struct yy_buffer_state*)
								);
		if ( ! (yy_buffer_stack) )
			YY_FATAL_ERROR( "out of dynamic memory in gram_ensure_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;
	}
}
/* %endif */

/* %if-c-only */
/** 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 gram__scan_buffer  (char * base, yy_size_t  size )
{
	YY_BUFFER_STATE b;
    
	if ( size < 2 ||
	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
	     base[size-1] != YY_END_OF_BUFFER_CHAR )
		/* They forgot to leave room for the EOB's. */
		return 0;

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

	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
	b->yy_buf_pos = b->yy_ch_buf = base;
	b->yy_is_our_buffer = 0;
	b->yy_input_file = 0;
	b->yy_n_chars = b->yy_buf_size;
	b->yy_is_interactive = 0;
	b->yy_at_bol = 1;
	b->yy_fill_buffer = 0;
	b->yy_buffer_status = YY_BUFFER_NEW;

	gram__switch_to_buffer(b  );

	return b;
}
/* %endif */

/* %if-c-only */
/** Setup the input buffer state to scan a string. The next call to gram_lex() 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
 *       gram__scan_bytes() instead.
 */
YY_BUFFER_STATE gram__scan_string (yyconst char * yystr )
{
    
	return gram__scan_bytes(yystr,strlen(yystr) );
}
/* %endif */

/* %if-c-only */
/** Setup the input buffer state to scan the given bytes. The next call to gram_lex() 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 gram__scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	int i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = _yybytes_len + 2;
	buf = (char *) gram_alloc(n  );
	if ( ! buf )
		YY_FATAL_ERROR( "out of dynamic memory in gram__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 = gram__scan_buffer(buf,n );
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in gram__scan_bytes()" );

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

	return b;
}
/* %endif */

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

/* %if-c-only */
static void yy_fatal_error (yyconst char* msg )
{
    	(void) fprintf( stderr, "%s\n", msg );
	exit( YY_EXIT_FAILURE );
}
/* %endif */
/* %if-c++-only */
/* %endif */

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

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

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

/* %if-c-only */
/* %if-reentrant */
/* %endif */

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

/** Get the input stream.
 * 
 */
FILE *gram_get_in  (void)
{
        return gram_in;
}

/** Get the output stream.
 * 
 */
FILE *gram_get_out  (void)
{
        return gram_out;
}

/** Get the length of the current token.
 * 
 */
yy_size_t gram_get_leng  (void)
{
        return gram_leng;
}

/** Get the current token.
 * 
 */

char *gram_get_text  (void)
{
        return gram_text;
}

/* %if-reentrant */
/* %endif */

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

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

void gram_set_out (FILE *  out_str )
{
        gram_out = out_str ;
}

int gram_get_debug  (void)
{
        return gram__flex_debug;
}

void gram_set_debug (int  bdebug )
{
        gram__flex_debug = bdebug ;
}

/* %endif */

/* %if-reentrant */
/* %if-bison-bridge */
/* %endif */
/* %endif if-c-only */

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

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

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

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

/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
/* gram_lex_destroy is for both reentrant and non-reentrant scanners. */
int gram_lex_destroy  (void)
{
    
    /* Pop the buffer stack, destroying each element. */
	while(YY_CURRENT_BUFFER){
		gram__delete_buffer(YY_CURRENT_BUFFER  );
		YY_CURRENT_BUFFER_LVALUE = NULL;
		gram_pop_buffer_state();
	}

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

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

/* %if-reentrant */
/* %endif */
    return 0;
}
/* %endif */

/*
 * Internal utility routines.
 */

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

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

	return n;
}
#endif

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

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

void gram_free (void * ptr )
{
	free( (char *) ptr );	/* see gram_realloc() for (char *) cast */
}

/* %if-tables-serialization definitions */
/* %define-yytables   The name for this specific scanner's tables. */
#define YYTABLES_NAME "yytables"
/* %endif */

/* %ok-for-header */

#line 787 "../../src/scan-gram.l"



/* Read bytes from FP into buffer BUF of size SIZE.  Return the
   number of bytes read.  Remove '\r' from input, treating \r\n
   and isolated \r as \n.  */

static size_t
no_cr_read (FILE *fp, char *buf, size_t size)
{
  size_t bytes_read = fread (buf, 1, size, fp);
  if (bytes_read)
    {
      char *w = memchr (buf, '\r', bytes_read);
      if (w)
        {
          char const *r = ++w;
          char const *lim = buf + bytes_read;

          for (;;)
            {
              /* Found an '\r'.  Treat it like '\n', but ignore any
                 '\n' that immediately follows.  */
              w[-1] = '\n';
              if (r == lim)
                {
                  int ch = getc (fp);
                  if (ch != '\n' && ungetc (ch, fp) != ch)
                    break;
                }
              else if (*r == '\n')
                r++;

              /* Copy until the next '\r'.  */
              do
                {
                  if (r == lim)
                    return w - buf;
                }
              while ((*w++ = *r++) != '\r');
            }

          return w - buf;
        }
    }

  return bytes_read;
}



/*------------------------------------------------------.
| Scan NUMBER for a base-BASE integer at location LOC.  |
`------------------------------------------------------*/

static unsigned long int
scan_integer (char const *number, int base, location loc)
{
  verify (INT_MAX < ULONG_MAX);
  unsigned long int num = strtoul (number, NULL, base);

  if (INT_MAX < num)
    {
      complain (&loc, complaint, _("integer out of range: %s"),
                   quote (number));
      num = INT_MAX;
    }

  return num;
}


/*------------------------------------------------------------------.
| Convert universal character name UCN to a single-byte character,  |
| and return that character.  Return -1 if UCN does not correspond  |
| to a single-byte character.                                       |
`------------------------------------------------------------------*/

static int
convert_ucn_to_byte (char const *ucn)
{
  verify (UCHAR_MAX <= INT_MAX);
  unsigned long int code = strtoul (ucn + 2, NULL, 16);

  /* FIXME: Currently we assume Unicode-compatible unibyte characters
     on ASCII hosts (i.e., Latin-1 on hosts with 8-bit bytes).  On
     non-ASCII hosts we support only the portable C character set.
     These limitations should be removed once we add support for
     multibyte characters.  */

  if (UCHAR_MAX < code)
    return -1;

#if ! ('$' == 0x24 && '@' == 0x40 && '`' == 0x60 && '~' == 0x7e)
  {
    /* A non-ASCII host.  Use CODE to index into a table of the C
       basic execution character set, which is guaranteed to exist on
       all Standard C platforms.  This table also includes '$', '@',
       and '`', which are not in the basic execution character set but
       which are unibyte characters on all the platforms that we know
       about.  */
    static signed char const table[] =
      {
        '\0',   -1,   -1,   -1,   -1,   -1,   -1, '\a',
        '\b', '\t', '\n', '\v', '\f', '\r',   -1,   -1,
          -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
          -1,   -1,   -1,   -1,   -1,   -1,   -1,   -1,
         ' ',  '!',  '"',  '#',  '$',  '%',  '&', '\'',
         '(',  ')',  '*',  '+',  ',',  '-',  '.',  '/',
         '0',  '1',  '2',  '3',  '4',  '5',  '6',  '7',
         '8',  '9',  ':',  ';',  '<',  '=',  '>',  '?',
         '@',  'A',  'B',  'C',  'D',  'E',  'F',  'G',
         'H',  'I',  'J',  'K',  'L',  'M',  'N',  'O',
         'P',  'Q',  'R',  'S',  'T',  'U',  'V',  'W',
         'X',  'Y',  'Z',  '[', '\\',  ']',  '^',  '_',
         '`',  'a',  'b',  'c',  'd',  'e',  'f',  'g',
         'h',  'i',  'j',  'k',  'l',  'm',  'n',  'o',
         'p',  'q',  'r',  's',  't',  'u',  'v',  'w',
         'x',  'y',  'z',  '{',  '|',  '}',  '~'
      };

    code = code < sizeof table ? table[code] : -1;
  }
#endif

  return code;
}


/*---------------------------------------------------------------------.
| Handle '#line INT( "FILE")?\n'.  ARGS has already skipped '#line '.  |
`---------------------------------------------------------------------*/

static void
handle_syncline (char *args, location loc)
{
  char *file;
  unsigned long int lineno = strtoul (args, &file, 10);
  if (INT_MAX <= lineno)
    {
      complain (&loc, Wother, _("line number overflow"));
      lineno = INT_MAX;
    }

  file = strchr (file, '"');
  if (file)
    {
      *strchr (file + 1, '"') = '\0';
      current_file = uniqstr_new (file + 1);
    }
  boundary_set (&scanner_cursor, current_file, lineno, 1);
}


/*----------------------------------------------------------------.
| For a token or comment starting at START, report message MSGID, |
| which should say that an end marker was found before the        |
| expected TOKEN_END. Then, pretend that TOKEN_END was found.     |
`----------------------------------------------------------------*/

static void
unexpected_end (boundary start, char const *msgid, char const *token_end)
{
  location loc;
  loc.start = start;
  loc.end = scanner_cursor;
  size_t i = strlen (token_end);

/* Adjust scanner cursor so that any later message does not count
     the characters about to be inserted.  */
  scanner_cursor.column -= i;

  while (i != 0)
    unput (token_end[--i]);

  token_end = quote (token_end);
  /* Instead of '\'', display "'".  */
  if (STREQ (token_end, "'\\''"))
    token_end = "\"'\"";
  complain (&loc, complaint, _(msgid), token_end);
}


/*------------------------------------------------------------------------.
| Report an unexpected EOF in a token or comment starting at START.       |
| An end of file was encountered and the expected TOKEN_END was missing.  |
| After reporting the problem, pretend that TOKEN_END was found.          |
`------------------------------------------------------------------------*/

static void
unexpected_eof (boundary start, char const *token_end)
{
  unexpected_end (start, N_("missing %s at end of file"), token_end);
}


/*----------------------------------------.
| Likewise, but for unexpected newlines.  |
`----------------------------------------*/

static void
unexpected_newline (boundary start, char const *token_end)
{
  unexpected_end (start, N_("missing %s at end of line"), token_end);
}


/*-------------------------.
| Initialize the scanner.  |
`-------------------------*/

void
gram_scanner_initialize (void)
{
  obstack_init (&obstack_for_string);
}


/*-----------------------------------------------.
| Free all the memory allocated to the scanner.  |
`-----------------------------------------------*/

void
gram_scanner_free (void)
{
  obstack_free (&obstack_for_string, 0);
  /* Reclaim Flex's buffers.  */
  gram_lex_destroy ();
}

