Boost C++ Libraries: Ticket #11531: Spirit X3: char_(ch1, ch2) is matching an exclusive range https://svn.boost.org/trac10/ticket/11531 <p> In X3 the char_(ch1, ch2) parser is currently matching all characters wich are within the given boundaries but exludes the boundary characters. </p> <p> This is inconsistent with the documentation which states "Matches a range of chars from ch to ch2 (inclusive)". </p> <p> In addition, I think that qi::char_ is including the range boundaries, too. (I am not sure about this; I did not actually use QI so far and just had a short glance at its source code.) </p> <p> I think, the error is at this position: <a class="ext-link" href="https://github.com/boostorg/spirit/blob/9c5dd09880f24b99e8e694534e532b1bb4a8851a/include/boost/spirit/home/x3/char/char_set.hpp#L45"><span class="icon">​</span>https://github.com/boostorg/spirit/blob/9c5dd09880f24b99e8e694534e532b1bb4a8851a/include/boost/spirit/home/x3/char/char_set.hpp#L45</a>. The comparisions should be "&gt;= 0" respectively "&lt;= 0". </p> <p> The testcase in <a class="ext-link" href="https://github.com/boostorg/spirit/blob/master/test/x3/char1.cpp"><span class="icon">​</span>https://github.com/boostorg/spirit/blob/master/test/x3/char1.cpp</a> do not test the matching of the boundary characters. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11531 Trac 1.4.3 Adrian Vogelsgesang <vogelsgesang@…> Sun, 09 Aug 2015 13:45:15 GMT <link>https://svn.boost.org/trac10/ticket/11531#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11531#comment:1</guid> <description> <p> I have a pull request which should fix this behaviour: <a class="ext-link" href="https://github.com/boostorg/spirit/pull/147"><span class="icon">​</span>https://github.com/boostorg/spirit/pull/147</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Joel de Guzman</dc:creator> <pubDate>Mon, 25 Dec 2017 23:25:29 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11531#comment:2 https://svn.boost.org/trac10/ticket/11531#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