1 /* A Bison parser, made by GNU Bison 2.3+.  */ 
   3 /* Skeleton implementation for Bison's Yacc-like parsers in C 
   5    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 
   6    Free Software Foundation, Inc. 
   8    This program is free software; you can redistribute it and/or modify 
   9    it under the terms of the GNU General Public License as published by 
  10    the Free Software Foundation; either version 2, or (at your option) 
  13    This program is distributed in the hope that it will be useful, 
  14    but WITHOUT ANY WARRANTY; without even the implied warranty of 
  15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  16    GNU General Public License for more details. 
  18    You should have received a copy of the GNU General Public License 
  19    along with this program; if not, write to the Free Software 
  20    Foundation, Inc., 51 Franklin Street, Fifth Floor, 
  21    Boston, MA 02110-1301, USA.  */ 
  23 /* As a special exception, you may create a larger work that contains 
  24    part or all of the Bison parser skeleton and distribute that work 
  25    under terms of your choice, so long as that work isn't itself a 
  26    parser generator using the skeleton or a modified version thereof 
  27    as a parser skeleton.  Alternatively, if you modify or redistribute 
  28    the parser skeleton itself, you may (at your option) remove this 
  29    special exception, which will cause the skeleton and the resulting 
  30    Bison output files to be licensed under the GNU General Public 
  31    License without this special exception. 
  33    This special exception was added by the Free Software Foundation in 
  34    version 2.2 of Bison.  */ 
  36 /* C LALR(1) parser skeleton written by Richard Stallman, by 
  37    simplifying the original so-called "semantic" parser.  */ 
  39 /* All symbols defined below should begin with yy or YY, to avoid 
  40    infringing on user name space.  This should be done even for local 
  41    variables, as they might otherwise be expanded by user macros. 
  42    There are some unavoidable exceptions within include files to 
  43    define necessary library symbols; they are noted "INFRINGES ON 
  44    USER NAME SPACE" below.  */ 
  46 /* Identify Bison output.  */ 
  50 #define YYBISON_VERSION "2.3+" 
  53 #define YYSKELETON_NAME "yacc.c" 
  58 /* Using locations.  */ 
  59 #define YYLSP_NEEDED 1 
  61 /* Substitute the variable and function names.  */ 
  62 #define yyparse gram_parse 
  63 #define yylex   gram_lex 
  64 #define yyerror gram_error 
  65 #define yylval  gram_lval 
  66 #define yychar  gram_char 
  67 #define yydebug gram_debug 
  68 #define yynerrs gram_nerrs 
  69 #define yylloc gram_lloc 
  71 /* Copy the first part of user declarations.  */ 
  72 /* Line 164 of yacc.c.  */ 
  73 #line 1 "parse-gram.y" 
  74 /* Bison Grammar Parser                             -*- C -*- 
  76    Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 
  78    This file is part of Bison, the GNU Compiler Compiler. 
  80    This program is free software; you can redistribute it and/or modify 
  81    it under the terms of the GNU General Public License as published by 
  82    the Free Software Foundation; either version 2 of the License, or 
  83    (at your option) any later version. 
  85    This program is distributed in the hope that it will be useful, 
  86    but WITHOUT ANY WARRANTY; without even the implied warranty of 
  87    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
  88    GNU General Public License for more details. 
  90    You should have received a copy of the GNU General Public License 
  91    along with this program; if not, write to the Free Software 
  92    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
  99 #include <strverscmp.h> 
 101 #include "complain.h" 
 102 #include "conflicts.h" 
 106 #include "muscle_tab.h" 
 107 #include "quotearg.h" 
 110 #include "scan-gram.h" 
 111 #include "scan-code.h" 
 113 #define YYLLOC_DEFAULT(Current, Rhs, N)  (Current) = lloc_default (Rhs, N) 
 114 static YYLTYPE 
lloc_default (YYLTYPE 
const *, int); 
 116 #define YY_LOCATION_PRINT(File, Loc) \ 
 117           location_print (File, Loc) 
 119 static void version_check (location 
const *loc
, char const *version
); 
 121 /* Request detailed syntax error messages, and pass them to GRAM_ERROR. 
 122    FIXME: depends on the undocumented availability of YYLLOC.  */ 
 124 #define yyerror(Msg) \ 
 125         gram_error (&yylloc, Msg) 
 126 static void gram_error (location 
const *, char const *); 
 128 static char const *char_name (char); 
 130 /** Add a lex-param or a parse-param. 
 132  * \param type  \a lex_param or \a parse_param 
 133  * \param decl  the formal argument 
 134  * \param loc   the location in the source. 
 136 static void add_param (char const *type
, char *decl
, location loc
); 
 139 static symbol_class current_class 
= unknown_sym
; 
 140 static uniqstr current_type 
= NULL
; 
 141 static symbol 
*current_lhs
; 
 142 static location current_lhs_location
; 
 143 static int current_prec 
= 0; 
 145 #define YYTYPE_INT16 int_fast16_t 
 146 #define YYTYPE_INT8 int_fast8_t 
 147 #define YYTYPE_UINT16 uint_fast16_t 
 148 #define YYTYPE_UINT8 uint_fast8_t 
 151 /* Enabling traces.  */ 
 156 /* Enabling verbose error messages.  */ 
 157 #ifdef YYERROR_VERBOSE 
 158 # undef YYERROR_VERBOSE 
 159 # define YYERROR_VERBOSE 1 
 161 # define YYERROR_VERBOSE 1 
 164 /* Enabling the token table.  */ 
 165 #ifndef YYTOKEN_TABLE 
 166 # define YYTOKEN_TABLE 0 
 173    /* Put the tokens into the symbol table, so that GDB and other debuggers 
 182      PERCENT_DESTRUCTOR 
= 263, 
 183      PERCENT_PRINTER 
= 264, 
 186      PERCENT_NONASSOC 
= 267, 
 190      PERCENT_AFTER_HEADER 
= 271, 
 191      PERCENT_BEFORE_HEADER 
= 272, 
 193      PERCENT_DEFAULT_PREC 
= 274, 
 194      PERCENT_DEFINE 
= 275, 
 195      PERCENT_DEFINES 
= 276, 
 196      PERCENT_END_HEADER 
= 277, 
 197      PERCENT_ERROR_VERBOSE 
= 278, 
 198      PERCENT_EXPECT 
= 279, 
 199      PERCENT_EXPECT_RR 
= 280, 
 200      PERCENT_FILE_PREFIX 
= 281, 
 201      PERCENT_GLR_PARSER 
= 282, 
 202      PERCENT_INITIAL_ACTION 
= 283, 
 203      PERCENT_LEX_PARAM 
= 284, 
 204      PERCENT_LOCATIONS 
= 285, 
 205      PERCENT_NAME_PREFIX 
= 286, 
 206      PERCENT_NO_DEFAULT_PREC 
= 287, 
 207      PERCENT_NO_LINES 
= 288, 
 208      PERCENT_NONDETERMINISTIC_PARSER 
= 289, 
 209      PERCENT_OUTPUT 
= 290, 
 210      PERCENT_PARSE_PARAM 
= 291, 
 211      PERCENT_PURE_PARSER 
= 292, 
 212      PERCENT_REQUIRE 
= 293, 
 213      PERCENT_SKELETON 
= 294, 
 215      PERCENT_START_HEADER 
= 296, 
 216      PERCENT_TOKEN_TABLE 
= 297, 
 217      PERCENT_VERBOSE 
= 298, 
 225      PERCENT_PERCENT 
= 306, 
 237 #define PERCENT_TOKEN 260 
 238 #define PERCENT_NTERM 261 
 239 #define PERCENT_TYPE 262 
 240 #define PERCENT_DESTRUCTOR 263 
 241 #define PERCENT_PRINTER 264 
 242 #define PERCENT_LEFT 265 
 243 #define PERCENT_RIGHT 266 
 244 #define PERCENT_NONASSOC 267 
 245 #define PERCENT_PREC 268 
 246 #define PERCENT_DPREC 269 
 247 #define PERCENT_MERGE 270 
 248 #define PERCENT_AFTER_HEADER 271 
 249 #define PERCENT_BEFORE_HEADER 272 
 250 #define PERCENT_DEBUG 273 
 251 #define PERCENT_DEFAULT_PREC 274 
 252 #define PERCENT_DEFINE 275 
 253 #define PERCENT_DEFINES 276 
 254 #define PERCENT_END_HEADER 277 
 255 #define PERCENT_ERROR_VERBOSE 278 
 256 #define PERCENT_EXPECT 279 
 257 #define PERCENT_EXPECT_RR 280 
 258 #define PERCENT_FILE_PREFIX 281 
 259 #define PERCENT_GLR_PARSER 282 
 260 #define PERCENT_INITIAL_ACTION 283 
 261 #define PERCENT_LEX_PARAM 284 
 262 #define PERCENT_LOCATIONS 285 
 263 #define PERCENT_NAME_PREFIX 286 
 264 #define PERCENT_NO_DEFAULT_PREC 287 
 265 #define PERCENT_NO_LINES 288 
 266 #define PERCENT_NONDETERMINISTIC_PARSER 289 
 267 #define PERCENT_OUTPUT 290 
 268 #define PERCENT_PARSE_PARAM 291 
 269 #define PERCENT_PURE_PARSER 292 
 270 #define PERCENT_REQUIRE 293 
 271 #define PERCENT_SKELETON 294 
 272 #define PERCENT_START 295 
 273 #define PERCENT_START_HEADER 296 
 274 #define PERCENT_TOKEN_TABLE 297 
 275 #define PERCENT_VERBOSE 298 
 276 #define PERCENT_YACC 299 
 277 #define BRACED_CODE 300 
 283 #define PERCENT_PERCENT 306 
 286 #define SEMICOLON 309 
 288 #define PERCENT_UNION 311 
 293 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 
 294 typedef union YYSTYPE
 
 295 {/* Line 198 of yacc.c.  */ 
 296 #line 97 "parse-gram.y" 
 304   unsigned char character
; 
 306 /* Line 198 of yacc.c.  */ 
 307 #line 308 "parse-gram.c" 
 309 # define YYSTYPE_IS_TRIVIAL 1 
 310 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ 
 311 # define YYSTYPE_IS_DECLARED 1 
 314 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED 
 315 typedef struct YYLTYPE
 
 322 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ 
 323 # define YYLTYPE_IS_DECLARED 1 
 324 # define YYLTYPE_IS_TRIVIAL 1 
 328 /* Copy the second part of user declarations.  */ 
 330 /* Line 221 of yacc.c.  */ 
 331 #line 332 "parse-gram.c" 
 338 typedef YYTYPE_UINT8 yytype_uint8
; 
 340 typedef unsigned char yytype_uint8
; 
 344 typedef YYTYPE_INT8 yytype_int8
; 
 345 #elif (defined __STDC__ || defined __C99__FUNC__ \ 
 346      || defined __cplusplus || defined _MSC_VER) 
 347 typedef signed char yytype_int8
; 
 349 typedef short int yytype_int8
; 
 353 typedef YYTYPE_UINT16 yytype_uint16
; 
 355 typedef unsigned short int yytype_uint16
