Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10193: [Spirit.qi] real_parser is too strict with the exponent part
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-08-11 09:10:21
#10193: [Spirit.qi] real_parser is too strict with the exponent part
-------------------------------+----------------------
Reporter: anonymous | Owner: djowel
Type: Bugs | Status: reopened
Milestone: To Be Determined | Component: spirit
Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------
Comment (by djowel):
OK, second try. Pardon the confusion. 42e is indeed not valid. What was I
thinking!
OK, here's what's happening. The parser parses 4e and attempts to find a
number after that. So, 4em is not a double number and it fails. If I
understand correctly, what you want is this:
exponent_part = -((lit('e') | 'E') >> -sign >> +digit);
Is that correct? In other words, the whole exponent part is optional. I
think that makes sense. I reopened this as a bug.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10193#comment:6> 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:16 UTC