Problems with file_iterator and skip parsers

Can anyone explain to me what is wrong with the following: ---------------- my_grammer g; // a grammar, the actual grammar I'm using is too long for me to post file_iterator first<char>( "somefile.txt") file_iterator last<char> = first.make_end(); rule_t<> skp = space_p | comment_p("//") | comment_p("/*","*/"); parse_info< file_iterator<char> > = parse( first, last, *g, skp ); ---------------- I keep getting these errors (from MinGW 3.4.2): 189 C:\Dev-Cpp\include\boost\spirit\core\non_terminal\impl\rule.ipp no matching function for call to `boost::spirit::impl::abstract_parser<do_main_thing()::scanner_t, boost::spirit::nil_t>::do_parse_virtual(const boost::spirit::scanner<boost::spirit::file_iterator<char, boost::spirit::fileiter_impl::mmap_file_iterator<char> >, boost::spirit::scanner_policies<boost::spirit::no_skipper_iteration_policy<boost::spirit::skip_parser_iteration_policy<boost::spirit::rule<do_main_thing()::scanner_t, boost::spirit::nil_t, boost::spirit::nil_t>, boost::spirit::iteration_policy> >, boost::spirit::match_policy, boost::spirit::action_policy> >&)' 61 C:\Dev-Cpp\include\boost\spirit\core\composite\intersection.hpp no matching function for call to `boost::spirit::skip_parser_iteration_policy<boost::spirit::rule<do_main_thing()::scanner_t, boost::spirit::nil_t, boost::spirit::nil_t>, boost::spirit::iteration_policy>::skip_parser_iteration_policy()' 61 C:\Dev-Cpp\include\boost\spirit\core\composite\intersection.hpp no matching function for call to `boost::spirit::skip_parser_iteration_policy<boost::spirit::rule<do_main_thing()::scanner_t, boost::spirit::nil_t, boost::spirit::nil_t>, boost::spirit::iteration_policy>::skip_parser_iteration_policy()' According to the FAQ, this shouldn't happen with grammars. I am a beginner, so please forgive my ignorance. Thanks for any and all help. Also, I've tried making the skip rule a grammar, again, with errors.

chrono232@fastmail.fm wrote:
Can anyone explain to me what is wrong with the following:
----------------
my_grammer g; // a grammar, the actual grammar I'm using is too long for me to post file_iterator first<char>( "somefile.txt") file_iterator last<char> = first.make_end(); rule_t<> skp = space_p | comment_p("//") | comment_p("/*","*/"); parse_info< file_iterator<char> > = parse( first, last, *g, skp );
Hi! See the FAQ "Scanner Business". Anyway, the proper forum for Spirit related questions is: Spirit-general mailing list Spirit-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spirit-general Cheers, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net
participants (2)
-
chrono232ļ¼ fastmail.fm
-
Joel de Guzman