On Thursday 10 February 2005 17:31, Peter Murphy wrote:
> http://yaml.org/spec/
>
> 1. In "Example 4.49. Completely Empty Flow Nodes"...
This is already fixed in the CVS version.
> 2. One of the regular expressions for ints doesn't look right. Is
> this missing a parenthesis?
>
> [+]?(0[19])[09_]*) # (base 10)
More like has an extra one... Andy Bakun got it right:
> ... I think
>
> [+]?0[08_]+ # (base 8)
> [+]?(0[19][09_]*) # (base 10)
>
> will do it
Exactly. Also:
> ... don't base 8 numbers have digits in the range 0 through 7? The
> [08_]+ should be [07_]+ in the octal line, right?
<blush>Quite right</blush>. I just fixed the int spec and uploaded it.
Thanks!
Other issues:
> ... I, personally, would add more parens to lessen ambiguity about the
> binding of alternation (which I can never remember)
Listing each in a separate line also seems to drive the point nicely. It
would probably be best to do a pass on all the regexps and write them
in true //x format (with insignificant white space, and comments, and
so on). When we get to it...
> The thing that stands out to me in this regular expression (and the
> others) is that there are three ways to represent zero: 0, 0 and +0
> (very, uh, onescomplement, heh). Is this the intent?
It is semiintentional :) There's no good reason to disallow it that I
can see. All three mean "zero", though. On the other hand, if someone
wants to load +0.0 and 0.0 to IEEE "positive zero" and "negative
zero", he's welcome to it.
Have fun,
Oren BenKiki
