parser
parser copied to clipboard
A C++ parser combinator library.
From #119: > Maybe something for the future: there's a lot of effort in the code to get no_case working, and in > the end it's all about applying case...
When I compile the example from the other issue: ```c++ #ifdef WITH_BOOST_SPIRIT #include #include namespace bp = boost::spirit::qi; #else #include namespace bp = boost::parser; #endif int main() { #ifdef WITH_BOOST_SPIRIT...
Currently my biggest gripe with Spirit.X3 is that you can't parse into a class with private fields. This leaves you with two options: 1. use a proxy type, e.g. ```cpp...
Changing parser.hpp to contain: ``` #define DELIMITED_SEQ_PARSER_USE_DELMITER_ATTR #ifdef DELIMITED_SEQ_PARSER_USE_DELMITER_ATTR template using seq_parser_default= seq_parser < tuple < Parsers... > , tuple < std::true_type , std::true_type > , tuple < llong ,...
When a single, primitive parser is used, the error stream remains empty, even if an error occurs. In the example below, 'oss' is empty, but it should have an error...
diff --git a/test/tuple_aggregate.cpp b/test/tuple_aggregate.cpp index fc6af6f7..3effce66 100644 --- a/test/tuple_aggregate.cpp +++ b/test/tuple_aggregate.cpp @@ -81,7 +81,7 @@ struct s1_boost_variant std::vector vec_; }; #endif -#if TEST_BOOST_VARIANT +#if TEST_BOOST_VARIANT2 struct s1_boost_variant2 { int i_;
When I tried adding a print_parser for my custom parser, ultimately I had to add it before including parser.hpp like this: ``` namespace boost::parser { template struct custom_parser; namespace detail...
Zach, AFAICT the [BOOST_PARSER_DEFINE_IMP_macro](https://github.com/tzlaine/parser/blob/develop/include/boost/parser/parser.hpp#L5741) performs, "essentially" the same purpose as the [BOOST_SPIRIT_DEFINE_ macro](https://github.com/boostorg/spirit/blob/develop/include/boost/spirit/home/x3/nonterminal/rule.hpp#L228). Now, again, AFAICT, the purpose of those macros is to "associate" the rule_id with the rules RHS...
this PR would fix the issues with the CI system (Fedora GCC-14), Windows MSVC 2022 c++23 and additionally a compiler error for test/search.cpp with certain clang compilers for c++23 (see...
The MSVC compiler 2022 C++23 cannot compile the following lines from e.g. test/transform_replace.cpp, test/split.cpp, test/search.cpp ``` char const * str_ = "XYZ"; auto str = str_ | bp::as_utf8; ``` as...