Closed
Description
I'm seeing a weird (off by one) error in a simple parser:
#define BOOST_PARSER_DISABLE_CONCEPTS
#include <boost/parser/parser.hpp>
#include <print>
namespace bp = boost::parser;
int main() {
const auto id_set_action = [](auto &ctx) {
const auto& [left, right] = _attr(ctx);
std::println("{} = {}", left, right);
};
const auto id_parser = bp::char_('a', 'z') > *bp::char_('a', 'z');
const auto id_set = (id_parser >> '=' >> id_parser)[id_set_action];
bp::parse("left=right", id_set);
return 0;
}
I'd expect the output of this program to be left = right
however it is leftr = ight
this is the case on both the master
and develop
branches.
Metadata
Metadata
Assignees
Labels
No labels