From: Daniel Sheppard Date: 2007-02-20T14:13:13+09:00 Subject: Re: [YAML] To quote or not to quote (I think it's a bug) > "Any "*_*" characters in the number are ignored, allowing a readable > representation of large values." > > 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". But the specification is not just in english, it's also in regex form: [-+]?([0-9][0-9_]*)?\.[0-9.]*([eE][-+][0-9]+)? (base 10) |[-+]?[0-9][0-9_]*(:[0-5]?[0-9])+\.[0-9_]* (base 60) |[-+]?\.(inf|Inf|INF) # (infinity) |\.(nan|NaN|NAN) # (not a number) For a base 10 number, underscores are permitted only if they appear BEFORE the decimal point, so for 1.2_3 there is no ambiguity. Dan.