Zach Laine
a3ca1193b2
Add error reporting when encountering unexpected (left over) code points at
...
the end of an otherwise-successful parse, when doing non-prefix parsing.
2025-03-30 16:06:41 -05:00
necessarily-equal
b253d9ca53
Add unicode symbols parser ( #213 )
...
* Add symb parser to handle unicode symbols
* Add documentation for symb
* Add tests for symb
* Fix typo in the documentation
---------
Contributed by: Antoine Fontaine <antoinefontaine@posteo.net >
2025-02-20 23:51:17 -06:00
Zach Laine
305bba875b
Grooming.
2024-12-09 01:57:04 -06:00
Jannik Glückert
5864eee3be
fix CI clang warnings in tests
2024-04-01 15:58:58 -05:00
Zach Laine
d774edc0e6
Add the condition that BOOST_PARSER_USE_CONCEPTS is true to/in place of many
...
places that used __cpp_lib{concepts,ranges} previously. This is often
necessary when concepts are disabled, since the user might have a broken
implementation of concepts.
2024-03-31 19:55:28 -05:00
Zach Laine
8e39ad067b
Change tests from GTest to Boost.Test. Remove Goolge.{Test,Benchmark}.
...
Fixes #165 .
2024-03-24 22:29:10 -05:00
Zach Laine
abbab9017f
Address gaps in code coverage; fix a couple of small errors in the trace code.
2024-03-23 23:40:08 -05:00
Zach Laine
87b50154cf
Fix incorrect attribute returned by a rule in some cases. The problem was
...
that the changes to support recursive rules made all rules use the out-arg
overload of parse_rule. This is wrong. Now, rules use the
attribute-returning overload unless asked explicitly to use the out-arg one,
*or* if the rule is being invoked recursively, and we are in an iteration
after the 0th.
Fixes #125 .
2024-03-08 21:19:37 -06:00
Zach Laine
1e011a1fac
Add transform(f)[p] attribute-transforming directive.
...
Fixes #153 .
2024-03-08 21:19:37 -06:00
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