Commit Graph

4777 Commits

Author SHA1 Message Date
Nikita Kniazev
532c0e6fbe Lex.Tests: regression_wide: comparison between signed and unsigned
> lex/regression_wide.cpp:70:51: warning: comparison between signed and
> unsigned integer expressions [-Wsign-compare]
>          BOOST_TEST(data[sequence_counter].tokenid == tokenid);
                                                   ^
2016-08-25 21:04:24 +03:00
Nikita Kniazev
894ea490f7 Lex.Tests: regression_wide: Fixed initialization order
> lex/regression_wide.cpp:93:11: warning: field 'constant' will be
> initialized after field 'operation' [-Wreorder]
>         , constant  (L"[0-9]+(\\.[0-9]+)?", ID_CONSTANT)
>           ^
2016-08-25 21:04:24 +03:00
Nikita Kniazev
a7927b15ef Lex.Tests: regression_wide: unused typedef 'iterator_type'
> lex/regression_wide.cpp:122:52: warning:
> unused typedef 'iterator_type' [-Wunused-local-typedef]
>     typedef mega_tokens<lexer_type>::iterator_type iterator_type;
2016-08-25 21:04:24 +03:00
Nikita Kniazev
10a0fc449e Lex.Tests: regression_wide: sequence_counter signed and unsigned comparison
> lex/regression_wide.cpp:69:37: warning: comparison between signed
> and unsigned integer expressions [-Wsign-compare]
>          BOOST_TEST(sequence_counter < sizeof(data)/sizeof(data[0]));
2016-08-25 21:04:24 +03:00
Nikita Kniazev
1c243703b4 Tests: Fix warnings from support/utree.cpp test
> warning: logical not is only applied to the left
> hand side of comparison [-Wlogical-not-parentheses]
2016-08-25 17:43:07 +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
Joel de Guzman
8a6986d156 Merge pull request #207 from Kojoley/fix-missing-whitespace-in-nested-template
Qi: Fixed missing space in the nested template
2016-08-25 06:54:41 +08:00
Joel de Guzman
5a80c8e9e0 Merge pull request #210 from mxc-commons/clarify-list-dperator-doc
Qi: Fix of list operator documentation (replaces PR#208)
2016-08-23 13:48:01 +08:00
mxc-commons
aef83b084f Reformatted long lines. 2016-08-19 21:43:58 +02:00
mxc-commons
034bbb5c6c Clarifiy List operator documentation
a%b not equivalent to a >> *(b >> a)
2016-08-19 20:15:45 +02: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
Joel de Guzman
0f7b47d33d Merge pull request #204 from Kojoley/fix-test-qi-alternative-not-compilable
Qi.Tests: Wrap `r1 = r1 | eps` with `SPIRIT_NO_COMPILE_CHECK` macro
2016-08-18 06:47:19 +08:00
Joel de Guzman
4b965b58ba Merge pull request #203 from Kojoley/fix-examples
Qi.Examples: Fixed missing `using` statement for `expect` directive
2016-08-18 06:45:23 +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
5e56037366 Karma.Tests: Added regression_real_policy_sign.cpp to test suite
The test was added in 90d65d4be7,
but still is not used in the test suite.
2016-08-17 23:04:06 +03:00
Nikita Kniazev
1ee3b7c18c Qi.Tests: Wrap r1 = r1 | eps with SPIRIT_NO_COMPILE_CHECK macro
Logic of the test is to prevent direct left recursion, but
currently because of it `b2` fails to compile `alternative.cpp`.

I have wrapped the case with `SPIRIT_NO_COMPILE_CHECK` like it
has been done in `char1.cpp` and `sequence.cpp` tests.

Actually the test fails at compilation only with std >= c++11,
but passes with std <= c++03.
2016-08-17 20:50:32 +03:00
Nikita Kniazev
12549b559c Qi.Examples: Fixed missing using statement for expect directive
Error message:
> qi/reference.cpp:1047:31: error: ‘expect’ was not declared in this scope
>              test_parser("xi", expect[char_('o')]); // should throw an exception

Introduced with PR #196 (commit d494fe189b)
2016-08-16 19:16:24 +03:00
Joel de Guzman
67153df1ea Merge pull request #202 from Kojoley/fix-lex-unique_ptr-move
Lex: Fixed unique_ptr usage
2016-08-15 06:21:00 +08: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
Joel de Guzman
c9e9f2a7d3 Merge pull request #199 from mxc-commons/develop
Undo header inclusion from PR #197 (obsolete because of PR #198 being merged)
2016-07-23 12:15:45 +08: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
Joel de Guzman
77af109495 Merge pull request #197 from Lastique/patch-1
Fix missing include for expectation_failure
2016-07-19 22:30:38 +08: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
4251626a8f Output formatting corrected 2016-07-12 04:00:08 +02:00
mxc-commons
d494fe189b Expect directive, ready for PR
As discussed with Joel de Guzman this PR introduces the expect directive
expect[] to spirit qi 2. PR includes code, test, example, and
documentation.

See
https://sourceforge.net/p/spirit/mailman/spirit-general/thread/nln5d3%24klg%241%40ger.gmane.org/#msg35208052

Here is what I did:

1. Added expect.hpp to home/qi/directives.
1a. Added forwarding header qi_expectd.hpp to include dir.
2. Renamed expectation parser (a > b) struct from expect to
expect_operator
to prevent name conflicts (expect directive uses struct
expect_directive).
3. Added expect directive to the common terminals
(common_terminals.hpp).
4. Added expectd.cpp to the test suite.
5. Added expectd.cpp to the examples.
6. Added expect directive documentation to directive.qbk. Crosslinked
expectation operator and expect directive docs.
7. Added expect directive to the index.idx file for index-generation.
8. Added expect directive to the qi quick_reference.qbk.
9. Added expect directive to the spirit reference card (tex, pdf)
10. Created a new section in the whats_new.hpp.
11. Changed spirit version to 2.5.4. Spirit index.html showed 2.5.2
allthough an 2.5.3 What's New section already existed. Fixed.
2016-07-12 02:49:07 +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
87a2861064 Missing backslash added 2016-07-09 01:55:05 +02:00
mxc-commons
947189bc75 spirit 2 expect directive
Initial commit.
2016-07-07 00:50:44 +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
Joel de Guzman
4647202454 Merge pull request #193 from Romain-Geissler-1A/remove-auto-ptr
Remove auto_ptr (deprecated in recent C++ standards).
2016-05-31 22:23:11 +08:00
Romain Geissler
e361754faf Remove auto_ptr (deprecated in recent C++ standards). 2016-05-31 12:28:25 +02:00