Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[giow] (0) Captions - Stage 11.6: Parsing bad cues in WebSRT.
git-svn-id: http://svn.whatwg.org/webapps@5114 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 29, 2010
1 parent 62c7035 commit 2305aa4
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 11 deletions.
32 changes: 28 additions & 4 deletions complete.html
Expand Up @@ -209,7 +209,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<hgroup><h1>Web Applications 1.0</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 26 June 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 28 June 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -26929,6 +26929,9 @@ <h6 id=parsing-0><span class=secno>4.8.10.11.2 </span>Parsing</h6>
<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>

<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+000A LINE FEED (LF) character, advance <var title="">position</var> to the next character in <var title="">input</var>.</li>

Expand Down Expand Up @@ -26959,12 +26962,33 @@ <h6 id=parsing-0><span class=secno>4.8.10.11.2 </span>Parsing</h6>

<li><p>Jump to the step labeled <i>cue loop</i>.</li>


<li><p><i>Bad cue</i>: Discard <var title="">cue</var>.</li>

<li><p class=XXX>read until the next blank line; if you hit the
end of the file jump to <i>end</i>.</li>
<li><p><i>Bad cue loop</i>: <p>If <var title="">position</var> is
past the end of <var title="">input</var>, then 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>

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

<li><p>If the character indicated by <var title="">position</var>
is a U+000A LINE FEED (LF) character, advance <var title="">position</var> to the next character in <var title="">input</var>.</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>cue loop</i>.</li>

<li><p>Otherwise, jump to the step labeled <i>bad cue
loop</i>.</li>

<li><p>Jump to the step labeled <i>cue loop</i>.</li>

<li><p><i>End</i>: The file has ended. Abort these steps. The
<a href=#websrt-parser>WebSRT parser</a> has finished.</li>
Expand Down
32 changes: 28 additions & 4 deletions index
Expand Up @@ -213,7 +213,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<hgroup><h1>HTML5 (including next generation additions still in development)</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 26 June 2010</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 28 June 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
Expand Down Expand Up @@ -26862,6 +26862,9 @@ CueEvent
<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>

<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+000A LINE FEED (LF) character, advance <var title="">position</var> to the next character in <var title="">input</var>.</li>

Expand Down Expand Up @@ -26892,12 +26895,33 @@ CueEvent

<li><p>Jump to the step labeled <i>cue loop</i>.</li>


<li><p><i>Bad cue</i>: Discard <var title="">cue</var>.</li>

<li><p class=XXX>read until the next blank line; if you hit the
end of the file jump to <i>end</i>.</li>
<li><p><i>Bad cue loop</i>: <p>If <var title="">position</var> is
past the end of <var title="">input</var>, then 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>

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

<li><p>If the character indicated by <var title="">position</var>
is a U+000A LINE FEED (LF) character, advance <var title="">position</var> to the next character in <var title="">input</var>.</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>cue loop</i>.</li>

<li><p>Otherwise, jump to the step labeled <i>bad cue
loop</i>.</li>

<li><p>Jump to the step labeled <i>cue loop</i>.</li>

<li><p><i>End</i>: The file has ended. Abort these steps. The
<a href=#websrt-parser>WebSRT parser</a> has finished.</li>
Expand Down
36 changes: 33 additions & 3 deletions source
Expand Up @@ -29196,6 +29196,10 @@ CueEvent
title="">position</var> to the next character in <var
title="">input</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+000A LINE FEED (LF) character, advance <var
title="">position</var> to the next character in <var
Expand Down Expand Up @@ -29229,12 +29233,38 @@ CueEvent

<li><p>Jump to the step labeled <i>cue loop</i>.</p></li>


<li><p><i>Bad cue</i>: Discard <var title="">cue</var>.</p></li>

<li><p class="XXX">read until the next blank line; if you hit the
end of the file jump to <i>end</i>.</p></li>
<li><p><i>Bad cue loop</i>: <p>If <var title="">position</var> is
past the end of <var title="">input</var>, then 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
title="">input</var>.</p></li>

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

<li><p>If the character indicated by <var title="">position</var>
is a U+000A LINE FEED (LF) character, advance <var
title="">position</var> to the next character in <var
title="">input</var>.</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>cue loop</i>.</p></li>

<li><p>Otherwise, jump to the step labeled <i>bad cue
loop</i>.</p></li>

<li><p>Jump to the step labeled <i>cue loop</i>.</p></li>

<li><p><i>End</i>: The file has ended. Abort these steps. The
<span>WebSRT parser</span> has finished.</p></li>
Expand Down

0 comments on commit 2305aa4

Please sign in to comment.