Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Struct template quoted_string_parser

boost::parser::quoted_string_parser

Synopsis

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

template<typename Quotes, typename Escapes, typename CharParser> 
struct quoted_string_parser {

  // public member functions
  constexpr  quoted_string_parser() return ();
  template< R, typename Parser> 
    constexpr  auto 
    (R &&, parser_interface< Parser > = ) ;
  template<typename T, typename U, typename Parser> 
    auto (T, symbols< U > const &, parser_interface< Parser > = ) ;
  template< R, typename T, typename Parser> 
    auto (R &&, symbols< T > const &, parser_interface< Parser > = ) ;

  // public data members
  Quotes chs_;
  Escapes escapes_;
  parser_interface< CharParser > char_p_;
  char32_t ch_;
};

Description

Matches a string delimited by quotation marks; produces a std::string attribute.

quoted_string_parser public member functions

  1. constexpr  quoted_string_parser() return ();
  2. template< R, typename Parser> 
      constexpr  auto 
      (R && r, parser_interface< Parser > char_p = ) ;

    Returns a parser_interface containing a quoted_string_parser that accepts any of the values in r as its quotation marks. If the input being matched during the parse is a a sequence of char32_t, the elements of r are transcoded from their presumed encoding to UTF-32 during the comparison. Otherwise, the character begin matched is directly compared to the elements of r.

  3. template<typename T, typename U, typename Parser> 
      auto (T x, symbols< U > const & escapes, 
                      parser_interface< Parser > char_p = ) ;

    Returns a parser_interface containing a quoted_string_parser that uses x as its quotation marks. symbols provides a list of strings that may appear after a backslash to form an escape sequence, and what character(s) each escape sequence represents. Note that "\\"</tt> and <tt>"\ch" are always valid escape sequences.

  4. template< R, typename T, typename Parser> 
      auto (R && r, symbols< T > const & escapes, 
                      parser_interface< Parser > char_p = ) ;

    Returns a parser_interface containing a quoted_string_parser that accepts any of the values in r as its quotation marks. If the input being matched during the parse is a a sequence of char32_t, the elements of r are transcoded from their presumed encoding to UTF-32 during the comparison. Otherwise, the character begin matched is directly compared to the elements of r. symbols provides a list of strings that may appear after a backslash to form an escape sequence, and what character(s) each escape sequence represents. Note that "\\"</tt> and <tt>"\ch" are always valid escape sequences.


PrevUpHomeNext