]> git.saurik.com Git - bison.git/blobdiff - data/lalr1.java
Sync from upstream gnulib and autoconf.
[bison.git] / data / lalr1.java
index 6637c3a214f2aa7df735edf685311c68ebca8f3f..c6bd4038494cd41b1376f3d022eb12ccfaf5e202 100644 (file)
@@ -1,6 +1,6 @@
 # Java skeleton for Bison -*- autoconf -*-
 
-# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ b4_symbol_foreach([b4_symbol_no_destructor_assert])
 m4_divert_push(0)dnl
 @output(b4_parser_file_name@)@
 b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
-             [2007, 2008, 2009])
+             [2007, 2008, 2009, 2010])
 
 b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
 ])[/* First part of user declarations.  */
@@ -350,11 +350,9 @@ b4_lexer_if([[
    * printing an error message.  */
   public static final int YYERROR = 2;
 
-  /**
-   * Returned by a Bison action in order to print an error message and start
-   * error recovery.  */
-  public static final int YYFAIL = 3;
-
+  // Internal return codes that are not supported for user semantic
+  // actions.
+  private static final int YYERRLAB = 3;
   private static final int YYNEWSTATE = 4;
   private static final int YYDEFAULT = 5;
   private static final int YYREDUCE = 6;
@@ -573,7 +571,7 @@ m4_popdef([b4_at_dollar])])dnl
         else if ((yyn = yytable_[yyn]) <= 0)
           {
             if (yy_table_value_is_error_ (yyn))
-              label = YYFAIL;
+              label = YYERRLAB;
             else
               {
                 yyn = -yyn;
@@ -607,7 +605,7 @@ m4_popdef([b4_at_dollar])])dnl
       case YYDEFAULT:
         yyn = yydefact_[yystate];
         if (yyn == 0)
-          label = YYFAIL;
+          label = YYERRLAB;
         else
           label = YYREDUCE;
         break;
@@ -624,7 +622,7 @@ m4_popdef([b4_at_dollar])])dnl
       /*------------------------------------.
       | yyerrlab -- here on detecting error |
       `------------------------------------*/
-      case YYFAIL:
+      case YYERRLAB:
         /* If not already recovering from an error, report this error.  */
         if (yyerrstatus_ == 0)
           {