#line 2 "scan-gram.c"

#line 4 "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 35
#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;
#endif /* ! C99 */

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

#endif /* ! FLEXINT_H */

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

/* %if-not-reentrant */
extern int 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_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
	{
/* %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.
	 */
	int yy_n_chars;

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

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

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

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

	int yy_buffer_status;

#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
	/* When an EOF's been seen but there's still some text to process
	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
	 * shouldn't try reading from the input source any more.  We might
	 * still have a bunch of tokens to match, though, because of
	 * possible backing-up.
	 *
	 * When we actually see the EOF, we change the status to "new"
	 * (via 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 int yy_n_chars;		/* number of characters read into yy_ch_buf */
int 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,int 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(n) 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 109
#define YY_END_OF_BUFFER 110
/* 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[474] =
    {   0,
        0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
        0,    0,    0,    0,    0,    0,    0,    0,   77,   77,
       93,   93,   93,   93,    0,    0,    0,    0,  110,   65,
        2,    2,   59,   65,   58,    1,   54,   65,   55,   55,
       51,   65,   49,   64,   61,   50,   65,   74,   74,  107,
       78,   78,  107,   80,   79,   79,   68,    2,    1,   68,
       67,   66,   68,  108,   99,  107,   98,  107,  107,  107,
      102,  104,  107,   76,  107,   97,   96,  107,   95,   94,
       71,    2,    1,   69,   71,   70,   71,   72,    2,    1,
       72,   72,   63,   48,   48,   48,   48,   48,   48,   48,

       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
       48,   48,   60,   54,    4,    3,   57,   55,   57,    0,
        0,   53,    0,   73,   92,   90,   81,   92,   83,   84,
       85,   86,   87,   88,   92,   89,   92,  106,  100,  101,
        0,  103,    0,  102,  105,    0,   75,    0,    0,   77,
       93,   93,   93,   93,   69,   48,   48,   48,   48,   48,
       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
       48,   48,   48,   48,   48,   48,    3,   57,   56,   62,
       52,    0,   81,    0,    0,   82,    0,    0,    0,    0,

        0,    0,    0,    0,    0,    0,    0,    0,    0,   48,
       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
       48,   48,   48,   48,   48,    0,   81,    0,    0,   48,
        7,   48,   48,   48,   48,   48,   48,   48,   48,   48,
       48,   48,   48,   22,   48,   48,   48,   48,   48,   48,
       48,   48,   48,   48,   48,   34,   48,   48,   48,   48,
       48,   48,   41,   48,   44,   48,   48,   47,    0,    0,
        0,   48,    8,   48,   48,   48,   13,   48,   48,   48,

       48,   48,   48,   48,   48,   48,   25,   48,   48,   48,
       48,   48,   31,   48,   48,   48,   48,   48,   38,   48,
       40,   42,   45,   48,    0,    0,   91,    6,   48,   10,
       48,   48,   15,   48,   48,   48,   48,   48,   48,   48,
       48,   48,   48,   48,   48,   32,   48,   48,   48,   48,
       48,   48,   48,    0,   48,   11,   48,   48,   48,   48,
       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
       48,   48,   35,   48,   37,   48,   48,   46,    0,   48,
       48,   48,   48,   48,   48,   48,   48,   21,   48,   48,
       48,   48,   28,   29,   48,   48,   48,   39,   48,    0,

       48,   48,   48,   16,   48,   48,   48,   48,   23,   24,
       48,   48,   48,   48,   48,   48,    0,    0,   48,   12,
       48,   48,   48,   20,   48,   48,   48,   48,   48,   48,
       48,    5,   48,   48,   17,   48,   48,   26,   48,   48,
       33,   36,   43,    9,   48,   48,   48,   48,   48,   14,
       48,   48,   48,   48,   48,   19,   48,   48,   48,   27,
       48,   48,   48,   48,   48,   18,   48,   48,   48,   48,
       48,   30,    0
    } ;

static yyconst flex_int32_t yy_ec[256] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
        2,    2,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    4,    1,    5,    6,    1,    7,    1,    8,    1,
        1,    9,    1,   10,   11,   12,   13,   14,   15,   15,
       15,   15,   15,   15,   15,   16,   16,   17,   18,   19,
       20,   21,   22,    1,   23,   23,   23,   23,   23,   23,
       12,   12,   12,   12,   12,   12,   12,   12,   12,   12,
       12,   12,   12,   12,   24,   12,   12,   25,   12,   12,
       26,   27,   28,    1,   29,    1,   30,   31,   32,   33,

       34,   35,   36,   37,   38,   12,   39,   40,   41,   42,
       43,   44,   45,   46,   47,   48,   49,   50,   12,   51,
       52,   12,   53,   54,   55,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    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[57] =
    {   0,
        1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
        3,    4,    1,    5,    5,    5,    1,    1,    1,    1,
        1,    1,    5,    4,    4,    6,    1,    6,    4,    5,
        5,    5,    5,    5,    5,    4,    4,    4,    4,    4,
        4,    4,    4,    4,    4,    4,    4,    4,    4,    4,
        4,    4,    1,    1,    1,    7
    } ;

static yyconst flex_int16_t yy_base[497] =
    {   0,
        0,  756,  752,  751,   54,   55,   58,   59,   61,   66,
       86,   93,  100,  113,  120,  126,   81,  121,   70,   77,
      132,  133,  114,  137,  168,  753,  144,  223,  758,  763,
      763,  763,  763,  230,  763,  763,    0,  143,  233,  128,
      763,  140,  763,  763,  763,  763,  717,  763,  743,  763,
      763,  763,  280,  763,  763,  763,  763,  763,  763,  149,
      763,  763,  715,  763,  763,  699,  763,  219,  213,  224,
      763,  763,   75,  763,  287,  763,  763,  294,  763,  763,
      763,  763,  763,    0,  154,  763,  713,  763,  763,  763,
      226,  712,  763,    0,  713,  707,  259,  199,  711,  708,

      705,  271,  712,  269,  696,  270,  218,  270,  289,  702,
      709,  712,  763,    0,  763,    0,    0,  319,  328,  720,
      719,  763,  701,  763,  763,  763,  136,    0,  763,  763,
      763,  763,  763,  763,    0,  763,    0,  763,  763,  763,
      334,  763,  343,  763,  763,  346,  763,  350,  353,  711,
      763,  362,  710,  365,    0,    0,  694,  702,  339,  688,
      687,  688,  190,  685,  692,  687,  257,  696,  681,  685,
      360,  691,  676,  677,  286,  676,  676,  684,  685,  688,
      671,  677,  671,  676,  667,  680,    0,    0,    0,  763,
      763,  669,  272,    0,    0,    0,  373,  369,  377,  217,

      381,  380,  388,   82,  391,  401,  406,  409,  370,  680,
      675,  659,  368,  659,  672,  662,  670,  669,  668,  690,
      652,  663,  650,  686,  666,  659,  660,  273,  384,  647,
      648,  644,  658,  647,  654,  638,  649,  645,  638,  642,
      648,  647,  637,  648,  646,  643,  763,    0,    0,  630,
        0,  639,  625,  631,  626,  639,  624,  637,  657,  634,
      622,  627,  615,    0,  619,  614,  627,  389,  626,  621,
      611,  623,  615,  606,  620,    0,  605,  390,  614,  603,
      616,  601,    0,  606,    0,  605,  603,    0,  641,    0,
        0,  592,    0,  603,  608,  592,    0,  404,  592,  595,

      405,  608,  607,  606,  605,  596,    0,  589,  597,  589,
      583,  581,    0,  580,  616,  592,  581,  578,    0,  575,
        0,  409,    0,  575,  407,    0,  763,    0,  573,  573,
      587,  568,  413,  571,  573,  569,  574,  577,  566,  568,
      564,  579,  574,  564,  572,    0,  561,  558,  573,  568,
      558,  552,  565,  421,  415,    0,  550,  563,  550,  561,
      545,  546,  581,  557,  560,  547,  554,  538,  539,  553,
      538,  553,    0,  536,    0,  539,  550,    0,  574,  534,
      534,  530,  529,  539,  525,  538,  541,    0,  529,  522,
      533,  527,    0,    0,  525,  519,  517,    0,  532,  557,

      515,  514,  528,    0,  520,  513,  510,  523,    0,    0,
      516,  505,  514,  521,  516,  509,  543,   72,  513,    0,
      503,  494,  495,    0,  495,  491,  416,  499,  499,  493,
      504,  763,  505,  489,    0,  487,  496,    0,  489,  494,
        0,    0,    0,    0,  497,  417,  487,  483,  481,    0,
      492,  484,  491,  476,  485,    0,  485,  469,  458,    0,
      449,  409,  430,  393,  395,    0,  402,  385,  383,  395,
      342,    0,  763,  446,  453,  460,  467,  472,  474,  479,
      485,  492,  497,  500,  505,  510,  367,  335,  334,  322,
      320,  252,  160,  122,  107,  515

    } ;

static yyconst flex_int16_t yy_def[497] =
    {   0,
      473,    1,  474,  474,  475,  475,  475,  475,  476,  476,
      475,  475,  475,  475,  475,  475,  475,  475,  475,  475,
      475,  475,  475,  475,  473,   25,  477,  477,  473,  473,
      473,  473,  473,  473,  473,  473,  478,  473,  479,  479,
      473,  480,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  481,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  482,  473,  473,
      473,  473,  473,  483,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  484,  484,  484,  484,  484,  484,  484,

      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  473,  478,  473,  485,  486,  479,  486,  480,
      480,  473,  473,  473,  473,  473,  473,  487,  473,  473,
      473,  473,  473,  473,  488,  473,  489,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  483,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  485,  486,  119,  473,
      473,  473,  473,  490,  491,  489,  473,  473,  473,  473,

      473,  473,  473,  473,  473,  473,  473,  473,  482,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  473,  473,  492,  493,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  473,  494,
      495,  484,  484,  484,  484,  484,  484,  484,  484,  484,

      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  473,  488,  473,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  473,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  473,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  496,

      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  496,  496,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  473,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,    0,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473

    } ;

static yyconst flex_int16_t yy_nxt[820] =
    {   0,
       30,   31,   32,   31,   33,   30,   34,   35,   30,   36,
       30,   37,   38,   39,   40,   40,   30,   41,   42,   43,
       30,   30,   37,   37,   37,   44,   30,   30,   37,   37,
       37,   37,   37,   37,   37,   37,   37,   37,   37,   37,
       37,   37,   37,   37,   37,   37,   37,   37,   37,   37,
       37,   37,   45,   46,   30,   30,   51,   51,   52,   52,
       55,   55,   58,   32,   58,   56,   56,   58,   32,   58,
       59,   63,   74,   60,  432,   59,  418,   61,   60,   74,
       53,   53,   61,   64,   53,   53,   62,  147,   64,   73,
       65,   62,   66,   67,  147,   64,   75,   65,   68,   66,

       67,  148,   64,   75,   65,   68,   69,   67,  148,   54,
       54,  327,   68,   54,   54,   64,   79,   65,   70,   69,
       67,   80,   64,   64,   65,   68,  326,   67,   64,   73,
       65,   70,   68,   67,   76,   76,   77,   77,   68,   79,
       78,  118,  118,  118,   80,   89,   32,   89,  121,  193,
      193,  115,   71,   90,   72,  116,   91,  115,   78,   78,
      122,  116,  115,   78,  291,   71,  116,   72,   81,   82,
       32,   82,   81,   81,   81,   81,   81,   83,   81,   84,
       85,   81,   81,   81,   81,   81,   81,   81,   81,   81,
       84,   84,   84,   81,   81,   86,   84,   84,   84,   84,

       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
       81,   81,   81,   81,   89,   32,   89,  139,   92,  218,
      144,  140,   90,  142,  115,   91,   93,  142,  116,  143,
      219,   94,  145,  143,  161,  141,  118,  118,  118,  162,
      146,  177,   94,   94,   94,  178,  290,  119,   94,   94,
       95,   96,   97,   98,   99,  100,   94,  101,   94,  102,
      103,  104,  105,  106,   94,  107,  108,  109,  110,  111,
       94,  112,  113,  119,  126,  247,  247,  126,  149,  150,
      149,  223,  159,  127,  127,  152,  153,  152,  170,  174,

      166,  126,  160,  128,  167,  269,  126,  224,  179,  129,
      130,  171,  270,  168,  131,  175,  172,  180,  176,  233,
      154,  132,  181,  234,  249,  133,  248,  134,  135,  136,
      137,  182,  118,  118,  118,  197,  198,  197,  196,  195,
      183,  189,  189,  189,  199,  200,  199,  201,  202,  201,
      189,  203,  204,  203,  149,  150,  149,  189,  189,  189,
      189,  189,  189,  206,  153,  206,  208,  209,  208,  212,
      228,  194,  473,  213,  197,  198,  197,  139,  199,  200,
      199,  140,  201,  202,  201,  214,  144,  472,  228,  203,
      204,  203,  149,  150,  149,  141,  154,  253,  145,  308,

      317,  229,  206,  153,  206,  254,  146,  206,  153,  206,
      208,  209,  208,  271,  332,  335,  272,  308,  317,  352,
      354,  354,  354,  359,  379,  380,  439,  451,  471,  470,
      469,  468,  332,  335,  354,  354,  354,  352,  467,  466,
      465,  359,  464,  380,  439,  451,   48,   48,   48,   48,
       48,   48,   48,   50,   50,   50,   50,   50,   50,   50,
       57,   57,   57,   57,   57,   57,   57,   88,   88,   88,
       88,   88,   88,   88,  114,  114,  114,  117,  117,  120,
      463,  120,  120,  120,  120,  125,  125,  125,  125,  125,
      125,  125,  151,  151,  151,  151,  151,  462,  151,  155,

      155,  155,  156,  156,  156,  187,  461,  187,  187,  187,
      187,  187,  188,  188,  188,  417,  460,  417,  417,  417,
      417,  417,  459,  458,  457,  456,  455,  454,  453,  452,
      450,  449,  448,  447,  446,  445,  444,  443,  442,  441,
      440,  438,  437,  436,  435,  434,  433,  418,  431,  430,
      429,  428,  427,  426,  425,  424,  423,  422,  421,  420,
      419,  418,  416,  415,  414,  413,  412,  411,  410,  409,
      408,  407,  406,  405,  404,  403,  402,  401,  400,  399,
      398,  397,  396,  395,  394,  393,  392,  391,  390,  389,
      388,  387,  386,  385,  384,  383,  382,  381,  378,  377,

      376,  375,  374,  373,  372,  371,  370,  369,  368,  367,
      366,  365,  364,  363,  362,  361,  360,  358,  357,  356,
      355,  353,  351,  350,  349,  348,  347,  346,  345,  344,
      343,  342,  341,  340,  339,  338,  337,  336,  334,  333,
      331,  330,  329,  328,  325,  324,  323,  322,  321,  320,
      319,  318,  316,  315,  314,  313,  312,  311,  310,  309,
      307,  306,  305,  304,  303,  302,  301,  300,  299,  298,
      297,  296,  295,  294,  293,  292,  289,  288,  287,  286,
      285,  284,  283,  282,  281,  280,  279,  278,  277,  276,
      275,  274,  273,  268,  267,  266,  265,  264,  263,  262,

      261,  260,  259,  258,  257,  256,  255,  252,  251,  250,
      246,  245,  244,  243,  242,  241,  240,  239,  238,  237,
      236,  235,  232,  231,  230,  227,  226,  225,  222,  221,
      220,  217,  216,  215,  211,  210,  207,  205,  192,  191,
      190,  186,  185,  184,  173,  169,  165,  164,  163,  158,
      157,  123,  123,  138,  123,  124,  123,  473,   87,   49,
       49,   47,   29,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,

      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473
    } ;

static yyconst flex_int16_t yy_chk[820] =
    {   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,    5,    6,    5,    6,
        7,    8,    9,    9,    9,    7,    8,   10,   10,   10,
        9,   10,   19,    9,  418,   10,  418,    9,   10,   20,
        5,    6,   10,   17,    7,    8,    9,   73,   11,   17,
       11,   10,   11,   11,  204,   12,   19,   12,   11,   12,

       12,   73,   13,   20,   13,   12,   13,   13,  204,    5,
        6,  495,   13,    7,    8,   14,   23,   14,   13,   14,
       14,   23,   15,   18,   15,   14,  494,   15,   16,   18,
       16,   14,   15,   16,   21,   22,   21,   22,   16,   24,
       23,   40,   40,   40,   24,   27,   27,   27,   42,  127,
      127,   38,   13,   27,   13,   38,   27,   60,   21,   22,
       42,   60,   85,   24,  493,   14,   85,   14,   25,   25,
       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,

       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
       25,   25,   25,   25,   28,   28,   28,   68,   28,  163,
       70,   68,   28,   69,   91,   28,   34,  200,   91,   69,
      163,   34,   70,  200,   98,   68,   39,   39,   39,   98,
       70,  107,   34,   34,   34,  107,  492,   39,   34,   34,
       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
       34,   34,   34,   34,   34,   34,   34,   34,   34,   34,
       34,   34,   34,   39,   53,  193,  193,   53,   75,   75,
       75,  167,   97,   53,   53,   78,   78,   78,  104,  106,

      102,   53,   97,   53,  102,  228,   53,  167,  108,   53,
       53,  104,  228,  102,   53,  106,  104,  108,  106,  175,
       78,   53,  109,  175,  491,   53,  490,   53,   53,   53,
       53,  109,  118,  118,  118,  141,  141,  141,  489,  488,
      109,  119,  119,  119,  143,  143,  143,  146,  146,  146,
      119,  148,  148,  148,  149,  149,  149,  119,  119,  119,
      119,  119,  119,  152,  152,  152,  154,  154,  154,  159,
      171,  487,  209,  159,  197,  197,  197,  198,  199,  199,
      199,  198,  201,  201,  201,  159,  202,  471,  171,  203,
      203,  203,  205,  205,  205,  198,  209,  213,  202,  268,

      278,  171,  206,  206,  206,  213,  202,  207,  207,  207,
      208,  208,  208,  229,  298,  301,  229,  268,  278,  322,
      325,  325,  325,  333,  354,  355,  427,  446,  470,  469,
      468,  467,  298,  301,  354,  354,  354,  322,  465,  464,
      463,  333,  462,  355,  427,  446,  474,  474,  474,  474,
      474,  474,  474,  475,  475,  475,  475,  475,  475,  475,
      476,  476,  476,  476,  476,  476,  476,  477,  477,  477,
      477,  477,  477,  477,  478,  478,  478,  479,  479,  480,
      461,  480,  480,  480,  480,  481,  481,  481,  481,  481,
      481,  481,  482,  482,  482,  482,  482,  459,  482,  483,

      483,  483,  484,  484,  484,  485,  458,  485,  485,  485,
      485,  485,  486,  486,  486,  496,  457,  496,  496,  496,
      496,  496,  455,  454,  453,  452,  451,  449,  448,  447,
      445,  440,  439,  437,  436,  434,  433,  431,  430,  429,
      428,  426,  425,  423,  422,  421,  419,  417,  416,  415,
      414,  413,  412,  411,  408,  407,  406,  405,  403,  402,
      401,  400,  399,  397,  396,  395,  392,  391,  390,  389,
      387,  386,  385,  384,  383,  382,  381,  380,  379,  377,
      376,  374,  372,  371,  370,  369,  368,  367,  366,  365,
      364,  363,  362,  361,  360,  359,  358,  357,  353,  352,

      351,  350,  349,  348,  347,  345,  344,  343,  342,  341,
      340,  339,  338,  337,  336,  335,  334,  332,  331,  330,
      329,  324,  320,  318,  317,  316,  315,  314,  312,  311,
      310,  309,  308,  306,  305,  304,  303,  302,  300,  299,
      296,  295,  294,  292,  289,  287,  286,  284,  282,  281,
      280,  279,  277,  275,  274,  273,  272,  271,  270,  269,
      267,  266,  265,  263,  262,  261,  260,  259,  258,  257,
      256,  255,  254,  253,  252,  250,  246,  245,  244,  243,
      242,  241,  240,  239,  238,  237,  236,  235,  234,  233,
      232,  231,  230,  227,  226,  225,  224,  223,  222,  221,

      220,  219,  218,  217,  216,  215,  214,  212,  211,  210,
      192,  186,  185,  184,  183,  182,  181,  180,  179,  178,
      177,  176,  174,  173,  172,  170,  169,  168,  166,  165,
      164,  162,  161,  160,  158,  157,  153,  150,  123,  121,
      120,  112,  111,  110,  105,  103,  101,  100,   99,   96,
       95,   92,   87,   66,   63,   49,   47,   29,   26,    4,
        3,    2,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,

      473,  473,  473,  473,  473,  473,  473,  473,  473,  473,
      473,  473,  473,  473,  473,  473,  473,  473,  473
    } ;

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[109] =
    {   0,
      149,  150,  151,  152,  160,  178,  179,  180,  181,  182,
      183,  184,  185,  186,  187,  188,  189,  190,  191,  192,
      193,  194,  195,  196,  197,  198,  199,  200,  201,  202,
      203,  204,  205,  206,  207,  208,  209,  210,  211,  212,
      213,  214,  215,  216,  217,  218,  219,  221,  225,  226,
      227,  228,  229,  231,  238,  242,  249,  254,  257,  260,
      263,  271,  279,  286,  293,  310,  325,  330,  349,  361,
      376,  388,  405,  406,  417,  428,  429,  441,  467,  512,
      522,  531,  541,  542,  543,  544,  545,  546,  547,  550,
      552,  560,  577,  582,  583,  589,  590,  601,  607,  613,

      619,  635,  636,  637,  653,  672,  712,  713
    } ;

/* 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 "scan-gram.l"
/* Bison Grammar Scanner                             -*- C -*-

   Copyright (C) 2002-2012 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 "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 "flex-scanner.h"

#include "complain.h"
#include "files.h"
#include "gram.h"
#include "quotearg.h"
#include "reader.h"
#include "uniqstr.h"

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

#include "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 ROLLBACK_CURRENT_TOKEN                                  \
  do {                                                          \
    scanner_cursor.column -= mbsnwidth (gram_text, gram_leng, 0);	\
    yyless (0);                                                 \
  } 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 :'. */

/* Three 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 %%). */

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

/* Strings and characters in code. */

/* Bracketed identifiers support. */

/* 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 and newline, as this simplifies our implementation.  */
/* Zero or more instances of backslash-newline.  Following GCC, allow
   white space between the backslash and the newline.  */
#line 1016 "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_PROLOGUE 5
#define SC_BRACED_CODE 6
#define SC_EPILOGUE 7
#define SC_COMMENT 8
#define SC_LINE_COMMENT 9
#define SC_STRING 10
#define SC_CHARACTER 11
#define SC_BRACKETED_ID 12
#define SC_RETURN_BRACKETED_ID 13

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

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

/* %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 fwrite( gram_text, gram_leng, 1, gram_out )
/* %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 = '*'; \
		int 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 120 "scan-gram.l"


  /* Nesting level of the current code in braces.  */
  int braces_level 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 1299 "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 >= 474 )
					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 != 473 );
		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 < 109 )
				fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
				         (long)yy_rule_linenum[yy_act], gram_text );
			else if ( yy_act == 109 )
				fprintf( stderr, "--accepting default rule (\"%s\")\n",
				         gram_text );
			else if ( yy_act == 110 )
				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 149 "scan-gram.l"
