Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3552)

Unified Diff: bison/src/bison/2.4.1/bison-2.4.1-src/src/scan-gram.c

Issue 10807020: Add native Windows binary for bison. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: bison/src/bison/2.4.1/bison-2.4.1-src/src/scan-gram.c
===================================================================
--- bison/src/bison/2.4.1/bison-2.4.1-src/src/scan-gram.c (revision 0)
+++ bison/src/bison/2.4.1/bison-2.4.1-src/src/scan-gram.c (revision 0)
@@ -0,0 +1,3513 @@
+#line 2 "scan-gram.c"
+
+#line 4 "scan-gram.c"
+
+#define YY_INT_ALIGNED short int
+
+/* A lexical scanner generated by flex */
+
+/* %not-for-header */
+
+/* %if-c-only */
+/* %if-not-reentrant */
+#define yy_create_buffer gram__create_buffer
+#define yy_delete_buffer gram__delete_buffer
+#define yy_flex_debug gram__flex_debug
+#define yy_init_buffer gram__init_buffer
+#define yy_flush_buffer gram__flush_buffer
+#define yy_load_buffer_state gram__load_buffer_state
+#define yy_switch_to_buffer gram__switch_to_buffer
+#define yyin gram_in
+#define yyleng gram_leng
+#define yylex gram_lex
+#define yylineno gram_lineno
+#define yyout gram_out
+#define yyrestart gram_restart
+#define yytext gram_text
+#define yywrap gram_wrap
+#define yyalloc gram_alloc
+#define yyrealloc gram_realloc
+#define yyfree gram_free
+
+/* %endif */
+/* %endif */
+/* %ok-for-header */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+#define YY_FLEX_SUBMINOR_VERSION 35
+#if YY_FLEX_SUBMINOR_VERSION > 0
+#define FLEX_BETA
+#endif
+
+/* %if-c++-only */
+/* %endif */
+
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c-only */
+
+/* %endif */
+
+/* First, we deal with platform-specific or compiler-specific issues. */
+
+/* begin standard C headers. */
+/* %if-c-only */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+/* %endif */
+
+/* %if-tables-serialization */
+/* %endif */
+/* end standard C headers. */
+
+/* %if-c-or-c++ */
+/* flex integer type definitions */
+
+#ifndef FLEXINT_H
+#define FLEXINT_H
+
+/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
+
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
+#include <inttypes.h>
+typedef int8_t flex_int8_t;
+typedef uint8_t flex_uint8_t;
+typedef int16_t flex_int16_t;
+typedef uint16_t flex_uint16_t;
+typedef int32_t flex_int32_t;
+typedef uint32_t flex_uint32_t;
+#else
+typedef signed char flex_int8_t;
+typedef short int flex_int16_t;
+typedef int flex_int32_t;
+typedef unsigned char flex_uint8_t;
+typedef unsigned short int flex_uint16_t;
+typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
+
+/* Limits of integral types. */
+#ifndef INT8_MIN
+#define INT8_MIN (-128)
+#endif
+#ifndef INT16_MIN
+#define INT16_MIN (-32767-1)
+#endif
+#ifndef INT32_MIN
+#define INT32_MIN (-2147483647-1)
+#endif
+#ifndef INT8_MAX
+#define INT8_MAX (127)
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX (32767)
+#endif
+#ifndef INT32_MAX
+#define INT32_MAX (2147483647)
+#endif
+#ifndef UINT8_MAX
+#define UINT8_MAX (255U)
+#endif
+#ifndef UINT16_MAX
+#define UINT16_MAX (65535U)
+#endif
+#ifndef UINT32_MAX
+#define UINT32_MAX (4294967295U)
+#endif
+
+#endif /* ! FLEXINT_H */
+
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
+#ifdef __cplusplus
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
+
+#define YY_USE_CONST
+
+#endif /* defined (__STDC__) */
+#endif /* ! __cplusplus */
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+/* %not-for-header */
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+/* %ok-for-header */
+
+/* %not-for-header */
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+/* %ok-for-header */
+
+/* %if-reentrant */
+/* %endif */
+
+/* %if-not-reentrant */
+
+/* %endif */
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN (yy_start) = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START (((yy_start) - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE gram_restart(gram_in )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#ifndef YY_BUF_SIZE
+#define YY_BUF_SIZE 16384
+#endif
+
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
+#ifndef YY_TYPEDEF_YY_BUFFER_STATE
+#define YY_TYPEDEF_YY_BUFFER_STATE
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+#endif
+
+/* %if-not-reentrant */
+extern int gram_leng;
+/* %endif */
+
+/* %if-c-only */
+/* %if-not-reentrant */
+extern FILE *gram_in, *gram_out;
+/* %endif */
+/* %endif */
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+ #define YY_LESS_LINENO(n)
+
+/* Return all but the first "n" matched characters back to the input stream. */
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up gram_text. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ *yy_cp = (yy_hold_char); \
+ YY_RESTORE_YY_MORE_OFFSET \
+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up gram_text again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, (yytext_ptr) )
+
+#ifndef YY_TYPEDEF_YY_SIZE_T
+#define YY_TYPEDEF_YY_SIZE_T
+typedef size_t yy_size_t;
+#endif
+
+#ifndef YY_STRUCT_YY_BUFFER_STATE
+#define YY_STRUCT_YY_BUFFER_STATE
+struct yy_buffer_state
+ {
+/* %if-c-only */
+ FILE *yy_input_file;
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ int yy_bs_lineno; /**< The line count. */
+ int yy_bs_column; /**< The column count. */
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via gram_restart()), so that the user can continue scanning by
+ * just pointing gram_in at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+
+ };
+#endif /* !YY_STRUCT_YY_BUFFER_STATE */
+
+/* %if-c-only Standard (non-C++) definition */
+/* %not-for-header */
+
+/* %if-not-reentrant */
+
+/* Stack of input buffers. */
+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */
+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */
+static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
+/* %endif */
+/* %ok-for-header */
+
+/* %endif */
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ *
+ * Returns the top of the stack, or NULL.
+ */
+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \
+ : NULL)
+
+/* Same as previous macro, but useful when we know that the buffer stack is not
+ * NULL or when we need an lvalue. For internal use only.
+ */
+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)]
+
+/* %if-c-only Standard (non-C++) definition */
+
+/* %if-not-reentrant */
+/* %not-for-header */
+
+/* yy_hold_char holds the character lost when gram_text is formed. */
+static char yy_hold_char;
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+int gram_leng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 0; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow gram_wrap()'s to do buffer switches
+ * instead of setting up a fresh gram_in. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+/* %ok-for-header */
+
+/* %endif */
+
+void gram_restart (FILE *input_file );
+void gram__switch_to_buffer (YY_BUFFER_STATE new_buffer );
+YY_BUFFER_STATE gram__create_buffer (FILE *file,int size );
+void gram__delete_buffer (YY_BUFFER_STATE b );
+void gram__flush_buffer (YY_BUFFER_STATE b );
+void gram_push_buffer_state (YY_BUFFER_STATE new_buffer );
+void gram_pop_buffer_state (void );
+
+static void gram_ensure_buffer_stack (void );
+static void gram__load_buffer_state (void );
+static void gram__init_buffer (YY_BUFFER_STATE b,FILE *file );
+
+#define YY_FLUSH_BUFFER gram__flush_buffer(YY_CURRENT_BUFFER )
+
+YY_BUFFER_STATE gram__scan_buffer (char *base,yy_size_t size );
+YY_BUFFER_STATE gram__scan_string (yyconst char *yy_str );
+YY_BUFFER_STATE gram__scan_bytes (yyconst char *bytes,int len );
+
+/* %endif */
+
+void *gram_alloc (yy_size_t );
+void *gram_realloc (void *,yy_size_t );
+void gram_free (void * );
+
+#define yy_new_buffer gram__create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){ \
+ gram_ensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ gram__create_buffer(gram_in,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! YY_CURRENT_BUFFER ){\
+ gram_ensure_buffer_stack (); \
+ YY_CURRENT_BUFFER_LVALUE = \
+ gram__create_buffer(gram_in,YY_BUF_SIZE ); \
+ } \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
+
+/* %% [1.0] gram_text/gram_in/gram_out/yy_state_type/gram_lineno etc. def's & init go here */
+/* Begin user sect3 */
+
+#define gram_wrap(n) 1
+#define YY_SKIP_YYWRAP
+
+#define FLEX_DEBUG
+
+typedef unsigned char YY_CHAR;
+
+FILE *gram_in = (FILE *) 0, *gram_out = (FILE *) 0;
+
+typedef int yy_state_type;
+
+extern int gram_lineno;
+
+int gram_lineno = 1;
+
+extern char *gram_text;
+#define yytext_ptr gram_text
+
+/* %if-c-only Standard (non-C++) definition */
+
+static yy_state_type yy_get_previous_state (void );
+static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
+static int yy_get_next_buffer (void );
+static void yy_fatal_error (yyconst char msg[] );
+
+/* %endif */
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up gram_text.
+ */
+#define YY_DO_BEFORE_ACTION \
+ (yytext_ptr) = yy_bp; \
+/* %% [2.0] code to fiddle gram_text and gram_leng for yymore() goes here \ */\
+ gram_leng = (size_t) (yy_cp - yy_bp); \
+ (yy_hold_char) = *yy_cp; \
+ *yy_cp = '\0'; \
+/* %% [3.0] code to copy yytext_ptr to gram_text[] goes here, if %array \ */\
+ (yy_c_buf_p) = yy_cp;
+
+/* %% [4.0] data tables for the DFA and the user's section 1 definitions go here */
+#define YY_NUM_RULES 102
+#define YY_END_OF_BUFFER 103
+/* 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[453] =
+ { 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 70, 70,
+ 86, 86, 86, 86, 103, 63, 2, 2, 58, 63,
+ 57, 1, 54, 63, 55, 55, 51, 63, 49, 60,
+ 50, 63, 67, 67, 100, 71, 71, 100, 73, 72,
+ 72, 65, 2, 1, 65, 64, 65, 101, 92, 100,
+ 91, 100, 100, 100, 95, 97, 100, 69, 100, 90,
+ 89, 100, 88, 87, 62, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 59, 54, 4, 3, 55, 0,
+
+ 0, 0, 53, 0, 66, 85, 83, 74, 85, 76,
+ 77, 78, 79, 80, 81, 85, 82, 85, 99, 93,
+ 94, 0, 96, 0, 95, 98, 0, 68, 0, 0,
+ 70, 86, 86, 86, 86, 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, 56, 61, 52,
+ 0, 74, 0, 0, 75, 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, 74, 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, 84, 6, 48, 10, 48,
+ 48, 15, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 32, 48, 48, 48, 48, 48,
+ 48, 48, 0, 48, 11, 48, 48, 48, 48, 48,
+ 48, 48, 48, 48, 48, 48, 48, 48, 48, 48,
+ 48, 35, 48, 37, 48, 48, 46, 0, 48, 48,
+ 48, 48, 48, 48, 48, 48, 21, 48, 48, 48,
+ 48, 28, 29, 48, 48, 48, 39, 48, 0, 48,
+ 48, 48, 16, 48, 48, 48, 48, 23, 24, 48,
+ 48, 48, 48, 48, 48, 0, 0, 48, 12, 48,
+
+ 48, 48, 20, 48, 48, 48, 48, 48, 48, 48,
+ 5, 48, 48, 17, 48, 48, 26, 48, 48, 33,
+ 36, 43, 9, 48, 48, 48, 48, 48, 14, 48,
+ 48, 48, 48, 48, 19, 48, 48, 48, 27, 48,
+ 48, 48, 48, 48, 18, 48, 48, 48, 48, 48,
+ 30, 0
+ } ;
+
+static yyconst flex_int32_t yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 2, 2, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 4, 1, 5, 6, 1, 7, 1, 8, 1,
+ 1, 9, 1, 10, 11, 12, 13, 14, 15, 15,
+ 15, 15, 15, 15, 15, 16, 16, 17, 18, 19,
+ 20, 21, 22, 1, 23, 23, 23, 23, 23, 23,
+ 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
+ 12, 12, 12, 12, 24, 12, 12, 25, 12, 12,
+ 26, 27, 26, 1, 28, 1, 29, 30, 31, 32,
+
+ 33, 34, 35, 36, 37, 12, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 12, 50,
+ 51, 12, 52, 53, 54, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 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[56] =
+ { 0,
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 3, 4, 1, 5, 5, 5, 1, 1, 1, 1,
+ 1, 1, 5, 4, 4, 6, 1, 4, 5, 5,
+ 5, 5, 5, 5, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 1, 1, 1, 7
+ } ;
+
+static yyconst flex_int16_t yy_base[473] =
+ { 0,
+ 0, 654, 650, 649, 53, 54, 57, 58, 60, 65,
+ 83, 90, 97, 112, 119, 125, 80, 98, 84, 91,
+ 118, 131, 132, 134, 657, 661, 661, 661, 661, 160,
+ 661, 661, 0, 63, 132, 138, 661, 105, 661, 661,
+ 661, 617, 661, 642, 661, 661, 661, 208, 661, 661,
+ 661, 661, 661, 661, 130, 661, 615, 661, 661, 599,
+ 661, 147, 123, 207, 661, 661, 79, 661, 166, 661,
+ 661, 216, 661, 661, 661, 0, 615, 609, 122, 29,
+ 613, 610, 607, 144, 614, 133, 598, 188, 188, 140,
+ 208, 604, 611, 614, 661, 0, 661, 0, 213, 0,
+
+ 621, 620, 661, 603, 661, 661, 661, 225, 0, 661,
+ 661, 661, 661, 661, 661, 0, 661, 0, 661, 661,
+ 661, 242, 661, 258, 661, 661, 261, 661, 264, 267,
+ 612, 661, 270, 611, 273, 0, 596, 604, 248, 590,
+ 589, 590, 240, 587, 594, 589, 129, 598, 583, 587,
+ 269, 593, 578, 579, 214, 578, 578, 586, 587, 590,
+ 573, 579, 573, 578, 569, 582, 0, 0, 661, 661,
+ 571, 269, 0, 0, 0, 283, 279, 296, 227, 299,
+ 286, 305, 268, 312, 315, 318, 321, 301, 582, 577,
+ 561, 297, 561, 574, 564, 572, 571, 570, 591, 554,
+
+ 565, 552, 587, 568, 561, 562, 192, 298, 549, 550,
+ 546, 560, 549, 556, 540, 551, 547, 540, 544, 550,
+ 549, 539, 550, 548, 545, 661, 0, 0, 532, 0,
+ 541, 527, 533, 528, 541, 526, 539, 558, 536, 524,
+ 529, 517, 0, 521, 516, 529, 301, 528, 523, 513,
+ 525, 517, 508, 522, 0, 507, 320, 516, 505, 518,
+ 503, 0, 508, 0, 507, 505, 0, 542, 0, 0,
+ 494, 0, 505, 510, 494, 0, 321, 494, 497, 322,
+ 510, 509, 508, 507, 498, 0, 491, 499, 491, 485,
+ 483, 0, 482, 517, 494, 483, 480, 0, 477, 0,
+
+ 324, 0, 477, 322, 0, 661, 0, 475, 475, 489,
+ 470, 328, 473, 475, 471, 476, 479, 468, 470, 466,
+ 481, 476, 466, 474, 0, 463, 460, 475, 470, 460,
+ 454, 467, 339, 329, 0, 452, 465, 452, 463, 447,
+ 448, 482, 459, 462, 449, 456, 440, 441, 455, 440,
+ 455, 0, 438, 0, 441, 452, 0, 475, 436, 436,
+ 432, 431, 441, 427, 440, 443, 0, 431, 424, 435,
+ 429, 0, 0, 427, 421, 419, 0, 434, 458, 417,
+ 416, 430, 0, 422, 415, 412, 425, 0, 0, 418,
+ 407, 416, 423, 418, 411, 444, 286, 415, 0, 405,
+
+ 396, 397, 0, 397, 393, 330, 401, 401, 395, 406,
+ 661, 407, 391, 0, 389, 398, 0, 391, 396, 0,
+ 0, 0, 0, 399, 331, 389, 385, 383, 0, 394,
+ 386, 393, 378, 387, 0, 392, 385, 382, 0, 389,
+ 381, 396, 355, 341, 0, 322, 302, 300, 312, 299,
+ 0, 661, 359, 366, 373, 377, 382, 388, 395, 400,
+ 405, 306, 291, 247, 210, 176, 171, 166, 136, 124,
+ 94, 412
+ } ;
+
+static yyconst flex_int16_t yy_def[473] =
+ { 0,
+ 452, 1, 453, 453, 454, 454, 454, 454, 455, 455,
+ 454, 454, 454, 454, 454, 454, 454, 454, 454, 454,
+ 454, 454, 454, 454, 452, 452, 452, 452, 452, 452,
+ 452, 452, 456, 452, 452, 452, 452, 457, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 458, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 459, 452, 452, 452, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 452, 456, 452, 461, 452, 462,
+
+ 457, 457, 452, 452, 452, 452, 452, 452, 463, 452,
+ 452, 452, 452, 452, 452, 464, 452, 465, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 461, 462, 452, 452,
+ 452, 452, 466, 467, 465, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 459, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 452, 452, 468, 469, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 452, 470, 471,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+
+ 460, 460, 460, 452, 464, 452, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 452, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 452, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 472, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 472, 472, 460, 460, 460,
+
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 452, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 460, 460, 460, 460, 460, 460, 460, 460, 460,
+ 460, 0, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452
+ } ;
+
+static yyconst flex_int16_t yy_nxt[717] =
+ { 0,
+ 26, 27, 28, 27, 29, 26, 30, 31, 26, 32,
+ 26, 33, 34, 35, 36, 36, 26, 37, 38, 39,
+ 26, 26, 33, 33, 33, 26, 26, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 33, 33, 33, 33, 33, 33, 33, 33, 33,
+ 33, 40, 41, 26, 26, 46, 46, 47, 47, 50,
+ 50, 53, 28, 53, 51, 51, 53, 28, 53, 54,
+ 57, 97, 55, 141, 54, 98, 56, 55, 142, 48,
+ 48, 56, 58, 48, 48, 58, 68, 59, 67, 60,
+ 61, 128, 58, 68, 59, 62, 60, 61, 306, 58,
+
+ 58, 59, 62, 63, 61, 129, 67, 49, 49, 62,
+ 69, 49, 49, 102, 58, 64, 59, 69, 63, 61,
+ 70, 58, 71, 59, 62, 103, 61, 58, 305, 59,
+ 64, 62, 61, 70, 73, 71, 73, 62, 97, 74,
+ 270, 74, 98, 123, 72, 99, 99, 99, 65, 124,
+ 66, 99, 99, 99, 139, 120, 100, 72, 72, 121,
+ 72, 150, 202, 65, 140, 66, 75, 130, 131, 130,
+ 269, 76, 146, 122, 151, 228, 147, 159, 203, 152,
+ 227, 100, 76, 76, 76, 148, 160, 76, 76, 77,
+ 78, 79, 80, 81, 82, 76, 83, 76, 84, 85,
+
+ 86, 87, 88, 76, 89, 90, 91, 92, 93, 76,
+ 94, 95, 107, 125, 175, 107, 154, 133, 134, 133,
+ 157, 108, 108, 248, 158, 126, 99, 99, 99, 107,
+ 249, 109, 155, 127, 107, 156, 110, 111, 172, 172,
+ 161, 112, 135, 176, 177, 176, 212, 123, 113, 162,
+ 213, 174, 114, 124, 115, 116, 117, 118, 163, 178,
+ 179, 178, 180, 181, 180, 182, 183, 182, 130, 131,
+ 130, 185, 134, 185, 187, 188, 187, 191, 197, 207,
+ 128, 192, 226, 226, 176, 177, 176, 120, 411, 198,
+ 397, 121, 125, 193, 129, 173, 207, 178, 179, 178,
+
+ 180, 181, 180, 452, 126, 122, 182, 183, 182, 208,
+ 168, 287, 127, 130, 131, 130, 185, 134, 185, 185,
+ 134, 185, 187, 188, 187, 232, 250, 135, 287, 251,
+ 296, 311, 314, 233, 331, 333, 333, 333, 338, 359,
+ 418, 430, 358, 451, 450, 449, 448, 296, 311, 314,
+ 447, 331, 333, 333, 333, 338, 359, 418, 430, 43,
+ 43, 43, 43, 43, 43, 43, 45, 45, 45, 45,
+ 45, 45, 45, 52, 52, 52, 52, 52, 52, 52,
+ 96, 96, 101, 446, 101, 101, 101, 101, 106, 106,
+ 106, 106, 106, 106, 106, 132, 132, 132, 132, 132,
+
+ 445, 132, 136, 136, 136, 167, 444, 167, 167, 167,
+ 167, 167, 396, 443, 396, 396, 396, 396, 396, 442,
+ 441, 440, 439, 438, 437, 436, 435, 434, 433, 432,
+ 431, 429, 428, 427, 426, 425, 424, 423, 422, 421,
+ 420, 419, 417, 416, 415, 414, 413, 412, 397, 410,
+ 409, 408, 407, 406, 405, 404, 403, 402, 401, 400,
+ 399, 398, 397, 395, 394, 393, 392, 391, 390, 389,
+ 388, 387, 386, 385, 384, 383, 382, 381, 380, 379,
+ 378, 377, 376, 375, 374, 373, 372, 371, 370, 369,
+ 368, 367, 366, 365, 364, 363, 362, 361, 360, 357,
+
+ 356, 355, 354, 353, 352, 351, 350, 349, 348, 347,
+ 346, 345, 344, 343, 342, 341, 340, 339, 337, 336,
+ 335, 334, 332, 330, 329, 328, 327, 326, 325, 324,
+ 323, 322, 321, 320, 319, 318, 317, 316, 315, 313,
+ 312, 310, 309, 308, 307, 304, 303, 302, 301, 300,
+ 299, 298, 297, 295, 294, 293, 292, 291, 290, 289,
+ 288, 286, 285, 284, 283, 282, 281, 280, 279, 278,
+ 277, 276, 275, 274, 273, 272, 271, 268, 267, 266,
+ 265, 264, 263, 262, 261, 260, 259, 258, 257, 256,
+ 255, 254, 253, 252, 247, 246, 245, 244, 243, 242,
+
+ 241, 240, 239, 238, 237, 236, 235, 234, 231, 230,
+ 229, 225, 224, 223, 222, 221, 220, 219, 218, 217,
+ 216, 215, 214, 211, 210, 209, 206, 205, 204, 201,
+ 200, 199, 196, 195, 194, 190, 189, 186, 184, 171,
+ 170, 169, 166, 165, 164, 153, 149, 145, 144, 143,
+ 138, 137, 119, 104, 105, 104, 452, 44, 44, 42,
+ 25, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452
+ } ;
+
+static yyconst flex_int16_t yy_chk[717] =
+ { 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, 5, 6, 5, 6, 7,
+ 8, 9, 9, 9, 7, 8, 10, 10, 10, 9,
+ 10, 34, 9, 80, 10, 34, 9, 10, 80, 5,
+ 6, 10, 17, 7, 8, 11, 19, 11, 17, 11,
+ 11, 67, 12, 20, 12, 11, 12, 12, 471, 13,
+
+ 18, 13, 12, 13, 13, 67, 18, 5, 6, 13,
+ 19, 7, 8, 38, 14, 13, 14, 20, 14, 14,
+ 21, 15, 21, 15, 14, 38, 15, 16, 470, 16,
+ 14, 15, 16, 22, 23, 22, 24, 16, 55, 23,
+ 469, 24, 55, 63, 21, 35, 35, 35, 13, 63,
+ 13, 36, 36, 36, 79, 62, 35, 22, 23, 62,
+ 24, 86, 147, 14, 79, 14, 30, 69, 69, 69,
+ 468, 30, 84, 62, 86, 467, 84, 90, 147, 86,
+ 466, 35, 30, 30, 30, 84, 90, 30, 30, 30,
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+
+ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,
+ 30, 30, 48, 64, 465, 48, 88, 72, 72, 72,
+ 89, 48, 48, 207, 89, 64, 99, 99, 99, 48,
+ 207, 48, 88, 64, 48, 88, 48, 48, 108, 108,
+ 91, 48, 72, 122, 122, 122, 155, 179, 48, 91,
+ 155, 464, 48, 179, 48, 48, 48, 48, 91, 124,
+ 124, 124, 127, 127, 127, 129, 129, 129, 130, 130,
+ 130, 133, 133, 133, 135, 135, 135, 139, 143, 151,
+ 183, 139, 172, 172, 176, 176, 176, 177, 397, 143,
+ 397, 177, 181, 139, 183, 463, 151, 178, 178, 178,
+
+ 180, 180, 180, 188, 181, 177, 182, 182, 182, 151,
+ 462, 247, 181, 184, 184, 184, 185, 185, 185, 186,
+ 186, 186, 187, 187, 187, 192, 208, 188, 247, 208,
+ 257, 277, 280, 192, 301, 304, 304, 304, 312, 334,
+ 406, 425, 333, 450, 449, 448, 447, 257, 277, 280,
+ 446, 301, 333, 333, 333, 312, 334, 406, 425, 453,
+ 453, 453, 453, 453, 453, 453, 454, 454, 454, 454,
+ 454, 454, 454, 455, 455, 455, 455, 455, 455, 455,
+ 456, 456, 457, 444, 457, 457, 457, 457, 458, 458,
+ 458, 458, 458, 458, 458, 459, 459, 459, 459, 459,
+
+ 443, 459, 460, 460, 460, 461, 442, 461, 461, 461,
+ 461, 461, 472, 441, 472, 472, 472, 472, 472, 440,
+ 438, 437, 436, 434, 433, 432, 431, 430, 428, 427,
+ 426, 424, 419, 418, 416, 415, 413, 412, 410, 409,
+ 408, 407, 405, 404, 402, 401, 400, 398, 396, 395,
+ 394, 393, 392, 391, 390, 387, 386, 385, 384, 382,
+ 381, 380, 379, 378, 376, 375, 374, 371, 370, 369,
+ 368, 366, 365, 364, 363, 362, 361, 360, 359, 358,
+ 356, 355, 353, 351, 350, 349, 348, 347, 346, 345,
+ 344, 343, 342, 341, 340, 339, 338, 337, 336, 332,
+
+ 331, 330, 329, 328, 327, 326, 324, 323, 322, 321,
+ 320, 319, 318, 317, 316, 315, 314, 313, 311, 310,
+ 309, 308, 303, 299, 297, 296, 295, 294, 293, 291,
+ 290, 289, 288, 287, 285, 284, 283, 282, 281, 279,
+ 278, 275, 274, 273, 271, 268, 266, 265, 263, 261,
+ 260, 259, 258, 256, 254, 253, 252, 251, 250, 249,
+ 248, 246, 245, 244, 242, 241, 240, 239, 238, 237,
+ 236, 235, 234, 233, 232, 231, 229, 225, 224, 223,
+ 222, 221, 220, 219, 218, 217, 216, 215, 214, 213,
+ 212, 211, 210, 209, 206, 205, 204, 203, 202, 201,
+
+ 200, 199, 198, 197, 196, 195, 194, 193, 191, 190,
+ 189, 171, 166, 165, 164, 163, 162, 161, 160, 159,
+ 158, 157, 156, 154, 153, 152, 150, 149, 148, 146,
+ 145, 144, 142, 141, 140, 138, 137, 134, 131, 104,
+ 102, 101, 94, 93, 92, 87, 85, 83, 82, 81,
+ 78, 77, 60, 57, 44, 42, 25, 4, 3, 2,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452
+ } ;
+
+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[102] =
+ { 0,
+ 135, 136, 137, 138, 146, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
+ 172, 173, 174, 175, 176, 177, 178, 179, 180, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+ 192, 193, 194, 195, 196, 197, 198, 200, 204, 205,
+ 206, 207, 208, 210, 216, 220, 226, 229, 232, 235,
+ 243, 251, 258, 275, 280, 301, 302, 313, 324, 325,
+ 337, 363, 390, 400, 410, 421, 422, 423, 424, 425,
+ 426, 427, 430, 432, 441, 453, 458, 459, 465, 466,
+ 477, 483, 489, 495, 511, 512, 513, 529, 548, 588,
+
+ 589
+ } ;
+
+/* 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, 2003, 2004, 2005, 2006, 2007 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/>. */
+#line 25 "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 <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))
+
+/* A string representing the most recently saved token. */
+static char *last_string;
+
+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. */
+
+/* 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 971 "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
+
+#ifndef YY_NO_UNISTD_H
+/* Special case for "unistd.h", since it is non-ANSI. We include it way
+ * down here because we want the user's section 1 to have been scanned first.
+ * The user has a chance to override it with an option.
+ */
+/* %if-c-only */
+#include <unistd.h>
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+#endif
+
+#ifndef YY_EXTRA_TYPE
+#define YY_EXTRA_TYPE void *
+#endif
+
+/* %if-c-only Reentrant structure and macros (non-C++). */
+/* %if-reentrant */
+/* %if-c-only */
+
+static int yy_init_globals (void );
+
+/* %endif */
+/* %if-reentrant */
+/* %endif */
+/* %endif End reentrant structures and macros. */
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int gram_lex_destroy (void );
+
+int gram_get_debug (void );
+
+void gram_set_debug (int debug_flag );
+
+YY_EXTRA_TYPE gram_get_extra (void );
+
+void gram_set_extra (YY_EXTRA_TYPE user_defined );
+
+FILE *gram_get_in (void );
+
+void gram_set_in (FILE * in_str );
+
+FILE *gram_get_out (void );
+
+void gram_set_out (FILE * out_str );
+
+int gram_get_leng (void );
+
+char *gram_get_text (void );
+
+int gram_get_lineno (void );
+
+void gram_set_lineno (int line_number );
+
+/* %if-bison-bridge */
+/* %endif */
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int gram_wrap (void );
+#else
+extern int gram_wrap (void );
+#endif
+#endif
+
+/* %not-for-header */
+
+/* %ok-for-header */
+
+/* %endif */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char *,yyconst char *,int );
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * );
+#endif
+
+#ifndef YY_NO_INPUT
+/* %if-c-only Standard (non-C++) definition */
+/* %not-for-header */
+
+#ifdef __cplusplus
+static int yyinput (void );
+#else
+static int input (void );
+#endif
+/* %ok-for-header */
+
+/* %endif */
+#endif
+
+/* %if-c-only */
+
+/* %endif */
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+#ifndef ECHO
+/* %if-c-only Standard (non-C++) definition */
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO fwrite( gram_text, gram_leng, 1, gram_out )
+/* %endif */
+/* %if-c++-only C++ definition */
+/* %endif */
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+/* %% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \ */\
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+ { \
+ int c = '*'; \
+ int n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( gram_in )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( gram_in ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else \
+ { \
+ errno=0; \
+ while ( (result = fread(buf, 1, max_size, gram_in))==0 && ferror(gram_in)) \
+ { \
+ if( errno != EINTR) \
+ { \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ break; \
+ } \
+ errno=0; \
+ clearerr(gram_in); \
+ } \
+ }\
+\
+/* %if-c++-only C++ definition \ */\
+/* %endif */
+
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+/* %if-c-only */
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+#endif
+
+/* %if-tables-serialization structures and prototypes */
+/* %not-for-header */
+
+/* %ok-for-header */
+
+/* %not-for-header */
+
+/* %tables-yydmap generated elements */
+/* %endif */
+/* end tables serialization structures and prototypes */
+
+/* %ok-for-header */
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL_IS_OURS 1
+/* %if-c-only Standard (non-C++) definition */
+
+extern int gram_lex (void);
+
+#define YY_DECL int gram_lex (void)
+/* %endif */
+/* %if-c++-only C++ definition */
+/* %endif */
+#endif /* !YY_DECL */
+
+/* Code executed at the beginning of each rule, after gram_text and gram_leng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+/* %% [6.0] YY_RULE_SETUP definition goes here */
+#define YY_RULE_SETUP \
+ if ( gram_leng > 0 ) \
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \
+ (gram_text[gram_leng - 1] == '\n'); \
+ YY_USER_ACTION
+
+/* %not-for-header */
+
+/** The main scanner function which does all the work.
+ */
+YY_DECL
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+
+/* %% [7.0] user's declarations go here */
+#line 106 "scan-gram.l"
+
+
+ /* Nesting level of the current code in braces. */
+ int braces_level IF_LINT (= 0);
+
+ /* Parent context state, when applicable. */
+ int context_state IF_LINT (= 0);
+
+ /* Location of most recent identifier, when applicable. */
+ location id_loc IF_LINT (= 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 IF_LINT (= scanner_cursor);
+
+
+
+ /*-----------------------.
+ | Scanning white space. |
+ `-----------------------*/
+
+#line 1252 "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 >= 453 )
+ 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 != 452 );
+ 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 < 102 )
+ fprintf( stderr, "--accepting rule at line %ld (\"%s\")\n",
+ (long)yy_rule_linenum[yy_act], gram_text );
+ else if ( yy_act == 102 )
+ fprintf( stderr, "--accepting default rule (\"%s\")\n",
+ gram_text );
+ else if ( yy_act == 103 )
+ 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 135 "scan-gram.l"
+warn_at (*loc, _("stray `,' treated as white space"));
+ YY_BREAK
+case 2:
+/* rule 2 can match eol */
+#line 137 "scan-gram.l"
+case 3:
+/* rule 3 can match eol */
+YY_RULE_SETUP
+#line 137 "scan-gram.l"
+;
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 138 "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 146 "scan-gram.l"
+{
+ handle_syncline (gram_text + sizeof "#line " - 1, *loc);
+ }
+ YY_BREAK
+
+/*----------------------------.
+ | Scanning Bison directives. |
+ `----------------------------*/
+
+
+case 6:
+YY_RULE_SETUP
+#line 157 "scan-gram.l"
+return PERCENT_NONASSOC;
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 158 "scan-gram.l"
+return PERCENT_CODE;
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 159 "scan-gram.l"
+return PERCENT_DEBUG;
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 160 "scan-gram.l"
+return PERCENT_DEFAULT_PREC;
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 161 "scan-gram.l"
+return PERCENT_DEFINE;
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 162 "scan-gram.l"
+return PERCENT_DEFINES;
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 163 "scan-gram.l"
+return PERCENT_DESTRUCTOR;
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 164 "scan-gram.l"
+return PERCENT_DPREC;
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 165 "scan-gram.l"
+return PERCENT_ERROR_VERBOSE;
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 166 "scan-gram.l"
+return PERCENT_EXPECT;
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 167 "scan-gram.l"
+return PERCENT_EXPECT_RR;
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 168 "scan-gram.l"
+return PERCENT_FILE_PREFIX;
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 169 "scan-gram.l"
+return PERCENT_YACC;
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 170 "scan-gram.l"
+return PERCENT_INITIAL_ACTION;
+ YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 171 "scan-gram.l"
+return PERCENT_GLR_PARSER;
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 172 "scan-gram.l"
+return PERCENT_LANGUAGE;
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 173 "scan-gram.l"
+return PERCENT_LEFT;
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 174 "scan-gram.l"
+return PERCENT_LEX_PARAM;
+ YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 175 "scan-gram.l"
+return PERCENT_LOCATIONS;
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 176 "scan-gram.l"
+return PERCENT_MERGE;
+ YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 177 "scan-gram.l"
+return PERCENT_NAME_PREFIX;
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 178 "scan-gram.l"
+return PERCENT_NO_DEFAULT_PREC;
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 179 "scan-gram.l"
+return PERCENT_NO_LINES;
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 180 "scan-gram.l"
+return PERCENT_NONASSOC;
+ YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 181 "scan-gram.l"
+return PERCENT_NONDETERMINISTIC_PARSER;
+ YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 182 "scan-gram.l"
+return PERCENT_NTERM;
+ YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 183 "scan-gram.l"
+return PERCENT_OUTPUT;
+ YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 184 "scan-gram.l"
+return PERCENT_PARSE_PARAM;
+ YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 185 "scan-gram.l"
+return PERCENT_PREC;
+ YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 186 "scan-gram.l"
+return PERCENT_PRINTER;
+ YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 187 "scan-gram.l"
+return PERCENT_PURE_PARSER;
+ YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 188 "scan-gram.l"
+return PERCENT_REQUIRE;
+ YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 189 "scan-gram.l"
+return PERCENT_RIGHT;
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 190 "scan-gram.l"
+return PERCENT_SKELETON;
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 191 "scan-gram.l"
+return PERCENT_START;
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 192 "scan-gram.l"
+return PERCENT_TOKEN;
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 193 "scan-gram.l"
+return PERCENT_TOKEN;
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 194 "scan-gram.l"
+return PERCENT_TOKEN_TABLE;
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 195 "scan-gram.l"
+return PERCENT_TYPE;
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 196 "scan-gram.l"
+return PERCENT_UNION;
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 197 "scan-gram.l"
+return PERCENT_VERBOSE;
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 198 "scan-gram.l"
+return PERCENT_YACC;
+ YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 200 "scan-gram.l"
+{
+ complain_at (*loc, _("invalid directive: %s"), quote (gram_text));
+ }
+ YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 204 "scan-gram.l"
+return EQUAL;
+ YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 205 "scan-gram.l"
+return PIPE;
+ YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 206 "scan-gram.l"
+return SEMICOLON;
+ YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 207 "scan-gram.l"
+return TYPE_TAG_ANY;
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 208 "scan-gram.l"
+return TYPE_TAG_NONE;
+ YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 210 "scan-gram.l"
+{
+ val->uniqstr = uniqstr_new (gram_text);
+ id_loc = *loc;
+ BEGIN SC_AFTER_IDENTIFIER;
+ }
+ YY_BREAK
+case 55:
+YY_RULE_SETUP
+#line 216 "scan-gram.l"
+{
+ val->integer = scan_integer (gram_text, 10, *loc);
+ return INT;
+ }
+ YY_BREAK
+case 56:
+YY_RULE_SETUP
+#line 220 "scan-gram.l"
+{
+ val->integer = scan_integer (gram_text, 16, *loc);
+ return INT;
+ }
+ YY_BREAK
+/* Characters. We don't check there is only one. */
+case 57:
+YY_RULE_SETUP
+#line 226 "scan-gram.l"
+STRING_GROW; token_start = loc->start; BEGIN SC_ESCAPED_CHARACTER;
+ YY_BREAK
+/* Strings. */
+case 58:
+YY_RULE_SETUP
+#line 229 "scan-gram.l"
+token_start = loc->start; BEGIN SC_ESCAPED_STRING;
+ YY_BREAK
+/* Prologue. */
+case 59:
+YY_RULE_SETUP
+#line 232 "scan-gram.l"
+code_start = loc->start; BEGIN SC_PROLOGUE;
+ YY_BREAK
+/* Code in between braces. */
+case 60:
+YY_RULE_SETUP
+#line 235 "scan-gram.l"
+{
+ STRING_GROW;
+ braces_level = 0;
+ code_start = loc->start;
+ BEGIN SC_BRACED_CODE;
+ }
+ YY_BREAK
+/* A type. */
+case 61:
+YY_RULE_SETUP
+#line 243 "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 62:
+YY_RULE_SETUP
+#line 251 "scan-gram.l"
+{
+ static int percent_percent_count;
+ if (++percent_percent_count == 2)
+ BEGIN SC_EPILOGUE;
+ return PERCENT_PERCENT;
+ }
+ YY_BREAK
+case 63:
+YY_RULE_SETUP
+#line 258 "scan-gram.l"
+{
+ complain_at (*loc, _("invalid character: %s"), quote (gram_text));
+ }
+ YY_BREAK
+case YY_STATE_EOF(INITIAL):
+#line 262 "scan-gram.l"
+{
+ loc->start = loc->end = scanner_cursor;
+ yyterminate ();
+ }
+ YY_BREAK
+
+/*-----------------------------------------------------------------.
+ | Scanning after an identifier, checking whether a colon is next. |
+ `-----------------------------------------------------------------*/
+
+
+case 64:
+YY_RULE_SETUP
+#line 275 "scan-gram.l"
+{
+ *loc = id_loc;
+ BEGIN INITIAL;
+ return ID_COLON;
+ }
+ YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 280 "scan-gram.l"
+{
+ scanner_cursor.column -= mbsnwidth (gram_text, gram_leng, 0);
+ yyless (0);
+ *loc = id_loc;
+ BEGIN INITIAL;
+ return ID;
+ }
+ YY_BREAK
+case YY_STATE_EOF(SC_AFTER_IDENTIFIER):
+#line 287 "scan-gram.l"
+{
+ *loc = id_loc;
+ BEGIN INITIAL;
+ return ID;
+ }
+ YY_BREAK
+
+/*---------------------------------------------------------------.
+ | Scanning a Yacc comment. The initial `/ *' is already eaten. |
+ `---------------------------------------------------------------*/
+
+
+case 66:
+YY_RULE_SETUP
+#line 301 "scan-gram.l"
+BEGIN context_state;
+ YY_BREAK
+case 67:
+/* rule 67 can match eol */
+YY_RULE_SETUP
+#line 302 "scan-gram.l"
+;
+ YY_BREAK
+case YY_STATE_EOF(SC_YACC_COMMENT):
+#line 303 "scan-gram.l"
+unexpected_eof (token_start, "*/"); BEGIN context_state;
+ YY_BREAK
+
+/*------------------------------------------------------------.
+ | Scanning a C comment. The initial `/ *' is already eaten. |
+ `------------------------------------------------------------*/
+
+
+case 68:
+/* rule 68 can match eol */
+YY_RULE_SETUP
+#line 313 "scan-gram.l"
+STRING_GROW; BEGIN context_state;
+ YY_BREAK
+case YY_STATE_EOF(SC_COMMENT):
+#line 314 "scan-gram.l"
+unexpected_eof (token_start, "*/"); BEGIN context_state;
+ YY_BREAK
+
+/*--------------------------------------------------------------.
+ | Scanning a line comment. The initial `//' is already eaten. |
+ `--------------------------------------------------------------*/
+
+
+case 69:
+/* rule 69 can match eol */
+YY_RULE_SETUP
+#line 324 "scan-gram.l"
+STRING_GROW; BEGIN context_state;
+ YY_BREAK
+case 70:
+/* rule 70 can match eol */
+YY_RULE_SETUP
+#line 325 "scan-gram.l"
+STRING_GROW;
+ YY_BREAK
+case YY_STATE_EOF(SC_LINE_COMMENT):
+#line 326 "scan-gram.l"
+BEGIN context_state;
+ YY_BREAK
+
+/*------------------------------------------------.
+ | Scanning a Bison string, including its escapes. |
+ | The initial quote is already eaten. |
+ `------------------------------------------------*/
+
+
+case 71:
+/* rule 71 can match eol */
+YY_RULE_SETUP
+#line 337 "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 346 "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 72:
+/* rule 72 can match eol */
+YY_RULE_SETUP
+#line 363 "scan-gram.l"
+{
+ if (gram_text[0] == '\n')
+ unexpected_newline (token_start, "'");
+ STRING_GROW;
+ STRING_FINISH;
+ loc->start = token_start;
+ val->character = last_string[1];
+ STRING_FREE;
+ BEGIN INITIAL;
+ return CHAR;
+ }
+ YY_BREAK
+case YY_STATE_EOF(SC_ESCAPED_CHARACTER):
+#line 374 "scan-gram.l"
+{
+ unexpected_eof (token_start, "'");
+ STRING_FINISH;
+ loc->start = token_start;
+ if (strlen(last_string) > 1)
+ val->character = last_string[1];
+ else
+ val->character = last_string[0];
+ STRING_FREE;
+ BEGIN INITIAL;
+ return CHAR;
+ }
+ YY_BREAK
+
+
+
+case 73:
+YY_RULE_SETUP
+#line 390 "scan-gram.l"
+complain_at (*loc, _("invalid null character"));
+ YY_BREAK
+
+/*----------------------------.
+ | Decode escaped characters. |
+ `----------------------------*/
+
+
+case 74:
+YY_RULE_SETUP
+#line 400 "scan-gram.l"
+{
+ unsigned long int c = strtoul (gram_text + 1, NULL, 8);
+ if (UCHAR_MAX < c)
+ complain_at (*loc, _("invalid escape sequence: %s"), quote (gram_text));
+ else if (! c)
+ complain_at (*loc, _("invalid null character: %s"), quote (gram_text));
+ else
+ obstack_1grow (&obstack_for_string, c);
+ }
+ YY_BREAK
+case 75:
+YY_RULE_SETUP
+#line 410 "scan-gram.l"
+{
+ verify (UCHAR_MAX < ULONG_MAX);
+ unsigned long int c = strtoul (gram_text + 2, NULL, 16);
+ if (UCHAR_MAX < c)
+ complain_at (*loc, _("invalid escape sequence: %s"), quote (gram_text));
+ else if (! c)
+ complain_at (*loc, _("invalid null character: %s"), quote (gram_text));
+ else
+ obstack_1grow (&obstack_for_string, c);
+ }
+ YY_BREAK
+case 76:
+YY_RULE_SETUP
+#line 421 "scan-gram.l"
+obstack_1grow (&obstack_for_string, '\a');
+ YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 422 "scan-gram.l"
+obstack_1grow (&obstack_for_string, '\b');
+ YY_BREAK
+case 78:
+YY_RULE_SETUP
+#line 423 "scan-gram.l"
+obstack_1grow (&obstack_for_string, '\f');
+ YY_BREAK
+case 79:
+YY_RULE_SETUP
+#line 424 "scan-gram.l"
+obstack_1grow (&obstack_for_string, '\n');
+ YY_BREAK
+case 80:
+YY_RULE_SETUP
+#line 425 "scan-gram.l"
+obstack_1grow (&obstack_for_string, '\r');
+ YY_BREAK
+case 81:
+YY_RULE_SETUP
+#line 426 "scan-gram.l"
+obstack_1grow (&obstack_for_string, '\t');
+ YY_BREAK
+case 82:
+YY_RULE_SETUP
+#line 427 "scan-gram.l"
+obstack_1grow (&obstack_for_string, '\v');
+ YY_BREAK
+/* \\[\"\'?\\] would be shorter, but it confuses xgettext. */
+case 83:
+YY_RULE_SETUP
+#line 430 "scan-gram.l"
+obstack_1grow (&obstack_for_string, gram_text[1]);
+ YY_BREAK
+case 84:
+YY_RULE_SETUP
+#line 432 "scan-gram.l"
+{
+ int c = convert_ucn_to_byte (gram_text);
+ if (c < 0)
+ complain_at (*loc, _("invalid escape sequence: %s"), quote (gram_text));
+ else if (! c)
+ complain_at (*loc, _("invalid null character: %s"), quote (gram_text));
+ else
+ obstack_1grow (&obstack_for_string, c);
+ }
+ YY_BREAK
+case 85:
+/* rule 85 can match eol */
+YY_RULE_SETUP
+#line 441 "scan-gram.l"
+{
+ complain_at (*loc, _("unrecognized escape sequence: %s"), quote (gram_text));
+ STRING_GROW;
+ }
+ YY_BREAK
+
+/*--------------------------------------------.
+ | Scanning user-code characters and strings. |
+ `--------------------------------------------*/
+
+
+case 86:
+/* rule 86 can match eol */
+YY_RULE_SETUP
+#line 453 "scan-gram.l"
+STRING_GROW;
+ YY_BREAK
+
+
+
+case 87:
+YY_RULE_SETUP
+#line 458 "scan-gram.l"
+STRING_GROW; BEGIN context_state;
+ YY_BREAK
+case 88:
+/* rule 88 can match eol */
+YY_RULE_SETUP
+#line 459 "scan-gram.l"
+unexpected_newline (token_start, "'"); BEGIN context_state;
+ YY_BREAK
+case YY_STATE_EOF(SC_CHARACTER):
+#line 460 "scan-gram.l"
+unexpected_eof (token_start, "'"); BEGIN context_state;
+ YY_BREAK
+
+
+
+case 89:
+YY_RULE_SETUP
+#line 465 "scan-gram.l"
+STRING_GROW; BEGIN context_state;
+ YY_BREAK
+case 90:
+/* rule 90 can match eol */
+YY_RULE_SETUP
+#line 466 "scan-gram.l"
+unexpected_newline (token_start, "\""); BEGIN context_state;
+ YY_BREAK
+case YY_STATE_EOF(SC_STRING):
+#line 467 "scan-gram.l"
+unexpected_eof (token_start, "\""); BEGIN context_state;
+ YY_BREAK
+
+/*---------------------------------------------------.
+ | Strings, comments etc. can be found in user code. |
+ `---------------------------------------------------*/
+
+
+case 91:
+YY_RULE_SETUP
+#line 477 "scan-gram.l"
+{
+ STRING_GROW;
+ context_state = YY_START;
+ token_start = loc->start;
+ BEGIN SC_CHARACTER;
+ }
+ YY_BREAK
+case 92:
+YY_RULE_SETUP
+#line 483 "scan-gram.l"
+{
+ STRING_GROW;
+ context_state = YY_START;
+ token_start = loc->start;
+ BEGIN SC_STRING;
+ }
+ YY_BREAK
+case 93:
+/* rule 93 can match eol */
+YY_RULE_SETUP
+#line 489 "scan-gram.l"
+{
+ STRING_GROW;
+ context_state = YY_START;
+ token_start = loc->start;
+ BEGIN SC_COMMENT;
+ }
+ YY_BREAK
+case 94:
+/* rule 94 can match eol */
+YY_RULE_SETUP
+#line 495 "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 95:
+/* rule 95 can match eol */
+YY_RULE_SETUP
+#line 511 "scan-gram.l"
+STRING_GROW; braces_level++;
+ YY_BREAK
+case 96:
+/* rule 96 can match eol */
+YY_RULE_SETUP
+#line 512 "scan-gram.l"
+STRING_GROW; braces_level--;
+ YY_BREAK
+case 97:
+YY_RULE_SETUP
+#line 513 "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 98:
+/* rule 98 can match eol */
+YY_RULE_SETUP
+#line 529 "scan-gram.l"
+STRING_GROW;
+ YY_BREAK
+case YY_STATE_EOF(SC_BRACED_CODE):
+#line 531 "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 99:
+YY_RULE_SETUP
+#line 548 "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 556 "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 574 "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 100:
+#line 589 "scan-gram.l"
+case 101:
+/* rule 101 can match eol */
+YY_RULE_SETUP
+#line 589 "scan-gram.l"
+STRING_GROW;
+ YY_BREAK
+case 102:
+YY_RULE_SETUP
+#line 591 "scan-gram.l"
+YY_FATAL_ERROR( "flex scanner jammed" );
+ YY_BREAK
+#line 2214 "scan-gram.c"
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = (yy_hold_char);
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
+ {
+ /* We're scanning a new file or input source. It's
+ * possible that this happened because the user
+ * just pointed gram_in at a new source and called
+ * gram_lex(). If so, then we have to assure
+ * consistency between YY_CURRENT_BUFFER and our
+ * globals. Here is the right place to do so, because
+ * this is the first action (other than possibly a
+ * back-up) that will match for the new input source.
+ */
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = gram_in;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
+ }
+
+ /* Note that here we test for yy_c_buf_p "<=" to the position
+ * of the first EOB in the buffer, since yy_c_buf_p will
+ * already have been incremented past the NUL character
+ * (since all states make transitions on EOB to the
+ * end-of-buffer state). Contrast this with the test
+ * in input().
+ */
+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ /* Okay, we're now positioned to make the NUL
+ * transition. We couldn't have
+ * yy_get_previous_state() go ahead and do it
+ * for us because it doesn't know how to deal
+ * with the possibility of jamming (and we don't
+ * want to build jamming into it because then it
+ * will run more slowly).
+ */
+
+ yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++(yy_c_buf_p);
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
+ yy_cp = (yy_last_accepting_cpos);
+ yy_current_state = (yy_last_accepting_state);
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ (yy_did_buffer_switch_on_eof) = 0;
+
+ if ( gram_wrap( ) )
+ {
+ /* Note: because we've taken care in
+ * yy_get_next_buffer() to have set up
+ * gram_text, we can now set up
+ * yy_c_buf_p so that if some total
+ * hoser (like flex itself) wants to
+ * call the scanner after we return the
+ * YY_NULL, it'll still work - another
+ * YY_NULL will get returned.
+ */
+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) =
+ (yytext_ptr) + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ (yy_c_buf_p) =
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
+
+ yy_current_state = yy_get_previous_state( );
+
+ yy_cp = (yy_c_buf_p);
+ yy_bp = (yytext_ptr) + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+} /* end of gram_lex */
+/* %ok-for-header */
+
+/* %if-c++-only */
+/* %not-for-header */
+
+/* %ok-for-header */
+
+/* %endif */
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+/* %if-c-only */
+static int yy_get_next_buffer (void)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ register char *source = (yytext_ptr);
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0;
+
+ else
+ {
+ int num_to_read =
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
+
+ int yy_c_buf_p_offset =
+ (int) ((yy_c_buf_p) - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ gram_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );
+ }
+ else
+ /* Can't grow it, we don't own it. */
+ b->yy_ch_buf = 0;
+
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR(
+ "fatal error - scanner input buffer overflow" );
+
+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -
+ number_to_move - 1;
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+ (yy_n_chars), (size_t) num_to_read );
+
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ if ( (yy_n_chars) == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ gram_restart(gram_in );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) gram_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ }
+
+ (yy_n_chars) += number_to_move;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
+
+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0];
+
+ return ret_val;
+}
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+/* %if-c-only */
+/* %not-for-header */
+
+ static yy_state_type yy_get_previous_state (void)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+/* %% [15.0] code to get the start state into yy_current_state goes here */
+ yy_current_state = (yy_start);
+ yy_current_state += YY_AT_BOL();
+
+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
+ {
+/* %% [16.0] code to find the next state goes here */
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 55);
+ 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 >= 453 )
+ 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 = 55;
+ 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 >= 453 )
+ 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 == 452);
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c-only */
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+ static int yyinput (void)
+#else
+ static int input (void)
+#endif
+
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ int c;
+
+ *(yy_c_buf_p) = (yy_hold_char);
+
+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
+ /* This was really a NUL. */
+ *(yy_c_buf_p) = '\0';
+
+ else
+ { /* need more input */
+ int offset = (yy_c_buf_p) - (yytext_ptr);
+ ++(yy_c_buf_p);
+
+ switch ( yy_get_next_buffer( ) )
+ {
+ case EOB_ACT_LAST_MATCH:
+ /* This happens because yy_g_n_b()
+ * sees that we've accumulated a
+ * token and flags that we need to
+ * try matching the token before
+ * proceeding. But for input(),
+ * there's no matching to consider.
+ * So convert the EOB_ACT_LAST_MATCH
+ * to EOB_ACT_END_OF_FILE.
+ */
+
+ /* Reset buffer status. */
+ gram_restart(gram_in );
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( gram_wrap( ) )
+ return EOF;
+
+ if ( ! (yy_did_buffer_switch_on_eof) )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ (yy_c_buf_p) = (yytext_ptr) + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
+ *(yy_c_buf_p) = '\0'; /* preserve gram_text */
+ (yy_hold_char) = *++(yy_c_buf_p);
+
+/* %% [19.0] update BOL and gram_lineno */
+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n');
+
+ return c;
+}
+/* %if-c-only */
+#endif /* ifndef YY_NO_INPUT */
+/* %endif */
+
+/** Immediately switch to a different input stream.
+ * @param input_file A readable stream.
+ *
+ * @note This function does not reset the start condition to @c INITIAL .
+ */
+/* %if-c-only */
+ void gram_restart (FILE * input_file )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+
+ if ( ! YY_CURRENT_BUFFER ){
+ gram_ensure_buffer_stack ();
+ YY_CURRENT_BUFFER_LVALUE =
+ gram__create_buffer(gram_in,YY_BUF_SIZE );
+ }
+
+ gram__init_buffer(YY_CURRENT_BUFFER,input_file );
+ gram__load_buffer_state( );
+}
+
+/** Switch to a different input buffer.
+ * @param new_buffer The new input buffer.
+ *
+ */
+/* %if-c-only */
+ void gram__switch_to_buffer (YY_BUFFER_STATE new_buffer )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+
+ /* TODO. We should be able to replace this entire function body
+ * with
+ * gram_pop_buffer_state();
+ * gram_push_buffer_state(new_buffer);
+ */
+ gram_ensure_buffer_stack ();
+ if ( YY_CURRENT_BUFFER == new_buffer )
+ return;
+
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+ gram__load_buffer_state( );
+
+ /* We don't actually know whether we did this switch during
+ * EOF (gram_wrap()) processing, but the only time this flag
+ * is looked at is after gram_wrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+
+/* %if-c-only */
+static void gram__load_buffer_state (void)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos;
+ gram_in = YY_CURRENT_BUFFER_LVALUE->yy_input_file;
+ (yy_hold_char) = *(yy_c_buf_p);
+}
+
+/** Allocate and initialize an input buffer state.
+ * @param file A readable stream.
+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
+ *
+ * @return the allocated buffer state.
+ */
+/* %if-c-only */
+ YY_BUFFER_STATE gram__create_buffer (FILE * file, int size )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) gram_alloc(sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in gram__create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) gram_alloc(b->yy_buf_size + 2 );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in gram__create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ gram__init_buffer(b,file );
+
+ return b;
+}
+
+/** Destroy the buffer.
+ * @param b a buffer created with gram__create_buffer()
+ *
+ */
+/* %if-c-only */
+ void gram__delete_buffer (YY_BUFFER_STATE b )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+
+ if ( ! b )
+ return;
+
+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */
+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ gram_free((void *) b->yy_ch_buf );
+
+ gram_free((void *) b );
+}
+
+/* %if-c-only */
+
+/* %endif */
+
+/* %if-c++-only */
+/* %endif */
+
+/* Initializes or reinitializes a buffer.
+ * This function is sometimes called more than once on the same buffer,
+ * such as during a gram_restart() or at EOF.
+ */
+/* %if-c-only */
+ static void gram__init_buffer (YY_BUFFER_STATE b, FILE * file )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+{
+ int oerrno = errno;
+
+ gram__flush_buffer(b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+ /* If b is the current buffer, then gram__init_buffer was _probably_
+ * called from gram_restart() or through yy_get_next_buffer.
+ * In that case, we don't want to reset the lineno or column.
+ */
+ if (b != YY_CURRENT_BUFFER){
+ b->yy_bs_lineno = 1;
+ b->yy_bs_column = 0;
+ }
+
+/* %if-c-only */
+
+ b->yy_is_interactive = 0;
+
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+ errno = oerrno;
+}
+
+/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
+ *
+ */
+/* %if-c-only */
+ void gram__flush_buffer (YY_BUFFER_STATE b )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == YY_CURRENT_BUFFER )
+ gram__load_buffer_state( );
+}
+
+/* %if-c-or-c++ */
+/** Pushes the new state onto the stack. The new state becomes
+ * the current state. This function will allocate the stack
+ * if necessary.
+ * @param new_buffer The new state.
+ *
+ */
+/* %if-c-only */
+void gram_push_buffer_state (YY_BUFFER_STATE new_buffer )
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ if (new_buffer == NULL)
+ return;
+
+ gram_ensure_buffer_stack();
+
+ /* This block is copied from gram__switch_to_buffer. */
+ if ( YY_CURRENT_BUFFER )
+ {
+ /* Flush out information for old buffer. */
+ *(yy_c_buf_p) = (yy_hold_char);
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p);
+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
+ }
+
+ /* Only push if top exists. Otherwise, replace top. */
+ if (YY_CURRENT_BUFFER)
+ (yy_buffer_stack_top)++;
+ YY_CURRENT_BUFFER_LVALUE = new_buffer;
+
+ /* copied from gram__switch_to_buffer. */
+ gram__load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+}
+/* %endif */
+
+/* %if-c-or-c++ */
+/** Removes and deletes the top of the stack, if present.
+ * The next element becomes the new top.
+ *
+ */
+/* %if-c-only */
+void gram_pop_buffer_state (void)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ if (!YY_CURRENT_BUFFER)
+ return;
+
+ gram__delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ if ((yy_buffer_stack_top) > 0)
+ --(yy_buffer_stack_top);
+
+ if (YY_CURRENT_BUFFER) {
+ gram__load_buffer_state( );
+ (yy_did_buffer_switch_on_eof) = 1;
+ }
+}
+/* %endif */
+
+/* %if-c-or-c++ */
+/* Allocates the stack if it does not exist.
+ * Guarantees space for at least one push.
+ */
+/* %if-c-only */
+static void gram_ensure_buffer_stack (void)
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+{
+ int num_to_alloc;
+
+ if (!(yy_buffer_stack)) {
+
+ /* First allocation is just for 2 elements, since we don't know if this
+ * scanner will even need a stack. We use 2 instead of 1 to avoid an
+ * immediate realloc on the next call.
+ */
+ num_to_alloc = 1;
+ (yy_buffer_stack) = (struct yy_buffer_state**)gram_alloc
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in gram_ensure_buffer_stack()" );
+
+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
+
+ (yy_buffer_stack_max) = num_to_alloc;
+ (yy_buffer_stack_top) = 0;
+ return;
+ }
+
+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
+
+ /* Increase the buffer to prepare for a possible push. */
+ int grow_size = 8 /* arbitrary grow size */;
+
+ num_to_alloc = (yy_buffer_stack_max) + grow_size;
+ (yy_buffer_stack) = (struct yy_buffer_state**)gram_realloc
+ ((yy_buffer_stack),
+ num_to_alloc * sizeof(struct yy_buffer_state*)
+ );
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in gram_ensure_buffer_stack()" );
+
+ /* zero only the new slots.*/
+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
+ (yy_buffer_stack_max) = num_to_alloc;
+ }
+}
+/* %endif */
+
+/* %if-c-only */
+/** Setup the input buffer state to scan directly from a user-specified character buffer.
+ * @param base the character buffer
+ * @param size the size in bytes of the character buffer
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE gram__scan_buffer (char * base, yy_size_t size )
+{
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return 0;
+
+ b = (YY_BUFFER_STATE) gram_alloc(sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in gram__scan_buffer()" );
+
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = 0;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ gram__switch_to_buffer(b );
+
+ return b;
+}
+/* %endif */
+
+/* %if-c-only */
+/** Setup the input buffer state to scan a string. The next call to gram_lex() will
+ * scan from a @e copy of @a str.
+ * @param yystr a NUL-terminated string to scan
+ *
+ * @return the newly allocated buffer state object.
+ * @note If you want to scan bytes that may contain NUL values, then use
+ * gram__scan_bytes() instead.
+ */
+YY_BUFFER_STATE gram__scan_string (yyconst char * yystr )
+{
+
+ return gram__scan_bytes(yystr,strlen(yystr) );
+}
+/* %endif */
+
+/* %if-c-only */
+/** Setup the input buffer state to scan the given bytes. The next call to gram_lex() will
+ * scan from a @e copy of @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
+ *
+ * @return the newly allocated buffer state object.
+ */
+YY_BUFFER_STATE gram__scan_bytes (yyconst char * yybytes, int _yybytes_len )
+{
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = _yybytes_len + 2;
+ buf = (char *) gram_alloc(n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in gram__scan_bytes()" );
+
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
+
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = gram__scan_buffer(buf,n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in gram__scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+}
+/* %endif */
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+/* %if-c-only */
+static void yy_fatal_error (yyconst char* msg )
+{
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+}
+/* %endif */
+/* %if-c++-only */
+/* %endif */
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up gram_text. */ \
+ int yyless_macro_arg = (n); \
+ YY_LESS_LINENO(yyless_macro_arg);\
+ gram_text[gram_leng] = (yy_hold_char); \
+ (yy_c_buf_p) = gram_text + yyless_macro_arg; \
+ (yy_hold_char) = *(yy_c_buf_p); \
+ *(yy_c_buf_p) = '\0'; \
+ gram_leng = yyless_macro_arg; \
+ } \
+ while ( 0 )
+
+/* Accessor methods (get/set functions) to struct members. */
+
+/* %if-c-only */
+/* %if-reentrant */
+/* %endif */
+
+/** Get the current line number.
+ *
+ */
+int gram_get_lineno (void)
+{
+
+ return gram_lineno;
+}
+
+/** Get the input stream.
+ *
+ */
+FILE *gram_get_in (void)
+{
+ return gram_in;
+}
+
+/** Get the output stream.
+ *
+ */
+FILE *gram_get_out (void)
+{
+ return gram_out;
+}
+
+/** Get the length of the current token.
+ *
+ */
+int gram_get_leng (void)
+{
+ return gram_leng;
+}
+
+/** Get the current token.
+ *
+ */
+
+char *gram_get_text (void)
+{
+ return gram_text;
+}
+
+/* %if-reentrant */
+/* %endif */
+
+/** Set the current line number.
+ * @param line_number
+ *
+ */
+void gram_set_lineno (int line_number )
+{
+
+ gram_lineno = line_number;
+}
+
+/** Set the input stream. This does not discard the current
+ * input buffer.
+ * @param in_str A readable stream.
+ *
+ * @see gram__switch_to_buffer
+ */
+void gram_set_in (FILE * in_str )
+{
+ gram_in = in_str ;
+}
+
+void gram_set_out (FILE * out_str )
+{
+ gram_out = out_str ;
+}
+
+int gram_get_debug (void)
+{
+ return gram__flex_debug;
+}
+
+void gram_set_debug (int bdebug )
+{
+ gram__flex_debug = bdebug ;
+}
+
+/* %endif */
+
+/* %if-reentrant */
+/* %if-bison-bridge */
+/* %endif */
+/* %endif if-c-only */
+
+/* %if-c-only */
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from gram_lex_destroy(), so don't allocate here.
+ */
+
+ (yy_buffer_stack) = 0;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = (char *) 0;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ gram_in = stdin;
+ gram_out = stdout;
+#else
+ gram_in = (FILE *) 0;
+ gram_out = (FILE *) 0;
+#endif
+
+ /* For future reference: Set errno on error, since we are called by
+ * gram_lex_init()
+ */
+ return 0;
+}
+/* %endif */
+
+/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
+/* gram_lex_destroy is for both reentrant and non-reentrant scanners. */
+int gram_lex_destroy (void)
+{
+
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER){
+ gram__delete_buffer(YY_CURRENT_BUFFER );
+ YY_CURRENT_BUFFER_LVALUE = NULL;
+ gram_pop_buffer_state();
+ }
+
+ /* Destroy the stack itself. */
+ gram_free((yy_buffer_stack) );
+ (yy_buffer_stack) = NULL;
+
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * gram_lex() is called, initialization will occur. */
+ yy_init_globals( );
+
+/* %if-reentrant */
+/* %endif */
+ return 0;
+}
+/* %endif */
+
+/*
+ * Internal utility routines.
+ */
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
+{
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen (yyconst char * s )
+{
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+void *gram_alloc (yy_size_t size )
+{
+ return (void *) malloc( size );
+}
+
+void *gram_realloc (void * ptr, yy_size_t size )
+{
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+}
+
+void gram_free (void * ptr )
+{
+ free( (char *) ptr ); /* see gram_realloc() for (char *) cast */
+}
+
+/* %if-tables-serialization definitions */
+/* %define-yytables The name for this specific scanner's tables. */
+#define YYTABLES_NAME "yytables"
+/* %endif */
+
+/* %ok-for-header */
+
+#line 591 "scan-gram.l"
+
+
+
+/* Read bytes from FP into buffer BUF of size SIZE. Return the
+ number of bytes read. Remove '\r' from input, treating \r\n
+ and isolated \r as \n. */
+
+static size_t
+no_cr_read (FILE *fp, char *buf, size_t size)
+{
+ size_t bytes_read = fread (buf, 1, size, fp);
+ if (bytes_read)
+ {
+ char *w = memchr (buf, '\r', bytes_read);
+ if (w)
+ {
+ char const *r = ++w;
+ char const *lim = buf + bytes_read;
+
+ for (;;)
+ {
+ /* Found an '\r'. Treat it like '\n', but ignore any
+ '\n' that immediately follows. */
+ w[-1] = '\n';
+ if (r == lim)
+ {
+ int ch = getc (fp);
+ if (ch != '\n' && ungetc (ch, fp) != ch)
+ break;
+ }
+ else if (*r == '\n')
+ r++;
+
+ /* Copy until the next '\r'. */
+ do
+ {
+ if (r == lim)
+ return w - buf;
+ }
+ while ((*w++ = *r++) != '\r');
+ }
+
+ return w - buf;
+ }
+ }
+
+ return bytes_read;
+}
+
+
+
+/*------------------------------------------------------.
+| Scan NUMBER for a base-BASE integer at location LOC. |
+`------------------------------------------------------*/
+
+static unsigned long int
+scan_integer (char const *number, int base, location loc)
+{
+ verify (INT_MAX < ULONG_MAX);
+ unsigned long int num = strtoul (number, NULL, base);
+
+ if (INT_MAX < num)
+ {
+ complain_at (loc, _("integer out of range: %s"), quote (number));
+ num = INT_MAX;
+ }
+
+ return num;
+}
+
+
+/*------------------------------------------------------------------.
+| Convert universal character name UCN to a single-byte character, |
+| and return that character. Return -1 if UCN does not correspond |
+| to a single-byte character. |
+`------------------------------------------------------------------*/
+
+static int
+convert_ucn_to_byte (char const *ucn)
+{
+ verify (UCHAR_MAX <= INT_MAX);
+ unsigned long int code = strtoul (ucn + 2, NULL, 16);
+
+ /* FIXME: Currently we assume Unicode-compatible unibyte characters
+ on ASCII hosts (i.e., Latin-1 on hosts with 8-bit bytes). On
+ non-ASCII hosts we support only the portable C character set.
+ These limitations should be removed once we add support for
+ multibyte characters. */
+
+ if (UCHAR_MAX < code)
+ return -1;
+
+#if ! ('$' == 0x24 && '@' == 0x40 && '`' == 0x60 && '~' == 0x7e)
+ {
+ /* A non-ASCII host. Use CODE to index into a table of the C
+ basic execution character set, which is guaranteed to exist on
+ all Standard C platforms. This table also includes '$', '@',
+ and '`', which are not in the basic execution character set but
+ which are unibyte characters on all the platforms that we know
+ about. */
+ static signed char const table[] =
+ {
+ '\0', -1, -1, -1, -1, -1, -1, '\a',
+ '\b', '\t', '\n', '\v', '\f', '\r', -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ ' ', '!', '"', '#', '$', '%', '&', '\'',
+ '(', ')', '*', '+', ',', '-', '.', '/',
+ '0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', ':', ';', '<', '=', '>', '?',
+ '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
+ 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
+ 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
+ 'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
+ '`', 'a', 'b', 'c', 'd', 'e', 'f', 'g',
+ 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
+ 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
+ 'x', 'y', 'z', '{', '|', '}', '~'
+ };
+
+ code = code < sizeof table ? table[code] : -1;
+ }
+#endif
+
+ return code;
+}
+
+
+/*----------------------------------------------------------------.
+| Handle `#line INT "FILE"'. ARGS has already skipped `#line '. |
+`----------------------------------------------------------------*/
+
+static void
+handle_syncline (char *args, location loc)
+{
+ char *after_num;
+ unsigned long int lineno = strtoul (args, &after_num, 10);
+ char *file = strchr (after_num, '"') + 1;
+ *strchr (file, '"') = '\0';
+ if (INT_MAX <= lineno)
+ {
+ warn_at (loc, _("line number overflow"));
+ lineno = INT_MAX;
+ }
+ current_file = uniqstr_new (file);
+ boundary_set (&scanner_cursor, current_file, lineno, 1);
+}
+
+
+/*----------------------------------------------------------------.
+| For a token or comment starting at START, report message MSGID, |
+| which should say that an end marker was found before |
+| the expected TOKEN_END. |
+`----------------------------------------------------------------*/
+
+static void
+unexpected_end (boundary start, char const *msgid, char const *token_end)
+{
+ location loc;
+ loc.start = start;
+ loc.end = scanner_cursor;
+ 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 ();
+}
+
Property changes on: bison\src\bison\2.4.1\bison-2.4.1-src\src\scan-gram.c
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « bison/src/bison/2.4.1/bison-2.4.1-src/src/scan-gram.h ('k') | bison/src/bison/2.4.1/bison-2.4.1-src/src/scan-gram.l » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698