Header lexy/action/match.hpp

Action lexy::match

lexy/action/match.hpp
namespace lexy
{
    template <production Production>
    constexpr bool match(const input auto& input);
}

An action that determines whether Production matches on input.

It parses Production on input. All values produced during parsing are discarded; all errors ignored. Returns true if parsing was successful without errors, returns false if parsing lead to an error, even if it recovered.

Tip
Use lexy::validate to get information about the parse error.
Note
Production does not need to match the entire input to succeed. Use lexy::dsl::eof if it should fail when it didn’t consume the entire input.

See also