XML-Parser: jemand lust zu testen?
-
Gibts jemanden der das ausprobiert hat und bei dem das dann funktionierte? kann ja net sein, dass etwas was bei mir mit -pedantic funktioniert hier niemand zum laufen kriegt
-
keine ahnung, was da los ist. der fehler dürfte eigentlich nicht auftauchen. Wenn du eine ide benutzt, weist du, in welcher Datei/zeile ich diesen verhängnisvollen aufruf tätige?
aber wenn ich mir die fehlermeldungen mal anschaue:
macht xstring denn in diesem ctor auch sonst probleme?
std::basic_string<_Elem>::basic_string(_Elemhi,
hab visual studio .net 2003 mit boost 1.32
hab noch nie probleme mit xstring gehabt!!!
hier mal noch die fehlermeldungen mit dem betreffenden code:
c:\Dokumente und Einstellungen\Gerald\Desktop\XMLParser\char_convert.hpp(158) : see reference to class template instantiation 'std::basic_string<_Elem>' being compiled with [ _Elem=const char ] return privat::ConvertHelper<To,From,boost::is_pointer<From>::value>::convert(input); c:\Dokumente und Einstellungen\Gerald\Desktop\XMLParser\TagParser.hpp(32) : see reference to function template instantiation 'utility::privat::ConvertHelper<To,From,__formal>::returnType utility::char_convert<XML::TagParser::definition<Scanner>::Char,const char[3]>(From (&))' being compiled with [ To=XML::TagParser::definition<scanner_t>::Char, From=const char [3], __formal=false, Scanner=scanner_t ] endTagBegin=utility::char_convert<Char>("</"); c:\Dokumente und Einstellungen\Gerald\Desktop\XMLParser\TagParser.hpp(28) : while compiling class-template member function 'XML::TagParser::definition<Scanner>::definition(const XML::TagParser &)' with [ Scanner=scanner_t ] definition(const TagParser& self){ c:\Dokumente und Einstellungen\Gerald\Desktop\XMLParser\XMLParser.hpp(39) : see reference to function template instantiation 'boost::spirit::tree_parse_info<IteratorT> boost::spirit::ast_parse<Iterator,boost::spirit::kleene_star<S>,boost::spirit::space_parser>(const IteratorT &,const IteratorT &,const boost::spirit::parser<DerivedT> &,const SkipT &)' being compiled with [ IteratorT=Iterator, Iterator=Iterator, S=XML::TagParser, DerivedT=boost::spirit::kleene_star<XML::TagParser>, SkipT=boost::spirit::space_parser ] boost::spirit::tree_parse_info<Iterator> info=boost::spirit::ast_parse(begin,end,*parser,boost::spirit::space_p); c:\Dokumente und Einstellungen\Gerald\Desktop\XMLParser\XMLParser.hpp(92) : see reference to function template instantiation 'XML::TagTree<Char> XML::parse<Iterator>(Iterator,Iterator)' being compiled with [ Char=char, Iterator=Iterator ] return parse(first,last); c:\Dokumente und Einstellungen\Gerald\Desktop\XMLParser\test.cpp(9) : see reference to function template instantiation 'XML::TagTree<Char> XML::parseFromFile<char>(const Char *)' being compiled with [ Char=char ] XML::TagTree<char> test=XML::parseFromFile("test.xml");
hast du den bug schon gefunden...lad die funktionierende version noch mal hoch!! dann test ich noch mal...
cu
-
Leider kann ich das jetzt nicht mehr runterladen. Der Link ist ungültig. Evtl kann ich das morgen auf der Arbeit mal kurz durchtesten, wenn du das Rar-File noch mal hochlädst.
-
hab den fehler hoffentlich gefunden. bei string literalen hat char_convert bei dir einen std::string<const char> erstellt, das darf natürlich nicht sein...
da scheinbar der host bei dem ich upgeloaded hab kurzzeitig augrund eines server umzugs den dienst nicht anbieten kann, muss ich die codeveränderung hier posten(ja, ich besitze keinen eigenen webspace
)
ersetzt bitte das template in der char_convert.hpp in zeile 142 mit folgendem code:
//from is a char array template<class To,class From,int i> struct ConvertHelper<To,From[i],false>{ typedef std::basic_string<To> returnType; typedef typename boost::remove_const<From>::type InnerFrom; static returnType convert(const std::basic_string<InnerFrom>& str){ return Converter<To,InnerFrom>::convert(str); } }; }
-
so, die server sind wieder up
könnt also wieder dlen
-
funktioniert das jetzt bei jemandem mit einer neueren spirit version?
-
Ich hab die neue Version von Spirit "installiert" und danach ließ sich alles ohne Probleme kompilieren/ausführen. Ich benutze Mingw. Obs die aktuelle Version ist weiß ich nicht, da der Compiler schon in der IDE CodeBlocks integriert war.
-
hi,
hab noch mal die neue version geladen und compiliert:hier ist noch ein problem:
#if defined(BOOST_SPIRIT_DEBUG) && \ (BOOST_SPIRIT_DEBUG_FLAGS & BOOST_SPIRIT_DEBUG_FLAGS_TREES) BOOST_SPIRIT_DEBUG_OUT << ">>> group_match(begin) <<<\n" "new node(" << id << ") \""; for (IteratorT2 it = first; it != last; ++it) impl::token_printer(BOOST_SPIRIT_DEBUG_OUT, *it); BOOST_SPIRIT_DEBUG_OUT << "\"\n"; BOOST_SPIRIT_DEBUG_OUT << "new child tree (before grouping):\n" << m << "\n"; tree_policy_t::group_match(m, id, first, last); BOOST_SPIRIT_DEBUG_OUT << "new child tree (after grouping):\n" << m << "\n"; BOOST_SPIRIT_DEBUG_OUT << ">>> group_match(end) <<<\n"; #else tree_policy_t::group_match(m, id, first, last); // <----- hier #endif
cu
error
c:\Boost\include\boost-1_32\boost\spirit\tree\common.hpp(730) : error C2664: 'void boost::spirit::ast_tree_policy<MatchPolicyT,NodeFactoryT>::group_match<IteratorT2,IteratorT2>(boost::spirit::ast_tree_policy<MatchPolicyT,NodeFactoryT>::match_t &,const boost::spirit::parser_id &,const Iterator1T &,const Iterator2T &)' : cannot convert parameter 1 from 'boost::spirit::parser_result<ParserT,ScannerT>::type' to 'boost::spirit::ast_tree_policy<MatchPolicyT,NodeFactoryT>::match_t &' with [ MatchPolicyT=boost::spirit::ast_match_policy<Iterator,boost::spirit::node_val_data_factory<boost::spirit::nil_t>>, NodeFactoryT=boost::spirit::node_val_data_factory<boost::spirit::nil_t>, IteratorT2=boost::spirit::scanner<Iterator,scanner_policies_t>::iterator_t, Iterator1T=boost::spirit::scanner<Iterator,scanner_policies_t>::iterator_t, Iterator2T=boost::spirit::scanner<Iterator,scanner_policies_t>::iterator_t ] and [ ParserT=boost::spirit::rule<scanner_t,boost::spirit::closure<XML::Closure1<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::context_t>, ScannerT=boost::spirit::rule<scanner_t>::scanner_t ] and [ MatchPolicyT=boost::spirit::ast_match_policy<Iterator,boost::spirit::node_val_data_factory<boost::spirit::nil_t>>, NodeFactoryT=boost::spirit::node_val_data_factory<boost::spirit::nil_t> ] A reference that is not to 'const' cannot be bound to a non-lvalue c:\Boost\include\boost-1_32\boost\spirit\core\non_terminal\impl\rule.ipp(191) : see reference to function template instantiation 'void boost::spirit::common_tree_match_policy<MatchPolicyT,IteratorT,NodeFactoryT,TreePolicyT>::group_match<boost::spirit::parser_result<ParserT,ScannerT>::type,boost::spirit::scanner<IteratorT,PoliciesT>::iterator_t>(MatchT &,const boost::spirit::parser_id &,const IteratorT2 &,const IteratorT2 &) const' being compiled with [ MatchPolicyT=boost::spirit::ast_match_policy<Iterator,boost::spirit::node_val_data_factory<boost::spirit::nil_t>>, IteratorT=Iterator, NodeFactoryT=boost::spirit::node_val_data_factory<boost::spirit::nil_t>, TreePolicyT=boost::spirit::ast_tree_policy<boost::spirit::ast_match_policy<Iterator,boost::spirit::node_val_data_factory<boost::spirit::nil_t>>,boost::spirit::node_val_data_factory<boost::spirit::nil_t>>, ParserT=boost::spirit::rule<scanner_t,boost::spirit::closure<XML::Closure1<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::context_t>, ScannerT=boost::spirit::rule<scanner_t>::scanner_t, PoliciesT=scanner_policies_t, MatchT=boost::spirit::parser_result<boost::spirit::rule<scanner_t,boost::spirit::closure<XML::Closure1<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::context_t>,boost::spirit::rule<scanner_t>::scanner_t>::type, IteratorT2=boost::spirit::scanner<Iterator,scanner_policies_t>::iterator_t ] c:\Boost\include\boost-1_32\boost\spirit\core\non_terminal\impl\rule.ipp(172) : see reference to function template instantiation 'boost::spirit::parser_result<ParserT,ScannerT>::type boost::spirit::impl::rule_base<DerivedT,EmbedT,T0,T1,T2>::parse_main<ScannerT>(const ScannerT &) const' being compiled with [ ParserT=boost::spirit::rule<scanner_t,boost::spirit::closure<XML::Closure1<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::context_t>, ScannerT=boost::spirit::rule<scanner_t>::scanner_t, DerivedT=boost::spirit::rule<scanner_t,boost::spirit::closure<XML::Closure1<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::context_t>, EmbedT=const boost::spirit::rule<scanner_t,boost::spirit::closure<XML::Closure1<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::context_t> &, T0=scanner_t, T1=boost::spirit::closure<XML::Closure1<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::context_t, T2=boost::spirit::nil_t ] c:\Boost\include\boost-1_32\boost\spirit\core\non_terminal\impl\rule.ipp(233) : see reference to function template instantiation 'boost::spirit::parser_result<ParserT,ScannerT>::type boost::spirit::impl::rule_base<DerivedT,EmbedT,T0,T1,T2>::parse<ScannerT>(const ScannerT &) const' being compiled with [ ParserT=boost::spirit::rule<scanner_t,boost::spirit::closure<XML::Closure1<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::context_t>, ScannerT=boost::spirit::rule<scanner_t>::scanner_t, DerivedT=boost::spirit::rule<scanner_t,boost::spirit::closure<XML::Closure1<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::context_t>, EmbedT=const boost::spirit::rule<scanner_t,boost::spirit::closure<XML::Closure1<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::context_t> &, T0=scanner_t, T1=boost::spirit::closure<XML::Closure1<std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::context_t, T2=boost::spirit::nil_t ] c:\Boost\include\boost-1_32\boost\spirit\core\non_terminal\impl\rule.ipp(232) : while compiling class-template member function 'boost::spirit::match_result<MatchPolicyT,T>::type boost::spirit::impl::concrete_parser<ParserT,ScannerT,AttrT>::do_parse_virtual(const ScannerT &) const' with [ MatchPolicyT=scanner_t, T=boost::spirit::nil_t, ParserT=XML::TagParser::definition<scanner_t>::Rule, ScannerT=boost::spirit::rule<scanner_t>::scanner_t, AttrT=boost::spirit::rule<scanner_t>::attr_t ] c:\Boost\include\boost-1_32\boost\spirit\core\non_terminal\rule.hpp(135) : see reference to class template instantiation 'boost::spirit::impl::concrete_parser<ParserT,ScannerT,AttrT>' being compiled with [ ParserT=XML::TagParser::definition<scanner_t>::Rule, ScannerT=boost::spirit::rule<scanner_t>::scanner_t, AttrT=boost::spirit::rule<scanner_t>::attr_t ] c:\Dokumente und Einstellungen\Gerald\Desktop\XMLParser\TagParser.hpp(34) : see reference to function template instantiation 'boost::spirit::rule<T0> &boost::spirit::rule<T0>::operator =<XML::TagParser::definition<Scanner>::Rule>(const ParserT &)' being compiled with [ T0=scanner_t, Scanner=scanner_t, ParserT=XML::TagParser::definition<scanner_t>::Rule ] c:\Dokumente und Einstellungen\Gerald\Desktop\XMLParser\TagParser.hpp(28) : while compiling class-template member function 'XML::TagParser::definition<Scanner>::definition(const XML::TagParser &)' with [ Scanner=scanner_t ] c:\Boost\include\boost-1_32\boost\spirit\core\non_terminal\impl\grammar.ipp(262) : see reference to class template instantiation 'XML::TagParser::definition<Scanner>' being compiled with [ Scanner=scanner_t ] c:\Boost\include\boost-1_32\boost\spirit\core\non_terminal\impl\grammar.ipp(281) : see reference to function template instantiation 'void boost::spirit::impl::call_helper<0>::do_<result_t,definition_t,ScannerT>(RT &,DefinitionT &,const ScannerT &)' being compiled with [ ScannerT=scanner_t, RT=result_t, DefinitionT=definition_t ] c:\Boost\include\boost-1_32\boost\spirit\core\non_terminal\grammar.hpp(53) : see reference to function template instantiation 'boost::spirit::parser_result<ParserT,ScannerT>::type boost::spirit::impl::grammar_parser_parse<0,XML::TagParser,boost::spirit::parser_context<>,ScannerT>(const boost::spirit::grammar<DerivedT> *,const ScannerT &)' being compiled with [ ParserT=boost::spirit::grammar<XML::TagParser>::self_t, ScannerT=scanner_t, DerivedT=XML::TagParser ] c:\Boost\include\boost-1_32\boost\spirit\core\non_terminal\grammar.hpp(63) : see reference to function template instantiation 'boost::spirit::parser_result<ParserT,ScannerT>::type boost::spirit::grammar<DerivedT>::parse_main<ScannerT>(const ScannerT &) const' being compiled with [ ParserT=boost::spirit::grammar<XML::TagParser>::self_t, ScannerT=scanner_t, DerivedT=XML::TagParser ] c:\Boost\include\boost-1_32\boost\spirit\core\composite\kleene_star.hpp(58) : see reference to function template instantiation 'boost::spirit::parser_result<ParserT,ScannerT>::type boost::spirit::grammar<DerivedT>::parse<ScannerT>(const ScannerT &) const' being compiled with [ ParserT=boost::spirit::grammar<XML::TagParser>::self_t, ScannerT=scanner_t, DerivedT=XML::TagParser ] c:\Boost\include\boost-1_32\boost\spirit\tree\ast.hpp(273) : see reference to function template instantiation 'boost::spirit::parser_result<ParserT,ScannerT>::type boost::spirit::kleene_star<S>::parse<scanner_t>(const ScannerT &) const' being compiled with [ ParserT=boost::spirit::kleene_star<XML::TagParser>::self_t, ScannerT=scanner_t, S=XML::TagParser ] c:\Boost\include\boost-1_32\boost\spirit\tree\ast.hpp(289) : see reference to function template instantiation 'boost::spirit::tree_parse_info<IteratorT> boost::spirit::ast_parse<boost::spirit::node_val_data_factory<ValueT>,IteratorT,boost::spirit::kleene_star<S>,SkipT>(const IteratorT &,const IteratorT &,const boost::spirit::parser<DerivedT> &,const SkipT &,const AstFactoryT &)' being compiled with [ IteratorT=Iterator, ValueT=boost::spirit::nil_t, S=XML::TagParser, SkipT=boost::spirit::space_parser, DerivedT=boost::spirit::kleene_star<XML::TagParser>, AstFactoryT=boost::spirit::node_val_data_factory<boost::spirit::nil_t> ] c:\Dokumente und Einstellungen\Gerald\Desktop\XMLParser\XMLParser.hpp(39) : see reference to function template instantiation 'boost::spirit::tree_parse_info<IteratorT> boost::spirit::ast_parse<Iterator,boost::spirit::kleene_star<S>,boost::spirit::space_parser>(const IteratorT &,const IteratorT &,const boost::spirit::parser<DerivedT> &,const SkipT &)' being compiled with [ IteratorT=Iterator, Iterator=Iterator, S=XML::TagParser, DerivedT=boost::spirit::kleene_star<XML::TagParser>, SkipT=boost::spirit::space_parser ] c:\Dokumente und Einstellungen\Gerald\Desktop\XMLParser\XMLParser.hpp(92) : see reference to function template instantiation 'XML::TagTree<Char> XML::parse<Iterator>(Iterator,Iterator)' being compiled with [ Char=char, Iterator=Iterator ] c:\Dokumente und Einstellungen\Gerald\Desktop\XMLParser\test.cpp(9) : see reference to function template instantiation 'XML::TagTree<Char> XML::parseFromFile<char>(const Char *)' being compiled with [ Char=char ] Build log was saved at ... XMLParser - 1 error(s), 1 warning(s)
-
cplusplus.: Sicher, dass du die aktuelle spirit-Version hast? Die beim aktuellen boost ist nicht die aktuellste.
-
haben denn die tester was beim interface zu meckern?^^
-
Walli schrieb:
cplusplus.: Sicher, dass du die aktuelle spirit-Version hast? Die beim aktuellen boost ist nicht die aktuellste.
Also ich hab VC 7.1 und bei spirit 1.8.1 das ja bei bei boost 1.32 dabei ist, kommt genau dieser Fehler.
Im moment baue ich grade spirit 1.8.2 und werde mich melden wie es da aussiehtMFG
-
ok funktioniert jetzt mit spirit 1.8.2 und VC7.1 ( VS2003.NET ) einwandfrei
MfG
-
otze schrieb:
haben denn die tester was beim interface zu meckern?^^
Also mir gefällt das, wie man die Lib benutzt. Ich frag mich nur wie es mit Attributen aussieht kann man die auch auslesen? Kommt das noch?
Ein wenig doku wäre auch nicht schlecht. Aber alles in allem ist es sehr nice.MfG
-
eViLiSSiMo schrieb:
otze schrieb:
haben denn die tester was beim interface zu meckern?^^
Also mir gefällt das, wie man die Lib benutzt. Ich frag mich nur wie es mit Attributen aussieht kann man die auch auslesen? Kommt das noch?
Ein wenig doku wäre auch nicht schlecht. Aber alles in allem ist es sehr nice.MfG
wird noch alles eingebaut. muss aber zuerst nochn paar andre probleme lösen(zb, dass Nodes andre iteratoren für ihre childs zurückgeben als Collections)
-
@otze:
mit boost spirit 1.8.2 funktionierts nun endlich;-)
schaut gut aus;-) mach so weiter...bin gespannt was da noch alles kommt...cu
-
@otze: willst du auch noch nen eigenen XSLT-Prozessor schreiben? oder wär das zu aufwendig? ich kenn mich noch nicht so gut aus in diesem gebiet... wie hängt so ein XML parser denn mit einem XSLT Prozessor zusammen?? XSLT ist eine Sprache für die transformation, und XSL = Extensible Style Language...
cu
-
so, neue version ist fertig, doch nun macht der hoster probleme
klasse aber auch. muss ich mir nun neuen webspace auftreiben
@cplusplus. vielleicht, erstmal das hier fertig machen
-
-
otze schrieb:
so, neue version ist fertig, doch nun macht der hoster probleme
klasse aber auch. muss ich mir nun neuen webspace auftreiben
Ich kann dir anbieten das bei mir auf den Webserver zu packen.
Wenn ja meld dich mal im IRCMfG
-
Hier ist die aktuelle Version des XML - Parsers von otze: