mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 02:33:03 +00:00
Port to Forte Developer 7 C compiler.
(struct YYLTYPE): If locations are not being used, declare a single
dummy member, as empty structs do not conform to the C standard.
(YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
the Forte Developer 7 C compiler complains that end-of-loop
code is not reached.
This commit is contained in:
12
data/glr.c
12
data/glr.c
@@ -197,6 +197,8 @@ typedef struct YYLTYPE
|
|||||||
int first_column;
|
int first_column;
|
||||||
int last_line;
|
int last_line;
|
||||||
int last_column;
|
int last_column;
|
||||||
|
],[
|
||||||
|
char yydummy;
|
||||||
])[
|
])[
|
||||||
} YYLTYPE;
|
} YYLTYPE;
|
||||||
# define YYLTYPE_IS_DECLARED 1
|
# define YYLTYPE_IS_DECLARED 1
|
||||||
@@ -682,7 +684,7 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
|
|||||||
# undef YYABORT
|
# undef YYABORT
|
||||||
# define YYABORT return yyabort
|
# define YYABORT return yyabort
|
||||||
# undef YYERROR
|
# undef YYERROR
|
||||||
# define YYERROR do { yystack->yyerrState = 0; return yyerr; } while (0)
|
# define YYERROR return yyerrok, yyerr
|
||||||
# undef YYRECOVERING
|
# undef YYRECOVERING
|
||||||
# define YYRECOVERING (yystack->yyerrState != 0)
|
# define YYRECOVERING (yystack->yyerrState != 0)
|
||||||
# undef yyclearin
|
# undef yyclearin
|
||||||
@@ -691,10 +693,8 @@ yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp,
|
|||||||
# define YYFILL(N) yyfill (yyvsp, &yylow, N, yynormal)
|
# define YYFILL(N) yyfill (yyvsp, &yylow, N, yynormal)
|
||||||
# undef YYBACKUP
|
# undef YYBACKUP
|
||||||
# define YYBACKUP(Token, Value) \
|
# define YYBACKUP(Token, Value) \
|
||||||
do { \
|
return yyerror (]b4_yyerror_args["syntax error: cannot back up"), \
|
||||||
yyerror (]b4_yyerror_args["syntax error: cannot back up"); \
|
yyerrok, yyerr
|
||||||
YYERROR; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
yylow = 1;
|
yylow = 1;
|
||||||
if (yyrhslen == 0)
|
if (yyrhslen == 0)
|
||||||
@@ -2016,6 +2016,8 @@ b4_location_if([
|
|||||||
int first_column;
|
int first_column;
|
||||||
int last_line;
|
int last_line;
|
||||||
int last_column;
|
int last_column;
|
||||||
|
],[
|
||||||
|
char yydummy;
|
||||||
])
|
])
|
||||||
} YYLTYPE;
|
} YYLTYPE;
|
||||||
# define YYLTYPE_IS_DECLARED 1
|
# define YYLTYPE_IS_DECLARED 1
|
||||||
|
|||||||
Reference in New Issue
Block a user