Skip to content

Commit e67e707

Browse files
committed
[css-syntax] Remove old an+b parsing section.
1 parent d1f0651 commit e67e707

2 files changed

Lines changed: 0 additions & 250 deletions

File tree

css-syntax/Overview.html

Lines changed: 0 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,6 @@ <h2 class="no-num no-toc" id=contents> Table of contents</h2>
313313
<li><a href="#parse-a-comma-separated-list-of-componen"><span
314314
class=secno>5.4.6. </span> Parse a comma-separated list of component
315315
values</a>
316-
317-
<li><a href="#parse-anb-notation"><span class=secno>5.4.7. </span>
318-
Parse an+b notation</a>
319316
</ul>
320317

321318
<li><a href="#parser-algorithms"><span class=secno>5.5. </span> Parser
@@ -3601,113 +3598,6 @@ <h4 id=parse-a-comma-separated-list-of-componen><span class=secno>5.4.6.
36013598
<var>val</var>, and return <var>val</var>.
36023599
</ol>
36033600

3604-
<h4 id=parse-anb-notation><span class=secno>5.4.7. </span> <dfn
3605-
id=parse-anb-notation0>Parse an+b notation</dfn></h4>
3606-
3607-
<p> To <a href="#parse-anb-notation0"><i>parse an+b notation</i></a>:
3608-
3609-
<p> Initialize an integer called <var>step</var> to 0, an integer called
3610-
<var>offset</var> to 0, and a string called <var>repr</var> to the empty
3611-
string.
3612-
3613-
<p> Repeatedly consume the <a href="#next-input-token"><i>next input
3614-
token</i></a> and process it as follows:
3615-
3616-
<dl>
3617-
<dt>ident token
3618-
3619-
<dt>number token with its type flag set to "integer"
3620-
3621-
<dt>dimension token
3622-
3623-
<dd> Append the token's value, representation, or representation and unit,
3624-
respectively, to <var>repr</var>.
3625-
3626-
<dt>delim token with the value "+"
3627-
3628-
<dd> Append U+002B PLUS SIGN (+) to <var>repr</var>.
3629-
3630-
<dt>delim token with the value "-"
3631-
3632-
<dd> Append U+002D HYPHEN-MINUS (-) to <var>repr</var>.
3633-
3634-
<dt>whitespace token
3635-
3636-
<dd> Append U+0020 SPACE ( ) to <var>repr</var>.
3637-
3638-
<dt>EOF
3639-
3640-
<dd> Continue to the next step of the algorithm.
3641-
3642-
<dt>anything else
3643-
3644-
<dd> This is a <a href="#parse-errors"><i>parse error</i></a>. Return a
3645-
syntax error.
3646-
</dl>
3647-
3648-
<p> Trim U+0020 SPACE ( ) characters from the front and back of
3649-
<var>repr</var>, then process it as follows:
3650-
3651-
<ol>
3652-
<li> If <var>repr</var> is an <a href="#ascii-case-insensitive"><i>ASCII
3653-
case-insensitive</i></a> match for the string "odd", set <var>step</var>
3654-
to 2 and <var>offset</var> to 1.
3655-
3656-
<li> Otherwise, if <var>repr</var> is an <a
3657-
href="#ascii-case-insensitive"><i>ASCII case-insensitive</i></a> match
3658-
for the string "even", set <var>step</var> to 2 and <var>offset</var> to
3659-
0.
3660-
3661-
<li> Otherwise, if <var>repr</var> consists solely of <a
3662-
href="#digit"><i>digits</i></a>, optionally prefixed with a single U+002B
3663-
PLUS SIGN (+) or U+002D HYPHEN-MINUS (-), interpret <var>repr</var> as a
3664-
base-10 number, and set <var>step</var> to the result.
3665-
3666-
<li> Otherwise, if <var>repr</var> contains U+004E LATIN CAPITAL LETTER N
3667-
(N), or U+006E LATIN SMALL LETTER N (n), split <var>repr</var> into two
3668-
substrings composed respectively of the characters preceding and
3669-
following the first such letter.
3670-
<p> Interpret the first string as follows:
3671-
3672-
<ul>
3673-
<li> If the first string is empty, set <var>step</var> to 1.
3674-
3675-
<li> Otherwise, if the first string consists solely of a single U+002B
3676-
PLUS SIGN (+) or U+002D HYPHEN-MINUS (-), set <var>step</var> to 1 or
3677-
-1, respectively.
3678-
3679-
<li> Otherwise, if the first string consists solely of <a
3680-
href="#digit"><i>digits</i></a>, optionally prefixed with a single
3681-
U+002B PLUS SIGN (+) or U+002D HYPHEN-MINUS (-), interpret the first
3682-
string as a base-10 number, and set <var>step</var> to the result.
3683-
3684-
<li> Otherwise, this is a <a href="#parse-errors"><i>parse
3685-
error</i></a>; return a syntax error.
3686-
</ul>
3687-
3688-
<p> Interpret the second string as follows:
3689-
3690-
<ul>
3691-
<li> If the second string is empty, set <var>offset</var> to 0.
3692-
3693-
<li> Otherwise, if the second string consists solely of 0 or more U+0020
3694-
SPACE characters, optionally followed by a single U+002B PLUS SIGN (+)
3695-
or U+002D HYPHEN-MINUS (-) character, followed by 0 or more U+0020
3696-
SPACE characters, followed by 1 or more <a
3697-
href="#digit"><i>digits</i></a>, interpret the digits as a base-10
3698-
number. If there was a U+002D HYPHEN-MINUS (-) character, negate the
3699-
result. Set <var>offset</var> to the result.
3700-
3701-
<li> Otherwise, this is a <a href="#parse-errors"><i>parse
3702-
error</i></a>; return a syntax error.
3703-
</ul>
3704-
3705-
<li> Otherwise, this is a <a href="#parse-errors"><i>parse error</i></a>;
3706-
return a syntax error.
3707-
</ol>
3708-
3709-
<p> Return <var>step</var> and <var>offset</var>.
3710-
37113601
<h3 id=parser-algorithms><span class=secno>5.5. </span> Parser Algorithms</h3>
37123602

