Skip to content

Commit ffddcfc

Browse files
committed
[css-syntax] Fold number-fraction into number-rest, since the sole difference was the treatment of '.'.
--HG-- extra : rebase_source : 12fd2e005f4d5481e664de4357f3c4c3f76e0e4d
1 parent 1890a15 commit ffddcfc

2 files changed

Lines changed: 46 additions & 241 deletions

File tree

css-syntax/Overview.html

Lines changed: 38 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -220,34 +220,31 @@ <h2 class="no-num no-toc" id=contents> Table of contents</h2>
220220
<li><a href="#number-rest-state"><span class=secno>4.4.10. </span>
221221
Number-rest state</a>
222222

223-
<li><a href="#number-fraction-state"><span class=secno>4.4.11. </span>
224-
Number-fraction state</a>
225-
226-
<li><a href="#dimension-state"><span class=secno>4.4.12. </span>
223+
<li><a href="#dimension-state"><span class=secno>4.4.11. </span>
227224
Dimension state</a>
228225

229-
<li><a href="#sci-notation-state"><span class=secno>4.4.13. </span>
226+
<li><a href="#sci-notation-state"><span class=secno>4.4.12. </span>
230227
Sci-notation state</a>
231228

232-
<li><a href="#url-state"><span class=secno>4.4.14. </span> URL
229+
<li><a href="#url-state"><span class=secno>4.4.13. </span> URL
233230
state</a>
234231

235-
<li><a href="#url-double-quote-state"><span class=secno>4.4.15.
232+
<li><a href="#url-double-quote-state"><span class=secno>4.4.14.
236233
</span> URL-double-quote state</a>
237234

238-
<li><a href="#url-single-quote-state"><span class=secno>4.4.16.
235+
<li><a href="#url-single-quote-state"><span class=secno>4.4.15.
239236
</span> URL-single-quote state</a>
240237

241-
<li><a href="#url-end-state"><span class=secno>4.4.17. </span> URL-end
238+
<li><a href="#url-end-state"><span class=secno>4.4.16. </span> URL-end
242239
state</a>
243240

244-
<li><a href="#url-unquoted-state"><span class=secno>4.4.18. </span>
241+
<li><a href="#url-unquoted-state"><span class=secno>4.4.17. </span>
245242
URL-unquoted state</a>
246243

247-
<li><a href="#bad-url-state"><span class=secno>4.4.19. </span> Bad-URL
244+
<li><a href="#bad-url-state"><span class=secno>4.4.18. </span> Bad-URL
248245
state</a>
249246

250-
<li><a href="#unicode-range-state"><span class=secno>4.4.20. </span>
247+
<li><a href="#unicode-range-state"><span class=secno>4.4.19. </span>
251248
Unicode-range state</a>
252249
</ul>
253250

@@ -2043,8 +2040,8 @@ <h4 id=number-state><span class=secno>4.4.9. </span> <dfn
20432040
character</i></a> is U+002E FULL STOP (.), consume the <a
20442041
href="#next-input-character"><i title="next input character">next two
20452042
input characters</i></a> and append them to the number token's
2046-
representation. Switch to the <a
2047-
href="#number-fraction-state0"><i>number-fraction state</i></a>.
2043+
representation. Set the number token's type flag to "number". Switch to
2044+
the <a href="#number-rest-state0"><i>number-rest state</i></a>.
20482045

20492046
<p> Otherwise, consume the <a href="#next-input-character"><i>next input
20502047
character</i></a> and append it to the number token's representation.
@@ -2056,8 +2053,9 @@ <h4 id=number-state><span class=secno>4.4.9. </span> <dfn
20562053
<dd> Append the <a href="#current-input-character"><i>current input
20572054
character</i></a> to the number token's representation. Consume the <a
20582055
href="#next-input-character"><i>next input character</i></a> and append
2059-
it to the number token's representation. Switch to the <a
2060-
href="#number-fraction-state0"><i>number-fraction state</i></a>.
2056+
it to the number token's representation. Set the number token's type flag
2057+
to "number". Switch to the <a href="#number-rest-state0"><i>number-rest
2058+
state</i></a>.
20612059

