* data/c.m4 (b4_safest_int_type): New macro.
* data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
a signed int type, cast it to b4_safest_int_type first.
* data/yacc.c: Likewise.
(b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
also overwritten.
+2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
+
+ Suppress signed/unsigned comparison warnings for yycheck.
+ * data/c.m4 (b4_safest_int_type): New macro.
+ * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
+ a signed int type, cast it to b4_safest_int_type first.
+ * data/yacc.c: Likewise.
+ (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
+ also overwritten.
+
2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
* doc/bison.texinfo: Fix some typos.
2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
* doc/bison.texinfo: Fix some typos.
+# b4_safest_int_type
+# ------------------
+# The safest int type to cast to when it's necessary to compare a signed int
+# type against an int type set by b4_int_type.
+m4_define([b4_safest_int_type],[int])
# b4_int_type_for(NAME)
# ---------------------
# b4_int_type_for(NAME)
# ---------------------
int* yyaction, const short int** yyconflicts)
{
int yyindex = yypact[yystate] + yytoken;
int* yyaction, const short int** yyconflicts)
{
int yyindex = yypact[yystate] + yytoken;
- if (yyindex < 0 || YYLAST < yyindex || yycheck[yyindex] != yytoken)
+ if (yyindex < 0 || YYLAST < yyindex
+ || (]b4_safest_int_type[)yycheck[yyindex] != yytoken)
{
*yyaction = -yydefact[yystate];
*yyconflicts = yyconfl;
{
*yyaction = -yydefact[yystate];
*yyconflicts = yyconfl;
{
int yyr;
yyr = yypgoto[yylhs - YYNTOKENS] + yystate;
{
int yyr;
yyr = yypgoto[yylhs - YYNTOKENS] + yystate;
- if (0 <= yyr && yyr <= YYLAST && yycheck[yyr] == yystate)
+ if (0 <= yyr && yyr <= YYLAST
+ && (]b4_safest_int_type[)yycheck[yyr] == yystate)
return yytable[yyr];
else
return yydefgoto[yylhs - YYNTOKENS];
return yytable[yyr];
else
return yydefgoto[yylhs - YYNTOKENS];
yyfmt = yystpcpy (yyformat, yyunexpected);
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
yyfmt = yystpcpy (yyformat, yyunexpected);
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ if ((]b4_safest_int_type[)yycheck[yyx + yyn] == yyx
+ && yyx != YYTERROR)
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
if (yyis_pact_ninf (yyj))
return;
yyj += yytoken;
if (yyis_pact_ninf (yyj))
return;
yyj += yytoken;
- if (yyj < 0 || YYLAST < yyj || yycheck[yyj] != yytoken)
+ if (yyj < 0 || YYLAST < yyj
+ || (]b4_safest_int_type[)yycheck[yyj] != yytoken)
{
if (yydefact[yystackp->yytops.yystates[0]->yylrState] != 0)
return;
{
if (yydefact[yystackp->yytops.yystates[0]->yylrState] != 0)
return;
/* If the proper action on seeing token YYTOKEN is to reduce or to
detect an error, take that action. */
yyn += yytoken;
/* If the proper action on seeing token YYTOKEN is to reduce or to
detect an error, take that action. */
yyn += yytoken;
- if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
+ if (yyn < 0 || yylast_ < yyn
+ || (]b4_safest_int_type[)yycheck_[yyn] != yytoken)
goto yydefault;
/* Reduce or error. */
goto yydefault;
/* Reduce or error. */
yyn = yyr1_[yyn];
yystate = yypgoto_[yyn - yyntokens_] + yystate_stack_[0];
if (0 <= yystate && yystate <= yylast_
yyn = yyr1_[yyn];
yystate = yypgoto_[yyn - yyntokens_] + yystate_stack_[0];
if (0 <= yystate && yystate <= yylast_
- && yycheck_[yystate] == yystate_stack_[0])
+ && (]b4_safest_int_type[)yycheck_[yystate] == yystate_stack_[0])
yystate = yytable_[yystate];
else
yystate = yydefgoto_[yyn - yyntokens_];
yystate = yytable_[yystate];
else
yystate = yydefgoto_[yyn - yyntokens_];
if (yyn != yypact_ninf_)
{
yyn += yyterror_;
if (yyn != yypact_ninf_)
{
yyn += yyterror_;
- if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
+ if (0 <= yyn && yyn <= yylast_
+ && (]b4_safest_int_type[)yycheck_[yyn] == yyterror_)
{
yyn = yytable_[yyn];
if (0 < yyn)
{
yyn = yytable_[yyn];
if (0 < yyn)
int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
int count = 0;
for (int x = yyxbegin; x < yyxend; ++x)
int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
int count = 0;
for (int x = yyxbegin; x < yyxend; ++x)
- if (yycheck_[x + yyn] == x && x != yyterror_)
+ if ((]b4_safest_int_type[)yycheck_[x + yyn] == x && x != yyterror_)
++count;
// FIXME: This method of building the message is not compatible
++count;
// FIXME: This method of building the message is not compatible
{
count = 0;
for (int x = yyxbegin; x < yyxend; ++x)
{
count = 0;
for (int x = yyxbegin; x < yyxend; ++x)
- if (yycheck_[x + yyn] == x && x != yyterror_)
+ if ((]b4_safest_int_type[)yycheck_[x + yyn] == x
+ && x != yyterror_)
{
res += (!count++) ? ", expecting " : " or ";
res += yytnamerr_ (yytname_[x]);
{
res += (!count++) ? ", expecting " : " or ";
res += yytnamerr_ (yytname_[x]);
+# b4_safest_int_type
+# ------------------
+# The safest int type to cast to when it's necessary to compare a signed int
+# type against an int type set by b4_int_type. Overwrite the version from
+# c.m4 as a reminder to keep it consistent with overwritten b4_int_type.
+m4_define([b4_safest_int_type],[int])
+
+
+
## ----------------- ##
## Semantic Values. ##
## ----------------- ##
## ----------------- ##
## Semantic Values. ##
## ----------------- ##
yyfmt = yystpcpy (yyformat, yyunexpected);
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
yyfmt = yystpcpy (yyformat, yyunexpected);
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ if ((]b4_safest_int_type[)yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
/* If the proper action on seeing token YYTOKEN is to reduce or to
detect an error, take that action. */
yyn += yytoken;
/* If the proper action on seeing token YYTOKEN is to reduce or to
detect an error, take that action. */
yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ if (yyn < 0 || YYLAST < yyn || (]b4_safest_int_type[)yycheck[yyn] != yytoken)
goto yydefault;
yyn = yytable[yyn];
if (yyn <= 0)
goto yydefault;
yyn = yytable[yyn];
if (yyn <= 0)
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ if (0 <= yystate && yystate <= YYLAST
+ && (]b4_safest_int_type[)yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTOKENS];
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTOKENS];
#define yylloc gram_lloc
/* Copy the first part of user declarations. */
#define yylloc gram_lloc
/* Copy the first part of user declarations. */
-/* Line 164 of yacc.c. */
+/* Line 173 of yacc.c. */
#line 1 "parse-gram.y"
/* Bison Grammar Parser -*- C -*-
#line 1 "parse-gram.y"
/* Bison Grammar Parser -*- C -*-
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-{/* Line 198 of yacc.c. */
+{/* Line 207 of yacc.c. */
#line 97 "parse-gram.y"
symbol *symbol;
#line 97 "parse-gram.y"
symbol *symbol;
uniqstr uniqstr;
unsigned char character;
}
uniqstr uniqstr;
unsigned char character;
}
-/* Line 198 of yacc.c. */
+/* Line 207 of yacc.c. */
#line 308 "parse-gram.c"
YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
#line 308 "parse-gram.c"
YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
/* Copy the second part of user declarations. */
/* Copy the second part of user declarations. */
-/* Line 221 of yacc.c. */
+/* Line 230 of yacc.c. */
#line 332 "parse-gram.c"
#ifdef short
#line 332 "parse-gram.c"
#ifdef short
switch (yytype)
{
case 3: /* "\"string\"" */
switch (yytype)
{
case 3: /* "\"string\"" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 183 "parse-gram.y"
{ fputs (quotearg_style (c_quoting_style, (yyvaluep->chars)), stderr); };
#line 183 "parse-gram.y"
{ fputs (quotearg_style (c_quoting_style, (yyvaluep->chars)), stderr); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1014 "parse-gram.c"
break;
case 4: /* "\"integer\"" */
#line 1014 "parse-gram.c"
break;
case 4: /* "\"integer\"" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 194 "parse-gram.y"
{ fprintf (stderr, "%d", (yyvaluep->integer)); };
#line 194 "parse-gram.y"
{ fprintf (stderr, "%d", (yyvaluep->integer)); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1021 "parse-gram.c"
break;
case 45: /* "\"{...}\"" */
#line 1021 "parse-gram.c"
break;
case 45: /* "\"{...}\"" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 185 "parse-gram.y"
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
#line 185 "parse-gram.y"
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1028 "parse-gram.c"
break;
case 46: /* "\"char\"" */
#line 1028 "parse-gram.c"
break;
case 46: /* "\"char\"" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 178 "parse-gram.y"
{ fputs (char_name ((yyvaluep->character)), stderr); };
#line 178 "parse-gram.y"
{ fputs (char_name ((yyvaluep->character)), stderr); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1035 "parse-gram.c"
break;
case 47: /* "\"epilogue\"" */
#line 1035 "parse-gram.c"
break;
case 47: /* "\"epilogue\"" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 185 "parse-gram.y"
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
#line 185 "parse-gram.y"
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1042 "parse-gram.c"
break;
case 49: /* "\"identifier\"" */
#line 1042 "parse-gram.c"
break;
case 49: /* "\"identifier\"" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 190 "parse-gram.y"
{ fputs ((yyvaluep->uniqstr), stderr); };
#line 190 "parse-gram.y"
{ fputs ((yyvaluep->uniqstr), stderr); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1049 "parse-gram.c"
break;
case 50: /* "\"identifier:\"" */
#line 1049 "parse-gram.c"
break;
case 50: /* "\"identifier:\"" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 191 "parse-gram.y"
{ fprintf (stderr, "%s:", (yyvaluep->uniqstr)); };
#line 191 "parse-gram.y"
{ fprintf (stderr, "%s:", (yyvaluep->uniqstr)); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1056 "parse-gram.c"
break;
case 53: /* "\"%{...%}\"" */
#line 1056 "parse-gram.c"
break;
case 53: /* "\"%{...%}\"" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 185 "parse-gram.y"
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
#line 185 "parse-gram.y"
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1063 "parse-gram.c"
break;
case 55: /* "\"type\"" */
#line 1063 "parse-gram.c"
break;
case 55: /* "\"type\"" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 189 "parse-gram.y"
{ fprintf (stderr, "<%s>", (yyvaluep->uniqstr)); };
#line 189 "parse-gram.y"
{ fprintf (stderr, "<%s>", (yyvaluep->uniqstr)); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1070 "parse-gram.c"
break;
case 78: /* "content" */
#line 1070 "parse-gram.c"
break;
case 78: /* "content" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 185 "parse-gram.y"
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
#line 185 "parse-gram.y"
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1077 "parse-gram.c"
break;
case 79: /* "content.opt" */
#line 1077 "parse-gram.c"
break;
case 79: /* "content.opt" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 185 "parse-gram.y"
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
#line 185 "parse-gram.y"
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1084 "parse-gram.c"
break;
case 80: /* "braceless" */
#line 1084 "parse-gram.c"
break;
case 80: /* "braceless" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 185 "parse-gram.y"
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
#line 185 "parse-gram.y"
{ fprintf (stderr, "{\n%s\n}", (yyvaluep->chars)); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1091 "parse-gram.c"
break;
case 81: /* "id" */
#line 1091 "parse-gram.c"
break;
case 81: /* "id" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 197 "parse-gram.y"
{ fprintf (stderr, "%s", (yyvaluep->symbol)->tag); };
#line 197 "parse-gram.y"
{ fprintf (stderr, "%s", (yyvaluep->symbol)->tag); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1098 "parse-gram.c"
break;
case 82: /* "id_colon" */
#line 1098 "parse-gram.c"
break;
case 82: /* "id_colon" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 198 "parse-gram.y"
{ fprintf (stderr, "%s:", (yyvaluep->symbol)->tag); };
#line 198 "parse-gram.y"
{ fprintf (stderr, "%s:", (yyvaluep->symbol)->tag); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1105 "parse-gram.c"
break;
case 83: /* "symbol" */
#line 1105 "parse-gram.c"
break;
case 83: /* "symbol" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 197 "parse-gram.y"
{ fprintf (stderr, "%s", (yyvaluep->symbol)->tag); };
#line 197 "parse-gram.y"
{ fprintf (stderr, "%s", (yyvaluep->symbol)->tag); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1112 "parse-gram.c"
break;
case 84: /* "string_as_id" */
#line 1112 "parse-gram.c"
break;
case 84: /* "string_as_id" */
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 197 "parse-gram.y"
{ fprintf (stderr, "%s", (yyvaluep->symbol)->tag); };
#line 197 "parse-gram.y"
{ fprintf (stderr, "%s", (yyvaluep->symbol)->tag); };
-/* Line 670 of yacc.c. */
+/* Line 679 of yacc.c. */
#line 1119 "parse-gram.c"
break;
default:
#line 1119 "parse-gram.c"
break;
default:
yyfmt = yystpcpy (yyformat, yyunexpected);
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
yyfmt = yystpcpy (yyformat, yyunexpected);
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ if ((int)yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
/* User initialization code. */
/* User initialization code. */
- /* Line 1082 of yacc.c. */
+ /* Line 1091 of yacc.c. */
#line 88 "parse-gram.y"
{
/* Bison's grammar can initial empty locations, hence a default
#line 88 "parse-gram.y"
{
/* Bison's grammar can initial empty locations, hence a default
boundary_set (&yylloc.start, current_file, 1, 1);
boundary_set (&yylloc.end, current_file, 1, 1);
}
boundary_set (&yylloc.start, current_file, 1, 1);
boundary_set (&yylloc.end, current_file, 1, 1);
}
-/* Line 1082 of yacc.c. */
+/* Line 1091 of yacc.c. */
#line 1641 "parse-gram.c"
yylsp[0] = yylloc;
goto yysetstate;
#line 1641 "parse-gram.c"
yylsp[0] = yylloc;
goto yysetstate;
/* If the proper action on seeing token YYTOKEN is to reduce or to
detect an error, take that action. */
yyn += yytoken;
/* If the proper action on seeing token YYTOKEN is to reduce or to
detect an error, take that action. */
yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ if (yyn < 0 || YYLAST < yyn || (int)yycheck[yyn] != yytoken)
goto yydefault;
yyn = yytable[yyn];
if (yyn <= 0)
goto yydefault;
yyn = yytable[yyn];
if (yyn <= 0)
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 220 "parse-gram.y"
{ prologue_augment (translate_code ((yyvsp[(1) - (1)].chars), (yylsp[(1) - (1)])), (yylsp[(1) - (1)]), union_seen); }
break;
case 7:
#line 220 "parse-gram.y"
{ prologue_augment (translate_code ((yyvsp[(1) - (1)].chars), (yylsp[(1) - (1)])), (yylsp[(1) - (1)]), union_seen); }
break;
case 7:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 221 "parse-gram.y"
{ prologue_augment ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)]), true); }
break;
case 8:
#line 221 "parse-gram.y"
{ prologue_augment ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)]), true); }
break;
case 8:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 222 "parse-gram.y"
{ prologue_augment ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)]), false); }
break;
case 9:
#line 222 "parse-gram.y"
{ prologue_augment ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)]), false); }
break;
case 9:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 223 "parse-gram.y"
{ debug_flag = true; }
break;
case 10:
#line 223 "parse-gram.y"
{ debug_flag = true; }
break;
case 10:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 224 "parse-gram.y"
{ muscle_insert ((yyvsp[(2) - (3)].chars), (yyvsp[(3) - (3)].chars)); }
break;
case 11:
#line 224 "parse-gram.y"
{ muscle_insert ((yyvsp[(2) - (3)].chars), (yyvsp[(3) - (3)].chars)); }
break;
case 11:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 225 "parse-gram.y"
{ defines_flag = true; }
break;
case 12:
#line 225 "parse-gram.y"
{ defines_flag = true; }
break;
case 12:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 226 "parse-gram.y"
{ muscle_code_grow ("end_header", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
break;
case 13:
#line 226 "parse-gram.y"
{ muscle_code_grow ("end_header", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
break;
case 13:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 227 "parse-gram.y"
{ error_verbose = true; }
break;
case 14:
#line 227 "parse-gram.y"
{ error_verbose = true; }
break;
case 14:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 228 "parse-gram.y"
{ expected_sr_conflicts = (yyvsp[(2) - (2)].integer); }
break;
case 15:
#line 228 "parse-gram.y"
{ expected_sr_conflicts = (yyvsp[(2) - (2)].integer); }
break;
case 15:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 229 "parse-gram.y"
{ expected_rr_conflicts = (yyvsp[(2) - (2)].integer); }
break;
case 16:
#line 229 "parse-gram.y"
{ expected_rr_conflicts = (yyvsp[(2) - (2)].integer); }
break;
case 16:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 230 "parse-gram.y"
{ spec_file_prefix = (yyvsp[(3) - (3)].chars); }
break;
case 17:
#line 230 "parse-gram.y"
{ spec_file_prefix = (yyvsp[(3) - (3)].chars); }
break;
case 17:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 232 "parse-gram.y"
{
nondeterministic_parser = true;
#line 232 "parse-gram.y"
{
nondeterministic_parser = true;
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 237 "parse-gram.y"
{
muscle_code_grow ("initial_action", translate_symbol_action ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)]));
#line 237 "parse-gram.y"
{
muscle_code_grow ("initial_action", translate_symbol_action ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)]));
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 240 "parse-gram.y"
{ add_param ("lex_param", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
break;
case 20:
#line 240 "parse-gram.y"
{ add_param ("lex_param", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
break;
case 20:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 241 "parse-gram.y"
{ locations_flag = true; }
break;
case 21:
#line 241 "parse-gram.y"
{ locations_flag = true; }
break;
case 21:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 242 "parse-gram.y"
{ spec_name_prefix = (yyvsp[(3) - (3)].chars); }
break;
case 22:
#line 242 "parse-gram.y"
{ spec_name_prefix = (yyvsp[(3) - (3)].chars); }
break;
case 22:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 243 "parse-gram.y"
{ no_lines_flag = true; }
break;
case 23:
#line 243 "parse-gram.y"
{ no_lines_flag = true; }
break;
case 23:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 244 "parse-gram.y"
{ nondeterministic_parser = true; }
break;
case 24:
#line 244 "parse-gram.y"
{ nondeterministic_parser = true; }
break;
case 24:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 245 "parse-gram.y"
{ spec_outfile = (yyvsp[(3) - (3)].chars); }
break;
case 25:
#line 245 "parse-gram.y"
{ spec_outfile = (yyvsp[(3) - (3)].chars); }
break;
case 25:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 246 "parse-gram.y"
{ add_param ("parse_param", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
break;
case 26:
#line 246 "parse-gram.y"
{ add_param ("parse_param", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
break;
case 26:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 247 "parse-gram.y"
{ pure_parser = true; }
break;
case 27:
#line 247 "parse-gram.y"
{ pure_parser = true; }
break;
case 27:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 248 "parse-gram.y"
{ version_check (&(yylsp[(2) - (2)]), (yyvsp[(2) - (2)].chars)); }
break;
case 28:
#line 248 "parse-gram.y"
{ version_check (&(yylsp[(2) - (2)]), (yyvsp[(2) - (2)].chars)); }
break;
case 28:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 249 "parse-gram.y"
{ skeleton = (yyvsp[(2) - (2)].chars); }
break;
case 29:
#line 249 "parse-gram.y"
{ skeleton = (yyvsp[(2) - (2)].chars); }
break;
case 29:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 250 "parse-gram.y"
{ muscle_code_grow ("start_header", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
break;
case 30:
#line 250 "parse-gram.y"
{ muscle_code_grow ("start_header", (yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
break;
case 30:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 251 "parse-gram.y"
{ token_table_flag = true; }
break;
case 31:
#line 251 "parse-gram.y"
{ token_table_flag = true; }
break;
case 31:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 252 "parse-gram.y"
{ report_flag = report_states; }
break;
case 32:
#line 252 "parse-gram.y"
{ report_flag = report_states; }
break;
case 32:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 253 "parse-gram.y"
{ yacc_flag = true; }
break;
case 36:
#line 253 "parse-gram.y"
{ yacc_flag = true; }
break;
case 36:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 261 "parse-gram.y"
{
grammar_start_symbol_set ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)]));
#line 261 "parse-gram.y"
{
grammar_start_symbol_set ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)]));
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 265 "parse-gram.y"
{
default_destructor_set (translate_symbol_action ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)]));
#line 265 "parse-gram.y"
{
default_destructor_set (translate_symbol_action ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)]));
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 269 "parse-gram.y"
{
symbol_list *list;
#line 269 "parse-gram.y"
{
symbol_list *list;
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 277 "parse-gram.y"
{
symbol_list *list;
#line 277 "parse-gram.y"
{
symbol_list *list;
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 285 "parse-gram.y"
{
default_printer_set (translate_symbol_action ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)]));
#line 285 "parse-gram.y"
{
default_printer_set (translate_symbol_action ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)]));
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 289 "parse-gram.y"
{
default_prec = true;
#line 289 "parse-gram.y"
{
default_prec = true;
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 293 "parse-gram.y"
{
default_prec = false;
#line 293 "parse-gram.y"
{
default_prec = false;
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 306 "parse-gram.y"
{}
break;
case 44:
#line 306 "parse-gram.y"
{}
break;
case 44:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 307 "parse-gram.y"
{ muscle_code_grow ("union_name", (yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
break;
case 45:
#line 307 "parse-gram.y"
{ muscle_code_grow ("union_name", (yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
break;
case 45:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 312 "parse-gram.y"
{
char const *body = (yyvsp[(3) - (3)].chars);
#line 312 "parse-gram.y"
{
char const *body = (yyvsp[(3) - (3)].chars);
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 339 "parse-gram.y"
{ current_class = nterm_sym; }
break;
case 47:
#line 339 "parse-gram.y"
{ current_class = nterm_sym; }
break;
case 47:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 340 "parse-gram.y"
{
current_class = unknown_sym;
#line 340 "parse-gram.y"
{
current_class = unknown_sym;
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 344 "parse-gram.y"
{ current_class = token_sym; }
break;
case 49:
#line 344 "parse-gram.y"
{ current_class = token_sym; }
break;
case 49:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 345 "parse-gram.y"
{
current_class = unknown_sym;
#line 345 "parse-gram.y"
{
current_class = unknown_sym;
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 350 "parse-gram.y"
{
tag_seen = true;
#line 350 "parse-gram.y"
{
tag_seen = true;
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 361 "parse-gram.y"
{
symbol_list *list;
#line 361 "parse-gram.y"
{
symbol_list *list;
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 375 "parse-gram.y"
{ (yyval.assoc) = left_assoc; }
break;
case 53:
#line 375 "parse-gram.y"
{ (yyval.assoc) = left_assoc; }
break;
case 53:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 376 "parse-gram.y"
{ (yyval.assoc) = right_assoc; }
break;
case 54:
#line 376 "parse-gram.y"
{ (yyval.assoc) = right_assoc; }
break;
case 54:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 377 "parse-gram.y"
{ (yyval.assoc) = non_assoc; }
break;
case 55:
#line 377 "parse-gram.y"
{ (yyval.assoc) = non_assoc; }
break;
case 55:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 381 "parse-gram.y"
{ current_type = NULL; }
break;
case 56:
#line 381 "parse-gram.y"
{ current_type = NULL; }
break;
case 56:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 382 "parse-gram.y"
{ current_type = (yyvsp[(1) - (1)].uniqstr); tag_seen = true; }
break;
case 57:
#line 382 "parse-gram.y"
{ current_type = (yyvsp[(1) - (1)].uniqstr); tag_seen = true; }
break;
case 57:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 387 "parse-gram.y"
{ (yyval.list) = symbol_list_new ((yyvsp[(1) - (1)].symbol), (yylsp[(1) - (1)])); }
break;
case 58:
#line 387 "parse-gram.y"
{ (yyval.list) = symbol_list_new ((yyvsp[(1) - (1)].symbol), (yylsp[(1) - (1)])); }
break;
case 58:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 388 "parse-gram.y"
{ (yyval.list) = symbol_list_prepend ((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)])); }
break;
case 59:
#line 388 "parse-gram.y"
{ (yyval.list) = symbol_list_prepend ((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)])); }
break;
case 59:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 394 "parse-gram.y"
{
current_type = (yyvsp[(1) - (1)].uniqstr);
#line 394 "parse-gram.y"
{
current_type = (yyvsp[(1) - (1)].uniqstr);
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 399 "parse-gram.y"
{
symbol_class_set ((yyvsp[(1) - (1)].symbol), current_class, (yylsp[(1) - (1)]), true);
#line 399 "parse-gram.y"
{
symbol_class_set ((yyvsp[(1) - (1)].symbol), current_class, (yylsp[(1) - (1)]), true);
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 404 "parse-gram.y"
{
symbol_class_set ((yyvsp[(1) - (2)].symbol), current_class, (yylsp[(1) - (2)]), true);
#line 404 "parse-gram.y"
{
symbol_class_set ((yyvsp[(1) - (2)].symbol), current_class, (yylsp[(1) - (2)]), true);
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 410 "parse-gram.y"
{
symbol_class_set ((yyvsp[(1) - (2)].symbol), current_class, (yylsp[(1) - (2)]), true);
#line 410 "parse-gram.y"
{
symbol_class_set ((yyvsp[(1) - (2)].symbol), current_class, (yylsp[(1) - (2)]), true);
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 416 "parse-gram.y"
{
symbol_class_set ((yyvsp[(1) - (3)].symbol), current_class, (yylsp[(1) - (3)]), true);
#line 416 "parse-gram.y"
{
symbol_class_set ((yyvsp[(1) - (3)].symbol), current_class, (yylsp[(1) - (3)]), true);
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 446 "parse-gram.y"
{
yyerrok;
#line 446 "parse-gram.y"
{
yyerrok;
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 452 "parse-gram.y"
{ current_lhs = (yyvsp[(1) - (1)].symbol); current_lhs_location = (yylsp[(1) - (1)]); }
break;
case 73:
#line 452 "parse-gram.y"
{ current_lhs = (yyvsp[(1) - (1)].symbol); current_lhs_location = (yylsp[(1) - (1)]); }
break;
case 73:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 456 "parse-gram.y"
{ grammar_current_rule_end ((yylsp[(1) - (1)])); }
break;
case 74:
#line 456 "parse-gram.y"
{ grammar_current_rule_end ((yylsp[(1) - (1)])); }
break;
case 74:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 457 "parse-gram.y"
{ grammar_current_rule_end ((yylsp[(3) - (3)])); }
break;
case 76:
#line 457 "parse-gram.y"
{ grammar_current_rule_end ((yylsp[(3) - (3)])); }
break;
case 76:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 463 "parse-gram.y"
{ grammar_current_rule_begin (current_lhs, current_lhs_location); }
break;
case 77:
#line 463 "parse-gram.y"
{ grammar_current_rule_begin (current_lhs, current_lhs_location); }
break;
case 77:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 465 "parse-gram.y"
{ grammar_current_rule_symbol_append ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)])); }
break;
case 78:
#line 465 "parse-gram.y"
{ grammar_current_rule_symbol_append ((yyvsp[(2) - (2)].symbol), (yylsp[(2) - (2)])); }
break;
case 78:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 467 "parse-gram.y"
{ grammar_current_rule_action_append ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
break;
case 79:
#line 467 "parse-gram.y"
{ grammar_current_rule_action_append ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])); }
break;
case 79:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 469 "parse-gram.y"
{ grammar_current_rule_prec_set ((yyvsp[(3) - (3)].symbol), (yylsp[(3) - (3)])); }
break;
case 80:
#line 469 "parse-gram.y"
{ grammar_current_rule_prec_set ((yyvsp[(3) - (3)].symbol), (yylsp[(3) - (3)])); }
break;
case 80:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 471 "parse-gram.y"
{ grammar_current_rule_dprec_set ((yyvsp[(3) - (3)].integer), (yylsp[(3) - (3)])); }
break;
case 81:
#line 471 "parse-gram.y"
{ grammar_current_rule_dprec_set ((yyvsp[(3) - (3)].integer), (yylsp[(3) - (3)])); }
break;
case 81:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 473 "parse-gram.y"
{ grammar_current_rule_merge_set ((yyvsp[(3) - (3)].uniqstr), (yylsp[(3) - (3)])); }
break;
case 84:
#line 473 "parse-gram.y"
{ grammar_current_rule_merge_set ((yyvsp[(3) - (3)].uniqstr), (yylsp[(3) - (3)])); }
break;
case 84:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 489 "parse-gram.y"
{
static char one[] = "1";
#line 489 "parse-gram.y"
{
static char one[] = "1";
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 499 "parse-gram.y"
{
(yyvsp[(1) - (1)].chars)[strlen ((yyvsp[(1) - (1)].chars)) - 1] = '\n';
#line 499 "parse-gram.y"
{
(yyvsp[(1) - (1)].chars)[strlen ((yyvsp[(1) - (1)].chars)) - 1] = '\n';
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 515 "parse-gram.y"
{ (yyval.symbol) = symbol_from_uniqstr ((yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
break;
case 88:
#line 515 "parse-gram.y"
{ (yyval.symbol) = symbol_from_uniqstr ((yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
break;
case 88:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 517 "parse-gram.y"
{
(yyval.symbol) = symbol_get (char_name ((yyvsp[(1) - (1)].character)), (yylsp[(1) - (1)]));
#line 517 "parse-gram.y"
{
(yyval.symbol) = symbol_get (char_name ((yyvsp[(1) - (1)].character)), (yylsp[(1) - (1)]));
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 525 "parse-gram.y"
{ (yyval.symbol) = symbol_from_uniqstr ((yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
break;
case 92:
#line 525 "parse-gram.y"
{ (yyval.symbol) = symbol_from_uniqstr ((yyvsp[(1) - (1)].uniqstr), (yylsp[(1) - (1)])); }
break;
case 92:
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 537 "parse-gram.y"
{
(yyval.symbol) = symbol_get (quotearg_style (c_quoting_style, (yyvsp[(1) - (1)].chars)), (yylsp[(1) - (1)]));
#line 537 "parse-gram.y"
{
(yyval.symbol) = symbol_get (quotearg_style (c_quoting_style, (yyvsp[(1) - (1)].chars)), (yylsp[(1) - (1)]));
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 546 "parse-gram.y"
{
muscle_code_grow ("epilogue", translate_code ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)]));
#line 546 "parse-gram.y"
{
muscle_code_grow ("epilogue", translate_code ((yyvsp[(2) - (2)].chars), (yylsp[(2) - (2)])), (yylsp[(2) - (2)]));
-/* Line 1269 of yacc.c. */
+/* Line 1278 of yacc.c. */
#line 2364 "parse-gram.c"
default: break;
}
#line 2364 "parse-gram.c"
default: break;
}
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ if (0 <= yystate && yystate <= YYLAST
+ && (int)yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTOKENS];
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTOKENS];
-/* Line 1486 of yacc.c. */
+/* Line 1496 of yacc.c. */
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-{/* Line 1535 of yacc.c. */
+{/* Line 1545 of yacc.c. */
#line 97 "parse-gram.y"
symbol *symbol;
#line 97 "parse-gram.y"
symbol *symbol;
uniqstr uniqstr;
unsigned char character;
}
uniqstr uniqstr;
unsigned char character;
}
-/* Line 1535 of yacc.c. */
+/* Line 1545 of yacc.c. */
#line 175 "parse-gram.h"
YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
#line 175 "parse-gram.h"
YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1