; 
 359 typedef YYTYPE_INT16 yytype_int16
; 
 361 typedef short int yytype_int16
; 
 365 # ifdef __SIZE_TYPE__ 
 366 #  define YYSIZE_T __SIZE_TYPE__ 
 367 # elif defined size_t 
 368 #  define YYSIZE_T size_t 
 369 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 
 370      || defined __cplusplus || defined _MSC_VER) 
 371 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 
 372 #  define YYSIZE_T size_t 
 374 #  define YYSIZE_T unsigned int 
 378 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 
 383 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 
 384 #   define YY_(msgid) dgettext ("bison-runtime", msgid) 
 388 #  define YY_(msgid) msgid 
 392 /* Suppress unused-variable warnings by "using" E.  */ 
 393 #if ! defined lint || defined __GNUC__ 
 394 # define YYUSE(e) ((void) (e)) 
 396 # define YYUSE(e) /* empty */ 
 399 /* Identity function, used to suppress warnings about constant conditions.  */ 
 403 #if (defined __STDC__ || defined __C99__FUNC__ \ 
 404      || defined __cplusplus || defined _MSC_VER) 
 417 #if ! defined yyoverflow || YYERROR_VERBOSE 
 419 /* The parser invokes alloca or malloc; define the necessary symbols.  */ 
 421 # ifdef YYSTACK_USE_ALLOCA 
 422 #  if YYSTACK_USE_ALLOCA 
 424 #    define YYSTACK_ALLOC __builtin_alloca 
 425 #   elif defined __BUILTIN_VA_ARG_INCR 
 426 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 
 428 #    define YYSTACK_ALLOC __alloca 
 429 #   elif defined _MSC_VER 
 430 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 
 431 #    define alloca _alloca 
 433 #    define YYSTACK_ALLOC alloca 
 434 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 
 435      || defined __cplusplus || defined _MSC_VER) 
 436 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 
 445 # ifdef YYSTACK_ALLOC 
 446    /* Pacify GCC's `empty if-body' warning.  */ 
 447 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 
 448 #  ifndef YYSTACK_ALLOC_MAXIMUM 
 449     /* The OS might guarantee only one guard page at the bottom of the stack, 
 450        and a page size can be as small as 4096 bytes.  So we cannot safely 
 451        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number 
 452        to allow for a few compiler-allocated temporary stack slots.  */ 
 453 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 
 456 #  define YYSTACK_ALLOC YYMALLOC 
 457 #  define YYSTACK_FREE YYFREE 
 458 #  ifndef YYSTACK_ALLOC_MAXIMUM 
 459 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 
 461 #  if (defined __cplusplus && ! defined _STDLIB_H \ 
 462        && ! ((defined YYMALLOC || defined malloc) \ 
 463              && (defined YYFREE || defined free))) 
 464 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 
 470 #   define YYMALLOC malloc 
 471 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 
 472      || defined __cplusplus || defined _MSC_VER) 
 473 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */ 
 478 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ 
 479      || defined __cplusplus || defined _MSC_VER) 
 480 void free (void *); /* INFRINGES ON USER NAME SPACE */ 
 484 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 
 487 #if (! defined yyoverflow \ 
 488      && (! defined __cplusplus \ 
 489          || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ 
 490              && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 
 492 /* A type that is properly aligned for any stack member.  */ 
 500 /* The size of the maximum gap between one aligned stack and the next.  */ 
 501 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 
 503 /* The size of an array large to enough to hold all stacks, each with 
 505 # define YYSTACK_BYTES(N) \ 
 506      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ 
 507       + 2 * YYSTACK_GAP_MAXIMUM) 
 509 /* Copy COUNT objects from FROM to TO.  The source and destination do 
 512 #  if defined __GNUC__ && 1 < __GNUC__ 
 513 #   define YYCOPY(To, From, Count) \ 
 514       __builtin_memcpy (To, From, (Count) * sizeof (*(From))) 
 516 #   define YYCOPY(To, From, Count)              \ 
 520           for (yyi = 0; yyi < (Count); yyi++)   \ 
 521             (To)[yyi] = (From)[yyi];            \ 
 527 /* Relocate STACK from its old location to the new one.  The 
 528    local variables YYSIZE and YYSTACKSIZE give the old and new number of 
 529    elements in the stack, and YYPTR gives the new location of the 
 530    stack.  Advance YYPTR to a properly aligned location for the next 
 532 # define YYSTACK_RELOCATE(Stack)                                        \ 
 535         YYSIZE_T yynewbytes;                                            \ 
 536         YYCOPY (&yyptr->Stack, Stack, yysize);                          \ 
 537         Stack = &yyptr->Stack;                                          \ 
 538         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 
 539         yyptr += yynewbytes / sizeof (*yyptr);                          \ 
 545 /* YYFINAL -- State number of the termination state.  */ 
 547 /* YYLAST -- Last index in YYTABLE.  */ 
 550 /* YYNTOKENS -- Number of terminals.  */ 
 552 /* YYNNTS -- Number of nonterminals.  */ 
 554 /* YYNRULES -- Number of rules.  */ 
 556 /* YYNRULES -- Number of states.  */ 
 557 #define YYNSTATES  131 
 559 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */ 
 561 #define YYMAXUTOK   311 
 563 #define YYTRANSLATE(YYX)                                                \ 
 564   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 
 566 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */ 
 567 static const yytype_uint8 yytranslate
[] = 
 569        0,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 570        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 571        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 572        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 573        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 574        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 575        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 576        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 577        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 578        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 579        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 580        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 581        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 582        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 583        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 584        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 585        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 586        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 587        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 588        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 589        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 590        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 591        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 592        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 593        2,     2,     2,     2,     2,     2,     2,     2,     2,     2, 
 594        2,     2,     2,     2,     2,     2,     1,     2,     3,     4, 
 595        5,     6,     7,     8,     9,    10,    11,    12,    13,    14, 
 596       15,    16,    17,    18,    19,    20,    21,    22,    23,    24, 
 597       25,    26,    27,    28,    29,    30,    31,    32,    33,    34, 
 598       35,    36,    37,    38,    39,    40,    41,    42,    43,    44, 
 599       45,    46,    47,    48,    49,    50,    51,    52,    53,    54, 
 604 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 
 606 static const yytype_uint8 yyprhs
[] = 
 608        0,     0,     3,     8,     9,    12,    14,    16,    19,    22, 
 609       24,    28,    30,    33,    35,    38,    41,    45,    47,    50, 
 610       53,    55,    59,    61,    63,    67,    70,    72,    75,    78, 
 611       81,    83,    85,    87,    89,    91,    93,    96,   100,   104, 
 612      106,   108,   109,   111,   115,   116,   120,   121,   125,   129, 
 613      133,   135,   137,   139,   140,   142,   144,   147,   149,   151, 
 614      154,   157,   161,   163,   166,   168,   171,   173,   176,   179, 
 615      180,   184,   186,   190,   193,   194,   197,   200,   204,   208, 
 616      212,   214,   216,   217,   219,   221,   223,   225,   227,   229, 
 620 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */ 
 621 static const yytype_int8 yyrhs
[] = 
 623       58,     0,    -1,    59,    51,    72,    85,    -1,    -1,    59, 
 624       60,    -1,    61,    -1,    53,    -1,    16,    80,    -1,    17, 
 625       80,    -1,    18,    -1,    20,     3,    79,    -1,    21,    -1, 
 626       22,    80,    -1,    23,    -1,    24,     4,    -1,    25,     4, 
 627       -1,    26,    48,     3,    -1,    27,    -1,    28,    45,    -1, 
 628       29,    45,    -1,    30,    -1,    31,    48,     3,    -1,    33, 
 629       -1,    34,    -1,    35,    48,     3,    -1,    36,    45,    -1, 
 630       37,    -1,    38,     3,    -1,    39,     3,    -1,    41,    80, 
 631       -1,    42,    -1,    43,    -1,    44,    -1,    54,    -1,    66, 
 632       -1,    63,    -1,    40,    83,    -1,     8,    45,    69,    -1, 
 633        9,    45,    69,    -1,    19,    -1,    32,    -1,    -1,    49, 
 634       -1,    56,    62,    45,    -1,    -1,     6,    64,    71,    -1, 
 635       -1,     5,    65,    71,    -1,     7,    55,    69,    -1,    67, 
 636       68,    69,    -1,    10,    -1,    11,    -1,    12,    -1,    -1, 
 637       55,    -1,    83,    -1,    69,    83,    -1,    55,    -1,    81, 
 638       -1,    81,     4,    -1,    81,    84,    -1,    81,     4,    84, 
 639       -1,    70,    -1,    71,    70,    -1,    73,    -1,    72,    73, 
 640       -1,    74,    -1,    61,    54,    -1,     1,    54,    -1,    -1, 
 641       82,    75,    76,    -1,    77,    -1,    76,    52,    77,    -1, 
 642       76,    54,    -1,    -1,    77,    83,    -1,    77,    45,    -1, 
 643       77,    13,    83,    -1,    77,    14,     4,    -1,    77,    15, 
 644       55,    -1,     3,    -1,    80,    -1,    -1,    78,    -1,    45, 
 645       -1,    49,    -1,    46,    -1,    50,    -1,    81,    -1,    84, 
 646       -1,     3,    -1,    -1,    51,    47,    -1 
 649 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */ 
 650 static const yytype_uint16 yyrline
[] = 
 652        0,   205,   205,   213,   215,   219,   220,   221,   222,   223, 
 653      224,   225,   226,   227,   228,   229,   230,   231,   236,   240, 
 654      241,   242,   243,   244,   245,   246,   247,   248,   249,   250, 
 655      251,   252,   253,   254,   258,   259,   260,   264,   272,   280, 
 656      284,   298,   299,   303,   331,   331,   336,   336,   341,   352, 
 657      367,   368,   369,   373,   374,   379,   380,   385,   390,   395, 
 658      401,   407,   418,   419,   428,   429,   435,   436,   437,   444, 
 659      444,   448,   449,   450,   455,   456,   458,   460,   462,   464, 
 660      474,   475,   481,   485,   490,   506,   508,   517,   522,   523, 
 665 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 
 666 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 
 667    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */ 
 668 static const char *const yytname
[] = 
 670   "\"end of file\"", "error", "$undefined", "\"string\"", "\"integer\"", 
 671   "\"%token\"", "\"%nterm\"", "\"%type\"", "\"%destructor\"", 
 672   "\"%printer\"", "\"%left\"", "\"%right\"", "\"%nonassoc\"", "\"%prec\"", 
 673   "\"%dprec\"", "\"%merge\"", "\"%after-header\"", "\"%before-header\"", 
 674   "\"%debug\"", "\"%default-prec\"", "\"%define\"", "\"%defines\"", 
 675   "\"%end-header\"", "\"%error-verbose\"", "\"%expect\"", "\"%expect-rr\"", 
 676   "\"%file-prefix\"", "\"%glr-parser\"", "\"%initial-action\"", 
 677   "\"%lex-param\"", "\"%locations\"", "\"%name-prefix\"", 
 678   "\"%no-default-prec\"", "\"%no-lines\"", "\"%nondeterministic-parser\"", 
 679   "\"%output\"", "\"%parse-param\"", "\"%pure-parser\"", "\"%require\"", 
 680   "\"%skeleton\"", "\"%start\"", "\"%start-header\"", "\"%token-table\"", 
 681   "\"%verbose\"", "\"%yacc\"", "\"{...}\"", "\"char\"", "\"epilogue\"", 
 682   "\"=\"", "\"identifier\"", "\"identifier:\"", "\"%%\"", "\"|\"", 
 683   "\"%{...%}\"", "\";\"", "\"type\"", "\"%union\"", "$accept", "input", 
 684   "prologue_declarations", "prologue_declaration", "grammar_declaration", 
 685   "union_name", "symbol_declaration", "@1", "@2", "precedence_declaration", 
 686   "precedence_declarator", "type.opt", "symbols.1", "symbol_def", 
 687   "symbol_defs.1", "grammar", "rules_or_grammar_declaration", "rules", 
 688   "@3", "rhses.1", "rhs", "content", "content.opt", "braceless", "id", 
 689   "id_colon", "symbol", "string_as_id", "epilogue.opt", 0 
 694 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 
 696 static const yytype_uint16 yytoknum
[] = 
 698        0,   256,   257,   258,   259,   260,   261,   262,   263,   264, 
 699      265,   266,   267,   268,   269,   270,   271,   272,   273,   274, 
 700      275,   276,   277,   278,   279,   280,   281,   282,   283,   284, 
 701      285,   286,   287,   288,   289,   290,   291,   292,   293,   294, 
 702      295,   296,   297,   298,   299,   300,   301,   302,   303,   304, 
 703      305,   306,   307,   308,   309,   310,   311 
 707 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */ 
 708 static const yytype_uint8 yyr1
[] = 
 710        0,    57,    58,    59,    59,    60,    60,    60,    60,    60, 
 711       60,    60,    60,    60,    60,    60,    60,    60,    60,    60, 
 712       60,    60,    60,    60,    60,    60,    60,    60,    60,    60, 
 713       60,    60,    60,    60,    61,    61,    61,    61,    61,    61, 
 714       61,    62,    62,    61,    64,    63,    65,    63,    63,    66, 
 715       67,    67,    67,    68,    68,    69,    69,    70,    70,    70, 
 716       70,    70,    71,    71,    72,    72,    73,    73,    73,    75, 
 717       74,    76,    76,    76,    77,    77,    77,    77,    77,    77, 
 718       78,    78,    79,    79,    80,    81,    81,    82,    83,    83, 
 722 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */ 
 723 static const yytype_uint8 yyr2
[] = 
 725        0,     2,     4,     0,     2,     1,     1,     2,     2,     1, 
 726        3,     1,     2,     1,     2,     2,     3,     1,     2,     2, 
 727        1,     3,     1,     1,     3,     2,     1,     2,     2,     2, 
 728        1,     1,     1,     1,     1,     1,     2,     3,     3,     1, 
 729        1,     0,     1,     3,     0,     3,     0,     3,     3,     3, 
 730        1,     1,     1,     0,     1,     1,     2,     1,     1,     2, 
 731        2,     3,     1,     2,     1,     2,     1,     2,     2,     0, 
 732        3,     1,     3,     2,     0,     2,     2,     3,     3,     3, 
 733        1,     1,     0,     1,     1,     1,     1,     1,     1,     1, 
 737 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state 
 738    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero 
 739    means the default is an error.  */ 
 740 static const yytype_uint8 yydefact
[] = 
 742        3,     0,     0,     1,    46,    44,     0,     0,     0,    50, 
 743       51,    52,     0,     0,     9,    39,     0,    11,     0,    13, 
 744        0,     0,     0,    17,     0,     0,    20,     0,    40,    22, 
 745       23,     0,     0,    26,     0,     0,     0,     0,    30,    31, 
 746       32,     0,     6,    33,    41,     4,     5,    35,    34,    53, 
 747        0,     0,     0,     0,     0,    84,     7,     8,    82,    12, 
 748       14,    15,     0,    18,    19,     0,     0,    25,    27,    28, 
 749       90,    86,    85,    88,    36,    89,    29,     0,    87,     0, 
 750        0,    64,    66,    69,    42,     0,    54,     0,    57,    62, 
 751       47,    58,    45,    48,    55,    37,    38,    80,    83,    10, 
 752       81,    16,    21,    24,    68,    67,     0,    65,     2,    74, 
 753       43,    49,    63,    59,    60,    56,    92,    70,    71,    61, 
 754       74,    73,     0,     0,     0,    76,    75,    72,    77,    78, 
 758 /* YYDEFGOTO[NTERM-NUM].  */ 
 759 static const yytype_int8 yydefgoto
[] = 
 761       -1,     1,     2,    45,    79,    85,    47,    51,    50,    48, 
 762       49,    87,    93,    89,    90,    80,    81,    82,   109,   117, 
 763      118,    98,    99,    56,    73,    83,    94,    75,   108 
 766 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 
 768 #define YYPACT_NINF -91 
 769 static const yytype_int8 yypact
[] = 
 771      -91,    29,   112,   -91,   -91,   -91,   -39,   -14,   -13,   -91, 
 772      -91,   -91,   -12,   -12,   -91,   -91,    33,   -91,   -12,   -91, 
 773       35,    36,   -11,   -91,     5,     6,   -91,     1,   -91,   -91, 
 774      -91,     7,     9,   -91,    53,    61,    27,   -12,   -91,   -91, 
 775      -91,    60,   -91,   -91,    14,   -91,   -91,   -91,   -91,    19, 
 776      -31,   -31,    27,    27,    27,   -91,   -91,   -91,     3,   -91, 
 777      -91,   -91,    77,   -91,   -91,    81,    84,   -91,   -91,   -91, 
 778      -91,   -91,   -91,   -91,   -91,   -91,   -91,    34,   -91,    39, 
 779        2,   -91,   -91,   -91,   -91,    44,   -91,    27,   -91,   -91, 
 780      -31,    16,   -31,    27,   -91,    27,    27,   -91,   -91,   -91, 
 781      -91,   -91,   -91,   -91,   -91,   -91,    43,   -91,   -91,   -91, 
 782      -91,    27,   -91,    91,   -91,   -91,   -91,   -27,    32,   -91, 
 783      -91,   -91,    27,    92,    40,   -91,   -91,    32,   -91,   -91, 
 787 /* YYPGOTO[NTERM-NUM].  */ 
 788 static const yytype_int8 yypgoto
[] = 
 790      -91,   -91,   -91,   -91,    95,   -91,   -91,   -91,   -91,   -91, 
 791      -91,   -91,   -49,   -64,    47,   -91,    21,   -91,   -91,   -91, 
 792      -21,   -91,   -91,     4,    -7,   -91,   -36,   -90,   -91 
 795 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If 
 796    positive, shift that token.  If negative, reduce the rule which 
 797    number is the opposite.  If zero, do what YYDEFACT says. 
 798    If YYTABLE_NINF, syntax error.  */ 
 799 #define YYTABLE_NINF -92 
 800 static const yytype_int16 yytable
[] = 
 802       74,   114,   -91,    77,    95,    96,    97,     4,     5,     6, 
 803        7,     8,     9,    10,    11,    71,    52,    57,    72,    70, 
 804      113,    15,    59,   119,    88,   120,   112,   121,   112,     3, 
 805       70,    53,    54,    55,    28,    70,    58,    62,   111,    60, 
 806       61,    76,    36,    91,    91,   122,   123,   124,    55,    65, 
 807       63,    64,    78,   106,    67,    66,    68,   115,    44,   115, 
 808      115,    77,   100,    84,    69,     4,     5,     6,     7,     8, 
 809        9,    10,    11,    71,    86,   115,    72,   125,    71,    15, 
 810      101,    72,   126,    91,   102,    91,   128,   103,   104,   110, 
 811      116,   126,    28,   105,    70,   130,   129,    46,    92,   127, 
 812       36,   107,     0,     0,     0,     0,     0,     0,     0,     0, 
 813       78,     0,     0,     0,     0,     0,    44,     4,     5,     6, 
 814        7,     8,     9,    10,    11,     0,     0,     0,    12,    13, 
 815       14,    15,    16,    17,    18,    19,    20,    21,    22,    23, 
 816       24,    25,    26,    27,    28,    29,    30,    31,    32,    33, 
 817       34,    35,    36,    37,    38,    39,    40,     0,     0,     0, 
 818        0,     0,     0,    41,     0,    42,    43,     0,    44 
 821 static const yytype_int8 yycheck
[] = 
 823       36,    91,     0,     1,    53,    54,     3,     5,     6,     7, 
 824        8,     9,    10,    11,    12,    46,    55,    13,    49,     3, 
 825        4,    19,    18,   113,    55,    52,    90,    54,    92,     0, 
 826        3,    45,    45,    45,    32,     3,     3,    48,    87,     4, 
 827        4,    37,    40,    50,    51,    13,    14,    15,    45,    48, 
 828       45,    45,    50,    51,    45,    48,     3,    93,    56,    95, 
 829       96,     1,    58,    49,     3,     5,     6,     7,     8,     9, 
 830       10,    11,    12,    46,    55,   111,    49,    45,    46,    19, 
 831        3,    49,   118,    90,     3,    92,   122,     3,    54,    45, 
 832       47,   127,    32,    54,     3,    55,     4,     2,    51,   120, 
 833       40,    80,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1, 
 834       50,    -1,    -1,    -1,    -1,    -1,    56,     5,     6,     7, 
 835        8,     9,    10,    11,    12,    -1,    -1,    -1,    16,    17, 
 836       18,    19,    20,    21,    22,    23,    24,    25,    26,    27, 
 837       28,    29,    30,    31,    32,    33,    34,    35,    36,    37, 
 838       38,    39,    40,    41,    42,    43,    44,    -1,    -1,    -1, 
 839       -1,    -1,    -1,    51,    -1,    53,    54,    -1,    56 
 842 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 
 843    symbol of state STATE-NUM.  */ 
 844 static const yytype_uint8 yystos
[] = 
 846        0,    58,    59,     0,     5,     6,     7,     8,     9,    10, 
 847       11,    12,    16,    17,    18,    19,    20,    21,    22,    23, 
 848       24,    25,    26,    27,    28,    29,    30,    31,    32,    33, 
 849       34,    35,    36,    37,    38,    39,    40,    41,    42,    43, 
 850       44,    51,    53,    54,    56,    60,    61,    63,    66,    67, 
 851       65,    64,    55,    45,    45,    45,    80,    80,     3,    80, 
 852        4,     4,    48,    45,    45,    48,    48,    45,     3,     3, 
 853        3,    46,    49,    81,    83,    84,    80,     1,    50,    61, 
 854       72,    73,    74,    82,    49,    62,    55,    68,    55,    70, 
 855       71,    81,    71,    69,    83,    69,    69,     3,    78,    79, 
 856       80,     3,     3,     3,    54,    54,    51,    73,    85,    75, 
 857       45,    69,    70,     4,    84,    83,    47,    76,    77,    84, 
 858       52,    54,    13,    14,    15,    45,    83,    77,    83,     4, 
 862 #define yyerrok         (yyerrstatus = 0) 
 863 #define yyclearin       (yychar = YYEMPTY) 
 867 #define YYACCEPT        goto yyacceptlab 
 868 #define YYABORT         goto yyabortlab 
 869 #define YYERROR         goto yyerrorlab 
 872 /* Like YYERROR except do call yyerror.  This remains here temporarily 
 873    to ease the transition to the new meaning of YYERROR, for GCC. 
 874    Once GCC version 2 has supplanted version 1, this can go.  */ 
 876 #define YYFAIL          goto yyerrlab 
 878 #define YYRECOVERING()  (!!yyerrstatus) 
 880 #define YYBACKUP(Token, Value)                                  \ 
 882   if (yychar == YYEMPTY && yylen == 1)                          \ 
 886       yytoken = YYTRANSLATE (yychar);                           \ 
 892       yyerror (YY_("syntax error: cannot back up")); \ 
 899 #define YYERRCODE       256 
 902 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 
 903    If N is 0, then set CURRENT to the empty location which ends 
 904    the previous symbol: RHS[0] (always defined).  */ 
 906 #define YYRHSLOC(Rhs, K) ((Rhs)[K]) 
 907 #ifndef YYLLOC_DEFAULT 
 908 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \ 
 912           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \ 
 913           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \ 
 914           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \ 
 915           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \ 
 919           (Current).first_line   = (Current).last_line   =              \ 
 920             YYRHSLOC (Rhs, 0).last_line;                                \ 
 921           (Current).first_column = (Current).last_column =              \ 
 922             YYRHSLOC (Rhs, 0).last_column;                              \ 
 928 /* YY_LOCATION_PRINT -- Print the location on the stream. 
 929    This macro was not mandated originally: define only if we know 
 930    we won't break user code: when these are the locations we know.  */ 
 932 #ifndef YY_LOCATION_PRINT 
 933 # if YYLTYPE_IS_TRIVIAL 
 934 #  define YY_LOCATION_PRINT(File, Loc)                  \ 
 935      fprintf (File, "%d.%d-%d.%d",                      \ 
 936               (Loc).first_line, (Loc).first_column,     \ 
 937               (Loc).last_line,  (Loc).last_column) 
 939 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0) 
 944 /* YYLEX -- calling `yylex' with the right arguments.  */ 
 947 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) 
 949 # define YYLEX yylex (&yylval, &yylloc) 
 952 /* Enable debugging if requested.  */ 
 956 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 
 957 #  define YYFPRINTF fprintf 
 960 # define YYDPRINTF(Args)                        \ 
 966 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \ 
 970       YYFPRINTF (stderr, "%s ", Title);                                   \ 
 971       yy_symbol_print (stderr,                                            \ 
 972                   Type, Value, Location); \ 
 973       YYFPRINTF (stderr, "\n");                                           \ 
 978 /*--------------------------------. 
 979 | Print this symbol on YYOUTPUT.  | 
 980 `--------------------------------*/ 
 983 #if (defined __STDC__ || defined __C99__FUNC__ \ 
 984      || defined __cplusplus || defined _MSC_VER) 
 986 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE 
