29 #ifndef DATATOOLS_CONFIGURATION_PARSERS_H 30 #define DATATOOLS_CONFIGURATION_PARSERS_H 34 #include <boost/spirit/include/qi.hpp> 35 #include <boost/spirit/include/qi_grammar.hpp> 39 namespace configuration {
53 template <
typename Iterator>
55 : boost::spirit::qi::grammar<Iterator, std::string()>
60 namespace qi = boost::spirit::qi;
62 start %= ( qi::char_(
"a-zA-Z_") >> *qi::char_(
"a-zA-Z_0-9"));
67 boost::spirit::qi::rule<Iterator, std::string()>
start;
82 template <
typename Iterator>
84 : boost::spirit::qi::grammar<Iterator, std::string()>
89 namespace qi = boost::spirit::qi;
91 start %= ( qi::char_(
"a-zA-Z_") >> *qi::char_(
"a-zA-Z_0-9"));
96 boost::spirit::qi::rule<Iterator, std::string()>
start;
112 template <
typename Iterator>
114 : boost::spirit::qi::grammar<Iterator, std::string()>
119 namespace qi = boost::spirit::qi;
121 start %= ( qi::char_(
"a-zA-Z_") >> *qi::char_(
"a-zA-Z0-9_"))
122 >> -( qi::char_(
'[') >> +qi::digit >> qi::char_(
']') );
127 boost::spirit::qi::rule<Iterator, std::string()>
start;
144 template <
typename Iterator>
146 : boost::spirit::qi::grammar<Iterator,
152 namespace qi = boost::spirit::qi;
157 >> *( qi::char_(
'/') >>
subgrpg)
164 boost::spirit::qi::rule<Iterator, std::string()>
start;
182 template <
typename Iterator>
184 : boost::spirit::qi::grammar<Iterator, std::string()>
189 namespace qi = boost::spirit::qi;
193 >> *( qi::char_(
'/') >>
vnig >> qi::char_(
'/') >>
pnig)
198 boost::spirit::qi::rule<Iterator, std::string()>
start;
217 template <
typename Iterator>
219 : boost::spirit::qi::grammar<Iterator, std::string()>
224 namespace qi = boost::spirit::qi;
228 >> *( qi::char_(
'/') >>
pnig >> qi::char_(
'/') >>
vnig)
234 boost::spirit::qi::rule<Iterator, std::string()>
start;
254 template <
typename Iterator>
256 : boost::spirit::qi::grammar<Iterator, std::string()>
261 namespace qi = boost::spirit::qi;
267 boost::spirit::qi::rule<Iterator, std::string()>
start;
289 template <
typename Iterator>
291 : boost::spirit::qi::grammar<Iterator, std::string()>
296 namespace qi = boost::spirit::qi;
302 boost::spirit::qi::rule<Iterator, std::string()>
start;
323 template <
typename Iterator>
325 : boost::spirit::qi::grammar<Iterator, std::string()>
330 namespace qi = boost::spirit::qi;
336 boost::spirit::qi::rule<Iterator, std::string()>
start;
354 template <
typename Iterator>
356 : boost::spirit::qi::grammar<Iterator, std::string()>
361 namespace qi = boost::spirit::qi;
362 namespace bsa = boost::spirit::ascii;
364 start %= ( +qi::char_ );
378 boost::spirit::qi::rule<Iterator, std::string()>
start;
397 template <
typename Iterator>
399 : boost::spirit::qi::grammar<Iterator, std::string()>
404 namespace qi = boost::spirit::qi;
410 boost::spirit::qi::rule<Iterator, std::string()>
start;
419 #endif // DATATOOLS_CONFIGURATION_PARSERS_H