#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 37
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif

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

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

/* %if-c-only */

/* %endif */

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

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

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

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

#ifndef FLEXINT_H
#define FLEXINT_H

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

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

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

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

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

#endif /* ! C99 */

#endif /* ! FLEXINT_H */

/* %endif */

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

#ifdef __cplusplus

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

#else	/* ! __cplusplus */

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

#define YY_USE_CONST

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

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

/* %not-for-header */

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

/* %not-for-header */

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

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

/* %if-not-reentrant */

/* %endif */

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

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

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

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

#define YY_END_OF_BUFFER_CHAR 0

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

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

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

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

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

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

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

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

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

#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
	{
/* %if-c-only */
	FILE *yy_input_file;
/* %endif */

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

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

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

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

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

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

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

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

	int yy_buffer_status;

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

	};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */

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

/* %if-not-reentrant */

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

/* %endif */

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

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

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

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

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

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

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

/* %endif */

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

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

#define YY_FLUSH_BUFFER gram__flush_buffer(YY_CURRENT_BUFFER )

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

/* %endif */

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

#define yy_new_buffer gram__create_buffer

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

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

#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

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

#define gram_wrap() 1
#define YY_SKIP_YYWRAP

#define FLEX_DEBUG

typedef unsigned char YY_CHAR;

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

typedef int yy_state_type;

extern int gram_lineno;

int gram_lineno = 1;

extern char *gram_text;
#define yytext_ptr gram_text

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

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

/* %endif */

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

