Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/byacc/dist add our patches



details:   https://anonhg.NetBSD.org/src/rev/3e59d5eeb431
branches:  trunk
changeset: 748605:3e59d5eeb431
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Oct 29 00:56:19 2009 +0000

description:
add our patches

diffstat:

 external/bsd/byacc/dist/NOTES            |  12 ++++++
 external/bsd/byacc/dist/closure.c        |   6 ++-
 external/bsd/byacc/dist/config_h.in      |   2 +-
 external/bsd/byacc/dist/defs.h           |  22 ++++++-----
 external/bsd/byacc/dist/error.c          |  46 +++++++++++++------------
 external/bsd/byacc/dist/graph.c          |   6 ++-
 external/bsd/byacc/dist/lalr.c           |   6 ++-
 external/bsd/byacc/dist/lr0.c            |   6 ++-
 external/bsd/byacc/dist/main.c           |  55 ++++++++++++++++++++++++++-----
 external/bsd/byacc/dist/mkpar.c          |   6 ++-
 external/bsd/byacc/dist/output.c         |   6 ++-
 external/bsd/byacc/dist/reader.c         |  20 ++++++-----
 external/bsd/byacc/dist/skeleton.c       |  19 ++++++----
 external/bsd/byacc/dist/symtab.c         |   8 ++-
 external/bsd/byacc/dist/test/README      |   2 +-
 external/bsd/byacc/dist/test/error.tab.c |   6 +-
 external/bsd/byacc/dist/test/error.tab.h |   2 +-
 external/bsd/byacc/dist/test/ftp.tab.c   |   6 +-
 external/bsd/byacc/dist/test/ftp.tab.h   |   2 +-
 external/bsd/byacc/dist/test/ftp.y       |  13 ++++--
 external/bsd/byacc/dist/verbose.c        |   8 ++-
 external/bsd/byacc/dist/warshall.c       |   8 ++-
 external/bsd/byacc/dist/yacc.1           |   3 +-
 23 files changed, 173 insertions(+), 97 deletions(-)

diffs (truncated from 787 to 300 lines):

diff -r 9cad03942a8b -r 3e59d5eeb431 external/bsd/byacc/dist/NOTES
--- a/external/bsd/byacc/dist/NOTES     Thu Oct 29 00:46:51 2009 +0000
+++ b/external/bsd/byacc/dist/NOTES     Thu Oct 29 00:56:19 2009 +0000
@@ -1,3 +1,5 @@
+$NetBSD: NOTES,v 1.2 2009/10/29 00:56:19 christos Exp $
+
 Berkeley Yacc reflects its origins.  The reason so many routines
 use exactly six register variables is that Berkeley Yacc was
 developed on a VAX using PCC.  PCC placed at most six variables
@@ -5,5 +7,15 @@
 variables most belonged in registers.  Changes in machines and
 compilers make that effort worthless, perhaps even harmful.
 
+[Given the previous paragraph, and the fact that GCC does not respect
+ register declarations, and the fact that much of the rest of the
+ 4.4lite2 release had "register" declarations extirpated, I've removed
+ most of the register declarations from the code. I left them in the
+ generated skeleton code "for the hell of it" but they probably should
+ go from there, too. -- pm, July 1997]
+
+[I totally removed the register stuff; we've deprecated it elsewhere
+ in the tree now -- lukem, October 1997]
+
 The code contains many instances where address calculations are
 performed in particular ways to optimize the code for the VAX.
diff -r 9cad03942a8b -r 3e59d5eeb431 external/bsd/byacc/dist/closure.c
--- a/external/bsd/byacc/dist/closure.c Thu Oct 29 00:46:51 2009 +0000
+++ b/external/bsd/byacc/dist/closure.c Thu Oct 29 00:56:19 2009 +0000
@@ -1,9 +1,11 @@
-/*     $NetBSD: closure.c,v 1.1.1.1 2009/10/29 00:46:52 christos Exp $ */
-
+/*     $NetBSD: closure.c,v 1.2 2009/10/29 00:56:19 christos Exp $     */
 /* Id: closure.c,v 1.7 2009/10/27 09:30:14 tom Exp */
 
 #include "defs.h"
 
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: closure.c,v 1.2 2009/10/29 00:56:19 christos Exp $");
+
 Value_t *itemset;
 Value_t *itemsetend;
 unsigned *ruleset;
