22 #include <boost/spirit/include/phoenix_core.hpp>
23 #include <boost/spirit/include/phoenix_operator.hpp>
24 #include <boost/spirit/include/phoenix_fusion.hpp>
25 #include <boost/spirit/include/phoenix_stl.hpp>
26 #include <boost/spirit/include/phoenix_object.hpp>
27 #include <boost/spirit/include/phoenix_bind.hpp>
29 namespace SDDS {
namespace parser
31 template <
typename Iterator>
32 file_parser<Iterator>::file_parser(error_handler<Iterator> & _error_handler):
33 file_parser::base_type(start),
34 version_m(_error_handler),
35 description_m(_error_handler),
36 parameter_m(_error_handler),
37 column_m(_error_handler),
38 data_m(_error_handler),
39 associate_m(_error_handler),
40 array_m(_error_handler),
41 include_m(_error_handler)
47 typedef function<error_handler<Iterator> > error_handler_function;
55 auto push_backParameter = phx::push_back(phx::at_c<2>(_val), _1);
56 auto push_backColumn = phx::push_back(phx::at_c<3>(_val), _1);
57 auto push_backAssociate = phx::push_back(phx::at_c<5>(_val), _1);
58 auto push_backArray = phx::push_back(phx::at_c<6>(_val), _1);
59 auto push_backInclude = phx::push_back(phx::at_c<7>(_val), _1);
62 version_m[phx::at_c<0>(_val) = _1]
63 > -description_m[phx::at_c<1>(_val) = _1]
64 > *(parameter_m[push_backParameter]
65 | column_m[push_backColumn]
66 | associate_m[push_backAssociate]
67 | array_m[push_backArray]
68 | include_m[push_backInclude]
70 > data_m[phx::at_c<4>(_val) = _1]
73 BOOST_SPIRIT_DEBUG_NODES(
78 error_handler_function(_error_handler)(
79 std::string(
"Error! Expecting "), _4, _3));