/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
#define YY_NUM_RULES 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[482] =
    {   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,   65,    1,   54,   65,   55,
       55,   51,   65,   49,   54,   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,   71,   70,   71,
       72,    2,    1,   72,   72,   65,    0,   63,   48,   48,

       48,   48,   48,   48,   48,   48,   48,   48,   48,   48,
       48,   48,   48,   48,   48,   48,   48,   60,   54,   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,
       71,   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,   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,    5,    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,
       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,    5,    6,    7,    5,    8,    5,    9,    5,
        5,   10,    5,   11,   12,   13,   14,   15,   16,   16,
       16,   16,   16,   16,   16,   17,   17,   18,   19,   20,
       21,   22,   23,    5,   24,   24,   24,   24,   24,   24,
       25,   25,   25,   25,   25,   25,   25,   25,   25,   25,
       25,   25,   25,   25,   26,   25,   25,   27,   25,   25,
       28,   29,   30,    5,   31,    5,   32,   33,   34,   35,

       36,   37,   38,   39,   40,   25,   41,   42,   43,   44,
       45,   46,   47,   48,   49,   50,   51,   52,   25,   53,
       54,   25,   55,   56,   57,    5,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,

        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    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[59] =
    {   0,
        1,    2,    3,    2,    4,    5,    4,    5,    5,    5,
        5,    6,    7,    8,    9,    9,    9,    4,    5,    5,
        5,    5,    4,    9,   10,   10,   10,   11,    4,   12,
       10,    9,    9,    9,    9,    9,    9,   10,   10,   10,
       10,   10,   10,   10,   10,   10,   10,   10,   10,   10,
       10,   10,   10,   10,    5,    5,    5,   13
    } ;

static yyconst flex_int16_t yy_base[508] =
    {   0,
        0,  899,  895,  894,   56,   57,   58,   61,   70,   89,
       96,  115,  119,  128,   62,  129,   72,   91,   66,   77,
      138,  143,   80,  142,  185,  896,  150,  155,  902,    0,
      907,  907,  907,  243,  907,  907,  907,  301,   98,  288,
       62,  907,  146,  907,  315,  907,  907,  907,  859,  907,
      886,  907,  907,  907,  368,  907,  907,  907,  907,  907,
      907,  116,  907,  907,  857,  907,  907,  841,  907,  297,
       91,  155,  907,  907,  126,  907,  175,  907,  907,  325,
      907,  907,    0,  907,    0,    0,  307,  907,  907,  855,
      907,  907,  907,  322,  854,    0,    0,  907,    0,  855,

      849,  114,  117,  853,  850,  847,  303,  854,  302,  838,
      305,  306,  132,  304,  844,  851,  854,  907,  421,    0,
      907,    0,    0,  345,  465,  863,  862,  907,  843,  907,
      907,  907,  165,    0,  907,  907,  907,  907,  907,  907,
        0,  907,    0,  907,  907,  907,  361,  907,  364,  907,
      907,  367,  907,  376,  383,  853,  907,  386,  852,  400,
        0,    0,    0,    0,  836,  844,  359,  830,  829,  830,
      270,  827,  834,  829,  272,  838,  823,  827,  383,  833,
      818,  819,  315,  818,  818,  826,  827,  830,  813,  819,
      813,  818,  809,  822,    0,    0,    0,  907,  907,  811,

      360,    0,    0,    0,  407,  403,  421,  321,  427,  427,
      434,  343,  438,  450,  455,  458,  378,  822,  817,  801,
      278,  801,  814,  804,  812,  811,  810,  833,  794,  805,
      792,  829,  808,  801,  802,  364,  411,  789,  790,  786,
      800,  789,  796,  780,  791,  787,  780,  784,  790,  789,
      779,  790,  788,  785,  907,    0,    0,  772,    0,  781,
      767,  773,  768,  781,  766,  779,  800,  776,  764,  769,
      757,    0,  761,  756,  769,  433,  768,  763,  753,  765,
      757,  748,  762,    0,  747,  436,  756,  745,  758,  743,
        0,  748,    0,  747,  745,    0,  785,    0,    0,  734,

        0,  745,  750,  734,    0,  437,  734,  737,  443,  750,
      749,  748,  747,  738,    0,  731,  739,  731,  725,  723,
        0,  722,  759,  734,  723,  720,    0,  717,    0,  453,
        0,  717,  454,    0,  907,    0,  715,  715,  729,  710,
      454,  713,  715,  711,  716,  719,  708,  710,  706,  721,
      716,  706,  714,    0,  703,  700,  715,  710,  700,  694,
      707,  488,  463,    0,  692,  705,  692,  703,  687,  688,
      724,  699,  702,  689,  696,  680,  681,  695,  680,  695,
        0,  678,    0,  681,  692,    0,  907,  717,  676,  676,
      672,  671,  681,  667,  680,  683,    0,  671,  664,  675,

      669,    0,    0,  667,  661,  659,    0,  674,  700,  657,
      656,  670,    0,  662,  655,  652,  665,    0,    0,  658,
      647,  656,  663,  658,  651,  686,  470,  655,    0,  645,
      626,  623,    0,  611,  603,  465,  598,  595,  588,  599,
      600,  584,    0,  579,  588,    0,  579,  584,    0,    0,
        0,    0,  555,  475,  541,  534,  530,    0,  539,  530,
      537,  519,  528,    0,  533,  526,  521,    0,  527,  524,
      483,  444,  444,    0,  456,  438,  434,  442,  424,    0,
      907,  506,  519,  532,  545,  558,  571,  578,  588,  600,
      613,  626,  634,  641,  648,  658,  666,  454,  406,  389,

      384,  373,  138,  102,   88,   57,  676
    } ;

static yyconst flex_int16_t yy_def[508] =
    {   0,
      481,    1,  482,  482,  483,  483,  483,  483,  484,  484,
      483,  483,  483,  483,  483,  483,  483,  483,  483,  483,
      483,  483,  483,  483,  481,   25,  485,  485,  481,  486,
      481,  481,  481,  481,  481,  481,  481,  487,  481,  488,
      488,  481,  489,  481,  487,  481,  481,  481,  486,  481,
      481,  481,  481,  481,  490,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  491,
      481,  481,  492,  481,  492,  493,  481,  481,  481,  492,
      481,  481,  481,  481,  481,  486,  494,  481,  495,  495,

      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  481,  487,   45,
      481,  496,  497,  488,  497,  489,  489,  481,  481,  481,
      481,  481,  481,  498,  481,  481,  481,  481,  481,  481,
      499,  481,  500,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      492,  493,  494,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  496,  497,  125,  481,  481,  481,

      481,  501,  502,  500,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  491,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  481,  481,  503,  504,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  481,  505,  506,  495,

      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  481,  499,  481,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  481,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  481,  481,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,

      495,  495,  495,  495,  495,  495,  495,  495,  507,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  507,  507,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
      495,  495,  495,  495,  495,  495,  495,  495,  495,  495,
        0,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,

      481,  481,  481,  481,  481,  481,  481
    } ;

static yyconst flex_int16_t yy_nxt[966] =
    {   0,
       30,   31,   32,   31,   30,   33,   30,   34,   35,   36,
       37,   30,   38,   39,   40,   41,   41,   30,   42,   43,
       44,   36,   30,   45,   45,   45,   45,   46,   30,   30,
       45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
       45,   45,   45,   45,   45,   45,   45,   45,   45,   45,
       45,   45,   45,   45,   47,   48,   36,   30,   53,   53,
       57,   54,   54,   57,   66,  335,   58,   67,   76,   58,
       69,   60,   32,   60,   66,   70,  124,  124,  124,   76,
       61,   75,   81,   62,   55,   55,   55,   63,   82,   55,
       60,   32,   60,   66,   77,   65,  334,   64,   66,   61,

       75,   67,   62,   68,   69,   77,   63,  121,   80,   70,
      299,  122,  148,   56,   56,   56,   64,   66,   56,  149,
       67,   66,   68,   69,   67,  121,   71,   69,   70,  122,
       66,   66,   70,   67,   67,   71,   69,   69,   72,  153,
       78,   70,   70,   79,   81,   78,  298,   72,   79,  167,
       82,   92,   32,   92,  154,  127,   92,   32,   92,  168,
       93,   95,  150,   94,  169,   93,   80,  128,   94,  170,
       80,   80,  187,   73,  151,   74,  155,  156,  155,  201,
      201,  188,   73,  152,   74,   83,   84,   32,   84,   83,
       83,   83,   83,   83,   83,   85,   83,   86,   87,   88,

       88,   88,   83,   83,   83,   83,   83,   83,   86,   86,
       86,   86,   83,   83,   89,   86,   86,   86,   86,   86,
       86,   86,   86,   86,   86,   86,   86,   86,   86,   86,
       86,   86,   86,   86,   86,   86,   86,   86,   86,   83,
       83,   83,   83,   97,   97,   97,   97,   97,   97,   97,
       98,   97,   97,   97,   97,   99,   97,   97,   97,   97,
       97,   97,   97,   97,   97,   97,   99,   99,   99,   99,
       97,   97,   97,   99,   99,  100,  101,  102,  103,  104,
      105,   99,  106,   99,  107,  108,  109,  110,  111,   99,
      112,  113,  114,  115,  116,   99,  117,  118,   97,   97,

       97,   96,  124,  124,  124,   96,  145,   96,  231,  261,
      146,  226,  119,  119,  125,  481,  121,  262,   96,  481,
      122,  481,  227,   96,  232,  147,  158,  159,  158,   96,
       96,  121,  481,  178,  174,  122,  182,  481,  175,  189,
      125,  185,  148,  481,  481,  186,  179,  176,  190,  149,
      241,  180,  183,  160,  242,  184,  153,  191,   96,  124,
      124,  124,  205,  206,  205,  207,  208,  207,  209,  210,
      209,  154,  481,  132,  255,  255,  132,  211,  212,  211,
      481,  257,  133,  133,  155,  156,  155,  214,  159,  214,
      132,  220,  256,  134,  236,  221,  132,  204,  277,  135,

      136,  216,  217,  216,  137,  278,  160,  222,  205,  206,
      205,  138,  145,  236,  203,  139,  146,  140,  141,  142,
      143,   96,  207,  208,  207,   96,  237,   96,  209,  210,
      209,  147,  119,  119,  150,  211,  212,  211,   96,  155,
      156,  155,  279,   96,  316,  280,  151,  325,  340,   96,
       96,  214,  159,  214,  343,  152,  214,  159,  214,  216,
      217,  216,  202,  316,  360,  367,  325,  340,  362,  362,
      362,  480,  387,  343,  389,  427,  447,  479,   96,  197,
      197,  197,  478,  360,  367,  477,  459,  476,  197,  475,
      387,  388,  474,  389,  473,  447,  197,  197,  197,  197,

      197,  197,  362,  362,  362,  459,   50,   50,   50,   50,
       50,   50,   50,   50,   50,   50,   50,   50,   50,   52,
       52,   52,   52,   52,   52,   52,   52,   52,   52,   52,
       52,   52,   59,   59,   59,   59,   59,   59,   59,   59,
       59,   59,   59,   59,   59,   91,   91,   91,   91,   91,
       91,   91,   91,   91,   91,   91,   91,   91,   96,  472,
      471,   96,  470,   96,   96,  469,  468,  467,  466,   96,
       96,  120,  465,  464,  120,  463,  120,  120,  462,  120,
      120,  461,  120,  120,  123,  460,  123,  123,  126,  126,
      458,  126,  126,  126,  126,  126,  126,  126,  126,  126,

      131,  131,  131,  131,  131,  131,  131,  131,  131,  131,
      131,  131,  131,  157,  157,  157,  157,  157,  157,  157,
      157,  157,  157,  457,  456,  157,  161,  455,  454,  161,
      161,  161,  453,  452,  451,  450,  161,  449,  161,  162,
      162,  448,  162,  162,  163,  163,  163,  163,  163,  163,
      163,  163,  163,  164,  164,  446,  164,  164,  195,  195,
      445,  195,  195,  195,  195,  195,  195,  195,  195,  195,
      195,  196,  196,  444,  196,  196,  426,  426,  443,  426,
      426,  426,  426,  426,  426,  426,  426,  426,  426,  442,
      441,  427,  440,  439,  438,  437,  436,  435,  434,  433,

      432,  431,  430,  429,  428,  427,  425,  424,  423,  422,
      421,  420,  419,  418,  417,  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,  386,  385,  384,  383,  382,  381,  380,  379,
      378,  377,  376,  375,  374,  373,  372,  371,  370,  369,
      368,  366,  365,  364,  363,  361,  359,  358,  357,  356,
      355,  354,  353,  352,  351,  350,  349,  348,  347,  346,
      345,  344,  342,  341,  339,  338,  337,  336,  333,  332,
      331,  330,  329,  328,  327,  326,  324,  323,  322,  321,

      320,  319,  318,  317,  315,  314,  313,  312,  311,  310,
      309,  308,  307,  306,  305,  304,  303,  302,  301,  300,
      297,  296,  295,  294,  293,  292,  291,  290,  289,  288,
      287,  286,  285,  284,  283,  282,  281,  276,  275,  274,
      273,  272,  271,  270,  269,  268,  267,  266,  265,  264,
      263,  260,  259,  258,  254,  253,  252,  251,  250,  249,
      248,  247,  246,  245,  244,  243,  240,  239,  238,  235,
      234,  233,  230,  229,  228,  225,  224,  223,  219,  218,
      215,  213,  200,  199,  198,  194,  193,  192,  181,  177,
      173,  172,  171,  166,  165,  129,  129,  144,  129,  130,

      129,  481,   90,   51,   51,   49,   29,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481
    } ;

static yyconst flex_int16_t yy_chk[966] =
    {   0,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
        1,    1,    1,    1,    1,    1,    1,    1,    5,    6,
        7,    5,    6,    8,   15,  506,    7,   15,   19,    8,
       15,    9,    9,    9,   17,   15,   41,   41,   41,   20,
        9,   17,   23,    9,    5,    6,    7,    9,   23,    8,
       10,   10,   10,   18,   19,   10,  505,    9,   11,   10,

       18,   11,   10,   11,   11,   20,   10,   39,   23,   11,
      504,   39,   71,    5,    6,    7,   10,   12,    8,   71,
       12,   13,   12,   12,   13,   62,   13,   13,   12,   62,
       14,   16,   13,   14,   16,   14,   14,   16,   13,   75,
       21,   14,   16,   21,   24,   22,  503,   14,   22,  102,
       24,   27,   27,   27,   75,   43,   28,   28,   28,  102,
       27,   28,   72,   27,  103,   28,   21,   43,   28,  103,
       24,   22,  113,   13,   72,   13,   77,   77,   77,  133,
      133,  113,   14,   72,   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,   25,   25,   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,   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,   34,   34,   34,   34,   34,   34,   34,

       34,   38,   40,   40,   40,   38,   70,   38,  175,  221,
       70,  171,   38,   38,   40,   45,   87,  221,   38,   45,
       87,   45,  171,   38,  175,   70,   80,   80,   80,   38,
       38,   94,   45,  109,  107,   94,  111,   45,  107,  114,
       40,  112,  208,   45,   45,  112,  109,  107,  114,  208,
      183,  109,  111,   80,  183,  111,  212,  114,   38,  124,
      124,  124,  147,  147,  147,  149,  149,  149,  152,  152,
      152,  212,   45,   55,  201,  201,   55,  154,  154,  154,
      217,  502,   55,   55,  155,  155,  155,  158,  158,  158,
       55,  167,  501,   55,  179,  167,   55,  500,  236,   55,

       55,  160,  160,  160,   55,  236,  217,  167,  205,  205,
      205,   55,  206,  179,  499,   55,  206,   55,   55,   55,
       55,  119,  207,  207,  207,  119,  179,  119,  209,  209,
      209,  206,  119,  119,  210,  211,  211,  211,  119,  213,
      213,  213,  237,  119,  276,  237,  210,  286,  306,  119,
      119,  214,  214,  214,  309,  210,  215,  215,  215,  216,
      216,  216,  498,  276,  330,  341,  286,  306,  333,  333,
      333,  479,  427,  309,  363,  427,  436,  478,  119,  125,
      125,  125,  477,  330,  341,  476,  454,  475,  125,  473,
      362,  362,  472,  363,  471,  436,  125,  125,  125,  125,

      125,  125,  362,  362,  362,  454,  482,  482,  482,  482,
      482,  482,  482,  482,  482,  482,  482,  482,  482,  483,
      483,  483,  483,  483,  483,  483,  483,  483,  483,  483,
      483,  483,  484,  484,  484,  484,  484,  484,  484,  484,
      484,  484,  484,  484,  484,  485,  485,  485,  485,  485,
      485,  485,  485,  485,  485,  485,  485,  485,  486,  470,
      469,  486,  467,  486,  486,  466,  465,  463,  462,  486,
      486,  487,  461,  460,  487,  459,  487,  487,  457,  487,
      487,  456,  487,  487,  488,  455,  488,  488,  489,  489,
      453,  489,  489,  489,  489,  489,  489,  489,  489,  489,

      490,  490,  490,  490,  490,  490,  490,  490,  490,  490,
      490,  490,  490,  491,  491,  491,  491,  491,  491,  491,
      491,  491,  491,  448,  447,  491,  492,  445,  444,  492,
      492,  492,  442,  441,  440,  439,  492,  438,  492,  493,
      493,  437,  493,  493,  494,  494,  494,  494,  494,  494,
      494,  494,  494,  495,  495,  435,  495,  495,  496,  496,
      434,  496,  496,  496,  496,  496,  496,  496,  496,  496,
      496,  497,  497,  432,  497,  497,  507,  507,  431,  507,
      507,  507,  507,  507,  507,  507,  507,  507,  507,  430,
      428,  426,  425,  424,  423,  422,  421,  420,  417,  416,

      415,  414,  412,  411,  410,  409,  408,  406,  405,  404,
      401,  400,  399,  398,  396,  395,  394,  393,  392,  391,
      390,  389,  388,  385,  384,  382,  380,  379,  378,  377,
      376,  375,  374,  373,  372,  371,  370,  369,  368,  367,
      366,  365,  361,  360,  359,  358,  357,  356,  355,  353,
      352,  351,  350,  349,  348,  347,  346,  345,  344,  343,
      342,  340,  339,  338,  337,  332,  328,  326,  325,  324,
      323,  322,  320,  319,  318,  317,  316,  314,  313,  312,
      311,  310,  308,  307,  304,  303,  302,  300,  297,  295,
      294,  292,  290,  289,  288,  287,  285,  283,  282,  281,

      280,  279,  278,  277,  275,  274,  273,  271,  270,  269,
      268,  267,  266,  265,  264,  263,  262,  261,  260,  258,
      254,  253,  252,  251,  250,  249,  248,  247,  246,  245,
      244,  243,  242,  241,  240,  239,  238,  235,  234,  233,
      232,  231,  230,  229,  228,  227,  226,  225,  224,  223,
      222,  220,  219,  218,  200,  194,  193,  192,  191,  190,
      189,  188,  187,  186,  185,  184,  182,  181,  180,  178,
      177,  176,  174,  173,  172,  170,  169,  168,  166,  165,
      159,  156,  129,  127,  126,  117,  116,  115,  110,  108,
      106,  105,  104,  101,  100,   95,   90,   68,   65,   51,

       49,   29,   26,    4,    3,    2,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481,  481,  481,  481,  481,  481,
      481,  481,  481,  481,  481
    } ;

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,  312,  327,  332,  351,  363,
      379,  394,  411,  412,  423,  434,  435,  447,  473,  518,
      528,  537,  547,  548,  549,  550,  551,  552,  553,  556,
      558,  566,  583,  588,  589,  595,  596,  607,  613,  619,

      625,  641,  642,  643,  659,  678,  718,  719
    } ;

