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>,Martin Sebor <sebor at roguewave dot com>
- Date: Sun, 04 Jan 2004 11:30:50 +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.
Perhaps now I get your points. I take it like this: there is a set of,
so to speak, "general requirements" on the groupings, stated in the
num_punct section, to which *any* number must conform. Those must
be checked during Stage2. Then, there are the specific requirements
encoded in do_grouping, which must checked toward the end of Stage3.
Well, this is definitely reasonable, but the description of Stage2
(and Stage3) in 22.2.2.1.2 doesn't mention at all the first part!!
In particular, in 22.2.2.1.2, p8-9 there is absolutely no mention
of the fact that discard may become true or false depending also on
the last parsed char! Not just so, something much stronger: Stage2
may terminate *only* because in == end, not for different reasons,
like two consecutive true discard!!!
Perhaps the Standard should be clarified?!?!
Paolo.