[css-syntax] Fix an off-by-one-token bug in "Consume a simple block" and "Consume a function".

Thu, 13 Mar 2014 16:03:05 +0000

author
Simon Sapin <simon.sapin@exyr.org>
date
Thu, 13 Mar 2014 16:03:05 +0000
changeset 13499
75bfda8a1479
parent 13498
dc04ee73ab22
child 13500
4b478aa2c205

[css-syntax] Fix an off-by-one-token bug in "Consume a simple block" and "Consume a function".

http://lists.w3.org/Archives/Public/www-style/2014Mar/0247.html

css-syntax/Overview.bs file | annotate | diff | comparison | revisions
css-syntax/Overview.html file | annotate | diff | comparison | revisions
     1.1 --- a/css-syntax/Overview.bs	Tue Mar 11 10:08:58 2014 -0400
     1.2 +++ b/css-syntax/Overview.bs	Thu Mar 13 16:03:05 2014 +0000
     1.3 @@ -2355,7 +2355,6 @@
     1.4  
     1.5  		<dt><a href="#tokendef-open-curly">&lt;{-token></a>
     1.6  		<dd>
     1.7 -			<a>Reconsume the current input token</a>.
     1.8  			<a>Consume a simple block</a>
     1.9  			and assign it to the at-rule's block.
    1.10  			Return the at-rule.
    1.11 @@ -2392,7 +2391,6 @@
    1.12  
    1.13  		<dt><a href="#tokendef-open-curly">&lt;{-token></a>
    1.14  		<dd>
    1.15 -			<a>Reconsume the current input token</a>.
    1.16  			<a>Consume a simple block</a>
    1.17  			and assign it to the qualified rule's block.
    1.18  			Return the qualified rule.
    1.19 @@ -2518,11 +2516,10 @@
    1.20  <h4 id="consume-a-simple-block">
    1.21  Consume a simple block</h4>
    1.22  
    1.23 -	Note: This algorithm assumes that the <a>next input token</a> has already been checked to be an <a href="#tokendef-open-curly">&lt;{-token></a>, <a href="#tokendef-open-square">&lt;[-token></a>, or <a href="#tokendef-open-paren">&lt;(-token></a>.
    1.24 +	Note: This algorithm assumes that the <a>current input token</a> has already been checked to be an <a href="#tokendef-open-curly">&lt;{-token></a>, <a href="#tokendef-open-square">&lt;[-token></a>, or <a href="#tokendef-open-paren">&lt;(-token></a>.
    1.25  
    1.26  	To <dfn>consume a simple block</dfn>:
    1.27  
    1.28 -	<a>Consume the next input token</a>.
    1.29  	The <dfn>ending token</dfn> is the mirror variant of the <a>current input token</a>.
    1.30  	(E.g. if it was called with <a href="#tokendef-open-square">&lt;[-token></a>, the <a>ending token</a> is <a href="#tokendef-close-square">&lt;]-token></a>.)
    1.31  
    1.32 @@ -2548,11 +2545,10 @@
    1.33  <h4 id="consume-a-function">
    1.34  Consume a function</h4>
    1.35  
    1.36 -	Note: This algorithm assumes that the <a>next input token</a> has already been checked to be a <<function-token>>.
    1.37 +	Note: This algorithm assumes that the <a>current input token</a> has already been checked to be a <<function-token>>.
    1.38  
    1.39  	To <dfn>consume a function</dfn>:
    1.40  
    1.41 -	<a>Consume the next input token</a>.
    1.42  	Create a function with a name equal to the value of the <a>current input token</a>,
    1.43  	and with a value which is initially an empty list.
    1.44  
    1.45 @@ -3212,6 +3208,13 @@
    1.46  
    1.47  	<em>This section is non-normative.</em>
    1.48  
    1.49 +<h3 id="changes-CR-20140220">
    1.50 +Changes from the 20 February 2014 Candidate Recommendation</h3>
    1.51 +
    1.52 +	<ul>
    1.53 +		<li>Fix several bugs in the tokenization and parsing algorithms.
    1.54 +	</ul>
    1.55 +
    1.56  <h3 id="changes-WD-20131105">
    1.57  Changes from the 5 November 2013 Last Call Working Draft</h3>
    1.58  
    1.59 @@ -3401,6 +3404,7 @@
    1.60  		Anne van Kesteren,
    1.61  		David Baron,
    1.62  		Henri Sivonen,
    1.63 +		Johannes Koch,
    1.64  		呂康豪 (Kang-Hao Lu),
    1.65  		Marc O'Morain,
    1.66  		Simon Pieter,
     2.1 --- a/css-syntax/Overview.html	Tue Mar 11 10:08:58 2014 -0400
     2.2 +++ b/css-syntax/Overview.html	Thu Mar 13 16:03:05 2014 +0000
     2.3 @@ -58,7 +58,7 @@
     2.4  </p>
     2.5    <h1 class="p-name no-ref" id=title>CSS Syntax Module Level 3</h1>
     2.6    <h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
     2.7 -    <span class=dt-updated><span class=value-title title=20140305>5 March 2014</span></span></span></h2>
     2.8 +    <span class=dt-updated><span class=value-title title=20140313>13 March 2014</span></span></span></h2>
     2.9    <div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-syntax/>http://dev.w3.org/csswg/css-syntax/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/css-syntax-3/>http://www.w3.org/TR/css-syntax-3/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/css-syntax/>http://dev.w3.org/csswg/css-syntax/</a><dt>Previous Versions:<dd><a href=http://www.w3.org/TR/2014/CR-css-syntax-3-20140220/ rel=previous>http://www.w3.org/TR/2014/CR-css-syntax-3-20140220/</a><dd><a href=http://www.w3.org/TR/2013/WD-css-syntax-3-20131105/ rel=previous>http://www.w3.org/TR/2013/WD-css-syntax-3-20131105/</a><dd><a href=http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/ rel=previous>http://www.w3.org/TR/2013/WD-css-syntax-3-20130919/</a>
    2.10      <dt>Feedback:</dt>
    2.11          <dd><a href="mailto:www-style@w3.org?subject=%5Bcss-syntax%5D%20feedback">www-style@w3.org</a>
    2.12 @@ -181,9 +181,10 @@
    2.13  		<li><a href=#serializing-anb><span class=secno>9.1</span> Serializing <var>&lt;an+b&gt;</var></a></ul>
    2.14  	<li><a href=#changes0><span class=secno>10</span> Changes</a>
    2.15  		<ul class=toc>
    2.16 -		<li><a href=#changes-WD-20131105><span class=secno>10.1</span> Changes from the 5 November 2013 Last Call Working Draft</a>
    2.17 -		<li><a href=#changes-WD-20130919><span class=secno>10.2</span> Changes from the 19 September 2013 Working Draft</a>
    2.18 -		<li><a href=#changes-css21><span class=secno>10.3</span> Changes from CSS 2.1 and Selectors Level 3</a></ul>
    2.19 +		<li><a href=#changes-CR-20140220><span class=secno>10.1</span> Changes from the 20 February 2014 Candidate Recommendation</a>
    2.20 +		<li><a href=#changes-WD-20131105><span class=secno>10.2</span> Changes from the 5 November 2013 Last Call Working Draft</a>
    2.21 +		<li><a href=#changes-WD-20130919><span class=secno>10.3</span> Changes from the 19 September 2013 Working Draft</a>
    2.22 +		<li><a href=#changes-css21><span class=secno>10.4</span> Changes from CSS 2.1 and Selectors Level 3</a></ul>
    2.23  	<li><a href=#acknowledgments><span class=secno></span> Acknowledgments</a>
    2.24  	<li><a href=#changes><span class=secno></span> Changes Since the 20 Feb 2014 CR Publication</a>
    2.25  	<li><a href=#conformance><span class=secno></span> Conformance</a>
    2.26 @@ -3868,7 +3869,6 @@
    2.27  
    2.28  		<dt><a href=#tokendef-open-curly>&lt;{-token&gt;</a>
    2.29  		<dd>
    2.30 -			<a data-link-type=dfn href=#reconsume-the-current-input-token title="reconsume the current input token">Reconsume the current input token</a>.
    2.31  			<a data-link-type=dfn href=#consume-a-simple-block0 title="consume a simple block">Consume a simple block</a>
    2.32  			and assign it to the at-rule’s block.
    2.33  			Return the at-rule.
    2.34 @@ -3905,7 +3905,6 @@
    2.35  
    2.36  		<dt><a href=#tokendef-open-curly>&lt;{-token&gt;</a>
    2.37  		<dd>
    2.38 -			<a data-link-type=dfn href=#reconsume-the-current-input-token title="reconsume the current input token">Reconsume the current input token</a>.
    2.39  			<a data-link-type=dfn href=#consume-a-simple-block0 title="consume a simple block">Consume a simple block</a>
    2.40  			and assign it to the qualified rule’s block.
    2.41  			Return the qualified rule.
    2.42 @@ -4031,12 +4030,11 @@
    2.43  <h4 class="heading settled heading" data-level=5.4.7 id=consume-a-simple-block><span class=secno>5.4.7 </span><span class=content>
    2.44  Consume a simple block</span><a class=self-link href=#consume-a-simple-block></a></h4>
    2.45  
    2.46 -<p class=note>	Note: This algorithm assumes that the <a data-link-type=dfn href=#next-input-token title="next input token">next input token</a> has already been checked to be an <a href=#tokendef-open-curly>&lt;{-token&gt;</a>, <a href=#tokendef-open-square>&lt;[-token&gt;</a>, or <a href=#tokendef-open-paren>&lt;(-token&gt;</a>.
    2.47 +<p class=note>	Note: This algorithm assumes that the <a data-link-type=dfn href=#current-input-token title="current input token">current input token</a> has already been checked to be an <a href=#tokendef-open-curly>&lt;{-token&gt;</a>, <a href=#tokendef-open-square>&lt;[-token&gt;</a>, or <a href=#tokendef-open-paren>&lt;(-token&gt;</a>.
    2.48  
    2.49  <p>	To <dfn data-dfn-type=dfn data-noexport="" id=consume-a-simple-block0>consume a simple block<a class=self-link href=#consume-a-simple-block0></a></dfn>:
    2.50  
    2.51 -<p>	<a data-link-type=dfn href=#consume-the-next-input-token title="consume the next input token">Consume the next input token</a>.
    2.52 -	The <dfn data-dfn-type=dfn data-noexport="" id=ending-token>ending token<a class=self-link href=#ending-token></a></dfn> is the mirror variant of the <a data-link-type=dfn href=#current-input-token title="current input token">current input token</a>.
    2.53 +<p>	The <dfn data-dfn-type=dfn data-noexport="" id=ending-token>ending token<a class=self-link href=#ending-token></a></dfn> is the mirror variant of the <a data-link-type=dfn href=#current-input-token title="current input token">current input token</a>.
    2.54  	(E.g. if it was called with <a href=#tokendef-open-square>&lt;[-token&gt;</a>, the <a data-link-type=dfn href=#ending-token title="ending token">ending token</a> is <a href=#tokendef-close-square>&lt;]-token&gt;</a>.)
    2.55  
    2.56  <p>	Create a <a data-link-type=dfn href=#simple-block title="simple block">simple block</a> with its associated token set to the <a data-link-type=dfn href=#current-input-token title="current input token">current input token</a>
    2.57 @@ -4061,12 +4059,11 @@
    2.58  <h4 class="heading settled heading" data-level=5.4.8 id=consume-a-function><span class=secno>5.4.8 </span><span class=content>
    2.59  Consume a function</span><a class=self-link href=#consume-a-function></a></h4>
    2.60  
    2.61 -<p class=note>	Note: This algorithm assumes that the <a data-link-type=dfn href=#next-input-token title="next input token">next input token</a> has already been checked to be a <a class="production css-code" data-link-type=type href=#typedef-function-token title="<function-token>">&lt;function-token&gt;</a>.
    2.62 +<p class=note>	Note: This algorithm assumes that the <a data-link-type=dfn href=#current-input-token title="current input token">current input token</a> has already been checked to be a <a class="production css-code" data-link-type=type href=#typedef-function-token title="<function-token>">&lt;function-token&gt;</a>.
    2.63  
    2.64  <p>	To <dfn data-dfn-type=dfn data-noexport="" id=consume-a-function0>consume a function<a class=self-link href=#consume-a-function0></a></dfn>:
    2.65  
    2.66 -<p>	<a data-link-type=dfn href=#consume-the-next-input-token title="consume the next input token">Consume the next input token</a>.
    2.67 -	Create a function with a name equal to the value of the <a data-link-type=dfn href=#current-input-token title="current input token">current input token</a>,
    2.68 +<p>	Create a function with a name equal to the value of the <a data-link-type=dfn href=#current-input-token title="current input token">current input token</a>,
    2.69  	and with a value which is initially an empty list.
    2.70  
    2.71  <p>	Repeatedly consume the <a data-link-type=dfn href=#next-input-token title="next input token">next input token</a> and process it as follows:
    2.72 @@ -4696,7 +4693,14 @@
    2.73  
    2.74  <p>	<em>This section is non-normative.</em>
    2.75  
    2.76 -<h3 class="heading settled heading" data-level=10.1 id=changes-WD-20131105><span class=secno>10.1 </span><span class=content>
    2.77 +<h3 class="heading settled heading" data-level=10.1 id=changes-CR-20140220><span class=secno>10.1 </span><span class=content>
    2.78 +Changes from the 20 February 2014 Candidate Recommendation</span><a class=self-link href=#changes-CR-20140220></a></h3>
    2.79 +
    2.80 +<p>	<ul>
    2.81 +		<li>Fix several bugs in the tokenization and parsing algorithms.
    2.82 +	</ul>
    2.83 +
    2.84 +<h3 class="heading settled heading" data-level=10.2 id=changes-WD-20131105><span class=secno>10.2 </span><span class=content>
    2.85  Changes from the 5 November 2013 Last Call Working Draft</span><a class=self-link href=#changes-WD-20131105></a></h3>
    2.86  
    2.87  <p>	<ul>
    2.88 @@ -4719,7 +4723,7 @@
    2.89  
    2.90  <pre>@charset "   <em>(lots of whitespace)</em>   utf-8";</pre>	</ul>
    2.91  
    2.92 -<h3 class="heading settled heading" data-level=10.2 id=changes-WD-20130919><span class=secno>10.2 </span><span class=content>
    2.93 +<h3 class="heading settled heading" data-level=10.3 id=changes-WD-20130919><span class=secno>10.3 </span><span class=content>
    2.94  Changes from the 19 September 2013 Working Draft</span><a class=self-link href=#changes-WD-20130919></a></h3>
    2.95  
    2.96  <p>	<ul>
    2.97 @@ -4729,7 +4733,7 @@
    2.98  			but some of the definitions should be moved to the relevant specs.
    2.99  	</ul>
   2.100  
   2.101 -<h3 class="heading settled heading" data-level=10.3 id=changes-css21><span class=secno>10.3 </span><span class=content>
   2.102 +<h3 class="heading settled heading" data-level=10.4 id=changes-css21><span class=secno>10.4 </span><span class=content>
   2.103  Changes from CSS 2.1 and Selectors Level 3</span><a class=self-link href=#changes-css21></a></h3>
   2.104  
   2.105  <p class=note>	Note: The point of this spec is to match reality;
   2.106 @@ -4881,6 +4885,7 @@
   2.107  		Anne van Kesteren,
   2.108  		David Baron,
   2.109  		Henri Sivonen,
   2.110 +		Johannes Koch,
   2.111  		呂康豪 (Kang-Hao Lu),
   2.112  		Marc O’Morain,
   2.113  		Simon Pieter,

mercurial