4.6.0
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
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.
 
template<typename Type >
using is_valid_argument
 Checks if a parameter is a valid skipper type.
 
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>.
 
using string = fcppt::parse::skipper::basic_string<char>
 

Functions

template<typename Ch >
auto basic_space ()
 Skips all characters from fcppt::parse::space_set.
 
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.
 
template<typename Ch >
fcppt::parse::skipper::result< Ch > make_success ()
 Creates a skipper success result.
 
template<typename Left , typename Right >
requires (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.
 
template<typename Skipper >
requires (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.
 
template<typename Parser >
requires (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.
 
template<typename Left , typename Right >
requires (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.
 
template<typename Ch , typename Skipper >
requires (fcppt::parse::skipper::is_skipper_v<Skipper>)
fcppt::parse::skipper::result< Ch > run (Skipper const &_skipper, fcppt::reference< fcppt::parse::basic_stream< Ch > > const _state)
 Runs a skipper on a stream.
 
auto space ()
 The skipper basic_space<char>.
 

Variables

template<typename Type >
constexpr bool is_skipper_v = fcppt::parse::skipper::is_skipper<Type>::value
 Checks if a type is a skipper.
 

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 > >