X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/66381412d93f6a54e4d8e7e90b89149a9bca4945..882be728b2481ed2f83805ab8d2cbbab2830f39c:/src/scan-code.l diff --git a/src/scan-code.l b/src/scan-code.l index 56cd7825..700488e8 100644 --- a/src/scan-code.l +++ b/src/scan-code.l @@ -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>