[#boost-urls-grammar-token_rule-01]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/grammar.adoc[grammar]::token&lowbar;rule
:relfileprefix: ../../../
:mrdocs:

Match a non&hyphen;empty string of characters from a default&hyphen;constructible set

== Synopsis

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/grammar/token_rule.hpp#L134[boost&sol;url&sol;grammar&sol;token&lowbar;rule&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;xref:boost/urls/grammar/CharSet.adoc[CharSet] CharSet&gt;
constexpr
&sol;&ast; implementation-defined &ast;&sol;
token&lowbar;rule() noexcept
requires std&colon;&colon;is&lowbar;default&lowbar;constructible&lt;CharSet&gt;&colon;&colon;value;
----

== Description

This overload is only available when CharSet is default constructible&period;

If there is no more input, the error code xref:boost/urls/grammar/error.adoc[`error&colon;&colon;need&lowbar;more`] is returned&period;

== Value Type

[,cpp]
----
using value_type = core::string_view;
----
== Example

Rules are used with the function xref:boost/urls/grammar/parse-09.adoc[`parse`]&period;

[,cpp]
----
system::result< core::string_view > rv = parse( "abcdef", token_rule<alpha_chars_t>() );
----
== BNF

[,cpp]
----
token     = 1*( ch )
----
== Return Value

The token rule

== Template Parameters

[cols="1,4"]
|===
| Name| Description
| *CharSet*
| The character set type to use
|===

== See Also

xref:boost/urls/grammar/alpha_chars.adoc[`alpha&lowbar;chars`], xref:boost/urls/grammar/parse-09.adoc[`parse`]&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
