2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-27 07:02:12 +00:00
Commit Graph

384 Commits

Author SHA1 Message Date
Zach Laine
150e09e309 Flesh out conditional transform_replace_view enable_borrowed_range; fix
missing std::ranges:: on it and other enable_borrowed_range specializations.
2024-02-10 19:43:07 -06:00
Zach Laine
d0208fb12c Add transform_replace range adaptor and transform_replace_view. 2024-02-10 18:42:18 -06:00
Zach Laine
ae0448e321 Restore enable_variant, to fix errors in printing of the badly-broken
boost::variant.

Fixes #88.
2024-02-04 16:16:47 -06:00
Zach Laine
7f287c5525 Fix error in no_case[] evaluation. 2024-02-01 20:38:41 -06:00
Zach Laine
f9ebf50228 auto -> bool for null_sentinel_t op== for compatibility with
equality_comparable_with on Clang.
2024-02-01 17:21:53 -06:00
Zach Laine
d0cf708ef5 Address TODO about needed fix in compile_seq_attribute test. 2024-01-31 20:52:16 -06:00
Zach Laine
ec5fc2ed85 Turn detail::char_{set,subranges} into structs to fix MSVC build. 2024-01-30 23:31:01 -06:00
Zach Laine
4b59719e44 Add Unicode versions of most of the ascii namespace parsers; remove the ascii
namespace.
2024-01-29 23:36:03 -06:00
Zach Laine
e06f415134 Fix broken macro guards on use of std::ranges which was breaking GCC >= 12. 2024-01-29 00:54:22 -06:00
Zach Laine
7d8f4d811a Fix older GCC builds. 2024-01-28 16:39:34 -06:00
Zach Laine
a337c16e3c Add missing #include <array> to all_t.hpp. 2024-01-28 16:23:40 -06:00
Zach Laine
2e49e5d61b Another MSVC C++17 build fix; make text::detail::ref_view reject rvalues. 2024-01-28 16:18:43 -06:00
Zach Laine
df6a3db364 Fix MSVC C++17 build, by adjusting the heuristic used by view trait used in
all().
2024-01-28 15:49:04 -06:00
Zach Laine
7d983817cc Re-enable conditional use of concepts in detail::text code on MSVC. 2024-01-28 15:38:15 -06:00
Zach Laine
4d14fba7fd Change concept can_utf_view to use the form MSVC uses in its std lib, and turn
off code relying on alias CTAD on MSVC.  Add test cases for {w,}string{,_view}
| as_utfN in C++20 builds.
2024-01-28 15:34:51 -06:00
Zach Laine
01f2f21899 Fix MSVC build. 2024-01-28 14:09:12 -06:00
Zach Laine
473910bd52 Remove spurious is_pointer_v check in detail::to_range. 2024-01-28 14:04:25 -06:00
Zach Laine
9d1a6aeeb3 Extend all_t test to test arrays; fix errors. 2024-01-28 14:03:02 -06:00
Zach Laine
33edb6c4e8 Add all_t, and use it in non-concepts builds.
Fixes #85.
2024-01-28 02:07:07 -06:00
Zach Laine
ab4d708c30 Set the out-param to Attr() on parse failure (for the overloads taking an
out-param), making alls to parse() consistent with calls to parsers. Parsers
clear the attribute on failure. Add a section to rationale on why this is the
right choice.

Fixes #78.
2024-01-28 01:17:17 -06:00
Zach Laine
e7efe90a03 In detail::assign, static_assert that the assignment is not arithmetic-type ->
std::string.