warn_at (*loc, _("stray ',' treated as white space"));
	YY_BREAK
case 2:
/* rule 2 can match eol */
#line 151 "scan-gram.l"
case 3:
/* rule 3 can match eol */
YY_RULE_SETUP
#line 151 "scan-gram.l"
;
	YY_BREAK
case 4:
YY_RULE_SETUP
#line 152 "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 160 "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 178 "scan-gram.l"
return PERCENT_NONASSOC;
	YY_BREAK
case 7:
YY_RULE_SETUP
#line 179 "scan-gram.l"
return PERCENT_CODE;
	YY_BREAK
case 8:
YY_RULE_SETUP
#line 180 "scan-gram.l"
return PERCENT_DEBUG;
	YY_BREAK
case 9:
YY_RULE_SETUP
#line 181 "scan-gram.l"
return PERCENT_DEFAULT_PREC;
	YY_BREAK
case 10:
YY_RULE_SETUP
#line 182 "scan-gram.l"
return PERCENT_DEFINE;
	YY_BREAK
case 11:
YY_RULE_SETUP
#line 183 "scan-gram.l"
return PERCENT_DEFINES;
	YY_BREAK
case 12:
YY_RULE_SETUP
#line 184 "scan-gram.l"
return PERCENT_DESTRUCTOR;
	YY_BREAK
