Boost C++ Libraries: Ticket #8446: Problems with 'repeat' in alternative parser https://svn.boost.org/trac10/ticket/8446 <p> The behavior of the result parser unexpectedly depends from order of the 'repeat' statements within 'Alternative' parser. </p> <p> As example: "repeat(n)[...] | repeat(m)[...]" works not like "repeat(m)[...] | repeat(n)[...]" in some circumstances. </p> <p> I've been using the example from this <a class="ext-link" href="http://stackoverflow.com/questions/4009752/boost-spirit-bug-when-mixing-alternates-with-optionals"><span class="icon">​</span>http://stackoverflow.com/questions/4009752/boost-spirit-bug-when-mixing-alternates-with-optionals</a> thread to identify problem (sample source is attached below). </p> <p> The output of the result application: </p> <p> in boost 1.44 (bug was fixed after stackoverflow thread): </p> <blockquote> <p> Success: '123FAA22' Failed to match. Success: '123F' Success: '1A22' </p> </blockquote> <p> in boost 1.45 (seems to be correct): </p> <blockquote> <p> Success: '123FAA22' Success: '12AA' Success: '123F' Success: '1A22' </p> </blockquote> <p> in boost 1.49 : </p> <blockquote> <p> Success: '123FAA22' Success: '12AA12AA' (Incorrect) Success: '123F' Success: '1A22' </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8446 Trac 1.4.3 Nikita Rogatnev <nikita.rogatnev@…> Tue, 16 Apr 2013 12:31:05 GMT attachment set https://svn.boost.org/trac10/ticket/8446 https://svn.boost.org/trac10/ticket/8446 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">spirit_bug.cpp</span> </li> </ul> <p> Source file to reproduce </p> Ticket Nikita Kniazev <nok.raven@…> Thu, 07 Dec 2017 15:11:07 GMT <link>https://svn.boost.org/trac10/ticket/8446#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8446#comment:1</guid> <description> <p> Fixed in <a class="ext-link" href="https://github.com/boostorg/spirit/commit/e9ddd3bcb09c080113105e068e6d57a623939897"><span class="icon">​</span>https://github.com/boostorg/spirit/commit/e9ddd3bcb09c080113105e068e6d57a623939897</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Wed, 13 Dec 2017 23:01:18 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/8446#comment:2 https://svn.boost.org/trac10/ticket/8446#comment:2 <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">fixed</span> </li> </ul> Ticket