]> git.saurik.com Git - bison.git/blobdiff - src/scan-code.l
doc: cleanup.
[bison.git] / src / scan-code.l
index a84b4c1fcc96afd7f8a8a2ee28d581e44a1c41db..6cda417da8f5aa9dc3034edca2f2c53d7bd16f19 100644 (file)
@@ -1,6 +1,7 @@
 /* Bison Action Scanner                             -*- C -*-
 
-   Copyright (C) 2006, 2007, 2008-2009 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software
+   Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -245,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>