Skip to content

Commit

Permalink
[e] (0) simplify the parser a little to avoid a redundant step and ma…
Browse files Browse the repository at this point in the history
…ke it clear why it's redundant

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

git-svn-id: http://svn.whatwg.org/webapps@6659 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 11, 2011
1 parent 9143a8f commit abb0683
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 37 deletions.
23 changes: 11 additions & 12 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -33099,6 +33099,17 @@ <h6 id=parsing-0><span class=secno>4.8.10.13.3 </span>Parsing</h6>
characters</a> that are either U+000D CARRIAGE RETURN (CR) or
U+000A LINE FEED (LF) characters.</li>

<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
<em>not</em> U+000D CARRIAGE RETURN (CR) or U+000A LINE FEED (LF)
characters. Let <var title="">line</var> be those characters, if
any.</li>

<li><p>If <var title="">line</var> is the empty string, then jump
to the step labeled <i>end</i>. (In such a case, <var title="">position</var> is also forcibly past the end of <var title="">input</var><!-- since we've just collected newlines, so we
have none of those, and we've failed to collect anything that's not
a newline, so we have none of that either, meaning we have nothing.
-->.)</li>

<li><p>Let <var title="">cue</var> be a new <a href=#text-track-cue>text track
cue</a> associated with <var title="">output</var>'s <a href=#text-track>text
track</a>.</li>
Expand Down Expand Up @@ -33133,15 +33144,6 @@ <h6 id=parsing-0><span class=secno>4.8.10.13.3 </span>Parsing</h6>
<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-text>text track cue
text</a> be the empty string.</li>

<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
<em>not</em> U+000D CARRIAGE RETURN (CR) or U+000A LINE FEED (LF)
characters. Let <var title="">line</var> be those characters, if
any.</li>

<li><p>If <var title="">line</var> is the empty string, then
discard <var title="">cue</var> and jump to the step labeled
<i>end</i>.</li>

<li><p>If <var title="">line</var> contains the three-character
substring "<code title="">--&gt;</code>" (U+002D HYPHEN-MINUS, U+002D
HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then jump to the step
Expand All @@ -33150,9 +33152,6 @@ <h6 id=parsing-0><span class=secno>4.8.10.13.3 </span>Parsing</h6>
<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-identifier>text track cue
identifier</a> be <var title="">line</var>.<p></li>

<li><p>If <var title="">position</var> is past the end of <var title="">input</var>, then discard <var title="">cue</var> and jump
to the step labeled <i>end</i>.</li>

<li><p>If the character indicated by <var title="">position</var>
is a U+000D CARRIAGE RETURN (CR) character, advance <var title="">position</var> to the next character in <var title="">input</var>.</li>

Expand Down
23 changes: 11 additions & 12 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -33099,6 +33099,17 @@ The General Relativistic Field Equations</pre>
characters</a> that are either U+000D CARRIAGE RETURN (CR) or
U+000A LINE FEED (LF) characters.</li>

<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
<em>not</em> U+000D CARRIAGE RETURN (CR) or U+000A LINE FEED (LF)
characters. Let <var title="">line</var> be those characters, if
any.</li>

<li><p>If <var title="">line</var> is the empty string, then jump
to the step labeled <i>end</i>. (In such a case, <var title="">position</var> is also forcibly past the end of <var title="">input</var><!-- since we've just collected newlines, so we
have none of those, and we've failed to collect anything that's not
a newline, so we have none of that either, meaning we have nothing.
-->.)</li>

<li><p>Let <var title="">cue</var> be a new <a href=#text-track-cue>text track
cue</a> associated with <var title="">output</var>'s <a href=#text-track>text
track</a>.</li>
Expand Down Expand Up @@ -33133,15 +33144,6 @@ The General Relativistic Field Equations</pre>
<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-text>text track cue
text</a> be the empty string.</li>

<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
<em>not</em> U+000D CARRIAGE RETURN (CR) or U+000A LINE FEED (LF)
characters. Let <var title="">line</var> be those characters, if
any.</li>

<li><p>If <var title="">line</var> is the empty string, then
discard <var title="">cue</var> and jump to the step labeled
<i>end</i>.</li>

<li><p>If <var title="">line</var> contains the three-character
substring "<code title="">--&gt;</code>" (U+002D HYPHEN-MINUS, U+002D
HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then jump to the step
Expand All @@ -33150,9 +33152,6 @@ The General Relativistic Field Equations</pre>
<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-identifier>text track cue
identifier</a> be <var title="">line</var>.<p></li>

<li><p>If <var title="">position</var> is past the end of <var title="">input</var>, then discard <var title="">cue</var> and jump
to the step labeled <i>end</i>.</li>

<li><p>If the character indicated by <var title="">position</var>
is a U+000D CARRIAGE RETURN (CR) character, advance <var title="">position</var> to the next character in <var title="">input</var>.</li>

Expand Down
26 changes: 13 additions & 13 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -36244,6 +36244,19 @@ The General Relativistic Field Equations</pre>
characters</span> that are either U+000D CARRIAGE RETURN (CR) or
U+000A LINE FEED (LF) characters.</p></li>

<li><p><span>Collect a sequence of characters</span> that are
<em>not</em> U+000D CARRIAGE RETURN (CR) or U+000A LINE FEED (LF)
characters. Let <var title="">line</var> be those characters, if
any.</p></li>

<li><p>If <var title="">line</var> is the empty string, then jump
to the step labeled <i>end</i>. (In such a case, <var
title="">position</var> is also forcibly past the end of <var
title="">input</var><!-- since we've just collected newlines, so we
have none of those, and we've failed to collect anything that's not
a newline, so we have none of that either, meaning we have nothing.
-->.)</p></li>

<li><p>Let <var title="">cue</var> be a new <span>text track
cue</span> associated with <var title="">output</var>'s <span>text
track</span>.</p></li>
Expand Down Expand Up @@ -36278,15 +36291,6 @@ The General Relativistic Field Equations</pre>
<li><p>Let <var title="">cue</var>'s <span>text track cue
text</span> be the empty string.</p></li>

<li><p><span>Collect a sequence of characters</span> that are
<em>not</em> U+000D CARRIAGE RETURN (CR) or U+000A LINE FEED (LF)
characters. Let <var title="">line</var> be those characters, if
any.</p></li>

<li><p>If <var title="">line</var> is the empty string, then
discard <var title="">cue</var> and jump to the step labeled
<i>end</i>.</p></li>

<li><p>If <var title="">line</var> contains the three-character
substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D
HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then jump to the step
Expand All @@ -36295,10 +36299,6 @@ The General Relativistic Field Equations</pre>
<li><p>Let <var title="">cue</var>'s <span>text track cue
identifier</span> be <var title="">line</var>.<p></li>

<li><p>If <var title="">position</var> is past the end of <var
title="">input</var>, then discard <var title="">cue</var> and jump
to the step labeled <i>end</i>.</p></li>

<li><p>If the character indicated by <var title="">position</var>
is a U+000D CARRIAGE RETURN (CR) character, advance <var
title="">position</var> to the next character in <var
Expand Down

0 comments on commit abb0683

Please sign in to comment.