2382 Commits

Author SHA1 Message Date
David Olsen e379a7bff6 Update PGI C++ compiler support
Remove a PGI-specific workaround in the functor constructor.  The workaround was necessary several years ago to get class functor to compiler with PGI, but the workaround now causes compilation errors.
2017-07-26 12:52:45 -07:00
Joel de Guzman 1f513cb401 Revert "Crash when print attribute in debug mode." 2017-06-19 17:07:21 +08:00
glacierx e7962ea67f Update simple_trace.hpp
Crash in debug mode.
2017-06-19 15:42:20 +08:00
glacierx 8c7f9c0711 Update and_predicate.hpp 2017-06-19 15:40:08 +08:00
sehe ca335f30f4 Fix dangling refs in debug of call_rule_defintion`
There was an issue in `call_rule_definition` where it tries to print the
attribute before transformation (via `context_debug` -> `simple_trace`).

However, it breaks if the made attribute type doesn't match the actual
attribute type. In this case, it makes `context_debug` store a dangling
reference to a temporary converted attribute, leading to Undefined
Behaviour.

See also
https://stackoverflow.com/questions/43679200/boost-spirit-x3-symbol-table-parser-segfaults-when-in-a-separate-compilation-uni/43688320#43688320
2017-04-29 01:07:09 +02:00
Benjamin Buch cfa7446a87 silence unused parameter warning 2017-02-10 12:27:28 +01:00
sehe 16320a5566 Check for unitialized rules in parser composition
Unitialized rules can silently be aggregated during parser composition,
because of statics across translation units.

get_info<> has been fixed so it doesn't break. As a QoI measure, it also
added a debug assert to help diagnose the situation.

In unary_parser and binary_parser, this commit allows that debug assert
to run as early as possible (typically during program startup) so that
users will notice the initialization ordering problem.

See http://stackoverflow.com/a/41785268/85371 for the
reproducer/analysis.
2017-01-22 01:00:16 +01:00
sehe 6c1cab48fc Avoid logic_error if rule was unitialized
Unitialized rules can silently be aggregated during parser composition,
because of statics across translation units.

Also add a debug assert diagnosing this situation.

See http://stackoverflow.com/a/41785268/85371 for the
reproducer/analysis.
2017-01-22 00:43:19 +01:00
Romain Geissler 1e82fe1ad2 Fix warning "typedef 'iterator_t' locally defined but not used" in classic/error_handling/exceptions.hpp 2016-12-06 11:35:10 +01:00
mike96 e6bd38b615 Add cfloat include to pow10.hpp
Fixes Ticket #12642. The optimized pow10 function would not be used unless cfloat had already been externally included.
2016-12-02 04:13:30 +01:00
Romain Geissler e1ebac8f00 Fix clang unused paramter warning. 2016-11-18 00:22:40 +01:00
Romain Geissler dd47d8be67 Fix gcc's warning/error when building with -Wmisleading-indentation 2016-10-16 22:14:51 +02:00
Agustin K-ballo Berge 7859f979d6 Fix assign_to_attribute_from_iterators for long long types
The terminal tags `boost::spirit::[u]long_long_type` hide the integer types `boost::[u]long_long_types`, qualify the later.
2016-10-08 15:36:17 -03:00
Joel de Guzman 192f910c61 Fixes #12468: real_parser failure 2016-09-18 07:49:56 +08:00
Felipe Magno de Almeida 29dc7ec6ea Added BOOST_SPIRIT_NO_REAL_NUMBERS to not include float parsers
This conditional is used to avoid #include'ing traits on floating
point for platforms without floating point, like AVR 8-bit processors.
2016-09-15 23:13:22 -03:00
Felipe Magno de Almeida 30c1d59d35 Make standard_wide and wchar_t optional for platforms that do not support
Added preprocessor conditionals with name
BOOST_SPIRIT_NO_STANDARD_WIDE which can be defined to not use wchar_t.
2016-09-15 23:11:52 -03:00
cppljevans 1d5620fefc Update rule.hpp
As requested here:

https://svn.boost.org/trac/boost/ticket/12366#comment:2
2016-08-25 09:16:25 -05:00
Nikita Kniazev b2298b8a58 Qi: Fixed missing space in the nested template
The bug was introduced in PR #201
2016-08-18 12:44:12 +03:00
Joel de Guzman 262d5524fb Merge pull request #206 from Kojoley/fix-refers-to-the-current-namespace-warning
Qi: `pow10` is already in the `spirit::traits` namespace
2016-08-18 06:50:56 +08:00
Joel de Guzman 4c5b976633 Merge pull request #201 from mxc-commons/fix_alternative
Fix for spirit_v2 qi/alternative test case
2016-08-18 06:47:38 +08:00
Nikita Kniazev fa9d2b160d Qi: pow10 is already in the spirit::traits namespace
Fixes the following warning message from the Intel compiler:
> boost/spirit/home/qi/numeric/detail/real_impl.hpp(34): warning #780:
>  using-declaration ignored -- it refers to the current namespace
2016-08-18 01:03:05 +03:00
Nikita Kniazev ce9814af67 Lex: Fixed unique_ptr usage
Lex is using `unique_ptr` from `movelib` and relying on a bug in it,
described in a ticket https://svn.boost.org/trac/boost/ticket/11758
Since that bug fixed in `movelib`, Lex is uncompilable.

I have simplified unique_ptr usage by the following rules:
  - `delete ptr.release()` is equal to `ptr.reset()`
  - `delete a.release(); a = b;` is equal to `b.swap(a); b.reset();`

Now Lex test suite compiles and runs succesfully. VC++ 6 should be
happy too despite the fact that Boost no longer supports it.
2016-08-15 01:05:21 +03:00
Joel de Guzman b328180b49 Merge pull request #191 from jefftrull/bugfix/12138
Repair plain_token_range and add tests
2016-08-06 06:19:09 +08:00
mxc-commons b2a0b2cbb2 Static assert removed. 2016-07-28 04:14:20 +02:00
mxc-commons ca7952a100 Possible fix for alternative test case 2016-07-28 04:10:55 +02:00
mxc-commons fade21a0cb Undo header inclusion from PR #197 (obsolete because of PR #198 being merged) 2016-07-23 04:19:36 +02:00
Joel de Guzman ab18d4e319 Merge pull request #198 from mxc-commons/develop
Fixes for PR #196 expect directive
2016-07-22 13:06:36 +08:00
mxc-commons 3d1274a857 Added missing include for info. 2016-07-19 19:12:17 +02:00
mxc-commons 88871b4ca8 Moved <stdexcept> dependency to expectation_failure.hpp 2016-07-19 17:54:20 +02:00
mxc-commons 330372cb9d Removed inappropriate copyright claim.
Sorry. I was to fast with copy & paste.
2016-07-19 17:43:22 +02:00
mxc-commons 4a7a50dc7d Fix for PR #196 expect directive
Added dependency on qi/detail/expectation_failure.hpp.
Removed dependency on qi/operator/expect.hpp.
2016-07-19 17:01:53 +02:00
mxc-commons 88f494cb0d Fixes for PR #196 expect directive
This PR contains fixes for both issues reported by Lastique and
MarcelRaad. It makes PR #197 obsolete.

Removed obsolete dependency  of test/qi/expectd.cpp on
mxc/qitoo/qitoo.hpp. Was reintroduced by mistake.

Created qi/detail/expectation_failure.hpp. It defines the
expectation_failure template as a common dependency of expect directive
and expect operator. Removed expectation_failure from
operator/expect.hpp.

Changed version.hpp to 2.54. I did not notice that addl file in the
first place.
2016-07-19 16:42:03 +02:00
Andrey Semashev 785b456e5f Fix missing include for expectation_failure 2016-07-19 16:19:53 +04:00
Joel de Guzman 352ee56d24 Merge pull request #196 from mxc-commons/develop
Expect directive for spirit qi 2
2016-07-16 23:36:50 +08:00
mxc-commons 0d3dc69ca5 Changed type aliases to typedefs for C++03 compatibility 2016-07-15 02:14:44 +02:00
mxc-commons e399298e7b Adjustments for naming consistency
The qi_expectd.hpp was removed. qi_expect.hpp now forwards to both
directive and operator. Directive doc adjusted to reflect that change.

Lexer.qbk restored to qi develop because change is not part of expect
directive.
2016-07-15 01:11:36 +02:00
mxc-commons aa01de88d5 Header reordering undo. 2016-07-09 03:19:58 +02:00
mxc-commons 5ba4d68a9b Changed struct expect to struct expect_operator to distinguish from expect_directive.
This change is necessary only to to maintain the independence of order
of header inclusion in qi.hpp.
Without that change, directive.hpp must be included before operator.hpp,
because the expect operator implementation was in a struct named expect
(before this change). This caused a naming conflict with the new expect
directive.
2016-07-09 03:15:58 +02:00
mxc-commons aed96ba915 spirit 2 expect directive
Initial commit.
2016-07-07 00:49:18 +02:00
Joel de Guzman 379413a50c Fixed bug where string("string1") >> attr(std::string("string2")) produces the wrong attribute result 2016-07-06 22:51:18 +08:00
Joel de Guzman 2759bf97e4 Merge pull request #195 from KayEss/develop
Don't try to declare std::complex for Android builds
2016-06-29 18:39:50 +08:00
Kirit Sælensminde 08b336ddfa Remove undefined behaviour of std::complex declaration. 2016-06-29 17:13:41 +07:00
Kirit Sælensminde 84c97e323d Don't try to declare std::complex for Android builds
This breaks for clang as the NDK namespaces are oddly set up.
2016-06-29 11:04:35 +07:00
Romain Geissler e361754faf Remove auto_ptr (deprecated in recent C++ standards). 2016-05-31 12:28:25 +02:00
Joel de Guzman 7acc6f2a91 workaround for VX2015 optimization bug 2016-05-19 07:48:21 +08:00
Benjamin Buch 7ecec33021 add const to relational operators of class template multi_pass 2016-05-17 19:46:54 +02:00
Jeff Trull 8ac0d9b98b Fix plain_token_range and add a test for plain tokens 2016-05-16 18:11:02 -07:00
Jeff Trull b01b402577 Make multi_pass_iterator != operator const and add tests for istream_iterator 2016-05-16 13:36:00 -07:00
Benjamin Buch 124fda5020 fix wrong out commented parameter in x3::detail::make_rule_context(...) 2016-05-13 14:57:32 +02:00
Benjamin Buch 8357037e84 use ignore_unused instead of C-cast to void 2016-05-12 21:35:57 +02:00