/* 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 <c-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 1052 "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  );

yy_size_t gram_get_leng (void );

char *gram_get_text (void );

int gram_get_lineno (void );

void gram_set_lineno (int line_number  );

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

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

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

/* %not-for-header */

/* %ok-for-header */

/* %endif */

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

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

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

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

/* %endif */
#endif

/* %if-c-only */

/* %endif */

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

/* Copy whatever the last rule matched to the standard output. */
#ifndef ECHO
/* %if-c-only Standard (non-C++) definition */
/* This used to be an fputs(), but since the string might contain NUL's,
 * we now use fwrite().
 */
#define ECHO do { if (fwrite( gram_text, gram_leng, 1, gram_out )) {} } while (0)
/* %endif */
/* %if-c++-only C++ definition */
/* %endif */
#endif

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

#endif

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

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

/* Report a fatal error. */
#ifndef YY_FATAL_ERROR
/* %if-c-only */
#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
/* %endif */
/* %if-c++-only */
/* %endif */
#endif

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

/* %ok-for-header */

/* %not-for-header */

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

/* %ok-for-header */

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

extern int gram_lex (void);

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

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

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

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

/* %not-for-header */

/** The main scanner function which does all the work.
 */
YY_DECL
{
	register yy_state_type yy_current_state;
	register char *yy_cp, *yy_bp;
	register int yy_act;
    
/* %% [7.0] user's declarations go here */
#line 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 1335 "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 >= 482 )
					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 != 481 );
		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"
