Header lexy/action/match.hpp
Action lexy::match
lexy/action/match.hpp
namespace lexy
{
template <typename State, typename Input>
struct match_action;
template <production Production>
constexpr bool match(const input auto& input);
template <production Production, typename ParseState>
constexpr bool match(const input auto& input, ParseState& state);
template <production Production, typename ParseState>
constexpr bool match(const input auto& input, const ParseState& state);
}
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. |