Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Struct template perm_parser

boost::parser::perm_parser

Synopsis

// In header: <boost/parser/parser.hpp>

template<typename ParserTuple> 
struct perm_parser {

  // public member functions
  perm_parser(ParserTuple);
  template<typename Iter, typename Sentinel, typename Context, 
           typename SkipParser> 
    auto call(Iter &, Sentinel, Context const &, SkipParser const &, 
              unspecified, bool &) const;
  template<typename Iter, typename Sentinel, typename Context, 
           typename SkipParser, typename Attribute> 
    void call(Iter &, Sentinel, Context const &, SkipParser const &, 
              unspecified, bool &, Attribute &) const;
  template<typename Iter, typename Sentinel, typename Context, 
           typename SkipParser, typename... Ts, int... Is> 
    void call_impl(Iter &, Sentinel, Context const &, SkipParser const &, 
                   unspecified, bool &, tuple< Ts... > &, 
                   std::integer_sequence< int, Is... >) const;

  // public data members
  ParserTuple parsers_;
};

Description

Applies each parsers in ParserTuple, an any order, stopping after all of them have matched the input. The parse succeeds iff all the parsers match, regardless of the order in which they do. The attribute produced is a parser::tuple containing the attributes of the subparsers, in their order of the parsers' appearance in ParserTuple, not the order of the parsers' matches. It is an error to specialize perm_parser with a ParserTuple template parameter that includes an eps_parser.

perm_parser public member functions

  1. perm_parser(ParserTuple parsers);
  2. template<typename Iter, typename Sentinel, typename Context, 
             typename SkipParser> 
      auto call(Iter & first_, Sentinel last, Context const & context, 
                SkipParser const & skip, unspecified flags, bool & success) const;
  3. template<typename Iter, typename Sentinel, typename Context, 
             typename SkipParser, typename Attribute> 
      void call(Iter & first_, Sentinel last, Context const & context, 
                SkipParser const & skip, unspecified flags, bool & success, 
                Attribute & retval) const;
  4. template<typename Iter, typename Sentinel, typename Context, 
             typename SkipParser, typename... Ts, int... Is> 
      void call_impl(Iter & first, Sentinel last, Context const & context, 
                     SkipParser const & skip, unspecified flags, bool & success, 
                     tuple< Ts... > & retval, 
                     std::integer_sequence< int, Is... >) const;

PrevUpHomeNext