Header lexy/dsl/any.hpp

Token rule lexy::dsl::any

lexy/dsl/any.hpp
namespace lexy::dsl
{
    constexpr token-rule auto any;
}

any is a token rule that matches anything.

Matching

Consumes the entire input. If the rule is matched in a context where the reader has been artificially delimited (e.g. during minus), consumes only until the end of the partial input is reached.

Errors

None.

Example 1. Match literally any input
struct production
{
    static constexpr auto rule = dsl::any;
};
Caution
any does not care what input it consumes; it can be anything, including ill-formed Unicode. To restrict the input that is consumed, use lexy::dsl::while_ instead.

See also