continue;
	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:
/* rule 48 can match eol */
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, "%s: %s",
                 ngettext ("invalid character", "invalid characters", gram_leng),
                 quote_mem (gram_text, gram_leng));
  }
	YY_BREAK
case YY_STATE_EOF(INITIAL):
#line 299 "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 312 "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 327 "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 332 "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 338 "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 351 "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 363 "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 379 "scan-gram.l"
{
    complain_at (*loc, "%s: %s",
                 ngettext ("invalid character in bracketed name",
                           "invalid characters in bracketed name", gram_leng),
                 quote_mem (gram_text, gram_leng));
  }
	YY_BREAK
case YY_STATE_EOF(SC_BRACKETED_ID):
#line 386 "scan-gram.l"
{
    BEGIN bracketed_id_context_state;
    unexpected_eof (bracketed_id_start, "]");
  }
	YY_BREAK



case 72:
YY_RULE_SETUP
#line 394 "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 411 "scan-gram.l"
BEGIN context_state;
	YY_BREAK
case 74:
/* rule 74 can match eol */
YY_RULE_SETUP
#line 412 "scan-gram.l"
continue;
	YY_BREAK
case YY_STATE_EOF(SC_YACC_COMMENT):
#line 413 "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 423 "scan-gram.l"
STRING_GROW; BEGIN context_state;
	YY_BREAK