20622060
<dt><a href="#digit"><i>digit</i></a>
20632061

@@ -2087,107 +2085,18 @@ <h4 id=number-rest-state><span class=secno>4.4.10. </span> <dfn
20872085

20882086
<dt>U+002E FULL STOP (.)
20892087

2090-
<dd> If the <a href="#next-input-character"><i>next input
2091-
character</i></a> is a <a href="#digit"><i>digit</i></a>, consume it.
2092-
Append U+002E FULL STOP (.) followed by the <a
2093-
href="#digit"><i>digit</i></a> to the number token's representation.
2094-
Switch to the <a href="#number-fraction-state0"><i>number-fraction
2095-
state</i></a>.
2096-
<p> Otherwise, set the number token's value to the number produced by
2097-
interpreting the number token's representation as a base-10 number and
2098-
emit it. Switch to the <a href="#data-state0"><i>data state</i></a>. <a
2099-
href="#reconsume-the-current-input-character"><i>Reconsume the current
2100-
input character</i></a>.
2101-
2102-
<dt>U+0025 PERCENT SIGN (%)
2103-
2104-
<dd> Emit a percentage token with its value set to the number produced by
2105-
interpreting the number token's representation as a base-10 number.
2106-
Switch to the <a href="#data-state0"><i>data state</i></a>.
2107-
2108-
<dt>U+0045 LATIN CAPITAL LETTER E (E)
2109-
2110-
<dt>U+0065 LATIN SMALL LETTER E (e)
2111-
2112-
<dd> If the <a href="#next-input-character"><i>next input
2113-
character</i></a> is a <a href="#digit"><i>digit</i></a>, or the <a
2114-
href="#next-input-character"><i title="next input character">next 2 input
2115-
characters</i></a> are U+002B PLUS SIGN (+) or U+002D HYPHEN-MINUS (-)
2116-
followed by a <a href="#digit"><i>digit</i></a>, consume them. Append
2117-
U+0065 LATIN SMALL LETTER E (e) and the consumed characters to the number
2118-
token's representation. Switch to the <a
2119-
href="#sci-notation-state0"><i>sci-notation state</i></a>.
2120-
<p> Otherwise, create a dimension token with its representation set to
2121-
the number token's representation, its value set to the number produced
2122-
by interpreting the number token's representation as a base-10 number,
2123-
and a unit initially set to the <a
2124-
href="#current-input-character"><i>current input character</i></a>.
2125-
Switch to the <a href="#dimension-state0"><i>dimension state</i></a>.
2126-
2127-
<dt>U+002D HYPHEN-MINUS (-)
2128-
2129-
<dd> If the input stream <a
2130-
href="#check-if-three-characters-would-start-an0"><i>starts with an
2131-
identifier</i></a>, create a dimension token with its representation set
2132-
to the number token's representation, its value set to the number
2133-
produced by interpreting the number token's representation as a base-10
2134-
number, and a unit initially set to the <a
2135-
href="#current-input-character"><i>current input character</i></a>.
2136-
Switch to the <a href="#dimension-state0"><i>dimension state</i></a>.
2137-
<p> Otherwise, set the number token's value to the number produced by
2138-
interpreting the number token's representation as a base-10 number and
2139-
emit it. Switch to the <a href="#data-state0"><i>data state</i></a>. <a
2140-
href="#reconsume-the-current-input-character"><i>Reconsume the current
2141-
input character</i></a>.
2142-
2143-
<dt><a href="#name-start-character"><i>name-start character</i></a>
2144-
2145-
<dd> Create a dimension token with its representation set to the number
2146-
token's representation, its value set to the number produced by
2147-
interpreting the number token's representation as a base-10 number, and a
2148-
unit initially set to the <a href="#current-input-character"><i>current
2149-
input character</i></a>. Switch to the <a
2150-
href="#dimension-state0"><i>dimension state</i></a>.
2151-
2152-
<dt>U+005C REVERSE SOLIDUS (\)
2153-
2154-
<dd> If the input stream <a
2155-
href="#check-if-two-characters-are-a-valid-esca0"><i>starts with a valid
2156-
escape</i></a>, <a href="#consume-an-escaped-character0"><i>consume an
2157-
escaped character</i></a>. Create a dimension token with its
2158-
representation set to the number token's representation, its value set to
2159-
the number produced by interpreting the number token's representation as
2160-
a base-10 number, and a unit initially set to the returned character.
2161-
Switch to the <a href="#dimension-state0"><i>dimension state</i></a>.
2088+
<dd> If the number token's type flag is currently "integer" and the <a
2089+
href="#next-input-character"><i>next input character</i></a> is a <a
2090+
href="#digit"><i>digit</i></a>, consume it. Append U+002E FULL STOP (.)
2091+
followed by the <a href="#digit"><i>digit</i></a> to the number token's
2092+
representation. Set the number token's type flag to "number". Remain in
2093+
this state.
21622094
<p> Otherwise, set the number token's value to the number produced by
21632095
interpreting the number token's representation as a base-10 number and
21642096
emit it. Switch to the <a href="#data-state0"><i>data state</i></a>. <a
21652097
href="#reconsume-the-current-input-character"><i>Reconsume the current
21662098
input character</i></a>.
21672099

