[Boost-bugs] [Boost C++ Libraries] #8447: Problems with 'repeat' in alternative parser

Subject: [Boost-bugs] [Boost C++ Libraries] #8447: Problems with 'repeat' in alternative parser
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-16 12:29:07


#8447: Problems with 'repeat' in alternative parser
-----------------------------------------------------------+----------------
 Reporter: Nikita Rogatnev <nikita.rogatnev@…> | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
  Version: Boost 1.49.0 | Severity: Regression
 Keywords: |
-----------------------------------------------------------+----------------
 The behavior of the result parser unexpectedly depends from order of the
 'repeat' statements within 'Alternative' parser.

 As example:
 "repeat(n)[...] | repeat(m)[...]" works not like "repeat(m)[...] |
 repeat(n)[...]" in some circumstances.

 I've been using the example from this
 [http://stackoverflow.com/questions/4009752/boost-spirit-bug-when-mixing-
 alternates-with-optionals] StackOverflow thread to identify problem
 (sample source is attached below).

 The output of the result application:

 in boost 1.44 (bug was fixed after stackoverflow thread):
   Success: '123FAA22'
   Failed to match.
   Success: '123F'
   Success: '1A22'

 in boost 1.45 (seems to be correct):
   Success: '123FAA22'
   Success: '12AA'
   Success: '123F'
   Success: '1A22'

 in boost 1.49 :
   Success: '123FAA22'
   Success: '12AA12AA' (Incorrect)
   Success: '123F'
   Success: '1A22'

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8447>
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:12 UTC