bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Merge maint into master


From: Akim Demaille
Subject: Merge maint into master
Date: Tue, 4 Sep 2012 18:47:39 +0200

I pushed this.

commit d4f600b9fd81183673a5a8530ca3089c9168fc0c
Merge: e4c0985 403ddfb
Author: Akim Demaille <address@hidden>
Date:   Tue Sep 4 18:40:45 2012 +0200

    Merge branch 'maint' into 'master'
    
    * origin/maint:
      maint: remove useless file
      update files to ignore
      remove useless include
      use locale-indep. c_is* functions for parsing, not isspace, isprint etc
      gnulib: update
      --help: include a place to report translation issues
      tests: style changes
      tests: fix push-pull test
      yacc.c: style changes
    
    Conflicts:
        src/system.h

diff --git a/data/yacc.c b/data/yacc.c
index da4e9e3..a15ef77 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -1404,7 +1404,7 @@ b4_function_define([[yyparse]], [[int]], b4_parse_param)[
   int yyn;
   int yyresult;
   /* Lookahead token as an internal (translated) token number.  */
-  int yytoken;
+  int yytoken = 0;
   /* The variables used to return semantic value and location from the
      action routines.  */
   YYSTYPE yyval;]b4_locations_if([[
@@ -1429,7 +1429,6 @@ b4_function_define([[yyparse]], [[int]], b4_parse_param)[
       goto yyread_pushed_token;
     }]])[
 
-  yytoken = 0;
   yyss = yyssa;
   yyvs = yyvsa;]b4_locations_if([[
   yyls = yylsa;]])[
diff --git a/doc/.gitignore b/doc/.gitignore
index 221cbd4..8abfdb9 100644
--- a/doc/.gitignore
+++ b/doc/.gitignore
@@ -1,4 +1,3 @@
-/*.info*
 /*~
 /.dirstamp
 /bison.1
@@ -9,6 +8,7 @@
 /bison.fn
 /bison.help
 /bison.html
+/bison.info
 /bison.ky
 /bison.log
 /bison.pdf
diff --git a/externals/bootstrap.cfg b/externals/bootstrap.cfg
deleted file mode 100644
index 6a0be6f..0000000
--- a/externals/bootstrap.cfg
+++ /dev/null
@@ -1 +0,0 @@
-external: gnulib
diff --git a/gnulib b/gnulib
index bd54a45..e78c0c1 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit bd54a45e6e4bcb3ee7359c9b4f1d831a6291148f
+Subproject commit e78c0c11704500893203872898640bb23162a6f0
diff --git a/src/getargs.c b/src/getargs.c
index 5a74f4b..64ea373 100644
--- a/src/getargs.c
+++ b/src/getargs.c
@@ -342,7 +342,25 @@ THINGS is a list of comma separated words that can 
include:\n\
   `none'         disable the report\n\
 "), stdout);
 
-      printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT);
+      putc ('\n', stdout);
+      printf (_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
+      printf (_("%s home page: <%s>.\n"), PACKAGE_NAME, PACKAGE_URL);
+      fputs (_("General help using GNU software: "
+               "<http://www.gnu.org/gethelp/>.\n"),
+             stdout);
+      /* Don't output this redundant message for English locales.
+         Note we still output for 'C' so that it gets included in the
+         man page.  */
+      const char *lc_messages = setlocale (LC_MESSAGES, NULL);
+      if (lc_messages && !STREQ (lc_messages, "en_"))
+        /* TRANSLATORS: Replace LANG_CODE in this URL with your language
+           code <http://translationproject.org/team/LANG_CODE.html> to
+           form one of the URLs at http://translationproject.org/team/.
+           Otherwise, replace the entire URL with your translation team's
+           email address.  */
+        fputs (_("Report translation bugs to "
+                 "<http://translationproject.org/team/>.\n"), stdout);
+      fputs (_("For complete documentation, run: info bison.\n"), stdout);
     }
 
   exit (status);
diff --git a/src/parse-gram.y b/src/parse-gram.y
index 016963a..3147a7d 100644
--- a/src/parse-gram.y
+++ b/src/parse-gram.y
@@ -20,6 +20,7 @@
 #include <config.h>
 #include "system.h"
 
+#include "c-ctype.h"
 #include "complain.h"
 #include "conflicts.h"
 #include "files.h"
