Caution | until() does not care what input it consumes to find condition; it can be lexy::dsl::anything, including ill-formed Unicode. To restrict the input that is allowed before condition, use lexy::dsl::terminator(condition).while_(before).
But lexy::dsl::terminator does not have a while_() member. I think it was replaced with opt().
Documentation states:
But lexy::dsl::terminator does not have a while_() member. I think it was replaced with opt().