Zach Laine
88abb615aa
Add pre_- and post_parser members to parser_modifiers; these are used as
...
look-ahead/-behind positive or negative assertions.
When combining parsers using op>> and op>, if either side is an expect_parser
and the other side has an open pre_-/post_parser slot, take the subparser out
of the expect_parser, and use it directly in the pre_-/post_parser slot.
See #160 .
2024-12-16 19:24:39 -06:00
Zach Laine
54f8eecfe6
Change the no_case[] directive to use the parser_modifiers struct, like omit[]
...
does; remove no_case_parser.
See #160 .
2024-12-16 19:24:39 -06:00
Zach Laine
2f7e5964a6
Apply the same sort of change as the previous two commits, but to all the
...
parsers not already modified. Generalize with_parser_mods(). Remove
omit_parser, since it is now moot.
See #160 .
2024-12-16 19:24:39 -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
Zach Laine
9ebc984ff8
Add a type trait, "attribute", and associated alias attribute_t, that provide
...
the attribute type for a parser Parser used to parse range R.
Fixes #111 .
2024-03-08 21:19:36 -06:00
Zach Laine
125ddf43c2
Change the way action_parser calls invocables, to make it easier to write
...
those invocables.
Fixes #106 .
2024-03-08 21:19:36 -06:00
Zach Laine
a2b7afc3a0
Grooming.
2024-03-08 21:19:36 -06:00
Zach Laine
27506af2f3
Constrain parse() overloads that take an out-attribute Attr & -- but no
...
skipper -- so that Attr is not derived from a specialization of
parser_interface. This prevents this from being the best overload when using
a mutable skipper, and producing lots of diagnostics that say the skipper
(which would be mistakenly bound to Attr &) is not assignable from whatever
the attribute type is.
Fixes #105 .
2024-03-08 21:19:36 -06:00
Zach Laine
27400587d5
Add Phil Endecott's example latlong parser from the Boost mailing list review
...
as a test.
2024-03-08 21:19:29 -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
ca1ad064ff
Use a more compelling example in the example code for replace().
...
Fixes #96 .
2024-03-01 22:25:47 -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
e6b59a4784
Fix GCC 12 C++20 build.
2024-02-11 00:24:39 -06:00
Zach Laine
2f8270809c
Disable transform_replace* for GCC < 12 in C++20 mode.
2024-02-11 00:24:39 -06:00
Zach Laine
cdb86d8c23
Add special-case logic for detail::range_utf_format() to recognize that
...
utf8_view is UTF-8-encoded in non-concpets mode.
2024-02-10 23:25:54 -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