case 13:
YY_RULE_SETUP
#line 185 "scan-gram.l"
return PERCENT_DPREC;
	YY_BREAK
case 14:
YY_RULE_SETUP
#line 186 "scan-gram.l"
return PERCENT_ERROR_VERBOSE;
	YY_BREAK
case 15:
YY_RULE_SETUP
#line 187 "scan-gram.l"
return PERCENT_EXPECT;
	YY_BREAK
case 16:
YY_RULE_SETUP
#line 188 "scan-gram.l"
return PERCENT_EXPECT_RR;
	YY_BREAK
case 17:
YY_RULE_SETUP
#line 189 "scan-gram.l"
return PERCENT_FILE_PREFIX;
	YY_BREAK
case 18:
YY_RULE_SETUP
#line 190 "scan-gram.l"
return PERCENT_YACC;
	YY_BREAK
case 19:
YY_RULE_SETUP
#line 191 "scan-gram.l"
return PERCENT_INITIAL_ACTION;
	YY_BREAK
case 20:
YY_RULE_SETUP
#line 192 "scan-gram.l"
return PERCENT_GLR_PARSER;
	YY_BREAK
case 21:
YY_RULE_SETUP
#line 193 "scan-gram.l"
return PERCENT_LANGUAGE;
	YY_BREAK
