4.4.0
|
|
Freundlich's C++ toolkit |
A sum of two parsers.
This parser first tries its left parser and if that succeeds returns its result. Otherwise, it tries the right parser and returns its result.
Classes | |
struct | left |
struct | right |
Public Types | |
using | left_result = fcppt::options::result_of< Left > |
using | right_result = fcppt::options::result_of< Right > |
using | variant = fcppt::variant::object< fcppt::options::left< left_result >, fcppt::options::right< right_result > > |
using | result_type = fcppt::record::object< fcppt::record::element< Label, variant > > |
Public Member Functions | |
sum (Left &&, Right &&) | |
fcppt::options::parse_result< result_type > | parse (fcppt::options::state &&, fcppt::options::parse_context const &) const |
fcppt::options::flag_name_set | flag_names () const |
fcppt::options::option_name_set | option_names () const |
fcppt::options::usage | usage () const |
using fcppt::options::sum< Label, Left, Right >::left_result = fcppt::options::result_of<Left> |
using fcppt::options::sum< Label, Left, Right >::result_type = fcppt::record::object<fcppt::record::element<Label, variant> > |
using fcppt::options::sum< Label, Left, Right >::right_result = fcppt::options::result_of<Right> |
using fcppt::options::sum< Label, Left, Right >::variant = fcppt::variant:: object<fcppt::options::left<left_result>, fcppt::options::right<right_result> > |
fcppt::options::sum< Label, Left, Right >::sum | ( | Left && | , |
Right && | |||
) |
fcppt::options::flag_name_set fcppt::options::sum< Label, Left, Right >::flag_names | ( | ) | const |
fcppt::options::option_name_set fcppt::options::sum< Label, Left, Right >::option_names | ( | ) | const |
fcppt::options::parse_result< result_type > fcppt::options::sum< Label, Left, Right >::parse | ( | fcppt::options::state && | , |
fcppt::options::parse_context const & | |||
) | const |
fcppt::options::usage fcppt::options::sum< Label, Left, Right >::usage | ( | ) | const |