Commit Graph

185 Commits

Author SHA1 Message Date
Nikita Kniazev
877c778ed9 X3.Tests: rule_separate_tu: Fix static initialization order fiasco 2019-11-03 21:01:58 +03:00
Nikita Kniazev
10d027fd5c X3: Fix parse_rule definition check
Regressed in #457
2019-10-18 21:43:06 +03:00
djowel
f10cf8a80f Fix for https://github.com/boostorg/spirit/pull/543 + test 2019-10-12 11:24:21 +08:00
Nikita Kniazev
7771d20cc7 Fix MSVC C4127 warnings 2019-09-30 01:29:29 +03:00
Nikita Kniazev
9cf7a3ef73 Fix CI fail 2019-09-20 22:51:38 +03:00
Joel de Guzman
1fc5359fd9
Merge pull request #534 from duzy/master
Add handling with `optional<Source>` for `boost::spirit::x3::traits::…
2019-09-11 14:48:57 +08:00
Duzy Chan
7207225dbe Add handling with optional<Source> for boost::spirit::x3::traits::move_to,
so that optional ast node will work. See also test/x3/optional_ast_node.cpp for
the case.

Addressed at https://github.com/boostorg/spirit/issues/533
2019-09-11 11:32:30 +08:00
djowel
894c60adee remove unwanted tests 2019-08-26 08:18:13 +08:00
djowel
730b35be1f add invalid ascii tests 2019-08-26 08:17:53 +08:00
LeonineKing1199
9733fc2321 Added tests for upper/lower category lookups 2019-08-25 11:19:42 -07:00
LeonineKing1199
3db2c1d2f4 Added invalid Unicode test case 2019-08-25 11:14:27 -07:00
LeonineKing1199
e554022b4c Fixed typo in test_failure 2019-08-25 09:39:39 -07:00
LeonineKing1199
355007d571 Added overload of test_failure for string views 2019-08-25 09:14:47 -07:00
djowel
885d3ac013 Test for https://github.com/boostorg/spirit/issues/511, removing static_assert 2019-07-02 20:41:11 +08:00
djowel
ded2c2127c More fixes and tests for https://github.com/boostorg/spirit/issues/509 2019-05-16 09:15:46 +08:00
djowel
fc331f5a4d Fix for https://github.com/boostorg/spirit/issues/509 2019-05-15 22:33:36 +08:00
LeonineKing1199
017478bd29 Updated tests 2019-05-06 20:56:32 -07:00
djowel
3c4e83c8ba not needed anymore (for x3) 2019-05-04 17:47:31 +08:00
djowel
7cfc21f866 Basic test for float_ double_ and long_double 2019-05-04 17:47:31 +08:00
djowel
747f7ebc41 deal with long double compares 2019-05-04 17:47:31 +08:00
djowel
949fe02a1f Working fix for https://svn.boost.org/trac10/ticket/11608
Added similar tests to x3
2019-04-25 19:40:40 +08:00
djowel
8a236c4bdf Correct fix for negative exponents; should probably port Qi's compensate_roundoff as well, but we'll do that next time. 2019-04-24 16:00:15 +08:00
djowel
def07a9956 Fix for https://github.com/boostorg/spirit/issues/495 2019-04-24 09:13:25 +08:00
Nikita Kniazev
d8916bf4c3 unused_type: added usage tests 2019-04-19 01:49:25 +03:00
Nikita Kniazev
f65d7a8013 unused_type: trivial on C++11+ 2019-04-19 01:45:37 +03:00
Nikita Kniazev
55aa6f7556 unused_type: Added basic tests 2019-04-17 16:49:31 +03:00
Nikita Kniazev
e2d96079e1 Tests: move_only: Add default constructor
In C++20 such types will no longer be brace constructible.
2019-03-06 02:40:42 +03:00
Nikita Kniazev
0ab06abfc6 Annotate, clean up, and group extended ASCII tests 2019-03-01 22:50:15 +03:00
Nikita Kniazev
ddd4619987 Hexencode extended ASCII characters
There is no other portable way to deal with extended ASCII in source code.
2019-03-01 22:50:15 +03:00
Nikita Kniazev
63a16b76dd X3.Tests: Fixed extra semicolon warnings 2019-03-01 01:12:01 +03:00
Nikita Kniazev
7b3939f133 Tests: Fix some of maybe uninitialized warnings 2019-03-01 01:12:00 +03:00
Nikita Kniazev
0694cfb0da X3.Tests: alternative: Fix unreachable code warning 2019-03-01 01:12:00 +03:00
Nikita Kniazev
666fed425e X3.Tests: Fix unused argument warnings 2019-03-01 01:11:59 +03:00
Nikita Kniazev
5d80257f61 X3.Tests: MSVC14.0 have problems with variable templates 2019-02-27 16:16:16 +03:00
Nikita Kniazev
660d8ac3c1 X3.Tests: Fix odd temporary attribute creation 2019-02-26 21:23:43 +03:00
Nikita Kniazev
793d89619c X3: Move only types with optional 2019-02-26 21:23:43 +03:00
Nikita Kniazev
8bd9b6ece4 X3: Fixed container of move only types with sequence 2019-02-26 21:23:43 +03:00
Nikita Kniazev
f371ccf6d0 X3: push_back has to forward actual reference type
Added tests for move only types in kleene, plus, list, and repeat parsers
2019-02-26 21:23:43 +03:00
Nikita Kniazev
92596fe02e Fix extract_int test std::pow problems 2019-02-22 04:26:47 +03:00
Nikita Kniazev
4b1b710322 extract_int: Fixed underflow check for (MinOrMax % Base) == 0 2019-02-21 20:21:12 +03:00
Nikita Kniazev
7d3cf1da6d Make extract_int respect std::numeric_limits<T>::digits10 2019-02-21 20:21:12 +03:00
Nikita Kniazev
5ea06d04bd Refactor extract_int test 2019-02-21 02:40:31 +03:00
Nikita Kniazev
0810e33c69 Remove broken 1.0#INF parser
It was poorly documented and never worked correctly. None of atof, strtof, and
input streams are accepting such values. Fixing it would be a bigger breaking
change than removing it.

Fixes #415, addresses #163 and https://svn.boost.org/trac10/ticket/8699
2019-02-10 02:43:40 +03:00
Nikita Kniazev
b5f1552ec2 X3: Perform attribute transformation before calling parse_rule
This will deal with linking problems when rule attribute type is not the same
as the actual attribute type. It will not harm anyone as the transformation
after parse_rule will just pass-through the attribute because it will be the
same there. It will also do not alter rule_definition parsing so other usages
are still valid.
2019-02-08 21:55:11 +03:00
Nikita Kniazev
afe763b61e X3: Fixed static assert on parse_rule instantiation
During overload resolution disallowed signature can be instantiated leading
to firing the static assertation and overload resolution failure. I could
just remove it, but do not want to leave unbounded by value overloads;
replacing to not deducing Attribute with specifying a default parameter will
not work because we want to allow `BOOST_SPIRIT_DECLARE` without prior
`BOOST_SPIRIT_DEFINE` - this requires having default parameters in both
declaration and definition and the standard seems to forbid it (GCC - fine,
MSVC - warning, Clang - error).

Reverts #437, fixes #453.
2019-02-08 14:51:35 +03:00
Nikita Kniazev
5663d7d39d X3: Added tests for non-movable and non default constructible types 2019-02-07 14:57:45 +03:00
Nikita Kniazev
c915ac4170 X3: rule: Skip attribute synthesization on unused actual attribute
There is a mistake in `make_attribute` trait that leads to synthesization and
immediately throwing out an attribue, so rule context always was unused_type
when actual attribute is unused_type (added test for this case). Instead of
fixing `make_attribute` trait I just completely removed synthesization in
rule by removing `make_attribute` trait usage (the traits could be removed
after a simple change in 'action' parser). I think the change is better
than fixing the trait because it removes excessive attribute default
construction in every rule and makes rule almost free to use.
2019-02-06 16:42:07 +03:00
Nikita Kniazev
9293cbee5e X3.Tests: Added some rule attribute advertising tests 2019-01-26 17:32:04 +03:00
Nikita Kniazev
a3cf3f2c3e X3: Fixed wrong parse_rule signature instantiation
When a rule has no attribute (leaves `Attribute` template parameter as default)
the `BOOST_SPIRIT_INSTANTIATE` macro instantiates a `parse_rule` helper function
with a wrong signature because `parse`, `phrase_parse`, and `skip_over` pass as
the attribute `unused` variable which deduces to `unused_type const&` type, but
`BOOST_SPIRIT_INSTANTIATE` instantiates `parse_rule` with `unused_type&` type.
2019-01-26 17:32:04 +03:00
Nikita Kniazev
d80d32f892 X3: Removed sequence into plain parsing
The possibility to parse `int_ >> int_` into `int` is dangerous and hides the
actual bugs in user parsers (and in Spirit too).
2019-01-21 03:06:53 +03:00