case 22:
YY_RULE_SETUP
#line 194 "scan-gram.l"
return PERCENT_LEFT;
	YY_BREAK
case 23:
YY_RULE_SETUP
#line 195 "scan-gram.l"
return PERCENT_LEX_PARAM;
	YY_BREAK
case 24:
YY_RULE_SETUP
#line 196 "scan-gram.l"
return PERCENT_LOCATIONS;
	YY_BREAK
case 25:
YY_RULE_SETUP
#line 197 "scan-gram.l"
return PERCENT_MERGE;
	YY_BREAK
case 26:
YY_RULE_SETUP
#line 198 "scan-gram.l"
return PERCENT_NAME_PREFIX;
	YY_BREAK
case 27:
YY_RULE_SETUP
#line 199 "scan-gram.l"
return PERCENT_NO_DEFAULT_PREC;
	YY_BREAK
case 28:
YY_RULE_SETUP
#line 200 "scan-gram.l"
return PERCENT_NO_LINES;
	YY_BREAK
case 29:
YY_RULE_SETUP
#line 201 "scan-gram.l"
return PERCENT_NONASSOC;
	YY_BREAK
case 30:
YY_RULE_SETUP
#line 202 "scan-gram.l"
return PERCENT_NONDETERMINISTIC_PARSER;
	YY_BREAK