case YY_STATE_EOF(SC_COMMENT):
#line 424 "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 434 "scan-gram.l"
STRING_GROW; BEGIN context_state;
	YY_BREAK
case 77:
/* rule 77 can match eol */
YY_RULE_SETUP
#line 435 "scan-gram.l"
STRING_GROW;
	YY_BREAK
case YY_STATE_EOF(SC_LINE_COMMENT):
#line 436 "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 447 "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 456 "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 473 "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 494 "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 518 "scan-gram.l"
complain_at (*loc, _("invalid null character"));
	YY_BREAK

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


case 81:
YY_RULE_SETUP
#line 528 "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 537 "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 547 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\a');
	YY_BREAK
case 84:
YY_RULE_SETUP
#line 548 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\b');
	YY_BREAK
case 85:
YY_RULE_SETUP
#line 549 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\f');
	YY_BREAK
case 86:
YY_RULE_SETUP
#line 550 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\n');
	YY_BREAK
case 87:
YY_RULE_SETUP
#line 551 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\r');
	YY_BREAK
case 88:
YY_RULE_SETUP
#line 552 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\t');
	YY_BREAK
case 89:
YY_RULE_SETUP
#line 553 "scan-gram.l"
obstack_1grow (&obstack_for_string, '\v');
	YY_BREAK
