Bug 12813 – Parser is confused between float and UFC syntax

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-05-27T20:36:00Z
Last change time
2014-06-22T21:23:32Z
Keywords
pull, spec
Assigned to
nobody
Creator
ibuclaw

Comments

Comment #0 by ibuclaw — 2014-05-27T20:36:18Z
According to the docs (lex) """ Floating literals can have embedded ‘_’ characters, which are ignored. The embedded ‘_’ are useful for formatting long literals to make them more readable, such as using them as a thousands separator """ And the following examples are given as valid. 123_456.567_8 // 123456.5678 1_2_3_4_5_6_._5_6_7_8 // 123456.5678 1_2_3_4_5_6_._5e-6_ // 123456.5e-6 However: 123_456.567_8 // OK 1_2_3_4_5_6_._5_6_7_8 // ERROR no property '_5_6_7_8' for type 'int' 1_2_3_4_5_6_._5e-6_ // ERROR no property '_5e' for type 'int' Marking as regression because this would have been fine before UFCs.
Comment #1 by k.hara.pg — 2014-06-15T01:47:26Z
Comment #2 by github-bugzilla — 2014-06-19T18:23:24Z
Commits pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/db6c8f4f7ed6010f0ad760e6a1fa7d702e5a229d fix Issue 12813 - Parser is confused between float and UFC syntax https://github.com/D-Programming-Language/dlang.org/commit/d1ca685c4123cf35770e6d7a07e04494b40cdaf7 Merge pull request #595 from 9rnsr/fix12813 Issue 12813 - Parser is confused between float and UFC syntax
Comment #3 by ibuclaw — 2014-06-20T07:38:38Z
So you've updated the grammar page, but you haven't updated/removed the erroneous examples on the lex page?
Comment #4 by k.hara.pg — 2014-06-21T10:11:06Z
(In reply to Iain Buclaw from comment #3) > So you've updated the grammar page, but you haven't updated/removed the > erroneous examples on the lex page? Yes, I've forgotten it. https://github.com/D-Programming-Language/dlang.org/pull/598
Comment #5 by github-bugzilla — 2014-06-21T11:01:27Z
Commits pushed to master at https://github.com/D-Programming-Language/dlang.org https://github.com/D-Programming-Language/dlang.org/commit/5f1ad5d2f3f7050f2085af62e3a143b9bd75a310 Supplemental fix for issue 12813 - Fix examples to be valid https://github.com/D-Programming-Language/dlang.org/commit/5829a556f160fc6fa2b29c1746cd7f4916b9d48a Merge pull request #598 from 9rnsr/fix12813 Supplemental fix for issue 12813 - Fix examples to be valid