2168-
<dt>anything else
2169-
2170-
<dd> Emit a number token with its value set to the number produced by
2171-
interpreting the string token's value as a base-10 number. Switch to the
2172-
<a href="#data-state0"><i>data state</i></a>. <a
2173-
href="#reconsume-the-current-input-character"><i>Reconsume the current
2174-
input character</i></a>.
2175-
</dl>
2176-
2177-
<h4 id=number-fraction-state><span class=secno>4.4.11. </span> <dfn
2178-
id=number-fraction-state0>Number-fraction state</dfn></h4>
2179-
2180-
<p> Set the number token's type flag to "number".
2181-
2182-
<p> Consume the <a href="#next-input-character"><i>next input
2183-
character</i></a>.
2184-
2185-
<dl>
2186-
<dt><a href="#digit"><i>digit</i></a>
2187-
2188-
<dd> Append the <a href="#current-input-character"><i>current input
2189-
character</i></a> to the string token's value. Remain in this state.
2190-
21912100
<dt>U+0025 PERCENT SIGN (%)
21922101

21932102
<dd> Emit a percentage token with its value set to the number produced by
@@ -2263,7 +2172,7 @@ <h4 id=number-fraction-state><span class=secno>4.4.11. </span> <dfn
22632172
input character</i></a>.
22642173
</dl>
22652174

2266-
<h4 id=dimension-state><span class=secno>4.4.12. </span> <dfn
2175+
<h4 id=dimension-state><span class=secno>4.4.11. </span> <dfn
22672176
id=dimension-state0>Dimension state</dfn></h4>
22682177
<!--
22692178
This state is currently always entered with a dimension token
@@ -2303,7 +2212,7 @@ <h4 id=dimension-state><span class=secno>4.4.12. </span> <dfn
23032212
input character</i></a>.
23042213
</dl>
23052214

2306-
<h4 id=sci-notation-state><span class=secno>4.4.13. </span> <dfn
2215+
<h4 id=sci-notation-state><span class=secno>4.4.12. </span> <dfn
23072216
id=sci-notation-state0>Sci-notation state</dfn></h4>
23082217

23092218
<p> Set the number token's type flag to "number".
@@ -2336,7 +2245,7 @@ <h4 id=sci-notation-state><span class=secno>4.4.13. </span> <dfn
23362245
input character</i></a>.
23372246
</dl>
23382247

