[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[FYI] c++-skeleton-header-merge.patch
From: |
Robert Anisko |
Subject: |
[FYI] c++-skeleton-header-merge.patch |
Date: |
Thu, 28 Feb 2002 16:06:25 +0100 (CET) |
? data/address@hidden
Index: ChangeLog
===================================================================
RCS file: /cvsroot/bison/bison/ChangeLog,v
retrieving revision 1.555
diff -u -r1.555 ChangeLog
--- ChangeLog 28 Feb 2002 11:40:59 -0000 1.555
+++ ChangeLog 28 Feb 2002 14:51:55 -0000
@@ -1,3 +1,8 @@
+2002-02-28 Robert Anisko <address@hidden>
+
+ * data/bison.c++: Merge the two generated headers. Insert a copyright
+ notice in each output file.
+
2002-02-28 Akim Demaille <address@hidden>
* data/bison.c++: Copy the prologue of bison.simple to fetch
Index: data/bison.c++
===================================================================
RCS file: /cvsroot/bison/bison/data/bison.c++,v
retrieving revision 1.11
diff -u -r1.11 bison.c++
--- data/bison.c++ 28 Feb 2002 11:41:00 -0000 1.11
+++ data/bison.c++ 28 Feb 2002 14:51:55 -0000
@@ -25,15 +25,13 @@
[m4_bpatsubst(m4_toupper([BISON_]b4_output_header_name),
[[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]], [_])])
-m4_divert(0)dnl
-#output "b4_output_prefix[]b4_output_infix[]-class.hh"
-/* -*- C++ -*- */
-
+m4_define([b4_copyright],
+ [/* -*- C++ -*- */
/* A Bison parser, made from b4_filename,
by GNU bison b4_version. */
/* Skeleton output parser for bison,
- Copyright 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2002 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
@@ -53,7 +51,13 @@
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
+ in version 1.24 of Bison. */])
+
+m4_divert(0)dnl
+#output "b4_output_header_name"
+b4_copyright
+#ifndef b4_header_guard
+# define b4_header_guard
#include "stack.hh"
#include "location.hh"
@@ -65,6 +69,9 @@
b4_prologue
+/* Tokens. */
+b4_tokendef
+
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG b4_debug
@@ -75,8 +82,23 @@
# define YYERROR_VERBOSE b4_error_verbose
#endif
-// FIXME: This should be defined in traits, not here.
-typedef b4_stype yystype;
+#ifndef YYSTYPE
+typedef b4_stype
+yystype;
+# define YYSTYPE yystype
+#endif
+
+m4_if(b4_locations_flag, [0], [],
+[#ifndef YYLTYPE
+typedef struct yyltype
+{
+ int first_line;
+ int first_column;
+ int last_line;
+ int last_column;
+} yyltype;
+# define YYLTYPE yyltype
+#endif])
namespace yy
{
@@ -197,8 +219,12 @@
};
}
+#endif /* not b4_header_guard */
+
#output "b4_output_prefix[]b4_output_infix[].cc"
-#include "b4_output_prefix[]b4_output_infix-class.hh"
+b4_copyright
+
+#include "b4_output_header_name"
/* Enable debugging if requested. */
#if YYDEBUG
@@ -213,9 +239,6 @@
# define YYDPRINTF(Args)
#endif /* !YYDEBUG */
-/* Tokens. */
-b4_tokendef
-
int
yy::b4_name::parse ()
{
@@ -646,6 +669,8 @@
b4_epilogue
#output "stack.hh"
+b4_copyright
+
#ifndef BISON_STACK_HH
# define BISON_STACK_HH
@@ -724,6 +749,8 @@
#endif // not BISON_STACK_HH
#output "location.hh"
+b4_copyright
+
#ifndef BISON_LOCATION_HH
# define BISON_LOCATION_HH
@@ -743,37 +770,3 @@
}
#endif // not BISON_LOCATION_HH
-
-m4_if(b4_defines_flag, 0, [],
-[#output "b4_output_header_name"
-#ifndef b4_header_guard
-# define b4_header_guard
-
-b4_tokendef
-
-#ifndef YYSTYPE
-typedef b4_stype
-yystype;
-# define YYSTYPE yystype
-#endif
-
-m4_if(b4_pure, [0],
-[extern YYSTYPE b4_prefix[]lval;])
-
-m4_if(b4_locations_flag, [0], [],
-[#ifndef YYLTYPE
-typedef struct yyltype
-{
- int first_line;
- int first_column;
- int last_line;
- int last_column;
-} yyltype;
-# define YYLTYPE yyltype
-#endif
-
-m4_if(b4_pure, [0],
-[extern YYLTYPE b4_prefix[]lloc;])
-])
-#endif /* not b4_header_guard */
-])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [FYI] c++-skeleton-header-merge.patch,
Robert Anisko <=