33 #ifndef _uhal_grammars_URIGrammar_hpp_
34 #define _uhal_grammars_URIGrammar_hpp_
42 #include <boost/fusion/adapted/std_pair.hpp>
43 #include <boost/fusion/adapted/struct/adapt_struct.hpp>
44 #include <boost/spirit/include/qi_char.hpp>
45 #include <boost/spirit/include/qi_grammar.hpp>
54 ( std::string , mProtocol )
55 ( std::string , mHostname )
56 ( std::string , mPort )
57 ( std::string , mPath )
58 ( std::string , mExtension )
68 struct URIGrammar : boost::spirit::qi::grammar<std::string::const_iterator, uhal::URI(), boost::spirit::ascii::space_type>
73 boost::spirit::qi::rule< std::string::const_iterator,
uhal::URI(), boost::spirit::ascii::space_type > start;
76 boost::spirit::qi::rule< std::string::const_iterator,
uhal::URI(), boost::spirit::ascii::space_type > EthernetURI;
77 boost::spirit::qi::rule< std::string::const_iterator,
uhal::URI(), boost::spirit::ascii::space_type > PCIeURI;
81 boost::spirit::qi::rule< std::string::const_iterator, std::string(), boost::spirit::ascii::space_type > protocol;
83 boost::spirit::qi::rule< std::string::const_iterator, std::string(), boost::spirit::ascii::space_type > hostname;
85 boost::spirit::qi::rule< std::string::const_iterator, std::string(), boost::spirit::ascii::space_type > port;
87 boost::spirit::qi::rule< std::string::const_iterator, std::string(), boost::spirit::ascii::space_type > path;
89 boost::spirit::qi::rule< std::string::const_iterator, std::string(), boost::spirit::ascii::space_type > extension;
91 boost::spirit::qi::rule< std::string::const_iterator, std::vector< std::pair<std::string, std::string> > (), boost::spirit::ascii::space_type > data_pairs_vector;
93 boost::spirit::qi::rule< std::string::const_iterator, std::pair<std::string, std::string>(), boost::spirit::ascii::space_type > data_pairs;
95 boost::spirit::qi::rule< std::string::const_iterator, std::string(), boost::spirit::ascii::space_type > data_pairs_1;
97 boost::spirit::qi::rule< std::string::const_iterator, std::string(), boost::spirit::ascii::space_type > data_pairs_2;
100 boost::spirit::qi::rule< std::string::const_iterator, std::string(), boost::spirit::ascii::space_type > empty_string;