2339-
<h4 id=url-state><span class=secno>4.4.14. </span> <dfn id=url-state0>URL
2248+
<h4 id=url-state><span class=secno>4.4.13. </span> <dfn id=url-state0>URL
23402249
state</dfn></h4>
23412250

23422251
<p> Consume the <a href="#next-input-character"><i>next input
@@ -2376,7 +2285,7 @@ <h4 id=url-state><span class=secno>4.4.14. </span> <dfn id=url-state0>URL
23762285
input character</i></a>.
23772286
</dl>
23782287

2379-
<h4 id=url-double-quote-state><span class=secno>4.4.15. </span> <dfn
2288+
<h4 id=url-double-quote-state><span class=secno>4.4.14. </span> <dfn
23802289
id=url-double-quote-state0>URL-double-quote state</dfn></h4>
23812290

23822291
<p> If a url token has not yet been created since entering this state,
@@ -2422,7 +2331,7 @@ <h4 id=url-double-quote-state><span class=secno>4.4.15. </span> <dfn
24222331
character</i></a> to the url token's value. Remain in this state.
24232332
</dl>
24242333

2425-
<h4 id=url-single-quote-state><span class=secno>4.4.16. </span> <dfn
2334+
<h4 id=url-single-quote-state><span class=secno>4.4.15. </span> <dfn
24262335
id=url-single-quote-state0>URL-single-quote state</dfn></h4>
24272336

24282337
<p> If a url token has not yet been created since entering this state,
@@ -2468,7 +2377,7 @@ <h4 id=url-single-quote-state><span class=secno>4.4.16. </span> <dfn
24682377
character</i></a> to the url token's value. Remain in this state.
24692378
</dl>
24702379

2471-
<h4 id=url-end-state><span class=secno>4.4.17. </span> <dfn
2380+
<h4 id=url-end-state><span class=secno>4.4.16. </span> <dfn
24722381
id=url-end-state0>URL-end state</dfn></h4>
24732382

24742383
<p> Consume the <a href="#next-input-character"><i>next input
@@ -2494,7 +2403,7 @@ <h4 id=url-end-state><span class=secno>4.4.17. </span> <dfn
24942403
input character</i></a>.
24952404
</dl>
24962405

2497-
<h4 id=url-unquoted-state><span class=secno>4.4.18. </span> <dfn
2406+
<h4 id=url-unquoted-state><span class=secno>4.4.17. </span> <dfn
24982407
id=url-unquoted-state0>URL-unquoted state</dfn></h4>
24992408

25002409
<p> If a url token has not yet been created since entering this state,
@@ -2542,7 +2451,7 @@ <h4 id=url-unquoted-state><span class=secno>4.4.18. </span> <dfn
25422451
character</i></a> to the url token's value. Remain in this state.
25432452
</dl>
25442453

2545-
<h4 id=bad-url-state><span class=secno>4.4.19. </span> <dfn
2454+
<h4 id=bad-url-state><span class=secno>4.4.18. </span> <dfn
25462455
id=bad-url-state0>Bad-URL state</dfn></h4>
25472456

25482457
<p> Consume the <a href="#next-input-character"><i>next input
@@ -2573,7 +2482,7 @@ <h4 id=bad-url-state><span class=secno>4.4.19. </span> <dfn
25732482
<dd> Do nothing. Remain in this state.
25742483
</dl>
25752484

2576-
<h4 id=unicode-range-state><span class=secno>4.4.20. </span> <dfn
2485+
<h4 id=unicode-range-state><span class=secno>4.4.19. </span> <dfn
25772486
id=unicode-range-state0>Unicode-range state</dfn></h4>
25782487

25792488
<p> Create a new unicode-range token with an empty range.
@@ -4273,7 +4182,7 @@ <h2 class=no-num id=index> Index</h2>
42734182
title="section 7.2."><strong>7.2.</strong></a>
42744183

