Skip to content
Permalink
Browse files

[acgiow] (1) Allow omission of the number before the period in a floa…

…ting point number.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=13689

git-svn-id: http://svn.whatwg.org/webapps@6635 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 5, 2011
1 parent fb88781 commit b13c08b6df4f4e609cdbb28344c59bd83c787017
Showing with 66 additions and 36 deletions.
  1. +20 −12 complete.html
  2. +20 −12 index
  3. +26 −12 source

<ol class=brief><li>Optionally, a U+002D HYPHEN-MINUS character (-).</li>

<li>A series of one or more characters in the range U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9).</li>
<li>One or both of the following, in the given order:

<li>Optionally:
<ol><li>A series of one or more characters in the range U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9).</li>

<ol><li>A single U+002E FULL STOP character (.).</li>
<li>

<li>A series of one or more characters in the range U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9).</li>
<ol><li>A single U+002E FULL STOP character (.).</li>

<li>A series of one or more characters in the range U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9).</li>

</ol></li>

</ol></li>


</ol></li>

<li><p>If the character indicated by <var title="">position</var>
is a U+002E FULL STOP (.), and that is not the last character in
<var title="">input</var>, and the character after the character
indicated by <var title="">position</var> is one of U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9), then set <var title="">value</var> to zero and jump to the step labeled
<i>fraction</i>.</p> <!-- we have to check there's a number so that
".e1" fails to parse but ".0" does not -->

<li><p>If the character indicated by <var title="">position</var>
is not one of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), then
return an error.</li>

<!-- Ok. At this point we know we have a number. It might have
trailing garbage which we'll ignore, but it's a number, and we
won't return an error unless it's out of range. -->

<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), and interpret the
resulting sequence as a base-ten integer. Multiply <var title="">value</var> by that integer.</li>

<li>If <var title="">position</var> is past the end of <var title="">input</var>, jump to the step labeled
<i>conversion</i>.</li>

<li><p>If the character indicated by <var title="">position</var>
is a U+002E FULL STOP (.), run these substeps:</p>
<li><p><i>Fraction</i>: If the character indicated by <var title="">position</var> is a U+002E FULL STOP (.), run these
substeps:</p>

<ol><li><p>Advance <var title="">position</var> to the next
character.</li>
32 index

<ol class=brief><li>Optionally, a U+002D HYPHEN-MINUS character (-).</li>

<li>A series of one or more characters in the range U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9).</li>
<li>One or both of the following, in the given order:

<li>Optionally:
<ol><li>A series of one or more characters in the range U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9).</li>

<ol><li>A single U+002E FULL STOP character (.).</li>
<li>

<li>A series of one or more characters in the range U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9).</li>
<ol><li>A single U+002E FULL STOP character (.).</li>

<li>A series of one or more characters in the range U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9).</li>

</ol></li>

</ol></li>


</ol></li>

<li><p>If the character indicated by <var title="">position</var>
is a U+002E FULL STOP (.), and that is not the last character in
<var title="">input</var>, and the character after the character
indicated by <var title="">position</var> is one of U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9), then set <var title="">value</var> to zero and jump to the step labeled
<i>fraction</i>.</p> <!-- we have to check there's a number so that
".e1" fails to parse but ".0" does not -->

<li><p>If the character indicated by <var title="">position</var>
is not one of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), then
return an error.</li>

<!-- Ok. At this point we know we have a number. It might have
trailing garbage which we'll ignore, but it's a number, and we
won't return an error unless it's out of range. -->

<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> in the range
U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), and interpret the
resulting sequence as a base-ten integer. Multiply <var title="">value</var> by that integer.</li>

<li>If <var title="">position</var> is past the end of <var title="">input</var>, jump to the step labeled
<i>conversion</i>.</li>

<li><p>If the character indicated by <var title="">position</var>
is a U+002E FULL STOP (.), run these substeps:</p>
<li><p><i>Fraction</i>: If the character indicated by <var title="">position</var> is a U+002E FULL STOP (.), run these
substeps:</p>

<ol><li><p>Advance <var title="">position</var> to the next
character.</li>
38 source
@@ -3811,18 +3811,26 @@ is conforming depends on which specs apply, and leaves it at that. -->

<li>Optionally, a U+002D HYPHEN-MINUS character (-).</li>

<li>A series of one or more characters in the range U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9).</li>

<li>Optionally:
<li>One or both of the following, in the given order:

<ol>

<li>A single U+002E FULL STOP character (.).</li>

<li>A series of one or more characters in the range U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9).</li>

<li>

<ol>

<li>A single U+002E FULL STOP character (.).</li>

<li>A series of one or more characters in the range U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9).</li>

</ol>

</li>

</ol>

</li>
@@ -3937,14 +3945,19 @@ is conforming depends on which specs apply, and leaves it at that. -->

</li>

<li><p>If the character indicated by <var title="">position</var>
is a U+002E FULL STOP (.), and that is not the last character in
<var title="">input</var>, and the character after the character
indicated by <var title="">position</var> is one of U+0030 DIGIT
ZERO (0) to U+0039 DIGIT NINE (9), then set <var
title="">value</var> to zero and jump to the step labeled
<i>fraction</i>.</p> <!-- we have to check there's a number so that
".e1" fails to parse but ".0" does not -->

<li><p>If the character indicated by <var title="">position</var>
is not one of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), then
return an error.</p></li>

<!-- Ok. At this point we know we have a number. It might have
trailing garbage which we'll ignore, but it's a number, and we
won't return an error unless it's out of range. -->

<li><p><span>Collect a sequence of characters</span> in the range
U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9), and interpret the
resulting sequence as a base-ten integer. Multiply <var
@@ -3954,8 +3967,9 @@ is conforming depends on which specs apply, and leaves it at that. -->
title="">input</var>, jump to the step labeled
<i>conversion</i>.</li>

<li><p>If the character indicated by <var title="">position</var>
is a U+002E FULL STOP (.), run these substeps:</p>
<li><p><i>Fraction</i>: If the character indicated by <var
title="">position</var> is a U+002E FULL STOP (.), run these
substeps:</p>

<ol>

0 comments on commit b13c08b

Please sign in to comment.
You can’t perform that action at this time.