Zach Laine
e129193296
Now that the library requires C++17, use std::any instead of any_copyable.
2024-03-08 21:19:37 -06:00
Zach Laine
9b47f3c551
Work around what looks like a Clang concept bug, in which two identical
...
declarations are parsed to be non-identical.
Fixes #130 .
2024-03-08 21:19:36 -06:00
Zach Laine
a2b7afc3a0
Grooming.
2024-03-08 21:19:36 -06:00
Zach Laine
7a9126432a
Fix an error in or_parser, which was clearing out-arg attributes when an
...
alternative failed.
2024-03-08 21:19:29 -06:00
Zach Laine
f99ae3b94a
Use bp::get() instead of Hana literals in example, so as not to break non-Hana
...
builds.
2024-02-11 16:54:44 -06:00
Zach Laine
b6b77bac3c
Explain more fully in More about Rules that you need to write a semantic
...
action sometimes for a rule, and under what cirumstances you do.
Fixes #93 .
2024-02-11 16:46:47 -06:00
Zach Laine
d0208fb12c
Add transform_replace range adaptor and transform_replace_view.
2024-02-10 18:42:18 -06:00
Zach Laine
129a0ec531
Add a test to parser.cpp that covers #90 . This just verifies that #90 is not
...
an issue.
Fixes #90 .
2024-02-04 16:52:40 -06:00
Zach Laine
bb3f66db5f
Document The incompatibility of tuple->aggregate conversions with assignment
...
to variants.
Fixes #91 .
2024-02-04 16:16:47 -06:00
Zach Laine
c990799c51
Add spacing to some tests to make sure that raw[] functions correctly with a
...
skipper.
2024-02-01 22:55:42 -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
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
3d528fa531
Remove mooted TODOs.
2024-01-28 21:23:06 -06:00
Zach Laine
5b7889df61
Address a TODO about documenting part of the loose attribute match behavior.
2024-01-28 20:54:22 -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
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
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
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
7103755e59
Comment out test code that exercises spooky behavior on MSVC.
2024-01-15 02:55:30 -06:00
Zach Laine
b055b21f1f
Address TODO about string_view_parser needing tests.
2024-01-14 17:41:38 -06:00
Zach Laine
e6a9763b86
Cruft removal.
2024-01-13 14:15:49 -06:00
Zach Laine
c8ce2cace5
Add a special seq_parser combining rule that makes a std::string ot of two
...
adjacent char/char32_t values.
Partially addresses #55 .
2024-01-11 19:24:43 -06:00
Zach Laine
cd284572c9
Add support for parsing into attributes whose types are optionals or variants
...
other than the ones from std:: (e.g. boost::optional, boost::variant, and
boost::variant2::variant).
Fixes #53 .
2024-01-07 20:44:34 -06:00
Zach Laine
745b1b151d
Add a small example to the parser test that shows that you do not need Sprit
...
2's hold[] directve. Fix an error exercised by the example.
2024-01-07 15:11:47 -06:00
Zach Laine
3ebbd9e08c
Correct an error in repeat_parser's choice of attribute. Sometimes it is
...
necessary to use the value_type of the container out-param, rather than the
attribute generated by the subparser.
Fixes #52 .
2024-01-07 12:29:23 -06:00
Zach Laine
9e374f8cc3
Flesh out support for parsing into non-sequence containers.
2024-01-07 00:44:21 -06:00
Zach Laine
6ab2a9b6a4
Fix the parsing of attributes into nested aggregate types.
...
Fixes #50 .
2024-01-07 00:44:21 -06:00
Zach Laine
7921f15ef8
Cruft removal.
2024-01-03 16:55:13 -06:00
Zach Laine
0e78ea2d26
Remove the T >> T -> std::vector<T> attribute combining rule from seq_parser.
2024-01-03 02:04:04 -06:00
Zach Laine
f08255cf94
Use a tuple instead of a pair in seq_parser::{make_temp_result,combine}. Add a
...
third tuple to the output of make_temp_result; this tuple is true/false values
indicating whether this parser's attribute was merged with an adjacent
parser's container of attributes of the same type.
Fixes #36 .
2024-01-02 17:58:03 -06:00
Zach Laine
2020e44fda
Radically change the way that repeat_parser generates a sequence of
...
attributes. It now produces std::string when Attribute is char, and
std::vector<Attribute> otherwise (except for nope special-casing of course).
Partial fix for #36 .
2024-01-02 17:57:46 -06:00
Zach Laine
24d18b4eaf
Remove the documentation section "An Odd Case", which was obviated by the
...
previous commit. Also remove the test cases that exercised that case.
2024-01-01 15:30:45 -06:00
Zach Laine
d34d4b7e6a
Remove the seq_parser C<T> >> C<T> -> C<T> collapsing rule. Add special logic
...
for recursive rules to make accumulating recursive parsers like
recursive_string_rule in the parser_rule test easier to write.
2024-01-01 15:29:45 -06:00
Zach Laine
88a965d9c5
Rename the {callback_,}parse() overloads that take an iterator/sentinel pair
...
to {callback,}prefix_parse().
Fixes #21 .
2023-12-23 04:05:54 -06:00
Zach Laine
1bbad0a871
Address TODOs about the need to document an unexpected aspect of how out-param
...
attributes are assigned.
2023-12-16 16:37:06 -06:00
Zach Laine
efaa7c8c08
Replace the half-assed subrange implementation in boost::parser with the more
...
robust one from boost::text.
Fixes #26 .
2023-12-15 21:23:31 -06:00
Zach Laine
ef3c90b552
view -> subrange
...
Fixes #20 .
2023-12-03 16:54:44 -06:00
Zach Laine
e9893e7979
C++17 Clang warning mitigation.
2023-11-25 17:25:18 -06:00
Zach Laine
2de63708cc
Update Boost.Text to 1ff99f926f.
2022-08-21 18:32:05 -05:00
Zach Laine
71c697d23d
Convert from Boost.Hana to Hana lite, part 2: introduce a template aliases for
...
constants like llong; provide a tuple accessor get(); use these throughout the
code.
Also, adapt the code in detail/hl.hpp to work with hana::tuple and std::tuple.
2020-09-20 16:05:52 -05:00
Zach Laine
969de5c23d
Move all the text and stl_interface internal header code into
...
boost::parser::detail namespace.
2020-09-20 03:23:23 -05:00
Zach Laine
113270d6f6
Remove dependency on Boost.Any.
2020-09-19 20:43:12 -05:00
Zach Laine
d8a323a5fb
Fix VC2019 test failures.
2020-09-09 23:42:04 -05:00
Zach Laine
3ac30663b4
Add support for C++17.
2020-09-09 02:45:19 -05:00
Zach Laine
711bc9e2b3
- eol_parser -> ws_parser
...
- ws_parser does all whitespace (according to the Unicode White_Space
property) or just eol, depending on parameterization.
- Add ws, a parser object that uses the all-whitespace mode of ws_parser.
- Fix an error in the constraints on *parse(); iterators over char8_t (and not
just pointers) now properly fall under the Unicode parsing path.
Fixes #4 .
2020-09-01 21:52:28 -05:00
Zach Laine
852559ce67
static_assert inside the prase() overloads that take an attr out-param that
...
the parser generates an attribute.
Fixes #2 .
2020-09-01 01:24:12 -05:00
Zach Laine
950065b5d2
Range-parse overloads now indicated failure when the entire input is not
...
consumed.
2020-08-29 21:09:50 -05:00
Zach Laine
678f666785
Remove "skip_" from all parse function names, and reorder the parse API
...
functions for clarity. Also, drive-by cleanups in parser_{,api}.cpp.
2020-08-29 19:17:04 -05:00