diff -r 9cad03942a8b -r 3e59d5eeb431 external/bsd/byacc/dist/config_h.in
--- a/external/bsd/byacc/dist/config_h.in       Thu Oct 29 00:46:51 2009 +0000
+++ b/external/bsd/byacc/dist/config_h.in       Thu Oct 29 00:56:19 2009 +0000
@@ -1,3 +1,3 @@
 /* @configure_input@ */
-/* Id: config_h.in,v 1.1 1995/01/01 19:34:59 tom Exp */
+/* $Id: config_h.in,v 1.2 2009/10/29 00:56:19 christos Exp $ */
 @DEFS@
diff -r 9cad03942a8b -r 3e59d5eeb431 external/bsd/byacc/dist/defs.h
--- a/external/bsd/byacc/dist/defs.h    Thu Oct 29 00:46:51 2009 +0000
+++ b/external/bsd/byacc/dist/defs.h    Thu Oct 29 00:56:19 2009 +0000
@@ -1,6 +1,8 @@
-/*     $NetBSD: defs.h,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $    */
+/* Id: defs.h,v 1.20 2009/10/27 10:47:43 tom Exp */
 
-/* Id: defs.h,v 1.20 2009/10/27 10:47:43 tom Exp */
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
@@ -222,15 +224,15 @@
 extern int outline;
 extern int exit_code;
 
-extern const char *banner[];
-extern const char *tables[];
-extern const char *header[];
-extern const char *body[];
-extern const char *trailer[];
+extern const char * const banner[];
+extern const char * const tables[];
+extern const char * const header[];
+extern const char * const body[];
+extern const char * const trailer[];
 
 extern char *code_file_name;
 extern char *defines_file_name;
-extern char *input_file_name;
+extern const char *input_file_name;
 extern char *output_file_name;
 extern char *verbose_file_name;
 extern char *graph_file_name;
@@ -340,7 +342,7 @@
 extern void restarted_warning(void);
 extern void retyped_warning(char *s);
 extern void revalued_warning(char *s);
-extern void syntax_error(int st_lineno, char *st_line, char *st_cptr) GCC_NORETURN;
+extern __dead void syntax_error(int st_lineno, char *st_line, char *st_cptr) GCC_NORETURN;
 extern void terminal_lhs(int s_lineno);
 extern void terminal_start(char *s);
 extern void tokenized_start(char *s);
@@ -391,7 +393,7 @@
 extern void reader(void);
 
 /* skeleton.c */
-extern void write_section(const char *section[]);
+extern void write_section(const char * const section[]);
 
 /* verbose.c */
 extern void verbose(void);
diff -r 9cad03942a8b -r 3e59d5eeb431 external/bsd/byacc/dist/error.c
--- a/external/bsd/byacc/dist/error.c   Thu Oct 29 00:46:51 2009 +0000
+++ b/external/bsd/byacc/dist/error.c   Thu Oct 29 00:56:19 2009 +0000
@@ -1,26 +1,28 @@
-/*     $NetBSD: error.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $   */
+/*     $NetBSD: error.c,v 1.2 2009/10/29 00:56:19 christos Exp $       */
+/* Id: error.c,v 1.6 2008/11/24 21:30:35 tom Exp */
 
-/* Id: error.c,v 1.6 2008/11/24 21:30:35 tom Exp */
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: error.c,v 1.2 2009/10/29 00:56:19 christos Exp $");
+
+#include "defs.h"
 
 /* routines for printing error messages  */
 
-#include "defs.h"
-
-void
+__dead void
 fatal(const char *msg)
 {
     fprintf(stderr, "%s: f - %s\n", myname, msg);
     done(2);
 }
 
-void
+__dead void
 no_space(void)
 {
     fprintf(stderr, "%s: f - out of space\n", myname);
     done(2);
 }
 
