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
  quoted_string_parser()  ();
  template< R, typename Parser> 
     (,  = ) ;
  template<typename T, typename U, typename Parser> 
     (, symbols< ,  = ) ;
  template< R, typename T, typename Parser> 
     (, symbols< ,  = ) ;

  // public data members
   chs_;
   escapes_;
   char_p_;
   ch_;
};

Description

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

quoted_string_parser public member functions

  1. quoted_string_parser()  ();
  2. template< R, typename Parser> 
       ( r,  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> 
       ( x, symbols<  escapes, 
                       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> 
       ( r, symbols<  escapes, 
                       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