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

5177 Commits

Author SHA1 Message Date
Nikita Kniazev
8543f074ae Changelog for Boost 1.77 release 2021-08-04 20:25:46 +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.
boost-1.77.0.beta1
2021-06-20 23:04:34 +03:00
Nikita Kniazev
c58a369ab8 CI: Upgrade Clang and GCC compilers 2021-06-03 19:10:49 +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
e8b4b10d1e Lex: Change token id storage type
The storage type need to be able to store `boost::lexer::npos` value.

Fixes MSVC C4310 warning: cast truncates constant value.
2021-05-31 18:24:21 +03:00
Nikita Kniazev
8c21a3944a Reenable MSVC C4996 warning
I seems to had fixed all the instances already.
2021-05-31 18:24:21 +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
56b4a5b99c X3.Docs: Fix typo (wrong tag)
Closes #667
2021-04-21 17:27:10 +03:00
Nikita Kniazev
3ac3451eaa Qi: Fixed keyword list parser Fusion adapt ADT handling
Closes #666
2021-04-19 22:17:22 +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
theidexisted
ac63f8e6b5 Remove unused using declaration 2021-04-01 21:12:27 +03:00
Nikita Kniazev
880080ee8b 1.76 changelog boost-1.76.0 2021-03-20 18:08:14 +03:00
Peter Dimov
be4c28e4b7 Add CMakeLists.txt 2021-03-18 17:38:29 +02:00
Nikita Kniazev
30e1fd440d X3.Tests: rule2: Workaround Clang<3.9 compile error 2021-03-18 05:03:02 +03:00
Nikita Kniazev
c5d0b5faf6 include unicode header only when BOOST_SPIRIT_X3_UNICODE is defined 2021-03-15 18:33:11 +03:00
Nikita Kniazev
c2a4af9065 boost::integer_traits had been replaced with std::numeric_limits 2021-03-15 18:31:40 +03:00
Nikita Kniazev
841eeb2d96 X3.Docs: Remove parse_rule implementation details
It is hard to not forget to keep in sync these while anyone interested could simply go to the macro definition, moreover users should not rely on the implementation details and telling this info may make it seem like `parse_rule` is a public API.
boost-1.76.0.beta1
2021-03-07 20:34:55 +03:00
Joel de Guzman
17cbb60c6f Merge pull request #656 from sdarwin/githubactions
GitHub Actions config
2021-03-06 07:24:55 +08:00
sdarwin
5149160931 Add GitHub Actions config [ci skip] 2021-03-05 16:28:37 +00: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
8e9bd6fa9d We are clean for C4003, reenable the warning 2021-03-02 18:55:16 +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
f3cff61408 X3 does not support exporting rules. Closes #517 2021-02-27 22:48:16 +03:00
Nikita Kniazev
476b168c40 X3: Fix C4244 in ignore_excess_digits. Closes #637 2021-02-27 22:10:24 +03:00
Nikita Kniazev
1a627fccd0 raw directive handles_container should alway be true 2021-02-27 15:37:58 +03:00
Nikita Kniazev
bcf1922089 X3: Fix another unqualified get call. Closes #526 2021-02-27 02:43:05 +03:00
Nikita Kniazev
d90a2010e9 Fix warning C4702: unreachable code 2021-02-26 05:06:25 +03:00
Nikita Kniazev
358246673b X3.Tests: Fix some C4244 warnings 2021-02-25 21:50:24 +03:00
Nikita Kniazev
c65b49c15f X3: Make literal binary parser constructor non-templated
Addresses annoying conversion warnings in expressions like `byte(0)` where `int` to `uint8_t` conversion happened deeply is Spirit rather than in a user code.
2021-02-25 21:49:29 +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
e286272e70 X3: Remove unused header no_case_string_parse 2021-02-21 23:31:12 +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
Julianus Pfeuffer
50a3e6a725 Karma: Do not hardcap precision of real_inserter (#586)
Users should be able to decide how much mantissa digits they want to print.

Co-authored-by: Nikita Kniazev <nok.raven@gmail.com>
2021-02-15 16:54:50 +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
Nikita Kniazev
523a2d3714 parse_rule: skip rule definition binder creation
Not all of our parsers are constexpr constructible, and static local variable is
not free for these.
2021-02-09 17:22:35 +03:00
sdarwin
f7ca100219 add drone config [ci skip] 2021-02-09 16:08:21 +03:00
Nikita Kniazev
9a9bbcfb2e Disable Boost.Math real_concept on C++03 (it now requires C++11) 2021-02-09 01:02:12 +03:00
Nikita Kniazev
f3998fb2bb Missing inline keyword. Fixes #638 2021-01-26 23:16:25 +03:00
Joel de Guzman
da18e0b79e Merge pull request #641 from eldiener/develop
[skip ci] Add "cxxstd" json field
2021-01-22 08:03:46 +08:00