case 31:
YY_RULE_SETUP
#line 203 "scan-gram.l"
return PERCENT_NTERM;
	YY_BREAK
case 32:
YY_RULE_SETUP
#line 204 "scan-gram.l"
return PERCENT_OUTPUT;
	YY_BREAK
case 33:
YY_RULE_SETUP
#line 205 "scan-gram.l"
return PERCENT_PARSE_PARAM;
	YY_BREAK
case 34:
YY_RULE_SETUP
#line 206 "scan-gram.l"
return PERCENT_PREC;
	YY_BREAK
case 35:
YY_RULE_SETUP
#line 207 "scan-gram.l"
return PERCENT_PRINTER;
	YY_BREAK
case 36:
YY_RULE_SETUP
#line 208 "scan-gram.l"
return PERCENT_PURE_PARSER;
	YY_BREAK
case 37:
YY_RULE_SETUP
#line 209 "scan-gram.l"
return PERCENT_REQUIRE;
	YY_BREAK
case 38:
YY_RULE_SETUP
#line 210 "scan-gram.l"
return PERCENT_RIGHT;
	YY_BREAK
case 39:
YY_RULE_SETUP
#line 211 "scan-gram.l"
return PERCENT_SKELETON;
	YY_BREAK
case 40:
YY_RULE_SETUP
#line 212 "scan-gram.l"
return PERCENT_START;
	YY_BREAK
