Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template parser_interface

boost::parser::parser_interface

Synopsis

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

template<typename Parser, typename GlobalState, typename ErrorHandler> 
struct parser_interface {
  // types
  typedef Parser       ;                    
  typedef GlobalState  ;              
  typedef ErrorHandler ;             
  typedef int          ;

  // public member functions
  ();
  ();
  (, , );
  constexpr  auto () ;
  constexpr  auto () ;
  constexpr  auto () ;
  constexpr  auto () ;
  constexpr  auto () ;
  template<typename ParserType2> 
    constexpr  auto (parser_interface< ParserType2 >) ;
  constexpr  auto (char) ;
  constexpr  auto (char32_t) ;
  template< R> 
    constexpr  auto (R &&) ;
  template<typename ParserType2> 
    constexpr  auto (parser_interface< ParserType2 >) ;
  constexpr  auto (char) ;
  constexpr  auto (char32_t) ;
  template< R> 
    constexpr  auto (R &&) ;
  template<typename ParserType2> 
    constexpr  auto (parser_interface< ParserType2 >) ;
  template<typename ParserType2> 
    constexpr  auto (parser_interface< ParserType2 >) ;
  constexpr  auto (char) ;
  constexpr  auto (char32_t) ;
  template< R> 
    constexpr  auto (R &&) ;
  template<typename ParserType2> 
    constexpr  auto (parser_interface< ParserType2 >) ;
  constexpr  auto (char) ;
  constexpr  auto (char32_t) ;
  template< R> 
    constexpr  auto (R &&) ;
  template<typename ParserType2> 
    constexpr  auto (parser_interface< ParserType2 >) ;
  constexpr  auto (char) ;
  constexpr  auto (char32_t) ;
  template< R> 
    constexpr  auto (R &&) ;
  template<typename Action> constexpr  auto (Action) ;
  template<typename Arg,  Args> 
    constexpr  auto (Arg &&, Args &&...) ;
};

Description

A wrapper for parsers that provides the operations that must be supported by all parsers (e.g. operator>>()). GlobalState is an optional state object that can be accessed within semantic actions via a call to _globals(). This global state object is ignored for all but the topmost parser; the topmost global state object is available in the semantic actions of all nested parsers. ErrorHandler is the type of the error handler to be used on parse failure. This handler is ignored on all but the topmost parser; the topmost parser's error handler is used for all errors encountered during parsing.

