2
0
mirror of https://github.com/boostorg/parser.git synced 2026-01-26 18:52:23 +00:00
Commit Graph

457 Commits

Author SHA1 Message Date
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
0a34acc42a Add new macro BOOST_PARSER_GCC that is defined in config.hpp only for real
(non-Clang-emulated) GCC builds; replace relevant uses of the __GNUC__ macro
with BOOST_PARSER_GCC.

See discussion in PR #211.
2025-02-20 23:38:09 -06:00
Zach Laine
56c81c0b57 Use gross pointer dereference expression to implement detail::whatever
converions operator, since 2/3 of the big three compilers reject the use of
declval() there.
2025-02-20 23:38:09 -06:00
Zach Laine
821d1d4c08 Fix longstanding mysterious ill-formedness in
detail::static_assert_merge_attributes.  It was down to unavailabilty of a
default ctor for certain parser types.
2025-02-20 23:38:09 -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
b42b052df4 Add the delimiter(p)[] directive, whic allows you to introduce a delimiter
into the parse of a permutation parser.

Fixes #162.
2024-12-19 22:26:08 -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
6d7fa6f105 Add missing Docbook tag to fix broken reference in docs. 2024-11-29 16:20:14 -06:00
Zach Laine
3eb827dcd6 Fix error in seq_parser::append() that causes AllowBacktracking=false to be treated as =true. 2024-11-14 22:49:51 -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
Vernon Mauery
a7c7470bc1 Remove unused lambda capture
str is unused in the lambda; remove it from the capture

Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
2024-10-27 14:54:56 -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
71eeb36272 Remove the broken use of alias CTAD from the transcoding views.
Fixes #193.
2024-09-30 18:06:46 -05:00
Martin Posch
e35d066f44 Avoid Compiler Warning. move declaration of 'buf' into region of #if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS as it is only used there. 2024-09-30 12:48:12 -05:00
Martin Posch
b1b7b221c7 Avoid Compiler Warning. move declaration of 'buf' into region of #if BOOST_PARSER_DETAIL_TEXT_USE_CONCEPTS as it is only used there. 2024-09-30 12:48:12 -05:00
Zach Laine
2a9687f22f Fix __clang__/__clang_major__ confusion when trying to define language feature
macros in terms of Clang major version number.

Fixes #168.
2024-09-29 14:28:22 -05:00
Zach Laine
edd802ea8f char8_type -> unsigned char in UTF8 -> UTF32 implementation in
utf_iterator::decode_code_point() to mitigate warnings.

Fixes #167.
2024-09-29 14:28:22 -05:00
Zach Laine
75c29c0378 Add missing implementations for hidden friends in project_view::iterator (op==
and op-).

Fixes #169.
2024-09-29 14:28:22 -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
5f50c371af Disable the use of concept constraints in Clang < 16.
Fixes #131.
Fixes #133.
2024-03-30 13:56:47 -05:00
Zach Laine
6f28211166 Use handrolled indirectly_copyable for Clang <= 13, not just 13 itself. 2024-03-28 02:22:49 -05:00
Zach Laine
dbfc8da474 Add missing #include <iterator>. 2024-03-27 21:24:26 -05:00
Zach Laine
a49c9521b5 Don't include <version>, since it turns out that it's a C++20 header. Who
knew?
2024-03-27 00:55:54 -05:00
Zach Laine
843867944b Add documentation of the new VS output trace/error_Handler feature.
Partially addresses #124.
2024-03-26 04:14:17 -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
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
317248843b BOOST_PARSER_DISABLE_HANA_TUPLE - > BOOST_PARSER_USE_HANA_TUPLE; disable Hana
by default.

Fixes #155.
2024-03-23 22:26:16 -05:00
Zach Laine
d5eba27273 Honor the use of BOOST_DISABLE_ASSERTS even when Boost.Assert is not available. 2024-03-23 22:26:16 -05:00
Zach Laine
f461b38850 Address TODO about BOOST_PARSER_ASSERT vs. BOOST_PARSER_DEBUG_ASSERT in
quoted_string_parser.
2024-03-23 22:26:13 -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
f113d302de !success || !detail::gen_attrs(flags) -> !success in condition to reset
attribute in repeat_parser.  Looks like copy pasta.
2024-03-09 17:41:03 -06:00
Zach Laine
6d253beaac Cruft removal. 2024-03-09 17:41:03 -06:00
Zach Laine
2fa916530e Add missing optional<Container> overloads of detail::append. 2024-03-09 17:41:03 -06:00
Zach Laine
3ff6a575ad Add a TODO. 2024-03-08 21:19:37 -06:00
Zach Laine
f55d3779de Define BOOST_PARSER_USE_CONCEPTS to be 1 when running Doxygen. This gets
concepts constraints on template parameters to show up.  Also explicitly state
requirements in the Doxygen strings for anything that adds constraints via
requires clauses, since those do not show up in Doxygen.

Fixes #109.
2024-03-08 21:19:37 -06: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
456a81155a When there are alternate implementations controlled by __has_include, put each
alternate implementation in its own inline namespace.

Fixes #151.
2024-03-08 21:19:37 -06:00
Zach Laine
947fd7782d Explicitly state that char_, cp, and cu can be used without args in their API
docs.

Fixes #150.
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
4a9a45f856 Warning mitigation. 2024-03-08 21:19:37 -06:00
Zach Laine
9af9b5e373 Use parser::get() instead of operator[] in the implementation of
param_t::operator().
2024-03-08 21:19:36 -06:00
Zach Laine
f05b25ea1d Use detail::print() to print the values in switch alternatives, instead of
printing them directly.
2024-03-08 21:19:36 -06:00