2
0
mirror of https://github.com/boostorg/spirit.git synced 2026-01-19 04:42:11 +00:00

1057 Commits

Author SHA1 Message Date
Nikita Kniazev
250e78ad0d Tests: fix missing sstream includes (more) 2023-03-18 22:41:52 +03:00
Nikita Kniazev
bda34254dc Tests: fix missing sstream includes 2023-03-18 18:06:07 +03:00
Nikita Kniazev
3e763336e4 Trim std stream headers inclusion 2023-03-17 22:53:33 +03:00
Nikita Kniazev
fe3675ea09 Tests: Suppress C++03 deprecation warnings from other libraries 2023-03-17 22:50:13 +03:00
Nikita Kniazev
15362c0263 to_utf8: more tests 2023-03-17 03:36:25 +03:00
Nikita Kniazev
2599b2b3d5 Test: line_pos_iterator: test both forward and bidirectional paths 2023-03-13 00:32:26 +03:00
Nikita Kniazev
b0237057c8 line_pos_iterator: fix multiple consequence CRLF/LFCR handling 2023-03-08 21:49:37 +03:00
Nikita Kniazev
dc4fbd9a09 Tests: Refactor line_pos_iterator test 2023-03-08 21:49:37 +03:00
Nikita Kniazev
56b5c28fca Tests: Remove regression_ prefix from test names 2023-03-07 23:26:54 +03:00
Mikalai Ananenka
b66e502058 Update Unicode scripts; fix mapping for Unicode general category 'Unassigned' and script 'Unknown' 2022-12-05 03:52:43 -05:00
Nikita Kniazev
859fd9cf85 Karma: real generator off by a magnitude due to log10 rounding up 2022-09-23 00:05:16 +03:00
Nikita Kniazev
e692051e25 Fix Clang 13 -Wdeprecated-copy 2022-09-13 04:13:24 +03:00
Nikita Kniazev
30ed090a15 Tests: Boost.Math will require C++14 soon 2022-06-27 21:55:59 +03:00
djowel
da9968dbdf Fixes #725 2022-06-01 10:22:27 +08:00
Nikita Kniazev
7b7a09db8c X3: Return back iterator pre-skipping for on_success handler
Reverts the wrong part of #686.
2022-01-21 02:28:58 +03:00
Nikita Kniazev
2f5c2cb718 X3: Fix on_success dispatcher inverted iterator const/mutability
Instead of usual `[current, end)` pair it receives `[before, current)` pair.
2022-01-15 20:28:48 +03:00
Nikita Kniazev
abd946b00d Tests: Limit -Wno-deprecated-copy to GCC 9-11
To avoid 'unrecognized command line option "-Wno-maybe-uninitialized"' warning
2021-12-17 22:19:40 +03:00
Nikita Kniazev
2a231e81a3 Lex: Fix warning C4458: declaration of 'varname' hides class member 2021-12-17 21:18:18 +03:00
Nikita Kniazev
551d4b6d79 Rework known warning suppression 2021-12-17 04:21:28 +03:00
Nikita Kniazev
bff0126954 CI: Re-enable -Wdeprecated-copy on Clang 2021-12-17 04:21:28 +03:00
Roel Standaert
e4092c6f3b Karma: fix off by factor 10 error when rounding to integer
This fixes issue #688. There's some code that divides the integer part
by 10 and increases dim to compensate for it. This code is not
applicable to fixed notation, however, since dim is disregarded in that
case, causing the result to be off by a factor 10.

We can fix this by checking if we're not using fixed notation first,
before doing the division.

Added a few tests to check for this regression.
2021-12-17 01:12:53 +03:00
Nikita Kniazev
48c19a96ff Fix swapped parameters to is_substitute
It seems that confusion in template parameters naming lead to mistakenly swapped types to `is_substitute`. The code to X3 have been brought from Qi with the same mistake, but I do not know how to trigger it in Qi.
2021-10-20 15:49:13 +03:00
Nikita Kniazev
4ea7e3a7b7 Deprecate Phoenix transition headers
There is no purpose in these transition headers, Phoenix V2 was removed 8 years ago.
2021-09-28 22:24:57 +03:00
Nikita Kniazev
0821b0d877 Improve headers self-sufficiency
Closes #695
2021-08-28 23:43:28 +03:00
Nikita Kniazev
f44479bcd3 Remove boost/config/warning_disable.hpp usage
It is better to manage warnings on our side to know what warnings we need to fix or suppress, and the only thing that header does is disabling deprecation warnings on MSVC and ICC which we would prefer to not show to users.
2021-08-24 03:14:12 +03:00
Nikita Kniazev
bbb020e221 Remove unused boost/mpl/print.hpp includes 2021-08-23 22:35:47 +03:00
Nikita Kniazev
6a7c758376 Switch to the new location of lightweight test
Old location had been deprecated for a long time already.
2021-08-23 21:45:17 +03:00
Nikita Kniazev
d2edfa1f36 X3.Tests: Additional tests for attr/raw/string 2021-06-27 20:55:28 +03:00
Nikita Kniazev
62dd237c61 Cease dependence on Foreach
I have not touch examples because they are not affecting Spirit usage and testing dependencies, and modernizing them also seems like a waste of time when we encourage to start new projects with X3 instead of Qi.
2021-06-20 23:04:34 +03:00
Nikita Kniazev
2db3fde0d0 X3: Remove forced iterator rollback in rule
Removes inconsistency when a parser part is factorized into a rule.