42754184
<li>Bad-URL state, <a href="#bad-url-state0"
4276-
title="section 4.4.19."><strong>4.4.19.</strong></a>
4185+
title="section 4.4.18."><strong>4.4.18.</strong></a>
42774186

42784187
<li>check if three characters would start an identifier, <a
42794188
href="#check-if-three-characters-would-start-an0"
@@ -4339,7 +4248,7 @@ <h2 class=no-num id=index> Index</h2>
43394248
<li>digit, <a href="#digit" title="section 4.3."><strong>4.3.</strong></a>
43404249

43414250
<li>Dimension state, <a href="#dimension-state0"
4342-
title="section 4.4.12."><strong>4.4.12.</strong></a>
4251+
title="section 4.4.11."><strong>4.4.11.</strong></a>
43434252

43444253
<li>Double-quote-string state, <a href="#double-quote-string-state0"
43454254
title="section 4.4.2."><strong>4.4.2.</strong></a>
@@ -4401,9 +4310,6 @@ <h2 class=no-num id=index> Index</h2>
44014310
<li>non-printable character, <a href="#non-printable-character"
44024311
title="section 4.3."><strong>4.3.</strong></a>
44034312

4404-
<li>Number-fraction state, <a href="#number-fraction-state0"
4405-
title="section 4.4.11."><strong>4.4.11.</strong></a>
4406-
44074313
<li>Number-rest state, <a href="#number-rest-state0"
44084314
title="section 4.4.10."><strong>4.4.10.</strong></a>
44094315

@@ -4458,7 +4364,7 @@ <h2 class=no-num id=index> Index</h2>
44584364
title="section 7.2."><strong>7.2.</strong></a>
44594365

44604366
<li>Sci-notation state, <a href="#sci-notation-state0"
4461-
title="section 4.4.13."><strong>4.4.13.</strong></a>
4367+
title="section 4.4.12."><strong>4.4.12.</strong></a>
44624368

44634369
<li>Set the unicode-range token's range, <a
44644370
href="#set-the-unicode-range-tokens-range0"
@@ -4508,25 +4414,25 @@ <h2 class=no-num id=index> Index</h2>
45084414
title="section 4.4.8."><strong>4.4.8.</strong></a>
45094415

45104416
<li>Unicode-range state, <a href="#unicode-range-state0"
4511-
title="section 4.4.20."><strong>4.4.20.</strong></a>
4417+
title="section 4.4.19."><strong>4.4.19.</strong></a>
45124418

45134419
<li>uppercase letter, <a href="#uppercase-letter"
45144420
title="section 4.3."><strong>4.3.</strong></a>
45154421

45164422
<li>URL-double-quote state, <a href="#url-double-quote-state0"
4517-
title="section 4.4.15."><strong>4.4.15.</strong></a>
4423+
title="section 4.4.14."><strong>4.4.14.</strong></a>
45184424

45194425
<li>URL-end state, <a href="#url-end-state0"
4520-
title="section 4.4.17."><strong>4.4.17.</strong></a>
4426+
title="section 4.4.16."><strong>4.4.16.</strong></a>
45214427

45224428
<li>URL-single-quote state, <a href="#url-single-quote-state0"
4523-
title="section 4.4.16."><strong>4.4.16.</strong></a>
4429+
title="section 4.4.15."><strong>4.4.15.</strong></a>
45244430

45254431
<li>URL state, <a href="#url-state0"
4526-
title="section 4.4.14."><strong>4.4.14.</strong></a>
4432+
title="section 4.4.13."><strong>4.4.13.</strong></a>
45274433

45284434
<li>URL-unquoted state, <a href="#url-unquoted-state0"
4529-
title="section 4.4.18."><strong>4.4.18.</strong></a>
4435+
title="section 4.4.17."><strong>4.4.17.</strong></a>
45304436

45314437
<li>whitespace, <a href="#whitespace"
45324438
title="section 4.3."><strong>4.3.</strong></a>

0 commit comments

Comments
 (0)