Hi Guys, I've run into a little conundrum. Here's the problem:
I want to be able to parse optional username and password in an HTTP url as in 'http://user:passw...@host/' with Boost.Spirit2x (the one in Boost trunk). So far every attempt I've tried has brought me compile-time errors or if I get past the compile errors I see the host being put in the user field. So far here is my grammar: bool ok = phrase_parse( start_, end_, ( lit("//") >> -lexeme[*(char_ - ':')] >> -lexeme[':' >> *(char_ - '@')] >> -lexeme['@'] >> +(char_ - '/') >> -lexeme['/' >> *(char_ - '?')] >> -lexeme['?' >> *(char_ - '#')] >> -lexeme['#' >> *char_] ), space, result ); I have committed the failing tests and the grammar to the repository (revision 149, in branches/urllib-dean). Any Spirit2x users out there willing to lend a hand? Thanks in advance. -- Dean Michael Berris blog.cplusplus-soup.com | twitter.com/mikhailberis linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Cpp-netlib-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cpp-netlib-devel