37133603
<p> The following algorithms comprise the parser. They are called by the
@@ -4614,9 +4504,6 @@ <h2 class=no-num id=index> Index</h2>
46144504
<li>Parse a list of declarations, <a href="#parse-a-list-of-declarations0"
46154505
title="section 5.4.3."><strong>5.4.3.</strong></a>
46164506

4617-
<li>Parse an+b notation, <a href="#parse-anb-notation0"
4618-
title="section 5.4.7."><strong>5.4.7.</strong></a>
4619-
46204507
<li>Parse a rule, <a href="#parse-a-rule0"
46214508
title="section 5.4.2."><strong>5.4.2.</strong></a>
46224509

css-syntax/Overview.src.html

Lines changed: 0 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -2518,143 +2518,6 @@ <h4>
25182518
and return <var>val</var>.
25192519
</ol>
25202520

2521-
<h4>
2522-
<dfn>Parse an+b notation</dfn></h4>
2523-
2524-
<p>
2525-
To <i>parse an+b notation</i>:
2526-
2527-
<p>
2528-
Initialize an integer called <var>step</var> to 0,
2529-
an integer called <var>offset</var> to 0,
2530-
and a string called <var>repr</var> to the empty string.
2531-
2532-
<p>
2533-
Repeatedly consume the <i>next input token</i>
2534-
and process it as follows:
2535-
2536-
<dl>
2537-
<dt>ident token
2538-
<dt>number token with its type flag set to "integer"
2539-
<dt>dimension token
2540-
<dd>
2541-
Append the token's value, representation, or representation and unit, respectively, to <var>repr</var>.
2542-
2543-
<dt>delim token with the value "+"
2544-
<dd>
2545-
Append U+002B PLUS SIGN (+) to <var>repr</var>.
2546-
2547-
<dt>delim token with the value "-"
2548-
<dd>
2549-
Append U+002D HYPHEN-MINUS (-) to <var>repr</var>.
2550-
2551-
<dt>whitespace token
2552-
<dd>
2553-
Append U+0020 SPACE ( ) to <var>repr</var>.
2554-
2555-
<dt>EOF
2556-
<dd>
2557-
Continue to the next step of the algorithm.
2558-
2559-
<dt>anything else
2560-
<dd>
2561-
This is a <i>parse error</i>.
2562-
Return a syntax error.
2563-
</dl>
2564-
2565-
<p>
2566-
Trim U+0020 SPACE ( ) characters from the front and back of <var>repr</var>,
2567-
then process it as follows:
2568-
2569-
<ol>
2570-
<li>
2571-
If <var>repr</var> is an <i>ASCII case-insensitive</i> match
2572-
for the string "odd",
2573-
set <var>step</var> to 2
2574-
and <var>offset</var> to 1.
2575-
2576-
<li>
2577-
Otherwise, if <var>repr</var> is an <i>ASCII case-insensitive</i> match
2578-
for the string "even",
2579-
set <var>step</var> to 2
2580-
and <var>offset</var> to 0.
2581-
2582-
<li>
2583-
Otherwise, if <var>repr</var> consists solely of <i>digits</i>,
2584-
optionally prefixed with a single
2585-
U+002B PLUS SIGN (+)
2586-
or U+002D HYPHEN-MINUS (-),
2587-
interpret <var>repr</var> as a base-10 number,
2588-
and set <var>step</var> to the result.
2589-
2590-
<li>
2591-
Otherwise, if <var>repr</var> contains
2592-
U+004E LATIN CAPITAL LETTER N (N),
2593-
or U+006E LATIN SMALL LETTER N (n),
2594-
split <var>repr</var> into two substrings
2595-
composed respectively of the characters preceding and following the first such letter.
2596-
2597-
<p>
2598-
Interpret the first string as follows:
2599-
2600-
<ul>
2601-
<li>
2602-
If the first string is empty,
2603-
set <var>step</var> to 1.
2604-
2605-
<li>
2606-
Otherwise, if the first string consists solely of a single
2607-
U+002B PLUS SIGN (+)
2608-
or U+002D HYPHEN-MINUS (-),
2609-
set <var>step</var> to 1 or -1, respectively.
2610-
2611-
<li>
2612-
Otherwise, if the first string consists solely of <i>digits</i>,
2613-
optionally prefixed with a single
2614-
U+002B PLUS SIGN (+)
2615-
or U+002D HYPHEN-MINUS (-),
2616-
interpret the first string as a base-10 number,
2617-
and set <var>step</var> to the result.
2618-
2619-
<li>
2620-
Otherwise, this is a <i>parse error</i>;
2621-
return a syntax error.
2622-
</ul>
2623-
2624-
<p>
2625-
Interpret the second string as follows:
2626-
2627-
<ul>
2628-
<li>
2629-
If the second string is empty,
2630-
set <var>offset</var> to 0.
2631-
2632-
<li>
2633-
Otherwise, if the second string consists solely of
2634-
0 or more U+0020 SPACE characters,
2635-
optionally followed by a single
2636-
U+002B PLUS SIGN (+)
2637-
or U+002D HYPHEN-MINUS (-) character,
2638-
followed by 0 or more U+0020 SPACE characters,
2639-
followed by 1 or more <i>digits</i>,
2640-
interpret the digits as a base-10 number.
2641-
If there was a U+002D HYPHEN-MINUS (-) character,
2642-
negate the result.
2643-
Set <var>offset</var> to the result.
2644-
2645-
<li>
2646-
Otherwise, this is a <i>parse error</i>;
2647-
return a syntax error.
2648-
</ul>
2649-
2650-
<li>
2651-
Otherwise, this is a <i>parse error</i>;
2652-
return a syntax error.
2653-
</ol>
2654-
2655-
<p>
2656-
Return <var>step</var> and <var>offset</var>.
2657-
26582521
<h3>
26592522
Parser Algorithms</h3>
26602523

0 commit comments

Comments
 (0)