This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] Doubts about digit grouping corner cases
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Nathan Myers <ncm-nospam at cantrip dot org>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Sun, 04 Jan 2004 01:11:31 +0100
- Subject: Re: [RFC] Doubts about digit grouping corner cases
- References: <3FF6ABD1.6040504@suse.de> <20040103235348.GE32272@tofu.dreamhost.com>
Nathan Myers wrote:
Besides the description of the phases of numeric parsing, there
is also the BNF descriptions of number formats found in the
num_punct section. The idea is, the syntax tells you what
characters to extract, and then the rest tells how to construct a
number from the characters extracted, or to fail.
Thanks for pointing this out: in fact I browse the num_punct section
far less frequently, my bad...
Anyway, regarding the specific issue I think are more relevant the
num_get prescriptions: I'm not arguing about failing or not failing
(we do fail in the very same cases before and after my patch), only
about *when* the grouping must be checked: this affects only the final
value of the 'in' iterator: it seems to me that grouping must always
be checked in Stage3. In other terms: a number rejected only because
of wrong thousand separators (not due to other problems) should always
imply a final 'in' iterator pointing to the end of the series of
digits.
Paolo.