Fixes regression introduced in #670.
2021-06-03 16:46:12 +03:00
Nikita Kniazev
705954734d Workaround bogus MSVC C4709 warning
It has been 10+ years since the false-positive was reported to MSVC developers, but still it is not fixed. My bug report in the new MSVC bug tracker https://developercommunity.visualstudio.com/t/buggy-warning-c4709/471956 seen no motion in two years.
2021-05-30 23:46:56 +03:00
Nikita Kniazev
6782289761 X3: Fix seek goes past the end of input
Reverts #30. Fixes #658.
2021-05-29 16:34:50 +03:00
Nikita Kniazev
9d37a0622f X3: Fix encoding char cast type
6821c8208b port to X3
2021-05-24 19:06:07 +03:00
Nikita Kniazev
db8bdf3d71 Fix GCC -Wshadow-local and MSVC C4457
GCC bug reported https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100608

Fixes #676
2021-05-17 03:02:19 +03:00
Nikita Kniazev
0e15dd13bb Fix MSVC C4456 2021-05-17 03:01:58 +03:00
Calvin Cramer
32b40e9f82 Proper double-precision floating point hex representation of 1.0 for big-endian tests 2021-05-06 15:09:17 +03:00
Nikita Kniazev
e30073e5be X3: error_handler should not skip whitespaces
A skipper does this already and Spirit usually does not roll back skipper work. When there is no skipper, skipping whitespaces is absolutely wrong thing to do. For example, an error points to an end of the word where an additional input is expected, but there are whitespaces after it.

The `skip_whitespace`/`skip_non_whitespace` were removed since they are not used anymore, and because they are also could trigger UB on a particular input due to unsafe `std::isspace` usage.
2021-04-26 14:49:49 +03:00
Rudolf Lovrenčić
487030e495 X3: Fix error_handler::get_line_start (#669)
Now it returns an iterator to the actual start of the line.

Co-authored-by: Nikita Kniazev <nok.raven@gmail.com>
2021-04-25 02:24:13 +03:00
Nikita Kniazev
703ec533d8 X3: Optional parser is not a passthrough parser
Removes flat sequence parser through optional to fix:
* Non-flat `tuple<..., optional<tuple<...>>, ...>` parsing.
* Optional container parsing when it is a part of the sequence and the optional parser subject is a sequence too.

The removed test cases are invalid (see #664) variants of flat through optional. There are a valid ones (like `int_ >> -(int_ >> int_)` into `tuple<int, optional<int>, optional<int>>`) that would be broken after the change, but at the moment I do not have a popper way to make it work.
2021-04-24 03:45:09 +03:00
Nikita Kniazev
7c4c65cfc0 X3: Fix list parser's has_attribute
List parser has an attribute only when its subject has (left operand of %).
2021-04-12 03:38:52 +03:00
Nikita Kniazev
dd1359cb42 Remove pointless self version check 2021-04-11 18:01:39 +03:00
Nikita Kniazev
30e1fd440d X3.Tests: rule2: Workaround Clang<3.9 compile error 2021-03-18 05:03:02 +03:00
Nikita Kniazev
9022707552 X3: Skip rule definition injection into context
When a rule placeholder constructed and immediately consumed it cannot be used recursively, that's why the rule definition injection into a parser context can be skipped.
This optimization has a huge impact on compile times because immediate rules are commonly used to cast an attribute like `as`/`attr_cast` does in Qi.
2021-03-03 03:40:24 +03:00
Nikita Kniazev
2096077943 X3: Fix multiple times missed force_attribute parameter
Switched `parse_rule` to dispatch only on the rule id only instead.
2021-03-01 04:42:05 +03:00
Nikita Kniazev
1a627fccd0 raw directive handles_container should alway be true 2021-02-27 15:37:58 +03:00
Nikita Kniazev
358246673b X3.Tests: Fix some C4244 warnings 2021-02-25 21:50:24 +03:00
Nikita Kniazev
4ac3610377 X3.Tests: Fix error C2177: constant too big 2021-02-25 02:44:46 +03:00
Nikita Kniazev
75f67327fb X3.Tests: Fix flacky real comparison
The bigger integer part is, the less digits could mantissa represent exactly.
2021-02-25 00:40:04 +03:00
Nikita Kniazev
c4274111d8 X3: Fix unqualified get call
`boost::get` was unintentionally instantiated, leading to compilation error
2021-02-20 21:48:01 +03:00
Nikita Kniazev
9643bbdf4c Replace Boost.Math with Boost.Core/std alternatives
It might cost us backward compatibility with ancient compilers, exotic platforms,
and yield a performance difference on MSVC, but Boost.Math is C++11 now, and
Clang-cl can (or even should) be used instead of MSVC where performance matters.
2021-02-15 15:21:12 +03:00