@@ -776,11 +777,11 @@ add_param (param_type type, char *decl, location loc)
     /* Strip the surrounding '{' and '}', and any blanks just inside
        the braces.  */
     --p;
-    while (isspace ((unsigned char) *p))
+    while (c_isspace ((unsigned char) *p))
       --p;
     p[1] = '\0';
     ++decl;
-    while (isspace ((unsigned char) *decl))
+    while (c_isspace ((unsigned char) *decl))
       ++decl;
   }
 
diff --git a/src/scan-gram.l b/src/scan-gram.l
index 084796c..2275d02 100644
--- a/src/scan-gram.l
+++ b/src/scan-gram.l
@@ -36,7 +36,7 @@
 #include <src/reader.h>
 #include <src/uniqstr.h>
 
-#include <ctype.h>
+#include <c-ctype.h>
 #include <mbswidth.h>
 #include <quote.h>
 
@@ -637,7 +637,7 @@ splice   (\\[ \f\t\v]*\n)*
   \\(.|\n)      {
     char const *p = yytext + 1;
     /* Quote only if escaping won't make the character visible.  */
-    if (isspace ((unsigned char) *p) && isprint ((unsigned char) *p))
+    if (c_isspace ((unsigned char) *p) && c_isprint ((unsigned char) *p))
       p = quote (p);
     else
       p = quotearg_style_mem (escape_quoting_style, p, 1);
diff --git a/src/system.h b/src/system.h
index eba7845..0395a0c 100644
--- a/src/system.h
+++ b/src/system.h
@@ -52,10 +52,6 @@
 #define STRPREFIX_LIT(Literal, S)               \
   (STRNCMP_LIT (S, Literal) == 0)
 
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
 #include <unistd.h>
 #include <inttypes.h>
 
@@ -118,7 +114,6 @@ typedef size_t uintptr_t;
 # define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
 #endif
 
-#define FUNCTION_PRINT() fprintf (stderr, "%s: ", __func__)
 
 /*------.
 | NLS.  |
diff --git a/tests/torture.at b/tests/torture.at
index 338c164..705e131 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -412,38 +412,44 @@ yylex (void)
     return EOF;
 }
 
-int
-main (int argc, const char **argv)
+/* Return argv[1] as an int. */
+static int
+get_args (int argc, const char **argv)
 {
+  int res;
   char *endp;
-  YYSTYPE yylval_init;
   assert (argc == 2);
-  yylval_init = strtol (argv[1], &endp, 10);
+  res = strtol (argv[1], &endp, 10);
   assert (argv[1] != endp);
-  assert (0 <= yylval_init);
-  assert (yylval_init <= INT_MAX);
+  assert (0 <= res);
+  assert (res <= INT_MAX);
   assert (errno != ERANGE);
-  yydebug = 1;
-  {
-    int count;
-    int status;
-]m4_bmatch([$2], [%push-],
-[[    yypstate *ps = yypstate_new ();
-]])[    for (count = 0; count < 2; ++count)
-      {
-        int new_status;
-        yylval = yylval_init;
-]m4_bmatch([$2], [%push-],
-[[        new_status = yypull_parse (ps);
-]],
-[[        new_status = yyparse ();
-]])[        assert (0 <= count || new_status == status);
+  return res;
+}
+
+int
+main (int argc, const char **argv)
+{
+  YYSTYPE yylval_init = get_args (argc, argv);
+  int status;
+  int count;
+]m4_bmatch([$2], [api.push-pull both],
+[[  yypstate *ps = yypstate_new ();
+]])[  yydebug = 1;
+  for (count = 0; count < 2; ++count)
+    {
+      int new_status;
+      yylval = yylval_init;
+      new_status = ]m4_bmatch([$2], [api.push-pull both],
+                              [[yypull_parse (ps)]],
+                              [[yyparse ()]])[;
+      if (count == 0)
         status = new_status;
-      }
-]m4_bmatch([$2], [%push-],
-[[    yypstate_delete (ps);
-]])[    return status;
-  }
+      else
+        assert (new_status == status);
+    }]m4_bmatch([$2], [api.push-pull both],[[
+  yypstate_delete (ps);]])[
+  return status;
 }
 ]])
 AT_BISON_OPTION_POPDEFS([$2])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]