parser_interface public member functions

  1. ();
  2. ( p);
  3. ( p,  gs,  eh);
  4. constexpr  auto () ;

    Returns a parser_interface containing a parser equivalent to an expect_parser containing parser_, with FailOnMatch == true.

  5. constexpr  auto () ;

    Returns a parser_interface containing a parser equivalent to an expect_parser containing parser_, with FailOnMatch == false.

  6. constexpr  auto () ;

    Returns a parser_interface containing a parser equivalent to a zero_plus_parser containing parser_.

  7. constexpr  auto () ;

    Returns a parser_interface containing a parser equivalent to a one_plus_parser containing parser_.

  8. constexpr  auto () ;

    Returns a parser_interface containing a parser equivalent to a opt_parser containing parser_.

  9. template<typename ParserType2> 
      constexpr  auto 
      (parser_interface< ParserType2 > rhs) ;

    Returns a parser_interface containing a parser equivalent to a seq_parser containing parser_ followed by rhs.parser_.

  10. constexpr  auto (char rhs) ;

    Returns a parser_interface containing a parser equivalent to a seq_parser containing parser_ followed by lit(rhs).

  11. constexpr  auto (char32_t rhs) ;

    Returns a parser_interface containing a parser equivalent to a seq_parser containing parser_ followed by lit(rhs).

  12. template< R> 
      constexpr  auto (R && r) ;

    Returns a parser_interface containing a parser equivalent to a seq_parser containing parser_ followed by lit(rhs).

  13. template<typename ParserType2> 
      constexpr  auto 
      (parser_interface< ParserType2 > rhs) ;

    Returns a parser_interface containing a parser equivalent to a seq_parser containing parser_ followed by rhs.parser_. No back-tracking is allowed after parser_ succeeds; if rhs.parser_ fails after parser_ succeeds, the top-level parse fails.

  14. constexpr  auto (char rhs) ;

    Returns a parser_interface containing a parser equivalent to a seq_parser containing parser_ followed by lit(rhs). No back-tracking is allowed after parser_ succeeds; if lit(rhs) fails after parser_ succeeds, the top-level parse fails.

  15. constexpr  auto (char32_t rhs) ;

    Returns a parser_interface containing a parser equivalent to a seq_parser containing parser_ followed by lit(rhs). No back-tracking is allowed after parser_ succeeds; if lit(rhs) fails after parser_ succeeds, the top-level parse fails.

  16. template< R> 
      constexpr  auto (R && r) ;

    Returns a parser_interface containing a parser equivalent to a seq_parser containing parser_ followed by lit(rhs). No back-tracking is allowed after parser_ succeeds; if lit(rhs) fails after parser_ succeeds, the top-level parse fails.

  17. template<typename ParserType2> 
      constexpr  auto 
      (parser_interface< ParserType2 > rhs) ;

    Returns a parser_interface containing a parser equivalent to an or_parser containing parser_ followed by rhs.parser_.

  18. template<typename ParserType2> 
      constexpr  auto 
      (parser_interface< ParserType2 > rhs) ;

    Returns a parser_interface containing a parser equivalent to a perm_parser containing parser_ followed by rhs.parser_. It is an error to use eps (conditional or not) with this operator.

  19. constexpr  auto (char rhs) ;

    Returns a parser_interface containing a parser equivalent to an or_parser containing parser_ followed by lit(rhs).

  20. constexpr  auto (char32_t rhs) ;

    Returns a parser_interface containing a parser equivalent to an or_parser containing parser_ followed by lit(rhs).

  21. template< R> 
      constexpr  auto (R && r) ;

    Returns a parser_interface containing a parser equivalent to an or_parser containing parser_ followed by lit(rhs).

  22. template<typename ParserType2> 
      constexpr  auto 
      (parser_interface< ParserType2 > rhs) ;

    Returns a parser_interface containing a parser equivalent to !rhs >> *this.

  23. constexpr  auto (char rhs) ;

    Returns a parser_interface containing a parser equivalent to !lit(rhs) >> *this.

  24. constexpr  auto (char32_t rhs) ;

    Returns a parser_interface containing a parser equivalent to !lit(rhs) >> *this.

  25. template< R> 
      constexpr  auto (R && r) ;

    Returns a parser_interface containing a parser equivalent to !lit(rhs) >> *this.

  26. template<typename ParserType2> 
      constexpr  auto 
      (parser_interface< ParserType2 > rhs) ;

    Returns a parser_interface containing a parser equivalent to an delimited_seq_parser containing parser_ and rhs.parser_.

  27. constexpr  auto (char rhs) ;

    Returns a parser_interface containing a parser equivalent to an delimited_seq_parser containing parser_ and lit(rhs).

  28. constexpr  auto (char32_t rhs) ;

    Returns a parser_interface containing a parser equivalent to an delimited_seq_parser containing parser_ and lit(rhs).

  29. template< R> 
      constexpr  auto (R && r) ;

    Returns a parser_interface containing a parser equivalent to an delimited_seq_parser containing parser_ and lit(rhs).

  30. template<typename Action> constexpr  auto (Action action) ;

    Returns a parser_interface containing a parser equivalent to an action_parser containing parser_, with semantic action action.

  31. template<typename Arg,  Args> 
      constexpr  auto (Arg && arg, Args &&... args) ;

    Returns parser_((Arg &&)arg, (Args &&)args...). This is useful for those parsers that have operator() overloads, e.g. <lsquo></lsquo>char_('x<rsquo></rsquo>)<lsquo></lsquo>. By convention, parsers<rsquo></rsquo> operator()s return parser_interfaces.

    This function does not participate in overload resolution unless parser_((Arg &&)arg, (Args &&)args...) is well-formed.


PrevUpHomeNext