case 41:
YY_RULE_SETUP
#line 213 "scan-gram.l"
return PERCENT_TOKEN;
	YY_BREAK
case 42:
YY_RULE_SETUP
#line 214 "scan-gram.l"
return PERCENT_TOKEN;
	YY_BREAK
case 43:
YY_RULE_SETUP
#line 215 "scan-gram.l"
return PERCENT_TOKEN_TABLE;
	YY_BREAK
case 44:
YY_RULE_SETUP
#line 216 "scan-gram.l"
return PERCENT_TYPE;
	YY_BREAK
case 45:
YY_RULE_SETUP
#line 217 "scan-gram.l"
return PERCENT_UNION;
	YY_BREAK
case 46:
YY_RULE_SETUP
#line 218 "scan-gram.l"
return PERCENT_VERBOSE;
	YY_BREAK
case 47:
YY_RULE_SETUP
#line 219 "scan-gram.l"
return PERCENT_YACC;
	YY_BREAK
case 48:
YY_RULE_SETUP
#line 221 "scan-gram.l"
{
    complain_at (*loc, _("invalid directive: %s"), quote (gram_text));
  }
	YY_BREAK
case 49:
YY_RULE_SETUP
#line 225 "scan-gram.l"
return EQUAL;
	YY_BREAK
case 50:
YY_RULE_SETUP
#line 226 "scan-gram.l"
return PIPE;
	YY_BREAK
case 51:
YY_RULE_SETUP
#line 227 "scan-gram.l"
return SEMICOLON;
	YY_BREAK
case 52:
YY_RULE_SETUP
#line 228 "scan-gram.l"
return TYPE_TAG_ANY;
	YY_BREAK
case 53:
YY_RULE_SETUP
#line 229 "scan-gram.l"
return TYPE_TAG_NONE;
	YY_BREAK
case 54:
YY_RULE_SETUP
#line 231 "scan-gram.l"
{
    val->uniqstr = uniqstr_new (gram_text);
    id_loc = *loc;
    bracketed_id_str = NULL;
    BEGIN SC_AFTER_IDENTIFIER;
  }
	YY_BREAK
case 55:
YY_RULE_SETUP
#line 238 "scan-gram.l"
{
    val->integer = scan_integer (gram_text, 10, *loc);
    return INT;
  }
	YY_BREAK
case 56:
YY_RULE_SETUP
#line 242 "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 57:
YY_RULE_SETUP
#line 249 "scan-gram.l"
{
    complain_at (*loc, _("invalid identifier: %s"), quote (gram_text));
  }
	YY_BREAK
/* Characters.  */
case 58:
YY_RULE_SETUP
#line 254 "scan-gram.l"
token_start = loc->start; BEGIN SC_ESCAPED_CHARACTER;
	YY_BREAK
/* Strings. */
case 59:
YY_RULE_SETUP
#line 257 "scan-gram.l"
token_start = loc->start; BEGIN SC_ESCAPED_STRING;
	YY_BREAK
/* Prologue. */
case 60:
YY_RULE_SETUP
#line 260 "scan-gram.l"
code_start = loc->start; BEGIN SC_PROLOGUE;
	YY_BREAK
/* Code in between braces.  */
case 61:
YY_RULE_SETUP
#line 263 "scan-gram.l"
{
    STRING_GROW;
    braces_level = 0;
    code_start = loc->start;
    BEGIN SC_BRACED_CODE;
  }
	YY_BREAK
/* A type. */
case 62:
YY_RULE_SETUP
#line 271 "scan-gram.l"
{
    obstack_grow (&obstack_for_string, gram_text + 1, gram_leng - 2);
    STRING_FINISH;
    val->uniqstr = uniqstr_new (last_string);
    STRING_FREE;
    return TYPE;
  }
	YY_BREAK
case 63:
YY_RULE_SETUP
#line 279 "scan-gram.l"
{
    static int percent_percent_count;
    if (++percent_percent_count == 2)
      BEGIN SC_EPILOGUE;
    return PERCENT_PERCENT;
  }
	YY_BREAK
case 64:
YY_RULE_SETUP
#line 286 "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 65:
YY_RULE_SETUP
#line 293 "scan-gram.l"
{
    complain_at (*loc, _("invalid character: %s"), quote (gram_text));
  }
	YY_BREAK
case YY_STATE_EOF(INITIAL):
#line 297 "scan-gram.l"
{
    loc->start = loc->end = scanner_cursor;
    yyterminate ();
  }
	YY_BREAK

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


case 66:
YY_RULE_SETUP
#line 310 "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 67:
YY_RULE_SETUP
#line 325 "scan-gram.l"
{
    BEGIN (bracketed_id_str ? SC_RETURN_BRACKETED_ID : INITIAL);
    *loc = id_loc;
    return ID_COLON;
  }
	YY_BREAK
case 68:
YY_RULE_SETUP
#line 330 "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 336 "scan-gram.l"
{
    BEGIN (bracketed_id_str ? SC_RETURN_BRACKETED_ID : INITIAL);
    *loc = id_loc;
    return ID;
  }
	YY_BREAK

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


case 69:
YY_RULE_SETUP
#line 349 "scan-gram.l"
{
    if (bracketed_id_str)
      {
	complain_at (*loc, _("unexpected identifier in bracketed name: %s"),
		     quote (gram_text));
      }
    else
      {
	bracketed_id_str = uniqstr_new (gram_text);
	bracketed_id_loc = *loc;
      }
  }
	YY_BREAK
