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.
(cherry picked from commit 4395a9ff4f)

Conflicts:

	data/lalr1.java
This commit is contained in:
Joel E. Denny
2009-12-21 14:58:48 -05:00
parent 41d35e54d5
commit 62efdd2a85
4 changed files with 39 additions and 10 deletions

View File

@@ -245,7 +245,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>