Andreas Buhr
c54307b95c
update CI from macos-13 to macos-15
...
MacOS 13 is retired in github actions, see
https://github.com/actions/runner-images/issues/13046
2025-12-11 19:32:36 -06:00
Andreas Buhr
5b3f122aa7
use fold expressions in or_parser and seq_parser
2025-12-05 23:48:02 -06:00
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
Andreas Buhr
00fe33d2f3
add "constexpr" to switch_parser constructor
...
so switch(predicate)(valA, parserA)(valB, parserB)
can result in a constexpr object.
2025-11-25 12:02:18 -06:00
Andreas Buhr
bb183cf5ee
Improve error visualization.
...
If the parsed string contains tab characters on the failing line,
the underlining in the error message pointed to the wrong position.
This patch adds as many tab characters to the underlining as
there are in the parsed line. So the underlining points to the
correct position.
2025-11-23 12:14:55 -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
6826f957a1
Add missing 'else' between two if constexpr cases.
2025-11-15 15:57:05 -06:00
Zach Laine
647cec6683
Address similar concern to the one about closures with move-only callables,
...
but this time for adaptors.
boost-1.90.0
boost-1.90.0.beta1
2025-10-31 17:30:34 -05:00
Zach Laine
c2ddd6e116
Fix ill-formedness when using range_adaptor_closure with GCC14.
2025-10-31 17:22:36 -05:00
Andreas Buhr
f7246de9db
Do not call skip parser if we are already in failed state in seq_parser
2025-10-31 15:41:26 -05:00
Andreas Buhr
703a8afafe
Fix error in drone CI
...
error: call to implicitly-deleted copy constructor of [snip]
constexpr closure(F f) : f_(f) {}
2025-10-31 15:39:46 -05: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
d873d7ea80
Provide failover empty symbol table tries for use inside of skippers, since
...
nothing prevents using a symbol_parser in a skipper, and the previous commit
introduced nullptr skipper data tables in some cases.
Related to #245
2025-10-13 18:43:08 -05:00
Zach Laine
1f5303c756
When creating the context object in detail::skip(), don't create empty structs
...
for symbol table tries, since they are never used.
Fixes #245
2025-10-13 18:19:04 -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
159472ac6e
Change moves to forwards where appropriate.
...
Addresses the same issues as PR #276 .
2025-10-12 21:45:46 -05:00
Andreas Buhr
bfa3e33372
Reduce compilation time by using SkipParser when determining attribute type.
...
When using a large parser, the whole tree of parsers in instantiated with the
skip (whitespace) parser used. Then, it was instantiated again without a skip
parser, just to determine the attribute type.
This patch changes the code so the attribute type is determined *with* the
skip parser. That way, the number of template instantiations
required are halved for some use cases.
With gcc 14.2, the instantiations without the skip parser even ended up in the
binary. In that case, this patch reduces binary size.
This is most likely a compiler bug, as the usage is in decltype().
2025-10-12 21:31:32 -05:00
Andreas Buhr
8d7a64f7fe
Performance improvement: Do not copy use_parser into lambda
2025-10-12 21:16:48 -05:00
Andreas Buhr
8c23054e07
Fix bug that ASCII code for z/Z was noch included in case_fold fast-path
2025-10-12 21:15:37 -05:00
Andreas Buhr
11a5d9a872
Add fast-path for lower case ASCII letters in case_fold
...
This improved the speed of my parser by approximately 20%
2025-10-12 21:15:37 -05:00
Andreas Buhr
d241bd7853
Make "transform" constexpr
2025-10-12 21:15:14 -05:00
Zach Laine
086241cbd9
Correct a munged bit of doc text.
2025-10-12 21:04:26 -05:00
ivanpanch
e3a3cc8bf2
Update rationale.qbk
2025-10-12 21:00:47 -05:00
ivanpanch
f789199743
Update parser_reference.xml
2025-10-12 21:00:47 -05:00
ivanpanch
f20c4cfb02
Update parser.hpp
2025-10-12 21:00:47 -05:00
ivanpanch
fcbc53ddce
Update parser.hpp
2025-10-12 21:00:47 -05:00
ivanpanch
fed0a883ad
Update error_handling_fwd.hpp
2025-10-12 21:00:47 -05:00
ivanpanch
bfc61fa963
Update config.hpp
2025-10-12 21:00:47 -05:00
ivanpanch
68c306bf66
Update json.cpp
2025-10-12 21:00:47 -05:00
ivanpanch
d5d080b9f2
Update tutorial.qbk
2025-10-12 21:00:47 -05:00
ivanpanch
03341ba32d
Update tutorial.qbk
2025-10-12 21:00:47 -05:00
ivanpanch
7e69b27d7c
Update tutorial.qbk
2025-10-12 21:00:47 -05:00
ivanpanch
17d76bc158
Update tutorial.qbk
2025-10-12 21:00:47 -05:00
ivanpanch
050b9ba800
Update tutorial.qbk
2025-10-12 21:00:47 -05:00
ivanpanch
125f12407b
Update tables.qbk
2025-10-12 21:00:47 -05:00
Andreas Buhr
e4ba7c7a17
Remove g++9 github CI configuration
...
Because it runs on ubuntu 20.04 and github does
not offer these runners anymore.
2025-10-12 20:59:26 -05:00
Zach Laine
9a138a20f6
Correct the claim in the docs that if_(c)[p] has attribute type
...
optional<ATTR(p)>; it actually has attribute type ATTR(p).
Fixes #278 .
2025-10-12 20:40:55 -05:00
Zach Laine
c32d594d64
Eliminate double-instantiation of context templates (due to on a difference
...
between a nope and nope const GlobalState template arg) by using nope const by
default.
Fixes #250 .
2025-10-12 20:00:05 -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 .
boost-1.89.0
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
39faa9ddbe
Pass the sentinel type as a template parameter to the iterator template in
...
project_view, as a workaround to the presence/absence of a disambiguating
template keyword in iterator's implementation. Neither adding it nor temoving
it works for all builds. Also, re-enable the C++17 MSVC 2022 Github build.
Fixes #252 .
2025-07-26 21:12:37 -05:00
Zach Laine
b2927abc6c
Disable C++17 on MSVC 2022 in Github CI.
2025-07-26 20:17:56 -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
fd6c56df1b
Publicize project_view::{interator,sentinel} in attempt to fix VS 2022 build.
2025-07-13 15:56:35 -05:00
Zach Laine
af41e6a7c2
Add missing template keyword disambiguator in attempt to fix VS 2022 build.
2025-07-13 15:34:21 -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
Zach Laine
ed9a06123b
Comment out unused dont_assign param in second overload defined by
...
BOOST_PARSER_DEFINE_IMPL.
Fixes #237 .
2025-07-12 15:15:52 -05:00
Zach Laine
8ff46f394a
Spelling corrections in tutorial.
...
Fixes #238 .
2025-07-12 15:13:20 -05:00