This code:
std::string s("blablabla");
std::string::iterator start = s.begin(); std::string::iterator finish = s.end();
bool result = phrase_parse(start, finish, +(!char_(':')), space);
It's just a simple parser that match string which doesn't have ':' character in it right ? But when I run it, function phrase_parse is hang, it never return anything. I'm using boost 1.44 with VC 2008
Are you using Spirit V2.x or Spirit.Classic? I'm asking as the meaning for the operator '!' has changed. In Spirit.Classic it stands for 'optional', while in Spirit V2.x it stands for the 'not predicate' (which is different). I assume you're targeting V2.x, therefore it has to be: +(~char_(':')) instead. Note, the operator~() is applicable to character parsers only. If you need 'A but not B' in the general case, use: +(char_ - char_(':')) (but for character parsers the first is much more efficient). Regards Hartmut --------------- http://boost-spirit.com