/* \\[\"\'?\\] would be shorter, but it confuses xgettext.  */
case 90:
YY_RULE_SETUP
#line 556 "scan-gram.l"
obstack_1grow (&obstack_for_string, gram_text[1]);
	YY_BREAK
case 91:
YY_RULE_SETUP
#line 558 "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 566 "scan-gram.l"
{
    char const *p = gram_text + 1;
    /* Quote only if escaping won't make the character visible.  */
    if (c_isspace ((unsigned char) *p) && c_isprint ((unsigned char) *p))
      p = quote (p);
    else
      p = quotearg_style_mem (escape_quoting_style, p, 1);
    complain_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 583 "scan-gram.l"
STRING_GROW;
	YY_BREAK



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



case 96:
YY_RULE_SETUP
#line 595 "scan-gram.l"
STRING_GROW; BEGIN context_state;
	YY_BREAK
case 97:
/* rule 97 can match eol */
YY_RULE_SETUP
#line 596 "scan-gram.l"
unexpected_newline (token_start, "\""); BEGIN context_state;
	YY_BREAK
case YY_STATE_EOF(SC_STRING):
#line 597 "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 607 "scan-gram.l"
{
    STRING_GROW;
    context_state = YY_START;
    token_start = loc->start;
    BEGIN SC_CHARACTER;
  }
	YY_BREAK
case 99:
YY_RULE_SETUP
#line 613 "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 619 "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 625 "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 641 "scan-gram.l"
STRING_GROW; braces_level++;
	YY_BREAK
case 103:
/* rule 103 can match eol */
YY_RULE_SETUP
#line 642 "scan-gram.l"
STRING_GROW; braces_level--;
	YY_BREAK
case 104:
YY_RULE_SETUP
#line 643 "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 659 "scan-gram.l"
STRING_GROW;
	YY_BREAK
case YY_STATE_EOF(SC_BRACED_CODE):
#line 661 "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 678 "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 686 "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 704 "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 719 "scan-gram.l"
case 108:
/* rule 108 can match eol */
YY_RULE_SETUP
#line 719 "scan-gram.l"
STRING_GROW;
	YY_BREAK
case 109:
YY_RULE_SETUP
#line 721 "scan-gram.l"
YY_FATAL_ERROR( "flex scanner jammed" );
	YY_BREAK
#line 2436 "scan-gram.c"
case YY_STATE_EOF(SC_RETURN_BRACKETED_ID):
	yyterminate();

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

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

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

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

			(yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;

			yy_current_state = yy_get_previous_state(  );

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

			yy_next_state = yy_try_NUL_trans( yy_current_state );

			yy_bp = (yytext_ptr) + YY_MORE_ADJ;

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

			else
				{
/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
				yy_cp = (yy_last_accepting_cpos);
				yy_current_state = (yy_last_accepting_state);
				goto yy_find_action;
				}
			}

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

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

					yy_act = YY_STATE_EOF(YY_START);
					goto do_action;
					}

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

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

				yy_current_state = yy_get_previous_state(  );

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

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

				yy_current_state = yy_get_previous_state(  );

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

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

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

