mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
YYFAIL: remove.
* data/lalr1.java, data/yacc.c, src/scan-code.l: Remove YYFAIL support. * NEWS, TODO: Update.
This commit is contained in:
6
NEWS
6
NEWS
@@ -2,6 +2,12 @@ GNU Bison NEWS
|
||||
|
||||
* Noteworthy changes in release ?.? (????-??-??) [?]
|
||||
|
||||
** Incompatible changes
|
||||
|
||||
*** Obsolete features
|
||||
|
||||
Support for YYFAIL is removed, as announced since Bison 2.4.2.
|
||||
|
||||
** Warnings
|
||||
|
||||
*** Warning categories are now displayed in warnings
|
||||
|
||||
3
TODO
3
TODO
@@ -77,9 +77,6 @@ so both 256 and 257 are "mysterious".
|
||||
"\"end of command\"", "error", "$undefined", "\"=\"", "\"break\"",
|
||||
|
||||
|
||||
** YYFAIL
|
||||
It is seems to be *really* obsolete now, shall we remove it?
|
||||
|
||||
** yychar == yyempty_
|
||||
The code in yyerrlab reads:
|
||||
|
||||
|
||||
@@ -728,11 +728,6 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
if (yyErrorVerbose)
|
||||
{
|
||||
/* There are many possibilities here to consider:
|
||||
- Assume YYFAIL is not used. It's too flawed to consider.
|
||||
See
|
||||
<http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
|
||||
for details. YYERROR is fine as it does not invoke this
|
||||
function.
|
||||
- If this state is a consistent state with a default action,
|
||||
then the only way this function was invoked is if the
|
||||
default action is an error action. In that case, don't
|
||||
|
||||
25
data/yacc.c
25
data/yacc.c
@@ -638,21 +638,6 @@ static const ]b4_int_type_for([b4_toknum])[ yytoknum[] =
|
||||
#define YYERROR goto yyerrorlab
|
||||
|
||||
|
||||
/* Like YYERROR except do call yyerror. This remains here temporarily
|
||||
to ease the transition to the new meaning of YYERROR, for GCC.
|
||||
Once GCC version 2 has supplanted version 1, this can go. However,
|
||||
YYFAIL appears to be in use. Nevertheless, it is formally deprecated
|
||||
in Bison 2.4.2's NEWS entry, where a plan to phase it out is
|
||||
discussed. */
|
||||
|
||||
#define YYFAIL goto yyerrlab
|
||||
#if defined YYFAIL
|
||||
/* This is here to suppress warnings from the GCC cpp's
|
||||
-Wunused-macros. Normally we don't worry about that warning, but
|
||||
some users do, and we want to make it easy for users to remove
|
||||
YYFAIL uses, which will produce warnings from Bison 2.5. */
|
||||
#endif
|
||||
|
||||
#define YYRECOVERING() (!!yyerrstatus)
|
||||
|
||||
#define YYBACKUP(Token, Value) \
|
||||
@@ -1177,10 +1162,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
int yycount = 0;
|
||||
|
||||
/* There are many possibilities here to consider:
|
||||
- Assume YYFAIL is not used. It's too flawed to consider. See
|
||||
<http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
|
||||
for details. YYERROR is fine as it does not invoke this
|
||||
function.
|
||||
- If this state is a consistent state with a default action, then
|
||||
the only way this function was invoked is if the default action
|
||||
is an error action. In that case, don't check for expected
|
||||
@@ -1769,9 +1750,9 @@ yyreduce:
|
||||
goto yynewstate;
|
||||
|
||||
|
||||
/*------------------------------------.
|
||||
| yyerrlab -- here on detecting error |
|
||||
`------------------------------------*/
|
||||
/*--------------------------------------.
|
||||
| yyerrlab -- here on detecting error. |
|
||||
`--------------------------------------*/
|
||||
yyerrlab:
|
||||
/* Make sure we have latest lookahead translation. See comments at
|
||||
user semantic actions for why this is necessary. */
|
||||
|
||||
@@ -248,20 +248,7 @@ ref -?[0-9]+|{id}|"["{id}"]"|"$"
|
||||
{splice} STRING_GROW;
|
||||
[\n\r] STRING_GROW; if (in_cpp) in_cpp = need_semicolon = false;
|
||||
[ \t\f] STRING_GROW;
|
||||
|
||||
/* YYFAIL is undocumented and was formally deprecated in Bison
|
||||
2.4.2. */
|
||||
YYFAIL {
|
||||
STRING_GROW; need_semicolon = true;
|
||||
complain_at (*loc, Wother,
|
||||
_("use of YYFAIL, which is deprecated and will be removed"));
|
||||
}
|
||||
|
||||
/* The sole purpose of this is to make sure identifiers that merely
|
||||
contain YYFAIL don't produce the above warning. */
|
||||
[A-Za-z_][0-9A-Za-z_]* STRING_GROW; need_semicolon = true;
|
||||
|
||||
. STRING_GROW; need_semicolon = true;
|
||||
. STRING_GROW; need_semicolon = true;
|
||||
}
|
||||
|
||||
<SC_SYMBOL_ACTION>
|
||||
|
||||
Reference in New Issue
Block a user