-void
+__dead void
 open_error(const char *filename)
 {
     fprintf(stderr, "%s: f - cannot open \"%s\"\n", myname, filename);
@@ -44,7 +46,7 @@
        return;
     for (s = st_line; *s != '\n'; ++s)
     {
-       if (isprint(*s) || *s == '\t')
+       if (isprint((unsigned char)*s) || *s == '\t')
            putc(*s, stderr);
        else
            putc('?', stderr);
@@ -61,7 +63,7 @@
     putc('\n', stderr);
 }
 
-void
+__dead void
 syntax_error(int st_lineno, char *st_line, char *st_cptr)
 {
     fprintf(stderr, "%s: e - line %d of \"%s\", syntax error\n",
@@ -70,7 +72,7 @@
     done(1);
 }
 
-void
+__dead void
 unterminated_comment(int c_lineno, char *c_line, char *c_cptr)
 {
     fprintf(stderr, "%s: e - line %d of \"%s\", unmatched /*\n",
@@ -79,7 +81,7 @@
     done(1);
 }
 
-void
+__dead void
 unterminated_string(int s_lineno, char *s_line, char *s_cptr)
 {
     fprintf(stderr, "%s: e - line %d of \"%s\", unterminated string\n",
@@ -88,7 +90,7 @@
     done(1);
 }
 
-void
+__dead void
 unterminated_text(int t_lineno, char *t_line, char *t_cptr)
 {
     fprintf(stderr, "%s: e - line %d of \"%s\", unmatched %%{\n",
@@ -97,7 +99,7 @@
     done(1);
 }
 
-void
+__dead void
 unterminated_union(int u_lineno, char *u_line, char *u_cptr)
 {
     fprintf(stderr, "%s: e - line %d of \"%s\", unterminated %%union \
@@ -106,7 +108,7 @@
     done(1);
 }
 
-void
+__dead void
 over_unionized(char *u_cptr)
 {
     fprintf(stderr, "%s: e - line %d of \"%s\", too many %%union \
@@ -115,7 +117,7 @@
     done(1);
 }
 
-void
+__dead void
 illegal_tag(int t_lineno, char *t_line, char *t_cptr)
 {
     fprintf(stderr, "%s: e - line %d of \"%s\", illegal tag\n",
@@ -124,7 +126,7 @@
     done(1);
 }
 
-void
+__dead void
 illegal_character(char *c_cptr)
 {
     fprintf(stderr, "%s: e - line %d of \"%s\", illegal character\n",
@@ -133,7 +135,7 @@
     done(1);
 }
 
-void
+__dead void
 used_reserved(char *s)
 {
     fprintf(stderr,
@@ -142,7 +144,7 @@
     done(1);
 }
 
-void
+__dead void
 tokenized_start(char *s)
 {
     fprintf(stderr,
@@ -227,7 +229,7 @@
 end of the current rule\n", myname, a_lineno, input_file_name, i);
 }
 
-void
+__dead void
 dollar_error(int a_lineno, char *a_line, char *a_cptr)
 {
     fprintf(stderr, "%s: e - line %d of \"%s\", illegal $-name\n",
@@ -236,7 +238,7 @@
     done(1);
 }
 
-void
+__dead void
 untyped_lhs(void)
 {
     fprintf(stderr, "%s: e - line %d of \"%s\", $$ is untyped\n",
@@ -244,7 +246,7 @@
     done(1);
 }
 
-void
+__dead void
 untyped_rhs(int i, char *s)
 {
     fprintf(stderr, "%s: e - line %d of \"%s\", $%d (%s) is untyped\n",
@@ -252,7 +254,7 @@
     done(1);
 }
 
-void
+__dead void
 unknown_rhs(int i)
 {
     fprintf(stderr, "%s: e - line %d of \"%s\", $%d is untyped\n",
diff -r 9cad03942a8b -r 3e59d5eeb431 external/bsd/byacc/dist/graph.c
--- a/external/bsd/byacc/dist/graph.c   Thu Oct 29 00:46:51 2009 +0000
+++ b/external/bsd/byacc/dist/graph.c   Thu Oct 29 00:56:19 2009 +0000
@@ -1,9 +1,11 @@
-/*     $NetBSD: graph.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $   */
-
+/*     $NetBSD: graph.c,v 1.2 2009/10/29 00:56:20 christos Exp $       */
 /* Id: graph.c,v 1.7 2009/10/27 09:25:20 tom Exp */
 
 #include "defs.h"
 
+#include <sys/cdefs.h>
+__RCSID("$NetBSD: graph.c,v 1.2 2009/10/29 00:56:20 christos Exp $");
+
 static void graph_state(int stateno);
 static void graph_LA(int ruleno);
 
diff -r 9cad03942a8b -r 3e59d5eeb431 external/bsd/byacc/dist/lalr.c
--- a/external/bsd/byacc/dist/lalr.c    Thu Oct 29 00:46:51 2009 +0000
+++ b/external/bsd/byacc/dist/lalr.c    Thu Oct 29 00:56:19 2009 +0000
@@ -1,9 +1,11 @@
-/*     $NetBSD: lalr.c,v 1.1.1.1 2009/10/29 00:46:53 christos Exp $    */



Home | Main Index | Thread Index | Old Index