case 70:
YY_RULE_SETUP
#line 361 "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_at (*loc, _("an identifier expected"));
  }
	YY_BREAK
case 71:
YY_RULE_SETUP
#line 376 "scan-gram.l"
{
    complain_at (*loc, _("invalid character in bracketed name: %s"),
		 quote (gram_text));
  }
	YY_BREAK
case YY_STATE_EOF(SC_BRACKETED_ID):
#line 380 "scan-gram.l"
{
    BEGIN bracketed_id_context_state;
    unexpected_eof (bracketed_id_start, "]");
  }
	YY_BREAK



case 72:
YY_RULE_SETUP
#line 388 "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 73:
YY_RULE_SETUP
#line 405 "scan-gram.l"
BEGIN context_state;
	YY_BREAK
case 74:
/* rule 74 can match eol */
YY_RULE_SETUP
#line 406 "scan-gram.l"
;
	YY_BREAK
case YY_STATE_EOF(SC_YACC_COMMENT):
#line 407 "scan-gram.l"
unexpected_eof (token_start, "*/"); BEGIN context_state;
	YY_BREAK

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


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

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


case 76:
/* rule 76 can match eol */
YY_RULE_SETUP
#line 428 "scan-gram.l"
STRING_GROW; BEGIN context_state;
	YY_BREAK
case 77:
/* rule 77 can match eol */
YY_RULE_SETUP
#line 429 "scan-gram.l"
STRING_GROW;
	YY_BREAK
case YY_STATE_EOF(SC_LINE_COMMENT):
#line 430 "scan-gram.l"
BEGIN context_state;
	YY_BREAK

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


case 78:
/* rule 78 can match eol */
YY_RULE_SETUP
#line 441 "scan-gram.l"
{
    if (gram_text[0] == '\n')
      unexpected_newline (token_start, "\"");
    STRING_FINISH;
    loc->start = token_start;
    val->chars = last_string;
    BEGIN INITIAL;
    return STRING;
  }
	YY_BREAK
case YY_STATE_EOF(SC_ESCAPED_STRING):
#line 450 "scan-gram.l"
{
    unexpected_eof (token_start, "\"");
    STRING_FINISH;
    loc->start = token_start;
    val->chars = last_string;
    BEGIN INITIAL;
    return STRING;
  }
	YY_BREAK

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


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



case 80:
YY_RULE_SETUP
#line 512 "scan-gram.l"
complain_at (*loc, _("invalid null character"));
	YY_BREAK

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


case 81:
YY_RULE_SETUP
#line 522 "scan-gram.l"
{
    unsigned long int c = strtoul (gram_text + 1, NULL, 8);
    if (!c || UCHAR_MAX < c)
      complain_at (*loc, _("invalid number after \\-escape: %s"),
                   gram_text+1);
    else
      obstack_1grow (&obstack_for_string, c);
  }
	YY_BREAK
case 82:
YY_RULE_SETUP
#line 531 "scan-gram.l"
{
    verify (UCHAR_MAX < ULONG_MAX);
    unsigned long int c = strtoul (gram_text + 2, NULL, 16);
    if (!c || UCHAR_MAX < c)
      complain_at (*loc, _("invalid number after \\-escape: %s"),
                   gram_text+1);
    else
      obstack_1grow (&obstack_for_string, c);
  }
	YY_BREAK
case 83:
YY_RULE_SETUP
#line 541 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\a');
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 542 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\b');
	YY_BREAK
case 85:
YY_RULE_SETUP
#line 543 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\f');
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 544 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\n');
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 545 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\r');
	YY_BREAK
case 88:
YY_RULE_SETUP
#line 546 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\t');
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 547 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\v');
	YY_BREAK
/* \\[\"\'?\\] would be shorter, but it confuses xgettext.  */
case 90:
YY_RULE_SETUP
#line 550 "scan-gram.l"
obstack_1grow (&obstack_for_string, gram_text[1]);
	YY_BREAK
case 91:
YY_RULE_SETUP
#line 552 "scan-gram.l"
{
    int c = convert_ucn_to_byte (gram_text);
    if (c <= 0)
      complain_at (*loc, _("invalid number after \\-escape: %s"),
                   gram_text+1);
    else
      obstack_1grow (&obstack_for_string, c);
  }
	YY_BREAK
case 92:
/* rule 92 can match eol */
YY_RULE_SETUP
#line 560 "scan-gram.l"
{
    char const *p = gram_text + 1;
    /* Quote only if escaping won't make the character visible.  */
    if (isspace ((unsigned char) *p) && isprint ((unsigned char) *p))
      p = quote (p);
    else
      p = quotearg_style_mem (escape_quoting_style, p, 1);
    complain_at (*loc, _("invalid character after \\-escape: %s"), p);
  }
	YY_BREAK

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


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



case 94:
YY_RULE_SETUP
#line 582 "scan-gram.l"
STRING_GROW; BEGIN context_state;
	YY_BREAK
case 95:
/* rule 95 can match eol */
YY_RULE_SETUP
#line 583 "scan-gram.l"
unexpected_newline (token_start, "'"); BEGIN context_state;
	YY_BREAK
case YY_STATE_EOF(SC_CHARACTER):
#line 584 "scan-gram.l"
unexpected_eof (token_start, "'"); BEGIN context_state;
	YY_BREAK



case 96:
YY_RULE_SETUP
#line 589 "scan-gram.l"
STRING_GROW; BEGIN context_state;
	YY_BREAK
case 97:
/* rule 97 can match eol */
YY_RULE_SETUP
#line 590 "scan-gram.l"
unexpected_newline (token_start, "\""); BEGIN context_state;
	YY_BREAK
case YY_STATE_EOF(SC_STRING):
#line 591 "scan-gram.l"
unexpected_eof (token_start, "\""); BEGIN context_state;
	YY_BREAK

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


