Re: [YAML] To quote or not to quote (I think it's a bug)

"Daniel Sheppard" <[email protected]>
Newsgroups gmane.comp.lang.ruby.general,gmane.text.yaml.general
Message-ID <[email protected]>
> So clearly they're allowed, in 1.2_3 the underscore is simply 
> ignored and
> the parser should undestand 1.23. If I fancy to write my own 
> YAML by hand
> and make it easily readable (which is kind of the original 
> purpose) I could
> write 100_000_000.03 which would be a nice looking float. Hence the
> ambiguity with "1.2_3"

Hmmmm... I just noticed that the specification
(http://yaml.org/type/float.html) isn't just unclear, it's inconsistent.

The examples listed include:

exponentioal: 685.230_15e+03

Notwithstanding the spelling of exponential, that example is not
consistent with the regular expression (which allows underscores only if
they preceed the decimal point -
[-+]?([0-9][0-9_]*)?\.[0-9.]*([eE][-+][0-9]+)?).

Dan.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.