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_fwd.hpp>

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

  // public member functions
  quoted_string_parser() return parser_interface(unspecified);
  template<parsable_range_like R, typename Parser = unspecified> 
    auto operator()(R &&, parser_interface< Parser > = char_) const noexcept;
  template<typename T, typename U, typename Parser = unspecified> 
    auto operator()(T, symbols< U > const &, 
                    parser_interface< Parser > = char_) const noexcept;
  template<parsable_range_like R, typename T, typename Parser = unspecified> 
    auto operator()(R &&, symbols< T > const &, 
                    parser_interface< Parser > = char_) const noexcept;
};

Description

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

quoted_string_parser public member functions

  1. quoted_string_parser() return parser_interface(unspecified);
  2. template<parsable_range_like R, typename Parser = unspecified> 
      auto operator()(R && r, parser_interface< Parser > char_p = char_) const noexcept;

    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 = unspecified> 
      auto operator()(T x, symbols< U > const & escapes, 
                      parser_interface< Parser > char_p = char_) const noexcept;

    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<parsable_range_like R, typename T, typename Parser = unspecified> 
      auto operator()(R && r, symbols< T > const & escapes, 
                      parser_interface< Parser > char_p = char_) const noexcept;

    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