Re: [Boost-bugs] [Boost C++ Libraries] #1048: Spirit returns full = false in 1.34 if there is trailing spaces in input

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1048: Spirit returns full = false in 1.34 if there is trailing spaces in input
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-06-18 02:26:11


#1048: Spirit returns full = false in 1.34 if there is trailing spaces in input
--------------------------------+-------------------------------------------
  Reporter: ibaxter_at_[hidden] | Owner:
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: spirit
   Version: release 1.34.0 | Severity: Showstopper
Resolution: wontfix | Keywords: spirit space full
--------------------------------+-------------------------------------------
Changes (by biochimia):

  * status: new => closed
  * resolution: => wontfix
  * summary: Spirit returns full = false in 1.3.4 if there is trailing
              spaces in input => Spirit returns full = false
              in 1.34 if there is trailing spaces in input

Comment:

 The change in behaviour was intentional. It was made on the grounds of
 consistency (parsers shouldn't consume any more output than what they have
 matched), as well as to avoid a hang when directly parsing stdin: namely,
 parse() would hang waiting for a non-whitespace character at the end of a
 match.

 You may workaround this change by adding eps_p or end_p after your
 grammar, as in:

 {{{
 #!cpp
 my_grammar g;
 my_skipper skipper;

 parse(str, g >> eps_p, skipper); // 1

 parse(str, g >> end_p, skipper); // 2
 }}}

 The 2nd option requires a full match, while the first one gets you the
 previous behaviour without making a full match obligatory.

 Here's where the change was first announced, for context:

     http://thread.gmane.org/gmane.comp.parsers.spirit.general/9839

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1048#comment:1>
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:49:55 UTC