case 98:
YY_RULE_SETUP
#line 601 "scan-gram.l"
{
    STRING_GROW;
    context_state = YY_START;
    token_start = loc->start;
    BEGIN SC_CHARACTER;
  }
	YY_BREAK
case 99:
YY_RULE_SETUP
#line 607 "scan-gram.l"
{
    STRING_GROW;
    context_state = YY_START;
    token_start = loc->start;
    BEGIN SC_STRING;
  }
	YY_BREAK
case 100:
/* rule 100 can match eol */
YY_RULE_SETUP
#line 613 "scan-gram.l"
{
    STRING_GROW;
    context_state = YY_START;
    token_start = loc->start;
    BEGIN SC_COMMENT;
  }
	YY_BREAK
case 101:
/* rule 101 can match eol */
YY_RULE_SETUP
#line 619 "scan-gram.l"
{
    STRING_GROW;
    context_state = YY_START;
    BEGIN SC_LINE_COMMENT;
  }
	YY_BREAK

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


case 102:
/* rule 102 can match eol */
YY_RULE_SETUP
#line 635 "scan-gram.l"
STRING_GROW; braces_level++;
	YY_BREAK
case 103:
/* rule 103 can match eol */
YY_RULE_SETUP
#line 636 "scan-gram.l"
STRING_GROW; braces_level--;
	YY_BREAK
case 104:
YY_RULE_SETUP
#line 637 "scan-gram.l"
{
    obstack_1grow (&obstack_for_string, '}');

    --braces_level;
    if (braces_level < 0)
      {
	STRING_FINISH;
	loc->start = code_start;
	val->code = last_string;
	BEGIN INITIAL;
	return BRACED_CODE;
      }
  }
	YY_BREAK
/* Tokenize '<<%' correctly (as '<<' '%') rather than incorrrectly
     (as '<' '<%').  */
case 105:
/* rule 105 can match eol */
YY_RULE_SETUP
#line 653 "scan-gram.l"
STRING_GROW;
	YY_BREAK
case YY_STATE_EOF(SC_BRACED_CODE):
#line 655 "scan-gram.l"
{
    unexpected_eof (code_start, "}");
    STRING_FINISH;
    loc->start = code_start;
    val->code = last_string;
    BEGIN INITIAL;
    return BRACED_CODE;
  }
	YY_BREAK

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


case 106:
YY_RULE_SETUP
#line 672 "scan-gram.l"
{
    STRING_FINISH;
    loc->start = code_start;
    val->chars = last_string;
    BEGIN INITIAL;
    return PROLOGUE;
  }
	YY_BREAK
case YY_STATE_EOF(SC_PROLOGUE):
#line 680 "scan-gram.l"
{
    unexpected_eof (code_start, "%}");
    STRING_FINISH;
    loc->start = code_start;
    val->chars = last_string;
    BEGIN INITIAL;
    return PROLOGUE;
  }
	YY_BREAK

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


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

/*-----------------------------------------------------.
  | By default, grow the string obstack with the input.  |
  `-----------------------------------------------------*/
case 107:
#line 713 "scan-gram.l"
case 108:
/* rule 108 can match eol */
YY_RULE_SETUP
#line 713 "scan-gram.l"
STRING_GROW;
	YY_BREAK
case 109:
YY_RULE_SETUP
#line 715 "scan-gram.l"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 2395 "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
		{
			int num_to_read =
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;

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

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

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

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

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

				b->yy_ch_buf = (char *)
					/* Include room in for 2 EOB chars. */
					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), (size_t) num_to_read );

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	if ( (yy_n_chars) == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			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)] : 56);
		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 >= 474 )
				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 = 56;
	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 >= 474 )
			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 == 473);

	return yy_is_jam ? 0 : yy_current_state;
}

/* %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 */
			int offset = (yy_c_buf_p) - (yytext_ptr);
			++(yy_c_buf_p);

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

					/* Reset buffer status. */
					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  );
}

/* %if-c-only */

/* %endif */

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

/* 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 */
{
	int num_to_alloc;
    
	if (!(yy_buffer_stack)) {

		/* First allocation is just for 2 elements, since we don't know if this
		 * scanner will even need a stack. We use 2 instead of 1 to avoid an
		 * immediate realloc on the next call.
         */
		num_to_alloc = 1;
		(yy_buffer_stack) = (struct yy_buffer_state**)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 bytes the byte buffer to scan
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 * 
 * @return the newly allocated buffer state object.
 */
YY_BUFFER_STATE gram__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
{
	YY_BUFFER_STATE b;
	char *buf;
	yy_size_t n;
	int i;
    
	/* Get memory for full buffer, including space for trailing EOB's. */
	n = _yybytes_len + 2;
	buf = (char *) 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.
 * 
 */
int 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 715 "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_at (loc, _("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"'.  ARGS has already skipped '#line '.  |
`----------------------------------------------------------------*/

static void
handle_syncline (char *args, location loc)
{
  char *after_num;
  unsigned long int lineno = strtoul (args, &after_num, 10);
  char *file = mbschr (after_num, '"') + 1;
  *mbschr (file, '"') = '\0';
  if (INT_MAX <= lineno)
    {
      warn_at (loc, _("line number overflow"));
      lineno = INT_MAX;
    }
  current_file = uniqstr_new (file);
  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.					  |
`----------------------------------------------------------------*/

static void
unexpected_end (boundary start, char const *msgid, char const *token_end)
{
  location loc;
  loc.start = start;
  loc.end = scanner_cursor;
  token_end = quote (token_end);
  // Instead of '\'', display "'".
  if (!strcmp (token_end, "'\\''"))
    token_end = "\"'\"";
  complain_at (loc, _(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.  |
`------------------------------------------------------------------------*/

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

