24 #include <boost/config/warning_disable.hpp>
25 #include <boost/spirit/include/qi.hpp>
26 #include <boost/fusion/include/adapt_struct.hpp>
30 #define BOOST_SPIRIT_NO_PREDEFINED_TERMINALS
31 #define BOOST_SPIRIT_QI_DEBUG
48 template <attributes A>
53 std::string attributeString;
57 attributeString =
"name";
60 attributeString =
"symbol";
63 attributeString =
"units";
66 attributeString =
"description";
69 attributeString =
"format_string";
72 attributeString =
"group_name";
75 attributeString =
"type";
78 attributeString =
"field_length";
81 attributeString =
"dimensions";
84 attributeString =
"array";
89 std::cerr << attributeString <<
" not supported yet" <<
std::endl;
102 namespace SDDS {
namespace parser
104 namespace qi = boost::spirit::qi;
105 namespace ascii = boost::spirit::ascii;
106 namespace phx = boost::phoenix;
108 template <
typename Iterator>
109 struct array_parser: qi::grammar<Iterator, array(), skipper<Iterator> >
119 qi::rule<Iterator, ast::datatype, skipper<Iterator> >
array_type;
Inform & endl(Inform &inf)
std::ostream & operator<<(std::ostream &out, const array &)
qi::rule< Iterator, std::string(), skipper< Iterator > > array_format
qi::rule< Iterator, array(), skipper< Iterator > > start
qi::rule< Iterator, std::string(), skipper< Iterator > > array_symbol
qi::rule< Iterator, ast::nil(), skipper< Iterator > > array_unsupported_post
qi::rule< Iterator, ast::nil(), skipper< Iterator > > array_unsupported_pre
qi::rule< Iterator, long(), skipper< Iterator > > array_dimensions
array_parser(error_handler< Iterator > &_error_handler)
qi::rule< Iterator, std::string(), skipper< Iterator > > array_description
qi::rule< Iterator, std::string(), skipper< Iterator > > quoted_string
qi::rule< Iterator, std::string(), skipper< Iterator > > array_units
qi::rule< Iterator, std::string(), skipper< Iterator > > array_name
qi::symbols< char, ast::datatype > arraytype
qi::rule< Iterator, std::string(), skipper< Iterator > > units
qi::rule< Iterator, std::string(), skipper< Iterator > > array_group
qi::rule< Iterator, std::string(), skipper< Iterator > > string
qi::rule< Iterator, ast::datatype, skipper< Iterator > > array_type
qi::rule< Iterator, long(), skipper< Iterator > > array_field