[#boost-urls-grammar-token_rule] = xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/grammar.adoc[grammar]::token_rule :relfileprefix: ../../../ :mrdocs: Match a non‐empty string of characters from a set == Synopsis Declared in `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/token_rule.hpp#L79[boost/url/grammar/token_rule.hpp]>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<xref:boost/urls/grammar/CharSet.adoc[CharSet] CS> constexpr /* implementation-defined */ token_rule(CS const& cs) noexcept; ---- == Description If there is no more input, the error code xref:boost/urls/grammar/error.adoc[`error::need_more`] is returned. == Value Type [,cpp] ---- using value_type = core::string_view; ---- == Example Rules are used with the function xref:boost/urls/grammar/parse-09.adoc[`parse`]. [,cpp] ---- system::result< core::string_view > rv = parse( "abcdef", token_rule( alpha_chars ) ); ---- == BNF [,cpp] ---- token = 1*( ch ) ---- == Return Value The token rule == Parameters [cols=2] |=== | Name | Description | *cs* | The character set to use |=== == See Also xref:boost/urls/grammar/alpha_chars.adoc[`alpha_chars`], xref:boost/urls/grammar/parse-09.adoc[`parse`]. [.small]#Created with https://www.mrdocs.com[MrDocs]#