• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[/==============================================================================
2    Copyright (C) 2001-2011 Joel de Guzman
3    Copyright (C) 2001-2012 Hartmut Kaiser
4
5    Distributed under the Boost Software License, Version 1.0. (See accompanying
6    file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7===============================================================================/]
8
9[section What's New]
10
11[/////////////////////////////////////////////////////////////////////////////]
12[section:spirit_2_5_8_boost_1_76 Spirit V2.5.8 (Boost V1.76.0)]
13
14* Fixed assertion in standard parser with an input containing characters from
15  extended charset (on values above 0x7F) [gh_pr 620]
16* Karma real numbers generator produces 10.0e-04 instead of 1.0e-03 [gh 628] [gh_pr 629]
17* Improved `what()` info for `distinct` directive [gh_pr 631]
18* Enhanced debug output to print unicode code points as hex [gh_pr 634]
19* Missing inline keyword in `function_impl_invert::eval<bool>` specialization [gh 638]
20* Replaced Boost.Math with Boost.Core alternatives [gh_pr 648]
21* Removed hardcap on Karma's `RealPolicy::precision()` value [trac 7785] [trac 11056] [gh 585] [gh_pr 586]
22
23[endsect]
24
25[/////////////////////////////////////////////////////////////////////////////]
26[section:spirit_2_5_8_boost_1_74 Spirit V2.5.8 (Boost V1.74.0)]
27
28* Ceased dependence on Boost.Iostreams [gh_pr 599]
29
30[endsect]
31
32[/////////////////////////////////////////////////////////////////////////////]
33[section:spirit_2_5_8_boost_1_73 Spirit V2.5.8 (Boost V1.73.0)]
34
35* Boost.Endian is now used instead of its bundled prerelease version [gh_pr 550]
36* Narrowed Proto and Phoenix inclusion for a 5-10% inclusion speed-up [gh_pr 558]
37* Ceased dependence on Boost.Algorithm and Boost.LexicalCast [gh_pr 560]
38* Added static assertion for meaningless rule attribute qualifiers [gh_pr 561]
39* String literal was matching everything when `<boost/spirit/include/qi_auto.hpp>`
40  header is included [gh_pr 579]
41
42[endsect]
43
44[/////////////////////////////////////////////////////////////////////////////]
45[section:spirit_2_5_8_boost_1_72 Spirit V2.5.8 (Boost V1.72.0)]
46
47* `<cctype>` functions were called with negative values. [gh_pr 543]
48
49[endsect]
50
51[/////////////////////////////////////////////////////////////////////////////]
52[section:spirit_2_5_8_boost_1_71 Spirit V2.5.8 (Boost V1.71.0)]
53
54* Explicitly delete all non implemented assignment operators. [gh_pr 489] Romain Geissler
55* Port `hold_any` to Boost.Core typeinfo. [gh_pr 510] Andrey Semashev
56* Lex: Removed variadic `tokenize_and_phrase_parse`. [gh_pr 491]
57* Qi: Floating point parser fixes. [trac 11608] [gh 421] [gh 495] [gh 498] [gh 503]
58* utree: Missing `<cstring>` include in `utree_detail2.hpp`. [gh 502]
59
60[endsect]
61
62[/////////////////////////////////////////////////////////////////////////////]
63[section:spirit_2_5_8 Spirit V2.5.8]
64
65[heading What's changed from V2.5.7 (Boost V1.69.0) to V2.5.8 (Boost V1.70.0)]
66
67* Removed use of deprecated `boost/detail/iterator.hpp` header [gh_pr 432]
68* Macro name collisions and namespace conflicts with Boost.Endian were fixed. [gh_pr 349] [gh_pr 482]
69
70[heading Bug Fixes in Qi]
71* Added static asserts for rule skipper type problems. [gh_pr 427]
72* The `check_overflow` trait default implementation now relies on
73  `std::numeric_limits<T>::is_bounded` instead of `boost::integer_traits<T>::is_integral` [gh_pr 429]
74* Integer parsers should now handle user defined types. [gh_pr 429]
75*[/^] [*Note:] The `check_overflow` trait default implementation now relies on
76  `std::numeric_limits<T>::is_bounded` instead of `boost::integer_traits<T>::is_integral`.
77* Removed broken 1.0#INF parser. It was poorly documented and never worked. [gh 415] [gh_pr 458] [trac 8699]
78* The undocumented `make_attribute` trait was merged into `transform_attribute` trait. [gh_pr 471]
79* The `pre_transform`, `post_transform`, and `fail_transform` utility functions
80  were removed in favor of directly using `pre`/`post`/`fail` of the transform trait. [gh_pr 467]
81* The integer value parser now respects `std::numeric_limits<T>::digits10` value. [gh_pr 469]
82* Fixed underflow check for a `(Min % Base) == 0` corner case. [gh_pr 469]
83* Fixed an output value on overflow of IgnoreOverflowDigits=true integer parser. [gh_pr 470]
84* Special handling of references in `transform_attribute` was removed. [gh_pr 480]
85
86[heading Bug Fixes in Lex]
87* Fixed UB in default constructor of lexer with user specified token type. [gh_pr 420]
88
89[heading Bug Fixes in utree]
90* Fixed UB in tag getter due to left shift of negative value. [gh_pr 423]
91* Fixed double-conversion (`spirit::string -> std::string -> spirit::string`). [gh_pr 462]
92
93[endsect]
94
95[/////////////////////////////////////////////////////////////////////////////]
96[section:spirit_2_5_7 Spirit V2.5.7]
97
98[heading What's changed from V2.5.6 (Boost V1.68.0) to V2.5.7 (Boost V1.69.0)]
99
100* Drop own FP routines in favor of `boost::math`. [gh_pr 392] [trac 13531]
101* Missing visibility mark on exception types. [gh_pr 409]
102* Fixed transform_attribute ambiguity. [gh_pr 407] [gh 396]
103* to_utf8: Fixed wchar_t handling on Windows. [gh_pr 413] [gh 395]
104
105[endsect]
106
107[/////////////////////////////////////////////////////////////////////////////]
108[section:spirit_2_5_6 Spirit V2.5.6]
109
110[heading What's changed from V2.5.5 (Boost V1.67.0) to V2.5.6 (Boost V1.68.0)]
111
112[heading Bug Fixes in Qi]
113* Fixed ADT support by permutation and sequence_or operator. [gh_pr 376]
114* Specialize iterator_source for random access. [gh_pr 383]
115* Removed redundant check in `skip_over`. [gh_pr 373]
116
117[heading Bug Fixes in Karma]
118* Fixed UB in `get_absolute_value` function. [gh_pr 246]
119* Fixed use after scope bug if ADT getter returns by value. [gh_pr 375] [trac 6126]
120
121[endsect]
122
123[/////////////////////////////////////////////////////////////////////////////]
124[section:spirit_2_5_5 Spirit V2.5.5]
125
126[heading What's changed from V2.5.4 (Boost V1.66.0) to V2.5.5 (Boost V1.67.0)]
127
128There was no version bump and changelog for Boost V1.61.0-1.66.0 releases.
129
130[heading Bug Fixes in Qi or Karma]
131* Fixed keyword directives compilation on C++11. [gh_pr 256] [trac 11493]
132* Fixed subrules compilation. [gh_pr 279] [gh_pr 259]
133* Fixed subrules use after scope bug. [gh_pr 284] [trac 5270]
134* Fixed undefined behavior in sequential or operator. Underlying parsers
135  order of execution was dependent on compiler. [gh_pr 310]
136* Spirit was accidentally relaying on `types` typedef of `boost::optional`.
137  The typedef was removed in the new optional implementation. [gh_pr 271] [trac 12349]
138* Fixed problems with `BOOST_SPIRIT_NO_PREDEFINED_TERMINALS` (`attr_cast`,
139  `confix`, `distinct`, `keywords`, and `flush_multi_pass`). [gh_pr 314] [trac 13311]
140* Added missing copy assignment operator to `hold_any`. [gh_pr 361] [trac 8268]
141
142[heading Bug Fixes in Qi]
143* Fixed alternate operator. [gh_pr 201] [gh_pr 271] [trac 12349]
144* Fixed signed integer overflow in real parser. [gh_pr 245]
145* Fixed overflow problem in `uint_parser<signed T>`. [gh_pr 297]
146* Fixed `get_current_line`, `get_line_start`, and added `get_line_end`. [gh_pr 304]
147* Permutations parser were always initializing optionals. [gh_pr 319] [trac 12473]
148* Changed iterator concept static assert from `ForwardIterator` to
149  `ReadableIteratorConcept` && `ForwardTraversalConcept`. [gh_pr 320]
150* Added assertations to real parsers to ensure that the `parse_frac_n` from
151  user defined real policy does not return negative values and also to prevent
152  static analyzers false-positives. [gh_pr 358]
153
154[heading Bug Fixes in Karma]
155* Fixed alternate operator. [gh_pr 271]
156* Fixed `no_buffering_policy` missing copy constructor. [gh_pr 261]
157* The `ostream_iterator` was inheriting `std::iterator` which is deprecated
158  in C++17. [gh_pr 345]
159
160[heading Bug Fixes in Lex]
161* Store id as promoted type to allow out-of-enum values. [gh_pr 247]
162* Fixed C2001 'newline in constant' warning in generated lexers. [gh_pr 324] [trac 11540]
163
164[endsect]
165
166[/////////////////////////////////////////////////////////////////////////////]
167[section:spirit_2_5_4 Spirit V2.5.4]
168
169[heading What's changed from V2.5.3 (Boost V1.50.0) to V2.5.4 (Boost V1.61.0)]
170
171* Phoenix V2 was completely removed in Boost V1.56.
172* Introduced the new expect parser directive (see __qi_expectd__) in addition to
173  the expecation operator (see __qi_expect__).
174
175[endsect]
176
177[/////////////////////////////////////////////////////////////////////////////]
178[section:spirit_2_5_3 Spirit V2.5.3]
179
180[heading What's changed from V2.5.2 (Boost V1.49.0) to V2.5.3 (Boost V1.50.0)]
181
182* The deprecated headers are removed. It's been there for a couple of years now
183  and it's about time to do some cleanup.
184
185[endsect]
186
187[/////////////////////////////////////////////////////////////////////////////]
188[section:spirit_2_5_2 Spirit V2.5.2]
189
190[heading What's changed from V2.5.1 (Boost V1.48.0) to V2.5.2 (Boost V1.49.0)]
191
192* Integrated Vitaly Budovski's patch to add binary floating point parsers and
193  generators.
194* Fixed [trac 6253]: `lex::lexertl::generate_static_dfa` compiler errors if lexer has
195  wchar_t as underlying stream type.
196* Added the possibility to match a token range when parsing with a lexer by
197  using `qi::token(min, max)`, or `qi::tokenid(min, max)`. Both parsers match
198  any token with a token id in the range [min, max].
199* Fixed a problem in [karma_align `center`]`(num)[a]` and
200  [karma_align `center`]`(num, g)[a]` if used inside a compound generator (such
201  as sequences, Kleene, list, or plus.
202* Fixed `karma::subrule` from the [@../../repository/doc/html/index.html repository]
203  (thanks to Lee Clagett for submitting a patch).
204* Fixed __karma__ examples (thanks to Lee Clagett for submitting a patch).
205* Fixed [trac 6368]: [multi_pass] clear_queue isn't forwarded to the storage policy.
206* Fixed a problem in __karma__ when a variant holding a container was used as
207  a generator inside a sequence.
208
209[endsect]
210
211[/////////////////////////////////////////////////////////////////////////////]
212[section:spirit_2_5_1 Spirit V2.5.1]
213
214[heading What's changed from V2.5 (Boost V1.47.0) to V2.5.1 (Boost V1.48.0)]
215
216* The `spirit::istream_iterator` (see __multi_pass__) now checks at
217  construction time whether the underlying stream has reached eof (end of file).
218* __qi__ now properly collapses attributes generated from optionals embedded
219  inside another optional parser (i.e. `-('(' > -int_ >> ')'). That means that
220  attributes like `boost::optional<boost::optional<int> >` will be collapsed
221  to `boost::optional<int>`. Thanks to Peter Schueller for reporting that
222  problem.
223* Actions attached to binary parsers now properly propagate the parser's
224  attribute. Thanks to Mathias Born for reporting this issue.
225
226[heading Bug Fixes in Lex]
227
228* Fixed [trac 5701]: lexertl token_value_type returns const unused for
229  nonconst ref.
230* Fixed a problem in the lexer (position_token) causing problems with enabled
231  parser debugging (MSVC2010).
232
233[endsect]
234
235[/////////////////////////////////////////////////////////////////////////////]
236[section:spirit_2_5 Spirit V2.5]
237
238[heading What's changed in __qi__ and __karma__ from V2.4.2 (Boost V1.46.0) to V2.5 (Boost V1.47.0)]
239
240This version of __spirit__ now supports the new version of __phoenix__ (V3),
241which has been released as part of Boost V1.47. Please note that this support
242is purely preliminary and should not be considered production quality. The
243reason why we are releasing this now is to enable people who want to use the
244new version of __phoenix__ in their code to do so without any conflicts with
245existing code using __spirit__. Generally, no __spirit__ code needs to be
246changed. To activate the use of __phoenix__ V3 for __spirit__ you need to
247define the following preprocessor constant for your builds (before including
248any of Spirit's include files):
249
250    #define BOOST_SPIRIT_USE_PHOENIX_V3 1
251
252[heading New Features in Qi or Karma]
253
254* Added __utree__, a generic, hierarchical, and dynamic data structure that can
255  represent abstract syntax trees. It's well integrated with __qi__ and
256  __karma__. It can be passed as an attribute while parsing to almost any
257  grammar. At the same time, it can be used as an attribute to generate output
258  from.
259* Added a new macro `BOOST_SPIRIT_TERMINAL_NAME` which takes in two parameters
260  (the terminal name and its type). Before, there was only one parameter
261  (the terminal name) and the type assumed the terminal name with `_type`
262  appended. This produced invalid C++ identifiers with terminals such as
263  `int_`, which resulted in generated a type `int__type` with a bogus double
264  underscore that is reserved for system use in C++.
265* The numeric parsers now allow arbitrary radix from 2..10 and 16
266* The placeholder `_val` now can be used in top level semantic actions outside
267  of any right hand side of a rule. Here is an example:
268``
269    int i = 0
270    BOOST_TEST(test_attr("456", int_[_val = _1], i) && i == 456);
271``
272  In this case _val refers to the attribute value, which is passed in to the
273  `parse()` or `phrase_parse()` functions.
274  Similar constructs are now possible in __karma__ as well:
275``
276    int i = 123;
277    BOOST_TEST(test("123", int_[_1 = _val], i));
278``
279  This change unifies the handling of the `_val` placeholder allowing to use it
280  everywhere, not only in semantic actions attached to the right hand sides of
281  a rule.
282* Added support for __karma__ [unsigned_int unsigned numeric generators] with
283  arbitrary radix values in the (inclusive) range from `2` .. `36`.
284
285[heading Bug Fixes in Qi or Karma]
286
287* __qi__ integer literals (like `int_(10)`) do not consume input on failure
288  anymore.
289* Fixed [trac 5246]: mmap_file_iterator Fails to initialize correctly.
290* Fixed [trac 5246]: mmap_file_iterator Fails to initialize correctly.
291* Fixed a const correctness problem in `karma::real_policies<>` preventing the
292  use of const floating point types with the generator. Thanks to Jeroen
293  Habraken (a.k.a. VeXocide) for reporting it and for submitting a patch and
294  a test.
295* Fixed the  __qi__ __qi_attr__ parser, the __qi__ __qi_symbols__ parser, and
296  the __karma__ [karma_symbols `symbols<>`] generator to properly handle
297  container attributes. These were broken in Boost V1.46.1 (thanks to
298  Aaron Graham and Joerg Becker for reporting the problems).
299* Fixed the __qi_stream__ parser to properly adjust the iterator of the
300  underlying input stream in the case when the stream parser component was
301  successful. Thanks to Brian O'Kennedy who reported the problem on
302  Stackoverflow.
303* Fixed failing Karma numerics generators when used with adapted ADTs (thanks
304  to Colin Rundel for reporting that problem).
305
306[heading Breaking Changes]
307
308* The __qi__ directive __qi_repeat__ erroneously implemented commit/rollback
309  semantics for its attribute, leaving it untouched if the directive failed.
310  This behaviour has been removed as it is inconsistent with similar components.
311  Existing code relying on this functionality will break. Please refer to the
312  __qi__ directive __qi_hold__ to see how to fix your code.
313* Added a preprocessor define `BOOST_SPIRIT_NO_PREDEFINED_TERMINALS` to prevent
314  instantiations of predefined terminal objects which slows down compile time
315  a lot. When `BOOST_SPIRIT_NO_PREDEFINED_TERMINALS` is defined, the user
316  instantiates the terminals that he needs. So, instead of writing `using qi::uint_`
317  one writes instead: `qi::uint_type uint_`.
318
319[heading New Features in Lex]
320
321* Added the possibility to specify a token id while creating a token definition
322  using `lex::char_` and `lex::string`. Both primitives now accept a second
323  parameter which will be interpreted as the requested token id for any token
324  generated from this definition.
325* Added a new token type `lex::lexertl::position_token<>`, which is essentially
326  plup-in compatible with the existing `lex::lexertl::token<>` class. However
327  it additionally stores the pair of iterators pointing to the underlying
328  matched input sequence as an iterator_range.
329
330[heading Bug Fixes in Lex]
331
332* Fixed a problem with associating token definitions with all states (using
333  `"*"` as the state name) when actions were attached to them.
334
335[heading Making Stuff Work]
336
337* Added the __karma__ customization point __customize_extract_from_container__,
338  which will be invoked instead of the older customization point
339  __customize_extract_from__ if the attribute is a container (__customize_is_container__
340  returns `true` for the attribute).
341* The type `hold_any` now takes a template argument: `basic_hold_any<Char>`,
342  where `Char` is the character type used for the streaming operators
343  (`operator>>()` and `operator<<()`). The `hold_any` is still available as a
344  `typedef basic_hold_any<char> hold_any`;
345* Semantic actions now support attribute compatibility. This is a breaking
346  change but #define BOOST_SPIRIT_ACTIONS_ALLOW_ATTR_COMPAT must be defined
347  in order for the new behavior to kick in. By default, the old behavior
348  is still in place.
349* Alternatives now support attribute compatibility.
350* The attribute handling for container attributes of sequences and container
351  components (list, Kleene, Plus, and repeat) has been completely rewritten.
352  It now supports many more use cases and behaves much more predictable than
353  the older version. Thanks to Thomas Taylor, Richard Crossley, Semen,
354  Adalberto Castelo, and many others for reporting bugs and helping in making
355  the new code behave as expected.
356
357[endsect]
358
359[/////////////////////////////////////////////////////////////////////////////]
360[section:spirit_2_4_2 Spirit V2.4.2]
361
362[heading What's changed in __qi__ and __karma__ from V2.4.1 (Boost V1.45.0) to V2.4.2 (Boost V1.46.0)]
363
364[heading New Features in Qi or Karma]
365
366* Added keyword indexes for __qi__ and __karma__ to the docs.
367* Introduced a new customization point __customize_assign_to_container_from_value__
368  which is invoked for container attributes whenever an attribute value needs to
369  be added to that container.
370* Replaced `proto::lit` (which was used to implement `spirit::lit`) with a
371  separate version allowing to distinguish 'lit(foo)' from 'foo'. This should
372  not change any semantics nor should it break exiting code.
373* Added the __qi__ directive __qi_as__ (and its string specializations
374  __qi_as_string__ and __qi_as_wstring__) enabling assignment of container
375  attribute types as a whole.
376* Added the __karma__ directive __karma_as__ (and its string specializations
377  __karma_as_string__ and __karma_as_wstring__) enabling handling of container
378  attribute types during output generation as a whole.
379* In __qi__, `lit()` can now be used for numeric literals as well.
380* The __qi_symbols__ parser component now has an explicit name used for
381  error handling and debugging, which can be set using the new member functions
382  `sym.name(...)`. Thanks to teajay for contributing a patch.
383* The [karma_symbols `symbols<Attrib, T>`] generator component now has an
384  explicit name used for error handling and debugging, which can be set using
385  the new member functions `sym.name(...)`.
386
387[heading Bug Fixes in Qi or Karma]
388
389* Fixed a problem in handling container attributes for __qi__ sequences, which
390  caused the properly parsed attributes of the first elements being overwritten
391  by later elements of the sequence.
392* Fixed the __karma__ generator [karma_string `string(s)`]. It succeeded even
393  if `s` matched only a prefix of its attribute.
394
395[heading What's changed in __lex__ from V2.4.1 (Boost V1.45.0) to V2.4.2 (Boost V1.46.0)]
396
397[heading New Features in Lex]
398
399* Added `qi::tokenid()` primitive parser allowing to match arbitrary lexer
400  tokens based on a given token id. The difference to `qi::token()` is, that it
401  exposes as its attribute the token id of the matched token (instead of the
402  iterator_range of the matched input, as `qi::token()` does).
403* Added an additional template parameter to the default `lexertl::token<>`
404  definition: the type of the token id. This type defaults to `std::size_t`.
405  Any type used as the id type needs to be (explicitly) convertible from
406  `std::size_t`.
407* It's now possible to attach lexer semantic actions to token definitions
408  based on `lex::char()` and `lex::string()`.
409* It's now possible to specify a lexer state the lexer should automatically be
410  switched to after matching certain tokens. For this reason the token
411  definition syntax has been extended:
412``
413    template <typename Lexer>
414    struct lexer : lex::lexer<Lexer>
415    {
416        lexer()
417        {
418            int_ = "[1-9][0-9]*";
419            this->self("INITIAL", "TARGETSTATE") = int_;
420        }
421        lex::token_def<int> int_;
422    };
423``
424  This example lexer will match a `int_` token and will switch the lexer to
425  the state `"TARGETSTATE"` afterwards. If the second argument is not
426  specified the lexer remains in the previous state (as before).
427* The parser primitives `qi::token` and `qi::tokenid` can now be used without
428  any argument. In this case they will match any token.
429* `lex::lit()` has been removed.
430
431[heading Bug Fixes in Lex]
432
433* Fixed an issue in the Lexer giving problems while assigning tokens to all
434  lexer states at once. This is now possible by simply using "*" as the state
435  name. For instance this will add the token int_ to all lexer states:
436``
437    template <typename Lexer>
438    struct lexer : lex::lexer<Lexer>
439    {
440        lexer()
441        {
442            int_ = "[1-9][0-9]*";
443            this->self("*") = int_;
444        }
445        lex::token_def<int> int_;
446    };
447``
448   Note: the `self("*") = ...` must be executed after all lexer states have
449   been introduced to the lexer object.
450
451* Fixed lexer lookahead. The lookahead operation is now evaluated using the
452  lexer state the `token_def` instance used as its argument is associated
453  with.
454* Fixed a problem in the `multi_pass` iterator causing wrong tokens to be
455  returned to the user. This could happen in conjunction with a lexer which
456  performed lexer state changes and was using `pass_fail` in semantic actions
457  to make a token match fail.
458
459[heading Known Problems]
460
461* __qi__ integer literals (like `int_(10)`) consume input on failure, which can
462  lead to problems with the alternative operator.
463
464[endsect]
465
466[/ spirit_2_4_2]
467
468[/////////////////////////////////////////////////////////////////////////////]
469[section:spirit_2_4_1 Spirit V2.4.1]
470
471[heading What's changed in __qi__ and __karma__ from V2.4 (Boost V1.44.0) to V2.4.1 (Boost V1.45.0)]
472
473[heading Bug Fixes]
474
475* Fixed broken __qi__ debugging facilities for optional attributes.
476* The __qi__ auto parsers and __karma__ auto generators will now properly work
477  with `signed char` and `unsigned char` as well.
478* Fixed a problem in the multi_pass fixed_queue policy.
479* Enabled proper modifier handling for the __qi_skip__ directive.
480* Fixed a floating point formating problem in Karma ([trac 4742]).
481* Fixed a problem in [qi_repeat `repeat`]`[]`, which caused the `first`
482  iterator not to be reset on certain parsing failures (see
483  [@http://stackoverflow.com/questions/4009752/boost-spirit-bug-when-mixing-alternates-with-optionals Stack Overflow]).
484
485[endsect] [/ spirit_2_4_1]
486
487[/////////////////////////////////////////////////////////////////////////////]
488[section:spirit_2_4 Spirit V2.4]
489
490[heading What's changed in __qi__ and __karma__ from V2.3 (Boost V1.43.0) to V2.4 (Boost V1.44.0)]
491
492[heading New Features]
493
494* The customization point __customize_transform_attribute__ now takes an additional template
495  parameter `Domain` allowing to better specialize the customization point
496  for either `qi::domain` or `karma::domain`.
497
498[important This is a interface breaking change requiring to modify existing
499           code. If you have a specialization of this customization point in
500           your code you need to add the specialization for the new template
501           parameter, i.e. either `qi::domain` or `karma::domain`.]
502* Semantic actions in __qi__ now implicitly invoke the function `pre` of the
503  customization point __customize_transform_attribute__ to convert the supplied
504  attribute to the exposed attribute type, as needed. The functions
505  `post` and `fail` of this customization point are not invoked by this
506  component (as this would not make any sense).
507* Semantic actions in __karma__ now implicitly invoke the function `pre` of the
508  customization point __customize_transform_attribute__ to convert the supplied
509  attribute to the consumed attribute type, as needed.
510* Added the __karma__ __karma_skip__ directive which is semantically equivalent
511  to the __karma__ __karma_omit__ directive except that it will not execute the
512  embedded generator.
513* Added debug support to __karma__ rules.
514* Added strict mode to __karma__, leaving the current behavior (unchanged) as
515  relaxed mode. Added __karma__ compile time directives `strict[]` and
516  `relaxed[]` allowing to switch between the two.
517* Added __karma__ __karma_duplicate__ directive which duplicates the supplied
518  attribute to all elements of an embedded generator sequence.
519
520[heading Bug Fixes]
521
522* Components in __qi__ and __karma__ now accept one element Fusion sequences as
523  their attributes as long as the element in the Fusion sequence is compatible
524  with the component's attribute type.
525* The character range parser and generator components can now additionally be
526  written as `char_("a", "z")` instead of `char_('a', 'z')` making it
527  consistent with the syntax of the `char_('a')` component (which can be
528  written as `char_("a")` as well). Please note that the mixed syntax forms,
529  i.e. `char_('a', "z")` and `char_("a", 'z')`, are not supported.
530* Fixed attribute handling in __karma__ sequences when all elements of that
531  sequence consume either the same attribute type or containers of that
532  attribute type and the passed in attribute is a container of that attribute
533  type as well. In this case using a repetitive container was supported only
534  when it was the last element of the sequence. Now it is possible to
535  have a [karma_repeat `repeat`]`(num)[a]` generator at any position (well,
536  actually you can have any repetitive container at any position now, but this
537  doesn't always make sense as it normally would eat up all supplied attribute
538  values).
539* Fixed debug output for variants where a variant element is an STL sequence.
540* Fixed a problem in multi_pass, avoiding to loose a character at end of input
541  when switching iterators.
542
543[heading What's changed in __lex__ from V2.3 (Boost V1.43.0) to V2.4 (Boost V1.44.0)]
544
545[heading New Lexer Features]
546
547* The lexer is now well integrated with the debug output generated by Qi's
548  simple_trace utility. Tokens are printed as: '<' matched sequence '>'.
549
550[heading Lexer Bug Fixes]
551
552* Fixed a problem with using lex::_val as a rvalue in lexer semantic
553  expressions.
554* Token values are now available for introspection (as an iterator_range)
555  inside lexer semantic expressions as well.
556
557[endsect] [/ spirit_2_4]
558
559[/////////////////////////////////////////////////////////////////////////////]
560[section:spirit_2_3 Spirit V2.3]
561
562[heading What's changed in __qi__ and __karma__ from V2.2 (Boost V1.42.0) to V2.3 (Boost V1.43.0)]
563
564[heading New Features]
565
566* The customization point `transform_attribute` now has to implement a third
567  function: `void fail(Exposed&)`, which normally will do nothing. This function
568  will be called whenever the right hand side of the `rule` (or the embedded
569  parser of `attr_cast`) fail parsing. This change affects /Qi/ only. See
570  the description of the __customize_transform_attribute__ for more details.
571* Added support for attribute sequences created with `BOOST_FUSION_ADAPT_CLASS`
572  and `BOOST_FUSION_ADAPT_CLASS_NAMED`. This support requires to include the
573  new header file: `#include <boost/spirit/include/support_adapt_class_attributes.hpp>`.
574* Added `karma::ostream_iterator` as a counterpart to `qi::istream_iterator`
575  (see new header file: `#include <boost/spirit/home/support/iterators/ostream_iterator.hpp>`).
576* Added `qi::hold` allowing to make sure the embedded parser does not touch
577  the passed attribute in case it fails parsing.
578* Added [qi_no_skip `qi::no_skip`] directive, which is equivalent to
579  `qi::`__qi_lexeme__, except that it does not pre-skip.
580* Added [karma_no_delimit `karma::no_delimit`] directive, which is equivalent to
581  `karma::`__karma_verbatim__, except that it does not perform a post-delimiting
582  step.
583* Added a new input_iterator policy for the `multi_pass` iterator framework
584  (named `buffering_input_iterator`) allowing to wrap underlying input
585  iterators which do not store the last character read from the input (such as
586  `std::istream_iterator`). This is now used as the default input policy.
587
588[heading Bug Fixes]
589
590* Sequences (in /Qi/ and /Karma/) may now have a component having no attribute
591  even as their last element.
592* Sequences (in /Qi/ and /Karma/) can now take one element attribute sequences
593  as their attribute.
594* Constructs like `karma::buffer[karma::buffer[...]]` don't result in
595  performing double buffering anymore. The same is true if an alternative is
596  wrapped into a `karma::buffer[]` directive (as for instance: `buffer[a] | b`).
597* The __karma__ output iterator (which is used internally, but also is exposed
598  when using the stream based API) is now properly copyable (thanks to Jonas
599  Persson for reporting this issue).
600* The default `multi_pass` iterator is now usable with underlying input
601  iterators which do not store the last character read from the input (such as
602  `std::istream_iterator`). Thanks to Larry Evans and Peter Schueller for
603  independently reporting this problem.
604* The directive `karma::omit[]` now does not accept an arbitrary attribute
605  type anymore.
606* The __karma__ predicates (the and-predicate and the not-predicate) and the
607  directive `karma::omit[]` now disable output altogether instead of
608  intercepting the output into a buffer which got discarded as before.
609* Fixed `karma::rule` to properly handles optional attributes.
610
611[heading What's changed in __lex__ from V2.2 (Boost V1.42.0) to V2.3 (Boost V1.43.0)]
612
613[heading New Lexer Features]
614
615* The library does not minimize the generated lexer tables for dynamic lexers by
616  default anymore. The generated tables will now be minimized for static lexers
617  only.
618* The function `lexer<>::init_dfa()` now takes a single boolean parameter
619  (which defaults to `false`) allowing to force minimization of the generated
620  lexer tables.
621
622[endsect] [/ spirit_2_3]
623
624[//////////////////////////////////////////////////////////////////////////////]
625[section:spirit_2_2 Spirit V2.2]
626
627[heading What's changed in __qi__ and __karma__ from V2.1 (Boost V1.41.0) to V2.2 (Boost V1.42.0)]
628
629[heading New Features]
630
631* Added `auto_` component in __qi__ and __karma__, added API functions
632  `qi::`__create_parser__ and `karma::`__create_generator__.
633* Added `auto_` based overloads for all API functions taking no attributes (see
634  [link spirit.qi.reference.parse_api /Qi/ API] and
635  [link spirit.karma.reference.generate_api /Karma/ API]).
636* Added [karma_columns `karma::columns`] directive.
637* Added [karma_symbols `karma::symbols<Attr, T>`] generator.
638* The __qi__ customization point __customize_push_back_container__ now returns
639  a `bool` to report whether the item has been added to the container.
640* Added an overload for [karma_maxwidth `karma::maxwidth`] directive allowing
641  to specify an additional parameter (any compatible output iterator) receiving
642  the 'overspilled' output (output not fitting into the maxwidth limit).
643* It is now possible to use Phoenix expressions as __karma__ attributes.
644* Added [link spirit.support.multi_pass.reading_from_standard_input_streams `basic_istream_iterator<Char, Traits>`]
645  usable as an equivalent for `std::istream_iterator` except its a __fwditer__
646  allowing to parse directly from any `std::basic_istream`.
647* Added `qi::`__qi_matches__ directive.
648
649[heading Bug Fixes]
650
651* Fixed karma::alternatives to work with embedded containers of hold_any (i.e.
652  constructs like `*stream | "empty"` (which fixes the Karma example
653  basic_facilities.cpp).
654* Fixed numeric __karma__ generators for character types.
655* Fixed `qi::repeat[]` for unused attributes.
656* Fixed rare compilation problem in `karma::repeat[]`.
657* Fixed sequences in __qi__ and __karma__ to compile properly if the attribute
658  is a (STL) container of (STL) containers.
659* Fixed a problem in `lex::token_def::what`.
660* Fixed __qi__ symbols not to match substrings anymore. Added
661  `qi::symbols::prefix_find` to allow matching of (prefix-) substrings.
662* Inherited parameters for rule's usually have to be wrapped in function
663  objects (i.e. `phoenix::val`), for integral values this was not necessary.
664  Now all string types can be passed without being wrapped as well (i.e.
665  `std::string`, `char const*`, etc.).
666* Added concept checks to all relevant __qi__ API functions enforcing the
667  iterator to be at least of the type `std::forward_iterator_tag`.
668* Fixed the `qi::match` and `qi::phrase_match` set of API functions not to
669  internally utilize a `std::stream_iterator` anymore as this iterator is of
670  the type `std::input_iterator_tag` only, which is not sufficient for __qi__.
671
672[endsect] [/ spirit_2_2]
673
674[//////////////////////////////////////////////////////////////////////////////]
675[section:spirit_2_1 Spirit V2.1]
676
677[heading What's changed in __qi__ and __karma__ from V2.0 (Boost V1.37.0) to V2.1 (Boost V1.41.0)]
678
679* __spirit__ is now based on the newest version of __boost_proto__
680* `qi::phrase_parse`, `qi::phrase_format` now post-skip by default.
681* `karma::generate_delimited` and `karma::format_delimited` now don't do pre-
682  delimiting by default.
683* Changed parameter sequence of `qi::phrase_parse`, `qi::phrase_match`,
684  `karma::generate_delimited`, and `match_delimited`. The attribute is now
685  always the last parameter.
686* Added new overloads of those functions allowing to explicitly specify the
687  post-skipping and pre-delimiting behavior.
688* Added multi attribute API functions
689* Removed `grammar_def<>`
690* Removed functions `make_parser()` and `make_generator()`
691* Removed `qi::none` and `karma::none`
692* Sequences and lists now accept a standard container as their attribute
693* The string placeholder terminal now can take other strings as its parameter
694  (i.e. std::string)
695* All terminals taking literals now accept a (lazy) function object as well
696* All placeholders for terminals and directives (such as `int_`, `double_`,
697  `verbatim`, etc.) were previously defined in the namespace `boost::spirit`
698  only. Now these are additionally imported into the namespaces
699  `spirit::qi`, `spirit::karma`, and `spirit::lex` (if they are supported by
700  the corresponding sub-library).
701* The terminal placeholders `char_` and `string` are not defined in the
702  namespace `boost::spirit` anymore as they have been moved to the
703  character set namespaces, allowing to do proper character set
704  handling based on the used namespace (as `spirit::ascii`, etc.)
705* The `uint`, `ushort`, `ulong`, and `byte` terminal placeholders have been
706  renamed to `uint_`, `ushort_`, `ulong_`, and `byte_`.
707* `qi::skip[]` now re-enables outer skipper if used inside `lexeme[]`
708* Added `karma::maxwidth[]` directive (see [karma_maxwidth `maxwidth`])
709* Added `karma::omit[]` allowing to consume the attribute of subject generator
710  without emitting any output (see __karma_omit__).
711* Added `karma::buffer[]` allowing to avoid unwanted output to be generated in
712  case of a generator failing in the middle of a sequence (see __karma_buffer__).
713* `karma::delimit[]` now re-enables outer delimiter if used inside `verbatim[]`
714* Karma: added and-predicate (`operator&()`) and not-predicate (`operator!()`)
715  Both now always consume an attribute.
716* Karma: changed semantics of `char_()`, `string()`, `int_()` et.al., and
717  `double_()` et.al.: all of these generators now always expose an attribute.
718  If they do not have an associated attribute, they generate their immediate
719  literal. If they have an associated attribute, the generators first test if
720  the attribute value is equal to the immediate literal. They fail and do not
721  generate anything if those are not equal. Otherwise they generate their
722  immediate literal. For more information see for instance [signed_int `int_`].
723* `karma::lit()` can now be used to generate integer and floating point numbers
724* `qi::rule` and `karma::rule` now can be directly initialized using their copy
725  constructor. I.e. this works now: `qi::rule<...> r = ...some parser...;`.
726* Added `qi::attr()` exposing its immediate parameter as its attribute.
727* Added boolean parsers and generators (`bool_`, `true_`, `false_`).
728* Added `attr_cast<>` enabling in place attribute type conversion in Qi and Karma
729  grammars.
730* Almost all Karma generators now accept `optional<>` attributes and will fail
731  generating if this is not initialized.
732* Qi and Karma rules now automatically detect whether to apply auto-rule
733  semantics or not (no need for using `operator%=()` anymore, even if it's still
734  existing). Auto-rule semantics are applied if the right hand side has no
735  semantic actions attached to any of the elements. This works for rule
736  initialization and assignment.
737* Qi and Karma rules now do intrinsic attribute transformation based on the
738  attribute customization point __customize_transform_attribute__.
739* All char_ parsers now always expose an attribute. Earlier `char_(...)` didn't
740  expose an attribute while `char_` did. If you need a literal parser not exposing
741  any attribute use `lit(...)` instead.
742* The qi::int_spec, qi::real_spec, karma::int_spec, and karma real_spec types
743  do not exist anymore. These have been replaced with qi::int_parser,
744  qi::real_parser, karma::int_generator, and karma::real_generator.
745
746[heading What's changed in __lex__ from V2.0 (Boost V1.37.0) to V2.1 (Boost V1.41.0)]
747
748Here is a list of changes in __lex__ since version 2.0. __lex__ 2.1 is a
749complete rewrite of the __lex__ distributed with Boost V1.37. As with all
750code portions of the __spirit__ library, __lex__ is usable as stand alone piece.
751__lex__ now uses the infrastructure provided by __spirit__ version 2.1.
752
753* The lex::lexer_def class has been renamed to lex::lexer, while the original
754  class lex::lexer does not exist anymore. This simplifies the creation of
755  lexers.
756* The lex::lexer class does not have the function `def(Self& self)` anymore,
757  token definitions can be added to the lexer at any time, usually in the
758  constructor of the user defined lexer class:
759``
760      template <typename Lexer>
761      struct example_tokens : lex::lexer<Lexer>
762      {
763            example_tokens()
764            {
765                // your token definitions here
766                this->self = ...
767            }
768      };
769``
770* The new lexer class can now be used directly. The function `make_lexer()` has
771  been removed.
772* The `lex::tokenize_and_parse()` and `lex::tokenize_and_phrase_parse()` functions
773  have been changed to match the parameter sequence as implemented by the
774  `qi::parse()` and `qi::phrase_parse()` functions.
775  Both take an arbitrary number of attribute arguments as the last
776  parameters. This argument list is limited by the macro
777  `SPIRIT_ARGUMENTS_LIMIT`.
778* The `lex::lexertl_lexer`, and `lex::lexertl_token`
779  classes have been moved to the `lex::lexertl` namespace and the names have been
780  changed to `lex::lexertl::lexer`, `lex::lexertl::token`. This also applies to
781  the `lex::lexert_actor_lexer`, and the `static_lexertl_*` family of types.
782* The class `lex::lexertl_token_set` has been removed. This functionality is now
783  available from the lexer class.
784* The __lex__ library has been updated to use the newest version of Ben
785  Hansons __lexertl__ lexer construction library (Boost review pending).
786* The `lex::lexer<Lexer>` template constructor now takes an optional parameter
787  specifying the `match_flags` to be used for table generation. Currently, there
788  are the following flags available:
789``
790        match_flags::match_default,          // no flags
791        match_flags::match_not_dot_newline,  // the regex '.' doesn't match newlines
792        match_flags::match_icase             // all matching operations are case insensitive
793``
794  If no parameter is passed to the constructor, `match_flags::match_default` is
795  used, i.e. the `.` matches newlines and matching is case sensitive.
796
797* The `char_()` and `string()` placeholders can now be used for token
798  definitions and are synonymous with `token_def`.
799* Lexer semantic actions now have to conform to a changed interface (see
800  __sec_lex_semactions__ for details).
801* Added placeholder symbols usable from the inside of lexer semantic actions
802  while using Phoenix: `lex::_start`, `lex::_end`, `lex::_eoi`, `lex::_state`,
803  `lex::_val`, and `lex::_pass` (see __sec_lex_semactions__ for more details).
804* Added (lazy) support functions usable from the inside of lexer semantic
805   actions while using Phoenix: `lex::more()`, `lex::less()`, and
806   `lex::lookahead()` (see  __sec_lex_semactions__ for more details).
807* Removed `lex::omitted` in favor of `lex::omit` to unify the overall
808  interface.
809
810[endsect] [/ spirit_2_1]
811
812[/////////////////////////////////////////////////////////////////////////////]
813[section:spirit_1_x Spirit Classic]
814
815The Spirit V1.8.x code base has been integrated with Spirit V2. It is
816now called __classic__. Since the directory structure has changed (the
817Spirit Classic headers are now moved to the
818'''$BOOST_ROOT/boost/spirit/home/classic''' directory), we created
819forwarding headers allowing existing applications to compile without
820any change. However, these forwarding headers are deprecated, which
821will result in corresponding warnings generated for each of the
822headers starting with Boost V1.38. The forwarding headers are expected
823to be removed in the future.
824
825The recommended way of using Spirit Classic now is to include header
826files from the directory '''$BOOST_ROOT/boost/spirit/include'''. All
827Spirit Classic headers in this directory have 'classic_' prefixed to
828their name. For example the include
829
830    #include <boost/spirit/core/core.hpp>
831
832now should be written as:
833
834    #include <boost/spirit/include/classic_core.hpp>
835
836To avoid namespace conflicts with the new Spirit V2 library we moved
837Spirit Classic into the namespace `boost::spirit::classic`. All
838references to the former namespace `boost::spirit` need to be adjusted
839as soon as the header names are corrected as described above. As an
840alternative you can define the preprocessor constant
841`BOOST_SPIRIT_USE_OLD_NAMESPACE`, which will force the Spirit Classic
842code to be in the namespace `boost::spirit` as before. This is not
843recommended, though, as it may result in naming clashes.
844
845The change of the namespace will be automatically deactivated whenever
846the deprecated include files are being used. This ensures full
847backwards compatibility for existing applications.
848
849[endsect] [/ spirit_1_x]
850
851[endsect]
852