Commit Graph

787 Commits

Author SHA1 Message Date
ttan
d3ab9a709e added x3 example of wrapping multiple attributes using std::tuple 2019-06-18 14:54:03 +08:00
Nikita Kniazev
f38019094d Unpublish x3/support/utility/testing.hpp
By most part reverts a3d667002f. The header is
undertested, used only in that single example, and has extra dependencies.
2019-04-19 22:04:32 +03:00
Nikita Kniazev
5c14304068 Qi.Examples: Remove a name clash in compiler tutorial [skip ci]
Needed to be able to build examples with multiple distinct toolsets
2019-02-27 17:23:03 +03:00
Nikita Kniazev
8995e825d0 X3.Examples: rexpr_full: Additional compilation fixes 2019-02-09 17:55:17 +03:00
Nikita Kniazev
f64b28a13d X3.Examples: rexpr_full: Fixed path to test files 2019-02-09 17:55:17 +03:00
Nikita Kniazev
3338ebcdf9 X3.Examples: rexpr_full: Fixed compilation on windows
`filesystem::path::c_str()` on windows returns `wchar_t` while error_handler
file parameter is of `std::string` type.
2019-01-22 20:09:52 +03:00
Nikita Kniazev
d15a26eb13 X3.Examples: Context type has changed due to #239 2019-01-08 19:05:08 +03:00
Nikita Kniazev
4583a4b708 Boost.System is header only since 1.69 2018-12-30 17:06:19 +03:00
Nikita Kniazev
da91db5a9c The boost/detail/iterator.hpp header is obsolete
Both `iterator_traits` and `distance` in `boost::detail` namespace are just
aliases from `std` namespace.
2018-12-29 17:46:33 +03:00
Nikita Kniazev
54ca101440 Removed unneeded lexical_cast usages 2018-12-27 20:54:49 +03:00
Nikita Kniazev
e07ce69363 Removed unused lexical_cast includes 2018-12-27 19:36:51 +03:00
Nikita Kniazev
af4f22de40 Qi.Examples: min_xml: Parsing error message tweak 2018-11-22 15:40:23 +03:00
Nikita Kniazev
b08a6ddbc5 Qi.Examples: min_xml: Fixed past the end iterator increment 2018-11-22 15:39:48 +03:00
Nikita Kniazev
ce7be3a2f9 Qi.Examples: min_xml: Fixed inconsistency with docs
https://svn.boost.org/trac10/ticket/12860
2018-11-22 15:38:08 +03:00
Romain Geissler
5e10e84031 Prepare for C++20 and remove "throw()" usage. 2018-11-11 23:14:05 +00:00
Joel de Guzman
ade886de46 typo fix
[SVN r77225]
2018-09-30 02:08:06 +03:00
Nikita Kniazev
b3ae790e2b Use endian macros from Predef
The `boost/detail/endian.hpp` header is deprecated.
2018-09-15 18:19:49 +03:00
Nikita Kniazev
8a5eeb7dc1 X3.Tests: Missing calc4b in the Jamfile 2018-04-26 14:42:02 +03:00
Henri Menke
1e0e0f29ba
Make calc4b actually compile 2018-04-25 18:03:06 +12:00
djowel
25e29006de Tutorial updates: more details on BOOST_SPIRIT_DEFINE, BOOST_SPIRIT_DECLARE and BOOST_SPIRIT_INSTANTIATE 2018-03-28 06:30:41 +08:00
Nikita Kniazev
8085c08547
Merge pull request #374 from Kojoley/ts_real_policies
ts_real_policies: Fixes and optimizations
2018-03-15 03:52:39 +03:00
Nikita Kniazev
02c3c30077 ts_real_policies: Parse directly into output parameter
There is no need to initialize accumulator with zero value before the first
call to `parse`, and to use a temporary.
2018-03-10 19:22:28 +03:00
Nikita Kniazev
dc9e23e9f5 ts_real_policies: Output parameter is of actual accumulator type 2018-03-10 19:12:28 +03:00
Nikita Kniazev
e472c0536f ts_real_policies: One iterator copy less optimization 2018-03-10 19:09:41 +03:00
Nikita Kniazev
1a72c27306 ts_real_policies: Fixed small numbers parsing
Numbers in range (-1000.0, 1000.0) has only one segment (no thousands delimiter),
and are parsed in `if` statement expression.
2018-03-10 19:06:11 +03:00
djowel
54d0167bc8 error handling docs 2018-03-08 11:09:56 +08:00
djowel
130e6395d7 Annotation tutorial example docs 2018-03-08 11:09:56 +08:00
djowel
a9ce56c739 Annotations example 2018-02-23 06:50:38 +08:00
djowel
d98a785093 Merge branch 'Some-Tutorials' into develop 2018-02-21 10:50:07 +08:00
Nikita Kniazev
11a36a0ce2 Remove unused boost/foreach.hpp includes 2017-12-17 20:14:56 +03:00
Nikita Kniazev
d526cd1931 Use <c++-template-depth> feature 2017-12-15 01:12:06 +03:00
Nikita Kniazev
d3cc71002c Fixed redundant semicolons 2017-11-21 19:49:37 +03:00
Nikita Kniazev
d9564895c6 Fixed unused argc/argv 2017-11-21 19:49:36 +03:00
Nikita Kniazev
bd472f37c7 Qi.Examples: reference: Fixed lazy example
Phoenix expression used like it is a Qi expression.

I suspect it had been legal when they were belong to
the same Proto domain but not now.
2017-11-08 20:10:28 +03:00
Nikita Kniazev
ed44948e62 X3.Examples: actions: Missing using x3::_attr 2017-11-07 21:16:21 +03:00
Nikita Kniazev
9128cd2535 Qi.Examples: expect: Do not use c++11 for loop 2017-11-07 21:10:18 +03:00
Nikita Kniazev
591001628f Karma.Examples: Fix complex_number_adapt compilation 2017-11-06 22:45:16 +03:00
Joel de Guzman
1e31221cdd
Merge pull request #255 from Kojoley/fix-examples-qi-reference-parse_frac_n
Qi.Examples: Fixed `parse_frac_n` in `reference.cpp`
2017-10-30 08:00:42 +08:00
Nikita Kniazev
beb28c417d Qi.Examples: Fixed parse_frac_n in reference.cpp
Error message:

```
qi/reference.cpp:126:5: note: candidate function template not viable: requires 3 arguments, but 4 were provided
    parse_frac_n(Iterator& first, Iterator const& last, Attribute& attr)
```

The issue had been introduced in 6832dc2298
where `parse_frac_n` signature was changed.
2017-10-30 02:14:46 +03:00
Nikita Kniazev
c134020c2a X3.Examples: Fix no template named 'with_context' error
`with_context` was removed in 361b12eeeb
but the examples had not been adjusted.
2017-10-30 00:55:31 +03:00
Joel de Guzman
6892080b91 fix. test files location. 2017-08-07 11:14:22 +08: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
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
mxc-commons
0d3dc69ca5 Changed type aliases to typedefs for C++03 compatibility 2016-07-15 02:14:44 +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
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
Ahmed Charles
53f210976b Fix typo in test case. 2015-12-22 17:14:26 -08:00
Seth Heeren
027e3049bb Fix compile error in word_count_lexer example 2015-09-26 00:52:35 +02:00