X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/381ecb068724f3ae161d7de6bdc8b3ebd402cdb4..b37acfe18c54a04afb3093a145fe99668962889d:/src/parse-gram.c diff --git a/src/parse-gram.c b/src/parse-gram.c index 76abad68..1f4dfbba 100644 --- a/src/parse-gram.c +++ b/src/parse-gram.c @@ -69,6 +69,7 @@ #define yylloc gram_lloc /* Copy the first part of user declarations. */ +/* Line 164 of yacc.c. */ #line 1 "parse-gram.y" /* Bison Grammar Parser -*- C -*- @@ -95,6 +96,8 @@ #include #include "system.h" +#include + #include "complain.h" #include "conflicts.h" #include "files.h" @@ -106,7 +109,6 @@ #include "symlist.h" #include "scan-gram.h" #include "scan-code.h" -#include "strverscmp.h" #define YYLLOC_DEFAULT(Current, Rhs, N) (Current) = lloc_default (Rhs, N) static YYLTYPE lloc_default (YYLTYPE const *, int); @@ -133,18 +135,10 @@ static symbol *current_lhs; static location current_lhs_location; static int current_prec = 0; -#ifdef UINT_FAST8_MAX -# define YYTYPE_UINT8 uint_fast8_t -#endif -#ifdef INT_FAST8_MAX -# define YYTYPE_INT8 int_fast8_t -#endif -#ifdef UINT_FAST16_MAX -# define YYTYPE_UINT16 uint_fast16_t -#endif -#ifdef INT_FAST16_MAX -# define YYTYPE_INT16 int_fast16_t -#endif +#define YYTYPE_INT16 int_fast16_t +#define YYTYPE_INT8 int_fast8_t +#define YYTYPE_UINT16 uint_fast16_t +#define YYTYPE_UINT8 uint_fast8_t /* Enabling traces. */ @@ -229,69 +223,13 @@ static int current_prec = 0; PERCENT_UNION = 311 }; #endif -/* Tokens. */ -#define GRAM_EOF 0 -#define STRING 258 -#define INT 259 -#define PERCENT_TOKEN 260 -#define PERCENT_NTERM 261 -#define PERCENT_TYPE 262 -#define PERCENT_DESTRUCTOR 263 -#define PERCENT_PRINTER 264 -#define PERCENT_LEFT 265 -#define PERCENT_RIGHT 266 -#define PERCENT_NONASSOC 267 -#define PERCENT_PREC 268 -#define PERCENT_DPREC 269 -#define PERCENT_MERGE 270 -#define PERCENT_AFTER_HEADER 271 -#define PERCENT_BEFORE_HEADER 272 -#define PERCENT_DEBUG 273 -#define PERCENT_DEFAULT_PREC 274 -#define PERCENT_DEFINE 275 -#define PERCENT_DEFINES 276 -#define PERCENT_END_HEADER 277 -#define PERCENT_ERROR_VERBOSE 278 -#define PERCENT_EXPECT 279 -#define PERCENT_EXPECT_RR 280 -#define PERCENT_FILE_PREFIX 281 -#define PERCENT_GLR_PARSER 282 -#define PERCENT_INITIAL_ACTION 283 -#define PERCENT_LEX_PARAM 284 -#define PERCENT_LOCATIONS 285 -#define PERCENT_NAME_PREFIX 286 -#define PERCENT_NO_DEFAULT_PREC 287 -#define PERCENT_NO_LINES 288 -#define PERCENT_NONDETERMINISTIC_PARSER 289 -#define PERCENT_OUTPUT 290 -#define PERCENT_PARSE_PARAM 291 -#define PERCENT_PURE_PARSER 292 -#define PERCENT_REQUIRE 293 -#define PERCENT_SKELETON 294 -#define PERCENT_START 295 -#define PERCENT_START_HEADER 296 -#define PERCENT_TOKEN_TABLE 297 -#define PERCENT_VERBOSE 298 -#define PERCENT_YACC 299 -#define BRACED_CODE 300 -#define CHAR 301 -#define EPILOGUE 302 -#define EQUAL 303 -#define ID 304 -#define ID_COLON 305 -#define PERCENT_PERCENT 306 -#define PIPE 307 -#define PROLOGUE 308 -#define SEMICOLON 309 -#define TYPE 310 -#define PERCENT_UNION 311 - #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE -#line 97 "parse-gram.y" +/* Line 195 of yacc.c. */ +#line 90 "parse-gram.y" { symbol *symbol; symbol_list *list; @@ -301,8 +239,8 @@ typedef union YYSTYPE uniqstr uniqstr; unsigned char character; } -/* Line 197 of yacc.c. */ -#line 306 "parse-gram.c" +/* Line 195 of yacc.c. */ +#line 244 "parse-gram.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 @@ -325,9 +263,8 @@ typedef struct YYLTYPE /* Copy the second part of user declarations. */ - -/* Line __line__ of yacc.c. */ -#line 331 "parse-gram.c" +/* Line 219 of yacc.c. */ +#line 268 "parse-gram.c" #ifdef short # undef short @@ -402,14 +339,14 @@ typedef short int yytype_int16; #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int -YYID (int i) +YYID (int yyi) #else static int -YYID (i) - int i; +YYID (yyi) + int yyi; #endif { - return i; + return yyi; } #endif @@ -647,15 +584,15 @@ static const yytype_int8 yyrhs[] = /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 202, 202, 210, 212, 216, 217, 221, 227, 233, - 234, 239, 240, 241, 247, 248, 249, 250, 251, 256, - 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, - 270, 276, 277, 278, 279, 283, 284, 285, 289, 297, - 305, 309, 323, 324, 328, 350, 350, 355, 355, 360, - 370, 385, 386, 387, 391, 392, 397, 398, 403, 407, - 412, 418, 424, 435, 436, 445, 446, 452, 453, 454, - 461, 461, 465, 466, 467, 472, 473, 475, 477, 479, - 481, 494, 496, 505, 510, 511, 516, 525, 530, 532 + 0, 195, 195, 203, 205, 209, 210, 214, 220, 226, + 227, 232, 233, 234, 240, 241, 242, 243, 244, 249, + 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, + 263, 269, 270, 271, 272, 276, 277, 278, 282, 290, + 298, 302, 316, 317, 321, 343, 343, 348, 348, 353, + 363, 378, 379, 380, 384, 385, 390, 391, 396, 400, + 405, 411, 417, 428, 429, 438, 439, 445, 446, 447, + 454, 454, 458, 459, 460, 465, 466, 468, 470, 472, + 474, 487, 489, 498, 503, 504, 509, 518, 523, 525 }; #endif @@ -1003,74 +940,102 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) switch (yytype) { case 3: /* "\"string\"" */ -#line 181 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 174 "parse-gram.y" { fputs (quotearg_style (c_quoting_style, (yyvaluep->chars)), stderr); }; -#line 1009 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 948 "parse-gram.c" break; case 4: /* "\"integer\"" */ -#line 191 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 184 "parse-gram.y" { fprintf (stderr, "%d", (yyvaluep->integer)); }; -#line 1014 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 955 "parse-gram.c" break; case 45: /* "\"{...}\"" */ -#line 183 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 176 "parse-gram.y" { fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); }; -#line 1019 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 962 "parse-gram.c" break; case 46: /* "\"char\"" */ -#line 178 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 171 "parse-gram.y" { fputs (char_name ((yyvaluep->character)), stderr); }; -#line 1024 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 969 "parse-gram.c" break; case 47: /* "\"epilogue\"" */ -#line 183 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 176 "parse-gram.y" { fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); }; -#line 1029 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 976 "parse-gram.c" break; case 49: /* "\"identifier\"" */ -#line 187 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 180 "parse-gram.y" { fputs ((yyvaluep->uniqstr), stderr); }; -#line 1034 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 983 "parse-gram.c" break; case 50: /* "\"identifier:\"" */ -#line 188 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 181 "parse-gram.y" { fprintf (stderr, "%s:", (yyvaluep->uniqstr)); }; -#line 1039 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 990 "parse-gram.c" break; case 53: /* "\"%{...%}\"" */ -#line 183 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 176 "parse-gram.y" { fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); }; -#line 1044 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 997 "parse-gram.c" break; case 55: /* "\"type\"" */ -#line 186 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 179 "parse-gram.y" { fprintf (stderr, "<%s>", (yyvaluep->uniqstr)); }; -#line 1049 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 1004 "parse-gram.c" break; case 78: /* "id" */ -#line 194 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 187 "parse-gram.y" { fprintf (stderr, "%s", (yyvaluep->symbol)->tag); }; -#line 1054 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 1011 "parse-gram.c" break; case 79: /* "id_colon" */ -#line 195 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 188 "parse-gram.y" { fprintf (stderr, "%s:", (yyvaluep->symbol)->tag); }; -#line 1059 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 1018 "parse-gram.c" break; case 80: /* "symbol" */ -#line 194 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 187 "parse-gram.y" { fprintf (stderr, "%s", (yyvaluep->symbol)->tag); }; -#line 1064 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 1025 "parse-gram.c" break; case 81: /* "string_as_id" */ -#line 194 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 187 "parse-gram.y" { fprintf (stderr, "%s", (yyvaluep->symbol)->tag); }; -#line 1069 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 1032 "parse-gram.c" break; case 82: /* "string_content" */ -#line 181 "parse-gram.y" +/* Line 668 of yacc.c. */ +#line 174 "parse-gram.y" { fputs (quotearg_style (c_quoting_style, (yyvaluep->chars)), stderr); }; -#line 1074 "parse-gram.c" +/* Line 668 of yacc.c. */ +#line 1039 "parse-gram.c" break; default: break; @@ -1114,17 +1079,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } @@ -1575,20 +1543,21 @@ YYLTYPE yylloc; #if YYLTYPE_IS_TRIVIAL /* Initialize the default location before parsing starts. */ yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 0; + yylloc.first_column = yylloc.last_column = 1; #endif /* User initialization code. */ -#line 88 "parse-gram.y" + /* Line 1080 of yacc.c. */ +#line 81 "parse-gram.y" { /* Bison's grammar can initial empty locations, hence a default location is needed. */ - boundary_set (&yylloc.start, current_file, 1, 0); - boundary_set (&yylloc.end, current_file, 1, 0); + boundary_set (&yylloc.start, current_file, 1, 1); + boundary_set (&yylloc.end, current_file, 1, 1); } -/* Line 1085 of yacc.c. */ -#line 1592 "parse-gram.c" +/* Line 1080 of yacc.c. */ +#line 1561 "parse-gram.c" yylsp[0] = yylloc; goto yysetstate; @@ -1773,14 +1742,16 @@ yyreduce: switch (yyn) { case 6: -#line 218 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 211 "parse-gram.y" { prologue_augment (translate_code ((yyvsp[(1) - (1)].chars), (yylsp[(1) - (1)])), (yylsp[(1) - (1)]), typed); } break; case 7: -#line 222 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 215 "parse-gram.y" { /* Remove the '{', and replace the '}' with '\n'. */ (yyvsp[(2) - (2)].chars)[strlen ((yyvsp[(2) - (2)].chars)) - 1] = '\n'; @@ -1789,7 +1760,8 @@ yyreduce: break; case 8: -#line 228 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 221 "parse-gram.y" { /* Remove the '{', and replace the '}' with '\n'. */ (yyvsp[(2) - (2)].chars)[strlen ((yyvsp[(2) - (2)].chars)) - 1] = '\n'; @@ -1798,12 +1770,14 @@ yyreduce: break; case 9: -#line 233 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 226 "parse-gram.y" { debug_flag = true; } break; case 10: -#line 235 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 228 "parse-gram.y" { static char one[] = "1"; muscle_insert ((yyvsp[(2) - (2)].chars), one); @@ -1811,17 +1785,20 @@ yyreduce: break; case 11: -#line 239 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 232 "parse-gram.y" { muscle_insert ((yyvsp[(2) - (3)].chars), (yyvsp[(3) - (3)].chars)); } break; case 12: -#line 240 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 233 "parse-gram.y" { defines_flag = true; } break; case 13: -#line 242 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 235 "parse-gram.y" { /* Remove the '{', and replace the '}' with '\n'. */ (yyvsp[(2) - (2)].chars)[strlen ((yyvsp[(2) - (2)].chars)) - 1] = '\n'; @@ -1830,27 +1807,32 @@ yyreduce: break; case 14: -#line 247 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 240 "parse-gram.y" { error_verbose = true; } break; case 15: -#line 248 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 241 "parse-gram.y" { expected_sr_conflicts = (yyvsp[(2) - (2)].integer); } break; case 16: -#line 249 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 242 "parse-gram.y" { expected_rr_conflicts = (yyvsp[(2) - (2)].integer); } break; case 17: -#line 250 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 243 "parse-gram.y" { spec_file_prefix = (yyvsp[(3) - (3)].chars); } break; case 18: -#line 252 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 245 "parse-gram.y" { nondeterministic_parser = true; glr_parser = true; @@ -1858,64 +1840,76 @@ yyreduce: break; case 19: -#line 257 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 250 "parse-gram.y" { muscle_code_grow ("initial_action", translate_symbol_action ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)])); } break; case 20: -#line 260 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 253 "parse-gram.y" { add_param ("lex_param", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); } break; case 21: -#line 261 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 254 "parse-gram.y" { locations_flag = true; } break; case 22: -#line 262 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 255 "parse-gram.y" { spec_name_prefix = (yyvsp[(3) - (3)].chars); } break; case 23: -#line 263 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 256 "parse-gram.y" { no_lines_flag = true; } break; case 24: -#line 264 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 257 "parse-gram.y" { nondeterministic_parser = true; } break; case 25: -#line 265 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 258 "parse-gram.y" { spec_outfile = (yyvsp[(3) - (3)].chars); } break; case 26: -#line 266 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 259 "parse-gram.y" { add_param ("parse_param", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); } break; case 27: -#line 267 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 260 "parse-gram.y" { pure_parser = true; } break; case 28: -#line 268 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 261 "parse-gram.y" { version_check (&(yylsp[(2) - (2)]), (yyvsp[(2) - (2)].chars)); } break; case 29: -#line 269 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 262 "parse-gram.y" { skeleton = (yyvsp[(2) - (2)].chars); } break; case 30: -#line 271 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 264 "parse-gram.y" { /* Remove the '{', and replace the '}' with '\n'. */ (yyvsp[(2) - (2)].chars)[strlen ((yyvsp[(2) - (2)].chars)) - 1] = '\n'; @@ -1924,29 +1918,34 @@ yyreduce: break; case 31: -#line 276 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 269 "parse-gram.y" { token_table_flag = true; } break; case 32: -#line 277 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 270 "parse-gram.y" { report_flag = report_states; } break; case 33: -#line 278 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 271 "parse-gram.y" { yacc_flag = true; } break; case 37: -#line 286 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 279 "parse-gram.y" { grammar_start_symbol_set ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)])); } break; case 38: -#line 290 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 283 "parse-gram.y" { symbol_list *list; const char *action = translate_symbol_action ((yyvsp[(2) - (3)].chars), (yylsp[(2) - (3)])); @@ -1957,7 +1956,8 @@ yyreduce: break; case 39: -#line 298 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 291 "parse-gram.y" { symbol_list *list; const char *action = translate_symbol_action ((yyvsp[(2) - (3)].chars), (yylsp[(2) - (3)])); @@ -1968,31 +1968,36 @@ yyreduce: break; case 40: -#line 306 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 299 "parse-gram.y" { default_prec = true; } break; case 41: -#line 310 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 303 "parse-gram.y" { default_prec = false; } break; case 42: -#line 323 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 316 "parse-gram.y" {} break; case 43: -#line 324 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 317 "parse-gram.y" { muscle_code_grow ("union_name", (yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); } break; case 44: -#line 329 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 322 "parse-gram.y" { char const *body = (yyvsp[(3) - (3)].chars); @@ -2011,12 +2016,14 @@ yyreduce: break; case 45: -#line 350 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 343 "parse-gram.y" { current_class = nterm_sym; } break; case 46: -#line 351 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 344 "parse-gram.y" { current_class = unknown_sym; current_type = NULL; @@ -2024,12 +2031,14 @@ yyreduce: break; case 47: -#line 355 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 348 "parse-gram.y" { current_class = token_sym; } break; case 48: -#line 356 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 349 "parse-gram.y" { current_class = unknown_sym; current_type = NULL; @@ -2037,7 +2046,8 @@ yyreduce: break; case 49: -#line 361 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 354 "parse-gram.y" { symbol_list *list; for (list = (yyvsp[(3) - (3)].list); list; list = list->next) @@ -2047,7 +2057,8 @@ yyreduce: break; case 50: -#line 371 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 364 "parse-gram.y" { symbol_list *list; ++current_prec; @@ -2062,49 +2073,58 @@ yyreduce: break; case 51: -#line 385 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 378 "parse-gram.y" { (yyval.assoc) = left_assoc; } break; case 52: -#line 386 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 379 "parse-gram.y" { (yyval.assoc) = right_assoc; } break; case 53: -#line 387 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 380 "parse-gram.y" { (yyval.assoc) = non_assoc; } break; case 54: -#line 391 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 384 "parse-gram.y" { current_type = NULL; } break; case 55: -#line 392 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 385 "parse-gram.y" { current_type = (yyvsp[(1) - (1)].uniqstr); } break; case 56: -#line 397 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 390 "parse-gram.y" { (yyval.list) = symbol_list_new ((yyvsp[(1) - (1)].symbol), (yylsp[(1) - (1)])); } break; case 57: -#line 398 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 391 "parse-gram.y" { (yyval.list) = symbol_list_prepend ((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)])); } break; case 58: -#line 404 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 397 "parse-gram.y" { current_type = (yyvsp[(1) - (1)].uniqstr); } break; case 59: -#line 408 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 401 "parse-gram.y" { symbol_class_set ((yyvsp[(1) - (1)].symbol), current_class, (yylsp[(1) - (1)]), true); symbol_type_set ((yyvsp[(1) - (1)].symbol), current_type, (yylsp[(1) - (1)])); @@ -2112,7 +2132,8 @@ yyreduce: break; case 60: -#line 413 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 406 "parse-gram.y" { symbol_class_set ((yyvsp[(1) - (2)].symbol), current_class, (yylsp[(1) - (2)]), true); symbol_type_set ((yyvsp[(1) - (2)].symbol), current_type, (yylsp[(1) - (2)])); @@ -2121,7 +2142,8 @@ yyreduce: break; case 61: -#line 419 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 412 "parse-gram.y" { symbol_class_set ((yyvsp[(1) - (2)].symbol), current_class, (yylsp[(1) - (2)]), true); symbol_type_set ((yyvsp[(1) - (2)].symbol), current_type, (yylsp[(1) - (2)])); @@ -2130,7 +2152,8 @@ yyreduce: break; case 62: -#line 425 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 418 "parse-gram.y" { symbol_class_set ((yyvsp[(1) - (3)].symbol), current_class, (yylsp[(1) - (3)]), true); symbol_type_set ((yyvsp[(1) - (3)].symbol), current_type, (yylsp[(1) - (3)])); @@ -2140,64 +2163,76 @@ yyreduce: break; case 69: -#line 455 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 448 "parse-gram.y" { yyerrok; } break; case 70: -#line 461 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 454 "parse-gram.y" { current_lhs = (yyvsp[(1) - (1)].symbol); current_lhs_location = (yylsp[(1) - (1)]); } break; case 72: -#line 465 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 458 "parse-gram.y" { grammar_current_rule_end ((yylsp[(1) - (1)])); } break; case 73: -#line 466 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 459 "parse-gram.y" { grammar_current_rule_end ((yylsp[(3) - (3)])); } break; case 75: -#line 472 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 465 "parse-gram.y" { grammar_current_rule_begin (current_lhs, current_lhs_location); } break; case 76: -#line 474 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 467 "parse-gram.y" { grammar_current_rule_symbol_append ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)])); } break; case 77: -#line 476 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 469 "parse-gram.y" { grammar_current_rule_action_append ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); } break; case 78: -#line 478 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 471 "parse-gram.y" { grammar_current_rule_prec_set ((yyvsp[(3) - (3)].symbol), (yylsp[(3) - (3)])); } break; case 79: -#line 480 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 473 "parse-gram.y" { grammar_current_rule_dprec_set ((yyvsp[(3) - (3)].integer), (yylsp[(3) - (3)])); } break; case 80: -#line 482 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 475 "parse-gram.y" { grammar_current_rule_merge_set ((yyvsp[(3) - (3)].uniqstr), (yylsp[(3) - (3)])); } break; case 81: -#line 495 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 488 "parse-gram.y" { (yyval.symbol) = symbol_from_uniqstr ((yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); } break; case 82: -#line 497 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 490 "parse-gram.y" { (yyval.symbol) = symbol_get (char_name ((yyvsp[(1) - (1)].character)), (yylsp[(1) - (1)])); symbol_class_set ((yyval.symbol), token_sym, (yylsp[(1) - (1)]), false); @@ -2206,12 +2241,14 @@ yyreduce: break; case 83: -#line 505 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 498 "parse-gram.y" { (yyval.symbol) = symbol_from_uniqstr ((yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); } break; case 86: -#line 517 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 510 "parse-gram.y" { (yyval.symbol) = symbol_get (quotearg_style (c_quoting_style, (yyvsp[(1) - (1)].chars)), (yylsp[(1) - (1)])); symbol_class_set ((yyval.symbol), token_sym, (yylsp[(1) - (1)]), false); @@ -2219,12 +2256,14 @@ yyreduce: break; case 87: -#line 526 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 519 "parse-gram.y" { (yyval.chars) = (yyvsp[(1) - (1)].chars); } break; case 89: -#line 533 "parse-gram.y" +/* Line 1268 of yacc.c. */ +#line 526 "parse-gram.y" { muscle_code_grow ("epilogue", translate_code ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)])); gram_scanner_last_string_free (); @@ -2232,8 +2271,8 @@ yyreduce: break; -/* Line 1274 of yacc.c. */ -#line 2237 "parse-gram.c" +/* Line 1268 of yacc.c. */ +#line 2276 "parse-gram.c" default: break; } YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); @@ -2453,7 +2492,8 @@ yyreturn: } -#line 539 "parse-gram.y" +/* Line 1488 of yacc.c. */ +#line 532 "parse-gram.y"