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_stl.hpp>
18 #include <boost/spirit/include/phoenix_object.hpp>
19 #include <boost/spirit/include/phoenix_bind.hpp>
21 namespace SDDS {
namespace parser
23 template <
typename Iterator>
24 file_parser<Iterator>::file_parser(error_handler<Iterator> & _error_handler):
25 file_parser::base_type(start),
26 version_m(_error_handler),
27 description_m(_error_handler),
28 parameter_m(_error_handler),
29 column_m(_error_handler),
30 data_m(_error_handler),
31 associate_m(_error_handler),
32 array_m(_error_handler),
33 include_m(_error_handler)
39 typedef function<error_handler<Iterator> > error_handler_function;
47 auto push_backParameter = phx::push_back(phx::at_c<2>(_val), _1);
48 auto push_backColumn = phx::push_back(phx::at_c<3>(_val), _1);
49 auto push_backAssociate = phx::push_back(phx::at_c<5>(_val), _1);
50 auto push_backArray = phx::push_back(phx::at_c<6>(_val), _1);
51 auto push_backInclude = phx::push_back(phx::at_c<7>(_val), _1);
54 version_m[phx::at_c<0>(_val) = _1]
55 > -description_m[phx::at_c<1>(_val) = _1]
56 > *(parameter_m[push_backParameter]
57 | column_m[push_backColumn]
58 | associate_m[push_backAssociate]
59 | array_m[push_backArray]
60 | include_m[push_backInclude]
62 > data_m[phx::at_c<4>(_val) = _1]
65 BOOST_SPIRIT_DEBUG_NODES(
70 error_handler_function(_error_handler)(
71 std::
string("Error! Expecting "), _4, _3));