/* %ok-for-header */

/* %endif */

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

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

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

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

	/* Try to read more data. */

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

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

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

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

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

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

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

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

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

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

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

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

			num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
						number_to_move - 1;

			}

		if ( num_to_read > YY_READ_BUF_SIZE )
			num_to_read = YY_READ_BUF_SIZE;

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

		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
		}

	if ( (yy_n_chars) == 0 )
		{
		if ( number_to_move == YY_MORE_ADJ )
			{
			ret_val = EOB_ACT_END_OF_FILE;
			gram_restart(gram_in  );
			}

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

	else
		ret_val = EOB_ACT_CONTINUE_SCAN;

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

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

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

	return ret_val;
}

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

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

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

	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
		{
/* %% [16.0] code to find the next state goes here */
		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 58);
		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 >= 482 )
				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 = 58;
	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 >= 482 )
			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 == 481);

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

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

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

					/*FALLTHROUGH*/

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

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

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

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

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

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

/** Immediately switch to a different input stream.
 * @param input_file A readable stream.
 * 
 * @note This function does not reset the start condition to @c INITIAL .
 */
/* %if-c-only */
    void gram_restart  (FILE * input_file )
/* %endif */
/* %if-c++-only */
/* %endif */
{
    
	if ( ! YY_CURRENT_BUFFER ){
        gram_ensure_buffer_stack ();
		YY_CURRENT_BUFFER_LVALUE =
            gram__create_buffer(gram_in,YY_BUF_SIZE );
	}

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

/** Switch to a different input buffer.
 * @param new_buffer The new input buffer.
 * 
 */
/* %if-c-only */
    void gram__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
/* %endif */
/* %if-c++-only */
/* %endif */
{
    
	/* TODO. We should be able to replace this entire function body
	 * with
	 *		gram_pop_buffer_state();
	 *		gram_push_buffer_state(new_buffer);
     */
	gram_ensure_buffer_stack ();
	if ( YY_CURRENT_BUFFER == new_buffer )
		return;

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

	YY_CURRENT_BUFFER_LVALUE = new_buffer;
	gram__load_buffer_state( );

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

/* %if-c-only */
static void gram__load_buffer_state  (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
    	(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
	(yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
	gram_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
	(yy_hold_char) = *(yy_c_buf_p);
}

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

	b->yy_buf_size = size;

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

	b->yy_is_our_buffer = 1;

	gram__init_buffer(b,file );

	return b;
}

/** Destroy the buffer.
 * @param b a buffer created with gram__create_buffer()
 * 
 */
/* %if-c-only */
    void gram__delete_buffer (YY_BUFFER_STATE  b )
/* %endif */
/* %if-c++-only */
/* %endif */
{
    
	if ( ! b )
		return;

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

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

	gram_free((void *) b  );
}

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

{
	int oerrno = errno;
    
	gram__flush_buffer(b );

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

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

/* %if-c-only */

        b->yy_is_interactive = 0;
    
/* %endif */
/* %if-c++-only */
/* %endif */
	errno = oerrno;
}

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

	b->yy_n_chars = 0;

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

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

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

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

/* %if-c-or-c++ */
/** Pushes the new state onto the stack. The new state becomes
 *  the current state. This function will allocate the stack
 *  if necessary.
 *  @param new_buffer The new state.
 *  
 */
/* %if-c-only */
void gram_push_buffer_state (YY_BUFFER_STATE new_buffer )
/* %endif */
/* %if-c++-only */
/* %endif */
{
    	if (new_buffer == NULL)
		return;

	gram_ensure_buffer_stack();

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

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

	/* copied from gram__switch_to_buffer. */
	gram__load_buffer_state( );
	(yy_did_buffer_switch_on_eof) = 1;
}
/* %endif */

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

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

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

/* %if-c-or-c++ */
/* Allocates the stack if it does not exist.
 *  Guarantees space for at least one push.
 */
/* %if-c-only */
static void gram_ensure_buffer_stack (void)
/* %endif */
/* %if-c++-only */
/* %endif */
{
	yy_size_t num_to_alloc;
    
	if (!(yy_buffer_stack)) {

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

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

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

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

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

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

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

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

	gram__switch_to_buffer(b  );

	return b;
}
/* %endif */

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

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

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

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

	b = gram__scan_buffer(buf,n );
	if ( ! b )
		YY_FATAL_ERROR( "bad buffer in gram__scan_bytes()" );

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

	return b;
}
/* %endif */

#ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2
#endif

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

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

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

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

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

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

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

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

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

/** Get the current token.
 * 
 */

char *gram_get_text  (void)
{
        return gram_text;
}

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

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

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

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

int gram_get_debug  (void)
{
        return gram__flex_debug;
}

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

/* %endif */

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

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

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

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

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

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

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

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

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

/*
 * Internal utility routines.
 */

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

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

	return n;
}
#endif

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

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

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

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

/* %ok-for-header */

#line 721 "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")?\n'.  ARGS has already skipped '#line '.  |
`---------------------------------------------------------------------*/

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

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


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

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

