Andreas Buhr
6db68bc7f7
add test for constexpr switch_parser
...
The test led to the following error before:
github_issues.cpp(522): error C3615: constexpr function
'boost::parser::switch_' cannot result in a constant expression
2025-11-25 12:02:18 -06:00
Zach Laine
885595f7bd
Parse the attribute of quoted_string into a temporary, and assign at the end,
...
if successful. This makes the code well-formed when the attribute type is an
optional.
Addresses PR #290 .
2025-11-15 16:39:34 -06:00
Zach Laine
0eacce6080
Add special-casing of nope attributes in seq_parser, so that seq_parser does
...
not assign over valid values in a sequence's attribute after successfully
parsing a subsquent nope-attributes parser.
Test cases by Andreas Buhr.
Fixes #279
Fixes #285
2025-10-31 15:36:22 -05:00
Zach Laine
5e61ba4e9e
Fix C++17 builds.
2025-10-31 14:25:38 -05:00
Zach Laine
dc6144eeb4
Correct tuple/struct confusion in the logic of the if constexpr chain in
...
perm_parser.
Test case by Andreas Buhr.
Fixes #268 .
2025-10-31 12:37:40 -05:00
Zach Laine
41e891dc95
In opt_parser, don't forget to clear the attribute if the subparser fails.
...
Fixes #279
2025-10-13 17:46:27 -05:00
Zach Laine
c674e94c3d
Don't reuse the attribute-generating path in rule_parser's out-param overload
...
of call. Doing so was wiping out previous partial results, in cases like foo
>> bar, where foo produces a T, and bar is a rule that produces vector<T>.
Fixes #248 .
2025-07-27 17:50:38 -05:00
Zach Laine
84ee288b02
Attempt to fix odd error in happy path of code submitted with issue 223.
2025-07-26 21:13:33 -05:00
Zach Laine
5d6d2f7b84
Add missing special case for parsing a sequence of optional<T>s, writing the
...
results into a sequence container of Ts.
Fixes #223 .
2025-07-26 20:15:15 -05:00
Zach Laine
0b93a586f1
Use an R-string instead of using so many backslashes in the quoted string
...
examples.
Fixes #239 .
2025-07-12 16:08:53 -05:00
Rene Rivera
ec7df8a0af
Add support for modular build structure.
2025-05-06 01:54:32 -05:00
Zach Laine
a93a1d2647
Use detail::hl::make_tuple() instead of CTAD in test to fix build breakage on
...
some compilers.
2025-04-13 14:26:47 -05:00
Zach Laine
87617fdec0
std::tuple -> tuple in test to fix build with -DBUILD_WITH_HANA=true.
2025-04-12 19:33:11 -05:00
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
57cdd78210
Properly sort the code point values in detail::char_set<punct_chars>.
...
Fixes #209 .
2024-12-23 17:28:07 -06:00
Zach Laine
74bc8fc1bb
Add the delimiter(p)[] directive proper (missing from previous commit).
...
Fixes #162 .
2024-12-20 20:01:16 -06:00
Zach Laine
42c9d82419
Add an optional char parser to quoted_string_parser, so that it can be made
...
fully general.
Fixes #196 .
2024-12-17 00:17:54 -06:00
Zach Laine
305bba875b
Grooming.
2024-12-09 01:57:04 -06:00
Zach Laine
94a9daec40
Change the way that the pending operations are applied to symbol table
...
parsers. Instead of trying to find all of them at the start of the top-level
parse, they are recorded in the context, and then applied at the end of the
top-level parse. The previous technique did not work, simplt because the
top-level parse cannot see all the parser involded -- some are behind rule
firewalls, by design.
Related to #183 .
Fixes #204 .
2024-10-31 23:07:17 -05:00
Zach Laine
4344dd3f47
Remove mooted TODOs.
2024-10-31 23:07:17 -05:00
Zach Laine
1e64b6e416
Add insert/erase/clear operations on symbol tables for the current parse and
...
subsequent parses both. Add better tests for the added API and the previous
subset of the operations already present. Fix errors revealed by the tests.
Fixes #183 .
2024-10-03 17:56:00 -05:00
Zach Laine
23017af526
Remove support for direct use of null-terminated strings with the parser APIs.
...
Fixes #175 .
Fixes #190 .
2024-10-02 20:28:50 -05:00
Zach Laine
8f5b84ded5
Fix __clang__/__clang_major__ confusion when trying to define language feature
...
macros in terms of Clang major version number.
Fixes #168 .
2024-09-30 18:10:05 -05:00
Zach Laine
8accdd922f
Fix ignored USE_{A,UB}SAN in CMake files.
2024-09-30 18:08:09 -05:00
Zach Laine
71eeb36272
Remove the broken use of alias CTAD from the transcoding views.
...
Fixes #193 .
2024-09-30 18:06:46 -05:00
Zach Laine
7ae86c1a0c
Fix macro guard on s1_boost_variant2 tuple_aggregate test.
...
Fixes #179 .
2024-09-30 17:44:28 -05: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
5dce167bf9
Disable some of the compile tests that spuriously fail on older Apple Clangs.
2024-03-27 19:26:41 -05:00
Zach Laine
072a812bcc
Add <library>/boost/charconv//boost_charconv project requirement to the b2
...
build.
2024-03-27 02:30:05 -05:00
Tobias Loew
56d043b3a4
Add VS debugger output error_handler and trace support.
...
Fixes #124 .
2024-03-26 04:14:17 -05:00
Zach Laine
d34cc345bb
Add/update b2 build for docs and tests.
2024-03-24 22:29:10 -05:00
Zach Laine
d88e47cf17
Fix deficiencies in the CMake build:
...
- Clone minimal Boost dependencies so that the minimal Boost.Test header is
available.
- Add boostdep-generated CMake code to the top of the top-level
CMakeLists.txt.
Fixes #127 .
2024-03-24 22:29:10 -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
889be318f8
Add code coverage generation and reporting.
...
Fixes #146 .
2024-03-23 23:40:08 -05:00
Zach Laine
744fd1bdc0
Add diagnostic text to symbols, like that for rules.
...
Fixes #164 .
2024-03-20 03:18:09 -05:00
Zach Laine
24288a03a2
Add quoted_string, to automate probably the most commonly-written parser of
...
all time -- the quoted string.
2024-03-11 02:38:26 -05:00
Zach Laine
824a208133
Add a permutation parser.
...
Fixes #159 .
2024-03-10 17:31:50 -05:00
Zach Laine
48d5cceb8f
Add more tests of seq_parser and or_parser, to cover all the permutations of
...
different parsers that they might use.
Fixes #126 .
2024-03-10 16:48:41 -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
cc9b74cb2d
Add no_case support to symbol tabels.
...
Fixes #149 .
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
9f46597ea9
Add --output-on-failure to make check.
2024-03-08 21:19:37 -06:00
Zach Laine
aea0ff8dab
Removed the very small example of how to use rules with a much longer one
...
based on a real section of YAML.
Fixes #104 .
2024-03-08 21:19:36 -06:00
Zach Laine
02c140a251
MSVC warning mitigation.
...
Fixes #120 .
Fixes #121 .
Fixes #122 .
Fixes #123 .
2024-03-08 21:19:36 -06:00
Zach Laine
64e76e7b58
GCC warning mitigation.
2024-03-08 21:19:36 -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