From: jens w. <jen...@gm...> - 2008-07-29 20:09:47
|
While getting deeper in the realms of spirit2, I found a strange behavoir: guess we have a grammar, Identifier. Which returns a String. now, we do this: //yet another grammar start = identifier[bind(&Test::print,test,_1)] >> lit("ignore this one")|identifier[bind(&Test::print,test,_1)]; Parsing "foo bar" should print: foo bar now. right? It does not. Instead it prints: foo foo Also, (even more interesting): identifier >> lit("xyz")|yet_another_rule; brings the same, as yet_another_rule has the same "signature" return a std::string. How come? I don't know. I supply a testcase, maybe you find an error. regards Jens Weller |