]> git.saurik.com Git - bison.git/blobdiff - src/scan-code.l
* HACKING (Release Procedure): Recommend a secure automake.
[bison.git] / src / scan-code.l
index a84b4c1fcc96afd7f8a8a2ee28d581e44a1c41db..e2eb76a732a6873e63da8e7d08152ea5b416adb3 100644 (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>