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 merge changes.
details: https://anonhg.NetBSD.org/src/rev/e685b3a6c6c2
branches: trunk
changeset: 769462:e685b3a6c6c2
user: christos <christos%NetBSD.org@localhost>
date: Sat Sep 10 21:29:04 2011 +0000
description:
merge changes.
diffstat:
external/bsd/byacc/dist/closure.c | 5 +-
external/bsd/byacc/dist/defs.h | 85 ++++---
external/bsd/byacc/dist/error.c | 14 +-
external/bsd/byacc/dist/lalr.c | 4 +-
external/bsd/byacc/dist/lr0.c | 4 +-
external/bsd/byacc/dist/main.c | 209 +++++++++++++++++-
external/bsd/byacc/dist/mkpar.c | 4 +-
external/bsd/byacc/dist/output.c | 344 ++++++++++++++++++------------
external/bsd/byacc/dist/reader.c | 10 +-
external/bsd/byacc/dist/skeleton.c | 75 +++---
external/bsd/byacc/dist/symtab.c | 4 +-
external/bsd/byacc/dist/test/error.tab.c | 37 +-
external/bsd/byacc/dist/test/error.tab.h | 3 +-
external/bsd/byacc/dist/test/ftp.tab.c | 102 ++++----
external/bsd/byacc/dist/test/ftp.tab.h | 2 +-
external/bsd/byacc/dist/test/ftp.y | 23 +-
external/bsd/byacc/dist/verbose.c | 4 +-
external/bsd/byacc/dist/warshall.c | 4 +-
external/bsd/byacc/dist/yacc.1 | 29 +-
19 files changed, 629 insertions(+), 333 deletions(-)
diffs (truncated from 2043 to 300 lines):
diff -r 016dd713211e -r e685b3a6c6c2 external/bsd/byacc/dist/closure.c
--- a/external/bsd/byacc/dist/closure.c Sat Sep 10 21:21:54 2011 +0000
+++ b/external/bsd/byacc/dist/closure.c Sat Sep 10 21:29:04 2011 +0000
@@ -1,10 +1,11 @@
-/* $NetBSD: closure.c,v 1.5 2010/12/25 23:43:30 christos Exp $ */
+/* $NetBSD: closure.c,v 1.6 2011/09/10 21:29:04 christos Exp $ */
+
/* Id: closure.c,v 1.9 2010/06/09 08:21:47 tom Exp */
#include "defs.h"
#include <sys/cdefs.h>
-__RCSID("$NetBSD: closure.c,v 1.5 2010/12/25 23:43:30 christos Exp $");
+__RCSID("$NetBSD: closure.c,v 1.6 2011/09/10 21:29:04 christos Exp $");
Value_t *itemset;
Value_t *itemsetend;
diff -r 016dd713211e -r e685b3a6c6c2 external/bsd/byacc/dist/defs.h
--- a/external/bsd/byacc/dist/defs.h Sat Sep 10 21:21:54 2011 +0000
+++ b/external/bsd/byacc/dist/defs.h Sat Sep 10 21:29:04 2011 +0000
@@ -1,9 +1,9 @@
-/* $NetBSD: defs.h,v 1.4 2010/12/24 02:58:20 christos Exp $ */
+/* $NetBSD: defs.h,v 1.5 2011/09/10 21:29:04 christos Exp $ */
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
-/* Id: defs.h,v 1.30 2010/11/26 15:19:36 tom Exp */
+/* Id: defs.h,v 1.35 2011/09/07 08:55:03 tom Exp */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -76,10 +76,12 @@
#if defined(VMS)
#define CODE_SUFFIX "_code.c"
#define DEFINES_SUFFIX "_tab.h"
+#define EXTERNS_SUFFIX "_tab.i"
#define OUTPUT_SUFFIX "_tab.c"
#else
#define CODE_SUFFIX ".code.c"
#define DEFINES_SUFFIX ".tab.h"
+#define EXTERNS_SUFFIX ".tab.i"
#define OUTPUT_SUFFIX ".tab.c"
#endif
#define VERBOSE_SUFFIX ".output"
@@ -230,6 +232,7 @@
extern char dflag;
extern char gflag;
+extern char iflag;
extern char lflag;
extern char rflag;
extern char tflag;
@@ -244,24 +247,29 @@
extern int exit_code;
extern int pure_parser;
-extern const char * const banner[];
-extern const char * const xdecls[];
-extern const char * const tables[];
-extern const char * const hdr_defs[];
-extern const char * const hdr_vars[];
-extern const char * const body_1[];
-extern const char * const body_vars[];
-extern const char * const body_2[];
-extern const char * const body_3[];
-extern const char * const trailer[];
-extern const char * const trailer_2[];
+extern const char *const banner[];
+extern const char *const xdecls[];
+extern const char *const tables[];
+extern const char *const global_vars[];
+extern const char *const impure_vars[];
+extern const char *const hdr_defs[];
+extern const char *const hdr_vars[];
+extern const char *const body_1[];
+extern const char *const body_vars[];
+extern const char *const body_2[];
+extern const char *const body_3[];
+extern const char *const trailer[];
+extern const char *const trailer_2[];
extern char *code_file_name;
extern char *input_file_name;
+extern char *defines_file_name;
+extern char *externs_file_name;
extern FILE *action_file;
extern FILE *code_file;
extern FILE *defines_file;
+extern FILE *externs_file;
extern FILE *input_file;
extern FILE *output_file;
extern FILE *text_file;
@@ -353,36 +361,37 @@
/* error.c */
extern void default_action_warning(void);
-extern void dollar_error(int a_lineno, char *a_line, char *a_cptr);
+extern void dollar_error(int a_lineno, char *a_line, char *a_cptr) GCC_NORETURN;
extern void dollar_warning(int a_lineno, int i);
-extern void fatal(const char *msg);
-extern void illegal_character(char *c_cptr);
-extern void illegal_tag(int t_lineno, char *t_line, char *t_cptr);
-extern void no_grammar(void);
-extern void no_space(void);
-extern void open_error(const char *filename);
-extern void over_unionized(char *u_cptr);
+extern void fatal(const char *msg) GCC_NORETURN;
+extern void illegal_character(char *c_cptr) GCC_NORETURN;
+extern void illegal_tag(int t_lineno, char *t_line, char *t_cptr) GCC_NORETURN;
+extern void missing_brace(void) GCC_NORETURN;
+extern void no_grammar(void) GCC_NORETURN;
+extern void no_space(void) GCC_NORETURN;
+extern void open_error(const char *filename) GCC_NORETURN;
+extern void over_unionized(char *u_cptr) GCC_NORETURN;
extern void prec_redeclared(void);
extern void reprec_warning(char *s);
extern void restarted_warning(void);
extern void retyped_warning(char *s);
extern void revalued_warning(char *s);
-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);
-extern void undefined_goal(char *s);
+extern void syntax_error(int st_lineno, char *st_line, char *st_cptr) GCC_NORETURN;
+extern void terminal_lhs(int s_lineno) GCC_NORETURN;
+extern void terminal_start(char *s) GCC_NORETURN;
+extern void tokenized_start(char *s) GCC_NORETURN;
+extern void undefined_goal(char *s) GCC_NORETURN;
extern void undefined_symbol_warning(char *s);
-extern void unexpected_EOF(void);
-extern void unknown_rhs(int i);
-extern void unterminated_action(int a_lineno, char *a_line, char *a_cptr);
-extern void unterminated_comment(int c_lineno, char *c_line, char *c_cptr);
-extern void unterminated_string(int s_lineno, char *s_line, char *s_cptr);
-extern void unterminated_text(int t_lineno, char *t_line, char *t_cptr);
-extern void unterminated_union(int u_lineno, char *u_line, char *u_cptr);
-extern void untyped_lhs(void);
-extern void untyped_rhs(int i, char *s);
-extern void used_reserved(char *s);
+extern void unexpected_EOF(void) GCC_NORETURN;
+extern void unknown_rhs(int i) GCC_NORETURN;
+extern void unterminated_action(int a_lineno, char *a_line, char *a_cptr) GCC_NORETURN;
+extern void unterminated_comment(int c_lineno, char *c_line, char *c_cptr) GCC_NORETURN;
+extern void unterminated_string(int s_lineno, char *s_line, char *s_cptr) GCC_NORETURN;
+extern void unterminated_text(int t_lineno, char *t_line, char *t_cptr) GCC_NORETURN;
+extern void unterminated_union(int u_lineno, char *u_line, char *u_cptr) GCC_NORETURN;
+extern void untyped_lhs(void) GCC_NORETURN;
+extern void untyped_rhs(int i, char *s) GCC_NORETURN;
+extern void used_reserved(char *s) GCC_NORETURN;
/* graph.c */
extern void graph(void);
@@ -403,7 +412,7 @@
extern void show_shifts(void);
/* main.c */
-extern char *allocate(size_t n);
+extern void *allocate(size_t n);
extern void done(int k) GCC_NORETURN;
/* mkpar.c */
@@ -417,7 +426,7 @@
extern void reader(void);
/* skeleton.c */
-extern void write_section(const char * const section[]);
+extern void write_section(FILE *fp, const char *const section[]);
/* verbose.c */
extern void verbose(void);
diff -r 016dd713211e -r e685b3a6c6c2 external/bsd/byacc/dist/error.c
--- a/external/bsd/byacc/dist/error.c Sat Sep 10 21:21:54 2011 +0000
+++ b/external/bsd/byacc/dist/error.c Sat Sep 10 21:29:04 2011 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: error.c,v 1.6 2010/12/25 23:43:30 christos Exp $ */
-/* Id: error.c,v 1.8 2010/11/24 15:10:20 tom Exp */
+/* $NetBSD: error.c,v 1.7 2011/09/10 21:29:04 christos Exp $ */
+/* Id: error.c,v 1.9 2011/09/05 23:27:43 tom Exp */
#include "defs.h"
#include <sys/cdefs.h>
-__RCSID("$NetBSD: error.c,v 1.6 2010/12/25 23:43:30 christos Exp $");
+__RCSID("$NetBSD: error.c,v 1.7 2011/09/10 21:29:04 christos Exp $");
/* routines for printing error messages */
@@ -30,6 +30,14 @@
}
void
+missing_brace(void)
+{
+ fprintf(stderr, "%s: e - line %d of \"%s\", missing '}'\n",
+ myname, lineno, input_file_name);
+ done(1);
+}
+
+void
unexpected_EOF(void)
{
fprintf(stderr, "%s: e - line %d of \"%s\", unexpected end-of-file\n",
diff -r 016dd713211e -r e685b3a6c6c2 external/bsd/byacc/dist/lalr.c
--- a/external/bsd/byacc/dist/lalr.c Sat Sep 10 21:21:54 2011 +0000
+++ b/external/bsd/byacc/dist/lalr.c Sat Sep 10 21:29:04 2011 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: lalr.c,v 1.4 2010/12/25 23:43:30 christos Exp $ */
+/* $NetBSD: lalr.c,v 1.5 2011/09/10 21:29:04 christos Exp $ */
/* Id: lalr.c,v 1.9 2009/10/27 09:49:27 tom Exp */
#include "defs.h"
#include <sys/cdefs.h>
-__RCSID("$NetBSD: lalr.c,v 1.4 2010/12/25 23:43:30 christos Exp $");
+__RCSID("$NetBSD: lalr.c,v 1.5 2011/09/10 21:29:04 christos Exp $");
typedef struct shorts
{
diff -r 016dd713211e -r e685b3a6c6c2 external/bsd/byacc/dist/lr0.c
--- a/external/bsd/byacc/dist/lr0.c Sat Sep 10 21:21:54 2011 +0000
+++ b/external/bsd/byacc/dist/lr0.c Sat Sep 10 21:29:04 2011 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: lr0.c,v 1.5 2010/12/25 23:43:30 christos Exp $ */
+/* $NetBSD: lr0.c,v 1.6 2011/09/10 21:29:04 christos Exp $ */
/* Id: lr0.c,v 1.12 2010/06/09 08:53:17 tom Exp */
#include "defs.h"
#include <sys/cdefs.h>
-__RCSID("$NetBSD: lr0.c,v 1.5 2010/12/25 23:43:30 christos Exp $");
+__RCSID("$NetBSD: lr0.c,v 1.6 2011/09/10 21:29:04 christos Exp $");
static core *new_state(int symbol);
static Value_t get_state(int symbol);
diff -r 016dd713211e -r e685b3a6c6c2 external/bsd/byacc/dist/main.c
--- a/external/bsd/byacc/dist/main.c Sat Sep 10 21:21:54 2011 +0000
+++ b/external/bsd/byacc/dist/main.c Sat Sep 10 21:29:04 2011 +0000
@@ -1,17 +1,45 @@
-/* $NetBSD: main.c,v 1.6 2010/12/25 23:43:30 christos Exp $ */
-/* Id: main.c,v 1.30 2010/11/24 15:13:39 tom Exp */
+/* $NetBSD: main.c,v 1.7 2011/09/10 21:29:04 christos Exp $ */
+/* Id: main.c,v 1.36 2011/09/06 22:44:45 tom Exp */
#include "defs.h"
#include <sys/cdefs.h>
-__RCSID("$NetBSD: main.c,v 1.6 2010/12/25 23:43:30 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.7 2011/09/10 21:29:04 christos Exp $");
#include <signal.h>
#include <unistd.h> /* for _exit() */
+#if defined(HAVE_ATEXIT)
+# ifdef HAVE_MKSTEMP
+# define USE_MKSTEMP 1
+# elif defined(HAVE_FCNTL_H)
+# define USE_MKSTEMP 1
+# include <fcntl.h> /* for open(), O_EXCL, etc. */
+# else
+# define USE_MKSTEMP 0
+# endif
+#else
+# define USE_MKSTEMP 0
+#endif
+
+#if USE_MKSTEMP
+#include <sys/types.h>
+#include <sys/stat.h>
+
+typedef struct _my_tmpfiles
+{
+ struct _my_tmpfiles *next;
+ char *name;
+}
+MY_TMPFILES;
+
+static MY_TMPFILES *my_tmpfiles;
+#endif /* USE_MKSTEMP */
+
char dflag;
char gflag;
+char iflag;
char lflag;
static char oflag;
char rflag;
@@ -32,7 +60,9 @@
char *code_file_name;
char *input_file_name = empty_string;
-static char *defines_file_name;
+char *defines_file_name;
+char *externs_file_name;
+
static char *graph_file_name;
static char *output_file_name;
static char *verbose_file_name;
Home |
Main Index |
Thread Index |
Old Index