10 #define ARRAY_DEF_HPP_
14 #include <boost/spirit/include/phoenix_core.hpp>
15 #include <boost/spirit/include/phoenix_operator.hpp>
16 #include <boost/spirit/include/phoenix_fusion.hpp>
17 #include <boost/spirit/include/phoenix_bind.hpp>
19 namespace SDDS {
namespace parser
21 template <
typename Iterator>
28 typedef function<error_handler<Iterator> > error_handler_function;
33 qi::lexeme_type lexeme;
37 qi::short_type short_;
46 | lexeme[(alpha | char_(
"@:#+-%._$&/")) >> *(alnum | char_(
"@:#+-%._$&/"))];
47 units %= lexeme[alpha >> *(alpha |
'/')]
104 lit(
"&array")[_pass = complainArray]
107 BOOST_SPIRIT_DEBUG_NODES(
111 on_error<fail>(
start,
112 error_handler_function(_error_handler)(
113 std::string(
"Error! Expecting "), _4, _3));
qi::rule< Iterator, ast::nil(), skipper< Iterator > > array_unsupported_pre
qi::rule< Iterator, std::string(), skipper< Iterator > > array_symbol
array_parser(error_handler< Iterator > &_error_handler)
qi::rule< Iterator, array(), skipper< Iterator > > start
qi::rule< Iterator, std::string(), skipper< Iterator > > quoted_string
qi::rule< Iterator, ast::datatype, skipper< Iterator > > array_type
constexpr double alpha
The fine structure constant, no dimension.
qi::rule< Iterator, long(), skipper< Iterator > > array_dimensions
qi::symbols< char, ast::datatype > arraytype
qi::rule< Iterator, std::string(), skipper< Iterator > > string
qi::rule< Iterator, std::string(), skipper< Iterator > > array_description
qi::rule< Iterator, long(), skipper< Iterator > > array_field
qi::rule< Iterator, std::string(), skipper< Iterator > > array_units
qi::rule< Iterator, std::string(), skipper< Iterator > > array_format
qi::rule< Iterator, std::string(), skipper< Iterator > > array_group
qi::rule< Iterator, ast::nil(), skipper< Iterator > > array_unsupported_post
qi::rule< Iterator, std::string(), skipper< Iterator > > units
qi::rule< Iterator, std::string(), skipper< Iterator > > array_name