[Boost-bugs] [Boost C++ Libraries] #11531: Spirit X3: char_(ch1, ch2) is matching an exclusive range

Subject: [Boost-bugs] [Boost C++ Libraries] #11531: Spirit X3: char_(ch1, ch2) is matching an exclusive range
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-08-09 13:22:38


#11531: Spirit X3: char_(ch1, ch2) is matching an exclusive range
--------------------------------------------------+---------------------
 Reporter: Adrian Vogelsgesang <vogelsgesang@…> | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
  Version: Boost Development Trunk | Severity: Problem
 Keywords: x3 char_ |
--------------------------------------------------+---------------------
 In X3 the char_(ch1, ch2) parser is currently matching all characters wich
 are within the given boundaries but exludes the boundary characters.

 This is inconsistent with the documentation which states "Matches a range
 of chars from ch to ch2 (inclusive)".

 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.)

 I think, the error is at this position:
 [https://github.com/boostorg/spirit/blob/9c5dd09880f24b99e8e694534e532b1bb4a8851a/include/boost/spirit/home/x3/char/char_set.hpp#L45].
 The comparisions should be ">= 0" respectively "<= 0".

 The testcase in
 [https://github.com/boostorg/spirit/blob/master/test/x3/char1.cpp] do not
 test the matching of the boundary characters.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11531>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC