mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 13:23:04 +00:00
YYFAIL: warn about uses and remove from lalr1.java.
* NEWS (2.5): Document. * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB, and make it private. Update all uses. * src/scan-code.l (SC_RULE_ACTION): Implement warning.
This commit is contained in:
@@ -246,7 +246,20 @@ ref -?[0-9]+|{id}|"["{id}"]"|"$"
|
||||
{splice} STRING_GROW;
|
||||
[\n\r] STRING_GROW; if (in_cpp) in_cpp = need_semicolon = false;
|
||||
[ \t\f] STRING_GROW;
|
||||
. STRING_GROW; need_semicolon = true;
|
||||
|
||||
/* YYFAIL is undocumented and was formally deprecated in Bison
|
||||
2.4.2. */
|
||||
YYFAIL {
|
||||
STRING_GROW; need_semicolon = true;
|
||||
warn_at (*loc, _("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;
|
||||
}
|
||||
|
||||
<SC_SYMBOL_ACTION>
|
||||
|
||||
Reference in New Issue
Block a user