const * const yyvaluep
, YYLTYPE 
const * const yylocationp
) 
 989 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yylocationp
) 
 992     YYSTYPE 
const * const yyvaluep
; 
 993     YYLTYPE 
const * const yylocationp
; 
1000   if (yytype 
< YYNTOKENS
) 
1001     YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
); 
1007       case 3: /* "\"string\"" */ 
1008 /* Line 670 of yacc.c.  */ 
1009 #line 183 "parse-gram.y" 
1010         { fputs (quotearg_style (c_quoting_style
, (yyvaluep
->chars
)), stderr
); }; 
1011 /* Line 670 of yacc.c.  */ 
1012 #line 1013 "parse-gram.c" 
1014       case 4: /* "\"integer\"" */ 
1015 /* Line 670 of yacc.c.  */ 
1016 #line 194 "parse-gram.y" 
1017         { fprintf (stderr
, "%d", (yyvaluep
->integer
)); }; 
1018 /* Line 670 of yacc.c.  */ 
1019 #line 1020 "parse-gram.c" 
1021       case 45: /* "\"{...}\"" */ 
1022 /* Line 670 of yacc.c.  */ 
1023 #line 185 "parse-gram.y" 
1024         { fprintf (stderr
, "{\n%s\n}", (yyvaluep
->chars
)); }; 
1025 /* Line 670 of yacc.c.  */ 
1026 #line 1027 "parse-gram.c" 
1028       case 46: /* "\"char\"" */ 
1029 /* Line 670 of yacc.c.  */ 
1030 #line 178 "parse-gram.y" 
1031         { fputs (char_name ((yyvaluep
->character
)), stderr
); }; 
1032 /* Line 670 of yacc.c.  */ 
1033 #line 1034 "parse-gram.c" 
1035       case 47: /* "\"epilogue\"" */ 
1036 /* Line 670 of yacc.c.  */ 
1037 #line 185 "parse-gram.y" 
1038         { fprintf (stderr
, "{\n%s\n}", (yyvaluep
->chars
)); }; 
1039 /* Line 670 of yacc.c.  */ 
1040 #line 1041 "parse-gram.c" 
1042       case 49: /* "\"identifier\"" */ 
1043 /* Line 670 of yacc.c.  */ 
1044 #line 190 "parse-gram.y" 
1045         { fputs ((yyvaluep
->uniqstr
), stderr
); }; 
1046 /* Line 670 of yacc.c.  */ 
1047 #line 1048 "parse-gram.c" 
1049       case 50: /* "\"identifier:\"" */ 
1050 /* Line 670 of yacc.c.  */ 
1051 #line 191 "parse-gram.y" 
1052         { fprintf (stderr
, "%s:", (yyvaluep
->uniqstr
)); }; 
1053 /* Line 670 of yacc.c.  */ 
1054 #line 1055 "parse-gram.c" 
1056       case 53: /* "\"%{...%}\"" */ 
1057 /* Line 670 of yacc.c.  */ 
1058 #line 185 "parse-gram.y" 
1059         { fprintf (stderr
, "{\n%s\n}", (yyvaluep
->chars
)); }; 
1060 /* Line 670 of yacc.c.  */ 
1061 #line 1062 "parse-gram.c" 
1063       case 55: /* "\"type\"" */ 
1064 /* Line 670 of yacc.c.  */ 
1065 #line 189 "parse-gram.y" 
1066         { fprintf (stderr
, "<%s>", (yyvaluep
->uniqstr
)); }; 
1067 /* Line 670 of yacc.c.  */ 
1068 #line 1069 "parse-gram.c" 
1070       case 78: /* "content" */ 
1071 /* Line 670 of yacc.c.  */ 
1072 #line 185 "parse-gram.y" 
1073         { fprintf (stderr
, "{\n%s\n}", (yyvaluep
->chars
)); }; 
1074 /* Line 670 of yacc.c.  */ 
1075 #line 1076 "parse-gram.c" 
1077       case 79: /* "content.opt" */ 
1078 /* Line 670 of yacc.c.  */ 
1079 #line 185 "parse-gram.y" 
1080         { fprintf (stderr
, "{\n%s\n}", (yyvaluep
->chars
)); }; 
1081 /* Line 670 of yacc.c.  */ 
1082 #line 1083 "parse-gram.c" 
1084       case 80: /* "braceless" */ 
1085 /* Line 670 of yacc.c.  */ 
1086 #line 185 "parse-gram.y" 
1087         { fprintf (stderr
, "{\n%s\n}", (yyvaluep
->chars
)); }; 
1088 /* Line 670 of yacc.c.  */ 
1089 #line 1090 "parse-gram.c" 
1092 /* Line 670 of yacc.c.  */ 
1093 #line 197 "parse-gram.y" 
1094         { fprintf (stderr
, "%s", (yyvaluep
->symbol
)->tag
); }; 
1095 /* Line 670 of yacc.c.  */ 
1096 #line 1097 "parse-gram.c" 
1098       case 82: /* "id_colon" */ 
1099 /* Line 670 of yacc.c.  */ 
1100 #line 198 "parse-gram.y" 
1101         { fprintf (stderr
, "%s:", (yyvaluep
->symbol
)->tag
); }; 
1102 /* Line 670 of yacc.c.  */ 
1103 #line 1104 "parse-gram.c" 
1105       case 83: /* "symbol" */ 
1106 /* Line 670 of yacc.c.  */ 
1107 #line 197 "parse-gram.y" 
1108         { fprintf (stderr
, "%s", (yyvaluep
->symbol
)->tag
); }; 
1109 /* Line 670 of yacc.c.  */ 
1110 #line 1111 "parse-gram.c" 
1112       case 84: /* "string_as_id" */ 
1113 /* Line 670 of yacc.c.  */ 
1114 #line 197 "parse-gram.y" 
1115         { fprintf (stderr
, "%s", (yyvaluep
->symbol
)->tag
); }; 
1116 /* Line 670 of yacc.c.  */ 
1117 #line 1118 "parse-gram.c" 
1125 /*--------------------------------. 
1126 | Print this symbol on YYOUTPUT.  | 
1127 `--------------------------------*/ 
1129 #if (defined __STDC__ || defined __C99__FUNC__ \ 
1130      || defined __cplusplus || defined _MSC_VER) 
1132 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE 
const * const yyvaluep
, YYLTYPE 
const * const yylocationp
) 
1135 yy_symbol_print (yyoutput
, yytype
, yyvaluep
, yylocationp
) 
1138     YYSTYPE 
const * const yyvaluep
; 
1139     YYLTYPE 
const * const yylocationp
; 
1142   if (yytype 
< YYNTOKENS
) 
1143     YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]); 
1145     YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]); 
1147   YY_LOCATION_PRINT (yyoutput
, *yylocationp
); 
1148   YYFPRINTF (yyoutput
, ": "); 
1149   yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yylocationp
); 
1150   YYFPRINTF (yyoutput
, ")"); 
1153 /*------------------------------------------------------------------. 
1154 | yy_stack_print -- Print the state stack from its BOTTOM up to its | 
1156 `------------------------------------------------------------------*/ 
1158 #if (defined __STDC__ || defined __C99__FUNC__ \ 
1159      || defined __cplusplus || defined _MSC_VER) 
1161 yy_stack_print (yytype_int16 
*yybottom
, yytype_int16 
*yytop
) 
1164 yy_stack_print (yybottom
, yytop
) 
1165     yytype_int16 
*yybottom
; 
1166     yytype_int16 
*yytop
; 
1169   YYFPRINTF (stderr
, "Stack now"); 
1170   for (; yybottom 
<= yytop
; yybottom
++) 
1172       int yybot 
= *yybottom
; 
1173       YYFPRINTF (stderr
, " %d", yybot
); 
1175   YYFPRINTF (stderr
, "\n"); 
1178 # define YY_STACK_PRINT(Bottom, Top)                            \ 
1181     yy_stack_print ((Bottom), (Top));                           \ 
1185 /*------------------------------------------------. 
1186 | Report that the YYRULE is going to be reduced.  | 
1187 `------------------------------------------------*/ 
1189 #if (defined __STDC__ || defined __C99__FUNC__ \ 
1190      || defined __cplusplus || defined _MSC_VER) 
1192 yy_reduce_print (YYSTYPE 
*yyvsp
, YYLTYPE 
*yylsp
, int yyrule
) 
1195 yy_reduce_print (yyvsp
, yylsp
, yyrule
) 
1201   int yynrhs 
= yyr2
[yyrule
]; 
1203   unsigned long int yylno 
= yyrline
[yyrule
]; 
1204   YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n", 
1206   /* The symbols being reduced.  */ 
1207   for (yyi 
= 0; yyi 
< yynrhs
; yyi
++) 
1209       fprintf (stderr
, "   $%d = ", yyi 
+ 1); 
1210       yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
], 
1211                        &(yyvsp
[(yyi 
+ 1) - (yynrhs
)]) 
1212                        , &(yylsp
[(yyi 
+ 1) - (yynrhs
)])                ); 
1213       fprintf (stderr
, "\n"); 
1217 # define YY_REDUCE_PRINT(Rule)          \ 
1220     yy_reduce_print (yyvsp, yylsp, Rule); \ 
1223 /* Nonzero means print parse trace.  It is left uninitialized so that 
1224    multiple parsers can coexist.  */ 
1226 #else /* !YYDEBUG */ 
1227 # define YYDPRINTF(Args) 
1228 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 
1229 # define YY_STACK_PRINT(Bottom, Top) 
1230 # define YY_REDUCE_PRINT(Rule) 
1231 #endif /* !YYDEBUG */ 
1234 /* YYINITDEPTH -- initial size of the parser's stacks.  */ 
1236 # define YYINITDEPTH 200 
1239 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 
1240    if the built-in stack extension method is used). 
1242    Do not make this value too large; the results are undefined if 
1243    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 
1244    evaluated with infinite-precision integer arithmetic.  */ 
1247 # define YYMAXDEPTH 10000 
1255 #  if defined __GLIBC__ && defined _STRING_H 
1256 #   define yystrlen strlen 
1258 /* Return the length of YYSTR.  */ 
1259 #if (defined __STDC__ || defined __C99__FUNC__ \ 
1260      || defined __cplusplus || defined _MSC_VER) 
1262 yystrlen (const char *yystr
) 
1270   for (yylen 
= 0; yystr
[yylen
]; yylen
++) 
1278 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 
1279 #   define yystpcpy stpcpy 
1281 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 
1283 #if (defined __STDC__ || defined __C99__FUNC__ \ 
1284      || defined __cplusplus || defined _MSC_VER) 
1286 yystpcpy (char *yydest
, const char *yysrc
) 
1289 yystpcpy (yydest
, yysrc
) 
1295   const char *yys 
= yysrc
; 
1297   while ((*yyd
++ = *yys
++) != '\0') 
1306 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary 
1307    quotes and backslashes, so that it's suitable for yyerror.  The 
1308    heuristic is that double-quoting is unnecessary unless the string 
1309    contains an apostrophe, a comma, or backslash (other than 
1310    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is 
1311    null, do not copy; instead, return the length of what the result 
1314 yytnamerr (char *yyres
, const char *yystr
) 
1319       char const *yyp 
= yystr
; 
1326             goto do_not_strip_quotes
; 
1330               goto do_not_strip_quotes
; 
1343     do_not_strip_quotes
: ; 
1347     return yystrlen (yystr
); 
1349   return yystpcpy (yyres
, yystr
) - yyres
; 
1353 /* Copy into YYRESULT an error message about the unexpected token 
1354    YYCHAR while in state YYSTATE.  Return the number of bytes copied, 
1355    including the terminating null byte.  If YYRESULT is null, do not 
1356    copy anything; just return the number of bytes that would be 
1357    copied.  As a special case, return 0 if an ordinary "syntax error" 
1358    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during 
1359    size calculation.  */ 
1361 yysyntax_error (char *yyresult
, int yystate
, int yychar
) 
1363   int yyn 
= yypact
[yystate
]; 
1365   if (! (YYPACT_NINF 
< yyn 
&& yyn 
<= YYLAST
)) 
1369       int yytype 
= YYTRANSLATE (yychar
); 
1370       YYSIZE_T yysize0 
= yytnamerr (0, yytname
[yytype
]); 
1371       YYSIZE_T yysize 
= yysize0
; 
1373       int yysize_overflow 
= 0; 
1374       enum { YYERROR_VERBOSE_ARGS_MAXIMUM 
= 5 }; 
1375       char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
]; 
1379       /* This is so xgettext sees the translatable formats that are 
1380          constructed on the fly.  */ 
1381       YY_("syntax error, unexpected %s"); 
1382       YY_("syntax error, unexpected %s, expecting %s"); 
1383       YY_("syntax error, unexpected %s, expecting %s or %s"); 
1384       YY_("syntax error, unexpected %s, expecting %s or %s or %s"); 
1385       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); 
1389       static char const yyunexpected
[] = "syntax error, unexpected %s"; 
1390       static char const yyexpecting
[] = ", expecting %s"; 
1391       static char const yyor
[] = " or %s"; 
1392       char yyformat
[sizeof yyunexpected
 
1393                     + sizeof yyexpecting 
- 1 
1394                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM 
- 2) 
1395                        * (sizeof yyor 
- 1))]; 
1396       char const *yyprefix 
= yyexpecting
; 
1398       /* Start YYX at -YYN if negative to avoid negative indexes in 
1400       int yyxbegin 
= yyn 
< 0 ? -yyn 
: 0; 
1402       /* Stay within bounds of both yycheck and yytname.  */ 
1403       int yychecklim 
= YYLAST 
- yyn 
+ 1; 
1404       int yyxend 
= yychecklim 
< YYNTOKENS 
? yychecklim 
: YYNTOKENS
; 
1407       yyarg
[0] = yytname
[yytype
]; 
1408       yyfmt 
= yystpcpy (yyformat
, yyunexpected
); 
1410       for (yyx 
= yyxbegin
; yyx 
< yyxend
; ++yyx
) 
1411         if (yycheck
[yyx 
+ yyn
] == yyx 
&& yyx 
!= YYTERROR
) 
1413             if (yycount 
== YYERROR_VERBOSE_ARGS_MAXIMUM
) 
1417                 yyformat
[sizeof yyunexpected 
- 1] = '\0'; 
1420             yyarg
[yycount
++] = yytname
[yyx
]; 
1421             yysize1 
= yysize 
+ yytnamerr (0, yytname
[yyx
]); 
1422             yysize_overflow 
|= (yysize1 
< yysize
); 
1424             yyfmt 
= yystpcpy (yyfmt
, yyprefix
); 
1428       yyf 
= YY_(yyformat
); 
1429       yysize1 
= yysize 
+ yystrlen (yyf
); 
1430       yysize_overflow 
|= (yysize1 
< yysize
); 
1433       if (yysize_overflow
) 
1434         return YYSIZE_MAXIMUM
; 
1438           /* Avoid sprintf, as that infringes on the user's name space. 
1439              Don't have undefined behavior even if the translation 
1440              produced a string with the wrong number of "%s"s.  */ 
1441           char *yyp 
= yyresult
; 
1443           while ((*yyp 
= *yyf
) != '\0') 
1445               if (*yyp 
== '%' && yyf
[1] == 's' && yyi 
< yycount
) 
1447                   yyp 
+= yytnamerr (yyp
, yyarg
[yyi
++]); 
1460 #endif /* YYERROR_VERBOSE */ 
1463 /*-----------------------------------------------. 
1464 | Release the memory associated to this symbol.  | 
1465 `-----------------------------------------------*/ 
1468 #if (defined __STDC__ || defined __C99__FUNC__ \ 
1469      || defined __cplusplus || defined _MSC_VER) 
1471 yydestruct (const char *yymsg
, int yytype
, YYSTYPE 
*yyvaluep
, YYLTYPE 
*yylocationp
) 
1474 yydestruct (yymsg
, yytype
, yyvaluep
, yylocationp
) 
1478     YYLTYPE 
*yylocationp
; 
1482   YYUSE (yylocationp
); 
1486   YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
); 
1497 /* Prevent warnings from -Wmissing-prototypes.  */ 
1499 #ifdef YYPARSE_PARAM 
1500 #if defined __STDC__ || defined __cplusplus 
1501 int yyparse (void *YYPARSE_PARAM
); 
1505 #else /* ! YYPARSE_PARAM */ 
1506 #if defined __STDC__ || defined __cplusplus 
1511 #endif /* ! YYPARSE_PARAM */ 
1522 #ifdef YYPARSE_PARAM 
1523 #if (defined __STDC__ || defined __C99__FUNC__ \ 
1524      || defined __cplusplus || defined _MSC_VER) 
1526 yyparse (void *YYPARSE_PARAM
) 
1529 yyparse (YYPARSE_PARAM
) 
1530     void *YYPARSE_PARAM
; 
1532 #else /* ! YYPARSE_PARAM */ 
1533 #if (defined __STDC__ || defined __C99__FUNC__ \ 
1534      || defined __cplusplus || defined _MSC_VER) 
1544   /* The lookahead symbol.  */ 
1547 /* The semantic value of the lookahead symbol.  */ 
1550 /* Number of syntax errors so far.  */ 
1552 /* Location data for the lookahead symbol.  */ 
1558   /* Number of tokens to shift before error messages enabled.  */ 
1560   /* Lookahead token as an internal (translated) token number.  */ 
1563   /* Buffer for error messages, and its allocated size.  */ 
1565   char *yymsg 
= yymsgbuf
; 
1566   YYSIZE_T yymsg_alloc 
= sizeof yymsgbuf
; 
1569   /* Three stacks and their tools: 
1570      `yyss': related to states, 
1571      `yyvs': related to semantic values, 
1572      `yyls': related to locations. 
1574      Refer to the stacks thru separate pointers, to allow yyoverflow 
1575      to reallocate them elsewhere.  */ 
1577   /* The state stack.  */ 
1578   yytype_int16 yyssa
[YYINITDEPTH
]; 
1579   yytype_int16 
*yyss 
= yyssa
; 
1580   yytype_int16 
*yyssp
; 
1582   /* The semantic value stack.  */ 
1583   YYSTYPE yyvsa
[YYINITDEPTH
]; 
1584   YYSTYPE 
*yyvs 
= yyvsa
; 
1587   /* The location stack.  */ 
1588   YYLTYPE yylsa
[YYINITDEPTH
]; 
1589   YYLTYPE 
*yyls 
= yylsa
; 
1591   /* The locations where the error started and ended.  */ 
1592   YYLTYPE yyerror_range
[2]; 
1594 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) 
1596   YYSIZE_T yystacksize 
= YYINITDEPTH
; 
1598   /* The variables used to return semantic value and location from the 
1603   /* The number of symbols on the RHS of the reduced rule. 
1604      Keep to zero when no symbol should be popped.  */ 
1607   YYDPRINTF ((stderr
, "Starting parse\n")); 
1612   yychar 
= YYEMPTY
;             /* Cause a token to be read.  */ 
1614   /* Initialize stack pointers. 
1615      Waste one element of value and location stack 
1616      so that they stay on the same level as the state stack. 
1617      The wasted elements are never initialized.  */ 
1622 #if YYLTYPE_IS_TRIVIAL 
1623   /* Initialize the default location before parsing starts.  */ 
1624   yylloc
.first_line   
= yylloc
.last_line   
= 1; 
1625   yylloc
.first_column 
= yylloc
.last_column 
= 1; 
1629   /* User initialization code.  */ 
1630   /* Line 1082 of yacc.c.  */ 
1631 #line 88 "parse-gram.y" 
1633   /* Bison's grammar can initial empty locations, hence a default 
1634      location is needed. */ 
1635   boundary_set (&yylloc
.start
, current_file
, 1, 1); 
1636   boundary_set (&yylloc
.end
, current_file
, 1, 1); 
1638 /* Line 1082 of yacc.c.  */ 
1639 #line 1640 "parse-gram.c" 
1643 /*------------------------------------------------------------. 
1644 | yynewstate -- Push a new state, which is found in yystate.  | 
1645 `------------------------------------------------------------*/ 
1647   /* In all cases, when you get here, the value and location stacks 
1648      have just been pushed.  So pushing a state here evens the stacks.  */ 
1654   if (yyss 
+ yystacksize 
- 1 <= yyssp
) 
1656       /* Get the current used size of the three stacks, in elements.  */ 
1657       YYSIZE_T yysize 
= yyssp 
- yyss 
+ 1; 
1661         /* Give user a chance to reallocate the stack.  Use copies of 
1662            these so that the &'s don't force the real ones into 
1664         YYSTYPE 
*yyvs1 
= yyvs
; 
1665         yytype_int16 
*yyss1 
= yyss
; 
1666         YYLTYPE 
*yyls1 
= yyls
; 
1668         /* Each stack pointer address is followed by the size of the 
1669            data in use in that stack, in bytes.  This used to be a 
1670            conditional around just the two extra args, but that might 
1671            be undefined if yyoverflow is a macro.  */ 
1672         yyoverflow (YY_("memory exhausted"), 
1673                     &yyss1
, yysize 
* sizeof (*yyssp
), 
1674                     &yyvs1
, yysize 
* sizeof (*yyvsp
), 
1675                     &yyls1
, yysize 
* sizeof (*yylsp
), 
1681 #else /* no yyoverflow */ 
1682 # ifndef YYSTACK_RELOCATE 
1683       goto yyexhaustedlab
; 
1685       /* Extend the stack our own way.  */ 
1686       if (YYMAXDEPTH 
<= yystacksize
) 
1687         goto yyexhaustedlab
; 
1689       if (YYMAXDEPTH 
< yystacksize
) 
1690         yystacksize 
= YYMAXDEPTH
; 
1693         yytype_int16 
*yyss1 
= yyss
; 
1694         union yyalloc 
*yyptr 
= 
1695           (union yyalloc 
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
)); 
1697           goto yyexhaustedlab
; 
1698         YYSTACK_RELOCATE (yyss
); 
1699         YYSTACK_RELOCATE (yyvs
); 
1700         YYSTACK_RELOCATE (yyls
); 
1701 #  undef YYSTACK_RELOCATE 
1703           YYSTACK_FREE (yyss1
); 
1706 #endif /* no yyoverflow */ 
1708       yyssp 
= yyss 
+ yysize 
- 1; 
1709       yyvsp 
= yyvs 
+ yysize 
- 1; 
1710       yylsp 
= yyls 
+ yysize 
- 1; 
1712       YYDPRINTF ((stderr
, "Stack size increased to %lu\n", 
1713                   (unsigned long int) yystacksize
)); 
1715       if (yyss 
+ yystacksize 
- 1 <= yyssp
) 
1719   YYDPRINTF ((stderr
, "Entering state %d\n", yystate
)); 
1728   /* Do appropriate processing given the current state.  Read a 
1729      lookahead token if we need one and don't already have one.  */ 
1731   /* First try to decide what to do without reference to lookahead token.  */ 
1732   yyn 
= yypact
[yystate
]; 
1733   if (yyn 
== YYPACT_NINF
) 
1736   /* Not known => get a lookahead token if don't already have one.  */ 
1738   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */ 
1739   if (yychar 
== YYEMPTY
) 
1741       YYDPRINTF ((stderr
, "Reading a token: ")); 
1745   if (yychar 
<= YYEOF
) 
1747       yychar 
= yytoken 
= YYEOF
; 
1748       YYDPRINTF ((stderr
, "Now at end of input.\n")); 
1752       yytoken 
= YYTRANSLATE (yychar
); 
1753       YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
); 
1756   /* If the proper action on seeing token YYTOKEN is to reduce or to 
1757      detect an error, take that action.  */ 
1759   if (yyn 
< 0 || YYLAST 
< yyn 
|| yycheck
[yyn
] != yytoken
) 
1764       if (yyn 
== 0 || yyn 
== YYTABLE_NINF
) 
1773   /* Count tokens shifted since error; after three, turn off error 
1778   /* Shift the lookahead token.  */ 
1779   YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
); 
1781   /* Discard the shifted token unless it is eof.  */ 
1782   if (yychar 
!= YYEOF
) 
1791 /*-----------------------------------------------------------. 
1792 | yydefault -- do the default action for the current state.  | 
1793 `-----------------------------------------------------------*/ 
1795   yyn 
= yydefact
[yystate
]; 
1801 /*-----------------------------. 
1802 | yyreduce -- Do a reduction.  | 
1803 `-----------------------------*/ 
1805   /* yyn is the number of a rule to reduce with.  */ 
1808   /* If YYLEN is nonzero, implement the default value of the action: 
1811      Otherwise, the following line sets YYVAL to garbage. 
1812      This behavior is undocumented and Bison 
1813      users should not rely upon it.  Assigning to YYVAL 
1814      unconditionally makes the parser a bit smaller, and it avoids a 
1815      GCC warning that YYVAL may be used uninitialized.  */ 
1816   yyval 
= yyvsp
[1-yylen
]; 
1818   /* Default location.  */ 
1819   YYLLOC_DEFAULT (yyloc
, (yylsp 
- yylen
), yylen
); 
1820   YY_REDUCE_PRINT (yyn
); 
1824 /* Line 1270 of yacc.c.  */ 
1825 #line 220 "parse-gram.y" 
1826     { prologue_augment (translate_code ((yyvsp
[(1) - (1)].chars
), (yylsp
[(1) - (1)])), (yylsp
[(1) - (1)]), union_seen
); } 
1830 /* Line 1270 of yacc.c.  */ 
1831 #line 221 "parse-gram.y" 
1832     { prologue_augment ((yyvsp
[(2) - (2)].chars
), (yylsp
[(2) - (2)]), true); } 
1836 /* Line 1270 of yacc.c.  */ 
1837 #line 222 "parse-gram.y" 
1838     { prologue_augment ((yyvsp
[(2) - (2)].chars
), (yylsp
[(2) - (2)]), false); } 
1842 /* Line 1270 of yacc.c.  */ 
1843 #line 223 "parse-gram.y" 
1844     { debug_flag 
= true; } 
1848 /* Line 1270 of yacc.c.  */ 
1849 #line 224 "parse-gram.y" 
1850     { muscle_insert ((yyvsp
[(2) - (3)].chars
), (yyvsp
[(3) - (3)].chars
)); } 
1854 /* Line 1270 of yacc.c.  */ 
1855 #line 225 "parse-gram.y" 
1856     { defines_flag 
= true; } 
1860 /* Line 1270 of yacc.c.  */ 
1861 #line 226 "parse-gram.y" 
1862     { muscle_code_grow ("end_header", (yyvsp
[(2) - (2)].chars
), (yylsp
[(2) - (2)])); } 
1866 /* Line 1270 of yacc.c.  */ 
1867 #line 227 "parse-gram.y" 
1868     { error_verbose 
= true; } 
1872 /* Line 1270 of yacc.c.  */ 
1873 #line 228 "parse-gram.y" 
1874     { expected_sr_conflicts 
= (yyvsp
[(2) - (2)].integer
); } 
1878 /* Line 1270 of yacc.c.  */ 
1879 #line 229 "parse-gram.y" 
1880     { expected_rr_conflicts 
= (yyvsp
[(2) - (2)].integer
); } 
1884 /* Line 1270 of yacc.c.  */ 
1885 #line 230 "parse-gram.y" 
1886     { spec_file_prefix 
= (yyvsp
[(3) - (3)].chars
); } 
1890 /* Line 1270 of yacc.c.  */ 
1891 #line 232 "parse-gram.y" 
1893       nondeterministic_parser 
= true; 
1899 /* Line 1270 of yacc.c.  */ 
1900 #line 237 "parse-gram.y" 
1902       muscle_code_grow ("initial_action", translate_symbol_action ((yyvsp
[(2) - (2)].chars
), (yylsp
[(2) - (2)])), (yylsp
[(2) - (2)])); 
1907 /* Line 1270 of yacc.c.  */ 
1908 #line 240 "parse-gram.y" 
1909     { add_param ("lex_param", (yyvsp
[(2) - (2)].chars
), (yylsp
[(2) - (2)])); } 
1913 /* Line 1270 of yacc.c.  */ 
1914 #line 241 "parse-gram.y" 
1915     { locations_flag 
= true; } 
1919 /* Line 1270 of yacc.c.  */ 
1920 #line 242 "parse-gram.y" 
1921     { spec_name_prefix 
= (yyvsp
[(3) - (3)].chars
); } 
1925 /* Line 1270 of yacc.c.  */ 
1926 #line 243 "parse-gram.y" 
1927     { no_lines_flag 
= true; } 
1931 /* Line 1270 of yacc.c.  */ 
1932 #line 244 "parse-gram.y" 
1933     { nondeterministic_parser 
= true; } 
1937 /* Line 1270 of yacc.c.  */ 
1938 #line 245 "parse-gram.y" 
1939     { spec_outfile 
= (yyvsp
[(3) - (3)].chars
); } 
1943 /* Line 1270 of yacc.c.  */ 
1944 #line 246 "parse-gram.y" 
1945     { add_param ("parse_param", (yyvsp
[(2) - (2)].chars
), (yylsp
[(2) - (2)])); } 
1949 /* Line 1270 of yacc.c.  */ 
1950 #line 247 "parse-gram.y" 
1951     { pure_parser 
= true; } 
1955 /* Line 1270 of yacc.c.  */ 
1956 #line 248 "parse-gram.y" 
1957     { version_check (&(yylsp
[(2) - (2)]), (yyvsp
[(2) - (2)].chars
)); } 
1961 /* Line 1270 of yacc.c.  */ 
1962 #line 249 "parse-gram.y" 
1963     { skeleton 
= (yyvsp
[(2) - (2)].chars
); } 
1967 /* Line 1270 of yacc.c.  */ 
1968 #line 250 "parse-gram.y" 
1969     { muscle_code_grow ("start_header", (yyvsp
[(2) - (2)].chars
), (yylsp
[(2) - (2)])); } 
1973 /* Line 1270 of yacc.c.  */ 
1974 #line 251 "parse-gram.y" 
1975     { token_table_flag 
= true; } 
1979 /* Line 1270 of yacc.c.  */ 
1980 #line 252 "parse-gram.y" 
1981     { report_flag 
= report_states
; } 
1985 /* Line 1270 of yacc.c.  */ 
1986 #line 253 "parse-gram.y" 
1987     { yacc_flag 
= true; } 
1991 /* Line 1270 of yacc.c.  */ 
1992 #line 261 "parse-gram.y" 
1994       grammar_start_symbol_set ((yyvsp
[(2) - (2)].symbol
), (yylsp
[(2) - (2)])); 
1999 /* Line 1270 of yacc.c.  */ 
2000 #line 265 "parse-gram.y" 
2003       const char *action 
= translate_symbol_action ((yyvsp
[(2) - (3)].chars
), (yylsp
[(2) - (3)])); 
2004       for (list 
= (yyvsp
[(3) - (3)].list
); list
; list 
= list
->next
) 
2005         symbol_destructor_set (list
->sym
, action
, (yylsp
[(2) - (3)])); 
2006       symbol_list_free ((yyvsp
[(3) - (3)].list
)); 
2011 /* Line 1270 of yacc.c.  */ 
2012 #line 273 "parse-gram.y" 
2015       const char *action 
= translate_symbol_action ((yyvsp
[(2) - (3)].chars
), (yylsp
[(2) - (3)])); 
2016       for (list 
= (yyvsp
[(3) - (3)].list
); list
; list 
= list
->next
) 
2017         symbol_printer_set (list
->sym
, action
, (yylsp
[(2) - (3)])); 
2018       symbol_list_free ((yyvsp
[(3) - (3)].list
)); 
2023 /* Line 1270 of yacc.c.  */ 
2024 #line 281 "parse-gram.y" 
2026       default_prec 
= true; 
2031 /* Line 1270 of yacc.c.  */ 
2032 #line 285 "parse-gram.y" 
2034       default_prec 
= false; 
2039 /* Line 1270 of yacc.c.  */ 
2040 #line 298 "parse-gram.y" 
2045 /* Line 1270 of yacc.c.  */ 
2046 #line 299 "parse-gram.y" 
2047     { muscle_code_grow ("union_name", (yyvsp
[(1) - (1)].uniqstr
), (yylsp
[(1) - (1)])); } 
2051 /* Line 1270 of yacc.c.  */ 
2052 #line 304 "parse-gram.y" 
2054       char const *body 
= (yyvsp
[(3) - (3)].chars
); 
2056       /* Concatenate the %union bodies.  If this is the first %union, make sure 
2057          the synchronization line appears after the opening '{' so as not to 
2058          confuse Doxygen.  Otherwise, turn the previous %union's trailing '}' 
2059          into '\n', and omit the new %union's leading '{'.  */ 
2062           muscle_grow ("stype", "{", ""); 
2066           char *code 
= muscle_find ("stype"); 
2067           code
[strlen (code
) - 1] = '\n'; 
2072       muscle_code_grow ("stype", body
, (yylsp
[(3) - (3)])); 
2077 /* Line 1270 of yacc.c.  */ 
2078 #line 331 "parse-gram.y" 
2079     { current_class 
= nterm_sym
; } 
2083 /* Line 1270 of yacc.c.  */ 
2084 #line 332 "parse-gram.y" 
2086       current_class 
= unknown_sym
; 
2087       current_type 
= NULL
; 
2092 /* Line 1270 of yacc.c.  */ 
2093 #line 336 "parse-gram.y" 
2094     { current_class 
= token_sym
; } 
2098 /* Line 1270 of yacc.c.  */ 
2099 #line 337 "parse-gram.y" 
2101       current_class 
= unknown_sym
; 
2102       current_type 
= NULL
; 
2107 /* Line 1270 of yacc.c.  */ 
2108 #line 342 "parse-gram.y" 
2112       for (list 
= (yyvsp
[(3) - (3)].list
); list
; list 
= list
->next
) 
2113         symbol_type_set (list
->sym
, (yyvsp
[(2) - (3)].uniqstr
), (yylsp
[(2) - (3)])); 
2114       symbol_list_free ((yyvsp
[(3) - (3)].list
)); 
2119 /* Line 1270 of yacc.c.  */ 
2120 #line 353 "parse-gram.y" 
2124       for (list 
= (yyvsp
[(3) - (3)].list
); list
; list 
= list
->next
) 
2126           symbol_type_set (list
->sym
, current_type
, (yylsp
[(2) - (3)])); 
2127           symbol_precedence_set (list
->sym
, current_prec
, (yyvsp
[(1) - (3)].assoc
), (yylsp
[(1) - (3)])); 
2129       symbol_list_free ((yyvsp
[(3) - (3)].list
)); 
2130       current_type 
= NULL
; 
2135 /* Line 1270 of yacc.c.  */ 
2136 #line 367 "parse-gram.y" 
2137     { (yyval
.assoc
) = left_assoc
; } 
2141 /* Line 1270 of yacc.c.  */ 
2142 #line 368 "parse-gram.y" 
2143     { (yyval
.assoc
) = right_assoc
; } 
2147 /* Line 1270 of yacc.c.  */ 
2148 #line 369 "parse-gram.y" 
2149     { (yyval
.assoc
) = non_assoc
; } 
2153 /* Line 1270 of yacc.c.  */ 
2154 #line 373 "parse-gram.y" 
2155     { current_type 
= NULL
; } 
2159 /* Line 1270 of yacc.c.  */ 
2160 #line 374 "parse-gram.y" 
2161     { current_type 
= (yyvsp
[(1) - (1)].uniqstr
); tag_seen 
= true; } 
2165 /* Line 1270 of yacc.c.  */ 
2166 #line 379 "parse-gram.y" 
2167     { (yyval
.list
) = symbol_list_new ((yyvsp
[(1) - (1)].symbol
), (yylsp
[(1) - (1)])); } 
2171 /* Line 1270 of yacc.c.  */ 
2172 #line 380 "parse-gram.y" 
2173     { (yyval
.list
) = symbol_list_prepend ((yyvsp
[(1) - (2)].list
), (yyvsp
[(2) - (2)].symbol
), (yylsp
[(2) - (2)])); } 
2177 /* Line 1270 of yacc.c.  */ 
2178 #line 386 "parse-gram.y" 
2180        current_type 
= (yyvsp
[(1) - (1)].uniqstr
); 
2186 /* Line 1270 of yacc.c.  */ 
2187 #line 391 "parse-gram.y" 
2189        symbol_class_set ((yyvsp
[(1) - (1)].symbol
), current_class
, (yylsp
[(1) - (1)]), true); 
2190        symbol_type_set ((yyvsp
[(1) - (1)].symbol
), current_type
, (yylsp
[(1) - (1)])); 
2195 /* Line 1270 of yacc.c.  */ 
2196 #line 396 "parse-gram.y" 
2198       symbol_class_set ((yyvsp
[(1) - (2)].symbol
), current_class
, (yylsp
[(1) - (2)]), true); 
2199       symbol_type_set ((yyvsp
[(1) - (2)].symbol
), current_type
, (yylsp
[(1) - (2)])); 
2200       symbol_user_token_number_set ((yyvsp
[(1) - (2)].symbol
), (yyvsp
[(2) - (2)].integer
), (yylsp
[(2) - (2)])); 
2205 /* Line 1270 of yacc.c.  */ 
2206 #line 402 "parse-gram.y" 
2208       symbol_class_set ((yyvsp
[(1) - (2)].symbol
), current_class
, (yylsp
[(1) - (2)]), true); 
2209       symbol_type_set ((yyvsp
[(1) - (2)].symbol
), current_type
, (yylsp
[(1) - (2)])); 
2210       symbol_make_alias ((yyvsp
[(1) - (2)].symbol
), (yyvsp
[(2) - (2)].symbol
), (yyloc
)); 
2215 /* Line 1270 of yacc.c.  */ 
2216 #line 408 "parse-gram.y" 
2218       symbol_class_set ((yyvsp
[(1) - (3)].symbol
), current_class
, (yylsp
[(1) - (3)]), true); 
2219       symbol_type_set ((yyvsp
[(1) - (3)].symbol
), current_type
, (yylsp
[(1) - (3)])); 
2220       symbol_user_token_number_set ((yyvsp
[(1) - (3)].symbol
), (yyvsp
[(2) - (3)].integer
), (yylsp
[(2) - (3)])); 
2221       symbol_make_alias ((yyvsp
[(1) - (3)].symbol
), (yyvsp
[(3) - (3)].symbol
), (yyloc
)); 
2226 /* Line 1270 of yacc.c.  */ 
2227 #line 438 "parse-gram.y" 
2234 /* Line 1270 of yacc.c.  */ 
2235 #line 444 "parse-gram.y" 
2236     { current_lhs 
= (yyvsp
[(1) - (1)].symbol
); current_lhs_location 
= (yylsp
[(1) - (1)]); } 
2240 /* Line 1270 of yacc.c.  */ 
2241 #line 448 "parse-gram.y" 
2242     { grammar_current_rule_end ((yylsp
[(1) - (1)])); } 
2246 /* Line 1270 of yacc.c.  */ 
2247 #line 449 "parse-gram.y" 
2248     { grammar_current_rule_end ((yylsp
[(3) - (3)])); } 
2252 /* Line 1270 of yacc.c.  */ 
2253 #line 455 "parse-gram.y" 
2254     { grammar_current_rule_begin (current_lhs
, current_lhs_location
); } 
2258 /* Line 1270 of yacc.c.  */ 
2259 #line 457 "parse-gram.y" 
2260     { grammar_current_rule_symbol_append ((yyvsp
[(2) - (2)].symbol
), (yylsp
[(2) - (2)])); } 
2264 /* Line 1270 of yacc.c.  */ 
2265 #line 459 "parse-gram.y" 
2266     { grammar_current_rule_action_append ((yyvsp
[(2) - (2)].chars
), (yylsp
[(2) - (2)])); } 
2270 /* Line 1270 of yacc.c.  */ 
2271 #line 461 "parse-gram.y" 
2272     { grammar_current_rule_prec_set ((yyvsp
[(3) - (3)].symbol
), (yylsp
[(3) - (3)])); } 
2276 /* Line 1270 of yacc.c.  */ 
2277 #line 463 "parse-gram.y" 
2278     { grammar_current_rule_dprec_set ((yyvsp
[(3) - (3)].integer
), (yylsp
[(3) - (3)])); } 
2282 /* Line 1270 of yacc.c.  */ 
2283 #line 465 "parse-gram.y" 
2284     { grammar_current_rule_merge_set ((yyvsp
[(3) - (3)].uniqstr
), (yylsp
[(3) - (3)])); } 
2288 /* Line 1270 of yacc.c.  */ 
2289 #line 481 "parse-gram.y" 
2291       static char one
[] = "1"; 
2292       (yyval
.chars
) = one
; 
2297 /* Line 1270 of yacc.c.  */ 
2298 #line 491 "parse-gram.y" 
2300       (yyvsp
[(1) - (1)].chars
)[strlen ((yyvsp
[(1) - (1)].chars
)) - 1] = '\n'; 
2301       (yyval
.chars
) = translate_code ((yyvsp
[(1) - (1)].chars
) + 1, (yylsp
[(1) - (1)])); 
2306 /* Line 1270 of yacc.c.  */ 
2307 #line 507 "parse-gram.y" 
2308     { (yyval
.symbol
) = symbol_from_uniqstr ((yyvsp
[(1) - (1)].uniqstr
), (yylsp
[(1) - (1)])); } 
2312 /* Line 1270 of yacc.c.  */ 
2313 #line 509 "parse-gram.y" 
2315       (yyval
.symbol
) = symbol_get (char_name ((yyvsp
[(1) - (1)].character
)), (yylsp
[(1) - (1)])); 
2316       symbol_class_set ((yyval
.symbol
), token_sym
, (yylsp
[(1) - (1)]), false); 
2317       symbol_user_token_number_set ((yyval
.symbol
), (yyvsp
[(1) - (1)].character
), (yylsp
[(1) - (1)])); 
2322 /* Line 1270 of yacc.c.  */ 
2323 #line 517 "parse-gram.y" 
2324     { (yyval
.symbol
) = symbol_from_uniqstr ((yyvsp
[(1) - (1)].uniqstr
), (yylsp
[(1) - (1)])); } 
2328 /* Line 1270 of yacc.c.  */ 
2329 #line 529 "parse-gram.y" 
2331       (yyval
.symbol
) = symbol_get (quotearg_style (c_quoting_style
, (yyvsp
[(1) - (1)].chars
)), (yylsp
[(1) - (1)])); 
2332       symbol_class_set ((yyval
.symbol
), token_sym
, (yylsp
[(1) - (1)]), false); 
2337 /* Line 1270 of yacc.c.  */ 
2338 #line 538 "parse-gram.y" 
2340       muscle_code_grow ("epilogue", translate_code ((yyvsp
[(2) - (2)].chars
), (yylsp
[(2) - (2)])), (yylsp
[(2) - (2)])); 
2341       gram_scanner_last_string_free (); 
2346 /* Line 1270 of yacc.c.  */ 
2347 #line 2348 "parse-gram.c" 
2350   YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
); 
2354   YY_STACK_PRINT (yyss
, yyssp
); 
2359   /* Now `shift' the result of the reduction.  Determine what state 
2360      that goes to, based on the state we popped back to and the rule 
2361      number reduced by.  */ 
2365   yystate 
= yypgoto
[yyn 
- YYNTOKENS
] + *yyssp
; 
2366   if (0 <= yystate 
&& yystate 
<= YYLAST 
&& yycheck
[yystate
] == *yyssp
) 
2367     yystate 
= yytable
[yystate
]; 
2369     yystate 
= yydefgoto
[yyn 
- YYNTOKENS
]; 
2374 /*------------------------------------. 
2375 | yyerrlab -- here on detecting error | 
2376 `------------------------------------*/ 
2378   /* If not already recovering from an error, report this error.  */ 
2382 #if ! YYERROR_VERBOSE 
2383       yyerror (YY_("syntax error")); 
2386         YYSIZE_T yysize 
= yysyntax_error (0, yystate
, yychar
); 
2387         if (yymsg_alloc 
< yysize 
&& yymsg_alloc 
< YYSTACK_ALLOC_MAXIMUM
) 
2389             YYSIZE_T yyalloc 
= 2 * yysize
; 
2390             if (! (yysize 
<= yyalloc 
&& yyalloc 
<= YYSTACK_ALLOC_MAXIMUM
)) 
2391               yyalloc 
= YYSTACK_ALLOC_MAXIMUM
; 
2392             if (yymsg 
!= yymsgbuf
) 
2393               YYSTACK_FREE (yymsg
); 
2394             yymsg 
= (char *) YYSTACK_ALLOC (yyalloc
); 
2396               yymsg_alloc 
= yyalloc
; 
2400                 yymsg_alloc 
= sizeof yymsgbuf
; 
2404         if (0 < yysize 
&& yysize 
<= yymsg_alloc
) 
2406             (void) yysyntax_error (yymsg
, yystate
, yychar
); 
2411             yyerror (YY_("syntax error")); 
2413               goto yyexhaustedlab
; 
2419   yyerror_range
[0] = yylloc
; 
2421   if (yyerrstatus 
== 3) 
2423       /* If just tried and failed to reuse lookahead token after an 
2424          error, discard it.  */ 
2426       if (yychar 
<= YYEOF
) 
2428           /* Return failure if at end of input.  */ 
2429           if (yychar 
== YYEOF
) 
2434           yydestruct ("Error: discarding", 
2435                       yytoken
, &yylval
, &yylloc
); 
2440   /* Else will try to reuse lookahead token after shifting the error 
2445 /*---------------------------------------------------. 
2446 | yyerrorlab -- error raised explicitly by YYERROR.  | 
2447 `---------------------------------------------------*/ 
2450   /* Pacify compilers like GCC when the user code never invokes 
2451      YYERROR and the label yyerrorlab therefore never appears in user 
2453   if (/*CONSTCOND*/ 0) 
2456   yyerror_range
[0] = yylsp
[1-yylen
]; 
2457   /* Do not reclaim the symbols of the rule which action triggered 
2461   YY_STACK_PRINT (yyss
, yyssp
); 
2466 /*-------------------------------------------------------------. 
2467 | yyerrlab1 -- common code for both syntax error and YYERROR.  | 
2468 `-------------------------------------------------------------*/ 
2470   yyerrstatus 
= 3;      /* Each real token shifted decrements this.  */ 
2474       yyn 
= yypact
[yystate
]; 
2475       if (yyn 
!= YYPACT_NINF
) 
2478           if (0 <= yyn 
&& yyn 
<= YYLAST 
&& yycheck
[yyn
] == YYTERROR
) 
2486       /* Pop the current state because it cannot handle the error token.  */ 
2490       yyerror_range
[0] = *yylsp
; 
2491       yydestruct ("Error: popping", 
2492                   yystos
[yystate
], yyvsp
, yylsp
); 
2495       YY_STACK_PRINT (yyss
, yyssp
); 
2503   yyerror_range
[1] = yylloc
; 
2504   /* Using YYLLOC is tempting, but would change the location of 
2505      the lookahead.  YYLOC is available though.  */ 
2506   YYLLOC_DEFAULT (yyloc
, (yyerror_range 
- 1), 2); 
2509   /* Shift the error token.  */ 
2510   YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
); 
2516 /*-------------------------------------. 
2517 | yyacceptlab -- YYACCEPT comes here.  | 
2518 `-------------------------------------*/ 
2523 /*-----------------------------------. 
2524 | yyabortlab -- YYABORT comes here.  | 
2525 `-----------------------------------*/ 
2531 /*-------------------------------------------------. 
2532 | yyexhaustedlab -- memory exhaustion comes here.  | 
2533 `-------------------------------------------------*/ 
2535   yyerror (YY_("memory exhausted")); 
2541   if (yychar 
!= YYEOF 
&& yychar 
!= YYEMPTY
) 
2542      yydestruct ("Cleanup: discarding lookahead", 
2543                  yytoken
, &yylval
, &yylloc
); 
2544   /* Do not reclaim the symbols of the rule which action triggered 
2545      this YYABORT or YYACCEPT.  */ 
2547   YY_STACK_PRINT (yyss
, yyssp
); 
2548   while (yyssp 
!= yyss
) 
2550       yydestruct ("Cleanup: popping", 
2551                   yystos
[*yyssp
], yyvsp
, yylsp
); 
2556     YYSTACK_FREE (yyss
); 
2559   if (yymsg 
!= yymsgbuf
) 
2560     YYSTACK_FREE (yymsg
); 
2562   /* Make sure YYID is used.  */ 
2563   return YYID (yyresult
); 
2567 /* Line 1490 of yacc.c.  */ 
2568 #line 544 "parse-gram.y" 
2572 /* Return the location of the left-hand side of a rule whose 
2573    right-hand side is RHS[1] ... RHS[N].  Ignore empty nonterminals in 
2574    the right-hand side, and return an empty location equal to the end 
2575    boundary of RHS[0] if the right-hand side is empty.  */ 
2578 lloc_default (YYLTYPE 
const *rhs
, int n
) 
2583   /* SGI MIPSpro 7.4.1m miscompiles "loc.start = loc.end = rhs[n].end;". 
2584      The bug is fixed in 7.4.2m, but play it safe for now.  */ 
2585   loc
.start 
= rhs
[n
].end
; 
2586   loc
.end 
= rhs
[n
].end
; 
2588   /* Ignore empty nonterminals the start of the the right-hand side. 
2589      Do not bother to ignore them at the end of the right-hand side, 
2590      since empty nonterminals have the same end as their predecessors.  */ 
2591   for (i 
= 1; i 
<= n
; i
++) 
2592     if (! equal_boundaries (rhs
[i
].start
, rhs
[i
].end
)) 
2594         loc
.start 
= rhs
[i
].start
; 
2602 /* Add a lex-param or a parse-param (depending on TYPE) with 
2603    declaration DECL and location LOC.  */ 
2606 add_param (char const *type
, char *decl
, location loc
) 
2608   static char const alphanum
[26 + 26 + 1 + 10] = 
2609     "abcdefghijklmnopqrstuvwxyz" 
2610     "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 
2613   char const *name_start 
= NULL
; 
2616   /* Stop on last actual character.  */ 
2617   for (p 
= decl
; p
[1]; p
++) 
2619          || ! memchr (alphanum
, p
[-1], sizeof alphanum
)) 
2620         && memchr (alphanum
, p
[0], sizeof alphanum 
- 10)) 
2623   /* Strip the surrounding '{' and '}', and any blanks just inside 
2625   while (*--p 
== ' ' || *p 
== '\t') 
2628   while (*++decl 
== ' ' || *decl 
== '\t') 
2632     complain_at (loc
, _("missing identifier in parameter declaration")); 
2639            memchr (alphanum
, name_start
[name_len
], sizeof alphanum
); 
2643       name 
= xmalloc (name_len 
+ 1); 
2644       memcpy (name
, name_start
, name_len
); 
2645       name
[name_len
] = '\0'; 
2646       muscle_pair_list_grow (type
, decl
, name
); 
2650   gram_scanner_last_string_free (); 
2655 version_check (location 
const *loc
, char const *version
) 
2657   if (strverscmp (version
, PACKAGE_VERSION
) > 0) 
2659       complain_at (*loc
, "require bison %s, but have %s", 
2660                    version
, PACKAGE_VERSION
); 
2666 gram_error (location 
const *loc
, char const *msg
) 
2668   complain_at (*loc
, "%s", msg
); 
2672 token_name (int type
) 
2674   return yytname
[YYTRANSLATE (type
)]; 
2685       buf
[0] = '\''; buf
[1] = c
; buf
[2] = '\''; buf
[3] = '\0'; 
2686       return quotearg_style (escape_quoting_style
, buf
);