Hi,
Ii this a bug in Spirit? (I am using boost 1.42 on Visual Studio 2005).
namespace qi = boost::spirit::qi;
typedef std::string::const_iterator Iter;
int main()
{
qi::rule<Iter, std::string()> myParser
= (qi::alnum >> qi::alnum >> qi::alpha)
| (qi::alnum >> qi::alnum);
std::string text = "MM";
std::string result;
Iter iter = text.begin(), end = text.end();
bool ans = qi::parse( iter, end, myParser, result );
bool full = iter == end;
}
once I run it, flags 'ans' and 'full' indicate a full match, but the
variable 'result' has value "MMMM". It should be "MM".
Regards,
&rzej
|