Fixes #76.
2024-01-28 01:17:06 -06:00
Zach Laine
ac84ed63b6 Cruft removal. 2024-01-27 20:36:00 -06:00
Zach Laine
fc6a643a99 Add a real no-format enumerator to text::format. 2024-01-27 20:35:56 -06:00
Zach Laine
c328a18121 Add a Doxygen comment description for replace_view. 2024-01-22 21:51:23 -06:00
Zach Laine
3549ad64a8 Disable replace/replace_view entirely in MSVC C++17 builds. 2024-01-23 03:36:38 -06:00
Zach Laine
275874f3c6 Fix misplaced #endif. 2024-01-23 03:08:34 -06:00
Zach Laine
4ce4d8ba0e Fix typo in stl_interfaces::adaptor (f/f_ confusion). 2024-01-22 01:35:26 -06:00
Zach Laine
a68d4f61b2 Add replace_view and range adaptor replace. 2024-01-22 01:11:17 -06:00
Zach Laine
d1309560df Add detail::maybe_const, and use it properly in search_all_view and
split_view.
2024-01-21 15:40:51 -06:00
Zach Laine
bbb1cba804 Fix the broken support for operating on C-style strings in search{(),_all} and
split.
2024-01-21 15:31:31 -06:00
Zach Laine
a6db478691 Add is_range_like trait to stand in for the new concept in C++17 code. 2024-01-21 15:31:31 -06:00
Zach Laine
9bd38a51f6 Concept parsable_code_unit -> code_unit; add range_like concept. 2024-01-21 15:31:31 -06:00
Zach Laine
8df56b083d Bring in fix for dangling temporaries from Boost.STLInterfaces. 2024-01-21 15:31:31 -06:00
Zach Laine
1aa95127f0 Only enable the previous fix in post-C++17 builds. Sigh. 2024-01-20 03:36:44 -06:00
Zach Laine
eb68bacfbb Fix improperly macro-disabled enable_borrowed_range specializations, to fix
MSVC builds.
2024-01-20 09:28:44 -06:00
Zach Laine
5adef16a4d Add split_view + split range adaptor. split produces a range of subranges,
each of which is a nonoveralpping match of the given parser.

Fixes #64.
2024-01-19 21:19:53 -06:00
Zach Laine
aa76e9f85e Add search() algorithm, and search_all_view + search_all range adaptor.
search() finds the first occurrence of a match of the given parser.
search_all produces a range of subranges, each of which is a nonoveralpping
match of the given parser.

Partially addresses #64.
2024-01-19 21:19:53 -06:00
Zach Laine
591ac9921b Remove BOOST_PARSER_DEFINE_RULE now that BOOST_PARSER_DEFINE_RULES is always
available.

Partially addresses #71.
2024-01-19 21:06:33 -06:00
Zach Laine
ce7804a003 Refer to the text asociated with a rule as diagnostic text rather than a name,
in the code and the docs.

Fixes #72.
2024-01-19 20:54:58 -06:00
Zach Laine
62002e886a Add support for parsing into an arbitrary class type T, as long as the default
attribute we're parsing is a tuple whose elements can be used to construct T.
Needs docs.

Fixes #49.
2024-01-19 01:00:39 -06:00
Zach Laine
ee00c0393a Put the default behaviors at the first of the constexpr if chains in
detail::{assign,move_back}().
2024-01-19 01:00:39 -06:00
Zach Laine
a7384b82ad Fix non-advancing iterator error in seq_parser, ue to first/first_ name
confusion(!).
2024-01-19 01:00:38 -06:00
Zach Laine
355d443650 Fix logic in trace_input_impl<Iter, Sentinel, 1> specialization, to account
for the case that Iter is utf_iterator<utf8, utf8, ...>.
2024-01-17 01:10:33 -06:00
Zach Laine
0d6f164964 std::is_array_v -> text::detail::is_bounded_array_v in
detail::make_input_subrange().
2024-01-17 00:07:36 -06:00
Zach Laine
471269a374 Define BOOST_PARSER_SUBRANGE, and use it consistently. subrange.hpp is now
only included in C++17 builds.

Fixes #69.
2024-01-17 00:02:28 -06:00
Zach Laine
613bf0583a Cruft removal. 2024-01-16 23:39:04 -06:00
Zach Laine
1fd49842f0 In lexeme_parser, skip_parser, and expect_parser, don't adjust flags in the
overload of call() that just forwards to the other overload; let that other
overload do it.
2024-01-16 23:17:10 -06:00
Zach Laine
4b2c9bcf14 Fix the unconditional generation of attributes by raw_parser and
string_view_parser.  They now do so only when the enclosing context has
attribute generation enabled, and when their subparser succeeds.
2024-01-16 23:15:02 -06:00
Zach Laine
cced72dbcd std::{begin,end} -> detail::text::detail::{begin,end} 2024-01-15 23:09:00 -06:00
Zach Laine
92c16cbfae Add section about writing your own parsers.
Fixes #58.
2024-01-15 16:19:39 -06:00