Skip to content

Commit

Permalink
attempt 3
Browse files Browse the repository at this point in the history
  • Loading branch information
rmisev authored and annevk committed Jan 10, 2017
1 parent bc4e610 commit 938bc10
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions url.bs
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ then runs these steps:
<li><p><dfn id=concept-ipv6-parser-ipv4 lt='IPv6 parser IPv4'>IPv4</dfn>:
If <var>piece pointer</var> is greater than six, <a>syntax violation</a>, return failure.

<li><p>Let <var>dots seen</var> be 0.
<li><p>Let <var>numbersSeen</var> be 0.

<li>
<p>While <a>c</a> is not the <a>EOF code point</a>, run
Expand All @@ -616,6 +616,16 @@ then runs these steps:
<ol>
<li><p>Let <var>value</var> be null.

<li>
<p>If <var>numbersSeen</var> is greater than 0, then:

<ol>
<li><p>If <a>c</a> is a "<code>.</code>" and <var>numbersSeen</var> is less than 4, then
increase <var>pointer</var> by one.

<li>Otherwise, <a>syntax violation</a>, return failure.
</ol>

<li><p>If <a>c</a> is not an <a>ASCII digit</a>, <a>syntax violation</a>,
return failure. <!-- prevent the empty string -->

Expand All @@ -641,20 +651,12 @@ then runs these steps:
<li><p>Set <var>piece</var> to
<var>piece</var> &times; 0x100 + <var>value</var>.

<li><p>If <var>dots seen</var> is 1 or 3, increase
<var>piece pointer</var> by one.
<li><p>Increase <var>numbersSeen</var> by one.

<li><p>If <a>c</a> is the <a>EOF code point</a> and <var>dots seen</var> is not 3,
<a>syntax violation</a>, return failure.
<li><p>If <var>numbersSeen</var> is 2 or 4, then increase <var>piece pointer</var> by one.

<li>
<p>If <a>c</a> is a "<code>.</code>", then:

<ol>
<li><p>Increase <var>pointer</var> and <var>dots seen</var> by one.

<li><p>If <a>c</a> is the <a>EOF code point</a>, <a>syntax violation</a>, return failure.
</ol>
<li><p>If <a>c</a> is the <a>EOF code point</a> and <var>numbersSeen</var> is not 4,
<a>syntax violation</a>, return failure.
</ol>

<li>
Expand Down

0 comments on commit 938bc10

Please sign in to comment.