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

4831 Commits

Author SHA1 Message Date
Nikita Kniazev
f7a2fdda4b Revert "Workaround qi_repo_keywords test fail on MSVC-14.1"
This reverts commit 87f8787968.
2020-03-13 16:48:05 +03:00
Nikita Kniazev
f569990d10 X3: constexprize attr from array types 2020-03-07 14:27:56 +03:00
Nikita Kniazev
8e94d8d783 X3: Extensive constexpr testing and fixes (#572)
I have replaced the shallow constexpr test and fixed revealed missing parts.
2020-03-06 04:17:29 +03:00
Han
889babc383 X3: constexprize parsers constructors (#570) 2020-03-04 18:18:02 +03:00
Nikita Kniazev
dc14c73dcb Missing license plate in .appveyor.yml 2020-03-03 21:38:19 +03:00
Nikita Kniazev
abc2a97cf9 CI: Test with both asserts on and off
Did not make the same to Appveyor because it will be a big time hit
2020-03-03 21:38:19 +03:00
Nikita Kniazev
e63f0d337b CI: B2 now uses all available cores by default 2020-03-03 19:14:24 +03:00
Nikita Kniazev
5cbe6361cc CI: B2 bootstrap now prints errors to console 2020-03-03 19:07:58 +03:00
Nikita Kniazev
3b0b5f9d30 CI: link=shared is the default value 2020-03-03 19:07:56 +03:00
Nikita Kniazev
b731f90cd6 Merge pull request #571 from Kojoley/ci-alternate-rule-static-initialization-fiasco-check
X3: Alternate rule placeholder static initialization fiasco check
2020-03-03 14:40:04 +03:00
Nikita Kniazev
9d4f74f651 X3: Alternate rule placeholder static initialization fiasco check
The previous check was done in a very intrusive way, it also was not catching
the issue when a parser is not inherited from `unary_parser`/`binary_parser`.
2020-03-02 20:57:50 +03:00
Joel de Guzman
f35433f983 Merge pull request #568 from puetzk/no-short-wchar
_WIN32 does not always imply wchar_t is UTF-16
2020-01-30 15:08:41 +08: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
Nikita Kniazev
5837ee38b0 Unprefixed macro in subrules 2020-01-16 17:41:28 +03:00
Nikita Kniazev
82f2710d8d make_vector.hpp: Remove obsolete branch 2020-01-16 17:39:30 +03:00
djowel
b0741bdee6 Take advantage of constexpr. No more big hard coded table. (reverted from commit 793c070d1f) 2020-01-16 00:17:48 +08:00
Nikita Kniazev
3a6459a810 Sync with master branch 2020-01-09 21:16:02 +03:00
Brian Wignall
d6a58f7b7b Fix typos 2020-01-09 21:11:48 +03:00
Nikita Kniazev
81b6b2518b Prefix header include guards with BOOST_SPIRIT_ 2020-01-09 21:11:48 +03:00
Nikita Kniazev
1160634bb7 Added static assertion for meaningless rule attribute qualifiers
```cpp
x3::rule<class _, T>              // ok
x3::rule<class _, T const>        // ok, but strange
x3::rule<class _, T&>             // meaningless reference
x3::rule<class _, T const&>       // meaningless reference

qi::rule<char const*, T()>        // ok
qi::rule<char const*, T const()>  // ok, but strange
qi::rule<char const*, T&()>       // meaningless reference
qi::rule<char const*, T const&()> // meaningless reference

ka::rule<char const*, T()>        // ok
ka::rule<char const*, T const()>  // meaningless const
ka::rule<char const*, T&()>       // meaningless reference
ka::rule<char const*, T const&()> // meaningless const and reference
```
2020-01-09 21:11:48 +03:00
Nikita Kniazev
c0580c2d2e Cease dependence on Algorithm 2020-01-09 21:11:48 +03:00
Nikita Kniazev
6c30748fc9 Move Unicode tables generator out of includes 2020-01-09 21:11:48 +03:00
Nikita Kniazev
8418442b48 Cease dependence on LexicalCast
Some examples still use it. I see updating them to C++11 a better option.
2020-01-09 21:11:48 +03:00
Nikita Kniazev
ab80215d37 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.
2020-01-09 21:11:48 +03:00
Nikita Kniazev
282dadc49e X3: Remove TTI usage 2020-01-09 21:11:48 +03:00
Nikita Kniazev
fd7f246dd7 Classic: assert.hpp: Trim headers inclusion 2020-01-09 21:11:48 +03:00
Nikita Kniazev
93fa06a972 utree/operators: Fixed unused parameter warnings 2020-01-09 21:11:48 +03:00
Nikita Kniazev
f9d632acd3 Use data() method to obtain pointer underlying bytes 2020-01-09 21:11:48 +03:00
Nikita Kniazev
c19837987f X3.Tests: Added missing test case for c60d93f 2020-01-09 21:11:48 +03:00
Nikita Kniazev
c71131ec5f X3: Hide unused_type streaming operators
The `unused_type` has an implicit constructor from any type, because of that
ADL can find and match its streaming operator for any type.
2020-01-09 21:11:48 +03:00
Nikita Kniazev
fa2373580b V2: Use Boost.Endian
And drop in-house implementation.
2020-01-09 21:11:48 +03:00
Joel de Guzman
74773790f7 Merge pull request #565 from bwignall/typo
Fix typos
2019-12-28 11:16:26 +08:00
Brian Wignall
5bdefe59a7 Fix typos 2019-12-27 21:49:15 -05:00
Joel de Guzman
d08533eccc Merge pull request #563 from Kojoley/header-include-guards-prefix
Prefix header include guards with BOOST_SPIRIT_
2019-12-17 07:11:46 +08:00
Nikita Kniazev
66f1787c4c Prefix header include guards with BOOST_SPIRIT_ 2019-12-16 20:54:42 +03:00
Joel de Guzman
4bfc7022f8 Merge pull request #561 from Kojoley/v2-meaningless-qualifiers-on-rule-attribute
Added static assertion for meaningless rule attribute qualifiers
2019-12-07 22:10:41 +08:00
Nikita Kniazev
648295209a Added static assertion for meaningless rule attribute qualifiers
```cpp
x3::rule<class _, T>              // ok
x3::rule<class _, T const>        // ok, but strange
x3::rule<class _, T&>             // meaningless reference
x3::rule<class _, T const&>       // meaningless reference

qi::rule<char const*, T()>        // ok
qi::rule<char const*, T const()>  // ok, but strange
qi::rule<char const*, T&()>       // meaningless reference
qi::rule<char const*, T const&()> // meaningless reference

ka::rule<char const*, T()>        // ok
ka::rule<char const*, T const()>  // meaningless const
ka::rule<char const*, T&()>       // meaningless reference
ka::rule<char const*, T const&()> // meaningless const and reference
```
2019-12-06 18:47:03 +03:00
Nikita Kniazev
aefd4cf658 Pull changelog from master 2019-12-06 01:25:03 +03:00
Nikita Kniazev
9de1409587 Changelog update. Closes #555 boost-1.72.0 2019-12-06 01:23:08 +03:00
Joel de Guzman
e2f1b53306 Merge pull request #560 from Kojoley/cease-dependence-on-algorithm
Cease dependence on Boost.Algorithm
2019-12-02 09:02:05 +08:00
Nikita Kniazev
20125d4298 Cease dependence on Algorithm 2019-11-30 20:09:00 +03:00
Nikita Kniazev
738506b62f Move Unicode tables generator out of includes 2019-11-30 20:08:05 +03:00
Nikita Kniazev
a0f1b2259d Cease dependence on LexicalCast
Some examples still use it. I see updating them to C++11 a better option.
2019-11-30 01:58:20 +03:00
Nikita Kniazev
8e05383b0c Narrow Proto and Phoenix inclusion (#558)
Narrow Proto and Phoenix inclusion
2019-11-29 13:37:20 +03: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
0d395b6841 X3: Remove TTI usage 2019-11-25 17:15:36 +03:00
Nikita Kniazev
9cacca14fd Classic: assert.hpp: Trim headers inclusion 2019-11-24 22:01:29 +03:00
Nikita Kniazev
2945bcf65f utree/operators: Fixed unused parameter warnings 2019-11-23 14:58:13 +03:00
Nikita Kniazev
b6523737d9 Use data() method to obtain pointer underlying bytes 2019-11-23 14:58:02 +03:00
Nikita Kniazev
aa17a024c3 X3.Tests: Added missing test case for c60d93f 2019-11-20 14:54:01 +03:00