24 Feb 18:14
skipper rules silently ignored (spirit2)
From: Cédric Venet <cedric.venet <at> student.ecp.fr>
Subject: skipper rules silently ignored (spirit2)
Newsgroups: gmane.comp.parsers.spirit.devel
Date: 2008-02-24 17:16:18 GMT
Subject: skipper rules silently ignored (spirit2)
Newsgroups: gmane.comp.parsers.spirit.devel
Date: 2008-02-24 17:16:18 GMT
Hi,
Using the latest svn version of spirit2, I have had a small problem with the
skipper rule.
Since I wanted to use a rule more complexe than space (and that I didn't
have its type):
charset::space | ('%' >> *~spirit::char_('\n') >> '\n')
I defined my grammar like this:
template <typename Iterator>
struct my_grammar : qi::grammar_def<Iterator, qi::rule<Iterator> > {...};
but doing:
bool r = phrase_parse(iter, storage.end(), make_parser(def),
charset::space | ('%' >> *~spirit::char_('\n') >> '\n'));
ignore the skipping rule
in qi/nonterminal/rule.hpp:170
template <typename Iterator_, typename Context, typename Skipper>
bool parse(
Iterator_& first, Iterator_ const& last
, Context& context, Skipper const& skipper) const
{
// in this function, the skipper is ok
// but this call loose it (select the unused_type for the skipper overload
(Continue reading)
RSS Feed