17 #ifndef DESCRIPTION_HPP_
18 #define DESCRIPTION_HPP_
24 #include <boost/config/warning_disable.hpp>
25 #include <boost/spirit/include/qi.hpp>
26 #include <boost/fusion/include/adapt_struct.hpp>
27 #include <boost/optional.hpp>
29 #define BOOST_SPIRIT_NO_PREDEFINED_TERMINALS
30 #define BOOST_SPIRIT_QI_DEBUG
41 if (desc.
text_m) out <<
"text = " << *desc.
text_m <<
", ";
49 (boost::optional<std::string>, text_m)
50 (boost::optional<std::string>, content_m)
53 namespace SDDS {
namespace parser
55 namespace qi = boost::spirit::qi;
56 namespace ascii = boost::spirit::ascii;
57 namespace phx = boost::phoenix;
59 template <
typename Iterator>
60 struct description_parser: qi::grammar<Iterator, description(), skipper<Iterator> >
62 description_parser(error_handler<Iterator> & _error_handler);
64 qi::rule<Iterator, description(), skipper<Iterator> > start;
65 qi::rule<Iterator, std::string(), skipper<Iterator> > quoted_string,
66 description_text, description_content;
BOOST_FUSION_ADAPT_STRUCT(SDDS::description,(boost::optional< std::string >, text_m)(boost::optional< std::string >, content_m)) namespace SDDS
std::ostream & operator<<(std::ostream &out, const array &)
boost::optional< std::string > text_m
boost::optional< std::string > content_m