How a X3 parser could use an already generated vector of tokens. How the rules could be defined, having something like
enum class token { aa, bb, cc};
auto rule = token::aa >> token::bb >> -token::cc;
std::vector<token> tokens{token::aa, token:bb, token:cc};
auto ok = parse(tokens.cbegin(), tokens.cend(), rule);
I'm interested to validate the input. The idea is to avoid any lexical analysis (x3::lit, x3::char_, x3::lexeme, x3::alpha, etc.) following the zero-overhead principle of C++.
Based on @sehe's reply, the implementation could be