[html5] r6659 - [e] (0) simplify the parser a little to avoid a redundant step and make it clear [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Oct 11 15:35:21 PDT 2011


Author: ianh
Date: 2011-10-11 15:35:20 -0700 (Tue, 11 Oct 2011)
New Revision: 6659

Modified:
   complete.html
   index
   source
Log:
[e] (0) simplify the parser a little to avoid a redundant step and make it clear why it's redundant
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=14298

Modified: complete.html
===================================================================
--- complete.html	2011-10-11 00:42:22 UTC (rev 6658)
+++ complete.html	2011-10-11 22:35:20 UTC (rev 6659)
@@ -33099,6 +33099,17 @@
    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>
@@ -33133,15 +33144,6 @@
    <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="">--></code>" (U+002D HYPHEN-MINUS, U+002D
    HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then jump to the step
@@ -33150,9 +33152,6 @@
    <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>
 

Modified: index
===================================================================
--- index	2011-10-11 00:42:22 UTC (rev 6658)
+++ index	2011-10-11 22:35:20 UTC (rev 6659)
@@ -33099,6 +33099,17 @@
    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>
@@ -33133,15 +33144,6 @@
    <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="">--></code>" (U+002D HYPHEN-MINUS, U+002D
    HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then jump to the step
@@ -33150,9 +33152,6 @@
    <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>
 

Modified: source
===================================================================
--- source	2011-10-11 00:42:22 UTC (rev 6658)
+++ source	2011-10-11 22:35:20 UTC (rev 6659)
@@ -36244,6 +36244,19 @@
    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>
@@ -36278,15 +36291,6 @@
    <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
@@ -36295,10 +36299,6 @@
    <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




More information about the Commit-Watchers mailing list