[Issue 2734] Ambiguity in tokenizing: _._ as a float literal

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 29 20:20:01 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2734


unknown at simplemachines.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |unknown at simplemachines.org




------- Comment #1 from unknown at simplemachines.org  2009-03-29 22:20 -------
It appears DMD 2.026 already works as you suggest; _1.0 is not recognized as a
valid float.

However, 1_._1 is, which doesn't seem ambiguous to me.  Once you're after the .
and in a FloatLiteral, any characters in [_0-9] should be eaten to finish the
float literal.

The spec just needs to be corrected with a new rule that defines 0,
NonZeroDigit, and then a repeating of those with DecimalDigits (Decimal is
almost fine except its handling of octals.)

-[Unknown]


-- 



More information about the Digitalmars-d-bugs mailing list