2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-26 06:42:25 +00:00
Commit Graph

802 Commits

Author SHA1 Message Date
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
a68c1d3187 Add documentation section on algorithms views and view adaptors, to document
search(), search_all, and split.

Partially addresses #64.
2024-01-20 03:11:43 -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
52e8b187e8 Document BOOST_PARSER_SUBRANGE in Configuration and Optional Features.
Fixes #73.
2024-01-19 21:17:25 -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
4c3e0a7448 Add another reason for using rules -- callback parsing. 2024-01-19 20:54:51 -06:00
Zach Laine
ffdc3f967b Add docs for the new automatic subitutability of non-aggregate class types for
tuples.

Partially addresses #49.
2024-01-19 20:15:07 -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
338a519bd6 In deploy_unified_header.yml, only commit and push if the generated file
indicates diffs.
2024-01-18 01:12:01 -06:00
Zach Laine
7f4e8ed904 Add a note to the README about the unified header and Compiler Explorer.
Fixes #70.
2024-01-18 00:59:23 -06:00
Zach Laine
f1c77a05cd Change the way deploy_unified_header.yml generates a unified header to make
well-formed code.
2024-01-18 00:55:35 -06:00
Zach Laine
a0d18feedc Add git push to deploy_unified_header.yml. 2024-01-18 00:26:33 -06:00
Zach Laine
22bf642024 Add git config user and email to deploy_unified_header.yml. 2024-01-18 00:23:35 -06:00
Zach Laine
33d0e2aef8 Add another missing $ to deploy_unified_header.yml. 2024-01-18 00:18:29 -06:00
Zach Laine
cfbabba598 Add a git fetch to the Deploy step of deploy_unified_header.yml. 2024-01-18 00:16:59 -06:00
Zach Laine
7e2bfb691c Use continue-on-error: true in the build step of deploy_unified_header.yml. 2024-01-18 00:11:41 -06:00
Zach Laine
a64d58aaff Fix missing $ in Github action. 2024-01-18 00:07:03 -06:00
Zach Laine
2b30e172e4 Add deploy_unified_header.yml. Fingers crossed. 2024-01-18 00:03:48 -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
c2ba50de51 Add a note to the beginning of Attribute Generation about the assumption that
attribute types are semiregular.

Fixes #65.
2024-01-15 16:46:58 -06:00
Zach Laine
d28ac53d9f Fix "next section" that moved in the docs, by naming the exact section.
Thanks, Andrzej!
2024-01-15 16:37:43 -06:00
Zach Laine
92c16cbfae Add section about writing your own parsers.
Fixes #58.
2024-01-15 16:19:39 -06:00
Zach Laine
d59e0528b2 Consolidate documentation on eror handlers into the Error Handling and
Debugging section, and add an example of how to write your own error handler.

Fixes #43.
2024-01-15 02:28:50 -06:00
Zach Laine
2054eab1bd Disable string_view[] code in parser.cpp in pre-C++20 builds. 2024-01-15 00:51:00 -06:00
Zach Laine
9187bf851e Add section on raw[] and string_view[] to docs.
Fixes #59.
2024-01-14 20:57:43 -06:00
Zach Laine
36ef6d1ae7 Add missing mention of merge[] and separate[] to the Directives section of the tutorial. 2024-01-14 20:57:43 -06:00
Zach Laine
7103755e59 Comment out test code that exercises spooky behavior on MSVC. 2024-01-15 02:55:30 -06:00
Zach Laine
53e0f7c769 Fix misplaced #endif that broke most of our builds. 2024-01-14 20:15:31 -06:00
Zach Laine
d17db09303 Use the warning-provocation technique from boost/mpl/print.hpp to cause the
types to be printed in some places after a static_assert failure.

Partially addresses #56.
2024-01-14 18:32:35 -06:00
Zach Laine
b055b21f1f Address TODO about string_view_parser needing tests. 2024-01-14 17:41:38 -06:00
Zach Laine
bf06cfc57a Fix string_view_parser, broken by the most recent boost::text import. 2024-01-14 16:47:50 -06:00
Zach Laine
a956cd962e Comments on static_asserts to text in the static_asserts instead. 2024-01-14 16:43:58 -06:00
Zach Laine
62f47c73c8 Add section to rationale on why the attribute compatability rules are stricter than in Spirit.
Fixes #61.
2024-01-14 16:18:19 -06:00
Zach Laine
8a9a851acb Restore an example of how loose attribute rules are looser at the top-level parse than within the middle of the parse.
Partially addresses #61.
2024-01-14 16:18:19 -06:00
Zach Laine
92be502e79 Copy editing. 2024-01-14 16:18:19 -06:00
Zach Laine
fe06d6b477 Doc thinko. 2024-01-14 16:18:19 -06:00
Zach Laine
1715433a4e Explain that or_parser deduplicated the template parameters of its std::variant attributes.
Fixes #62.
2024-01-14 16:18:19 -06:00
Zach Laine
d17268dec7 Add section about merge[] and separate[] to the docs.
Partially addresses #55.
2024-01-14 02:45:05 -06:00
Zach Laine
6fc7eefb67 Add a Rationale section on the special treatment of sequences of characters. 2024-01-14 02:45:05 -06:00
Zach Laine
02447e92a2 Remove template head from lambda, and just use auto param instead, to mollify
MSVC.
2024-01-14 04:54:32 -06:00