Boost C++ Libraries: Ticket #3275: Spirit does not skip whitespace between str_p and ch_p https://svn.boost.org/trac10/ticket/3275 <p> After matching a str_p or ch_p trailing whitespace till the next token is not skipped. Tested under VC2008 and macosx gcc 4.0. Either this is a major bug or i am missing something fundamental. Example: </p> <pre class="wiki">#include &lt;boost/spirit/include/classic_core.hpp&gt; #include &lt;boost/spirit/include/classic_push_back_actor.hpp&gt; #include &lt;boost/spirit/include/classic_exceptions.hpp&gt; #include &lt;boost/spirit/include/classic_confix.hpp&gt; #include &lt;iostream&gt; using namespace BOOST_SPIRIT_CLASSIC_NS; int main(int argc, char* argv[]) { rule&lt;&gt; fileRule = ch_p('{') &gt;&gt; real_p; parse_info&lt;&gt; info= parse(" { 3.0", fileRule,space_p); if (!info.hit) { std::cout&lt;&lt;"ERROR:"&lt;&lt;info.stop&lt;&lt;std::endl; } return 0; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3275 Trac 1.4.3 Steven Watanabe Sat, 18 Jul 2009 00:03:03 GMT <link>https://svn.boost.org/trac10/ticket/3275#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3275#comment:1</guid> <description> <p> Please see <a href="http://www.boost.org/libs/spirit/classic/doc/faq.html#scanner_business">http://www.boost.org/libs/spirit/classic/doc/faq.html#scanner_business</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Sat, 18 Jul 2009 00:27:55 GMT</pubDate> <title>severity changed https://svn.boost.org/trac10/ticket/3275#comment:2 https://svn.boost.org/trac10/ticket/3275#comment:2 <ul> <li><strong>severity</strong> <span class="trac-field-old">Showstopper</span> → <span class="trac-field-new">Problem</span> </li> </ul> <p> Thanks for the tip. If i pass the rule as a temporary argument to the parse function the example works. Please note though that the FAQ mentiones a compile problem, but while the mentioned code compiles without warning it does not work. Therefore a clarification of the FAQ section might be in order. </p> <p> </p> Ticket anonymous Fri, 26 Feb 2010 01:45:55 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3275#comment:3 https://svn.boost.org/trac10/ticket/3275#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> The problem is a scanner mismatch indeed. But in this case you're using a rule without any skipper while parsing with one. This rule acts as an implicit lexeme[] (see the docs for more information). So this is desired bahavior. </p> <p> Regards Hartmut </p> Ticket