Ticket #1914: boost_ptree_spirit_ns.patch
File boost_ptree_spirit_ns.patch, 2.3 KB (added by , 14 years ago) |
---|
-
/opt/boost-svn/include/boost-1_35/boost/property_tree/detail/json_parser_read.hpp
old new 15 15 #include <boost/property_tree/ptree.hpp> 16 16 #include <boost/property_tree/detail/ptree_utils.hpp> 17 17 #include <boost/property_tree/detail/json_parser_error.hpp> 18 #include <boost/spirit .hpp>18 #include <boost/spirit/include/classic.hpp> 19 19 #include <string> 20 20 #include <locale> 21 21 #include <istream> … … 24 24 25 25 namespace boost { namespace property_tree { namespace json_parser 26 26 { 27 using namespace BOOST_SPIRIT_CLASSIC_NS; 27 28 28 29 /////////////////////////////////////////////////////////////////////// 29 30 // Json parser context … … 155 156 // Json grammar 156 157 157 158 template<class Ptree> 158 struct json_grammar: public boost::spirit::grammar<json_grammar<Ptree> >159 struct json_grammar: public grammar<json_grammar<Ptree> > 159 160 { 160 161 161 162 typedef context<Ptree> Context; … … 167 168 struct definition 168 169 { 169 170 170 boost::spirit::rule<Scanner> root, object, member, array, item, value, string, number;171 boost::spirit::rule<typename boost::spirit::lexeme_scanner<Scanner>::type> character, escape;171 rule<Scanner> root, object, member, array, item, value, string, number; 172 rule<typename lexeme_scanner<Scanner>::type> character, escape; 172 173 173 174 definition(const json_grammar &self) 174 175 { 175 176 using namespace boost::spirit;177 178 176 // Assertions 179 177 assertion<std::string> expect_object("expected object"); 180 178 assertion<std::string> expect_eoi("expected end of input"); … … 259 257 260 258 } 261 259 262 const boost::spirit::rule<Scanner> &start() const260 const rule<Scanner> &start() const 263 261 { 264 262 return root; 265 263 } … … 279 277 Ptree &pt, 280 278 const std::string &filename) 281 279 { 282 283 using namespace boost::spirit;284 280 typedef typename Ptree::key_type::value_type Ch; 285 281 typedef typename std::vector<Ch>::iterator It; 286 282