4.4.1
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
Public Types | Public Member Functions
fcppt::parse::separator< Inner, Sep > Class Template Reference

Detailed Description

template<typename Inner, typename Sep>
class fcppt::parse::separator< Inner, Sep >

Parses a list of elements, delimited by a separator, e.g., a_1,...,a_n.

Inner is tried first. If this suceeds, this provides the first element r_1 of the result. Then, Separator is tried, followed by Inner. This is done as long as possible, giving the remaining elements r_2, ..., r_n of the result, which are again taken from Inner.

Equivalent to:

Inner >> *(Sep >> Inner)
Template Parameters
SepA parser with result type unit.
Inheritance diagram for fcppt::parse::separator< Inner, Sep >:
fcppt::parse::tag

Public Types

using result_type = std::vector< fcppt::parse::result_of< Inner > >
 

Public Member Functions

 separator (Inner &&, Sep &&)
 
template<typename Ch , typename Skipper >
fcppt::parse::result< Ch, result_typeparse (fcppt::reference< fcppt::parse::basic_stream< Ch > >, Skipper const &) const
 

Member Typedef Documentation

◆ result_type

template<typename Inner , typename Sep >
using fcppt::parse::separator< Inner, Sep >::result_type = std::vector<fcppt::parse::result_of<Inner> >

Constructor & Destructor Documentation

◆ separator()

template<typename Inner , typename Sep >
fcppt::parse::separator< Inner, Sep >::separator ( Inner &&  ,
Sep &&   
)

Member Function Documentation

◆ parse()

template<typename Inner , typename Sep >
template<typename Ch , typename Skipper >
fcppt::parse::result< Ch, result_type > fcppt::parse::separator< Inner, Sep >::parse ( fcppt::reference< fcppt::parse::basic_stream< Ch > >  ,
Skipper const &   
) const