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

350 Commits

Author SHA1 Message Date
Rene Rivera
d85a0f485a Change math dep real target math/tr1. 2024-08-11 09:23:25 -05:00
Rene Rivera
c31939d691 Make the library modular usable. 2024-03-11 08:38:16 -05:00
Nikita Kniazev
d4d4b8e9d8 Tests: Boost.Math drops MSVC 14.0 support 2024-02-23 07:42:12 +03:00
Nikita Kniazev
bda34254dc Tests: fix missing sstream includes 2023-03-18 18:06:07 +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
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
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
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
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
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
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
1a627fccd0 raw directive handles_container should alway be true 2021-02-27 15:37:58 +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
9a9bbcfb2e Disable Boost.Math real_concept on C++03 (it now requires C++11) 2021-02-09 01:02:12 +03:00
Malcolm Parsons
6821c8208b Update char_class.hpp
boost/spirit/home/support/char_encoding/standard.hpp:59: static bool boost::spirit::char_encoding::standard::isalnum(int): Assertion `strict_ischar(ch)' failed.
2020-09-02 15:02:29 +01:00
Nikita Kniazev
4cfb7e34f5 Add basic optional tests
Those seems to be missing for some reason
2020-06-12 18:52:15 +03:00
Nikita Kniazev
032ad1f0fb Cease dependence on Boost.Iostreams
I expect this to be faster because of removing a layer of buffering, though
I have not benchmark it.
2020-05-26 01:21:18 +03:00
Nikita Kniazev
7711a652c5 Sync with master branch 2020-04-23 23:33:31 +03:00
Nikita Kniazev
785a5f35d2 Refix to_utf8 for MinGW and Clang on Windows 2020-04-21 02:12:06 +03:00
Nikita Kniazev
475877a3da Fix -Wdeprecated-comma-subscript 2020-04-12 22:13:32 +03:00
Nikita Kniazev
219c50f184 Qi.Tests: range_run: Narrow included Boost.Random headers
Try to avoid warnings coming from Boost.Random by including only needed parts
2020-04-04 22:24:25 +03:00
Nikita Kniazev
ee9c7214c4 Port to B2 forced-include feature 2020-04-04 15:30:21 +03:00
Nikita Kniazev
fb52246a00 Remove deprecated Boost.Bind global placeholders usage 2020-03-30 20:28:10 +03:00
Nikita Kniazev
5518a7a60a Qi: Removed interfering specializations from including auto
The specializations replace literal char parsers with auto parser that does
not perform attribute matching.
2020-03-14 16:52:54 +03:00
Kevin Puetz
c0288e1e8b _WIN32 does not always imply wchar_t is UTF-16
Win32 only defines the types from wtypes.h, like WCHAR, LPWCSTR, etc.
These may or may not be the same thing as wchar_t.

MinGW, cygwin, and wineg++ all support f(no-)short-wchar,
with the caveat that libstdc++ must be compiled with the same option.
Doing so is quite unusual for MinGW or cygwin, but more common for wineg++
as it enables building a winelib app with system glibc/libstdc++.
Win32's WCHAR is then unsigned short, or with C++11 perhaps char16_t.

MSVC does explicitly document that its wchar_t is always UTF16:
https://docs.microsoft.com/en-us/cpp/cpp/char-wchar-t-char16-t-char32-t?view=vs-2019

C99/C++11 compilers should provide __STDC_ISO_10646__ if wchar_t is unicode

GCC, Clang, and ICC all provide __SIZEOF_WCHAR_T__ to distinguish
-fshort-wchar (defaulted by mingw/cygwin) from -fno-short-wchar
https://gcc.gnu.org/onlinedocs/gcc-9.2.0/cpp/Common-Predefined-Macros.html

This takes the approach of assuming that a 2-byte unicode wchar_t
might be UTF-16 (and still works if its's actually UCS-2, it just never
finds any surrogate pairs), and 4-byte unicode must be UCS-4.
2020-01-29 23:14:01 -06:00
Brian Wignall
5bdefe59a7 Fix typos 2019-12-27 21:49:15 -05:00
Nikita Kniazev
156bd18d17 Narrow Proto and Phoenix inclusion
Include needed parts at place where they are needed instead of including the
whole Proto library and significant parts of Phoenix in a few places.

Parsing time reported by Clang 9 with default (C++14) std:

was |now |gain|include
----|----|----|----------
4.45|4.22|5.2%|qi
4.52|4.23|7.5%|karma
4.37|3.99|9.7%|lex
3.75|3.47|7.5%|qi_numeric

There were phoenix/limits.hpp inclusion before every Proto inclusion to override
Proto limits with Phoenix limits values. It has no value in C++11+ world, and
poisons code too much as the number of places where Proto headers now included
increased, so I did not replicate it.
2019-11-29 03:20:30 +03:00
Nikita Kniazev
7771d20cc7 Fix MSVC C4127 warnings 2019-09-30 01:29:29 +03:00
Nikita Kniazev
75f66ccc0f Suppress bogus MSVC C4428 warning 2019-09-29 01:36:26 +03:00
Nikita Kniazev
db5799558d Fix MSVC C4189 warnings 2019-09-28 19:10:10 +03:00
djowel
16159fb335 add invalid ascii tests + fix 2019-08-26 10:24:20 +08:00
Joel de Guzman
80bb2a9fab Fix for https://github.com/boostorg/spirit/issues/503. Float compariso is tricky. eps for comparision is wrong in some cases. 2019-05-05 03:18:19 +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
be7640bd69 Fix for https://github.com/boostorg/spirit/issues/421
WIP: https://svn.boost.org/trac10/ticket/11608
2019-04-25 18:12:45 +08:00
Romain Geissler
295ad6710a Explicitly delete all non implemented assignment operators.
Commit (almost) automatically generated with the following sed command:
sed -i -ne '1h;1!H;${g;s|\n[[:blank:]]*private:\n\([[:blank:]]*\)// silence MSVC warning C4512: assignment operator could not be generated\n\([[:blank:]]*\)\([^\n]\+\);\n|\n\1// silence MSVC warning C4512: assignment operator could not be generated\n\2BOOST_DELETED_FUNCTION(\3);\n|g;p}' $(git ls-files)

Then all files in the x3 subfolder were reverted to HEAD, and manually
updated to use " = delete" instead of BOOST_DELETED_FUNCTION.
2019-04-16 22:35:52 +00:00
Nikita Kniazev
e92f491a54 Qi.Tests: Suppress -Wuninitialized in direct initialization test 2019-03-06 21:10:54 +03:00
Nikita Kniazev
fc39ec12c9 Qi.Tests: rule1: Fixed -Wuninitialized warning
libs/spirit/test/qi/rule1.cpp:75:47: warning: variable 'start' is uninitialized when used within its own initialization [-Wuninitialized]
2019-03-04 00:27:36 +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
7b3939f133 Tests: Fix some of maybe uninitialized warnings 2019-03-01 01:12:00 +03:00
Nikita Kniazev
eb8eeb2fbc extract_uint: Fixed IgnoreOverflowDigits=true problem at overflow
The IgnoreOverflowDigits=true parser always succeeds and because of that it
expects from the digits parser that a number passed as inout argument will be
changed only on success.

Changed negative_accumulator and X3 for consistency.
2019-02-22 15:13:02 +03:00
Nikita Kniazev
92596fe02e Fix extract_int test std::pow problems 2019-02-22 04:26:47 +03:00