From: Divye K. <div...@gm...> - 2009-08-15 21:12:30
|
Hi Dean, I went through your code and some of the documentation. However, while tracing the code flow, i was able to determine that the string " http://www.boost.org" was being passed using the range represented by (start_, end_). I couldn't find where the string "http:" was being struck off from that range. > > bool ok = phrase_parse( > start_, end_, > ( > lit("//") > >> -lexeme[*(char_ - ':')] > >> -lexeme[':' >> *(char_ - '@')] > >> -lexeme['@'] > >> +(char_ - '/') > >> -lexeme['/' >> *(char_ - '?')] > >> -lexeme['?' >> *(char_ - '#')] > >> -lexeme['#' >> *char_] > ), > space, > result > ); > As there is nothing before the lit("//"). Probably, the first lexeme is picking up the "http" and the userinfo is getting all the rest of the URL ://www.boost.org (as there is no @ around). Unfortunately, I don't have an updated boost installation to test this out just yet (no Spirit 2 just yet). Why the grammar is ignoring the lit("//") is a mystery to me. Hope this helps somewhat (or I might be completely off track on this). Sincerely, Divye |