diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2018-12-10 17:41:24 +0100 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2018-12-10 17:50:12 +0100 |
commit | 81dbd0d82e5812d620bc16184583df10b1738cee (patch) | |
tree | 731f5687017ccc320a290d9ab8d5b0155eb807c9 /NEWS | |
parent | d657da9fb40e961401069c3767bb12902c2faec1 (diff) | |
download | bison-81dbd0d82e5812d620bc16184583df10b1738cee.tar.gz |
C++: support variadic emplace
Suggested by Askar Safin.
http://lists.gnu.org/archive/html/bug-bison/2018-12/msg00006.html
* data/variant.hh: Implement.
* tests/types.at: Check.
* doc/bison.texi: Document.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -100,6 +100,22 @@ GNU Bison NEWS until it sees the '='. So we notate the two possible reductions to indicate that each conflicts in one rule. +*** C++: Variadic emplace + + If your application requires C++11, you may now use a variadic emplace for + semantic values: + + %define api.value.type variant + %token <std::pair<int, int>> PAIR + + in your scanner: + + int yylex (parser::semantic_type *lvalp) + { + lvalp->emplace <std::pair<int, int>> (1, 2); + return parser::token::PAIR; + } + *** More POSIX Yacc compatibility warnings More Bison specific directives are now reported with -y or -Wyacc. This |