[Boost-bugs] [Boost C++ Libraries] #10193: [Spirit.qi] real_parser is too strict with the exponent part

Subject: [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-07-14 12:22:46


#10193: [Spirit.qi] real_parser is too strict with the exponent part
-----------------------+------------------------------
 Reporter: anonymous | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.55.0
 Severity: Problem | Keywords:
-----------------------+------------------------------
 E.g. parsing "4em" string fails with
 {{{
 double_ >> lit("em")
 }}}

 "e" is considered start of exponent part and integer is expected after it.

 Exponent handling as described in documentation as follows:
 {{{
 exponent_part
     = (lit('e') | 'E') >> -sign >> +digit
     ;
 }}}

 But as it is implemented now, grammar should be:
 {{{
 exponent_part
     = (lit('e') | 'E') > -sign > +digit
     ;
 }}}

 It will be better if "e" is treated as exponent part only if it is
 followed by integer (with optional sign).

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