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:
Paul Eggert
2003-06-19 07:38:39 +00:00
parent 7b49187432
commit 5cc16ecc96

View File

@@ -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