[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 8/8] NEWS: document api.*.file changes
From: |
Akim Demaille |
Subject: |
[PATCH 8/8] NEWS: document api.*.file changes |
Date: |
Sat, 6 Oct 2018 18:03:17 +0200 |
---
NEWS | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/NEWS b/NEWS
index cd9e8745..13705952 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,11 @@ GNU Bison NEWS
* Noteworthy changes in release ?.? (????-??-??) [?]
+** Backward incompatible changes
+
+ Support for DJGPP, which have been unmaintained and untested for years, is
+ obsolete. Unless there is activity to revive it, it will be removed.
+
** New features
*** C++: Support for move semantics (lalr1.cc)
@@ -63,6 +68,76 @@ GNU Bison NEWS
The new examples/variant-11.yy shows these features in action.
+*** C++: Renaming location.hh
+
+ When both %defines and %locations are enabled, Bison generates a
+ location.hh file. If you don't use locations outside of the parser, you
+ may avoid its creation with:
+
+ %define api.location.file none
+
+ However this file is useful if, for instance, your parser builds an AST
+ decorated with locations: you may use Bison's location independently of
+ Bison's parser. You can now give it another name, for instance:
+
+ %define api.location.file "my-location.hh"
+
+ This name can have directory components, and even be absolute. The name
+ under which the location file is included is controled by
+ api.location.include.
+
+ This way it is possible to have several parsers share the same location
+ file.
+
+ For instance, in src/foo/parser.hh, generate the include/ast/loc.hh file:
+
+ %locations
+ %define api.namespace {foo}
+ %define api.location.file "include/ast/loc.hh"
+ %define api.location.include {<ast/loc.hh>}
+
+ and use it in src/bar/parser.hh:
+
+ %locations
+ %define api.namespace {bar}
+ %code requires {#include <ast/loc.hh>}
+ %define api.location.type {bar::location}
+
+ Absolute file names are supported, so in your Makefile, passing the flag
+ -Dapi.location.file='"$(top_srcdir)/include/ast/location.hh"' to bison is
+ safe.
+
+*** C++: stack.hh and position.hh are deprecated
+
+ When asked to generate a header file (%defines), the lalr1.cc skeleton
+ generates a stack.hh file. This file had no interest for users; it is now
+ made useless: its content is included in the parser definition. It is
+ still generated for backward compatibility.
+
+ To stop generating it, use the following directive:
+
+ %define api.stack.file none
+
+ When in addition to %defines, location support is requested (%locations),
+ the file position.hh is also generated. It is now also useless: its
+ content is now included in location.hh.
+
+ To stop generating it, use the following directive:
+
+ %define api.position.file none
+
+ Any definition of api.location.file eliminates both position.hh and
+ stack.hh (i.e., implies '%define api.position.file none' and '%define
+ api.stack.file none').
+
+** Bug fixes
+
+ Portability issues on MingW and VS2015.
+
+ Portability issues in the test suite.
+
+ Portability/warning issues with Flex.
+
* Noteworthy changes in release 3.1 (2018-08-27) [stable]
** Backward incompatible changes
--
2.19.0
- [PATCH 0/8] provide more control over C++ file names, Akim Demaille, 2018/10/06
- [PATCH 7/8] c++: provide a means to control how location.hh is included, Akim Demaille, 2018/10/06
- [PATCH 8/8] NEWS: document api.*.file changes,
Akim Demaille <=
- [PATCH 6/8] c++: support absolute api.location.file names, Akim Demaille, 2018/10/06
- [PATCH 3/8] c++: make stack.hh completely useless, Akim Demaille, 2018/10/06
- [PATCH 5/8] c++: when api.location.file is defined, don't generate stack.hh, Akim Demaille, 2018/10/06
- [PATCH 4/8] c++: make position.hh completely useless, Akim Demaille, 2018/10/06
- [PATCH 2/8] c++: add support for api.position.file and api.location.file, Akim Demaille, 2018/10/06
- [PATCH 1/8] c++: provide control over the stack.hh file name, Akim Demaille, 2018/10/06
- Re: [PATCH 0/8] provide more control over C++ file names, Hans Ã…berg, 2018/10/07