4.2.0
Freundlich's C++ toolkit
Classes | Typedefs | Functions
fcppt::parse::skipper Namespace Reference

Classes

class  alternative
 Tries the left skipper, and if that fails also the right skipper. More...
 
class  any
 Skips a single character. More...
 
class  basic_char_set
 Skips all characters from a set. More...
 
class  basic_literal
 Skips a specific character. More...
 
class  basic_string
 
class  comment
 
class  epsilon
 Skips nothing. More...
 
class  not_
 Negates the result of a skipper. More...
 
class  repetition
 Skips characters repeatedly. More...
 
class  sequence
 Tries two skippers in succession. More...
 
struct  tag
 The tag skippers derive from. More...
 

Typedefs

using char_set = fcppt::parse::skipper::basic_char_set< char >
 
template<typename Type >
using is_skipper = std::is_base_of< fcppt::parse::skipper::tag, Type >
 Checks if a type is a skipper.A type is a skipper if and only if it derives from fcppt::parse::skipper::tag. More...
 
template<typename Type >
using is_valid_argument = fcppt::parse::skipper::is_skipper< fcppt::parse::deref_type< std::remove_cvref_t< Type > > >
 Checks if a parameter is a valid skipper type. More...
 
using literal = fcppt::parse::skipper::basic_literal< char >
 
template<typename Ch >
using result = fcppt::either::error< fcppt::parse::error< Ch > >
 The result type when skipping streams of Ch.The result is an fcppt::either::error of fcppt::parse::error<Ch>. More...
 
using string = fcppt::parse::skipper::basic_string< char >
 

Functions

template<typename Ch >
auto basic_space ()
 Skips all characters from fcppt::parse::space_set. More...
 
template<typename Open , typename Close >
 comment (Open &&, Close &&) -> comment< std::remove_cvref_t< Open >, std::remove_cvref_t< Close > >
 
template<typename Ch >
fcppt::parse::skipper::result< Ch > make_failure (fcppt::parse::error< Ch > &&_error)
 Creates a skipper result from an fcppt::parse::error. More...
 
template<typename Ch >
fcppt::parse::skipper::result< Ch > make_success ()
 Creates a skipper success result. More...
 
template<typename Left , typename Right , typename = std::enable_if_t<std::conjunction_v< fcppt::parse::skipper::is_valid_argument<Left>, fcppt::parse::skipper::is_valid_argument<Right>>>>
fcppt::parse::skipper::alternative< std::remove_cvref_t< Left >, std::remove_cvref_t< Right > > operator| (Left &&_left, Right &&_right)
 Creates an fcppt::parse::skipper::alternative skipper. More...
 
template<typename Skipper , typename = std::enable_if_t<fcppt::parse::skipper::is_valid_argument<Skipper>::value>>
fcppt::parse::skipper::not_< std::remove_cvref_t< Skipper > > operator! (Skipper &&_skipper)
 Creates an fcppt::parse::skipper::not_ skipper. More...
 
template<typename Parser , typename = std::enable_if_t<fcppt::parse::skipper::is_valid_argument<Parser>::value>>
fcppt::parse::skipper::repetition< std::remove_cvref_t< Parser > > operator* (Parser &&_parser)
 Creates an fcppt::parse::skipper::repetition. More...
 
template<typename Left , typename Right , typename = std::enable_if_t<std::conjunction_v< fcppt::parse::skipper::is_valid_argument<Left>, fcppt::parse::skipper::is_valid_argument<Right>>>>
fcppt::parse::skipper::sequence< std::remove_cvref_t< Left >, std::remove_cvref_t< Right > > operator>> (Left &&_left, Right &&_right)
 Creates an fcppt::parse::skipper::sequence. More...
 
template<typename Ch , typename Skipper , typename = std::enable_if_t<fcppt::parse::skipper::is_skipper<Skipper>::value>>
fcppt::parse::skipper::result< Ch > run (Skipper const &_skipper, fcppt::reference< fcppt::parse::basic_stream< Ch > > const _state)
 Runs a skipper on a stream. More...
 
auto space ()
 The skipper basic_space<char>. More...
 

Function Documentation

◆ comment()

template<typename Open , typename Close >
fcppt::parse::skipper::comment ( Open &&  ,
Close &&   
) -> comment< std::remove_cvref_t< Open >, std::remove_cvref_t< Close > >